|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7460],{89489:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},59477:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},40001:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},81953:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},49198:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},87169:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},73331:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},15277:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},52671:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},8657:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},10906:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},56082:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},33853:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},15075:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},43531:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},76618:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},61485:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},38819:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},47472:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(ge,le){return me.createElement(Ce.Z,(0,Me.Z)({},ge,{ref:le,icon:ke}))},he=me.forwardRef(Le),ye=he},37036:function(){"use strict"},88010:function(_n,en){"use strict";en.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},23257:function(_n,en){"use strict";en.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"}},38476:function(){"use strict"},39775:function(_n,en,Ee){"use strict";var Me=Ee(59301),me=Object.defineProperty,Be=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Le=(xe,ge,le)=>ge in xe?me(xe,ge,{enumerable:!0,configurable:!0,writable:!0,value:le}):xe[ge]=le,he=(xe,ge)=>{for(var le in ge||(ge={}))ke.call(ge,le)&&Le(xe,le,ge[le]);if(Be)for(var le of Be(ge))Ce.call(ge,le)&&Le(xe,le,ge[le]);return xe};const ye=xe=>React.createElement("svg",he({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},xe),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"})));en.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},93450:function(_n,en,Ee){"use strict";var Me=Ee(59301),me=Object.defineProperty,Be=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Le=(xe,ge,le)=>ge in xe?me(xe,ge,{enumerable:!0,configurable:!0,writable:!0,value:le}):xe[ge]=le,he=(xe,ge)=>{for(var le in ge||(ge={}))ke.call(ge,le)&&Le(xe,le,ge[le]);if(Be)for(var le of Be(ge))Ce.call(ge,le)&&Le(xe,le,ge[le]);return xe};const ye=xe=>React.createElement("svg",he({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},xe),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"})));en.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},74413:function(){"use strict";function _n(ce,z,ee,oe){ee===void 0&&(ee=0),oe===void 0&&(oe=1/0),this._name=ce,this._defaultValue=z,this._minimum=ee,this._maximum=oe}Object.defineProperty(_n.prototype,"name",{get:function(){return this._name},set:function(ce){if(typeof ce!="string"||ce==="")throw new Error("Shape name must be a valid string.");this._name=ce}}),Object.defineProperty(_n.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(ce){if(typeof ce!="number"||isNaN(ce))throw new Error("The default value must be a real number, not: "+ce);this._defaultValue=ce}}),Object.defineProperty(_n.prototype,"minimum",{get:function(){return this._minimum},set:function(ce){if(typeof ce!="number"||isNaN(ce))throw new Error("Minimum must be a real number, not: "+ce);this._minimum=ce}}),Object.defineProperty(_n.prototype,"maximum",{get:function(){return this._maximum},set:function(ce){if(typeof ce!="number"||isNaN(ce))throw new Error("Maximum must be a real number, not: "+ce);this._maximum=ce}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(ce,z){var ee=go.Shape._FigureParameters[ce];return ee?ee[z]:null},go.Shape.setFigureParameter=function(ce,z,ee){if(!(ee instanceof _n))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var oe=go.Shape._FigureParameters[ce];oe||(oe=[],go.Shape._FigureParameters[ce]=oe),oe[z]=ee};var en=[];function Ee(ce,z){var ee=en.pop();return ee===void 0?new go.Point(ce,z):(ee.x=ce,ee.y=z,ee)}function Me(){var ce=en.pop();return ce===void 0?new go.Point:ce}function me(ce){en.push(ce)}function Be(ce,z,ee,oe,ie,se,ue,Se,we){we||(we=new go.Point);var Pe=ce-ee,Ae=ie-ue,De=NaN,ze=NaN;if(Pe===0)if(Ae===0)ce===ee&&(De=ce,ze=z);else{var Ze=(se-Se)/Ae,Xe=se-Ze*ie;De=ce,ze=Ze*De+Xe}else if(Ae===0){var Ge=(z-oe)/Pe,ft=z-Ge*ce;De=ie,ze=Ge*De+ft}else{var Ge=(z-oe)/Pe,Ze=(se-Se)/Ae,ft=z-Ge*ce,Xe=se-Ze*ie;De=(Xe-ft)/(Ge-Ze),ze=Ge*De+ft}return we.x=De,we.y=ze,we}function ke(ce,z,ee,oe,ie,se,ue,Se,we,Pe,Ae,De,ze,Ze){var Xe=1-we,Ge=we,ft=ce*Xe+ee*Ge,at=z*Xe+oe*Ge,Ct=ee*Xe+ie*Ge,et=oe*Xe+se*Ge,yt=ie*Xe+ue*Ge,st=se*Xe+Se*Ge,zt=ft*Xe+Ct*Ge,lt=at*Xe+et*Ge,tt=Ct*Xe+yt*Ge,ut=et*Xe+st*Ge,mt=zt*Xe+tt*Ge,Pt=lt*Xe+ut*Ge;Pe.x=ft,Pe.y=at,Ae.x=zt,Ae.y=lt,De.x=mt,De.y=Pt,ze.x=tt,ze.y=ut,Ze.x=yt,Ze.y=st}var Ce=new go.Spot(.156,.156),Le=new go.Spot(.844,.844),he=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new _n("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=5),oe=Math.min(oe,z/3),oe=Math.min(oe,ee/3);var ie=oe*he,se=new go.Geometry().add(new go.PathFigure(oe,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-oe,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,oe,z-ie,0,z,ie)).add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)).add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,ee-ie,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,oe,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,ie,ee,0,ee-ie)).add(new go.PathSegment(go.PathSegment.Line,0,oe)).add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()));return ie>1&&(se.spot1=new go.Spot(0,0,ie,ie),se.spot2=new go.Spot(1,1,-ie,-ie)),se}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(ce,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=0,oe.startY=ee/2,oe.endX=z,oe.endY=ee/2,oe}),go.Shape.defineFigureGenerator("LineV",function(ce,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=z/2,oe.startY=0,oe.endX=z/2,oe.endY=ee,oe}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.25*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.75*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(ce,z,ee){var oe=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(oe*z,(1-oe)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Move,oe*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,(1-oe)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(ce,z,ee){var oe=z/2,ie=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,oe,oe,oe,oe).close()));return ie.spot1=Ce,ie.spot2=Le,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(ce,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=0,oe.startY=0,oe.endX=z,oe.endY=ee,oe}),go.Shape.defineFigureGenerator("Line2",function(ce,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=z,oe.startY=0,oe.endX=0,oe.endY=ee,oe}),go.Shape.defineFigureGenerator("Curve1",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,he*z,0,z,(1-he)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,0,he*ee,(1-he)*z,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,he*ee,he*z,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-he)*z,0,0,(1-he)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new _n("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)?oe=.1:oe<-1?oe=-1:oe>1&&(oe=1);var ie=Math.abs(oe)*z;if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=z,se.endY=ee,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&se.setSpots(ie/z,0,(z-ie)/z,1),se}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new _n("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)?oe=10:oe<-z?oe=-z:oe>z&&(oe=z);var ie=Math.abs(oe);if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=z,se.endY=ee,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&se.setSpots(ie/z,0,(z-ie)/z,1),se}}),go.Shape.setFigureParameter("Trapezoid1",0,new _n("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)?oe=.2:oe<.5?oe=-.5:oe>.5&&(oe=.5);var ie=Math.abs(oe)*z;if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=z,se.endY=ee,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&se.setSpots(ie/z,0,(z-ie)/z,1),se}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new _n("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)?oe=20:oe<-z?oe=-z/2:oe>z&&(oe=z/2);var ie=Math.abs(oe);if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=z,se.endY=ee,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&se.setSpots(ie/z,0,(z-ie)/z,1),se}}),go.Shape.setFigureParameter("ManualOperation",0,new _n("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)?oe=10:oe<-z?oe=-z/2:oe>z&&(oe=z/2);var ie=Math.abs(oe);if(oe===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=z,se.endY=ee,se}else{var se=new go.Geometry;return oe>0?se.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())):se.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),ie<z/2&&se.setSpots(ie/z,0,(z-ie)/z,1),se}});var ye=[];function xe(){var ce=ye.pop();return ce===void 0?[]:ce}function ge(ce){ce.length=0,ye.push(ce)}function le(ce){for(var z=xe(),ee=.5,oe=.5,ie=Math.PI*1.5,se=0,ue=0;ue<ce;ue++)se=2*Math.PI/ce*ue+ie,z[ue]=new go.Point(oe+ee*Math.cos(se),oe+ee*Math.sin(se));return z.push(z[0]),z}function ve(ce){var z=de(ce),ee=xe();ee[0]=z[0];for(var oe=1,ie=1;oe<z.length;oe+=2,ie+=3)ee[ie]=z[oe],ee[ie+1]=z[oe],ee[ie+2]=z[oe+1];return ge(z),ee}function de(ce){for(var z=le(ce),ee=xe(),oe=Math.floor(z.length/2),ie=z.length-1,se=ce%2===0?2:1,ue=0;ue<ie;ue++){var Se=z[ue],we=z[ue+1],Pe=z[(oe+ue-1)%ie],Ae=z[(oe+ue+se)%ie];ee[ue*2]=Se,ee[ue*2+1]=Be(Se.x,Se.y,Pe.x,Pe.y,we.x,we.y,Ae.x,Ae.y,new go.Point)}return ee[ee.length]=ee[0],ge(z),ee}go.Shape.defineFigureGenerator("Pentagon",function(ce,z,ee){var oe=le(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<5;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(ce,z,ee){var oe=le(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<6;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(ce,z,ee){var oe=le(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<7;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(ce,z,ee){var oe=le(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<8;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(ce,z,ee){var oe=le(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<9;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(ce,z,ee){var oe=le(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<10;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(ce,z,ee){var oe=le(12),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<12;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("FivePointedStar",function(ce,z,ee){var oe=de(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<10;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.266,.333),ie.spot2=new go.Spot(.733,.733),ie}),go.Shape.defineFigureGenerator("SixPointedStar",function(ce,z,ee){var oe=de(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<12;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.17,.25),ie.spot2=new go.Spot(.83,.75),ie}),go.Shape.defineFigureGenerator("SevenPointedStar",function(ce,z,ee){var oe=de(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<14;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("EightPointedStar",function(ce,z,ee){var oe=de(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<16;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.25,.25),ie.spot2=new go.Spot(.75,.75),ie}),go.Shape.defineFigureGenerator("NinePointedStar",function(ce,z,ee){var oe=de(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<18;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("TenPointedStar",function(ce,z,ee){var oe=de(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<20;ue++)se.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return se.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),ge(oe),ie.spot1=new go.Spot(.281,.261),ie.spot2=new go.Spot(.723,.748),ie}),go.Shape.defineFigureGenerator("FivePointedBurst",function(ce,z,ee){var oe=ve(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("SixPointedBurst",function(ce,z,ee){var oe=ve(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.17,.222),ie.spot2=new go.Spot(.833,.777),ie}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(ce,z,ee){var oe=ve(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("EightPointedBurst",function(ce,z,ee){var oe=ve(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("NinePointedBurst",function(ce,z,ee){var oe=ve(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("TenPointedBurst",function(ce,z,ee){var oe=ve(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var ue=1;ue<oe.length;ue+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return se.segments.last().close(),ge(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.setFigureParameter("FramedRectangle",0,new _n("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new _n("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(ce,z,ee){var oe=ce?ce.parameter1:NaN,ie=ce?ce.parameter2:NaN;isNaN(oe)&&(oe=8),isNaN(ie)&&(ie=8);var se=new go.Geometry,ue=new go.PathFigure(0,0,!0);return se.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe<z/2&&ie<ee/2&&(ue.add(new go.PathSegment(go.PathSegment.Move,oe,ie)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,ie).close())),se.setSpots(0,0,1,1,oe,ie,-oe,-ie),se}),go.Shape.setFigureParameter("Ring",0,new _n("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=8);var ie=z/2,se=new go.Geometry,ue=new go.PathFigure(z,z/2,!0);se.add(ue),ue.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var Se=Math.max(ie-oe,0);return Se>0&&(ue.add(new go.PathSegment(go.PathSegment.Move,z/2+Se,z/2)),ue.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,Se,Se).close())),se.spot1=Ce,se.spot2=Le,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Cloud",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.08034461*z,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*z,.05349299*ee,-.09239631*z,.07836421*ee,.1406031*z,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*z,.074219*ee,.2450511*z,-.00697547*ee,.3776197*z,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*z,.07004196*ee,.4539471*z,0,.6066018*z,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*z,.08370865*ee,.6914277*z,-.01904177*ee,.8921095*z,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*z,.3194596*ee,1.036446*z,.04105738*ee,1.020377*z,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*z,.562044*ee,1.04448*z,.360238*ee,.992256*z,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*z,.8217117*ee,1.032337*z,.5771781*ee,1.018411*z,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*z,.9156953*ee,1.028411*z,.9571472*ee,.8556702*z,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*z,.9310455*ee,.7431877*z,1.009325*ee,.5624123*z,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*z,.9344623*ee,.4820677*z,1.031761*ee,.3030112*z,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.870098*ee,.2329994*z,1.01518*ee,.03213784*z,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*z,.6545475*ee,-.02812061*z,.9032597*ee,-.01205169*z,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*z,.4265613*ee,-.01812061*z,.6089503*ee,-.00606892*z,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.1944299*ee,-.01606892*z,.3892545*ee,-.01205169*z,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(ce,z,ee){var oe=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(oe*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,z,(1-oe)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,ee)).add(new go.PathSegment(go.PathSegment.Line,oe*z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,oe*ee).close())).setSpots(oe/2,oe/2,1-oe/2,1-oe/2)}),go.Shape.setFigureParameter("Pie",0,new _n("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new _n("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(ce,z,ee){var oe=ce?ce.parameter1:NaN,ie=ce?ce.parameter2:NaN;isNaN(oe)&&(oe=0),isNaN(ie)&&(ie=315);var se=oe%360;se<0&&(se+=360);var ue=ie%360,Se=Math.min(z,ee)/2;return new go.Geometry().add(new go.PathFigure(Se,Se).add(new go.PathSegment(go.PathSegment.Arc,se,ue,Se,Se,Se,Se).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(ce,z,ee){var oe=he/Math.SQRT2*.5,ie=Math.SQRT2/2,se=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,ie*z,se*ee,z,(1-oe)*ee,(ie+oe)*z,(se+oe)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new _n("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30);var ie=Math.min(oe,z)/2,se=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(se-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,se+ie,0)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ee)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ue-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new _n("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=Math.min(oe,z)/2,se=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(se-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,se+ie,0)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,ee)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,se-ie,ue-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new _n("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;if((isNaN(oe)||oe<0)&&(oe=30),z===0||ee===0){var ie=new go.Geometry(go.Geometry.Rectangle);return ie.startX=0,ie.startY=0,ie.endX=z,ie.endY=ee,ie}else{var se=z/2,ue=ee/2,Se=Math.atan2(ee,z),we=oe-Math.min(Math.cos(Se)*oe/2,se),Pe=oe-Math.min(Math.sin(Se)*oe/2,ue),ie=new go.Geometry,Ae=new go.PathFigure(we,0,!0);return ie.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,se,.2*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,z-we,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,ee-Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,z-we,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,se,.8*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,we,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,ee-Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,Pe).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new _n("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=new go.Geometry,se=new go.PathFigure(.1*z,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),ie}),go.Shape.setFigureParameter("SquareIBeam",0,new _n("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.2);var ie=new go.Geometry,se=new go.PathFigure(0,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,oe*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*z,oe*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*z,(1-oe)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,(1-oe)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*z,(1-oe)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*z,oe*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,oe*ee).close()),ie}),go.Shape.setFigureParameter("RoundedIBeam",0,new _n("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.5);var ie=new go.Geometry,se=new go.PathFigure(0,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,Math.abs(1-oe)*z,.25*ee,Math.abs(1-oe)*z,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*z,.75*ee,oe*z,.25*ee).close()),ie}),go.Shape.defineFigureGenerator("HalfEllipse",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,he*z,0,z,(.5-he/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,(.5+he/2)*ee,he*z,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,0,z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*z,.75*ee,.5*z,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*z,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,0,0,.45*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.55*z,0,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.5*ee,.9*z,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*z,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.6*z,.2*ee,z,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.7*ee,z,.8*ee,.6*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,.5*z,.75*ee,.55*z,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.7*ee,.45*z,.95*ee,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*z,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*z,.01*ee,0,.25*ee,.4*z,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.4*z,.6*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,ee,.5*z,.75*ee,.45*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*ee,.55*z,.95*ee,.5*z,.75*ee));var se=.2,ue=.3,Se=0,we=se*he;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+se+Se)*ee,(.5-se+ue)*z,(.5+we+Se)*ee,(.5-we+ue)*z,(.5+se+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+ue)*z,(.5+Se)*ee,(.5+we+ue)*z,(.5+se+Se)*ee,(.5+se+ue)*z,(.5+we+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-se+Se)*ee,(1-.5+se+ue)*z,(.5-we+Se)*ee,(.5+we+ue)*z,(.5-se+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-we+ue)*z,(.5-se+Se)*ee,(.5-se+ue+.05)*z,(.5-we+Se-.02)*ee)),se=.2,ue=0,Se=-.3,we=se*he,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+ue)*z,(.5+Se)*ee,(.5+we+ue)*z,(.5+se+Se)*ee,(.5+se+ue)*z,(.5+we+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-se+Se)*ee,(1-.5+se+ue)*z,(.5-we+Se)*ee,(.5+we+ue)*z,(.5-se+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ue)*z,(.5+Se)*ee,(.5-we+ue)*z,(.5-se+Se)*ee,(.5-se+ue)*z,(.5-we+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-we+ue)*z,(.5+se+Se)*ee,(.5-se+ue)*z,(.5+we+Se)*ee,(.5-we+ue)*z,(.5+se+Se)*ee)),se=.2,ue=-.3,Se=0,we=se*he,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-se+Se)*ee,(1-.5+se+ue-.05)*z,(.5-we+Se-.02)*ee,(.5+we+ue)*z,(.5-se+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ue)*z,(.5+Se)*ee,(.5-we+ue)*z,(.5-se+Se)*ee,(.5-se+ue)*z,(.5-we+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+se+Se)*ee,(.5-se+ue)*z,(.5+we+Se)*ee,(.5-we+ue)*z,(.5+se+Se)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+we+ue)*z,(.5+se+Se)*ee,(.5+se+ue)*z,(.5+we+Se)*ee).close()),oe.setSpots(.06,.33,.93,.68),oe}),go.Shape.defineFigureGenerator("YinYang",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.5,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var se=.1,ue=.5,Se=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(ue+se)*z,Se*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ue,ee*Se,se*z,se*z).close()),ie=new go.PathFigure(z*.5,0,!1),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),Se=.75,ie=new go.PathFigure((ue+se)*z,Se*ee,!0),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ue,ee*Se,se*z,se*z).close()),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Peace",function(ce,z,ee){var oe=.8535533905932737,ie=.5*z,se=.5*ee;return new go.Geometry().add(new go.PathFigure(ie,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,ie,se,ie,se)).add(new go.PathSegment(go.PathSegment.Line,ie,ee)).add(new go.PathSegment(go.PathSegment.Move,ie,se)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Move,ie,se)).add(new go.PathSegment(go.PathSegment.Line,oe*z,oe*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,ue=.5,Se=.5,we=new go.PathFigure(ue*z,(Se-se)*ee);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),se=.4,ie=he*.4;var Pe=Me(),Ae=Me(),De=Me(),ze=Me();ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.42,Pe,Ae,De,ze,ze);var Ze=Me(),Xe=Me(),Ge=Me();ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.58,ze,ze,Ge,Ze,Xe);var ft=Me(),at=Me(),Ct=Me();ke(ue,Se+se,ue-ie,Se+se,ue-se,Se+ie,ue-se,Se,.42,ft,at,Ct,ze,ze);var et=Me(),yt=Me(),st=Me();return ke(ue,Se+se,ue-ie,Se+se,ue-se,Se+ie,ue-se,Se,.58,ze,ze,st,et,yt),we.add(new go.PathSegment(go.PathSegment.Move,st.x*z,st.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,et.x*z,et.y*ee,yt.x*z,yt.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,De.x*z,De.y*ee,Pe.x*z,Pe.y*ee,Ae.x*z,Ae.y*ee)),we.add(new go.PathSegment(go.PathSegment.Line,st.x*z,st.y*ee).close()),we.add(new go.PathSegment(go.PathSegment.Move,Ct.x*z,Ct.y*ee)),we.add(new go.PathSegment(go.PathSegment.Line,Ge.x*z,Ge.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,Ze.x*z,Ze.y*ee,Xe.x*z,Xe.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,Ct.x*z,Ct.y*ee,ft.x*z,ft.y*ee,at.x*z,at.y*ee).close()),me(Pe),me(Ae),me(De),me(ze),me(Ze),me(Xe),me(Ge),me(ft),me(at),me(Ct),me(et),me(yt),me(st),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Fragile",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*z,0)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*z,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.5*ee,z,.25*ee,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new _n("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30),oe>z&&(oe=z);var ie=(z-oe)/2,se=ie+oe;return new go.Geometry().add(new go.PathFigure(se,.5*ee).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*z,0)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(ce,z,ee){var oe=new go.Geometry,ie=he*.4,se=.4,ue=.5,Se=.5,we=Me(),Pe=Me(),Ae=Me(),De=Me(),ze=new go.PathFigure((ue-se)*z,Se*ee,!1);oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee)),ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.44,Ae,De,Pe,we,we),ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*z,Pe.y*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee));var Ze=Ee(Pe.x,Pe.y);ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.56,we,we,Pe,Ae,De);var Xe=Ee(Pe.x,Pe.y);ze.add(new go.PathSegment(go.PathSegment.Line,(Ze.x*.1+.95*.9)*z,Ze.y*.1*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.85*z,Ze.y*.1*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),ze.add(new go.PathSegment(go.PathSegment.Line,z,0)),ze.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,(Xe.x*.1+.9)*z,.15*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,(Xe.x*.1+.9)*z,(Xe.y*.1+.05*.9)*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,Xe.x*z,Xe.y*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee)),se=.35,ie=he*.35;var Ge=new go.PathFigure(ue*z,(Se-se)*ee,!1);oe.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee));var ft=new go.PathFigure((ue-se)*z,Se*ee,!1);return oe.add(ft),me(we),me(Pe),me(Ae),me(De),me(Ze),me(Xe),oe.spot1=new go.Spot(.202,.257),oe.spot2=new go.Spot(.792,.739),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("GenderFemale",function(ce,z,ee){var oe=new go.Geometry,ie=.375,se=0,ue=-.125,Se=ie*he,we=new go.PathFigure((.525+se)*z,(.5+ie+ue)*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*z,(.5+ue)*ee,(.5+Se+se)*z,(.5+ie+ue)*ee,(.5+ie+se)*z,(.5+Se+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5-ie+ue)*ee,(1-.5+ie+se)*z,(.5-Se+ue)*ee,(.5+Se+se)*z,(.5-ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+ue)*ee,(.5-Se+se)*z,(.5-ie+ue)*ee,(.5-ie+se)*z,(.5-Se+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.475+se)*z,(.5+ie+ue)*ee,(.5-ie+se)*z,(.5+Se+ue)*ee,(.5-Se+se)*z,(.5+ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.475*z,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.525*z,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee).close()),ie=.325,se=0,ue=-.125,Se=ie*he;var we=new go.PathFigure((1-.5+ie+se)*z,(.5+ue)*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5+ie+ue)*ee,(.5+ie+se)*z,(.5+Se+ue)*ee,(.5+Se+se)*z,(.5+ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+ue)*ee,(.5-Se+se)*z,(.5+ie+ue)*ee,(.5-ie+se)*z,(.5+Se+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5-ie+ue)*ee,(.5-ie+se)*z,(.5-Se+ue)*ee,(.5-Se+se)*z,(.5-ie+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*z,(.5+ue)*ee,(.5+Se+se)*z,(.5-ie+ue)*ee,(1-.5+ie+se)*z,(.5-Se+ue)*ee));var we=new go.PathFigure((.525+se)*z,(.5+ie+ue)*ee,!1);return oe.add(we),oe.spot1=new go.Spot(.232,.136),oe.spot2=new go.Spot(.682,.611),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("LogicImplies",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;return isNaN(oe)&&(oe=.2),new go.Geometry().add(new go.PathFigure((1-oe)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;return isNaN(oe)&&(oe=.2),new go.Geometry().add(new go.PathFigure((1-oe)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,oe*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,oe*z,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(ce,z,ee){var oe=new go.Geometry().add(new go.PathFigure(.5*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*z,.5*ee,.5*z,.5*ee)));return oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("LogicTruth",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(ce,z,ee){var oe=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,oe*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,oe*z,oe*ee,oe*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(ce,z,ee){var oe=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,oe*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,oe*z,oe*ee,oe*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new _n("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new _n("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=.3);var se=(1-oe)*z,ue=(.5-ie/2)*ee,Se=(.5+ie/2)*ee,we=new go.Geometry,Pe=new go.PathFigure(0,ue,!0);we.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,se,ue)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,Se)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,Se).close()),we.spot1=new go.Spot(0,ue/ee);var Ae=Be(0,Se/ee,1,Se/ee,se/z,1,1,.5,Me());return we.spot2=new go.Spot(Ae.x,Ae.y),me(Ae),we}),go.Shape.setFigureParameter("Arrow2",0,new _n("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new _n("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=30),oe>z&&(oe=z);var ie=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,ee/2);var se=z-oe,ue=(ee-ie)/2,Se=ue+ie,we=new go.Geometry,Pe=new go.PathFigure(0,ue,!0);we.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,se,ue)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,se,Se)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,Se).close()),we.spot1=new go.Spot(0,ue/ee);var Ae=Be(0,Se/ee,1,Se/ee,se/z,1,1,.5,Me());return we.spot2=new go.Spot(Ae.x,Ae.y),me(Ae),we}),go.Shape.defineFigureGenerator("Chevron",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("DoubleArrow",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),oe}),go.Shape.setFigureParameter("DoubleEndArrow",0,new _n("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,ue=new go.Geometry,Se=new go.PathFigure(z,.5*ee,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var we=Be(0,.5,.3,0,0,ie/ee,.1,ie/ee,Me());return ue.spot1=new go.Spot(we.x,we.y),we=Be(.7,1,1,.5,0,se/ee,1,se/ee,we),ue.spot2=new go.Spot(we.x,we.y),me(we),ue}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new _n("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new _n("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=100);var se=(ee-oe)/2,ue=se+oe,Se=(ee-ie)/2,we=Se+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,se=(ee-oe)/2,ue=se+oe,Se=0,we=ee):(se=0,ue=ee,Se=0,we=ee));var Pe=new go.Geometry,Ae=new go.PathFigure(z,.5*ee,!0);Pe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,we)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*z,we)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*z,Se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*z,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,Se).close());var De=Be(0,.5,.3,Se/ee,0,se/ee,1,se/ee,Me());return Pe.spot1=new go.Spot(De.x,De.y),De=Be(.7,we/ee,1,.5,0,ue/ee,1,ue/ee,De),Pe.spot2=new go.Spot(De.x,De.y),me(De),Pe}),go.Shape.setFigureParameter("IBeamArrow",0,new _n("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,ue=new go.Geometry,Se=new go.PathFigure(z,.5*ee,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,0,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(0,ie/ee);var we=Be(.7,1,1,.5,0,se/ee,1,se/ee,Me());return ue.spot2=new go.Spot(we.x,we.y),me(we),ue}),go.Shape.setFigureParameter("IBeamArrow2",0,new _n("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new _n("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=100);var se=(ee-oe)/2,ue=se+oe,Se=(ee-ie)/2,we=Se+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,se=(ee-oe)/2,ue=se+oe,Se=0,we=ee):(se=0,ue=ee,Se=0,we=ee));var Pe=new go.Geometry,Ae=new go.PathFigure(z,.5*ee,!0);Pe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,we)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,we)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,we)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,Se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,Se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*z,Se).close()),Pe.spot1=new go.Spot(0,se/ee);var De=Be(.7,we/ee,1,.5,0,ue/ee,1,ue/ee,Me());return Pe.spot2=new go.Spot(De.x,De.y),me(De),Pe}),go.Shape.setFigureParameter("Pointer",0,new _n("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.1);var ie=new go.Geometry,se=new go.PathFigure(z,.5*ee,!0);ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,oe*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),ie.spot1=new go.Spot(oe,.35);var ue=Be(.2,.65,1,.65,0,1,1,.5,Me());return ie.spot2=new go.Spot(ue.x,ue.y),me(ue),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new _n("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=new go.Geometry,se=new go.PathFigure(z,.5*ee,!0);ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*z,.75*ee,oe*z,.25*ee).close()),ie.spot1=new go.Spot(oe,.35);var ue=Be(0,.65,1,.65,0,1,1,.5,Me());return ie.spot2=new go.Spot(ue.x,ue.y),me(ue),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new _n("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.4);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,ue=new go.Geometry,Se=new go.PathFigure(z,.5*ee,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,0,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,0,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,.3);var we=Be(.7,1,1,.5,0,se/ee,1,se/ee,Me());return ue.spot2=new go.Spot(we.x,we.y),me(we),ue}),go.Shape.setFigureParameter("SplitEndArrow2",0,new _n("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=50);var ie=(ee-oe)/2,se=ie+oe;oe>ee&&(ie=0,se=ee);var ue=new go.Geometry,Se=new go.PathFigure(z,.5*ee,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),Se.add(new go.PathSegment(go.PathSegment.Line,0,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,0,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,ie/ee);var we=Be(.7,1,1,.5,0,se/ee,1,se/ee,Me());return ue.spot2=new go.Spot(we.x,we.y),me(we),ue}),go.Shape.setFigureParameter("SquareArrow",0,new _n("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.7);var ie=new go.Geometry,se=new go.PathFigure(z,.5*ee,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,oe*z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,oe*z,0).close()),ie.spot1=go.Spot.TopLeft,ie.spot2=new go.Spot(oe,1),ie}),go.Shape.defineFigureGenerator("Cone1",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,ue=new go.PathFigure(0,.9*ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+se)*ee).close()),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.97),oe}),go.Shape.defineFigureGenerator("Cone2",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.9*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,ee,.85/.9*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var se=new go.PathFigure(0,.9*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,.8*ee,.85/.9*z,.8*ee)),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.82),oe}),go.Shape.defineFigureGenerator("Cube1",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var se=new go.PathFigure(.5*z,ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(.5,.85),oe}),go.Shape.defineFigureGenerator("Cube2",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.3*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var se=new go.PathFigure(0,.3*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(.7,1),oe}),go.Shape.defineFigureGenerator("Cylinder1",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,se=he*.5,ue=new go.PathFigure(0,oe,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,he*oe,(.5-se)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,1*z,oe,(.5+se)*z,0,1*z,he*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*ee,1*z,ee-he*oe,(.5+se)*z,1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,(.5-se)*z,1*ee,0,ee-he*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,0,oe));var Se=new go.PathFigure(z,oe,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*oe,1*z,2*oe-he*oe,(.5+se)*z,2*oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,oe,(.5-se)*z,2*oe,0,2*oe-he*oe)),ie.spot1=new go.Spot(0,0,0,2*oe),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder2",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,se=he*.5,ue=new go.PathFigure(0,ee-oe,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,he*oe,(.5-se)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,oe,(.5+se)*z,0,z,he*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,ee-he*oe,(.5+se)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,(.5-se)*z,ee,0,ee-he*oe));var Se=new go.PathFigure(0,ee-oe,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee-2*oe,0,ee-oe-he*oe,(.5-se)*z,ee-2*oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,z,ee-oe,(.5+se)*z,ee-2*oe,z,ee-oe-he*oe)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,0,-2*oe),ie}),go.Shape.defineFigureGenerator("Cylinder3",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,se=he*.5,ue=new go.PathFigure(oe,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-he*oe,0,z,(.5-se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,(.5+se)*ee,z-he*oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,he*oe,ee,0,(.5+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-se)*ee,he*oe,0));var Se=new go.PathFigure(oe,0,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,2*oe,.5*ee,oe+he*oe,0,2*oe,(.5-se)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,oe,ee,2*oe,(.5+se)*ee,oe+he*oe,ee)),ie.spot1=new go.Spot(0,0,2*oe,0),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder4",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,se=he*.5,ue=new go.PathFigure(z-oe,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-he*oe,0,z,(.5-se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,(.5+se)*ee,z-he*oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,he*oe,ee,0,(.5+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-se)*ee,he*oe,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,0));var Se=new go.PathFigure(z-oe,0,!1);return ie.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,z-2*oe,.5*ee,z-oe-he*oe,0,z-2*oe,(.5-se)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z-2*oe,(.5+se)*ee,z-oe-he*oe,ee)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,-2*oe,0),ie}),go.Shape.defineFigureGenerator("Prism1",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.25*z,.25*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var se=new go.PathFigure(.25*z,.25*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),oe.spot1=new go.Spot(.408,.172),oe.spot2=new go.Spot(.833,.662),oe}),go.Shape.defineFigureGenerator("Prism2",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var se=new go.PathFigure(0,ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("Pyramid1",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var se=new go.PathFigure(.5*z,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),oe.spot1=new go.Spot(.25,.367),oe.spot2=new go.Spot(.75,.875),oe}),go.Shape.defineFigureGenerator("Pyramid2",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var se=new go.PathFigure(.5*z,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),oe.spot1=new go.Spot(.25,.367),oe.spot2=new go.Spot(.75,.875),oe}),go.Shape.defineFigureGenerator("Actor",function(ce,z,ee){var oe=new go.Geometry,ie=.2,se=.1,ue=he*ie,Se=he*se,we=.5,Pe=.1,Ae=new go.PathFigure(we*z,(Pe+se)*ee,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we-ie)*z,Pe*ee,(we-ue)*z,(Pe+se)*ee,(we-ie)*z,(Pe+Se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-se)*ee,(we-ie)*z,(Pe-Se)*ee,(we-ue)*z,(Pe-se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we+ie)*z,Pe*ee,(we+ue)*z,(Pe-se)*ee,(we+ie)*z,(Pe-Se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe+se)*ee,(we+ie)*z,(Pe+Se)*ee,(we+ue)*z,(Pe+se)*ee));var De=.05,ze=he*De;we=.05,Pe=.25;var Ze=new go.PathFigure(.5*z,.2*ee,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*ee)),we=.95,Pe=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we+De)*z,Pe*ee,(we+ze)*z,(Pe-De)*ee,(we+De)*z,(Pe-ze)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*ee)),De=.025,ze=he*De,we=.825,Pe=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-De)*ee,(we+De)*z,(Pe-ze)*ee,(we+ze)*z,(Pe-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-De)*z,Pe*ee,(we-ze)*z,(Pe-De)*ee,(we-De)*z,(Pe-ze)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee)),De=.05,ze=he*De,we=.5,Pe=.7,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-De)*ee,(we+De)*z,(Pe-ze)*ee,(we+ze)*z,(Pe-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-De)*z,Pe*ee,(we-ze)*z,(Pe-De)*ee,(we-De)*z,(Pe-ze)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.45*z,ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*ee)),De=.025,ze=he*De,we=.175,Pe=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-De)*ee,(we+De)*z,(Pe-ze)*ee,(we+ze)*z,(Pe-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-De)*z,Pe*ee,(we-ze)*z,(Pe-De)*ee,(we-De)*z,(Pe-ze)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),De=.05,ze=he*De,we=.05,Pe=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-De)*ee,(we-De)*z,(Pe-ze)*ee,(we-ze)*z,(Pe-De)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),oe.spot1=new go.Spot(.2,.2),oe.spot2=new go.Spot(.8,.65),oe}),go.Shape.setFigureParameter("Card",0,new _n("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;isNaN(oe)&&(oe=.2);var ie=new go.Geometry,se=new go.PathFigure(z,0,!0);return ie.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,oe*ee)),se.add(new go.PathSegment(go.PathSegment.Line,oe*z,0).close()),ie.spot1=new go.Spot(0,oe),ie.spot2=go.Spot.BottomRight,ie}),go.Shape.defineFigureGenerator("Collate",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee));var se=new go.PathFigure(.5*z,.5*ee,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),oe.spot1=new go.Spot(.25,0),oe.spot2=new go.Spot(.75,.25),oe}),go.Shape.defineFigureGenerator("CreateRequest",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,ie*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),oe}),go.Shape.defineFigureGenerator("Database",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,ue=new go.PathFigure(z,.1*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-se)*ee,(.5-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-se)*ee));var Se=new go.PathFigure(z,.1*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+se)*ee,(.5+ie)*z,.2*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+se)*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+se)*ee,(.5+ie)*z,.3*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+se)*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,z,.3*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*ee,z,(.3+se)*ee,(.5+ie)*z,.4*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-ie)*z,.4*ee,0,(.3+se)*ee)),oe.spot1=new go.Spot(0,.4),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("DataStorage",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*ee,.25*z,.1*ee).close()),oe.spot1=new go.Spot(.226,0),oe.spot2=new go.Spot(.81,1),oe}),go.Shape.defineFigureGenerator("DiskStorage",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,ue=new go.PathFigure(z,.1*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-se)*ee,(.5-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-se)*ee));var Se=new go.PathFigure(z,.1*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+se)*ee,(.5+ie)*z,.2*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+se)*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+se)*ee,(.5+ie)*z,.3*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+se)*ee)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("Display",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),oe.spot1=new go.Spot(.25,0),oe.spot2=new go.Spot(.75,1),oe}),go.Shape.defineFigureGenerator("DividedEvent",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var se=he*.2,ue=new go.PathFigure(0,.2*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-se)*ee,(.2-se)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*ee,(.8+se)*z,0,z,(.2-se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,ee,z,(.8+se)*ee,(.8+se)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-se)*z,ee,0,(.8+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var Se=new go.PathFigure(0,ie*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),oe}),go.Shape.defineFigureGenerator("DividedProcess",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;(isNaN(ie)||ie<.1)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,ie*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),oe}),go.Shape.defineFigureGenerator("Document",function(ce,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(1,.6),oe}),go.Shape.defineFigureGenerator("ExternalOrganization",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;(isNaN(ie)||ie<.2)&&(ie=.2);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(ie*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),oe}),go.Shape.defineFigureGenerator("ExternalProcess",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var se=new go.PathFigure(.1*z,.4*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*ee)),oe.spot1=new go.Spot(.25,.25),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("File",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var se=new go.PathFigure(.75*z,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Interrupt",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee));var se=new go.PathFigure(z,.5*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,ee));var ue=new go.PathFigure(z,.5*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("InternalStorage",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN,se=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.1);var ue=new go.PathFigure(0,0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var Se=new go.PathFigure(ie*z,0,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,z,se*ee)),oe}),go.Shape.defineFigureGenerator("Junction",function(ce,z,ee){var oe=new go.Geometry,ie=1/Math.SQRT2,se=(1-1/Math.SQRT2)/2,ue=he*.5,Se=.5,we=new go.PathFigure(z,Se*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,ee,z,(Se+ue)*ee,(Se+ue)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,Se*ee,(Se-ue)*z,ee,0,(Se+ue)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,0,0,(Se-ue)*ee,(Se-ue)*z,0)),we.add(new go.PathSegment(go.PathSegment.Bezier,z,Se*ee,(Se+ue)*z,0,z,(Se-ue)*ee));var Pe=new go.PathFigure((se+ie)*z,(se+ie)*ee,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,se*z,se*ee)),Pe.add(new go.PathSegment(go.PathSegment.Move,se*z,(se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,(se+ie)*z,se*ee)),oe}),go.Shape.defineFigureGenerator("LinedDocument",function(ce,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close());var se=new go.PathFigure(.1*z,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*ee)),oe.spot1=new go.Spot(.1,0),oe.spot2=new go.Spot(1,.6),oe}),go.Shape.defineFigureGenerator("LoopLimit",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("MagneticTape",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,ue=new go.PathFigure(.5*z,ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,se*ee,(se+ie)*z,0,z,(se-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(se+.1)*z,.9*ee,z,(se+ie)*ee,(se+ie)*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),oe.spot1=new go.Spot(.15,.15),oe.spot2=new go.Spot(.85,.8),oe}),go.Shape.defineFigureGenerator("ManualInput",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("MessageFromUser",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.7);var se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,ie*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("MicroformProcessing",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.25);var se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,ie*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,(1-ie)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("MicroformRecording",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(1,.75),oe}),go.Shape.defineFigureGenerator("MultiDocument",function(ce,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*ee,.96*z,.47*ee,.93*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*ee,.86*z,.57*ee,.83*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*z,.4*ee,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var se=new go.PathFigure(.1*z,.2*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.8,.77),oe}),go.Shape.defineFigureGenerator("MultiProcess",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,.1*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close());var se=new go.PathFigure(.2*z,.1*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),oe.spot1=new go.Spot(0,.2),oe.spot2=new go.Spot(.8,1),oe}),go.Shape.defineFigureGenerator("OfflineStorage",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=1-ie,ue=new go.PathFigure(0,0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close());var Se=new go.PathFigure(.5*ie*z,ie*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*z,ie*ee)),oe}),go.Shape.defineFigureGenerator("OffPageConnector",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(.75,1),oe}),go.Shape.defineFigureGenerator("Or",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,ue=new go.PathFigure(z,se*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,se*z,ee,z,(se+ie)*ee,(se+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,se*ee,(se+ie)*z,0,z,(se-ie)*ee));var Se=new go.PathFigure(z,.5*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),oe}),go.Shape.defineFigureGenerator("PaperTape",function(ce,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.5*z,.6*ee,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),oe.spot1=new go.Spot(0,.49),oe.spot2=new go.Spot(1,.75),oe}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN,se=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.3);var ue=new go.PathFigure(0,0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN,se=ce?ce.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.3);var ue=new go.PathFigure(0,0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Procedure",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure((1-ie)*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,ie*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),oe}),go.Shape.defineFigureGenerator("Process",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(ie*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Sort",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var se=new go.PathFigure(0,.5*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),oe.spot1=new go.Spot(.25,.25),oe.spot2=new go.Spot(.75,.5),oe}),go.Shape.defineFigureGenerator("Start",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.25);var se=new go.PathFigure(ie*z,0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee));var ue=new go.PathFigure(ie*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),oe.spot1=new go.Spot(ie,0),oe.spot2=new go.Spot(1-ie,1),oe}),go.Shape.defineFigureGenerator("Terminator",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee)),oe.spot1=new go.Spot(.23,0),oe.spot2=new go.Spot(.77,1),oe}),go.Shape.defineFigureGenerator("TransmittalTape",function(ce,z,ee){var oe=new go.Geometry,ie=ce?ce.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*z,(1-ie)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,(1-ie)*ee).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("AndGate",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=new go.PathFigure(0,0,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(.5+ie)*z,0,z,(.5-ie)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.5+ie)*ee,(.5+ie)*z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(.55,1),oe}),go.Shape.defineFigureGenerator("Buffer",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("Clock",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,ue=new go.PathFigure(z,se*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,se*z,ee,z,(se+ie)*ee,(se+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,se*ee,(se+ie)*z,0,z,(se-ie)*ee));var Se=new go.PathFigure(z,se*ee,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z,se*ee));var we=new go.PathFigure(.8*z,.75*ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*ee)),oe}),go.Shape.defineFigureGenerator("Ground",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),oe}),go.Shape.defineFigureGenerator("Inverter",function(ce,z,ee){var oe=new go.Geometry,ie=he*.1,se=.1,ue=.9,Se=.5,we=new go.PathFigure(.8*z,.5*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,0,ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,0)),we.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee));var Pe=new go.PathFigure((ue+se)*z,Se*ee,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,(ue+ie)*z,(Se-se)*ee,(ue+se)*z,(Se-ie)*ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.4,.75),oe}),go.Shape.defineFigureGenerator("NandGate",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.4,ue=he*.1,Se=.1,we=.9,Pe=.5,Ae=new go.PathFigure(.8*z,.5*ee,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,.8*z,(.5+se)*ee,(.4+ie)*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(.4+ie)*z,0,.8*z,(.5-se)*ee));var De=new go.PathFigure((we+Se)*z,Pe*ee,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe+Se)*ee,(we+Se)*z,(Pe+ue)*ee,(we+ue)*z,(Pe+Se)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se)*z,Pe*ee,(we-ue)*z,(Pe+Se)*ee,(we-Se)*z,(Pe+ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-Se)*ee,(we-Se)*z,(Pe-ue)*ee,(we-ue)*z,(Pe-Se)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se)*z,Pe*ee,(we+ue)*z,(Pe-Se)*ee,(we+Se)*z,(Pe-ue)*ee)),oe.spot1=new go.Spot(0,.05),oe.spot2=new go.Spot(.55,.95),oe}),go.Shape.defineFigureGenerator("NorGate",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,ue=0,Se=.5,we=new go.PathFigure(.8*z,.5*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+se)*z,(Se-ie)*ee,.7*z,(Se-se)*ee)),ie=.1,se=he*.1,ue=.9,Se=.5;var Pe=new go.PathFigure((ue-ie)*z,Se*ee,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee)),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.6,.75),oe}),go.Shape.defineFigureGenerator("OrGate",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,ue=0,Se=.5,we=new go.PathFigure(0,0,!0);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+se+se)*z,(Se-ie)*ee,.8*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*z,(Se+se)*ee,(ue+se+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee).close()),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("XnorGate",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,ue=.2,Se=.5,we=new go.PathFigure(.1*z,0,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var Pe=new go.PathFigure(.8*z,.5*ee,!0);oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+se)*z,(Se-ie)*ee,.7*z,(Se-se)*ee)),ie=.1,se=he*.1,ue=.9,Se=.5;var Ae=new go.PathFigure((ue-ie)*z,Se*ee,!0);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee)),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.65,.75),oe}),go.Shape.defineFigureGenerator("XorGate",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,ue=.2,Se=.5,we=new go.PathFigure(.1*z,0,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var Pe=new go.PathFigure(.2*z,0,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+se)*z,(Se-ie)*ee,.9*z,(Se-se)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee).close()),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.8,.75),oe}),go.Shape.defineFigureGenerator("Capacitor",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("Resistor",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Inductor",function(ce,z,ee){var oe=new go.Geometry,ie=he*.1,se=.1,ue=.1,Se=.5,we=new go.PathFigure((ue-ie*.5)*z,ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,0,(ue-ie)*z,ee,(ue-se)*z,0)),ue=.3,we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+se)*z,0,(ue+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,0,(ue-ie)*z,ee,(ue-se)*z,0)),ue=.5,we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+se)*z,0,(ue+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,0,(ue-ie)*z,ee,(ue-se)*z,0)),ue=.7,we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+se)*z,0,(ue+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,0,(ue-ie)*z,ee,(ue-se)*z,0)),ue=.9,we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie*.5)*z,ee,(ue+se)*z,0,(ue+ie)*z,ee)),oe}),go.Shape.defineFigureGenerator("ACvoltageSource",function(ce,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,ue=.5,Se=.5,we=new go.PathFigure((ue-se)*z,Se*ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,(ue+ie)*z,(Se-se)*ee,(ue+se)*z,(Se-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,(ue-se+.1)*z,Se*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se-.1)*z,Se*ee,ue*z,(Se-se)*ee,ue*z,(Se+se)*ee)),oe}),go.Shape.defineFigureGenerator("DCvoltageSource",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("Diode",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("Wifi",function(ce,z,ee){var oe=new go.Geometry,ie=z,se=ee;z=z*.38,ee=ee*.6;var ue=he*.8,Se=.8,we=0,Pe=.5,Ae=(ie-z)/2,De=(se-ee)/2,ze=new go.PathFigure(we*z+Ae,(Pe+Se)*ee+De,!0);oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se)*z+Ae,Pe*ee+De,(we-ue)*z+Ae,(Pe+Se)*ee+De,(we-Se)*z+Ae,(Pe+ue)*ee+De)),ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe-Se)*ee+De,(we-Se)*z+Ae,(Pe-ue)*ee+De,(we-ue)*z+Ae,(Pe-Se)*ee+De)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se+ue*.5)*z+Ae,Pe*ee+De,we*z+Ae,(Pe-Se)*ee+De,(we-Se+ue*.5)*z+Ae,(Pe-ue)*ee+De)),ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe+Se)*ee+De,(we-Se+ue*.5)*z+Ae,(Pe+ue)*ee+De,we*z+Ae,(Pe+Se)*ee+De).close()),ue=he*.4,Se=.4,we=.2,Pe=.5;var Ze=new go.PathFigure(we*z+Ae,(Pe+Se)*ee+De,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se)*z+Ae,Pe*ee+De,(we-ue)*z+Ae,(Pe+Se)*ee+De,(we-Se)*z+Ae,(Pe+ue)*ee+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe-Se)*ee+De,(we-Se)*z+Ae,(Pe-ue)*ee+De,(we-ue)*z+Ae,(Pe-Se)*ee+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se+ue*.5)*z+Ae,Pe*ee+De,we*z+Ae,(Pe-Se)*ee+De,(we-Se+ue*.5)*z+Ae,(Pe-ue)*ee+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe+Se)*ee+De,(we-Se+ue*.5)*z+Ae,(Pe+ue)*ee+De,we*z+Ae,(Pe+Se)*ee+De).close()),ue=he*.2,Se=.2,we=.5,Pe=.5;var Xe=new go.PathFigure((we-Se)*z+Ae,Pe*ee+De,!0);oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe-Se)*ee+De,(we-Se)*z+Ae,(Pe-ue)*ee+De,(we-ue)*z+Ae,(Pe-Se)*ee+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se)*z+Ae,Pe*ee+De,(we+ue)*z+Ae,(Pe-Se)*ee+De,(we+Se)*z+Ae,(Pe-ue)*ee+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe+Se)*ee+De,(we+Se)*z+Ae,(Pe+ue)*ee+De,(we+ue)*z+Ae,(Pe+Se)*ee+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(we-Se)*z+Ae,Pe*ee+De,(we-ue)*z+Ae,(Pe+Se)*ee+De,(we-Se)*z+Ae,(Pe+ue)*ee+De)),ue=he*.4,Se=.4,we=.8,Pe=.5;var Ge=new go.PathFigure(we*z+Ae,(Pe-Se)*ee+De,!0);oe.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se)*z+Ae,Pe*ee+De,(we+ue)*z+Ae,(Pe-Se)*ee+De,(we+Se)*z+Ae,(Pe-ue)*ee+De)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe+Se)*ee+De,(we+Se)*z+Ae,(Pe+ue)*ee+De,(we+ue)*z+Ae,(Pe+Se)*ee+De)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se-ue*.5)*z+Ae,Pe*ee+De,we*z+Ae,(Pe+Se)*ee+De,(we+Se-ue*.5)*z+Ae,(Pe+ue)*ee+De)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe-Se)*ee+De,(we+Se-ue*.5)*z+Ae,(Pe-ue)*ee+De,we*z+Ae,(Pe-Se)*ee+De).close()),ue=he*.8,Se=.8,we=1,Pe=.5;var ft=new go.PathFigure(we*z+Ae,(Pe-Se)*ee+De,!0);return oe.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se)*z+Ae,Pe*ee+De,(we+ue)*z+Ae,(Pe-Se)*ee+De,(we+Se)*z+Ae,(Pe-ue)*ee+De)),ft.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe+Se)*ee+De,(we+Se)*z+Ae,(Pe+ue)*ee+De,(we+ue)*z+Ae,(Pe+Se)*ee+De)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(we+Se-ue*.5)*z+Ae,Pe*ee+De,we*z+Ae,(Pe+Se)*ee+De,(we+Se-ue*.5)*z+Ae,(Pe+ue)*ee+De)),ft.add(new go.PathSegment(go.PathSegment.Bezier,we*z+Ae,(Pe-Se)*ee+De,(we+Se-ue*.5)*z+Ae,(Pe-ue)*ee+De,we*z+Ae,(Pe-Se)*ee+De).close()),oe}),go.Shape.defineFigureGenerator("Email",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(0,0,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*ee)),se.add(new go.PathSegment(go.PathSegment.Move,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*ee)),oe}),go.Shape.defineFigureGenerator("Ethernet",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.35*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var se=new go.PathFigure(.1*z,ee,!0,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var ue=new go.PathFigure(.6*z,ee,!0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee).close());var Se=new go.PathFigure(0,.5*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*ee)),oe}),go.Shape.defineFigureGenerator("Power",function(ce,z,ee){var oe=new go.Geometry,ie=he*.4,se=.4,ue=.5,Se=.5,we=Me(),Pe=Me(),Ae=Me(),De=Me();ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.5,we,we,Pe,Ae,De);var ze=Ee(Pe.x,Pe.y),Ze=new go.PathFigure(Pe.x*z,Pe.y*ee,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,(ue-ie)*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee)),ke(ue-se,Se,ue-se,Se-ie,ue-ie,Se-se,ue,Se-se,.5,Ae,De,Pe,we,we),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*z,Pe.y*ee,Ae.x*z,Ae.y*ee,De.x*z,De.y*ee)),ie=he*.3,se=.3,ke(ue-se,Se,ue-se,Se-ie,ue-ie,Se-se,ue,Se-se,.5,Ae,De,Pe,we,we),Ze.add(new go.PathSegment(go.PathSegment.Line,Pe.x*z,Pe.y*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue-se)*z,Se*ee,De.x*z,De.y*ee,Ae.x*z,Ae.y*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+se)*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ue+se)*z,Se*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),ke(ue,Se-se,ue+ie,Se-se,ue+se,Se-ie,ue+se,Se,.5,we,we,Pe,Ae,De),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*z,Pe.y*ee,De.x*z,De.y*ee,Ae.x*z,Ae.y*ee).close());var Ze=new go.PathFigure(.45*z,0,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*ee)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),me(we),me(Pe),me(Ae),me(De),me(ze),oe.spot1=new go.Spot(.25,.45),oe.spot2=new go.Spot(.75,.8),oe}),go.Shape.defineFigureGenerator("Fallout",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee/2,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,ee/2,z/2,ee/2));function se(ue,Se,we){ue.add(new go.PathSegment(go.PathSegment.Move,(.3+Se)*z,(.8+we)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.5+Se)*z,(.5+we)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.1+Se)*z,(.5+we)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.3+Se)*z,(.8+we)*ee).close())}return se(ie,0,0),se(ie,.4,0),se(ie,.2,-.3),oe}),go.Shape.defineFigureGenerator("IrritationHazard",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.2*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),oe.spot1=new go.Spot(.3,.3),oe.spot2=new go.Spot(.7,.7),oe}),go.Shape.defineFigureGenerator("ElectricalHazard",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.37*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.37*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),oe}),go.Shape.defineFigureGenerator("FireHazard",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*ee,.45*z,.44*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*ee,.48*z,.17*ee,.54*z,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*ee,.59*z,.29*ee,.58*z,.28*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*ee,.8*z,.34*ee,.88*z,.43*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*ee,.87*z,.48*ee,.88*z,.43*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,1.17*z,.76*ee,.82*z,.8*ee).close()),oe.spot1=new go.Spot(.07,.445),oe.spot2=new go.Spot(.884,.958),oe}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=0,ue=0,Se=ie*he,we=.4*Math.SQRT2/2+.5,Pe=.5-.5*Math.SQRT2/2,Ae=1,De=.5,ze=.5,Ze=0,Xe=new go.PathFigure(we*z,(1-Pe)*ee,!1);return oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,De*ee,Ae*z,.7*ee,Ae*z,De*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ze+se)*z,(Ze+se)*ee,(.5+ie+se)*z,(.5-Se+se)*ee,(.5+Se+se)*z,(.5-ie+se)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+ue)*ee,(.5-Se+se)*z,(.5-ie+ue)*ee,(.5-ie+se)*z,(.5-Se+ue)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(.35+se)*z,.9*ee,(.5-ie+se)*z,(.5+Se+ue)*ee,(.5-Se+se)*z,.9*ee)),Xe.add(new go.PathSegment(go.PathSegment.Move,(.25+se)*z,.8*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,(.35+se)*z,.9*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,(.2+se)*z,.95*ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var se=new go.PathFigure(z,ee,!1);oe.add(se);var ue=new go.PathFigure(0,.5*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.2*z,.35*ee,.3*z,.35*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.7*z,.65*ee,.8*z,.65*ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close()),oe}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var ie=new go.PathFigure(0,.2*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),oe}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.7*z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*ee,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,ee,.4*z,.5*ee,z,.5*ee).close());var se=new go.PathFigure(.45*z,.73*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*ee)),oe}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var se=new go.PathFigure(.335*z,(1-.555)*ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*ee,(1-.12)*z,.46*ee,(1-.02)*z,.54*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*ee,.02*z,.54*ee,.12*z,.46*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*ee));var ue=.5-.285,Se=.5,we=ue,Pe=Math.PI/4,Ae=4*(1-Math.cos(Pe))/(3*Math.sin(Pe)),De=Ae*.5,ze=ue,Ze=ue,Xe=Ae*ze,Ge=Ae*Ze;se.add(new go.PathSegment(go.PathSegment.Bezier,(Se-ze)*z,we*ee,(Se-(Xe+ze)/2)*z,(we+(Ze+Ge)/2)*ee,(Se-ze)*z,(we+Ge)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(we-Ze)*ee,(Se-ze)*z,(we-Ge)*ee,(Se-Xe)*z,(we-Ze)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(Se+ze)*z,we*ee,(Se+Xe)*z,(we-Ze)*ee,(Se+ze)*z,(we-Ge)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(Se+ze)*z,(we+Ge)*ee,(Se+(Xe+ze)/2)*z,(we+(Ze+Ge)/2)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee));var ft=new go.PathFigure(.2*z,ee,!1);oe.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*ee));var at=new go.PathFigure(.8*z,ee,!1);return oe.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var se=new go.PathFigure(.2*z,.2*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventError",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var se=new go.PathFigure(z,ee,!1);oe.add(se);var ue=new go.PathFigure(.1*z,ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("Caution",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.05*z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*ee,0,ee,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*ee,.5*z,0,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,z,ee,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,ee));var se=.05;return ie.add(new go.PathSegment(go.PathSegment.Move,(.5-se)*z,.875*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*ee,se*z,se*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*ee,.575*z,.725*ee,.625*z,.375*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*ee,.375*z,.375*ee,.425*z,.725*ee)),oe}),go.Shape.defineFigureGenerator("Recycle",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.45*z,.95*ee,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*ee,.17*z,.95*ee,.15*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*ee,0,.675*ee,0,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*ee));var se=new go.PathFigure(.475*z,.2*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*ee,.35*z,0,.375*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*ee,.625*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*ee));var ue=new go.PathFigure(.675*z,.575*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*ee,z,.8*ee,z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,ue=new go.PathFigure(z,ie*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,ee,z,(ie+se)*ee,(ie+se)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*ee,(ie-se)*z,ee,0,(ie+se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,0,0,(ie-se)*ee,(ie-se)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,ie*ee,(ie+se)*z,0,z,(ie-se)*ee));var Se=new go.PathFigure(ie*z,0,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ie*z,.15*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,ie*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,ie*z,.85*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,0,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.15*z,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.85*z,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*ee)),oe}),go.Shape.defineFigureGenerator("Package",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.15*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var se=new go.PathFigure(0,.15*ee,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*ee).close()),oe.spot1=new go.Spot(0,.1),oe.spot2=new go.Spot(1,1),oe}),go.Shape.defineFigureGenerator("Class",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(0,.2*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(0,.5*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("Component",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close());var se=new go.PathFigure(0,.2*ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ue=new go.PathFigure(0,.6*ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),oe}),go.Shape.defineFigureGenerator("Boat Shipment",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.15*z,.6*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee));var se=new go.PathFigure(.15*z,.6*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),oe}),go.Shape.defineFigureGenerator("Customer/Supplier",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),oe}),go.Shape.defineFigureGenerator("Workcell",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Supermarket",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),oe}),go.Shape.defineFigureGenerator("TruckShipment",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(z,.8*ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee).close());var ue=.1,Se=he*.1,we=.2,Pe=.9,Ae=new go.PathFigure((we-ue)*z,Pe*ee,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-ue)*ee,(we-ue)*z,(Pe-Se)*ee,(we-Se)*z,(Pe-ue)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we+ue)*z,Pe*ee,(we+Se)*z,(Pe-ue)*ee,(we+ue)*z,(Pe-Se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe+ue)*ee,(we+ue)*z,(Pe+Se)*ee,(we+Se)*z,(Pe+ue)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(we-ue)*z,Pe*ee,(we-Se)*z,(Pe+ue)*ee,(we-ue)*z,(Pe+Se)*ee).close()),ue=.1,Se=he*.1,we=.8,Pe=.9;var De=new go.PathFigure((we-ue)*z,Pe*ee,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe-ue)*ee,(we-ue)*z,(Pe-Se)*ee,(we-Se)*z,(Pe-ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we+ue)*z,Pe*ee,(we+Se)*z,(Pe-ue)*ee,(we+ue)*z,(Pe-Se)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(Pe+ue)*ee,(we+ue)*z,(Pe+Se)*ee,(we+Se)*z,(Pe+ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(we-ue)*z,Pe*ee,(we-Se)*z,(Pe+ue)*ee,(we-ue)*z,(Pe+Se)*ee).close()),oe}),go.Shape.defineFigureGenerator("KanbanPost",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.2*z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),oe}),go.Shape.defineFigureGenerator("Forklift",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0));var se=new go.PathFigure(0,.5*ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ue=new go.PathFigure(.5*z,.8*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee));var Se=new go.PathFigure(.5*z,.7*ee,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee));var we=.1,Pe=he*.1,Ae=.1,De=.9,ze=new go.PathFigure((Ae-we)*z,De*ee,!0);oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De-we)*ee,(Ae-we)*z,(De-Pe)*ee,(Ae-Pe)*z,(De-we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+we)*z,De*ee,(Ae+Pe)*z,(De-we)*ee,(Ae+we)*z,(De-Pe)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De+we)*ee,(Ae+we)*z,(De+Pe)*ee,(Ae+Pe)*z,(De+we)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-we)*z,De*ee,(Ae-Pe)*z,(De+we)*ee,(Ae-we)*z,(De+Pe)*ee)),we=.1,Pe=he*.1,Ae=.4,De=.9;var Ze=new go.PathFigure((Ae-we)*z,De*ee,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De-we)*ee,(Ae-we)*z,(De-Pe)*ee,(Ae-Pe)*z,(De-we)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+we)*z,De*ee,(Ae+Pe)*z,(De-we)*ee,(Ae+we)*z,(De-Pe)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(De+we)*ee,(Ae+we)*z,(De+Pe)*ee,(Ae+Pe)*z,(De+we)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-we)*z,De*ee,(Ae-Pe)*z,(De+we)*ee,(Ae-we)*z,(De+Pe)*ee)),oe}),go.Shape.defineFigureGenerator("RailShipment",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,.4*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*ee).close());var se=new go.PathFigure(.45*z,.7*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee));var ue=new go.PathFigure(.55*z,.4*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*ee).close());var Ae=.05,De=he*.05,ze=.175,Ze=.95,Se=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Ae)*z,Ze*ee,(ze-De)*z,(Ze+Ae)*ee,(ze-Ae)*z,(Ze+De)*ee));var Ae=.05,De=he*.05,ze=.375,Ze=.95,we=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Ae)*z,Ze*ee,(ze-De)*z,(Ze+Ae)*ee,(ze-Ae)*z,(Ze+De)*ee));var Ae=.05,De=he*.05,ze=.625,Ze=.95,Pe=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Ae)*z,Ze*ee,(ze-De)*z,(Ze+Ae)*ee,(ze-Ae)*z,(Ze+De)*ee));var Ae=.05,De=he*.05,ze=.825,Ze=.95,Xe=new go.PathFigure((ze-Ae)*z,Ze*ee,!0);oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze-Ae)*ee,(ze-Ae)*z,(Ze-De)*ee,(ze-De)*z,(Ze-Ae)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Ae)*z,Ze*ee,(ze+De)*z,(Ze-Ae)*ee,(ze+Ae)*z,(Ze-De)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ze*z,(Ze+Ae)*ee,(ze+Ae)*z,(Ze+De)*ee,(ze+De)*z,(Ze+Ae)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Ae)*z,Ze*ee,(ze-De)*z,(Ze+Ae)*ee,(ze-Ae)*z,(Ze+De)*ee).close());var Ge=new go.PathFigure(0,ee,!1);return oe.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),oe}),go.Shape.defineFigureGenerator("Warehouse",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var se=new go.PathFigure(0,.2*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(.15*z,ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee).close());var Se=.05,we=he*.05,Pe=.35,Ae=.775,De=new go.PathFigure((Pe-Se)*z,Ae*ee,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(Ae-Se)*ee,(Pe-Se)*z,(Ae-we)*ee,(Pe-we)*z,(Ae-Se)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Se)*z,Ae*ee,(Pe+we)*z,(Ae-Se)*ee,(Pe+Se)*z,(Ae-we)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(Ae+Se)*ee,(Pe+Se)*z,(Ae+we)*ee,(Pe+we)*z,(Ae+Se)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Se)*z,Ae*ee,(Pe-we)*z,(Ae+Se)*ee,(Pe-Se)*z,(Ae+we)*ee).close()),oe}),go.Shape.defineFigureGenerator("ControlCenter",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee).close()),oe}),go.Shape.defineFigureGenerator("Bluetooth",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),oe}),go.Shape.defineFigureGenerator("Globe",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.75*z,0,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.75*ee,.75*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*z,ee,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*ee,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,.15*z,.25*ee,.15*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*ee,.85*z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*ee,.35*z,.3*ee,.65*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*ee,.35*z,.7*ee,.65*z,.7*ee)),oe}),go.Shape.defineFigureGenerator("Wave",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*ee,.1*z,0,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*ee,.425*z,.5*ee,.575*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*ee,.8*z,0,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*ee,.1*z,.5*ee,.2*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*ee,.425*z,ee,.575*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*ee,.8*z,.5*ee,.9*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Operator",function(ce,z,ee){var oe=new go.Geometry,ie=.3,se=he*.3,ue=.5,Se=.7,we=new go.PathFigure((ue-ie)*z,Se*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee));var Pe=new go.PathFigure(0,.7*ee,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*ee,0,0,z,0)),oe}),go.Shape.defineFigureGenerator("TripleFanBlades",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.65*z,.3*ee,.65*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*ee,.35*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*z,.6*ee,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.2*z,ee,.35*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,.7*z,.6*ee,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.8*z,ee,.65*z,.95*ee)),oe}),go.Shape.defineFigureGenerator("CentrifugalPump",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,0,ee,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*ee,.8*z,ee,.85*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),oe}),go.Shape.defineFigureGenerator("Battery",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*ee));var se=new go.PathFigure(0,.6*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),oe}),go.Shape.defineFigureGenerator("Delete",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,ue=.5,Se=.5,we=new go.PathFigure((ue-ie)*z,Se*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee));var Pe=new go.PathFigure(.15*z,.5*ee,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Flag",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.1*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*ee,.15*z,0,.35*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,.65*z,.2*ee,.85*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.85*z,.6*ee,.65*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*z,.4*ee,.15*z,.4*ee).close()),oe}),go.Shape.defineFigureGenerator("Help",function(ce,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,ue=.5,Se=.5,we=new go.PathFigure((ue-ie)*z,Se*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee).close()),ie=.05,se=he*.05,ue=.5,Se=.8;var Pe=new go.PathFigure((ue-ie)*z,Se*ee,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se-ie)*ee,(ue-ie)*z,(Se-se)*ee,(ue-se)*z,(Se-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,Se*ee,(ue+se)*z,(Se-ie)*ee,(ue+ie)*z,(Se-se)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(Se+ie)*ee,(ue+ie)*z,(Se+se)*ee,(ue+se)*z,(Se+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,Se*ee,(ue-se)*z,(Se+ie)*ee,(ue-ie)*z,(Se+se)*ee).close()),Pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*ee,.4*z,.2*ee,.3*z,.25*ee)),oe}),go.Shape.defineFigureGenerator("Location",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*ee,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*ee,.5*z,0,.025*z,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var se=new go.PathFigure(.2*z,.5*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*ee)),oe}),go.Shape.defineFigureGenerator("Unlocked",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var se=new go.PathFigure(.2*z,.5*ee,!1);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*ee)),oe}),go.Shape.defineFigureGenerator("Gear",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*ee,.79840625*z,.39915625*ee,.7834375*z,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*ee,.64228125*z,.2188125*ee,.603875*z,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*ee,.39759375*z,.20190625*ee,.36053125*z,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*ee,.21765625*z,.36059375*ee,.201875*z,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*ee,.20221875*z,.603875*ee,.21884375*z,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*ee,.36353125*z,.78340625*ee,.3991875*z,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*ee,.602375*z,.79809375*ee,.63946875*z,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*ee,.78234375*z,.63940625*ee,.798125*z,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*ee,0,.375*ee,.05*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*ee,.3*z,.225*ee,.4*z,.175*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*ee,.46*z,.05*ee,.525*z,.05*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*ee,.525*z,.275*ee,.475*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*ee,z,.4*ee,z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*ee,.675*z,.55*ee,.675*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*ee,.65*z,.7*ee,.65*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,ee,.61*z,.85*ee,.61*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*z,ee,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Map",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("Eject",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.7)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var se=new go.PathFigure(0,ee*.6,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),oe}),go.Shape.defineFigureGenerator("Pencil",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*1,ee*1,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.85).close());var se=new go.PathFigure(.126*z,.85*ee,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*ee).close());var ue=new go.PathFigure(.402*z,.85*ee,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*ee).close());var Se=new go.PathFigure(.678*z,.85*ee,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*ee).close());var we=new go.PathFigure(.5*z,.1*ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*ee).close()),oe}),go.Shape.defineFigureGenerator("Staircase",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),oe}),go.Shape.defineFigureGenerator("5Bars",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*(1-.184)).close());var se=new go.PathFigure(z*.204,ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*.204,ee*(1-.184))),se.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*(1-.184*2))),se.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*1).close());var ue=new go.PathFigure(z*.408,ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.408,ee*(1-.184*2))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*(1-.184*3))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*1).close());var Se=new go.PathFigure(z*.612,ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*.612,ee*(1-.184*3))),Se.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*(1-.184*4))),Se.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*1).close());var we=new go.PathFigure(z*.816,ee,!0);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,z*.816,ee*(1-.184*4))),we.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-.184*5))),we.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1).close()),oe}),go.Shape.defineFigureGenerator("PC",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var se=new go.PathFigure(z*.055,.07*ee,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.07)),se.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.1).close());var ue=new go.PathFigure(z*.055,.13*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.13)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.16)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.16).close());var Se=new go.PathFigure(z*.055,.18*ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.18)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.21)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.21).close());var we=new go.PathFigure(z*1,0,!0);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),we.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.65)),we.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.65).close()),oe}),go.Shape.defineFigureGenerator("Plane",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.55*z,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*ee,0,.4*ee,.225*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*ee,.975*z,0,z,.08*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee).close()),oe}),go.Shape.defineFigureGenerator("Key",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*1,ee*.5,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*ee).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*ee,.075*z,.075*ee).close()),oe}),go.Shape.defineFigureGenerator("FilmTape",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var se=new go.PathFigure(0,0,!1);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*0)),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),se.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var ue=new go.PathFigure(z*.11,ee*.1,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.1)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.8)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.11,ee*.8).close());var Se=new go.PathFigure(z*(.11+.24133333*1+.028*1),ee*.1,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.1)),Se.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.8)),Se.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),ee*.8).close());var we=new go.PathFigure(z*(.11+.24133333*2+.028*2),ee*.1,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.1)),we.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.8)),we.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),ee*.8).close()),oe}),go.Shape.defineFigureGenerator("FloppyDisk",function(ce,z,ee){var oe=new go.Geometry,ie=8,se=ie*he,ue=new go.PathFigure(ie,0,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.14)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-se,z-se,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,se,ee,0,ee-se)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie,0,0,se,se,0).close());var Se=new go.PathFigure(z*.83,0,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.3)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.3)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*0).close());var we=new go.PathFigure(z*.83,ee*1,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.5)),we.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.5)),we.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*1).close());var Pe=new go.PathFigure(z*.78,ee*.05,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.78,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("SpeechBubble",function(ce,z,ee){var oe=ce?ce.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=15),oe=Math.min(oe,z/3),oe=Math.min(oe,ee/3);var ie=oe*he,se=ee*.8,ue=new go.Geometry,Se=new go.PathFigure(oe,0,!0);return ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z-oe,0)),Se.add(new go.PathSegment(go.PathSegment.Bezier,z,oe,z-ie,0,z,ie)),Se.add(new go.PathSegment(go.PathSegment.Line,z,se-oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,se,z,se-ie,z-ie,se)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.7,se)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.55,se)),Se.add(new go.PathSegment(go.PathSegment.Line,oe,se)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,se-oe,ie,se,0,se-ie)),Se.add(new go.PathSegment(go.PathSegment.Line,0,oe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()),ie>1?(ue.spot1=new go.Spot(0,0,ie,ie),ue.spot2=new go.Spot(1,.8,-ie,-ie)):(ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(1,.8)),ue}),go.Shape.defineFigureGenerator("Repeat",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*.45,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.45).close());var se=new go.PathFigure(z*1,ee*.55,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.55).close()),oe}),go.Shape.defineFigureGenerator("Windows",function(ce,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*z,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*.1,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.9).close());var se=new go.PathFigure(z*.1,ee*.2,!0);oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,z*.22,ee*.285)),se.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.32)),se.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.37)),se.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.32)),se.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.25).close());var ue=new go.PathFigure(z*.28,ee*.37,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.37)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.41)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.28,ee*.41).close()),oe}),go.Shape.defineFigureGenerator("Beaker",function(ce,z,ee){var oe=new go.Geometry,ie=15,se=ie*he,ue=new go.PathFigure(z*.62,ee*.475,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-se,z-se,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,se,ee,0,ee-se)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.475)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.03)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.62,ee*.03).close()),se>1?(oe.spot1=new go.Spot(0,0,se,se),oe.spot2=new go.Spot(1,1,-se,-se)):(oe.spot1=go.Spot.TopLeft,oe.spot2=go.Spot.BottomRight),oe}),go.Shape.defineFigureGenerator("Download",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);oe.add(ie);var se=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-se)).close());var ue=new go.PathFigure(z*.4,ee*0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.66)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*0).close()),oe}),go.Shape.defineFigureGenerator("Bin",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);oe.add(ie);var se=.1/.3;return ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-se)).close()),oe}),go.Shape.defineFigureGenerator("Upload",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);oe.add(ie);var se=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-se))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-se)).close());var ue=new go.PathFigure(z*.5,ee*0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.74,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("EmptyDrink",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close()),oe}),go.Shape.defineFigureGenerator("Drink",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close());var se=new go.PathFigure(z*.235,ee*.28,!0);return oe.add(se),se.add(new go.PathSegment(go.PathSegment.Line,z*.765,ee*.28)),se.add(new go.PathSegment(go.PathSegment.Line,z*.655,ee*.97)),se.add(new go.PathSegment(go.PathSegment.Line,z*.345,ee*.97).close()),oe}),go.Shape.defineFigureGenerator("4Arrows",function(ce,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.5,ee*0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727: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 _n={},en="5.0",Ee={},Me=null,me=!1,Be=!1,ke=null,Ce=!1,Le=null,he=null,ye=0;ye<arguments.length;ye++){var xe=arguments[ye];if(xe!==null)switch(typeof xe){case"number":en=xe.toFixed(1);break;case"string":xe.match(new RegExp("^[0-9]\\.[0-9]+$"))?en=xe:ke=xe;break;case"object":typeof xe.is3D!="undefined"?Me=xe:Ee=xe;break;case"boolean":me=xe,Be=!0;break}}Me===null&&(Me={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&&!Be&&(me=!0)),ke!==null&&Ee.id===void 0&&(Ee.id=ke);var ge="",le="",ve=!1,de=null,ce=null,z=null,ee=!1,oe=null,ie=null,se=null,ue=null,Se=null;Ee.height!==void 0&&(Ee.height=Math.round(Ee.height)),Ee.width!==void 0&&(Ee.width=Math.round(Ee.width));var we=function(gt){return parseFloat(gt)>4?parseFloat(gt):5};_n.setHTML5Codebase=function(gt,Ft){he=gt,ut(gt,Ft)},_n.setJavaCodebase=_n.setJavaCodebaseVersion=_n.isCompiledInstalled=_n.setPreCompiledScriptPath=_n.setPreCompiledResourcePath=function(){},_n.setHTML5CodebaseVersion=function(gt,Ft){var Ht=parseFloat(gt);if(Ht!==NaN&&Ht<5){console.log("The GeoGebra HTML5 codebase version "+Ht+" is deprecated. Using version latest instead.");return}Le=gt,tt(gt,Ft)},_n.getHTML5CodebaseVersion=function(){return ce},_n.getParameters=function(){return Ee},_n.setFontsCSSURL=function(gt){ue=gt},_n.setGiacJSURL=function(gt){},_n.setJNLPFile=function(gt){ge=gt},_n.setJNLPBaseDir=function(gt){},_n.inject=function(){function gt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ft="auto",Ht=Ee.id,hn,Qt=!1,bn=0;bn<arguments.length;bn++){var Wt=arguments[bn];typeof Wt=="string"?(Wt=Wt.toLowerCase(),Wt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ft=Wt:Ht=arguments[bn]):typeof Wt=="boolean"?Qt=Wt:Wt instanceof HTMLElement&&(hn=Wt)}Kt();function Kt(){if(!Ce){setTimeout(Kt,200);return}Ft=zt(Ft);var Jt=hn||document.getElementById(Ht);if(!Jt){console.log("possibly bug on ajax loading? ");return}if(_n.removeExistingApplet(Jt,!1),Ee.width===void 0&&Jt.clientWidth&&(Ee.width=Jt.clientWidth),Ee.height===void 0&&Jt.clientHeight&&(Ee.height=Jt.clientHeight),!(Ee.width&&Ee.height)&&Ft==="html5"&&(delete Ee.width,delete Ee.height),de=Ft,Ft==="screenshot")at(Jt,Ee);else{var Yt=!1;Ee.hasOwnProperty("playButton")&&Ee.playButton||Ee.hasOwnProperty("clickToLoad")&&Ee.clickToLoad?Yt=!0:Ee.hasOwnProperty("playButtonAutoDecide")&&Ee.playButtonAutoDecide&&(Yt=(!Pe()||gt())&&Ae()),Yt?(de="screenshot",et(Jt,Ee,Qt,Ft)):ft(Jt,Ee,Qt)}}};function Pe(){try{return window.self!==window.top}catch(gt){return!0}}function Ae(){return Ee.hasOwnProperty("screenshotGenerator")&&Ee.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}_n.getViews=function(){return Me},_n.isJavaInstalled=function(){return!1};var De=function(gt){var Ft=function(bn){var Wt=JSON.parse(bn),Kt=function(kt){return kt.type=="G"||kt.type=="E"},Jt=Wt.elements?Wt.elements.filter(Kt)[0]:Wt;if(!Jt||!Jt.url){Ht();return}Ee.fileName=Jt.url,ze(Jt.settings||{}),Me.is3D=!0;var Yt="https://www.geogebra.org/images/";_n.setPreviewImage(oe||Jt.previewUrl,Yt+"GeoGebra_loading.png",Yt+"applet_play.png"),gt()},Ht=function(){Ee.onError&&Ee.onError(),mt("Error: Fetching material (id "+Ee.material_id+") failed.",Ee)},hn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Qt="/materials/"+Ee.material_id+"?scope=basic";Ze("https://"+hn+"/api/proxy.php?path="+encodeURIComponent(Qt),Ft,Ht)};function ze(gt){var Ft=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ht){gt[Ht]=!!gt[Ht]}),Ft.forEach(function(Ht){Ee[Ht]===void 0&>[Ht]!==void 0&&(Ee[Ht]=gt[Ht])}),Ee.showToolBarHelp===void 0&&(Ee.showToolBarHelp=Ee.showToolBar)}function Ze(gt,Ft,Ht){var hn=new XMLHttpRequest;hn.open("GET",gt),hn.onload=function(){Ft(hn.responseText)},hn.onerror=Ht,hn.send()}_n.isHTML5Installed=function(){return!0},_n.getLoadedAppletType=function(){return de},_n.setPreviewImage=function(gt,Ft,Ht){oe=gt,ie=Ft,se=Ht},_n.removeExistingApplet=function(gt,Ft){var Ht;typeof gt=="string"&&(gt=document.getElementById(gt)),de=null;var hn=null;for(Ht=0;Ht<gt.childNodes.length;Ht++){var Qt=gt.childNodes[Ht],bn=Qt.className;bn==="applet_screenshot"?Ft?(Qt.style.display="block",de="screenshot"):Qt.style.display="none":bn!=="applet_scaler prerender"&&(gt.removeChild(Qt),hn=bn&&bn.indexOf("appletParameters")!=-1?Qt.id:null,Ht--)}var Wt=Ee.id!==void 0?Ee.id:hn,Kt=window[Wt];Kt&&typeof Kt.getBase64=="function"&&(Kt.remove(),window[Wt]=null)},_n.refreshHitPoints=function(){if(we(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var gt=_n.getAppletObject();return gt&&typeof gt.recalculateEnvironments=="function"?(gt.recalculateEnvironments(),!0):!1},_n.startAnimation=function(){var gt=_n.getAppletObject();return gt&&typeof gt.startAnimation=="function"?(gt.startAnimation(),!0):!1},_n.stopAnimation=function(){var gt=_n.getAppletObject();return gt&&typeof gt.stopAnimation=="function"?(gt.stopAnimation(),!0):!1},_n.getAppletObject=function(){var gt=Ee.id!==void 0?Ee.id:"ggbApplet";return window[gt]},_n.resize=function(){};var Xe=function(gt,Ft,Ht){var hn=document.createElement("param");hn.setAttribute("name",Ft),hn.setAttribute("value",Ht),gt.appendChild(hn)},Ge=function(gt){return gt&>!=="false"},ft=function(gt,Ft,Ht){we(ce)<=4.2&&(Ht=!0);var hn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ce||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(hn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Qt=document.createElement("div");Qt.classList.add("appletParameters","notranslate");var bn=Ft.width,Wt=Ft.height;if(Ft.disableAutoScale=Ft.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ft.disableAutoScale,Ft.width!==void 0)if(we(ce)<=4.4)Ge(Ft.showToolBar)&&(Ft.height-=7),Ge(Ft.showAlgebraInput)&&(Ft.height-=37),Ft.width<605&&Ge(Ft.showToolBar)&&(Ft.width=605,bn=605);else{var Kt=100;(Ge(Ft.showToolBar)||Ge(Ft.showMenuBar))&&(Ft.hasOwnProperty("customToolBar")&&(Ft.customToolbar=Ft.customToolBar),Kt=Ge(Ft.showMenuBar)?245:155),bn<Kt&&(Ft.width=Kt,bn=Kt)}Qt.style.border="none",Qt.style.display="inline-block";for(var Jt in Ft)Ft.hasOwnProperty(Jt)&&Jt!=="appletOnLoad"&&Qt.setAttribute("data-param-"+Jt,Ft[Jt]);ue&&Qt.setAttribute("data-param-fontscssurl",ue),_n.resize=function(){GGBAppletUtils.responsiveResize(gt,Ft)},window.addEventListener("resize",function(Ne){_n.resize()});var Yt=typeof Ft.appletOnLoad=="function"?Ft.appletOnLoad:function(){};if(!Ht&&Ft.width!==void 0){Ft.hasOwnProperty("showSplash")||Qt.setAttribute("data-param-showSplash","false");var kt=gt.querySelector(".applet_scaler.prerender"),pt=kt!==null;if(pt)var Bt=kt.querySelector(".ggb_preview");else{var Bt=st(bn,Wt,Ft.borderColor,!1);kt=document.createElement("div"),kt.className="applet_scaler",kt.style.position="relative",kt.style.display="block",kt.style.width=bn+"px",kt.style.height=Wt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(kt,"66%"),we(ce)>=5?(Ft.appletOnLoad=function(Ne){var $e=gt.querySelector(".ggb_preview");$e&&$e.parentNode.removeChild($e),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(kt),window.GGBT_wsf_view&&$(window).trigger("resize"),Yt(Ne)},pt||kt.appendChild(Bt)):Qt.appendChild(Bt),kt.appendChild(Qt),pt||gt.appendChild(kt),setTimeout(function(){_n.resize()},1)}else{var xt=document.createElement("div");xt.className="applet_scaler",xt.style.position="relative",xt.style.display="block",xt.appendChild(Qt),gt.appendChild(xt),Ft.appletOnLoad=function(Ne){_n.resize(),Yt(Ne)}}function vt(Ne,$e){$e&&typeof $e.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ne,$e.appletOnLoad):renderGGBElement(Ne),mt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",$e)}function nt(Ne,$e){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ne,params:$e}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(dt){vt(dt.article,dt.params)}),html5AppletsToProcess=null)},we(ce)<5&&(Ne.className+=" geogebraweb")):vt(Ne,$e)}if(hn){scriptLoadStarted=!0;for(var He=0;He<Qt.childNodes.length;He++){var Ie=Qt.childNodes[He].tagName;Ie==="TABLE"&&(Qt.removeChild(Qt.childNodes[He]),He--)}if(ggbHTML5LoadedScript!==null){var We=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');We!=null&&We.parentNode.removeChild(We)}var Oe=document.createElement("script"),be=function(){nt(Qt,Ft)};Oe.src=le+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=ce,ggbHTML5LoadedScript=Oe.src,mt("GeoGebra HTML5 codebase loaded: '"+le+"'.",Ft),!he&&(!Le||Le=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),be()):le.requirejs?__webpack_require__.e(4184).then(function(){var Ne=[__webpack_require__(74620)];be.apply(null,Ne)}.bind(this)).catch(__webpack_require__.oe):(Oe.onload=be,gt.appendChild(Oe))}else nt(Qt,Ft);Ft.height=Wt,Ft.width=bn},at=function(gt,Ft,Ht){var hn=st(Ft.width,Ft.height,Ft.borderColor,Ht),Qt=document.createElement("div");Qt.style.position="relative",Qt.style.display="block",Qt.style.width=Ft.width+"px",Qt.style.height=Ft.height+"px",Qt.className="applet_screenshot applet_scaler"+(Ht?" applet_screenshot_play":""),Qt.appendChild(hn);var bn=GGBAppletUtils.getScale(Ft,gt,Ht);Ht?(gt.appendChild(yt()),window.GGBT_wsf_view||(gt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Qt,"66%"),gt.appendChild(Qt),bn!==1&&!isNaN(bn)&&(GGBAppletUtils.scaleElement(Qt,bn),Qt.style.width=Ft.width+"px",Qt.style.height=Ft.height+"px",Qt.parentNode.style.width=Ft.width*bn+"px",Qt.parentNode.style.height=Ft.height*bn+"px"),_n.resize=function(){Ct(gt,hn,Qt,Ht)},window.addEventListener("resize",function(Wt){_n.resize()}),_n.resize()};function Ct(gt,Ft,Ht,hn){if(gt.contains(Ft)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(gt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(gt)}var Qt=GGBAppletUtils.getScale(Ee,gt,hn);Ht.parentNode!==null&&(!isNaN(Qt)&&Qt!==1?(GGBAppletUtils.scaleElement(Ht,Qt),Ht.parentNode.style.width=Ee.width*Qt+"px",Ht.parentNode.style.height=Ee.height*Qt+"px"):(GGBAppletUtils.scaleElement(Ht,1),Ht.parentNode.style.width=Ee.width+"px",Ht.parentNode.style.height=Ee.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(gt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}_n.onExitFullscreen=function(gt,Ft){Ft.appendChild(gt)};var et=function(gt,Ft,Ht,hn){at(gt,Ft,!0);for(var Qt=function(){var Kt=[];for(Wt=0;Wt<gt.childNodes.length;Wt++)Kt.push(gt.childNodes[Wt]);if(window.GGBT_wsf_view){var Jt=window.GGBT_wsf_view.renderFullScreen(gt,Ft.id),Yt=document.getElementById("fullscreencontainer"),kt=jQuery(gt).find(".fullscreencontent");kt.length>0?(Jt.remove(),kt.attr("id","fullscreencontent").show(),jQuery(Yt).append(kt),window.dispatchEvent(new Event("resize"))):ft(Jt,Ft,!1),window.GGBT_wsf_view.launchFullScreen(Yt)}else de=hn,ft(gt,Ft,!1);if(!window.GGBT_wsf_view)for(Wt=0;Wt<Kt.length;Wt++)gt.removeChild(Kt[Wt])},bn=gt.getElementsByClassName("ggb_preview_play"),Wt=0;Wt<bn.length;Wt++)bn[Wt].addEventListener("click",Qt,!1),bn[Wt].addEventListener("ontouchstart",Qt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(gt),Ae()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},yt=function(){var gt=document.createElement("div");if(gt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ft='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',Ht=document.createElement("style");Ht.styleSheet?Ht.styleSheet.cssText=Ft:Ht.appendChild(document.createTextNode(Ft)),document.getElementsByTagName("head")[0].appendChild(Ht)}return gt},st=function(gt,Ft,Ht,hn){var Qt=document.createElement("div");Qt.className="ggb_preview",Qt.style.position="absolute",Qt.style.zIndex="90",Qt.style.width=gt-2+"px",Qt.style.height=Ft-2+"px",Qt.style.top="0px",Qt.style.left="0px",Qt.style.overflow="hidden",Qt.style.backgroundColor="white";var bn="lightgrey";Ht!==void 0&&(Ht==="none"?bn="transparent":bn=Ht),Qt.style.border="1px solid "+bn;var Wt=document.createElement("img");if(Wt.style.position="relative",Wt.style.zIndex="1000",Wt.style.top="-1px",Wt.style.left="-1px",oe!==null&&Wt.setAttribute("src",oe),Wt.style.opacity=.7,ie!==null){var Kt,Jt,Yt;if(!hn){Kt=document.createElement("img"),Kt.style.position="absolute",Kt.style.zIndex="1001",Kt.style.opacity=1,Wt.style.opacity=.3,Jt=360,Jt>gt/4*3&&(Jt=gt/4*3),Yt=Jt/5.8,Kt.setAttribute("src",ie),Kt.setAttribute("width",Jt),Kt.setAttribute("height",Yt);var kt=(gt-Jt)/2,pt=(Ft-Yt)/2;Kt.style.left=kt+"px",Kt.style.top=pt+"px",Qt.appendChild(Kt)}}return Qt.appendChild(Wt),Qt},zt=function(gt){return gt=gt.toLowerCase(),gt==="html5"||gt==="screenshot"?gt:"html5"},lt=["web","webSimple","web3d","tablet","tablet3d","phone"],tt=function(gt,Ft){if(ce=gt,Ft){ut(ce,!0);return}var Ht=!me;if(Ht){var hn=we(ce);!isNaN(hn)&&hn<4.4&&(Ht=!1)}var Qt,bn;window.location.protocol.substr(0,4)==="http"?Qt=window.location.protocol:Qt="http:";var Wt=ce.indexOf("//");Wt>0?bn=ce:Wt===0?bn=Qt+ce:bn="https://www.geogebra.org/apps/5.2.814.0/";for(var Kt in lt)if(ce.slice(lt[Kt].length*-1)===lt[Kt]||ce.slice((lt[Kt].length+1)*-1)===lt[Kt]+"/"){ut(bn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ht&&!Me.is3D&&!Me.AV&&!Me.SV&&!Me.CV&&!Me.EV2&&!Me.CP&&!Me.PC&&!Me.DA&&!Me.FI&&!Me.PV&&!Ge(Ee.showToolBar)&&!Ge(Ee.showMenuBar)&&!Ge(Ee.showAlgebraInput)&&!Ge(Ee.enableRightClick)&&(!Ee.appName||Ee.appName=="classic")?bn+="webSimple/":bn+="web3d/",ut(bn,!1)},ut=function(gt,Ft){if(gt.requirejs){le=gt;return}gt.slice(-1)!=="/"&&(gt+="/"),le=gt,Ft===null&&(Ft=gt.indexOf("http")===-1),ve=Ft,z="web.nocache.js",ee=!1;var Ht=le.split("/");Ht.length>1&&(!Ft&&Ht[Ht.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):lt.indexOf(Ht[Ht.length-2])>=0&&(z=Ht[Ht.length-2]+".nocache.js")),Ht=gt.split("/"),ce=Ht[Ht.length-3],ce.substr(0,4)==="test"?ce=ce.substr(4,1)+"."+ce.substr(5,1):(ce.substr(0,3)==="war"||ce.substr(0,4)==="beta")&&(ce="5.0");var hn=parseFloat(ce);hn!==NaN&&hn<5&>.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+hn+" is deprecated. Using version latest instead."),tt("5.0",Ft))},mt=function(gt,Ft){window.console&&window.console.log&&(!Ft||typeof Ft.showLogging=="undefined"||Ft.showLogging&&Ft.showLogging!=="false")&&console.log(gt)};Ee.material_id!==void 0?De(Pt):Pt();function Pt(){var gt=en;Le!==null?gt=Le:parseFloat(gt)<5&&(gt="5.0"),tt(gt,!1),he!==null&&ut(he,ve),Ce=!0}return _n},GGBAppletUtils=function(){"use strict";function _n(){return window.GGBT_wsf_edit!==void 0}function en(Ce,Le){Le!=1?(Ce.style.transformOrigin="0% 0% 0px",Ce.style.webkitTransformOrigin="0% 0% 0px",Ce.style.transform="scale("+Le+","+Le+")",Ce.style.webkitTransform="scale("+Le+","+Le+")",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,Le,he,ye,xe,ge){var le=null;if(ge!=null&&ge!="")for(var ve=Ce.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+ge+" ")>-1){le=ve;break}else ve=ve.parentNode;var de=0,ce=0,z=0,ee=0,oe=0,ie=0,se=0;if(le)de=le.offsetWidth,ce=Math.max(ye?le.offsetWidth:0,le.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(de=Math.min(window.innerWidth,document.documentElement.clientWidth),ce=Math.min(window.innerHeight,document.documentElement.clientHeight),z=de):(de=window.innerWidth,ce=window.innerHeight,z=window.innerWidth),Ce){var ue=Ce.getBoundingClientRect();ue.left>0&&ue.left<=de&&(xe===void 0||!xe)&&(document.dir==="rtl"?(oe=de-ue.width-ue.left,ie=z<=480?10:30):(ie=ue.left,oe=z<=480?10:30),ee=ie+oe)}if(Ce&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Se=Ce.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,se=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,se=40)}}return Ce&&((he===void 0||!he)&&Le>0&&Le+ee<de?de=Le:de-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(he===void 0||!he)&&(ce-=se)),{width:de,height:ce}}function Me(Ce,Le,he,ye,xe){if(Ce.isScreenshoGenerator)return 1;var ge=ye!==void 0&&ye,le=Ce.noScaleMargin!=null&&Ce.noScaleMargin,ve=function(Se){return Se&&Se!=="false"},de=ve(Ce.autoHeight),ce=Ee(Le,Ce.width,he,de,ge&&window.GGBT_wsf_view||le,xe),z=parseInt(ce.width),ee=Ce.width,oe=Ce.height;if(ee===void 0){var ie=Le.querySelector(".appletParameters");ie&&(ee=ie.offsetWidth,oe=ie.offsetHeight)}var se=z/ee,ue=ge?1:ce.height/oe;return he!==void 0&&!he&&(se=Math.min(1,se),ue=Math.min(1,ue)),Math.min(se,ue)}function me(Ce,Le,he){var ye=1,xe,ge=!1;if(Ce.hasOwnProperty("allowUpscale")&&(ge=Ce.allowUpscale),Ce.hasOwnProperty("scale")&&(ye=parseFloat(Ce.scale),(isNaN(ye)||ye===null||ye===0)&&(ye=1),ye>1&&(ge=!0)),Le&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ge=!0),!(Ce.hasOwnProperty("disableAutoScale")&&Ce.disableAutoScale))xe=Me(Ce,Le,ge,he,Ce.scaleContainerClass);else return ye;return ge&&(!Ce.hasOwnProperty("scale")||ye===1)?xe:Math.min(ye,xe)}function Be(Ce){var Le=Math.min(window.innerWidth,document.documentElement.clientWidth),he=Math.min(window.innerHeight,document.documentElement.clientHeight),ye=Ce.getBoundingClientRect(),xe=(Le-ye.width)/2,ge=(he-ye.height)/2;ge<0&&(ge=0),Ce.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(xe<40?Ce.style.left="40px":Ce.style.left=xe+"px",Ce.style.top=ge+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ge<40?Ce.style.top="40px":Ce.style.top=ge+"px",Ce.style.left=xe+"px")}function ke(Ce,Le){var he=Ce.querySelector(".appletParameters");if(he){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Le.id!==he.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ce)}if(he.parentElement&&/fullscreen/.test(he.parentElement.className))return;var ye=me(Le,Ce);_n()&&he.setAttribute("data-param-scale",ye);for(var xe=null,ge=0;ge<Ce.childNodes.length;ge++)if(Ce.childNodes[ge].className!==void 0&&Ce.childNodes[ge].className.match(/^applet_scaler/)){xe=Ce.childNodes[ge];break}if(xe!==null&&xe.querySelector(".noscale")!==null)return;var le=Le.id!==void 0?Le.id:"ggbApplet",ve=window[le];(ve==null||!ve.recalculateEnvironments)&&xe!==null&&!xe.className.match(/fullscreen/)&&(xe.parentNode.style.transform="",!isNaN(ye)&&ye!==1?(xe.parentNode.style.width=Le.width*ye+"px",xe.parentNode.style.height=Le.height*ye+"px",en(xe,ye)):(en(xe,1),xe.parentNode.style.width=Le.width+"px",xe.parentNode.style.height=Le.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Be(Ce),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(he).parents(".content-added-content"))}}return{responsiveResize:ke,isFlexibleWorksheetEditor:_n,positionCenter:Be,getScale:me,scaleElement:en}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var _n=n.location.search;return _n.indexOf(J)!=-1||_n.indexOf(K)!=-1}function q(_n,en){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(_n){var en=s[L].bindings;s[L].bindings=function(){for(var Ee=en?en():{},Me=_n[webModule.__softPermutationId],me=O;me<Me.length;me++){var Be=Me[me];Ee[Be[O]]=Be[P]}return Ee}};var t;function u(){return v(),t}function v(){if(!t){var _n=o.createElement(Q);if(_n.id=L,_n.style.cssText=R+S,_n.tabIndex=-1,o.body.appendChild(_n),t=_n.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var en=document.compatMode==U?V:W;t.write(en+X),t.close()}}}function w(_n){function en(Me){function me(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Be=me();if(Be){Me();return}function ke(){if(!Be){if(!me())return;Be=!0,Me(),o.removeEventListener&&o.removeEventListener(Z,ke,!1),Ce&&clearInterval(Ce)}}o.addEventListener&&o.addEventListener(Z,ke,!1);var Ce=setInterval(function(){ke()},$)}function Ee(Me){var me=u(),Be=me.body,ke=me.createElement(_);ke.language=ab,ke.crossOrigin=W,ke.src=Me,webModule.__errFn&&(ke.onerror=function(){webModule.__errFn(L,new Error(bb+Me))}),Be.appendChild(ke)}en(function(){Ee(_n)})}webModule.__startLoadingFragment=function(_n){return C(_n)},webModule.__installRunAsyncCode=function(_n){var en=u(),Ee=en.body,Me=en.createElement(_);Me.language=ab,Me.text=_n,Ee.appendChild(Me),Ee.removeChild(Me)};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(_n){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(_n){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(_n){var en=c[_n];return en==null?null:en},r=d,webModule.__errFn=e}function B(){function _n(Ce){var Le=Ce.lastIndexOf(rb);Le==-1&&(Le=Ce.length);var he=Ce.indexOf(sb);he==-1&&(he=Ce.length);var ye=Ce.lastIndexOf(tb,Math.min(he,Le));return ye>=O?Ce.substring(O,ye+P):W}function en(Ce){if(!Ce.match(/^\w+:\/\//)){var Le=o.createElement(ub);Le.src=Ce+vb,Ce=_n(Le.src)}return Ce}function Ee(){var Ce=__gwt_getMetaProperty(wb);return Ce!=null?Ce:W}function Me(){for(var Ce=o.getElementsByTagName(_),Le=O;Le<Ce.length;++Le)if(Ce[Le].src.indexOf(xb)!=-1)return _n(Ce[Le].src);return W}function me(){var Ce=o.getElementsByTagName(yb);return Ce.length>O?Ce[Ce.length-P].href:W}function Be(){var Ce=o.location;return Ce.href==Ce.protocol+zb+Ce.host+Ce.pathname+Ce.search+Ce.hash}var ke=Ee();return ke==W&&(ke=Me()),ke==W&&(ke=me()),ke==W&&Be()&&(ke=_n(o.location.href)),ke=en(ke),ke}function C(_n){return _n.match(/^\//)||_n.match(/^[a-zA-Z]+:\/\//)?_n:webModule.__moduleBase+_n}function D(){var _n=[],en=O,Ee=[],Me=[];function me(Ce){var Le=Me[Ce](),he=Ee[Ce];if(Le in he)return Le;var ye=[];for(var xe in he)ye[he[xe]]=xe;throw r&&r(Ce,ye,Le),null}if(__gwt_isKnownPropertyValue=function(Ce,Le){return Le in Ee[Ce]},webModule.__getPropMap=function(){var Ce={};for(var Le in Ee)Ee.hasOwnProperty(Le)&&(Ce[Le]=me(Le));return Ce},webModule.__computePropValue=me,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Be;try{Be=Cb;var ke=Be.indexOf(Db);ke!=-1&&(en=parseInt(Be.substring(ke+P),$),Be=Be.substring(O,ke))}catch(Ce){}return webModule.__softPermutationId=en,C(Be+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77903:function(_n,en,Ee){"use strict";Ee.d(en,{Ax:function(){return ke},Ds:function(){return Ce},KI:function(){return he},SI:function(){return Be},f1:function(){return me}});var Me=Ee(3294);function me(ye){let xe=!0;if(ye.length>0){for(let ge=0;ge<ye.length;ge++)if(ye[ge].compile_success==0||!ye[ge].compile_success){xe=!1;break}}else xe=!1;return xe}function Be(ye,xe=""){let ge=[];for(let le=0;le<ye.length;le++){let ve=ye[le],de=xe?`${xe}/${ve.name}`:`${ve.name}`;ge.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:de})}return ge}function ke(ye,xe,ge){for(let le=0;le<ye.length;le++){let ve=ye[le];if(ve.key===xe){ve.children=ge;break}ve.children&&ke(ve.children,xe,ge)}return ye}function Ce(ye,xe,ge){let le;return function(){let ve=this,de=arguments,ce=function(){le=null,ge||ye.apply(ve,de)},z=ge&&!le;clearTimeout(le),le=setTimeout(ce,xe),z&&ye.apply(ve,de)}}const Le=!0,he=Me.Z.API_SERVER},16406:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return We}});var Me=Ee(59301),me={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Be=Ee(92310),ke=Ee.n(Be),Ce=Ee(71418);var Le=function(Oe,be){return(Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ne,$e){Ne.__proto__=$e}||function(Ne,$e){for(var dt in $e)Object.prototype.hasOwnProperty.call($e,dt)&&(Ne[dt]=$e[dt])})(Oe,be)};function he(Oe,be){function Ne(){this.constructor=Oe}Le(Oe,be),Oe.prototype=be===null?Object.create(be):(Ne.prototype=be.prototype,new Ne)}function ye(Oe,be,Ne,$e){return new(Ne||(Ne=Promise))(function(dt,Je){function At(ln){try{pn($e.next(ln))}catch(gn){Je(gn)}}function tn(ln){try{pn($e.throw(ln))}catch(gn){Je(gn)}}function pn(ln){var gn;ln.done?dt(ln.value):(gn=ln.value,gn instanceof Ne?gn:new Ne(function(Hn){Hn(gn)})).then(At,tn)}pn(($e=$e.apply(Oe,be||[])).next())})}function xe(Oe,be){var Ne,$e,dt,Je,At={label:0,sent:function(){if(1&dt[0])throw dt[1];return dt[1]},trys:[],ops:[]};return Je={next:tn(0),throw:tn(1),return:tn(2)},typeof Symbol=="function"&&(Je[Symbol.iterator]=function(){return this}),Je;function tn(pn){return function(ln){return function(gn){if(Ne)throw new TypeError("Generator is already executing.");for(;At;)try{if(Ne=1,$e&&(dt=2&gn[0]?$e.return:gn[0]?$e.throw||((dt=$e.return)&&dt.call($e),0):$e.next)&&!(dt=dt.call($e,gn[1])).done)return dt;switch($e=0,dt&&(gn=[2&gn[0],dt.value]),gn[0]){case 0:case 1:dt=gn;break;case 4:return At.label++,{value:gn[1],done:!1};case 5:At.label++,$e=gn[1],gn=[0];continue;case 7:gn=At.ops.pop(),At.trys.pop();continue;default:if(dt=At.trys,!((dt=dt.length>0&&dt[dt.length-1])||gn[0]!==6&&gn[0]!==2)){At=0;continue}if(gn[0]===3&&(!dt||gn[1]>dt[0]&&gn[1]<dt[3])){At.label=gn[1];break}if(gn[0]===6&&At.label<dt[1]){At.label=dt[1],dt=gn;break}if(dt&&At.label<dt[2]){At.label=dt[2],At.ops.push(gn);break}dt[2]&&At.ops.pop(),At.trys.pop();continue}gn=be.call(Oe,At)}catch(Hn){gn=[6,Hn],$e=0}finally{Ne=dt=0}if(5&gn[0])throw gn[1];return{value:gn[0]?gn[1]:void 0,done:!0}}([pn,ln])}}}function ge(){for(var Oe=0,be=0,Ne=arguments.length;be<Ne;be++)Oe+=arguments[be].length;var $e=Array(Oe),dt=0;for(be=0;be<Ne;be++)for(var Je=arguments[be],At=0,tn=Je.length;At<tn;At++,dt++)$e[dt]=Je[At];return $e}var le=function(){function Oe(){}return Oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Oe.setAttributes=function(be,Ne){for(var $e=0,dt=Ne;$e<dt.length;$e++){var Je=dt[$e],At=Je[0],tn=Je[1];be.setAttribute(At,tn)}},Oe.createRect=function(be,Ne,$e){var dt=document.createElementNS("http://www.w3.org/2000/svg","rect");return dt.setAttribute("width",be.toString()),dt.setAttribute("height",Ne.toString()),$e&&Oe.setAttributes(dt,$e),dt},Oe.createLine=function(be,Ne,$e,dt,Je){var At=document.createElementNS("http://www.w3.org/2000/svg","line");return At.setAttribute("x1",be.toString()),At.setAttribute("y1",Ne.toString()),At.setAttribute("x2",$e.toString()),At.setAttribute("y2",dt.toString()),Je&&Oe.setAttributes(At,Je),At},Oe.createPolygon=function(be,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","polygon");return $e.setAttribute("points",be),Ne&&Oe.setAttributes($e,Ne),$e},Oe.createCircle=function(be,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","circle");return $e.setAttribute("cx",(be/2).toString()),$e.setAttribute("cy",(be/2).toString()),$e.setAttribute("r",be.toString()),Ne&&Oe.setAttributes($e,Ne),$e},Oe.createEllipse=function(be,Ne,$e){var dt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return dt.setAttribute("cx",(be/2).toString()),dt.setAttribute("cy",(Ne/2).toString()),dt.setAttribute("rx",(be/2).toString()),dt.setAttribute("ry",(Ne/2).toString()),$e&&Oe.setAttributes(dt,$e),dt},Oe.createGroup=function(be){var Ne=document.createElementNS("http://www.w3.org/2000/svg","g");return be&&Oe.setAttributes(Ne,be),Ne},Oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Oe.createMarker=function(be,Ne,$e,dt,Je,At,tn){var pn=document.createElementNS("http://www.w3.org/2000/svg","marker");return Oe.setAttributes(pn,[["id",be],["orient",Ne],["markerWidth",$e.toString()],["markerHeight",dt.toString()],["refX",Je.toString()],["refY",At.toString()]]),pn.appendChild(tn),pn},Oe.createText=function(be){var Ne=document.createElementNS("http://www.w3.org/2000/svg","text");return Ne.setAttribute("x","0"),Ne.setAttribute("y","0"),be&&Oe.setAttributes(Ne,be),Ne},Oe.createTSpan=function(be,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","tspan");return $e.textContent=be,Ne&&Oe.setAttributes($e,Ne),$e},Oe.createImage=function(be){var Ne=document.createElementNS("http://www.w3.org/2000/svg","image");return be&&Oe.setAttributes(Ne,be),Ne},Oe.createPoint=function(be,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return $e.x=be,$e.y=Ne,$e},Oe.createPath=function(be,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","path");return $e.setAttribute("d",be),Ne&&Oe.setAttributes($e,Ne),$e},Oe}(),ve=function(){function Oe(){}return Oe.addKey=function(be){Oe.key=be},Object.defineProperty(Oe,"isLicensed",{get:function(){return!!Oe.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Oe.key)},enumerable:!1,configurable:!0}),Oe}(),de=function(){function Oe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Oe.prototype.rasterize=function(be,Ne,$e){var dt=this;return new Promise(function(Je){var At=$e!==void 0?$e:document.createElement("canvas");be===null&&(dt.markersOnly=!0,dt.naturalSize=!1);var tn=document.createElementNS("http://www.w3.org/2000/svg","svg");tn.setAttribute("xmlns","http://www.w3.org/2000/svg"),tn.setAttribute("width",Ne.width.baseVal.valueAsString),tn.setAttribute("height",Ne.height.baseVal.valueAsString),tn.setAttribute("viewBox","0 0 "+Ne.viewBox.baseVal.width.toString()+" "+Ne.viewBox.baseVal.height.toString()),tn.innerHTML=Ne.innerHTML,dt.naturalSize===!0?(tn.width.baseVal.value=be.naturalWidth,tn.height.baseVal.value=be.naturalHeight):dt.width!==void 0&&dt.height!==void 0&&(tn.width.baseVal.value=dt.width,tn.height.baseVal.value=dt.height),At.width=tn.width.baseVal.value,At.height=tn.height.baseVal.value;var pn=tn.outerHTML,ln=At.getContext("2d");dt.markersOnly!==!0&&ln.drawImage(be,0,0,At.width,At.height);var gn=window.URL,Hn=new Image(At.width,At.height);Hn.setAttribute("crossOrigin","anonymous");var An=new Blob([pn],{type:"image/svg+xml"}),qn=gn.createObjectURL(An);Hn.onload=function(){ln.drawImage(Hn,0,0),gn.revokeObjectURL(qn);var ai=At.toDataURL(dt.imageType,dt.imageQuality);Je(ai)},Hn.src=qn})},Oe}(),ce=function(){},z=function(){function Oe(be){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+be+"_"}return Object.defineProperty(Oe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Oe.prototype.addClass=function(be){return this.styleSheet===void 0&&this.addStyleSheet(),be.name=""+this.classNamePrefix+be.localName,this.classes.push(be),this.styleSheet.sheet.insertRule("."+be.name+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length),be},Oe.prototype.addRule=function(be){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(be),this.styleSheet.sheet.insertRule(be.selector+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length)},Oe.prototype.addStyleSheet=function(){var be;this.styleSheet=document.createElement("style"),((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).appendChild(this.styleSheet),this.addRule(new ee("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new oe("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new oe("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Oe.prototype.removeStyleSheet=function(){var be;this.styleSheet&&(((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Oe}(),ee=function(Oe,be){this.selector=Oe,this.style=be},oe=function(Oe,be){this.localName=Oe,this.style=be},ie=function(){function Oe(be,Ne,$e,dt,Je){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=be,this.displayMode=Ne,this.markerItems=$e,this.uiStyleSettings=dt,this.styles=Je,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Oe.prototype.show=function(be){var Ne=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var $e=document.createElement("div");$e.className=this.toolbarBlockStyleClass.name,$e.style.whiteSpace="nowrap",this.uiContainer.appendChild($e),this.addActionButton($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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(Je){var At=document.createElement("div");At.className=""+Ne.toolbarButtonStyleClass.name,At.setAttribute("data-type-name",Je.typeName),At.innerHTML=Je.icon,At.addEventListener("click",function(){Ne.markerToolbarButtonClicked(At,Je)}),Ne.buttons.push(At),Ne.markerButtons.push(At)}),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 dt=document.createElement("div");dt.className=this.toolbarBlockStyleClass.name,dt.style.whiteSpace="nowrap",dt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(dt),this.addActionButton(dt,'<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(dt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Oe.prototype.addButtonClickListener=function(be){this.buttonClickListeners.push(be)},Oe.prototype.removeButtonClickListener=function(be){this.buttonClickListeners.indexOf(be)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(be),1)},Oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var be=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Ne=0;Ne<this.markerButtons.length;Ne++)Ne<be||Ne===be&&this.markerButtons.length-1===be?this.markerButtonBlock.appendChild(this.markerButtons[Ne]):(Ne===be&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Ne]))}},Oe.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Oe.prototype.resetButtonStyles=function(){var be=this;this.buttons.forEach(function(Ne){Ne.className=Ne.className.replace(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name,"").trim(),Ne.className=Ne.className.replace(be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:be.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ne.className+=" "+(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name)})},Oe.prototype.addActionButton=function(be,Ne,$e){var dt=this,Je=document.createElement("div");switch(Je.className=""+this.toolbarButtonStyleClass.name,Je.innerHTML=Ne,Je.setAttribute("data-action",$e),Je.addEventListener("click",function(){dt.actionToolbarButtonClicked(Je,$e)}),$e){case"select":Je.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Je.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Je.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Je.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Je.style.fill=this.uiStyleSettings.closeButtonColor}be.appendChild(Je),this.buttons.push(Je)},Oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new oe("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 oe("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new oe("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new oe("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 oe("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var be=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new oe("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
|
|
|
padding: `+be+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Oe.prototype.markerToolbarButtonClicked=function(be,Ne){this.setActiveButton(be),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($e){return $e("marker",Ne)}),this.markerButtonOverflowBlock.style.display="none"},Oe.prototype.actionToolbarButtonClicked=function(be,Ne){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($e){return $e("action",Ne)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Oe.prototype.setActiveButton=function(be){this.resetButtonStyles(),be.className=be.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),be.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Oe.prototype.setActiveMarkerButton=function(be){var Ne=this.markerButtons.find(function($e){return $e.getAttribute("data-type-name")===be});Ne&&this.setActiveButton(Ne)},Oe.prototype.setCurrentMarker=function(be){var Ne=this;this.currentMarker=be,this.buttons.filter(function($e){return/delete|notes/.test($e.getAttribute("data-action"))}).forEach(function($e){Ne.currentMarker===void 0?($e.style.fillOpacity="0.4",$e.style.pointerEvents="none"):($e.style.fillOpacity="1",$e.style.pointerEvents="all")})},Oe}(),se=function(){function Oe(be,Ne,$e,dt){this.panels=[],this.panelButtons=[],this.markerjsContainer=be,this.displayMode=Ne,this.uiStyleSettings=$e,this.styles=dt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Oe.prototype.addStyles=function(){var be;this.toolboxStyleClass=this.styles.addClass(new oe("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 oe("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Ne=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new oe("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new oe("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new oe("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 oe("toolbox-panel-row_colors",`
|
|
|
background-color: `+((be=this.uiStyleSettings.toolboxBackgroundColor)!==null&&be!==void 0?be:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new oe("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
|
padding: `+Ne+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new oe("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new oe("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Oe.prototype.show=function(be){var Ne;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Oe.prototype.setPanelButtons=function(be){var Ne,$e,dt=this;this.panels=be,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(($e=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&$e!==void 0?$e:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Je){var At;Je.uiStyleSettings=dt.uiStyleSettings;var tn=document.createElement("div");tn.className=dt.toolboxButtonStyleClass.name+" "+((At=dt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&At!==void 0?At:dt.toolboxButtonStyleColorsClass.name),tn.innerHTML=Je.icon,tn.title=Je.title,tn.addEventListener("click",function(){dt.panelButtonClick(Je)}),dt.panelButtons.push(tn),dt.buttonRow.appendChild(tn)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Oe.prototype.panelButtonClick=function(be){var Ne=this,$e=-1;if(be!==this.activePanel){$e=this.panels.indexOf(be),this.panelRow.innerHTML="";var dt=be.getUi();dt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(dt),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=be}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ne.displayMode==="inline"?Ne.panelRow.style.display="none":Ne.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Je,At){var tn,pn;Je.className=Ne.toolboxButtonStyleClass.name+" "+(At===$e?""+((tn=Ne.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&tn!==void 0?tn:Ne.toolboxActiveButtonStyleColorsClass.name):""+((pn=Ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&pn!==void 0?pn:Ne.toolboxButtonStyleColorsClass.name))})},Oe}(),ue=function(Oe,be){this.title=Oe,this.icon=be},Se=function(Oe){function be(Ne,$e,dt,Je){var At=Oe.call(this,Ne,Je||'<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 At.colors=[],At.addTransparent=!1,At.colorBoxes=[],At.colors=$e,At.currentColor=dt,At.setCurrentColor=At.setCurrentColor.bind(At),At.getColorBox=At.getColorBox.bind(At),At}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.overflow="hidden",$e.style.whiteSpace="nowrap",this.colors.forEach(function(dt){var Je=Ne.getColorBox(dt);$e.appendChild(Je),Ne.colorBoxes.push(Je)}),$e},be.prototype.getColorBox=function(Ne){var $e=this,dt=this.uiStyleSettings.toolbarHeight/4,Je=this.uiStyleSettings.toolbarHeight-dt,At=document.createElement("div");At.style.display="inline-block",At.style.boxSizing="content-box",At.style.width=Je-2+"px",At.style.height=Je-2+"px",At.style.padding="1px",At.style.marginRight="2px",At.style.marginBottom="2px",At.style.borderWidth="2px",At.style.borderStyle="solid",At.style.borderRadius=(Je+2)/2+"px",At.style.borderColor=Ne===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",At.addEventListener("click",function(){$e.setCurrentColor(Ne,At)});var tn=document.createElement("div");return tn.style.display="inline-block",tn.style.width=Je-2+"px",tn.style.height=Je-2+"px",tn.style.backgroundColor=Ne,tn.style.borderRadius=Je/2+"px",Ne==="transparent"&&(tn.style.fill=this.uiStyleSettings.toolboxAccentColor,tn.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>`),At.appendChild(tn),At},be.prototype.setCurrentColor=function(Ne,$e){var dt=this;this.currentColor=Ne,this.colorBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ne)},be}(ue),we=function(){function Oe(be,Ne,$e){this._state="new",this._isSelected=!1,this._container=be,this._overlayContainer=Ne,this.globalSettings=$e,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Oe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Oe.prototype.ownsTarget=function(be){return!1},Object.defineProperty(Oe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Oe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Oe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Oe.prototype.pointerDown=function(be,Ne){},Oe.prototype.dblClick=function(be,Ne){},Oe.prototype.manipulate=function(be){},Oe.prototype.pointerUp=function(be){this.stateChanged()},Oe.prototype.dispose=function(){},Oe.prototype.addMarkerVisualToContainer=function(be){this.container.childNodes.length>0?this.container.insertBefore(be,this.container.childNodes[0]):this.container.appendChild(be)},Oe.prototype.getState=function(){return{typeName:Oe.typeName,state:this.state,notes:this.notes}},Oe.prototype.restoreState=function(be){this._state=be.state,this.notes=be.notes},Oe.prototype.scale=function(be,Ne){},Oe.prototype.colorChanged=function(be){this.onColorChanged&&this.onColorChanged(be),this.stateChanged()},Oe.prototype.fillColorChanged=function(be){this.onFillColorChanged&&this.onFillColorChanged(be),this.stateChanged()},Oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var be=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),be.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(be)&&this.onStateChanged(this)}},Oe.typeName="MarkerBase",Oe}(),Pe=function(){function Oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Oe.prototype.findGripByVisual=function(be){return this.topLeft.ownsTarget(be)?this.topLeft:this.topCenter.ownsTarget(be)?this.topCenter:this.topRight.ownsTarget(be)?this.topRight:this.centerLeft.ownsTarget(be)?this.centerLeft:this.centerRight.ownsTarget(be)?this.centerRight:this.bottomLeft.ownsTarget(be)?this.bottomLeft:this.bottomCenter.ownsTarget(be)?this.bottomCenter:this.bottomRight.ownsTarget(be)?this.bottomRight:void 0},Oe}(),Ae=function(){function Oe(){this.GRIP_SIZE=10,this.visual=le.createGroup(),this.visual.appendChild(le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Oe.prototype.ownsTarget=function(be){return be===this.visual||be===this.visual.childNodes[0]||be===this.visual.childNodes[1]},Oe}(),De=function(){function Oe(){}return Oe.toITransformMatrix=function(be){return{a:be.a,b:be.b,c:be.c,d:be.d,e:be.e,f:be.f}},Oe.toSVGMatrix=function(be,Ne){return be.a=Ne.a,be.b=Ne.b,be.c=Ne.c,be.d=Ne.d,be.e=Ne.e,be.f=Ne.f,be},Oe}(),ze=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.left=0,Je.top=0,Je.width=0,Je.height=0,Je.defaultSize={x:50,y:20},Je.offsetX=0,Je.offsetY=0,Je.rotationAngle=0,Je.CB_DISTANCE=10,Je._suppressMarkerCreateEvent=!1,Je.container.transform.baseVal.appendItem(le.createTransform()),Je.setupControlBox(),Je}return he(be,Oe),Object.defineProperty(be.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"visual",{get:function(){return this._visual},set:function(Ne){this._visual=Ne;var $e=le.createTransform();this._visual.transform.baseVal.appendItem($e)},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Ne){return!!Oe.prototype.ownsTarget.call(this,Ne)||!!(this.controlGrips.findGripByVisual(Ne)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne))},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.left=Ne.x,this.top=Ne.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var dt=this.unrotatePoint(Ne);if(this.manipulationStartX=dt.x,this.manipulationStartY=dt.y,this.offsetX=dt.x-this.left,this.offsetY=dt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual($e),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($e)){this.activeGrip=this.rotatorGrip;var Je=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Je.x-this.width/2,this.top=Je.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var At=this.container.transform.baseVal.getItem(0);At.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(At,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},be.prototype.pointerUp=function(Ne){var $e=this.state;Oe.prototype.pointerUp.call(this,Ne),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ne),this._state="select",$e==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},be.prototype.moveVisual=function(Ne){this.visual.style.transform="translate("+Ne.x+"px, "+Ne.y+"px)"},be.prototype.manipulate=function(Ne){var $e=this.unrotatePoint(Ne);this.state==="creating"?this.resize(Ne):this.state==="move"?(this.left=this.manipulationStartLeft+($e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+($e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize($e):this.state==="rotate"&&this.rotate(Ne)},be.prototype.resize=function(Ne){var $e=this.manipulationStartLeft,dt=this.manipulationStartWidth,Je=this.manipulationStartTop,At=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:$e=this.manipulationStartLeft+Ne.x-this.manipulationStartX,dt=this.manipulationStartWidth+this.manipulationStartLeft-$e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:dt=this.manipulationStartWidth+Ne.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Je=this.manipulationStartTop+Ne.y-this.manipulationStartY,At=this.manipulationStartHeight+this.manipulationStartTop-Je;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:At=this.manipulationStartHeight+Ne.y-this.manipulationStartY}dt>=0?(this.left=$e,this.width=dt):(this.left=$e+dt,this.width=-dt),At>=0?(this.top=Je,this.height=At):(this.top=Je+At,this.height=-At),this.setSize()},be.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},be.prototype.rotate=function(Ne){if(Math.abs(Ne.x-this.centerX)>.1){var $e=Math.sign(Ne.x-this.centerX);this.rotationAngle=180*Math.atan((Ne.y-this.centerY)/(Ne.x-this.centerX))/Math.PI+90*$e,this.applyRotation()}},be.prototype.applyRotation=function(){var Ne=this.container.transform.baseVal.getItem(0);Ne.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ne,0)},be.prototype.rotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var $e=this.container.getCTM(),dt=le.createPoint(Ne.x,Ne.y);return{x:(dt=dt.matrixTransform($e)).x,y:dt.y}},be.prototype.unrotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var $e=this.container.getCTM();$e=$e.inverse();var dt=le.createPoint(Ne.x,Ne.y);return{x:(dt=dt.matrixTransform($e)).x,y:dt.y}},be.prototype.select=function(){Oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){Oe.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=le.createGroup();var Ne=le.createTransform();Ne.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ne),this.container.appendChild(this.controlBox),this.controlRect=le.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=le.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Pe,this.addControlGrips(),this.controlBox.style.display="none"},be.prototype.adjustControlBox=function(){var Ne=this.controlBox.transform.baseVal.getItem(0);Ne.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ne,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()},be.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()},be.prototype.createGrip=function(){var Ne=new Ae;return Ne.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},be.prototype.positionGrips=function(){var Ne=this.controlGrips.topLeft.GRIP_SIZE,$e=-Ne/2,dt=$e,Je=(this.width+this.CB_DISTANCE)/2-Ne/2,At=(this.height+this.CB_DISTANCE)/2-Ne/2,tn=this.height+this.CB_DISTANCE-Ne/2,pn=this.width+this.CB_DISTANCE-Ne/2;this.positionGrip(this.controlGrips.topLeft.visual,$e,dt),this.positionGrip(this.controlGrips.topCenter.visual,Je,dt),this.positionGrip(this.controlGrips.topRight.visual,pn,dt),this.positionGrip(this.controlGrips.centerLeft.visual,$e,At),this.positionGrip(this.controlGrips.centerRight.visual,pn,At),this.positionGrip(this.controlGrips.bottomLeft.visual,$e,tn),this.positionGrip(this.controlGrips.bottomCenter.visual,Je,tn),this.positionGrip(this.controlGrips.bottomRight.visual,pn,tn),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Je,dt-3*this.CB_DISTANCE)},be.prototype.positionGrip=function(Ne,$e,dt){var Je=Ne.transform.baseVal.getItem(0);Je.setTranslate($e,dt),Ne.transform.baseVal.replaceItem(Je,0)},be.prototype.hideControlBox=function(){this.controlBox.style.display="none"},be.prototype.showControlBox=function(){this.controlBox.style.display=""},be.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:De.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:De.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Oe.prototype.getState.call(this))},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.left=$e.left,this.top=$e.top,this.width=$e.width,this.height=$e.height,this.rotationAngle=$e.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(De.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,$e.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(De.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,$e.containerTransformMatrix))},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e);var dt=this.rotatePoint({x:this.left,y:this.top}),Je=this.unrotatePoint({x:dt.x*Ne,y:dt.y*$e});this.left=Je.x,this.top=Je.y,this.width=this.width*Ne,this.height=this.height*$e,this.adjustControlBox()},be}(we),Ze=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.fillColor="transparent",Je.strokeColor="transparent",Je.strokeWidth=0,Je.strokeDasharray="",Je.opacity=1,Je.setStrokeColor=Je.setStrokeColor.bind(Je),Je.setFillColor=Je.setFillColor.bind(Je),Je.setStrokeWidth=Je.setStrokeWidth.bind(Je),Je.setStrokeDasharray=Je.setStrokeDasharray.bind(Je),Je.createVisual=Je.createVisual.bind(Je),Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},be.prototype.createVisual=function(){this.visual=le.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},be.prototype.manipulate=function(Ne){Oe.prototype.manipulate.call(this,Ne)},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.setSize()},be.prototype.setSize=function(){Oe.prototype.setSize.call(this),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Ne){Oe.prototype.pointerUp.call(this,Ne),this.setSize()},be.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},be.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},be.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Oe.prototype.getState.call(this))},be.prototype.restoreState=function(Ne){var $e=Ne;this.fillColor=$e.fillColor,this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.opacity=$e.opacity,this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.setSize()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize()},be.title="Rectangle marker",be}(ze),Xe=function(Oe){function be(Ne,$e,dt,Je){var At=Oe.call(this,Ne,Je||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return At.widths=[],At.widthBoxes=[],At.widths=$e,At.currentWidth=dt,At.setCurrentWidth=At.setCurrentWidth.bind(At),At}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2",this.widths.forEach(function(dt){var Je=document.createElement("div");Je.style.display="flex",Je.style.flexGrow="2",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.borderColor=dt===Ne.currentWidth?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Ne.setCurrentWidth(dt,Je)}),$e.appendChild(Je);var At=document.createElement("div");At.innerText=dt.toString(),At.style.marginRight="5px",Je.appendChild(At);var tn=document.createElement("div");tn.style.minHeight="20px",tn.style.flexGrow="2",tn.style.display="flex",tn.style.alignItems="center";var pn=document.createElement("hr");pn.style.minWidth="20px",pn.style.border="0px",pn.style.borderTop=dt+"px solid "+Ne.uiStyleSettings.toolboxColor,pn.style.flexGrow="2",tn.appendChild(pn),Je.appendChild(tn),Ne.widthBoxes.push(Je)}),$e},be.prototype.setCurrentWidth=function(Ne,$e){var dt=this;this.currentWidth=Ne,this.widthBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},be}(ue),Ge=function(Oe){function be(Ne,$e,dt,Je){var At=Oe.call(this,Ne,Je||'<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 At.styles=[],At.styleBoxes=[],At.styles=$e,At.currentStyle=dt,At.setCurrentStyle=At.setCurrentStyle.bind(At),At}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2",this.styles.forEach(function(dt){var Je=document.createElement("div");Je.style.display="flex",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.overflow="hidden",Je.style.maxWidth=100/Ne.styles.length-5+"%",Je.style.borderColor=dt===Ne.currentStyle?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Ne.setCurrentStyle(dt,Je)}),$e.appendChild(Je);var At=document.createElement("div");At.style.minHeight="20px",At.style.flexGrow="2",At.style.overflow="hidden";var tn=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Ne.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(dt!==""?'stroke-dasharray="'+dt+'"':"")+` />
|
|
|
</svg>`;At.innerHTML=tn,Je.appendChild(At),Ne.styleBoxes.push(Je)}),$e},be.prototype.setCurrentStyle=function(Ne,$e){var dt=this;this.currentStyle=Ne,this.styleBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},be}(ue),ft=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.strokeColor=dt.defaultColor,Je.strokeWidth=dt.defaultStrokeWidth,Je.strokeDasharray=dt.defaultStrokeDasharray,Je.strokePanel=new Se("Line color",dt.defaultColorSet,dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.strokeWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.strokeWidthPanel.onWidthChanged=Je.setStrokeWidth,Je.strokeStylePanel=new Ge("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Je.strokeStylePanel.onStyleChanged=Je.setStrokeDasharray,Je}return he(be,Oe),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=be.typeName,Ne},be.typeName="FrameMarker",be.title="Frame marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',be}(Ze),at=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Ct=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.x1=0,Je.y1=0,Je.x2=0,Je.y2=0,Je.defaultLength=50,Je.manipulationStartX=0,Je.manipulationStartY=0,Je.manipulationStartX1=0,Je.manipulationStartY1=0,Je.manipulationStartX2=0,Je.manipulationStartY2=0,Je.setupControlBox(),Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!!Oe.prototype.ownsTarget.call(this,Ne)||!(!this.grip1.ownsTarget(Ne)&&!this.grip2.ownsTarget(Ne))},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.manipulationStartX=Ne.x,this.manipulationStartY=Ne.y,this.state==="new"&&(this.x1=Ne.x,this.y1=Ne.y,this.x2=Ne.x,this.y2=Ne.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($e)?this.activeGrip=this.grip1:this.grip2.ownsTarget($e)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},be.prototype.pointerUp=function(Ne){var $e=this.state;Oe.prototype.pointerUp.call(this,Ne),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(Ne),this._state="select",$e==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},be.prototype.adjustVisual=function(){},be.prototype.manipulate=function(Ne){this.state==="creating"?this.resize(Ne):this.state==="move"?(this.x1=this.manipulationStartX1+Ne.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ne.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ne.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ne.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ne)},be.prototype.resize=function(Ne){switch(this.activeGrip){case this.grip1:this.x1=Ne.x,this.y1=Ne.y;break;case this.grip2:case void 0:this.x2=Ne.x,this.y2=Ne.y}this.adjustVisual(),this.adjustControlBox()},be.prototype.select=function(){Oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){Oe.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},be.prototype.adjustControlBox=function(){this.positionGrips()},be.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},be.prototype.createGrip=function(){var Ne=new Ae;return Ne.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},be.prototype.positionGrips=function(){var Ne=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ne/2,this.y1-Ne/2),this.positionGrip(this.grip2.visual,this.x2-Ne/2,this.y2-Ne/2)},be.prototype.positionGrip=function(Ne,$e,dt){var Je=Ne.transform.baseVal.getItem(0);Je.setTranslate($e,dt),Ne.transform.baseVal.replaceItem(Je,0)},be.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Oe.prototype.getState.call(this))},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.x1=$e.x1,this.y1=$e.y1,this.x2=$e.x2,this.y2=$e.y2},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.x1=this.x1*Ne,this.y1=this.y1*$e,this.x2=this.x2*Ne,this.y2=this.y2*$e,this.adjustVisual(),this.adjustControlBox()},be}(we),et=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.strokeColor="transparent",Je.strokeWidth=0,Je.strokeDasharray="",Je.setStrokeColor=Je.setStrokeColor.bind(Je),Je.setStrokeWidth=Je.setStrokeWidth.bind(Je),Je.setStrokeDasharray=Je.setStrokeDasharray.bind(Je),Je.strokeColor=dt.defaultColor,Je.strokeWidth=dt.defaultStrokeWidth,Je.strokeDasharray=dt.defaultStrokeDasharray,Je.strokePanel=new Se("Line color",dt.defaultColorSet,dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.strokeWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.strokeWidthPanel.onWidthChanged=Je.setStrokeWidth,Je.strokeStylePanel=new Ge("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Je.strokeStylePanel.onStyleChanged=Je.setStrokeDasharray,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorLine&&Ne!==this.visibleLine)},be.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},be.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},be.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.createVisual(),this.adjustVisual()},be.typeName="LineMarker",be.title="Line marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',be}(Ct),yt=function(Oe){function be(Ne,$e,dt,Je){var At=Oe.call(this,Ne,Je||'<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 At.fonts=[],At.fontBoxes=[],At.fonts=$e,At.currentFont=dt,At.setCurrentFont=At.setCurrentFont.bind(At),At}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.overflow="hidden",$e.style.flexGrow="2",this.fonts.forEach(function(dt){var Je=document.createElement("div");Je.style.display="inline-block",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.overflow="hidden",Je.style.maxWidth=100/Ne.fonts.length-5+"%",Je.style.borderColor=dt===Ne.currentFont?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Ne.setCurrentFont(dt,Je)}),$e.appendChild(Je);var At=document.createElement("div");At.style.display="flex",At.style.minHeight="20px",At.style.flexGrow="2",At.style.fontFamily=dt,At.style.overflow="hidden";var tn=document.createElement("div");tn.style.whiteSpace="nowrap",tn.style.overflow="hidden",tn.style.textOverflow="ellipsis",tn.innerHTML="The quick brown fox jumps over the lazy dog",At.appendChild(tn),Je.appendChild(At),Ne.fontBoxes.push(Je)}),$e},be.prototype.setCurrentFont=function(Ne,$e){var dt=this;this.currentFont=Ne,this.fontBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},be}(ue),st=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.color="transparent",Je.padding=5,Je.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Je.text=Je.DEFAULT_TEXT,Je.isMoved=!1,Je.color=dt.defaultColor,Je.fontFamily=dt.defaultFontFamily,Je.defaultSize={x:100,y:30},Je.setColor=Je.setColor.bind(Je),Je.setFont=Je.setFont.bind(Je),Je.renderText=Je.renderText.bind(Je),Je.sizeText=Je.sizeText.bind(Je),Je.textEditDivClicked=Je.textEditDivClicked.bind(Je),Je.showTextEditor=Je.showTextEditor.bind(Je),Je.setSize=Je.setSize.bind(Je),Je.positionTextEditor=Je.positionTextEditor.bind(Je),Je.colorPanel=new Se("Color",dt.defaultColorSet,dt.defaultColor),Je.colorPanel.onColorChanged=Je.setColor,Je.fontFamilyPanel=new yt("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Je.fontFamilyPanel.onFontChanged=Je.setFont,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){if(Oe.prototype.ownsTarget.call(this,Ne)||Ne===this.visual||Ne===this.textElement||Ne===this.bgRectangle)return!0;var $e=!1;return this.textElement.childNodes.forEach(function(dt){dt===Ne&&($e=!0)}),$e},be.prototype.createVisual=function(){this.visual=le.createGroup(),this.bgRectangle=le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},be.prototype.renderText=function(){var Ne=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($e){Ne.textElement.appendChild(le.createTSpan($e.trim()===""?" ":$e.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},be.prototype.getTextScale=function(){var Ne=this.textElement.getBBox(),$e=1;if(Ne.width>0&&Ne.height>0){var dt=(1*this.width-this.width*this.padding*2/100)/Ne.width,Je=(1*this.height-this.height*this.padding*2/100)/Ne.height;$e=Math.min(dt,Je)}return $e},be.prototype.getTextPosition=function(Ne){var $e=this.textElement.getBBox(),dt=0,Je=0;return $e.width>0&&$e.height>0&&(dt=(this.width-$e.width*Ne)/2,Je=this.height/2-$e.height*Ne/2),{x:dt,y:Je}},be.prototype.sizeText=function(){var Ne=this.textElement.getBBox(),$e=this.getTextScale(),dt=this.getTextPosition($e);dt.y-=Ne.y*$e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+dt.x+"px, "+dt.y+"px) scale("+$e+", "+$e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(dt.x,dt.y),this.textElement.transform.baseVal.getItem(1).setScale($e,$e))},be.prototype.manipulate=function(Ne){Oe.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.isMoved=!0,this.setSize(),this.sizeText()},be.prototype.setSize=function(){Oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},be.prototype.pointerUp=function(Ne){var $e=this.state;$e==="creating"&&(this._suppressMarkerCreateEvent=!0),Oe.prototype.pointerUp.call(this,Ne),this.setSize(),($e==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},be.prototype.showTextEditor=function(){var Ne=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($e){$e.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var $e=Number.parseFloat(Ne.textEditor.style.fontSize);Ne.textEditor.clientWidth>=Number.parseInt(Ne.textEditor.style.maxWidth)&&$e>.9;)$e-=.1,Ne.textEditor.style.fontSize=Math.max($e,.9)+"em"}),this.textEditor.addEventListener("keyup",function($e){$e.cancelBubble=!0}),this.textEditor.addEventListener("paste",function($e){if($e.clipboardData){var dt=$e.clipboardData.getData("text"),Je=window.getSelection();if(!Je.rangeCount)return!1;Je.deleteFromDocument(),Je.getRangeAt(0).insertNode(document.createTextNode(dt)),$e.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ne.textEditDivClicked(Ne.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},be.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ne=this.getTextScale(),$e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),dt=this.textElement.getBBox(),Je={x:dt.width*Ne,y:dt.height*Ne};$e.x-=Je.x/2,$e.y-=Je.y/2,this.textEditor.style.top=$e.y+"px",this.textEditor.style.left=$e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-$e.x+"px",this.textEditor.style.fontSize=Math.max(16*Ne,12)+"px",this.textElement.style.display="none"}},be.prototype.textEditDivClicked=function(Ne){this.text=Ne.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},be.prototype.select=function(){Oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},be.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Oe.prototype.deselect.call(this)},be.prototype.dblClick=function(Ne,$e){Oe.prototype.dblClick.call(this,Ne,$e),this.showTextEditor()},be.prototype.setColor=function(Ne){this.textElement&&le.setAttributes(this.textElement,[["fill",Ne]]),this.color=Ne,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ne)},be.prototype.setFont=function(Ne){this.textElement&&le.setAttributes(this.textElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},be.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},be.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){var $e=Ne;this.color=$e.color,this.fontFamily=$e.fontFamily,this.padding=$e.padding,this.text=$e.text,this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.setSize()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize(),this.sizeText(),this.positionTextEditor()},be.typeName="TextMarker",be.title="Text marker",be.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>',be}(ze),zt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.color="transparent",Je.lineWidth=3,Je.drawing=!1,Je.pixelRatio=1,Je.color=dt.defaultColor,Je.lineWidth=dt.defaultStrokeWidth,Je.pixelRatio=dt.freehandPixelRatio,Je.setColor=Je.setColor.bind(Je),Je.addCanvas=Je.addCanvas.bind(Je),Je.finishCreation=Je.finishCreation.bind(Je),Je.setLineWidth=Je.setLineWidth.bind(Je),Je.colorPanel=new Se("Color",dt.defaultColorSet,dt.defaultColor),Je.colorPanel.onColorChanged=Je.setColor,Je.lineWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.lineWidthPanel.onWidthChanged=Je.setLineWidth,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.drawingImage)},be.prototype.createVisual=function(){this.visual=le.createGroup(),this.drawingImage=le.createImage(),this.visual.appendChild(this.drawingImage);var Ne=le.createTransform();this.visual.transform.baseVal.appendItem(Ne),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Ne,$e){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(Ne.x,Ne.y),this.drawing=!0):Oe.prototype.pointerDown.call(this,Ne,$e)},be.prototype.manipulate=function(Ne){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ne.x,Ne.y),this.canvasContext.stroke()):Oe.prototype.manipulate.call(this,Ne)},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Ne){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Oe.prototype.pointerUp.call(this,Ne)},be.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)},be.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Oe.prototype.select.call(this)},be.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Oe.prototype.deselect.call(this)},be.prototype.finishCreation=function(){for(var Ne=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),$e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],dt=$e[0],Je=$e[1],At=$e[2],tn=$e[3],pn=!1,ln=0;ln<this.canvasElement.height;ln++)for(var gn=0;gn<this.canvasElement.width;gn++)Ne.data[ln*this.canvasElement.width*4+4*gn+3]>0&&(pn=!0,ln<Je&&(Je=ln),gn<dt&&(dt=gn),ln>tn&&(tn=ln),gn>At&&(At=gn));if(pn){this.left=dt/this.pixelRatio,this.top=Je/this.pixelRatio,this.width=(At-dt)/this.pixelRatio,this.height=(tn-Je)/this.pixelRatio;var Hn=document.createElement("canvas");Hn.width=At-dt,Hn.height=tn-Je,Hn.getContext("2d").putImageData(this.canvasContext.getImageData(dt,Je,At-dt,tn-Je),0,0),this.drawingImgUrl=Hn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},be.prototype.setDrawingImage=function(){le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},be.prototype.setColor=function(Ne){this.color=Ne,this.colorChanged(Ne)},be.prototype.setLineWidth=function(Ne){this.lineWidth=Ne},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({drawingImgUrl:this.drawingImgUrl},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.drawingImgUrl=Ne.drawingImgUrl,this.setDrawingImage()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setDrawingImage()},be.typeName="FreehandMarker",be.title="Freehand marker",be.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>',be}(ze),lt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,dt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Je.typeBoxes=[],Je.currentType=$e,Je.setCurrentType=Je.setCurrentType.bind(Je),Je}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");$e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2";for(var dt=function(tn){var pn="both";switch(tn){case 0:pn="both";break;case 1:pn="start";break;case 2:pn="end";break;case 3:pn="none"}var ln=document.createElement("div");if(ln.style.display="flex",ln.style.flexGrow="2",ln.style.alignItems="center",ln.style.justifyContent="space-between",ln.style.padding="5px",ln.style.borderWidth="2px",ln.style.borderStyle="solid",ln.style.borderColor=pn===Je.currentType?Je.uiStyleSettings.toolboxAccentColor:"transparent",ln.addEventListener("click",function(){Ne.setCurrentType(pn,ln)}),$e.appendChild(ln),pn==="both"||pn==="start"){var gn=document.createElement("div");gn.style.display="flex",gn.style.alignItems="center",gn.style.minHeight="20px",gn.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="`+(Je.uiStyleSettings!==void 0?Je.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,gn.style.marginLeft="5px",ln.appendChild(gn)}var Hn=document.createElement("div");Hn.style.display="flex",Hn.style.alignItems="center",Hn.style.minHeight="20px",Hn.style.flexGrow="2";var An=document.createElement("hr");if(An.style.minWidth="20px",An.style.border="0px",An.style.borderTop="3px solid "+(Je.uiStyleSettings!==void 0?Je.uiStyleSettings.toolboxColor:"#eeeeee"),An.style.flexGrow="2",Hn.appendChild(An),ln.appendChild(Hn),pn==="both"||pn==="end"){var qn=document.createElement("div");qn.style.display="flex",qn.style.alignItems="center",qn.style.minHeight="20px",qn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(Je.uiStyleSettings!==void 0?Je.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,qn.style.marginRight="5px",ln.appendChild(qn)}Je.typeBoxes.push(ln)},Je=this,At=0;At<4;At++)dt(At);return $e},be.prototype.setCurrentType=function(Ne,$e){var dt=this;this.currentType=Ne,this.typeBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings!==void 0?dt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},be}(ue),tt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.arrowType="end",Je.arrowBaseHeight=10,Je.arrowBaseWidth=10,Je.getArrowPoints=Je.getArrowPoints.bind(Je),Je.setArrowType=Je.setArrowType.bind(Je),Je.arrowTypePanel=new lt("Arrow type","end"),Je.arrowTypePanel.onArrowTypeChanged=Je.setArrowType,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.arrow1&&Ne!==this.arrow2)},be.prototype.getArrowPoints=function(Ne,$e){var dt=this.arrowBaseWidth+2*this.strokeWidth,Je=this.arrowBaseHeight+2*this.strokeWidth;return Ne-dt/2+","+($e+Je/2)+" "+Ne+","+($e-Je/2)+" "+(Ne+dt/2)+","+($e+Je/2)},be.prototype.createTips=function(){this.arrow1=le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow2)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(Oe.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Ne=0;Math.abs(this.x1-this.x2)>.1&&(Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var $e=this.arrow1.transform.baseVal.getItem(0);$e.setRotate(Ne,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem($e,0);var dt=this.arrow2.transform.baseVal.getItem(0);dt.setRotate(Ne+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(dt,0)}},be.prototype.setArrowType=function(Ne){this.arrowType=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({arrowType:this.arrowType},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.arrowType=$e.arrowType,this.createTips(),this.adjustVisual()},be.typeName="ArrowMarker",be.title="Arrow marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',be}(et),ut=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.fillColor=dt.defaultFillColor,Je.strokeWidth=0,Je.fillPanel=new Se("Color",dt.defaultColorSet,dt.defaultFillColor),Je.fillPanel.onColorChanged=Je.setFillColor,Je}return he(be,Oe),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=be.typeName,Ne},be.typeName="CoverMarker",be.title="Cover marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',be}(Ze),mt=function(Oe){function be(Ne,$e,dt,Je){var At=Oe.call(this,Ne,Je||'<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 At.opacities=[],At.opacityBoxes=[],At.opacities=$e,At.currentOpacity=dt,At.setCurrentOpacity=At.setCurrentOpacity.bind(At),At}return he(be,Oe),be.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2",$e.style.justifyContent="space-between",this.opacities.forEach(function(dt){var Je=document.createElement("div");Je.style.display="flex",Je.style.alignItems="center",Je.style.justifyContent="center",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.borderColor=dt===Ne.currentOpacity?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Ne.setCurrentOpacity(dt,Je)}),$e.appendChild(Je);var At=document.createElement("div");At.innerText=100*dt+"%",Je.appendChild(At),Ne.opacityBoxes.push(Je)}),$e},be.prototype.setCurrentOpacity=function(Ne,$e){var dt=this;this.currentOpacity=Ne,this.opacityBoxes.forEach(function(Je){Je.style.borderColor=Je===$e?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},be}(ue),Pt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.setOpacity=Je.setOpacity.bind(Je),Je.fillColor=dt.defaultHighlightColor,Je.strokeWidth=0,Je.opacity=dt.defaultHighlightOpacity,Je.fillPanel=new Se("Color",dt.defaultColorSet,Je.fillColor),Je.fillPanel.onColorChanged=Je.setFillColor,Je.opacityPanel=new mt("Opacity",dt.defaultOpacitySteps,Je.opacity),Je.opacityPanel.onOpacityChanged=Je.setOpacity,Je}return he(be,Oe),be.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=be.typeName,Ne},be.typeName="HighlightMarker",be.title="Highlight marker",be.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>',be}(ut),gt='<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>',Ft='<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>',Ht=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.bgColor="transparent",Je.tipPosition={x:0,y:0},Je.tipBase1Position={x:0,y:0},Je.tipBase2Position={x:0,y:0},Je.tipMoving=!1,Je.color=dt.defaultStrokeColor,Je.bgColor=dt.defaultFillColor,Je.fontFamily=dt.defaultFontFamily,Je.defaultSize={x:100,y:30},Je.setBgColor=Je.setBgColor.bind(Je),Je.getTipPoints=Je.getTipPoints.bind(Je),Je.positionTip=Je.positionTip.bind(Je),Je.setTipPoints=Je.setTipPoints.bind(Je),Je.colorPanel=new Se("Text color",dt.defaultColorSet,Je.color,gt),Je.colorPanel.onColorChanged=Je.setColor,Je.bgColorPanel=new Se("Fill color",dt.defaultColorSet,Je.bgColor,Ft),Je.bgColorPanel.onColorChanged=Je.setBgColor,Je.fontFamilyPanel=new yt("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Je.fontFamilyPanel.onFontChanged=Je.setFont,Je.tipGrip=new Ae,Je.tipGrip.visual.transform.baseVal.appendItem(le.createTransform()),Je.controlBox.appendChild(Je.tipGrip.visual),Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return Oe.prototype.ownsTarget.call(this,Ne)||this.tipGrip.ownsTarget(Ne)||this.tip===Ne},be.prototype.createTip=function(){le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},be.prototype.pointerDown=function(Ne,$e){this.state==="new"&&Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget($e)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Oe.prototype.pointerDown.call(this,Ne,$e)},be.prototype.pointerUp=function(Ne){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Oe.prototype.pointerUp.call(this,Ne);else{var $e=this.state==="creating";Oe.prototype.pointerUp.call(this,Ne),this.setTipPoints($e),this.positionTip()}},be.prototype.manipulate=function(Ne){if(this.tipMoving){var $e=this.unrotatePoint(Ne);this.tipPosition={x:$e.x-this.manipulationStartLeft,y:$e.y-this.manipulationStartTop},this.positionTip()}else Oe.prototype.manipulate.call(this,Ne)},be.prototype.setBgColor=function(Ne){this.bgRectangle&&this.tip&&(le.setAttributes(this.bgRectangle,[["fill",Ne]]),le.setAttributes(this.tip,[["fill",Ne]])),this.bgColor=Ne,this.fillColorChanged(Ne)},be.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},be.prototype.setTipPoints=function(Ne){Ne===void 0&&(Ne=!1);var $e=Math.min(this.height/2,15),dt=this.height/5;Ne&&(this.tipPosition={x:$e+dt/2,y:this.height+20});var Je=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Je<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:$e,y:0},this.tipBase2Position={x:$e+dt,y:0}):(this.tipBase1Position={x:0,y:$e},this.tipBase2Position={x:0,y:$e+dt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Je<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(dt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$e-dt,y:0},this.tipBase2Position={x:this.width-$e,y:0}):(this.tipBase1Position={x:this.width,y:$e},this.tipBase2Position={x:this.width,y:$e+dt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Je<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(dt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$e-dt,y:this.height},this.tipBase2Position={x:this.width-$e,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-$e-dt},this.tipBase2Position={x:this.width,y:this.height-$e}):Je<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:$e,y:this.height},this.tipBase2Position={x:$e+dt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-$e},this.tipBase2Position={x:0,y:this.height-$e-dt})},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.positionTip()},be.prototype.positionTip=function(){le.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Ne=this.tipGrip.visual.transform.baseVal.getItem(0);Ne.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Ne,0)},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.select=function(){this.positionTip(),Oe.prototype.select.call(this)},be.prototype.getState=function(){var Ne=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){var $e=Ne;this.bgColor=$e.bgColor,this.tipPosition=$e.tipPosition,Oe.prototype.restoreState.call(this,Ne),this.createTip(),this.setTipPoints()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.tipPosition={x:this.tipPosition.x*Ne,y:this.tipPosition.y*$e},this.positionTip()},be.typeName="CalloutMarker",be.title="Callout marker",be.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>',be}(st),hn=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.fillColor="transparent",Je.strokeColor="transparent",Je.strokeWidth=0,Je.strokeDasharray="",Je.opacity=1,Je.strokeColor=dt.defaultColor,Je.strokeWidth=dt.defaultStrokeWidth,Je.strokeDasharray=dt.defaultStrokeDasharray,Je.fillColor=dt.defaultFillColor,Je.setStrokeColor=Je.setStrokeColor.bind(Je),Je.setFillColor=Je.setFillColor.bind(Je),Je.setStrokeWidth=Je.setStrokeWidth.bind(Je),Je.setStrokeDasharray=Je.setStrokeDasharray.bind(Je),Je.setOpacity=Je.setOpacity.bind(Je),Je.createVisual=Je.createVisual.bind(Je),Je.strokePanel=new Se("Line color",ge(dt.defaultColorSet,["transparent"]),dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.fillPanel=new Se("Fill color",ge(dt.defaultColorSet,["transparent"]),Je.fillColor,Ft),Je.fillPanel.onColorChanged=Je.setFillColor,Je.strokeWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.strokeWidthPanel.onWidthChanged=Je.setStrokeWidth,Je.strokeStylePanel=new Ge("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Je.strokeStylePanel.onStyleChanged=Je.setStrokeDasharray,Je.opacityPanel=new mt("Opacity",dt.defaultOpacitySteps,Je.opacity),Je.opacityPanel.onOpacityChanged=Je.setOpacity,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},be.prototype.createVisual=function(){this.visual=le.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},be.prototype.manipulate=function(Ne){Oe.prototype.manipulate.call(this,Ne)},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.setSize()},be.prototype.setSize=function(){Oe.prototype.setSize.call(this),le.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},be.prototype.pointerUp=function(Ne){Oe.prototype.pointerUp.call(this,Ne),this.setSize()},be.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},be.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},be.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){var $e=Ne;this.fillColor=$e.fillColor,this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.opacity=$e.opacity,this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.setSize()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize()},be.typeName="EllipseMarker",be.title="Ellipse marker",be.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>',be}(ze),Qt=function(Oe){function be(Ne,$e,dt){return Oe.call(this,Ne,$e,dt)||this}return he(be,Oe),Object.defineProperty(be.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.tip1&&Ne!==this.tip2)},be.prototype.createTips=function(){this.tip1=le.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=le.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.tip2)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(Oe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(le.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),$e=this.tip1.transform.baseVal.getItem(0);$e.setRotate(Ne,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem($e,0);var dt=this.tip2.transform.baseVal.getItem(0);dt.setRotate(Ne+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(dt,0)}},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne),this.createTips(),this.adjustVisual()},be.typeName="MeasurementMarker",be.title="Measurement marker",be.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>',be}(et),bn=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.strokePanel.colors=dt.defaultColorSet,Je.fillColor="transparent",Je}return he(be,Oe),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Oe.prototype.getState.call(this);return Ne.typeName=be.typeName,Ne},be.typeName="EllipseFrameMarker",be.title="Ellipse frame marker",be.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>',be}(hn),Wt=function(){function Oe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Oe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Oe.prototype.addUndoStep=function(be){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(be)||(this.undoStack.push(be),JSON.stringify(this.lastRedoStep)!==JSON.stringify(be)&&this.redoStack.splice(0,this.redoStack.length))},Oe.prototype.replaceLastUndoStep=function(be){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=be)},Oe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Oe.prototype.undo=function(){if(this.undoStack.length>1){var be=this.undoStack.pop();return be!==void 0&&this.redoStack.push(be),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Oe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Oe}(),Kt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.strokeColor="transparent",Je.strokeWidth=0,Je.strokeDasharray="",Je.curveX=0,Je.curveY=0,Je.manipulationStartCurveX=0,Je.manipulationStartCurveY=0,Je.setStrokeColor=Je.setStrokeColor.bind(Je),Je.setStrokeWidth=Je.setStrokeWidth.bind(Je),Je.setStrokeDasharray=Je.setStrokeDasharray.bind(Je),Je.positionGrips=Je.positionGrips.bind(Je),Je.addControlGrips=Je.addControlGrips.bind(Je),Je.adjustVisual=Je.adjustVisual.bind(Je),Je.setupControlBox=Je.setupControlBox.bind(Je),Je.resize=Je.resize.bind(Je),Je.strokeColor=dt.defaultColor,Je.strokeWidth=dt.defaultStrokeWidth,Je.strokeDasharray=dt.defaultStrokeDasharray,Je.strokePanel=new Se("Line color",dt.defaultColorSet,dt.defaultColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.strokeWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.strokeWidthPanel.onWidthChanged=Je.setStrokeWidth,Je.strokeStylePanel=new Ge("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Je.strokeStylePanel.onStyleChanged=Je.setStrokeDasharray,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorCurve&&Ne!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ne))},be.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},be.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorCurve=le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=le.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ne.x,this.curveY=Ne.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget($e)&&(this.activeGrip=this.curveGrip,this._state="resize")},be.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setupControlBox=function(){Oe.prototype.setupControlBox.call(this),this.curveControlLine1=le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=le.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},be.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Oe.prototype.addControlGrips.call(this)},be.prototype.positionGrips=function(){Oe.prototype.positionGrips.call(this);var Ne=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ne/2,this.curveY-Ne/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()))},be.prototype.manipulate=function(Ne){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ne.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ne.y-this.manipulationStartY),Oe.prototype.manipulate.call(this,Ne)},be.prototype.resize=function(Ne){this.activeGrip===this.curveGrip&&(this.curveX=Ne.x,this.curveY=Ne.y),Oe.prototype.resize.call(this,Ne),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},be.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},be.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual()},be.prototype.scale=function(Ne,$e){this.curveX=this.curveX*Ne,this.curveY=this.curveY*$e,Oe.prototype.scale.call(this,Ne,$e)},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Oe.prototype.getState.call(this));return Ne.typeName=be.typeName,Ne},be.prototype.restoreState=function(Ne){Oe.prototype.restoreState.call(this,Ne);var $e=Ne;this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.curveX=$e.curveX,this.curveY=$e.curveY,this.createVisual(),this.adjustVisual()},be.typeName="CurveMarker",be.title="Curve marker",be.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>',be}(Ct),Jt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,$e,dt)||this;return Je.fillColor="transparent",Je.strokeColor="transparent",Je.strokeWidth=0,Je.strokeDasharray="",Je.textColor="transparent",Je.fontSize="1rem",Je.isMoved=!1,Je.captionText="Caption",Je.PADDING=5,Je.captionBoxWidth=0,Je.captionBoxHeight=0,Je.strokeColor=dt.defaultColor,Je.strokeWidth=dt.defaultStrokeWidth,Je.strokeDasharray=dt.defaultStrokeDasharray,Je.fillColor=dt.defaultFillColor,Je.textColor=dt.defaultStrokeColor,Je.fontFamily=dt.defaultFontFamily,Je.fontSize=dt.defaultCaptionFontSize,Je.captionText=dt.defaultCaptionText,Je.setStrokeColor=Je.setStrokeColor.bind(Je),Je.setFillColor=Je.setFillColor.bind(Je),Je.setStrokeWidth=Je.setStrokeWidth.bind(Je),Je.setStrokeDasharray=Je.setStrokeDasharray.bind(Je),Je.createVisual=Je.createVisual.bind(Je),Je.sizeCaption=Je.sizeCaption.bind(Je),Je.setCaptionText=Je.setCaptionText.bind(Je),Je.showTextEditor=Je.showTextEditor.bind(Je),Je.positionTextEditor=Je.positionTextEditor.bind(Je),Je.finishTextEditing=Je.finishTextEditing.bind(Je),Je.setFont=Je.setFont.bind(Je),Je.setTextColor=Je.setTextColor.bind(Je),Je.strokePanel=new Se("Line color",ge(dt.defaultColorSet,["transparent"]),Je.strokeColor),Je.strokePanel.onColorChanged=Je.setStrokeColor,Je.fillPanel=new Se("Fill color",ge(dt.defaultColorSet,["transparent"]),Je.fillColor,Ft),Je.fillPanel.onColorChanged=Je.setFillColor,Je.strokeWidthPanel=new Xe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),Je.strokeWidthPanel.onWidthChanged=Je.setStrokeWidth,Je.strokeStylePanel=new Ge("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),Je.strokeStylePanel.onStyleChanged=Je.setStrokeDasharray,Je.fontFamilyPanel=new yt("Font",dt.defaultFontFamilies,dt.defaultFontFamily),Je.fontFamilyPanel.onFontChanged=Je.setFont,Je.textColorPanel=new Se("Text color",dt.defaultColorSet,Je.textColor,gt),Je.textColorPanel.onColorChanged=Je.setTextColor,Je}return he(be,Oe),be.prototype.ownsTarget=function(Ne){return!(!Oe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.frame&&Ne!==this.captionBg&&Ne!==this.captionElement)},be.prototype.createVisual=function(){this.visual=le.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=le.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=le.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=le.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},be.prototype.setCaptionText=function(Ne){this.captionText=Ne,this.captionElement.textContent=this.captionText,this.sizeCaption()},be.prototype.pointerDown=function(Ne,$e){Oe.prototype.pointerDown.call(this,Ne,$e),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},be.prototype.manipulate=function(Ne){Oe.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},be.prototype.resize=function(Ne){Oe.prototype.resize.call(this,Ne),this.setSize()},be.prototype.sizeCaption=function(){var Ne=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ne.width+2*this.PADDING,this.captionBoxHeight=Ne.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),le.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),le.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},be.prototype.showTextEditor=function(){var Ne=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($e){$e.stopPropagation()}),this.textEditBox.addEventListener("keypress",function($e){$e.key==="Enter"&&Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function($e){$e.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},be.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"))},be.prototype.finishTextEditing=function(Ne){this.setCaptionText(Ne.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},be.prototype.setFont=function(Ne){this.captionElement&&le.setAttributes(this.captionElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},be.prototype.setTextColor=function(Ne){this.captionElement&&le.setAttributes(this.captionElement,[["fill",Ne]]),this.textColor=Ne,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},be.prototype.setSize=function(){Oe.prototype.setSize.call(this),le.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},be.prototype.pointerUp=function(Ne){Oe.prototype.pointerUp.call(this,Ne),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},be.prototype.dblClick=function(Ne,$e){Oe.prototype.dblClick.call(this,Ne,$e),this.showTextEditor()},be.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.frame&&le.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},be.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.captionBg&&le.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},be.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.frame&&le.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.frame&&le.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ne=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Oe.prototype.getState.call(this));return Ne.typeName=this.typeName,Ne},be.prototype.restoreState=function(Ne){var $e=Ne;this.fillColor=$e.fillColor,this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.textColor=$e.textColor,this.fontFamily=$e.fontFamily,this.captionText=$e.captionText,this.fontSize=$e.fontSize,this.createVisual(),Oe.prototype.restoreState.call(this,Ne),this.setSize()},be.prototype.scale=function(Ne,$e){Oe.prototype.scale.call(this,Ne,$e),this.setSize()},be.typeName="CaptionFrameMarker",be.title="Caption frame marker",be.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>',be}(ze),Yt=function(){function Oe(be,Ne){Ne===void 0&&(Ne=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=be,this.cancelable=Ne}return Object.defineProperty(Oe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Oe.prototype.preventDefault=function(){this._defaultPrevented=!0},Oe}(),kt=function(Oe){function be(Ne,$e,dt){var Je=Oe.call(this,Ne,!1)||this;return Je.dataUrl=$e,Je.state=dt,Je}return he(be,Oe),be}(Yt),pt=function(Oe){function be(Ne,$e,dt){dt===void 0&&(dt=!1);var Je=Oe.call(this,Ne,dt)||this;return Je.marker=$e,Je}return he(be,Oe),be}(Yt),Bt=function(){function Oe(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Oe.prototype.addEventListener=function(be,Ne){this[be].push(Ne)},Oe.prototype.removeEventListener=function(be,Ne){var $e=this[be].indexOf(Ne);$e>-1&&this[be].splice($e,1)},Oe}(),xt=function(){function Oe(be){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new at,this._isOpen=!1,this.undoRedoManager=new Wt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Bt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Oe.instanceCounter++,this.styles=new z(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=be,this.targetRoot=document.body,this.width=be.clientWidth,this.height=be.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Oe.prototype,"ALL_MARKER_TYPES",{get:function(){return[ft,zt,tt,st,bn,hn,Pt,Ht,Qt,ut,et,Kt,Jt]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ft,zt,tt,st,hn,Pt,Ht]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ft,zt,tt,st,Pt]},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(be){var Ne=this;this._availableMarkerTypes.splice(0),be.forEach(function($e){if(typeof $e=="string"){var dt=Ne.ALL_MARKER_TYPES.find(function(Je){return Je.typeName===$e});dt!==void 0&&Ne._availableMarkerTypes.push(dt)}else Ne._availableMarkerTypes.push($e)})},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(be){this._zoomLevel=be,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Oe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ve.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Oe.prototype.show=function(){var be=this;this.styles.styleSheetRoot===void 0&&ce.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ce.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ne){return Ne(new Yt(be))})},Oe.prototype.render=function(){return ye(this,void 0,void 0,function(){var be;return xe(this,function(Ne){switch(Ne.label){case 0:return this.setCurrentMarker(),(be=new de).naturalSize=this.renderAtNaturalSize,be.imageType=this.renderImageType,be.imageQuality=this.renderImageQuality,be.markersOnly=this.renderMarkersOnly,be.width=this.renderWidth,be.height=this.renderHeight,[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ne.sent(),[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ne.sent()]}})})},Oe.prototype.close=function(be){var Ne=this;if(be===void 0&&(be=!1),this.isOpen){var $e=!1;be||this.eventListeners.beforeclose.forEach(function(dt){var Je=new Yt(Ne,!0);dt(Je),Je.defaultPrevented&&($e=!0)}),$e||(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(dt){return dt(new Yt(Ne))}),this.detachEvents(),this._isOpen=!1)}},Oe.prototype.addMarkersToToolbar=function(){for(var be,Ne=[],$e=0;$e<arguments.length;$e++)Ne[$e]=arguments[$e];(be=this._availableMarkerTypes).push.apply(be,Ne)},Oe.prototype.addRenderEventListener=function(be){this.addEventListener("render",function(Ne){be(Ne.dataUrl,Ne.state)})},Oe.prototype.removeRenderEventListener=function(be){},Oe.prototype.addCloseEventListener=function(be){this.addEventListener("close",function(){be()})},Oe.prototype.removeCloseEventListener=function(be){},Oe.prototype.setupResizeObserver=function(){var be=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){be.resize(be.target.clientWidth,be.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return be.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Oe.prototype.onPopupTargetResize=function(){var be=1*this.target.clientWidth/this.target.clientHeight,Ne=this.editorCanvas.clientWidth/be>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*be:this.editorCanvas.clientWidth,$e=Ne<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/be;this.resize(Ne,$e)},Oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Oe.prototype.resize=function(be,Ne){this._isResizing=!0;var $e=be/this.imageWidth,dt=Ne/this.imageHeight;this.imageWidth=Math.round(be),this.imageHeight=Math.round(Ne),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($e,dt),this._isResizing=!1},Oe.prototype.scaleMarkers=function(be,Ne){var $e,dt=this;this._currentMarker&&this._currentMarker instanceof st?this._currentMarker.scale(be,Ne):($e=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Je){Je!==dt._currentMarker&&Je.scale(be,Ne)}),$e!==void 0&&this.setCurrentMarker($e)},Oe.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Oe.prototype.setTopLeft=function(){var be=this.editingTarget.getBoundingClientRect(),Ne=this.editorCanvas.getBoundingClientRect();this.left=be.left-Ne.left,this.top=be.top-Ne.top},Oe.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Oe.prototype.addDefs=function(){for(var be,Ne=[],$e=0;$e<arguments.length;$e++)Ne[$e]=arguments[$e];this.defs=le.createDefs(),this.addDefsToImage(),(be=this.defs).append.apply(be,Ne)},Oe.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Oe.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Oe.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Oe.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Oe.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Oe.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Oe.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Oe.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var be=document.createElement("a");be.href="https://markerjs.com/",be.target="_blank",be.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>',be.title="Powered by marker.js",be.style.display="grid",be.style.alignItems="center",be.style.justifyItems="center",be.style.padding="3px",be.style.width="20px",be.style.height="20px",this.logoUI.appendChild(be),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Oe.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Oe.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Oe.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var be=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=be+"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 ie(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 se(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Oe.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Oe.prototype.removeMarker=function(be){this.markerImage.removeChild(be.container),this.markers.indexOf(be)>-1&&this.markers.splice(this.markers.indexOf(be),1),be.dispose()},Oe.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Oe.prototype.toolbarButtonClicked=function(be,Ne){if(be==="marker"&&Ne!==void 0)this.createNewMarker(Ne);else if(be==="action")switch(Ne){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Oe.prototype.deleteSelectedMarker=function(){var be=this;if(this._currentMarker!==void 0){var Ne=!1;if(this.eventListeners.markerbeforedelete.forEach(function(dt){var Je=new pt(be,be._currentMarker,!0);dt(Je),Je.defaultPrevented&&(Ne=!0)}),!Ne){var $e=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(dt){return dt(new pt(be,$e))})}}},Oe.prototype.clear=function(){var be=this,Ne=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(At){var tn=new pt(be,void 0,!0);At(tn),tn.defaultPrevented&&(Ne=!0)}),!Ne)){this.setCurrentMarker();for(var $e=function(At){var tn=dt.markers[At];dt.setCurrentMarker(dt.markers[At]),dt._currentMarker.dispose(),dt.markerImage.removeChild(dt._currentMarker.container),dt.markers.splice(dt.markers.indexOf(dt._currentMarker),1),dt.eventListeners.markerdelete.forEach(function(pn){return pn(new pt(be,tn))})},dt=this,Je=this.markers.length-1;Je>=0;Je--)$e(Je);this.addUndoStep()}},Object.defineProperty(Oe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Oe.prototype.showNotesEditor=function(){var be;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=(be=this._currentMarker.notes)!==null&&be!==void 0?be:"",this.overlayContainer.appendChild(this.notesArea))},Oe.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Oe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Oe.prototype.addUndoStep=function(){var be=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ne=this.getState(),$e=this.undoRedoManager.getLastUndoStep();if(!$e||$e.width===Ne.width&&$e.height===Ne.height){var dt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ne),dt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Je){return Je(new Yt(be))})}else this.undoRedoManager.replaceLastUndoStep(Ne),this.eventListeners.statechange.forEach(function(Je){return Je(new Yt(be))})}},Oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Oe.prototype.undoStep=function(){var be=this,Ne=this.undoRedoManager.undo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($e){return $e(new Yt(be))}))},Oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Oe.prototype.redoStep=function(){var be=this,Ne=this.undoRedoManager.redo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($e){return $e(new Yt(be))}))},Oe.prototype.stepZoom=function(){var be=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=be<this.zoomSteps.length-1?this.zoomSteps[be+1]:this.zoomSteps[0]},Oe.prototype.panTo=function(be){this.contentDiv.scrollBy({left:this.prevPanPoint.x-be.x,top:this.prevPanPoint.y-be.y}),this.prevPanPoint=be},Oe.prototype.startRenderAndClose=function(){return ye(this,void 0,void 0,function(){var be,Ne,$e=this;return xe(this,function(dt){switch(dt.label){case 0:return[4,this.render()];case 1:return be=dt.sent(),Ne=this.getState(),this.eventListeners.render.forEach(function(Je){return Je(new kt($e,be,Ne))}),this.close(!0),[2]}})})},Oe.prototype.getState=function(be){be===!0&&this.setCurrentMarker();var Ne={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function($e){return Ne.markers.push($e.getState())}),Ne},Oe.prototype.restoreState=function(be){var Ne=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);be.markers.forEach(function($e){var dt=Ne._availableMarkerTypes.find(function(At){return At.typeName===$e.typeName});if(dt!==void 0){var Je=Ne.addNewMarker(dt);Je.restoreState($e),Ne.markers.push(Je)}}),be.width&&be.height&&(be.width!==this.imageWidth||be.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/be.width,this.imageHeight/be.height),this.eventListeners.restorestate.forEach(function($e){return $e(new Yt(Ne))})},Oe.prototype.addNewMarker=function(be){var Ne=le.createGroup();return this.markerImage.appendChild(Ne),new be(Ne,this.overlayContainer,this.settings)},Oe.prototype.createNewMarker=function(be){var Ne,$e=this;(Ne=typeof be=="string"?this._availableMarkerTypes.find(function(dt){return dt.typeName===be}):be)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Ne),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(Ne.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(dt){return dt(new pt($e,$e._currentMarker))}))},Oe.prototype.markerCreated=function(be){var Ne=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(be),this.setCurrentMarker(be),be instanceof zt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(zt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function($e){return $e(new pt(Ne,Ne._currentMarker))})},Oe.prototype.colorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=be,this.settings.defaultStrokeColor=be)},Oe.prototype.fillColorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=be)},Oe.prototype.markerStateChanged=function(be){var Ne=this;this.eventListeners.markerchange.forEach(function($e){return $e(new pt(Ne,be))})},Oe.prototype.setCurrentMarker=function(be){var Ne=this;this._currentMarker!==be&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function($e){return $e(new pt(Ne,Ne._currentMarker))})),this._currentMarker=be,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($e){return $e(new pt(Ne,Ne._currentMarker))}))},Oe.prototype.onPointerDown=function(be){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||be.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Ne=this.markers.find(function($e){return $e.ownsTarget(be.target)});Ne!==void 0?(this.setCurrentMarker(Ne),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:be.clientX,y:be.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY))},Oe.prototype.onDblClick=function(be){if(this._isFocused||this.focus(),this.mode==="select"){var Ne=this.markers.find(function($e){return $e.ownsTarget(be.target)});Ne!==void 0&&Ne!==this._currentMarker&&this.setCurrentMarker(Ne),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target):this.setCurrentMarker()}},Oe.prototype.onPointerMove=function(be){this.touchPoints!==1&&be.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||be.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(be.clientX,be.clientY)):this.zoomLevel>1&&this.panTo({x:be.clientX,y:be.clientY}))},Oe.prototype.onPointerUp=function(be){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(be.clientX,be.clientY)),this.isDragging=!1,this.addUndoStep()},Oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Oe.prototype.onKeyUp=function(be){this._currentMarker===void 0||this.notesArea!==void 0||be.key!=="Delete"&&be.key!=="Backspace"||this.deleteSelectedMarker()},Oe.prototype.clientToLocalCoordinates=function(be,Ne){var $e=this.markerImage.getBoundingClientRect();return{x:(be-$e.left)/this.zoomLevel,y:(Ne-$e.top)/this.zoomLevel}},Oe.prototype.onWindowResize=function(){this.positionUI()},Oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var be=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=be+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Oe.prototype.addLicenseKey=function(be){ve.addKey(be)},Oe.prototype.addEventListener=function(be,Ne){this.eventListeners.addEventListener(be,Ne)},Oe.prototype.removeEventListener=function(be,Ne){this.eventListeners.removeEventListener(be,Ne)},Oe.prototype.renderState=function(be){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(be),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Oe.prototype.focus=function(){var be=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Ne){return Ne(new Yt(be))}))},Oe.prototype.blur=function(){var be=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ne){return Ne(new Yt(be))}))},Oe.instanceCounter=0,Oe}(),vt=Ee(99064),nt=Ee(955),He=(Oe,be,Ne)=>new Promise(($e,dt)=>{var Je=pn=>{try{tn(Ne.next(pn))}catch(ln){dt(ln)}},At=pn=>{try{tn(Ne.throw(pn))}catch(ln){dt(ln)}},tn=pn=>pn.done?$e(pn.value):Promise.resolve(pn.value).then(Je,At);tn((Ne=Ne.apply(Oe,be)).next())}),We=({data:Oe,className:be,fullWidth:Ne,style:$e={},onClose:dt,onOk:Je,showFullTools:At,noAssociationId:tn})=>{const pn=(0,Me.useRef)(null),ln=(0,Me.useRef)(null),gn=(0,Me.useRef)(null),Hn=(0,Me.useRef)(null),[An,qn]=(0,Me.useState)(!1),[ai,Ti]=(0,Me.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Me.useEffect)(()=>(gn.current||(gn.current=document.createElement("style"),document.head.appendChild(gn.current)),Oe!=null&&Oe.visible?(document.body.setAttribute("data-custom","y-hidden"),gn.current.innerHTML=" html { overflow-y: hidden; }",Oe!=null&&Oe.src&&Ci()):(document.body.removeAttribute("data-custom"),gn.current&&(document.head.removeChild(gn.current),gn.current=null)),()=>{document.body.removeAttribute("data-custom"),gn.current&&(document.head.removeChild(gn.current),gn.current=null)}),[Oe==null?void 0:Oe.visible]);const Ci=()=>He(void 0,null,function*(){qn(!0),Ti("\u6B63\u5728\u52A0\u8F7D\u4E2D");const qi=yield(0,nt.ZJ)(Oe==null?void 0:Oe.src);pn.current.src="",pn.current.src=qi,pn.current.onload=function(){lr()},qn(!1),Ti("")}),$i=qi=>He(void 0,null,function*(){qn(!0),Ti("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Fr=yield(0,vt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Oe.title,file:qi.dataUrl}});Fr!=null&&Fr.id&&!tn?(yield(0,vt.ZP)(`/api/attachments/${Oe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Fr==null?void 0:Fr.id,settings:JSON.stringify(qi.state)}})).status===0&&Je():Fr!=null&&Fr.id&&Je(Fr),qn(!1),Ti("")}),or=()=>{const qi=document.querySelector('a[href="https://markerjs.com/"]');qi&&qi.parentNode&&(qi.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(Mr=>{const yi=document.querySelector(Mr.name);yi&&yi.setAttribute("title",Mr.title)})},lr=()=>{ln.current=new xt(pn.current),ln.current.targetRoot=Hn.current,ln.current.addEventListener("render",$i),ln.current.addEventListener("beforeclose",dt),At&&(ln.current.availableMarkerTypes=ln.current.ALL_MARKER_TYPES,ln.current.uiStyleSettings.redoButtonVisible=!0,ln.current.uiStyleSettings.notesButtonVisible=!0,ln.current.uiStyleSettings.zoomButtonVisible=!0,ln.current.uiStyleSettings.zoomOutButtonVisible=!0,ln.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ln.current.uiStyleSettings,ln.current.show(),Oe!=null&&Oe.snapshotData&&ln.current.restoreState(Oe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),or()},300)};return Me.createElement(Me.Fragment,null,(Oe==null?void 0:Oe.visible)&&Me.createElement(Ce.Z,{spinning:An,tip:ai,style:{position:"absolute",width:"100vw"}},Me.createElement("div",{ref:Hn,className:ke()(me.imageDimensions,be,Ne?me.fullWidth:""),style:$e},Me.createElement("img",{className:me.img,ref:pn}))))}},41588:function(_n,en,Ee){"use strict";var Me=Ee(59301),me=Ee(95237),Be=Ee(43604),ke=Ee(99313),Ce=Ee(3113),Le=Ee(85149),he=Ee(88010),ye=Ee(48136),xe=Ee(59301);const ge=(0,Me.forwardRef)(({callback:le,showSaveButton:ve,value:de=""},ce)=>{const z=(0,Me.useRef)(),ee=[{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 "}]}]}],oe=[{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}`}]}]}],ie=Se=>{z.current.setValue(z.current.getValue()+" "+Se.value+" ")},se=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:xe.createElement(me.Z,{className:he.Z.lists,gutter:[10,10]},ee.map((Se,we)=>xe.createElement(Be.Z,{flex:"110px",className:he.Z.item},xe.createElement("div",null,xe.createElement(Le.Z,{value:`$$${Se.value}$$`}),Se.name),xe.createElement("div",{className:he.Z.children},Se.children.map((Pe,Ae)=>xe.createElement("div",{key:Ae},xe.createElement("h1",null,Pe.name),xe.createElement(me.Z,{gutter:[10,10]},Pe.data.map((De,ze)=>xe.createElement(Be.Z,{key:ze,onClick:()=>ie(De),className:he.Z.diamond},xe.createElement(Le.Z,{value:"`$$"+De.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:xe.createElement(me.Z,{className:he.Z.lists,gutter:[10,10]},oe.map((Se,we)=>xe.createElement(Be.Z,{flex:"110px",className:he.Z.item},xe.createElement("div",null,xe.createElement(Le.Z,{value:"`$$"+Se.value+"$$`"}),Se.name),xe.createElement("div",{className:he.Z.children},Se.children.map((Pe,Ae)=>xe.createElement("div",{key:Ae},Pe.name&&xe.createElement("h1",null,Pe.name),xe.createElement(me.Z,{gutter:[10,10]},Pe.data.map((De,ze)=>xe.createElement(Be.Z,{key:ze,onClick:()=>ie(De),className:he.Z.diamond},xe.createElement(Le.Z,{value:"`$$"+De.value+"$$`"}))))))))))}],ue=()=>{var Se=document.createElement("div");Se.innerHTML=z.current.getValue();var we=Se.innerText;return le&&le(we),we};return(0,Me.useImperativeHandle)(ce,()=>({getData:ue})),xe.createElement("div",{className:he.Z.mathWrap},xe.createElement(ke.default,{defaultActiveKey:"1",items:se}),xe.createElement("math-field",{locale:"zh_cn",className:he.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},de||""),ve&&xe.createElement("div",{className:he.Z.button},xe.createElement(Ce.ZP,{size:"large",onClick:ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});en.Z=ge},8797:function(_n,en,Ee){"use strict";var Me=Ee(59301),me=Ee(93314),Be=Ee(3113),ke=Object.defineProperty,Ce=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,ge=(ce,z,ee)=>z in ce?ke(ce,z,{enumerable:!0,configurable:!0,writable:!0,value:ee}):ce[z]=ee,le=(ce,z)=>{for(var ee in z||(z={}))ye.call(z,ee)&&ge(ce,ee,z[ee]);if(he)for(var ee of he(z))xe.call(z,ee)&&ge(ce,ee,z[ee]);return ce},ve=(ce,z)=>Ce(ce,Le(z));const de=({img:ce,buttonProps:z={},styles:ee={},customText:oe,ButtonText:ie,ButtonClick:se,Buttonclass:ue,ButtonTwo:Se,imgStyles:we,loading:Pe=!1,className:Ae=""})=>Me.createElement("section",{className:`tc animated fadeIn ${Ae}`,style:le({color:"#999",margin:"100px auto",visibility:Pe?"hidden":"visible"},ee)},Me.createElement("img",{src:ce||me,style:ve(le({},we),{pointerEvents:"none",userSelect:"none"})}),Me.createElement("p",{className:"mt20 font14"},oe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&Me.createElement(Be.ZP,le({className:ue,onClick:se},z),ie),Se&&Se);en.Z=de},23210:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ue}});var Me=Ee(59301),me={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Be=Ee(3113),ke=Ee(70557),Ce=Ee(23954),Le=Ee(6848),he=Ee(955),ye=Ee(94941),xe=Ee(8797),ge=Ee(3294),le=Ee(19381),ve=Ee(59301),de=Object.defineProperty,ce=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(Se,we,Pe)=>we in Se?de(Se,we,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Se[we]=Pe,ie=(Se,we)=>{for(var Pe in we||(we={}))z.call(we,Pe)&&oe(Se,Pe,we[Pe]);if(ce)for(var Pe of ce(we))ee.call(we,Pe)&&oe(Se,Pe,we[Pe]);return Se},se=(Se,we,Pe)=>new Promise((Ae,De)=>{var ze=Ge=>{try{Xe(Pe.next(Ge))}catch(ft){De(ft)}},Ze=Ge=>{try{Xe(Pe.throw(Ge))}catch(ft){De(ft)}},Xe=Ge=>Ge.done?Ae(Ge.value):Promise.resolve(Ge.value).then(ze,Ze);Xe((Pe=Pe.apply(Se,we)).next())}),ue=({editOffice:Se="view",data:we,theme:Pe,type:Ae,filename:De,monacoEditor:ze,className:Ze,style:Xe,close:Ge,onClose:ft,hasMask:at,disabledDownload:Ct,onImgDimensions:et,showNodata:yt,recordInfo:st})=>{const[zt,lt]=(0,Me.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[tt,ut]=(0,Me.useState)(""),[mt,Pt]=(0,Me.useState)(),gt=window.ENV==="build"?"/react/build":"",Ft=location.host.startsWith("localhost")?ge.Z.PROXY_SERVER:ge.Z.API_SERVER,hn=10*(1024*1024),Qt=(0,Me.useRef)();we!=null&&we.startsWith("/api")&&Ae!=="txt"&&(we=ge.Z.API_SERVER+we);const bn=Yt=>Yt.substring(Yt.lastIndexOf("/")+1).split(".").pop();De&&ze&&(ze.filename=De),(0,Me.useEffect)(()=>{var Yt,kt;const pt=(kt=(Yt=document.cookie)==null?void 0:Yt.replace(/\s/g,""))==null?void 0:kt.split(";");pt==null||pt.map(Bt=>{let xt=Bt.split("=");xt[0]==="_educoder_session"&&ut(xt[1])})},[]),(0,Me.useEffect)(()=>{Ae==="office"&&(we.indexOf("bigfilescdn.")>-1||we.indexOf("bigfiles1")>-1?Pt({url:we,fileType:bn(we),model:we.indexOf("model=edit")?"edit":"view"}):Wt())},[Ae,we]);const Wt=()=>se(void 0,null,function*(){console.log("data:",we);let Yt=we;we.startsWith("http")||(Yt=location.origin+Yt);let kt=new URL(Yt).pathname.split("/").pop();const pt=yield(0,ye.gJ)({attachment_id:kt});pt.url=Ft+pt.url,Pt(pt)}),Kt=()=>{if(we.startsWith("http")||we.startsWith("blob:")){Jt();return}(0,he.Sv)(De||"educoder",we,De)},Jt=()=>{st&&(0,le.fc)({id:st==null?void 0:st.id,watch_type:1,course_id:st==null?void 0:st.course_id}),(0,he.Nd)(De||"educoder",decodeURIComponent(we))};return ve.createElement("div",{style:ie({},Xe||{}),className:`${at&&me.bgBlack} ${Ae?me.wrp:"hide"}`},Ge&&ve.createElement("div",{className:me.close,ref:Qt},!!et&&ve.createElement(Le.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Qt.current},ve.createElement("span",{onClick:()=>{ft(),et()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!Ct&&ve.createElement(Le.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Qt.current},ve.createElement("span",{onClick:Jt},ve.createElement("i",{className:"icon-quxiaozhiding"}))),ve.createElement(Le.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Qt.current},ve.createElement("span",{className:"",onClick:ft},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${me[Ze]} ${Ze} ${me.monaco} ${Ae==="txt"?"show":"hide"}`},Ae==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(Ce.ZP,ie({},ze)))),Ae==="audio"&&ve.createElement("audio",{src:`${(we==null?void 0:we.indexOf("http://"))>-1||(we==null?void 0:we.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${we}`,autoPlay:!0}),Ae==="video"&&ve.createElement(ve.Fragment,null,(we==null?void 0:we.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${we}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${we}`,autoPlay:!0})),Ae==="office"&&mt&&ve.createElement("iframe",{src:`${gt}/office.html?key=${mt.key}&url=${btoa(mt.url)}&callbackUrl=${Ft+(mt.callbackUrl||"")}&fileType=${mt.fileType}&title=${mt.title||""}&model=${Se}&officeServer=${ge.Z.ONLYOFFICE}&disabledDownload=${!!Ct}`}),Ae==="html"&&ve.createElement("iframe",{src:we+"&disposition=inline"}),Ae==="pdf"&&ve.createElement("iframe",{src:`${gt}/js/pdfview/index.html?filename=${De||"educoder.pdf"}&url=${encodeURIComponent(we)}&disabledDownload=${!!Ct}`}),Ae==="image"&&ve.createElement("img",{src:`${(we==null?void 0:we.indexOf("http://"))>-1||(we==null?void 0:we.indexOf("https://"))>-1?"":"data:image/png;base64,"}${we}`}),(Ae==="other"||Ae==="download")&&ve.createElement(ve.Fragment,null,yt?ve.createElement(xe.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(Be.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Kt,disabled:Ct},"\u4E0B\u8F7D")}):ve.createElement(Be.ZP,{type:"primary",size:"middle",onClick:Kt,disabled:Ct},ve.createElement(ke.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(_n,en,Ee){"use strict";Ee.d(en,{z:function(){return Ae},Z:function(){return De}});var Me=Ee(59301),me=Ee(50304),Be=Ee(24768),ke=Ee(64018),Ce=Ee(65157),Le=Ee(3294),he=Ee(955),ye=Ee(15342),xe=Ee(1012),ge=Ee(23210),le=Ee(59301),de=({html:ze})=>{const Ze=(0,Me.useRef)(null),Xe=(0,Me.useRef)(null),Ge=`.markdown-body p {
|
|
|
margin: 0 0 16px 0 !important;
|
|
|
line-height: 28px;
|
|
|
white-space: pre-wrap;
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
li {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
dl {
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
|
|
|
.markdown-body {
|
|
|
-ms-text-size-adjust: 100%;
|
|
|
-webkit-text-size-adjust: 100%;
|
|
|
color: #333;
|
|
|
overflow: hidden;
|
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
|
word-break: break-word;
|
|
|
font-size: 16px;
|
|
|
line-height: 1.6;
|
|
|
white-space: normal;
|
|
|
word-wrap: break-word;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul>li {
|
|
|
list-style-type: disc;
|
|
|
}
|
|
|
|
|
|
.markdown-body ol>li {
|
|
|
list-style-type: decimal;
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
background: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:active,
|
|
|
.markdown-body a:hover {
|
|
|
outline: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body strong {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 2em;
|
|
|
margin: 0.67em 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
-moz-box-sizing: content-box;
|
|
|
box-sizing: content-box;
|
|
|
height: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
overflow: auto;
|
|
|
}
|
|
|
|
|
|
.markdown-body code,
|
|
|
.markdown-body kbd,
|
|
|
.markdown-body pre {
|
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
color: inherit;
|
|
|
font: inherit;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body html input[disabled] {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
line-height: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
border-collapse: collapse;
|
|
|
border-spacing: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body td,
|
|
|
.markdown-body th {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body * {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
color: #4183c4;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:hover,
|
|
|
.markdown-body a:active {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
height: 0;
|
|
|
margin: 15px 0;
|
|
|
overflow: hidden;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
border-bottom: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:before {
|
|
|
display: table;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:after {
|
|
|
display: table;
|
|
|
clear: both;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
margin-top: 15px;
|
|
|
margin-bottom: 15px;
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
font-size: 21px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 11px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding: 0;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
ul.linenums,
|
|
|
ol.linenums {
|
|
|
padding: 16px 0 0 36px !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding-left: 2em;
|
|
|
}
|
|
|
|
|
|
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ul ol {
|
|
|
list-style-type: lower-roman;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul ol,
|
|
|
.markdown-body ul ol ol,
|
|
|
.markdown-body ol ul ol,
|
|
|
.markdown-body ol ol ol {
|
|
|
list-style-type: lower-alpha;
|
|
|
}
|
|
|
|
|
|
.markdown-body dd {
|
|
|
margin-left: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon {
|
|
|
font: normal normal 16px octicons-anchor;
|
|
|
line-height: 1;
|
|
|
display: inline-block;
|
|
|
text-decoration: none;
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
user-select: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon-link:before {
|
|
|
content: '\f05c';
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:first-child {
|
|
|
margin-top: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:last-child {
|
|
|
margin-bottom: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
display: block;
|
|
|
padding-right: 6px;
|
|
|
padding-left: 30px;
|
|
|
margin-left: -30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor:focus {
|
|
|
outline: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
position: relative;
|
|
|
margin-top: 1em;
|
|
|
margin-bottom: 16px;
|
|
|
font-weight: bold;
|
|
|
line-height: 1.4;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
|
.markdown-body h2 .octicon-link,
|
|
|
.markdown-body h3 .octicon-link,
|
|
|
.markdown-body h4 .octicon-link,
|
|
|
.markdown-body h5 .octicon-link,
|
|
|
.markdown-body h6 .octicon-link {
|
|
|
display: none;
|
|
|
color: #000;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
|
.markdown-body h2:hover .anchor,
|
|
|
.markdown-body h3:hover .anchor,
|
|
|
.markdown-body h4:hover .anchor,
|
|
|
.markdown-body h5:hover .anchor,
|
|
|
.markdown-body h6:hover .anchor {
|
|
|
padding-left: 8px;
|
|
|
margin-left: -30px;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 2.25em;
|
|
|
line-height: 1.2;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 1.75em;
|
|
|
line-height: 1.225;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 1.5em;
|
|
|
line-height: 1.43;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 1.25em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 1em;
|
|
|
color: #777;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul,
|
|
|
.markdown-body ul ol,
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ol ul {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body li>p {
|
|
|
margin-top: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dt {
|
|
|
padding: 0;
|
|
|
margin-top: 16px;
|
|
|
font-size: 1em;
|
|
|
font-style: italic;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dd {
|
|
|
padding: 0 16px;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
padding: 0 15px;
|
|
|
color: #777;
|
|
|
border-left: 4px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
display: block;
|
|
|
width: 100%;
|
|
|
overflow: auto;
|
|
|
word-break: normal;
|
|
|
word-break: keep-all;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th {
|
|
|
font-weight: bold;
|
|
|
text-align: revert;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th,
|
|
|
.markdown-body table td {
|
|
|
padding: 6px 13px;
|
|
|
border: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr {
|
|
|
background-color: #fff;
|
|
|
border-top: 1px solid #ccc;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
|
background-color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
max-width: 100%;
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
padding: 0;
|
|
|
padding-top: 0.2em;
|
|
|
padding-bottom: 0.2em;
|
|
|
margin: 0;
|
|
|
font-size: 85%;
|
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:has(.katex) {
|
|
|
background-color: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:before,
|
|
|
.markdown-body code:after {
|
|
|
letter-spacing: -0.2em;
|
|
|
content: "\\00a0";
|
|
|
}
|
|
|
|
|
|
.markdown-body pre>code {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
font-size: 100%;
|
|
|
word-break: normal;
|
|
|
white-space: pre;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight {
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre,
|
|
|
.markdown-body pre {
|
|
|
padding: 16px;
|
|
|
overflow: auto;
|
|
|
font-size: 85%;
|
|
|
line-height: 1.45;
|
|
|
background-color: #f7f7f7;
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre {
|
|
|
margin-bottom: 0;
|
|
|
word-break: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
word-wrap: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code {
|
|
|
display: inline;
|
|
|
max-width: initial;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
overflow: initial;
|
|
|
line-height: inherit;
|
|
|
word-wrap: normal;
|
|
|
background-color: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code:before,
|
|
|
.markdown-body pre code:after {
|
|
|
content: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font-size: 11px;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c {
|
|
|
color: #969896;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c1,
|
|
|
.markdown-body .pl-mdh,
|
|
|
.markdown-body .pl-mm,
|
|
|
.markdown-body .pl-mp,
|
|
|
.markdown-body .pl-mr,
|
|
|
.markdown-body .pl-s1 .pl-v,
|
|
|
.markdown-body .pl-s3,
|
|
|
.markdown-body .pl-sc,
|
|
|
.markdown-body .pl-sv {
|
|
|
color: #0086b3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-e,
|
|
|
.markdown-body .pl-en {
|
|
|
color: #795da3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
|
.markdown-body .pl-smi,
|
|
|
.markdown-body .pl-smp,
|
|
|
.markdown-body .pl-stj,
|
|
|
.markdown-body .pl-vo,
|
|
|
.markdown-body .pl-vpf {
|
|
|
color: #333;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ent {
|
|
|
color: #63a35c;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-k,
|
|
|
.markdown-body .pl-s,
|
|
|
.markdown-body .pl-st {
|
|
|
color: #a71d5d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-pds,
|
|
|
.markdown-body .pl-s1,
|
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
|
.markdown-body .pl-sr,
|
|
|
.markdown-body .pl-sr .pl-cce,
|
|
|
.markdown-body .pl-sr .pl-sra,
|
|
|
.markdown-body .pl-sr .pl-sre,
|
|
|
.markdown-body .pl-src {
|
|
|
color: #df5000;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mo,
|
|
|
.markdown-body .pl-v {
|
|
|
color: #1d3e81;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-id {
|
|
|
color: #b52a1d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ii {
|
|
|
background-color: #b52a1d;
|
|
|
color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
|
color: #63a35c;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ml {
|
|
|
color: #693a17;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mh,
|
|
|
.markdown-body .pl-mh .pl-en,
|
|
|
.markdown-body .pl-ms {
|
|
|
color: #1d3e81;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mq {
|
|
|
color: #008080;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mi {
|
|
|
color: #333;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mb {
|
|
|
color: #333;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-md,
|
|
|
.markdown-body .pl-mdhf {
|
|
|
background-color: #ffecec;
|
|
|
color: #bd2c00;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdht,
|
|
|
.markdown-body .pl-mi1 {
|
|
|
background-color: #eaffea;
|
|
|
color: #55a532;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdr {
|
|
|
color: #795da3;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item {
|
|
|
list-style-type: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
|
margin-top: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item input {
|
|
|
float: left;
|
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
|
z-index: 1;
|
|
|
position: relative;
|
|
|
border-color: #4183c4;
|
|
|
}
|
|
|
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
|
.pln {
|
|
|
color: #000
|
|
|
}
|
|
|
|
|
|
/* plain text */
|
|
|
|
|
|
@media screen {
|
|
|
.str {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* string content */
|
|
|
.kwd {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a keyword */
|
|
|
.com {
|
|
|
color: #800
|
|
|
}
|
|
|
|
|
|
/* a comment */
|
|
|
.typ {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a type name */
|
|
|
.lit {
|
|
|
color: #066
|
|
|
}
|
|
|
|
|
|
/* a literal value */
|
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #660
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a markup tag name */
|
|
|
.atn {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a markup attribute name */
|
|
|
.atv {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* a markup attribute value */
|
|
|
.dec,
|
|
|
.var {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a declaration; a variable name */
|
|
|
.fun {
|
|
|
color: red
|
|
|
}
|
|
|
|
|
|
/* a function name */
|
|
|
}
|
|
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
|
@media print,
|
|
|
projection {
|
|
|
.str {
|
|
|
color: #060
|
|
|
}
|
|
|
|
|
|
.kwd {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.com {
|
|
|
color: #600;
|
|
|
font-style: italic
|
|
|
}
|
|
|
|
|
|
.typ {
|
|
|
color: #404;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.lit {
|
|
|
color: #044
|
|
|
}
|
|
|
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #440
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.atn {
|
|
|
color: #404
|
|
|
}
|
|
|
|
|
|
.atv {
|
|
|
color: #060
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
|
pre.prettyprint {
|
|
|
padding: 2px;
|
|
|
/* border: 1px solid #888 */
|
|
|
}
|
|
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
|
ol.linenums {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0
|
|
|
}
|
|
|
|
|
|
/* IE indents via margin-left */
|
|
|
li.L0,
|
|
|
li.L1,
|
|
|
li.L2,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L6,
|
|
|
li.L7,
|
|
|
li.L8 {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
/* Alternate shading for lines */
|
|
|
li.L1,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L7,
|
|
|
li.L9 {
|
|
|
background: #eee
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}`;return(0,Me.useEffect)(()=>{const ft=Ze.current.attachShadow({mode:"open"});Xe.current=document.createElement("div"),Xe.current.className="markdown-body",Xe.current.innerHTML=ze,ft.appendChild(Xe.current);const at=document.createElement("style");return at.textContent=Ge,ft.appendChild(at),()=>{ft.innerHTML=""}},[]),(0,Me.useEffect)(()=>{Xe.current&&(Xe.current.innerHTML=ze)},[ze]),le.createElement("div",{ref:Ze})},ce=Object.defineProperty,z=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ie=(ze,Ze,Xe)=>Ze in ze?ce(ze,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ze[Ze]=Xe,se=(ze,Ze)=>{for(var Xe in Ze||(Ze={}))ee.call(Ze,Xe)&&ie(ze,Xe,Ze[Xe]);if(z)for(var Xe of z(Ze))oe.call(Ze,Xe)&&ie(ze,Xe,Ze[Xe]);return ze};const ue="@\u2581\u2581@",Se="@\u2581@",we=/<pre[^>]*>/g;function Pe(ze){let Ze=document.createElement("div");return Ze.innerHTML=ze,Ze.childNodes.length===0?"":Ze.childNodes[0].nodeValue}const Ae=(ze,Ze)=>{ze=ze||"";const Xe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ge=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ft=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,at=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ze?ze.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Xe,(Ct,et,yt,st,zt,lt,tt)=>{const ut=et||st||lt,mt=yt||zt||tt||"?";return Le.Z.API_SERVER+"/api/attachments/"+ut+mt+"&t="+(0,he.Jn)(ut,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ze=ze.replace(at,(Ct,et,yt,st,zt,lt,tt)=>{const ut=et||st||lt,mt=yt||zt||tt||"?";return Le.Z.API_SERVER+"/attachments/download/"+ut+mt+"&t="+(0,he.Jn)(ut,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replace(Xe,(Ct,et,yt,st,zt,lt,tt)=>{const ut=et||st||lt,mt=yt||zt||tt||"?";return Le.Z.API_SERVER+"/api/attachments/"+ut+mt+"&t="+(0,he.Jn)(ut,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replace(Ge,(Ct,et,yt,st,zt)=>{const lt=et||st,tt=yt||zt||"";return'"'+Le.Z.API_SERVER+"/api/attachments/"+lt+tt+lt+tt+"&t="+(0,he.Jn)(lt,Date.now())}).replace(ft,(Ct,et,yt,st,zt)=>{const lt=et||st,tt=yt||zt||"";return"("+Le.Z.API_SERVER+"/files/uploads/"+lt+tt+lt+tt+"&t="+(0,he.Jn)(lt,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`),ze)};var De=({value:ze="",className:Ze,showTextOnly:Xe,showLines:Ge,style:ft={},stylesPrev:at={},highlightKeywords:Ct,showProgramFill:et,isProgramFill:yt,disabledFill:st=!1,programFillValue:zt,onFillChange:lt=mt=>{},onFillBlur:tt=()=>{},onFillFocus:ut=()=>{}})=>{let mt=String(ze);const[Pt,gt]=(0,Me.useState)(""),[Ft,Ht]=(0,Me.useState)("office"),[hn,Qt]=(0,Me.useState)([]),bn=(0,Me.useRef)("a"+(0,xe.Z)()),Wt={},Kt=(Oe,be,Ne)=>{const $e=document.createElement(Oe===Se?"input":"textarea");$e.style.width="100%",$e.style.height=Oe===Se?"40px":"151px",$e.rows=5,$e.spellcheck=!1,$e.name="edu-program-fill",$e.placeholder="\u8BF7\u8F93\u5165",$e.dataset.id=be;const dt=Object.keys(Wt).length;return Wt[dt]=$e,`<span class="edu-program-fill-wrap ${Oe===Se?"":"show"}" style="width:${Oe===Se?"400px":"100%"}" title=${Ne||""}><span>${$e.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Jt(Oe){return Oe=Oe.replace(/!\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(/\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Oe=Oe.replace(/<embed.*?>/g,""),Oe=Oe.replace(/<img.*?>/g,""),Oe=Oe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Oe=Oe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Oe=Oe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Oe=Oe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Oe}const Yt=Oe=>Oe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(be,Ne){let $e=Ne.replace(/(\n|\r)/g,"").split("}"),dt=[];return $e.map(Je=>{Je!=""&&dt.push(`.${bn.current} ${Je}`)}),`<style>${dt.join("}")}</style>`}),kt=(0,Me.useMemo)(()=>{try{const $e=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,dt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Je=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,At=/\(\/attachments\/download\//g;mt=mt.replace(At,"("+Le.Z.API_SERVER+"/attachments/download/").replace($e,"("+Le.Z.API_SERVER+"/api/attachments/").replace(dt,'"'+Le.Z.API_SERVER+"/api/attachments/").replace(Je,'"'+Le.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`)}catch($e){}if(et){let $e=-1;return mt=mt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(dt,Je,At){var tn;return++$e,Kt(dt,$e,(tn=zt==null?void 0:zt[$e])==null?void 0:tn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Yt(mt||"")}</pre>`}let Oe=Yt(mt);Oe=(0,Be.ZP)(Oe);const be=(0,Be.ez)();mt.match(/\[TOC\]/)&&(Oe=Oe.replace("<p>[TOC]</p>",(0,Be.Qv)()),(0,Be.Iy)()),Oe=Oe.replace(/(__special_katext_id_\d+__)/g,($e,dt)=>{const{type:Je,expression:At}=be[dt];return(0,ye.renderToString)(Pe(At)||"",{displayMode:Je==="block",throwOnError:!1,output:"html"})}),Oe=Oe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Be.AL)();const Ne=document.createElement("div");if(Ne.innerHTML=Oe,Xe)return Ne.innerText;if(Ct){const $e=Ct.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return vt(Ne,$e),Ne.innerHTML}return setTimeout(()=>Ie(),500),Ne.innerHTML},[mt,Ct]);(0,Me.useEffect)(()=>{nt.current&&nt.current.querySelectorAll(["input","textarea"]).forEach(be=>{be.oninput=pt,be.onblur=Bt,be.onfocus=xt})},[hn]),(0,Me.useEffect)(()=>{var Oe,be,Ne,$e,dt;if(zt!=null&&zt.length)try{const Je=nt.current.querySelectorAll(".edu-program-fill-score"),At=nt.current.querySelectorAll('[name="edu-program-fill"]');for(const[tn,pn]of At.entries())pn.value=((Oe=zt==null?void 0:zt[tn])==null?void 0:Oe.value)||"",((be=zt==null?void 0:zt[tn])==null?void 0:be.type)==="warning"?pn.className="program-fill-warning":((Ne=zt==null?void 0:zt[tn])==null?void 0:Ne.type)==="success"?pn.className="program-fill-success":pn.className="";for(const[tn,pn]of Je.entries())pn.innerHTML=($e=zt==null?void 0:zt[tn])!=null&&$e.score?`${(dt=zt==null?void 0:zt[tn])==null?void 0:dt.score}\u5206`:"";Qt(zt)}catch(Je){console.log(Je,"error")}},[zt]);const pt=Oe=>{hn[Oe.target.dataset.id]=hn[Oe.target.dataset.id]||{},hn[Oe.target.dataset.id].value=Oe.target.value,Qt([...hn]),lt(hn,Oe.target.dataset.id)},Bt=Oe=>{hn[Oe.target.dataset.id]=hn[Oe.target.dataset.id]||{},hn[Oe.target.dataset.id].value=Oe.target.value,Qt([...hn]),tt(hn,Oe.target.dataset.id)},xt=Oe=>{hn[Oe.target.dataset.id]=hn[Oe.target.dataset.id]||{},hn[Oe.target.dataset.id].value=Oe.target.value,Qt([...hn]),ut(hn,Oe.target.dataset.id)};function vt(Oe,be){return Oe.childNodes.forEach(Ne=>{var $e;if(Ne.childNodes.length>0)vt(Ne,be);else if(Ne.nodeName!=="IMG")if(Ne.innerHTML)Ne.innerHTML=($e=Ne.innerHTML)==null?void 0:$e.replace(new RegExp(be,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const dt=document.createElement("span");dt.innerHTML=Ne.textContent.replace(new RegExp(be,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ne.replaceWith(dt)}})}const nt=(0,Me.useRef)();Be.jb.WebkitLineClamp=Ge,Ge&&(ft=se(se({},ft),Be.jb));function He(Oe){let be=Oe.target;if(be.tagName.toUpperCase()==="A"){let Ne=be.getAttribute("href");if(Ne.indexOf("office")>-1)Oe.preventDefault(),gt(Ne),Ht("office");else if(Ne.indexOf("application/pdf")>-1)Oe.preventDefault(),gt(Ne),Ht("pdf");else if(Ne.indexOf("text/html")>-1)Oe.preventDefault(),gt(Ne),Ht("html");else if(Ne.startsWith("#")){Oe.preventDefault();let $e=document.getElementById(Ne.replace("#",""));$e&&$e.scrollIntoView(!0)}}}const Ie=()=>{var Oe;const be=(Oe=nt.current)==null?void 0:Oe.querySelectorAll("video");be==null||be.forEach(Ne=>{if(Ne.oncontextmenu=()=>!1,Ne.src.indexOf(".m3u8")>-1&&!Ne.canPlayType("application/vnd.apple.mpegurl")){if(Ce.ZP.isSupported()){var $e=new Ce.ZP;$e.loadSource(Ne.src),$e.attachMedia(Ne)}}})};(0,Me.useEffect)(()=>{if(nt.current&&kt&&kt.match(we)&&window.PR.prettyPrint(),nt.current)return nt.current.addEventListener("click",He),()=>{var Oe;(Oe=nt.current)==null||Oe.removeEventListener("click",He),(0,Be.AL)(),(0,Be.Iy)()}},[kt,nt.current,He]),(0,Me.useEffect)(()=>{var Oe;const be=Ne=>{Ne.preventDefault(),Ne.clipboardData.setData("text",window.getSelection().toString())};return(Oe=nt.current)==null||Oe.addEventListener("copy",be),()=>{var Ne;(Ne=nt.current)==null||Ne.removeEventListener("copy",be)}},[nt.current]);const We=Oe=>/<style[\s\S]*?>/i.test(Oe||"");return Me.createElement(Me.Fragment,null,Xe&&Me.createElement("div",{ref:nt},kt),!Xe&&!We(kt)&&Me.createElement("div",{ref:nt,style:se({},ft),className:`${Ze||""} ${st?"disabled-fill":""} markdown-body ${bn.current}`,dangerouslySetInnerHTML:{__html:kt}}),!Xe&&We(kt)&&Me.createElement(de,{html:kt}),Me.createElement(ge.Z,{close:!0,data:Pt,type:Pt!=null&&Pt.length?Ft:"",style:se({},at),onClose:()=>gt("")}))}},33538:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ke}});var Me=Ee(89070),me={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Be=Ee(59301),ke=({message:Ce,className:Le,children:he,style:ye={}})=>Be.createElement("div",{className:`custom-spinner ${me.idsRingWrapper} ${Le}`},Be.createElement("div",{className:me.ldsRing},Be.createElement("div",null),Be.createElement("div",null),Be.createElement("div",null),Be.createElement("div",null)),Ce?Be.createElement("p",{style:ye},Ce):null,he,Be.createElement(Me.Outlet,null))},17064:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ke}});var Me=Ee(59301),me=Ee(34604),Be=Ee(59301),ke=({defaultX:Ce="40%",leftChild:Le,rightChild:he,className:ye,hideResize:xe=!1})=>{const[ge,le]=(0,Me.useState)(Ce),ve=(0,Me.useRef)();function de(){ve.current=!0}(0,Me.useEffect)(()=>{function ee(ie){ve.current&&(me.Z.publish("resize-move-bar",ie),le(ie.pageX))}function oe(){ve.current=!1}return window.addEventListener("mousemove",ee),window.addEventListener("mouseup",oe),()=>{window.removeEventListener("mousemove",ee),window.removeEventListener("mouseup",oe)}},[]);const ce=typeof ge=="number"&&ge!==.01?`${ge}px`:Ce,z=`calc(100% - ${xe?"0px":"4px"} - ${ce})`;return Be.createElement("div",{className:`split-panel-container ${ye}`},Be.createElement("section",{style:{width:ce,display:ge===.01?"none":""}},Le),Be.createElement("section",{className:"resize-x-bar",onMouseDown:de},Be.createElement("a",{className:"btn-resize"},Be.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Be.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"})))),Be.createElement("section",{style:{width:z}},he))}},13787:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return Le}});var Me=Ee(59301),me={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_"},Be=Ee(92310),ke=Ee.n(Be),Le=({className:he,style:ye={},leftNode:xe,leftTitle:ge="\u81EA\u6D4B\u8F93\u5165",rightNode:le,rightTitle:ve="\u8FD0\u884C\u7ED3\u679C"})=>Me.createElement("div",{className:ke()(me.result,he),style:ye},Me.createElement("div",{className:me.left},Me.createElement("div",{className:me.title},Me.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),Me.createElement("span",null,ge)),Me.createElement("div",{className:me.leftNode},xe)),Me.createElement("div",{className:me.right},Me.createElement("div",{className:me.title},Me.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),Me.createElement("span",null,ve)),Me.createElement("div",{className:me.rightNode},le)))},19105:function(_n,en,Ee){"use strict";var Me=Ee(59301);const me=ke=>String(ke).length===1?`0${ke}`:ke,Be=({className:ke="",onChange:Ce,defaultValue:Le=0})=>{const[he,ye]=(0,Me.useState)(Le);(0,Me.useEffect)(()=>{const ve=setTimeout(()=>{ye(he+1e3)},1e3);return Ce(he+1e3),()=>{clearInterval(ve)}},[he]);const xe=parseInt(he/(60*6e4))||"00",ge=parseInt(he%(60*6e4)/6e4)||"00",le=parseInt(he%6e4/1e3)||"00";return Me.createElement("div",{className:ke},me(xe),":",me(ge),":",me(le))};en.Z=Be},71839:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return z}});var Me=Ee(59301),me=Ee(8591),Be=Ee(38854),ke=Ee(29382),Ce=Ee(65157),Le=Ee(24065),he=Ee(56102),ye=Ee(4901),xe={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"},ge=(ee,oe,ie)=>new Promise((se,ue)=>{var Se=Ae=>{try{Pe(ie.next(Ae))}catch(De){ue(De)}},we=Ae=>{try{Pe(ie.throw(Ae))}catch(De){ue(De)}},Pe=Ae=>Ae.done?se(Ae.value):Promise.resolve(Ae.value).then(Se,we);Pe((ie=ie.apply(ee,oe)).next())});function le(ee){if(isNaN(ee))return{minutes:"00",seconds:"00"};const oe=new Date(ee*1e3).toISOString().substr(11,8);return{hour:oe.substr(0,2),minutes:oe.substr(3,2),seconds:oe.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function ve(ee,oe){return ee-oe}function de(ee){ee.sort(ve);let oe=0;for(let ie=0;ie<ee.length-1;ie++){let se=Math.abs(ee[ie+1]-ee[ie]);se<21&&(oe+=se)}return oe}const ce=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var z=(0,Me.forwardRef)(({allow_skip:ee,src:oe,toLog:ie,videoId:se,logWatchHistory:ue,courseId:Se=null,startTime:we,handlePause:Pe=()=>{},handlePlay:Ae=()=>{},handlePlayEnded:De=()=>{},autoPlay:ze=!1,onPlayEnded:Ze=()=>{},isShowWaterMark:Xe=!0},Ge)=>{var ft;oe=oe==null?void 0:oe.replace("http://","https://");const Ct=((ft=oe==null?void 0:oe.split("."))==null?void 0:ft.pop())==="flv",et=(0,Me.useRef)(),yt=(0,Me.useRef)(),st=(0,Me.useRef)(),zt=(0,Me.useRef)(),lt=(0,Me.useRef)(),tt=(0,Me.useRef)(),ut=(0,Me.useRef)(),mt=(0,Me.useRef)(),Pt=(0,Me.useRef)(),gt=(0,Me.useRef)(),Ft=(0,Me.useRef)(),Ht=(0,Me.useRef)(),hn=(0,Me.useRef)(),Qt=(0,Me.useRef)(),bn=navigator.userAgent.toLowerCase().match(ce),Wt=bn?bn[0]:"pc",Kt=(0,Me.useRef)(!1),Jt=(0,Le.eY)();let Yt=0,kt=0,pt=0,Bt=null,xt=!1,vt=20,nt=1,He=!1,Ie=!1,We=[];(0,Me.useImperativeHandle)(Ge,()=>({getLastUpdatedTime:()=>et.current.currentTime,getDuration:()=>et.current.duration})),me.ZP.config({maxCount:1,getContainer:()=>st.current});const Oe=(0,Me.useCallback)((tn,pn=!1)=>{let ln={point:et.current.currentTime};Bt?(ln.log_id=Bt,ln.watch_duration=de(We),ln.total_duration=kt):(Se?(ln.video_id=parseInt(se,10),ln.course_id=Se):ln.video_id=se,ln.duration=Yt,ln.device=Wt),pn&&(ln.ed="1");function gn(){return ge(this,null,function*(){He=!0,Bt=yield ue==null?void 0:ue(ln),He=!1,tn&&tn()})}gn()},[se,Se]);(0,Me.useEffect)(()=>{et.current&&(zt.current.style.display="none",lt.current.style.display="block"),me.ZP.destroy();let tn=null;return ke.Z.isSupported&&Ct&&oe&&(oe==null?void 0:oe.indexOf(".m3u8"))<0?(tn=ke.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:oe,muted:!1}),et.current&&(tn.attachMediaElement(et.current),tn.load())):et.current.setAttribute("src",oe),Ne(),()=>{tn&&(tn.unload(),tn.pause(),tn.destroy(),tn=null)}},[et,Ct,oe]);function be(){et.current.paused?(zt.current.style.display="none",lt.current.style.display="block"):(zt.current.style.display="block",lt.current.style.display="none")}function Ne(){Ft.current.style.display="none",hn.current.style.display="none",Ht.current.style.display="none",et.current.muted||et.current.volume===0?Ft.current.style.display="block":et.current.volume>0&&et.current.volume<=.5?hn.current.style.display="block":Ht.current.style.display="block"}(0,Me.useEffect)(()=>{const tn=document.getElementById("play"),pn=document.querySelectorAll(".playback-icons use");function ln(){Ae(),we&&!Kt.current&&(et.current.currentTime=we),Kt.current=!0,We.push(et.current.currentTime),xt||(xt=!0,ie&&Oe())}function gn(){return ge(this,null,function*(){be(),We.push(et.current.currentTime),ie&&Oe(()=>{Bt=null,pt=0,xt=!1,He=!1,Ie=!1,We=[],kt=0,nt=1},!0),Ze()})}function Hn(){tt.current.value=Math.round(et.current.currentTime),ut.current.value=Math.round(et.current.currentTime)}function An(){const yi=le(Math.round(et.current.currentTime));Pt.current.innerText=`${yi.hour>0?yi.hour+":":""}${yi.minutes}:${yi.seconds}`,Pt.current.setAttribute("datetime",`${yi.hour>0?" "+yi.hour+" ":""}${yi.minutes}m ${yi.seconds}s`)}function qn(){var yi,dr,Zi,rt,Ir,Ar,$r;const co=Math.round((yi=et.current)==null?void 0:yi.duration);(Zi=(dr=tt.current)==null?void 0:dr.setAttribute)==null||Zi.call(dr,"max",co),(Ir=(rt=ut.current)==null?void 0:rt.setAttribute)==null||Ir.call(rt,"max",co);const mo=le(co);mt.current&&(mt.current.innerText=`${mo.hour>0?mo.hour+":":""}${mo.minutes}:${mo.seconds}`,($r=(Ar=mt.current).setAttribute)==null||$r.call(Ar,"datetime",`${mo.hour>0?" "+mo.hour+" ":""}${mo.minutes}m ${mo.seconds}s`))}function ai(){try{const yi=Math.round(et.current.duration);tt.current.setAttribute("max",yi),ut.current.setAttribute("max",yi);const dr=le(yi);mt.current.innerText=`${dr.hour>0?dr.hour+":":""}${dr.minutes}:${dr.seconds}`,mt.current.setAttribute("datetime",`${dr.hour>0?" "+dr.hour+" ":""}${dr.minutes}m ${dr.seconds}s`),Hn(),An();const{width:Zi,height:rt,x:Ir,y:Ar}=yt.current.getBoundingClientRect();if(Ir<0||Ar<0||!Zi)return;if(!Ie){let $r=et.current.currentTime,co=$r-pt;Math.abs(co)<10?(kt+=Math.abs(co),pt=$r,He||kt-nt*vt>=0&&(nt++,We.push(pt),ie&&Oe())):(pt=$r,ie&&Oe())}}catch(yi){console.log(yi)}}function Ti(){Ie=!0}function Ci(){et.current.playing&&We.push(et.current.currentTime,pt),pt=et.current.currentTime,Ie=!1}function $i(){Yt=et.current.duration,Yt<=20&&(vt=Yt/3),et.current.addEventListener("play",ln)}function or(yi){yi.preventDefault(),(0,ye.vp)()?(et.current.style.width="100%",et.current.style.height="100%"):et.current.style.cssText=""}function lr(){Pe()}function qi(yi){if(!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const dr=yi.target.dataset.seek?yi.target.dataset.seek:yi.target.value;et.current.currentTime=dr,ut.current.value=dr,tt.current.value=dr}function Fr(yi){const dr=Math.round(yi.offsetX/yi.target.clientWidth*parseInt(yi.target.getAttribute("max"),10));tt.current.setAttribute("data-seek",dr);const Zi=le(dr);gt.current.textContent=`${Zi.hour>0?Zi.hour+":":""}${Zi.minutes}:${Zi.seconds}`;const rt=et.current.getBoundingClientRect();gt.current.style.left=`${yi.pageX-rt.left}px`}function Mr(yi){switch(yi.code){case"Space":yi.preventDefault(),Je();break;case"ArrowRight":if(yi.preventDefault(),!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(et.current.currentTime>=et.current.duration)break;et.current.currentTime=parseInt(et.current.currentTime)+5,Hn();break;case"ArrowLeft":if(yi.preventDefault(),!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(et.current.currentTime===0)break;et.current.currentTime=parseInt(et.current.currentTime)-5,Hn();break;case"ArrowUp":yi.preventDefault(),et.current.volume<1&&(et.current.volume=(parseInt(et.current.volume*10)+1)/10);break;case"ArrowDown":yi.preventDefault(),et.current.volume>0&&(et.current.volume=(parseInt(et.current.volume*10)-1)/10);break}}return st.current.addEventListener((0,ye.gH)(),or),et.current.addEventListener("canplay",$i),et.current.addEventListener("ended",gn),et.current.addEventListener("seeking",Ti),et.current.addEventListener("seeked",Ci),et.current.addEventListener("loadedmetadata",qn),tt.current.addEventListener("mousemove",Fr),tt.current.addEventListener("input",qi),et.current.addEventListener("timeupdate",ai),et.current.addEventListener("pause",lr),et.current.addEventListener("volumechange",Ne),document.addEventListener("keydown",Mr),()=>{var yi,dr,Zi,rt,Ir,Ar,$r,co,mo,no,lo,ri;(yi=et.current)==null||yi.removeEventListener("canplay",$i),(dr=et.current)==null||dr.removeEventListener("play",ln),(Zi=et.current)==null||Zi.removeEventListener("ended",gn),(rt=et.current)==null||rt.removeEventListener("seeking",Ti),(Ir=et.current)==null||Ir.removeEventListener("seeked",Ci),(Ar=tt.current)==null||Ar.removeEventListener("mousemove",Fr),($r=tt.current)==null||$r.removeEventListener("input",qi),(co=et.current)==null||co.removeEventListener("timeupdate",ai),(mo=et.current)==null||mo.removeEventListener("pause",lr),(no=et.current)==null||no.removeEventListener("loadedmetadata",qn),(lo=et.current)==null||lo.removeEventListener("volumechange",Ne),document.removeEventListener("keydown",Mr),(ri=et.current)!=null&&ri.playing&&(We.push(pt,et.current.currentTime),ie&&Oe())}},[et,oe]),(0,Me.useEffect)(()=>{if(et.current.onended=()=>{De(et)},et.current.oncontextmenu=()=>!1,(oe==null?void 0:oe.indexOf(".m3u8"))>-1){if(et.current.canPlayType("application/vnd.apple.mpegurl"))et.current.src=oe;else if(Ce.ZP.isSupported()){var tn=new Ce.ZP;tn.loadSource(oe),tn.attachMedia(et.current)}}},[oe]);const[$e,dt]=(0,Me.useState)(1),Je=()=>{et.current.paused||et.current.ended?et.current.play():et.current.pause(),be()};function At(){et.current.muted=!et.current.muted,et.current.muted?(Qt.current.setAttribute("data-volume",volume.value),Qt.current.value=0):Qt.current.value=Qt.current.dataset.volume}return Me.createElement("div",{style:{position:"relative"},ref:st},Me.createElement("div",{ref:yt,className:`${xe.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${xe.animate__loop}`},Xe&&Jt?Jt.login:" "),Me.createElement("div",{className:xe.container},Me.createElement("div",{className:xe["video-container"],id:"video-container"},Me.createElement("div",{className:xe["playback-animation"],id:"playback-animation"},Me.createElement("svg",{className:xe["playback-icons"]},Me.createElement("use",{className:"hidden",href:"#play-icon"}),Me.createElement("use",{href:"#pause"}))),Me.createElement("video",{className:xe.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:et,autoPlay:ze}),Me.createElement("div",{className:`${xe["video-controls"]} `,id:"video-controls"},Me.createElement("div",{className:xe["bottom-controls"]},Me.createElement("div",{className:xe["left-controls"]},Me.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Je},Me.createElement("svg",{className:xe["playback-icons"]},Me.createElement("use",{ref:lt,href:"#play-icon"}),Me.createElement("use",{ref:zt,style:{display:"none"},href:"#pause"}))),Me.createElement("div",{className:xe.time},Me.createElement("time",{id:"time-elapsed",ref:Pt},"00:00"),Me.createElement("span",null," / "),Me.createElement("time",{id:"duration",ref:mt},"00:00"))),Me.createElement("div",{className:xe["right-controls"]},ee&&Me.createElement(Be.Z,{placement:"top",overlayClassName:xe.rateOverlay,getPopupContainer:tn=>tn.parentNode,menu:{items:[{key:"1",label:Me.createElement("span",{onClick:()=>{dt(1),et.current.playbackRate=1}},"1.0x")},{key:"2",label:Me.createElement("span",{onClick:()=>{dt(1.5),et.current.playbackRate=1.5}},"1.5x")},{key:"3",label:Me.createElement("span",{onClick:()=>{dt(2),et.current.playbackRate=2}},"2.0x")}]}},Me.createElement("div",{className:`${xe.controlText} mr5`},"\u500D\u901F")),Me.createElement(he.CopyToClipboard,{text:oe,onCopy:()=>me.ZP.success("\u590D\u5236\u6210\u529F")},Me.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},Me.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),Me.createElement("div",{className:xe["volume-controls"]},Me.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:xe["volume-button"],id:"volume-button",onClick:At},Me.createElement("i",{ref:Ft,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),Me.createElement("i",{ref:hn,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),Me.createElement("i",{ref:Ht,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),Me.createElement("input",{className:xe.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:Qt,style:{display:"none"},onClick:Ne})),Me.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:xe["fullscreen-button"],onClick:()=>{(0,ye.vp)()?(0,ye.BU)():(0,ye.Dj)(st.current)}},Me.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),Me.createElement("div",{className:xe["video-progress"]},Me.createElement("progress",{ref:ut,value:"0",min:"0"}),Me.createElement("input",{className:xe.seek,ref:tt,value:"0",min:"0",type:"range",step:"1"}),Me.createElement("div",{className:xe["seek-tooltip"],ref:gt,id:"seek-tooltip"},"00:00"))))),Me.createElement("svg",{style:{display:"none"}},Me.createElement("defs",null,Me.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},Me.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),Me.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},Me.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),Me.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},Me.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"})),Me.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},Me.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"})),Me.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},Me.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"})),Me.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},Me.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"})),Me.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},Me.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"})),Me.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},Me.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"})))))})},61398:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ke}});var Me=Ee(59301),me=Ee(34604),Be=Ee(11611),ke=()=>{const[Ce,Le]=(0,Me.useState)(""),[he,ye]=(0,Me.useState)(0);let[xe,ge]=(0,Me.useState)(),[le,ve]=(0,Me.useState)();const[de,ce]=(0,Me.useState)(!1),z=(0,Me.useRef)("");(0,Me.useEffect)(()=>me.Z.subscribe("preview-image",ze=>{Le(ze),console.log(Pe.current),document.body.style.overflow="hidden"}),[]),(0,Me.useEffect)(()=>(document.addEventListener("keydown",ee),()=>{document.removeEventListener("keydown",ee)}),[]),(0,Me.useEffect)(()=>{z.current=Ce},[Ce]);function ee(De){De.keyCode==27&&z.current&&oe()}function oe(){document.body.style.overflow="auto",ge(void 0),ve(void 0),ye(0),Le("")}function ie(){ye(he+90)}function se(){xe=Pe.current.width*1.1,le=Pe.current.height*1.1,ve(le),ge(xe)}function ue(){xe=Pe.current.width/1.1,le=Pe.current.height/1.1,ve(le),ge(xe)}const Se=(0,Me.useRef)(),we=(0,Me.useRef)(),Pe=(0,Me.useRef)(),Ae=De=>{(De.nativeEvent.target===Se.current||De.nativeEvent.target===we.current)&&oe()};return Me.createElement(Me.Fragment,null,Ce?Me.createElement("div",null,Me.createElement("div",{className:"preview-wrp-group",ref:we},Me.createElement(Be.Z,{className:"image-preview",src:Ce,style:{display:"none"},preview:{visible:!0,src:Ce,onVisibleChange:De=>{Le("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},53932:function(_n,en,Ee){"use strict";Ee.d(en,{h:function(){return Se},Z:function(){return ue}});var Me=Ee(59301),me=Ee(57809),Be=Ee(78241),ke=Ee(3113),Ce=Ee(89780),Le=Ee.n(Ce),he=Ee(37036),ye=Object.defineProperty,xe=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,ce=(we,Pe,Ae)=>Pe in we?ye(we,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):we[Pe]=Ae,z=(we,Pe)=>{for(var Ae in Pe||(Pe={}))ve.call(Pe,Ae)&&ce(we,Ae,Pe[Ae]);if(le)for(var Ae of le(Pe))de.call(Pe,Ae)&&ce(we,Ae,Pe[Ae]);return we},ee=(we,Pe)=>xe(we,ge(Pe));const oe=me.default.Option,ie={labelCol:{span:4},wrapperCol:{span:20}},se={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"]};var ue=({callback:we,onCancel:Pe})=>{const[Ae,De]=(0,Me.useState)("python");function ze(Xe){De(se[Xe][1])}function Ze(Xe){we(Xe)}return Me.createElement(Be.default,ee(z({},ie),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ze,style:{width:500}}),Me.createElement(Be.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Me.createElement(me.default,{getPopupContainer:Xe=>Xe.parentNode,onChange:ze},Object.keys(se).map(Xe=>Me.createElement(oe,{key:Xe,value:Xe},se[Xe][0])))),Me.createElement(Be.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Me.createElement(Se,{mode:Ae})),Me.createElement("div",{className:"flex-container flex-end"},Me.createElement(ke.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Me.createElement(ke.ZP,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function Se({value:we,onChange:Pe,mode:Ae,options:De={}}){const ze=(0,Me.useRef)(),[Ze,Xe]=(0,Me.useState)();return(0,Me.useEffect)(()=>{if(Ze){let Ge=function(ft){const at=ft.getValue();Pe&&Pe(at)};return Ze.on("change",Ge),()=>{Ze.off("change",Ge)}}},[Ze,Pe]),(0,Me.useEffect)(()=>{Ze&&Ze.setOption("mode",Ae)},[Ze,Ae]),(0,Me.useEffect)(()=>{Ze&&(we!==Ze.getValue()||we==="")&&setTimeout(()=>{Ze.setValue(we||"")},300)},[Ze,we]),(0,Me.useEffect)(()=>{if(ze.current&&!Ze){const Ge=Le().fromTextArea(ze.current,z({mode:Ae,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},De));Xe(Ge)}},[ze.current,Ze]),Me.createElement("div",{className:"my-codemirror-container"},Me.createElement("textarea",{ref:ze}))}},12290:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ri}});var Me=Ee(59301),me=Ee(89780),Be=Ee.n(me),ke=Ee(76374),Ce=Ee(37036),Le=Ee(6313),he=Ee(25717),ye=Ee(99498),xe=Ee(25419),ge=Ee(67549),le=Ee(85149),ve=({value:Ke="",className:qe,showTextOnly:Ye,showLines:St,style:Ot={}})=>{const Tt=(0,Me.useMemo)(()=>"",[Ke]);return Me.createElement(Me.Fragment,null,Me.createElement("div",{dangerouslySetInnerHTML:{__html:Tt}}))},de=Ee(59301),ce=Object.defineProperty,z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ue=(Ke,qe,Ye)=>qe in Ke?ce(Ke,qe,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Ke[qe]=Ye,Se=(Ke,qe)=>{for(var Ye in qe||(qe={}))ie.call(qe,Ye)&&ue(Ke,Ye,qe[Ye]);if(oe)for(var Ye of oe(qe))se.call(qe,Ye)&&ue(Ke,Ye,qe[Ye]);return Ke},we=(Ke,qe)=>z(Ke,ee(qe));let Pe=[{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 Ae({onActionCallback:Ke,title:qe,icon:Ye,actionName:St,className:Ot="",children:Tt}){function _t(){Ke(St)}return de.createElement("a",{title:qe,className:Ot,onClick:_t},de.createElement("i",{className:`${Ye}`}),Tt)}var De=({watch:Ke,showNullButton:qe,showNullProgramButton:Ye,onActionCallback:St,fullScreen:Ot,insertTemp:Tt,hidetoolBar:_t,extraUse:dn})=>{const Pn=[...Pe,{title:`${Ke?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ke?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return de.createElement("ul",{className:"markdown-toolbar-container"},!_t&&Pn.map((mn,sn)=>de.createElement("li",{key:sn},mn.actionName?de.createElement(Ae,we(Se({},mn),{onActionCallback:St})):de.createElement("span",{className:"v-line"}))),qe?de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:St},de.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ye?de.createElement(de.Fragment,null,de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:St},de.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:St},de.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Tt&&de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Tt}`,onActionCallback:St},de.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),dn&&de.createElement("li",null,dn),de.createElement("li",{className:"btn-full-screen"},de.createElement(Ae,{icon:`${Ot?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Ot?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:St})))},ze=Ee(79346),Ze=Ee(78241),Xe=Ee(92832),Ge=Ee(3113),ft=Object.defineProperty,at=Object.defineProperties,Ct=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,zt=(Ke,qe,Ye)=>qe in Ke?ft(Ke,qe,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Ke[qe]=Ye,lt=(Ke,qe)=>{for(var Ye in qe||(qe={}))yt.call(qe,Ye)&&zt(Ke,Ye,qe[Ye]);if(et)for(var Ye of et(qe))st.call(qe,Ye)&&zt(Ke,Ye,qe[Ye]);return Ke},tt=(Ke,qe)=>at(Ke,Ct(qe));const ut={labelCol:{span:4},wrapperCol:{span:20}};var mt=({callback:Ke,onCancel:qe})=>{function Ye(St){Ke(St)}return Me.createElement(Ze.default,tt(lt({},ut),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ye,style:{width:500}}),Me.createElement(Ze.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Me.createElement(Xe.default,null)),Me.createElement(Ze.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Me.createElement(Xe.default,null)),Me.createElement("div",{className:"flex-container flex-end"},Me.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Me.createElement(Ge.ZP,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},Pt=Ee(53932),gt=Ee(28451),Ft=Ee(43418),Ht=Ee(95237),hn=Ee(16406),Qt=Ee(59301),bn=({callback:Ke,onCancel:qe})=>{const Ye=document.createElement("canvas"),St=Ye.getContext("2d");Ye.width=1e3,Ye.height=800,St.fillStyle="#ffffff",St.fillRect(0,0,Ye.width,Ye.height);const Ot=Ye.toDataURL("image/png");return Qt.createElement(Ft.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Qt.createElement(Ht.Z,{style:{height:"100vh"}},Qt.createElement(hn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Ot,visible:!0,title:String(Date.now())},onOk:Tt=>{Ke({src:Tt.url})},onClose:qe})))},Wt=Ee(12378);function Kt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Kt,go.CommandHandler),Kt.prototype.canAlignSelection=function(){var Ke=this.diagram;return!(Ke===null||Ke.isReadOnly||Ke.isModelReadOnly||Ke.selection.count<2)},Kt.prototype.alignLeft=function(){var Ke=this.diagram;Ke.startTransaction("aligning left");var qe=1/0;Ke.selection.each(function(Ye){Ye instanceof go.Link||(qe=Math.min(Ye.position.x,qe))}),Ke.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(qe,Ye.position.y))}),Ke.commitTransaction("aligning left")},Kt.prototype.alignRight=function(){var Ke=this.diagram;Ke.startTransaction("aligning right");var qe=-1/0;Ke.selection.each(function(Ye){if(!(Ye instanceof go.Link)){var St=Ye.actualBounds.x+Ye.actualBounds.width;qe=Math.max(St,qe)}}),Ke.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(qe-Ye.actualBounds.width,Ye.position.y))}),Ke.commitTransaction("aligning right")},Kt.prototype.alignTop=function(){var Ke=this.diagram;Ke.startTransaction("alignTop");var qe=1/0;Ke.selection.each(function(Ye){Ye instanceof go.Link||(qe=Math.min(Ye.position.y,qe))}),Ke.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(Ye.position.x,qe))}),Ke.commitTransaction("alignTop")},Kt.prototype.alignBottom=function(){var Ke=this.diagram;Ke.startTransaction("aligning bottom");var qe=-1/0;Ke.selection.each(function(Ye){if(!(Ye instanceof go.Link)){var St=Ye.actualBounds.y+Ye.actualBounds.height;qe=Math.max(St,qe)}}),Ke.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(Ye.actualBounds.x,qe-Ye.actualBounds.height))}),Ke.commitTransaction("aligning bottom")},Kt.prototype.alignCenterX=function(){var Ke=this.diagram,qe=Ke.selection.first();if(qe){Ke.startTransaction("aligning Center X");var Ye=qe.actualBounds.x+qe.actualBounds.width/2;Ke.selection.each(function(St){St instanceof go.Link||St.move(new go.Point(Ye-St.actualBounds.width/2,St.actualBounds.y))}),Ke.commitTransaction("aligning Center X")}},Kt.prototype.alignCenterY=function(){var Ke=this.diagram,qe=Ke.selection.first();if(qe){Ke.startTransaction("aligning Center Y");var Ye=qe.actualBounds.y+qe.actualBounds.height/2;Ke.selection.each(function(St){St instanceof go.Link||St.move(new go.Point(St.actualBounds.x,Ye-St.actualBounds.height/2))}),Ke.commitTransaction("aligning Center Y")}},Kt.prototype.alignColumn=function(Ke){var qe=this.diagram;qe.startTransaction("align Column"),Ke===void 0&&(Ke=0),Ke=parseFloat(Ke);var Ye=new Array;qe.selection.each(function(dn){dn instanceof go.Link||Ye.push(dn)});for(var St=0;St<Ye.length-1;St++){var Ot=Ye[St],Tt=Ot.actualBounds.y+Ot.actualBounds.height+Ke,_t=Ye[St+1];_t.move(new go.Point(Ot.actualBounds.x,Tt))}qe.commitTransaction("align Column")},Kt.prototype.alignRow=function(Ke){Ke===void 0&&(Ke=0),Ke=parseFloat(Ke);var qe=this.diagram;qe.startTransaction("align Row");var Ye=new Array;qe.selection.each(function(dn){dn instanceof go.Link||Ye.push(dn)});for(var St=0;St<Ye.length-1;St++){var Ot=Ye[St],Tt=Ot.actualBounds.x+Ot.actualBounds.width+Ke,_t=Ye[St+1];_t.move(new go.Point(Tt,Ot.actualBounds.y))}qe.commitTransaction("align Row")},Kt.prototype.canRotate=function(Ke){var qe=this.diagram;return!(qe===null||qe.isReadOnly||qe.isModelReadOnly||qe.selection.count<1)},Kt.prototype.rotate=function(Ke){Ke===void 0&&(Ke=90);var qe=this.diagram;qe.startTransaction("rotate "+Ke.toString());var qe=this.diagram;qe.selection.each(function(Ye){Ye instanceof go.Link||Ye instanceof go.Group||(Ye.angle+=Ke)}),qe.commitTransaction("rotate "+Ke.toString())},Kt.prototype.pullToFront=function(){var Ke=this.diagram;Ke.startTransaction("pullToFront");var qe=new go.Map;Ke.selection.each(function(Ye){qe.set(Ye.layer,0)}),qe.iteratorKeys.each(function(Ye){var St=0;Ye.parts.each(function(Ot){if(!Ot.isSelected){var Tt=Ot.zOrder;isNaN(Tt)?Ot.zOrder=0:St=Math.max(St,Tt)}}),qe.set(Ye,St)}),Ke.selection.each(function(Ye){Kt._assignZOrder(Ye,qe.get(Ye.layer)+1)}),Ke.commitTransaction("pullToFront")},Kt.prototype.pushToBack=function(){var Ke=this.diagram;Ke.startTransaction("pushToBack");var qe=new go.Map;Ke.selection.each(function(Ye){qe.set(Ye.layer,0)}),qe.iteratorKeys.each(function(Ye){var St=0;Ye.parts.each(function(Ot){if(!Ot.isSelected){var Tt=Ot.zOrder;isNaN(Tt)?Ot.zOrder=0:St=Math.min(St,Tt)}}),qe.set(Ye,St)}),Ke.selection.each(function(Ye){Kt._assignZOrder(Ye,qe.get(Ye.layer)-1-Kt._findGroupDepth(Ye))}),Ke.commitTransaction("pushToBack")},Kt._assignZOrder=function(Ke,qe,Ye){Ye===void 0&&(Ye=Ke),Ke.layer===Ye.layer&&(Ke.zOrder=qe),Ke instanceof go.Group&&Ke.memberParts.each(function(St){Kt._assignZOrder(St,qe+1,Ye)})},Kt._findGroupDepth=function(Ke){if(Ke instanceof go.Group){var qe=0;return Ke.memberParts.each(function(Ye){qe=Math.max(qe,Kt._findGroupDepth(Ye))}),qe+1}else return 0},Kt.prototype.doKeyDown=function(){var Ke=this.diagram;if(Ke!==null){var qe=Ke.lastInput;if(qe.key==="Up"||qe.key==="Down"||qe.key==="Left"||qe.key==="Right"){var Ye=this.arrowKeyBehavior;if(Ye==="none")return;if(Ye==="select"){this._arrowKeySelect();return}else if(Ye==="move"){this._arrowKeyMove();return}else if(Ye==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Kt.prototype._getAllParts=function(){var Ke=new Array;return this.diagram.nodes.each(function(qe){Ke.push(qe)}),this.diagram.parts.each(function(qe){Ke.push(qe)}),Ke},Kt.prototype._arrowKeyMove=function(){var Ke=this.diagram,qe=Ke.lastInput,Ye=0,St=0;if(qe.control||qe.meta)Ye=1,St=1;else if(Ke.grid!==null){var Ot=Ke.grid.gridCellSize;St=Ot.width,Ye=Ot.height}Ke.startTransaction("arrowKeyMove"),Ke.selection.each(function(Tt){qe.key==="Up"?Tt.move(new go.Point(Tt.actualBounds.x,Tt.actualBounds.y-Ye)):qe.key==="Down"?Tt.move(new go.Point(Tt.actualBounds.x,Tt.actualBounds.y+Ye)):qe.key==="Left"?Tt.move(new go.Point(Tt.actualBounds.x-St,Tt.actualBounds.y)):qe.key==="Right"&&Tt.move(new go.Point(Tt.actualBounds.x+St,Tt.actualBounds.y))}),Ke.commitTransaction("arrowKeyMove")},Kt.prototype._arrowKeySelect=function(){var Ke=this.diagram,qe=Ke.lastInput,Ye=null;qe.key==="Up"?Ye=this._findNearestPartTowards(270):qe.key==="Down"?Ye=this._findNearestPartTowards(90):qe.key==="Left"?Ye=this._findNearestPartTowards(180):qe.key==="Right"&&(Ye=this._findNearestPartTowards(0)),Ye!==null&&(qe.shift?Ye.isSelected=!0:qe.control||qe.meta?Ye.isSelected=!Ye.isSelected:Ke.select(Ye))},Kt.prototype._findNearestPartTowards=function(Ke){var qe=this.diagram.selection.first();if(qe===null)return null;for(var Ye=qe.actualBounds.center,St=this._getAllParts(),Ot=1/0,Tt=qe,_t=0;_t<St.length;_t++){var dn=St[_t];if(dn!==qe&&dn.canSelect()){var Pn=dn.actualBounds.center,mn=Ye.directionPoint(Pn),sn=this._angleCloseness(mn,Ke);if(sn<=45){var Nt=Ye.distanceSquaredPoint(Pn);Nt*=1+Math.sin(sn*Math.PI/180),Nt<Ot&&(Ot=Nt,Tt=dn)}}}return Tt},Kt.prototype._angleCloseness=function(Ke,qe){return Math.min(Math.abs(qe-Ke),Math.min(Math.abs(qe+360-Ke),Math.abs(qe-360-Ke)))},Kt.prototype._arrowKeyTree=function(){var Ke=this.diagram,qe=Ke.selection.first();if(qe instanceof go.Node){var Ye=Ke.lastInput;if(Ye.key==="Right"){if(!qe.isTreeLeaf)if(!qe.isTreeExpanded)Ke.commandHandler.canExpandTree(qe)&&Ke.commandHandler.expandTree(qe);else{var St=this._sortTreeChildrenByY(qe).first();St!==null&&Ke.select(St)}}else if(Ye.key==="Left")if(!qe.isTreeLeaf&&qe.isTreeExpanded)Ke.commandHandler.canCollapseTree(qe)&&Ke.commandHandler.collapseTree(qe);else{var Ot=qe.findTreeParentNode();Ot!==null&&Ke.select(Ot)}else if(Ye.key==="Up"){var Ot=qe.findTreeParentNode();if(Ot!==null){var Tt=this._sortTreeChildrenByY(Ot),_t=Tt.indexOf(qe);if(_t>0){for(var dn=Tt.elt(_t-1);dn!==null&&dn.isTreeExpanded&&!dn.isTreeLeaf;){var Pn=this._sortTreeChildrenByY(dn);dn=Pn.last()}dn!==null&&Ke.select(dn)}else Ke.select(Ot)}}else if(Ye.key==="Down")if(qe.isTreeExpanded&&!qe.isTreeLeaf){var St=this._sortTreeChildrenByY(qe).first();St!==null&&Ke.select(St)}else for(;qe!==null;){var Ot=qe.findTreeParentNode();if(Ot===null)break;var Tt=this._sortTreeChildrenByY(Ot),_t=Tt.indexOf(qe);if(_t<Tt.length-1){Ke.select(Tt.elt(_t+1));break}else qe=Ot}var mn=Ke.selection.first();mn!==null&&Ke.scrollToRect(mn.actualBounds)}},Kt.prototype._sortTreeChildrenByY=function(Ke){var qe=new go.List().addAll(Ke.findTreeChildrenNodes());return qe.sort(function(Ye,St){var Ot=Ye.location,Tt=St.location;return Ot.y<Tt.y?-1:Ot.y>Tt.y?1:Ot.x<Tt.x?-1:Ot.x>Tt.x?1:0}),qe},Kt.prototype.copyToClipboard=function(Ke){go.CommandHandler.prototype.copyToClipboard.call(this,Ke),this._lastPasteOffset.set(this.pasteOffset)},Kt.prototype.pasteFromClipboard=function(){var Ke=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Ke,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Ke},Object.defineProperty(Kt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Ke){if(Ke!=="move"&&Ke!=="select"&&Ke!=="scroll"&&Ke!=="tree"&&Ke!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Ke);this._arrowKeyBehavior=Ke}}),Object.defineProperty(Kt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Ke){if(!(Ke instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Ke);this._pasteOffset.set(Ke)}});var Jt=Kt,Yt=Ee(74413),kt=Ee(43604),pt=Ee(99064),Bt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},xt=Ee(24065),vt=Ee(59301),nt=(Ke,qe,Ye)=>new Promise((St,Ot)=>{var Tt=Pn=>{try{dn(Ye.next(Pn))}catch(mn){Ot(mn)}},_t=Pn=>{try{dn(Ye.throw(Pn))}catch(mn){Ot(mn)}},dn=Pn=>Pn.done?St(Pn.value):Promise.resolve(Pn.value).then(Tt,_t);dn((Ye=Ye.apply(Ke,qe)).next())});function He({onCancel:Ke,callback:qe}){let Ye=(0,Me.useRef)(),St=(0,Me.useRef)(),Ot=(0,Me.useRef)(),Tt=(0,Me.useRef)(!1);const _t=(0,Me.useRef)(!1),[dn,Pn]=(0,Me.useState)(0);function mn(){const Nt=Wt.bx.make,un={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};Ye.current=new Wt.S0(St.current,{padding:20,grid:Nt(Wt.s_,"Grid",Nt(Wt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Nt(Wt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Jn=>{var fi=Jn.diagram.commandHandler.addTopLevelParts(Jn.diagram.selection,!0);fi||Jn.diagram.currentTool.doCancel()},commandHandler:Nt(Jt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Jn=>{var fi=Jn.subject;fi.location=fi.location.copy().snapToGridPoint(Jn.diagram.grid.gridOrigin,Jn.diagram.grid.gridCellSize),setTimeout(()=>{Jn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Jn=>{var fi=Jn.subject;setTimeout(()=>{Jn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Jn=>{var fi=Jn.parameter.part;fi.invalidateConnectedLinks();var Si=Jn.subject;Jn.diagram.toolManager.linkingTool.isForwards?Si.toNode.invalidateConnectedLinks():Si.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ye.current.nodeTemplate=Nt(Wt.NB,"Auto",{locationSpot:Wt.z6.Center,locationObjectName:"SHAPE",desiredSize:new Wt.$u(120,60),minSize:new Wt.$u(40,40),resizable:!0,resizeCellSize:new Wt.$u(10,10),rotatable:!0},new Wt.KX("location","loc",Wt.E9.parse).makeTwoWay(Wt.E9.stringify),new Wt.KX("desiredSize","size",Wt.$u.parse).makeTwoWay(Wt.$u.stringify),Nt(Wt.bn,{name:"SHAPE",fill:un.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Wt.z6.AllSides,toSpot:Wt.z6.AllSides},new Wt.KX("figure"),new Wt.KX("fill"),new Wt.KX("stroke","borderColor"),new Wt.KX("strokeWidth","thickness"),new Wt.KX("strokeDashArray","dash")),Nt(Wt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Nt(Wt.al,{margin:1,textAlign:"center",overflow:Wt.al.OverflowEllipsis,editable:!0},new Wt.KX("text").makeTwoWay(),new Wt.KX("stroke","color"))),Ye.current.nodeTemplate.toolTip=Nt("ToolTip",Nt(Wt.s_,"Vertical",{maxSize:new Wt.$u(200,NaN)},Nt(Wt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Wt.KX("text")),Nt(Wt.al,{font:"10pt sans-serif",textAlign:"center"},new Wt.KX("text","details"))));function Ln(Jn,fi){var Si=(hi,Oi)=>{hi.handled=!0,hi.diagram.model.commit(tr=>{var Fi=Oi.part.adornedPart,Hi=new Wt.E9().setRectSpot(Fi.actualBounds,Jn);Hi.subtract(Fi.location),Hi.scale(2,2),Hi.x+=Math.sign(Hi.x)*130,Hi.y+=Math.sign(Hi.y)*130,Hi.add(Fi.location),Hi.snapToGridPoint(hi.diagram.grid.gridOrigin,hi.diagram.grid.gridCellSize);var mr=tr.copyNodeData(Fi.data);tr.setGroupKeyForNodeData(mr,tr.getGroupKeyForNodeData(Fi.data)),tr.addNodeData(mr);var Rn={from:Fi.key,to:tr.getKeyForNodeData(mr)};tr.addLinkData(Rn);var Br=hi.diagram.findNodeForData(mr);Br.location=Hi,hi.diagram.select(Br),setTimeout(()=>{hi.diagram.commandHandler.editTextBlock()},20)})};return Nt(Wt.bn,{figure:fi,alignment:Jn,alignmentFocus:Jn.opposite(),width:Jn.equals(Wt.z6.Top)||Jn.equals(Wt.z6.Bottom)?25:18,height:Jn.equals(Wt.z6.Top)||Jn.equals(Wt.z6.Bottom)?18:25,fill:"orange",stroke:un.white,strokeWidth:4,mouseEnter:(hi,Oi)=>Oi.fill="dodgerblue",mouseLeave:(hi,Oi)=>Oi.fill="orange",isActionable:!0,click:Si,contextClick:Si})}function Dn(Jn){return Nt(Wt.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(fi,Si)=>Si.fill="dodgerblue",mouseLeave:(fi,Si)=>Si.fill="orange",click:(fi,Si)=>{fi.diagram.commandHandler.showContextMenu(Si.part.adornedPart)}},Jn||{})}Ye.current.nodeTemplate.selectionAdornmentTemplate=Nt(Wt.uz,"Spot",Nt(Wt.Vm,{padding:10}),Ln(Wt.z6.Top,"TriangleUp"),Ln(Wt.z6.Left,"TriangleLeft"),Ln(Wt.z6.Right,"TriangleRight"),Ln(Wt.z6.Bottom,"TriangleDown"),Dn({alignment:new Wt.z6(.75,0)}));function $t(Jn,fi){return(Si,hi)=>{Si.handled=!0,Si.diagram.model.commit(Oi=>{Oi.set(hi.part.adornedPart.data,Jn,fi)})}}function rn(Jn,fi){return fi||(fi="color"),Nt(Wt.bn,{width:16,height:16,stroke:"lightgray",fill:Jn,margin:1,background:"transparent",mouseEnter:(Si,hi)=>hi.stroke="dodgerblue",mouseLeave:(Si,hi)=>hi.stroke="lightgray",click:$t(fi,Jn),contextClick:$t(fi,Jn)})}function jn(){return[Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",rn(un.white,"fill"),rn(un.beige,"fill"),rn(un.extralightblue,"fill"),rn(un.extralightred,"fill"))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",rn(un.lightgray,"fill"),rn(un.lightgreen,"fill"),rn(un.lightblue,"fill"),rn(un.lightred,"fill")))]}function On(){return[Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",rn(un.black),rn(un.green),rn(un.blue),rn(un.red))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",rn(un.white),rn(un.magenta),rn(un.purple),rn(un.orange)))]}function ei(Jn,fi){return fi||(fi="thickness"),Nt(Wt.bn,"LineH",{width:16,height:16,strokeWidth:Jn,margin:1,background:"transparent",mouseEnter:(Si,hi)=>hi.background="dodgerblue",mouseLeave:(Si,hi)=>hi.background="transparent",click:$t(fi,Jn),contextClick:$t(fi,Jn)})}function Gn(Jn,fi){return fi||(fi="dash"),Nt(Wt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Jn,margin:1,background:"transparent",mouseEnter:(Si,hi)=>hi.background="dodgerblue",mouseLeave:(Si,hi)=>hi.background="transparent",click:$t(fi,Jn),contextClick:$t(fi,Jn)})}function ti(){return[Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",ei(1),ei(2),ei(3),ei(4))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Gn(null),Gn([2,4]),Gn([4,4])))]}function Bn(Jn,fi){return fi||(fi="figure"),Nt(Wt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Jn,margin:1,background:"transparent",mouseEnter:(Si,hi)=>hi.fill="dodgerblue",mouseLeave:(Si,hi)=>hi.fill="lightgray",click:$t(fi,Jn),contextClick:$t(fi,Jn)})}Ye.current.nodeTemplate.contextMenu=Nt("ContextMenu",Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Bn("Rectangle"),Bn("RoundedRectangle"),Bn("Ellipse"),Bn("Diamond"))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Bn("Parallelogram2"),Bn("ManualOperation"),Bn("Procedure"),Bn("Cylinder1"))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Bn("Terminator"),Bn("CreateRequest"),Bn("Document"),Bn("TriangleDown"))),jn(),On(),ti()),Ye.current.groupTemplate=Nt(Wt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Wt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Jn,fi)=>{var Si=fi.addMembers(fi.diagram.selection,!0);Si||fi.diagram.currentTool.doCancel()},avoidable:!1},new Wt.KX("location","loc",Wt.E9.parse).makeTwoWay(Wt.E9.stringify),Nt(Wt.s_,"Auto",{name:"BODY"},Nt(Wt.bn,{parameter1:10,fill:un.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Wt.z6.AllSides,toSpot:Wt.z6.AllSides},new Wt.KX("fill"),new Wt.KX("stroke","color"),new Wt.KX("strokeWidth","thickness"),new Wt.KX("strokeDashArray","dash")),Nt(Wt.Vm,{background:"transparent",margin:20})),Nt(Wt.al,{alignment:Wt.z6.Top,alignmentFocus:Wt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Wt.KX("text"),new Wt.KX("stroke","color"))),Ye.current.groupTemplate.selectionAdornmentTemplate=Nt(Wt.uz,"Spot",Nt(Wt.s_,"Auto",Nt(Wt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Nt(Wt.Vm,{margin:1.5})),Dn({alignment:Wt.z6.TopRight,alignmentFocus:Wt.z6.BottomRight})),Ye.current.groupTemplate.contextMenu=Nt("ContextMenu",jn(),On(),ti()),Ye.current.linkTemplate=Nt(Wt.rU,{layerName:"Foreground",routing:Wt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Wt.KX("fromSpot","fromSpot",Wt.z6.parse),new Wt.KX("toSpot","toSpot",Wt.z6.parse),new Wt.KX("fromShortLength","dir",Jn=>Jn>=1?10:0),new Wt.KX("toShortLength","dir",Jn=>Jn>=1?10:0),new Wt.KX("points").makeTwoWay(),Nt(Wt.bn,{strokeWidth:2},new Wt.KX("stroke","color"),new Wt.KX("strokeWidth","thickness"),new Wt.KX("strokeDashArray","dash")),Nt(Wt.bn,{segmentIndex:0,segmentOffset:new Wt.E9(15,0),segmentOrientation:Wt.rU.OrientAlong,alignmentFocus:Wt.z6.Right,figure:"circle",width:10,strokeWidth:0},new Wt.KX("fill","color"),new Wt.KX("visible","dir",Jn=>Jn===1)),Nt(Wt.bn,{segmentIndex:-1,segmentOffset:new Wt.E9(-10,6),segmentOrientation:Wt.rU.OrientPlus90,alignmentFocus:Wt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Wt.KX("fill","color"),new Wt.KX("visible","dir",Jn=>Jn>=1),new Wt.KX("width","thickness",Jn=>7+3*Jn),new Wt.KX("height","thickness",Jn=>7+3*Jn),new Wt.KX("segmentOffset","thickness",Jn=>new Wt.E9(-15,4+1.5*Jn))),Nt(Wt.bn,{segmentIndex:0,segmentOffset:new Wt.E9(15,-6),segmentOrientation:Wt.rU.OrientMinus90,alignmentFocus:Wt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Wt.KX("fill","color"),new Wt.KX("visible","dir",Jn=>Jn===2),new Wt.KX("width","thickness",Jn=>7+3*Jn),new Wt.KX("height","thickness",Jn=>7+3*Jn),new Wt.KX("segmentOffset","thickness",Jn=>new Wt.E9(-15,4+1.5*Jn))),Nt(Wt.al,{alignmentFocus:new Wt.z6(0,1,-4,0),editable:!0},new Wt.KX("text").makeTwoWay(),new Wt.KX("stroke","color"))),Ye.current.linkTemplate.selectionAdornmentTemplate=Nt(Wt.uz,Nt(Wt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:li(2)},new Wt.KX("pathPattern","thickness",li)),Dn({alignmentFocus:new Wt.z6(0,0,-6,-4)}));function li(Jn){return Nt(Wt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Jn+4).toString()+" H3"})}function Di(Jn){var fi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Jn===0?fi="M0 0 M16 16 M0 8 L16 8":Jn===2&&(fi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Nt(Wt.bn,{geometryString:fi,margin:2,background:"transparent",mouseEnter:(Si,hi)=>hi.background="dodgerblue",mouseLeave:(Si,hi)=>hi.background="transparent",click:$t("dir",Jn),contextClick:$t("dir",Jn)})}function Ri(Jn){var fi=(Si,hi)=>{Si.handled=!0,Si.diagram.model.commit(Oi=>{var tr=hi.part.adornedPart;Oi.set(tr.data,Jn?"toSpot":"fromSpot",Wt.z6.stringify(Wt.z6.AllSides)),(Jn?tr.toNode:tr.fromNode).invalidateConnectedLinks()})};return Nt(Wt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Si,hi)=>hi.background="dodgerblue",mouseLeave:(Si,hi)=>hi.background="transparent",click:fi,contextClick:fi})}function Mn(Jn,fi){var Si=0,hi=Wt.z6.RightSide;Jn.equals(Wt.z6.Top)?(Si=270,hi=Wt.z6.TopSide):Jn.equals(Wt.z6.Left)?(Si=180,hi=Wt.z6.LeftSide):Jn.equals(Wt.z6.Bottom)&&(Si=90,hi=Wt.z6.BottomSide),fi||(Si-=180);var Oi=(tr,Fi)=>{tr.handled=!0,tr.diagram.model.commit(Hi=>{var mr=Fi.part.adornedPart;Hi.set(mr.data,fi?"toSpot":"fromSpot",Wt.z6.stringify(hi)),(fi?mr.toNode:mr.fromNode).invalidateConnectedLinks()})};return Nt(Wt.bn,{alignment:Jn,alignmentFocus:Jn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Si,background:"transparent",mouseEnter:(tr,Fi)=>Fi.background="dodgerblue",mouseLeave:(tr,Fi)=>Fi.background="transparent",click:Oi,contextClick:Oi})}Ye.current.linkTemplate.contextMenu=Nt("ContextMenu",On(),ti(),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Di(0),Di(1),Di(2))),Nt("ContextMenuButton",Nt(Wt.s_,"Horizontal",Nt(Wt.s_,"Spot",Ri(!1),Mn(Wt.z6.Top,!1),Mn(Wt.z6.Left,!1),Mn(Wt.z6.Right,!1),Mn(Wt.z6.Bottom,!1)),Nt(Wt.s_,"Spot",{margin:new Wt.Zt(0,0,0,2)},Ri(!0),Mn(Wt.z6.Top,!0),Mn(Wt.z6.Left,!0),Mn(Wt.z6.Right,!0),Mn(Wt.z6.Bottom,!0)))));const Xi=`{ "class": "GraphLinksModel",
|
|
|
"nodeDataArray": [
|
|
|
{"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3},
|
|
|
{"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"},
|
|
|
{"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"},
|
|
|
{"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"},
|
|
|
{"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"},
|
|
|
{"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3},
|
|
|
{"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
|
|
|
{"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
|
|
|
{"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"}
|
|
|
],
|
|
|
"linkDataArray": [
|
|
|
{"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1},
|
|
|
{"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1},
|
|
|
{"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]},
|
|
|
{"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2},
|
|
|
{"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"},
|
|
|
{"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1},
|
|
|
{"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]}
|
|
|
]}`;var Nr=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function zi(Jn){return console.log("shapeName:",Jn),Nr.indexOf(Jn)>=0}var En=new Wt.YI(Ot.current,{maxSelectionCount:1,linkTemplate:Nt(Wt.rU,{locationSpot:Wt.z6.Center,selectionAdornmentTemplate:Nt(Wt.uz,"Link",{locationSpot:Wt.z6.Center},Nt(Wt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Nt(Wt.bn,{toArrow:"Standard",stroke:null}))},{routing:Wt.rU.AvoidsNodes,curve:Wt.rU.JumpOver,corner:5,toShortLength:4},new Wt.KX("points"),Nt(Wt.bn,{isPanelMain:!0,strokeWidth:2}),Nt(Wt.bn,{toArrow:"Standard",stroke:null})),model:new Wt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Wt.bn.getFigureGenerators().toArray().map(Jn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Jn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ye.current.addDiagramListener("TextEdited",function(Jn){var fi;const Si=Jn.subject.part;var hi=(fi=document.activeElement)==null?void 0:fi.value;typeof hi=="string"&&hi.trim()===""&&Ye.current.model.commit(function(Oi){Oi.set(Si.data,"text","\u672A\u547D\u540D"),Ye.current.commandHandler.stopCommand()},"increment")}),En.nodeTemplate=Nt(Wt.NB,"Auto",{locationSpot:Wt.z6.Center},new Wt.KX("location","location",Wt.E9.parse).makeTwoWay(Wt.E9.stringify),Nt(Wt.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new Wt.KX("stroke").makeTwoWay(),new Wt.KX("fill").makeTwoWay(),new Wt.KX("figure")),Nt(Wt.al,{margin:new Wt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Wt.$u(16,16),maxSize:new Wt.$u(10,NaN),textAlign:"center",editable:!0},new Wt.KX("key").makeTwoWay())),setTimeout(()=>{Ye.current.grid=Nt(Wt.s_,"Grid",Nt(Wt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Nt(Wt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ye.current.grid.visible=!0,Ye.current.grid.gridCellStroke="darkgray",Ye.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ye.current,Ye.current}const sn=()=>nt(this,null,function*(){var Nt,un=Ye.current.makeImage();const Ln=yield(0,pt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:un.src,file_data:JSON.stringify({login:(Nt=(0,xt.eY)())==null?void 0:Nt.login,data:JSON.parse(Ye.current.model.toJson())})}});qe({src:Ln.url})});return(0,Me.useEffect)(()=>(setTimeout(()=>{mn()},500),Pn(dn+1),()=>{Ye.current=null}),[]),vt.createElement("div",{ref:_t,className:Tt.current?`${Bt.maxH60} body-overflow-initial`:"body-overflow-initial"},vt.createElement(Ft.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!dn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:vt.createElement(Ht.Z,null,vt.createElement(kt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),vt.createElement(kt.Z,{onClick:()=>{var Nt,un,Ln=Ye.current.selection.first();if(Tt.current=!Tt.current,document.activeElement&&Ln){let Dn=(un=(Nt=document.activeElement)==null?void 0:Nt.value)==null?void 0:un.trim();typeof Dn=="string"&&Ye.current.model.commit(function($t){$t.set(Ln.data,"text",Dn||"\u672A\u547D\u540D"),Ye.current.commandHandler.stopCommand()},"increment")}Pn(dn+1)}},vt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Ke},vt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Bt.flowChartWrp},vt.createElement("div",{style:{display:"flex",height:"100%"}},vt.createElement("div",{style:{width:"300px",height:"100%"}},vt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),vt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Bt.myPaletteDiv,ref:Ot})),vt.createElement("div",{style:{flex:1,position:"relative"}},vt.createElement("div",{ref:St,style:{height:"80vh"}}))),vt.createElement("div",{className:"tr"},vt.createElement(Ge.ZP,{size:"large",onClick:sn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Ie=He,We=Ee(5112),Oe=Ee(5871);const be=We.ZP.Group,Ne={margin:"0 8px"};var $e=({callback:Ke,onCancel:qe})=>{function Ye(St){Ke(St)}return Me.createElement(Ze.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ye},Me.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Me.createElement("span",{style:Ne},"\u5355\u5143\u683C\u6570\uFF1A"),Me.createElement("span",{style:Ne},"\u884C\u6570"),Me.createElement(Ze.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Me.createElement(Oe.Z,null)),Me.createElement("span",{style:Ne},"\u5217\u6570"),Me.createElement(Ze.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Me.createElement(Oe.Z,null))),Me.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Me.createElement("span",{style:Ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Me.createElement(Ze.default.Item,{name:"align"},Me.createElement(be,null,Me.createElement(We.ZP,{value:"default"},Me.createElement("i",{className:"fa fa-align-justify"})),Me.createElement(We.ZP,{value:"left"},Me.createElement("i",{className:"fa fa-align-left"})),Me.createElement(We.ZP,{value:"center"},Me.createElement("i",{className:"fa fa-align-center"})),Me.createElement(We.ZP,{value:"right"},Me.createElement("i",{className:"fa fa-align-right"}))))),Me.createElement("div",{className:"flex-container flex-end"},Me.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Me.createElement(Ge.ZP,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},dt=Ee(78673),Je=Ee(80727),At=Ee.n(Je),pn=(0,Me.forwardRef)(({use3d:Ke,width:qe,height:Ye,callback:St,showSaveButton:Ot},Tt)=>{const _t=(0,Me.useRef)(),dn=(0,Me.useRef)(),[Pn,mn]=(0,Me.useState)(!1),sn=(0,Me.useRef)({id:_t,appName:"graphing",width:qe||1e3,height:Ye||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Me.useEffect)(()=>{dn.current=new(At())(sn.current,!0),window.onload=function(){dn.current.inject("applet_container")}},[]);const Nt=()=>{var un=window.ggbApplet.getPNGBase64(1,!0,72);return St&&St(un),un};return(0,Me.useEffect)(()=>{sn.current.appName=Pn?"3D":"graphing",dn.current.inject("applet_container")},[Pn]),(0,Me.useEffect)(()=>{mn(Ke)},[Ke]),(0,Me.useImperativeHandle)(Tt,()=>({getImgData:Nt})),Me.createElement(Me.Fragment,null,Me.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:_t}),Me.createElement(Ht.Z,{align:"middle"},Me.createElement(kt.Z,{flex:1},Me.createElement(dt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Pn,onChange:un=>mn(un)})),Me.createElement(kt.Z,null,Me.createElement(Ge.ZP,{size:"large",onClick:Nt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ln=Ee(41588),gn=Ee(8591);const Hn="link",An="upload-image",qn="add-flowchart",ai="draw-image",Ti="add-flowchart",Ci="code-block",$i="add-table",or="------------",lr={default:or,left:`:${or}`,center:`:${or}:`,right:`${or}:`};var qi=Ee(58856);function Fr(){}let Mr=0;const yi=1e4,dr="\u2581",Zi="@\u2581\u2581@",rt="@\u2581@",Ir=`
|
|
|
**\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`,Ar=["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 $r(Ke){return/^\d+$/.test(Ke)?`${Ke}px`:Ke}const mo=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",no={[mo+"-B"]:"bold",[mo+"-I"]:"italic"},lo={[Hn]:"\u6DFB\u52A0\u94FE\u63A5",[Ci]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[An]:"\u6DFB\u52A0\u56FE\u7247",[ai]:"\u6DFB\u52A0\u753B\u56FE",[qn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[$i]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var ri=({defaultValue:Ke="",onChange:qe,width:Ye="100%",height:St=400,miniToolbar:Ot=!1,isFocus:Tt=!1,watch:_t,insertTemp:dn,mode:Pn="markdown",id:mn="markdown-editor-id",showResizeBar:sn=!1,noStorage:Nt=!1,showNullButton:un=!1,showNullProgramButton:Ln=!1,hidetoolBar:Dn=!1,fullScreen:$t=!1,onBlur:rn,onCMBeforeChange:jn,onFullScreen:On,className:ei="",disablePaste:Gn=!1,disabled:ti=!1,disabledFill:Bn=!1,placeholder:li="",values:Di="",extraUse:Ri})=>{const[Mn,Xi]=(0,Me.useState)(null),[Nr,zi]=(0,Me.useState)(Ke),[En,Jn]=(0,Me.useState)(_t),[fi,Si]=(0,Me.useState)($t),[hi,Oi]=(0,Me.useState)(""),[tr,Fi]=(0,Me.useState)(0),[Hi,mr]=(0,Me.useState)(St),[Rn,Br]=(0,Me.useState)(!1),[Nn,vr]=(0,Me.useState)(0),[So,Dr]=(0,Me.useState)(0),Co=(0,Me.useRef)(),ho=(0,Me.useRef)(),Yi=(0,Me.useRef)(),Ui=(0,Me.useRef)();(0,Me.useEffect)(()=>{const sr=window.scrollY||window.pageYOffset;zi(Di),Mn==null||Mn.setValue(Di),window.scrollTo(0,sr)},[Di]),(0,Me.useEffect)(()=>{On==null||On(fi)},[fi]),(0,Me.useEffect)(()=>{if(Co.current){let sr=function(Xn,ar){var to;if(Gn){ar.preventDefault();return}const Ro=ar.clipboardData;if(Ro){const Bo=Ro.types.toString(),Xo=Ro.items;if(Bo==="Files"||Ro.types.indexOf("Files")>-1){if(ar.preventDefault(),Pn=="stex")return;try{let as=Xo[1];((to=Xo[0])==null?void 0:to.kind)==="file"&&(as=Xo[0]);const Ho=as.getAsFile(),ia=Ho.name.split(".").pop();(0,gt.I)(Ho,_s=>{var la,kn,Is;_s.id?((la=Ho==null?void 0:Ho.type)==null?void 0:la.indexOf("image"))>-1?Ki.replaceSelection(`<img width="100%" src="/api/attachments/${_s.id}?type=${_s.content_type})" alt="" />`):((kn=Ho==null?void 0:Ho.type)==null?void 0:kn.indexOf("video"))>-1?Ki.replaceSelection(`<video width="100%" controls src="/api/attachments/${_s.id}"></video>`):((Is=Ho==null?void 0:Ho.type)==null?void 0:Is.indexOf("pdf"))>-1?Ki.replaceSelection(`<a href="/api/attachments/${_s.id}?type=${Ho.type}&disposition=inline" target="_blank">${Ho.name}</a>`):Ar.includes(ia)?Ki.replaceSelection(`<a href="/api/attachments/${_s.id}?type=office&disposition=inline" target="_blank">${Ho.name}</a>`):Ki.replaceSelection(`[${Ho.name}](/api/attachments/${_s.id}?type=${_s.content_type})`):(_s==null?void 0:_s.status)===401&&(document.location.href="/user/login")})}catch(as){gn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ki=Be().fromTextArea(Co.current,{mode:Pn,lineNumbers:!Ot,lineWrapping:!0,value:Ke,autoCloseTags:!0,autoCloseBrackets:!0});return Ki.on("keyup",function(Xn,ar){ar.keyCode===8&&(Xn.getValue()==""?Ki.setOption("placeholder",li):Ki.setOption("placeholder",null))}),Ki.on("keydown",function(Xn,ar){if(ar.keyCode===8){var to=Pr(Xn);to&&ar.preventDefault()}}),Tt&&Ki.focus(),Ki.on("paste",sr),ti&&Ki.on("beforeChange",function(Xn,ar){(ar.origin==="paste"||ar.origin==="+input")&&ar.cancel()}),Xi(Ki),()=>{Ki.off("paste",sr)}}},[]);const hr=(0,Me.useCallback)(()=>{if(ho.current)try{}catch(sr){console.log(sr,"---- to set md editor body height")}},[Hi,ho,fi]);(0,Me.useEffect)(()=>{function sr(){let Ki=new ke.Z(Xn=>{for(let ar of Xn)(ar.target.offsetHeight>0||ar.target.offsetWidth>0)&&(hr(),Mn.setSize("100%","100%"),Mn.refresh())});return Ki.observe(Co.current.parentElement),Ki}if(Mn){const Ki=sr();return()=>{var Xn,ar;(Xn=Co.current)!=null&&Xn.parentElement&&Ki.unobserve((ar=Co.current)==null?void 0:ar.parentElement)}}},[Mn,hr]),(0,Me.useEffect)(()=>{if(Mn){let sr=[];for(const[Ki,Xn]of Object.entries(no)){let ar={[Ki]:()=>{ci(Xn)}};sr.push(ar),Mn.addKeyMap(ar)}return()=>{for(let Ki of sr)Mn.removeKeyMap(Ki)}}},[Mn]),(0,Me.useEffect)(()=>{$t!==fi&&Si($t)},[$t]),(0,qi.Z)(()=>{if(!Nt&&tr>0){let sr=new Date().getTime(),Ki=window.sessionStorage.getItem(mn);sr>=tr+yi&&(!Ki||Ki!==Nr)&&(window.sessionStorage.setItem(mn,Nr),Br(!0))}},yi),(0,Me.useEffect)(()=>{Jn(_t)},[Mn,_t]),(0,Me.useEffect)(()=>{Mn&&Tt&&Mn.focus()},[Mn,Tt]),(0,Me.useEffect)(()=>{if(En&&Mn){let sr=function(Xn){let ar=Xn.target;if(Ui.current){let to=ar.scrollTop/ar.scrollHeight;Ui.current.scrollTop=Ui.current.scrollHeight*to}};const Ki=Mn.getScrollerElement();return Ki.addEventListener("scroll",sr),()=>{Ki.removeEventListener("scroll",sr)}}},[Mn,En]),(0,Me.useEffect)(()=>{if(Mn&&jn){let sr=function(Ki,Xn){jn(Ki,Xn)};return Mn.on("beforeChange",sr),()=>{Mn.off("beforeChange",sr)}}},[Mn,jn]),(0,Me.useEffect)(()=>{if(Mn&&rn){let sr=function(){rn(Mn.getValue())};return Mn.on("blur",sr),()=>{Mn.off("blur",sr)}}},[Mn,rn]);function Pr(sr,Ki){var Xn=sr.getDoc(),ar=Xn.getCursor(),to=Xn.getLine(ar.line),Ro=to.charAt(ar.ch-1),Bo=to.lastIndexOf("@\u2581@",ar.ch),Xo=to.lastIndexOf("@\u2581\u2581@",ar.ch),as=Bo>Xo?Bo:Xo,Ho=Bo>Xo?3:4;if(Zi.indexOf(Ro)===-1)return null;if(console.log("change1:",Ki,sr,to,ar,as,Bo,Xo,Ro),as>=0&&ar.ch-as<5){var ia=as+Ho;return Xn.replaceRange("",{line:ar.line,ch:as},{line:ar.line,ch:ia}),{line:ar.line,ch:ia}}return null}(0,Me.useEffect)(()=>{if(Mn){let sr=function(Ki,Xn){const ar=Ki.getValue();zi(ar),Fi(new Date().getTime()),Ki.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),qe&&(Ln?qe(ar,fr(ar)):qe(ar))};return Mn.on("change",sr),()=>{Mn.off("change",sr)}}},[Mn,qe]),(0,Me.useEffect)(()=>{if(Mn)if(Ke==null)Mn.setValue(""),zi("");else{const sr=window.scrollY||window.pageYOffset;Ke!==Mn.getValue()&&(Mn.setValue(Ke),zi(Ke),Mn.setCursor(ti?1:Mn.lineCount(),0),window.scrollTo(0,sr))}},[Mn,Ke]);const ci=(0,Me.useCallback)(sr=>{const Ki=Mn.getCursor(),Xn=Mn.getSelection();let ar=Xn.split(`
|
|
|
`);switch(sr){case"bold":return Mn.replaceSelection("**"+Xn+"**"),Xn===""&&Mn.setCursor(Ki.line,Ki.ch+2),Mn.focus();case"italic":return Mn.replaceSelection("*"+Xn+"*"),Xn===""&&Mn.setCursor(Ki.line,Ki.ch+1),Mn.focus();case"code":return Mn.replaceSelection("`"+Xn+"`"),Xn===""&&Mn.setCursor(Ki.line,Ki.ch+1),Mn.focus();case"inline-latex":return Oi("inline-latex"),Mn.focus();case"latex":return Mn.replaceSelection("```latex\n"+Xn+"\n```"),Mn.setCursor(Ki.line+1,Xn.length+1),Mn.focus();case"line-break":return Mn.replaceSelection(`<br/>
|
|
|
`),Mn.focus();case"list-ul":return Xn===""?Mn.replaceSelection("- "+Xn):Mn.replaceSelection(ar.map(to=>to===""?"":`- ${to}`).join(`
|
|
|
`)),Mn.focus();case"list-ol":return Xn===""?Mn.replaceSelection("1. "+Xn):Mn.replaceSelection(ar.map((to,Ro)=>to===""?"":`${Ro+1}. ${to}`).join(`
|
|
|
`)),Mn.focus();case"add-null-ch":return Xn===""&&Mn.setCursor(Ki.line,Ki.ch),Mn.replaceSelection(dr),Mn.focus();case"add-signal":return Xn===""&&Mn.setCursor(Ki.line,Ki.ch),Mn.replaceSelection(rt),Mn.focus();case"add-multiple":return Xn===""&&Mn.setCursor(Ki.line,Ki.ch),Mn.replaceSelection(Zi),Mn.focus();case"inster-template-1":return Xn===""&&Mn.setCursor(Ki.line,Ki.ch),Mn.replaceSelection(Ir),Mn.focus();case"eraser":return Mn.setValue(""),Mn.focus();case"trigger-watch":return Jn(!En),Mn.focus();case"trigger-full-screen":return Si(!fi),Mn.focus();case Hn:Oi(Hn);return;case Ci:Oi(Ci);return;case An:Oi(An);return;case ai:Oi(ai);return;case"maths-latex":Oi("maths-latex");return;case qn:Oi(qn);return;case $i:Oi($i);return;default:throw new Error}},[Mn,En,fi]),Mt=(0,Me.useCallback)((sr,Ki)=>{var Xn,ar,to,Ro,Bo,Xo;switch(Oi(""),hi){case Hn:const{title:la,link:kn}=sr;return Mn.replaceSelection(`[${la}](${kn})`),Mn.focus();case Ci:const{language:Is,content:Pu}=sr;return Mn.replaceSelection(["```"+Is,Pu,"```"].join(`
|
|
|
`)),Mn.focus();case"maths-latex":for(var as=atob(sr),Ho=new Uint8Array(as.length),ia=0;ia<as.length;ia++)Ho[ia]=as.charCodeAt(ia);var _s=new Blob([Ho],{type:"image/png"});(0,gt.I)(_s,br=>{br.id?Mn.replaceSelection(``):(br==null?void 0:br.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Mn.replaceSelection("`$$"+sr+"$$`");break;case An:case ai:case Ti:const{src:Ua,alt:Sa}=sr,us=Ki,Ws=(to=(ar=(Xn=us==null?void 0:us.name)==null?void 0:Xn.split("."))==null?void 0:ar.pop)==null?void 0:to.call(ar);return((Ro=us==null?void 0:us.type)==null?void 0:Ro.indexOf("image"))>-1||!(us!=null&&us.type)?us!=null&&us.align||us!=null&&us.width?Mn.replaceSelection(`<p style="text-align:${us.align||"initial"}"><img width="${us.width?us.width+"%":"initial"}" src="${Ua}" alt="${Sa||""}" /></p>`):Mn.replaceSelection(`<img width="100%" src="${Ua}" alt="${Sa||""}" />`):((Bo=us==null?void 0:us.type)==null?void 0:Bo.indexOf("video"))>-1?Mn.replaceSelection(`<video width="100%" controls src="${Ua}"></video>`):((Xo=us==null?void 0:us.type)==null?void 0:Xo.indexOf("pdf"))>-1?Mn.replaceSelection(`<a href="${Ua}?type=${us.type}&disposition=inline" target="_blank">${us.name}</a>`):Ar.includes(Ws)?Mn.replaceSelection(`<a href="${Ua}?type=office&disposition=inline" target="_blank">${us.name}</a>`):Mn.replaceSelection(`[${us.name}](${Ua})`),Mn.focus();case $i:const{row:_o,col:No,align:Lo}=sr;let ua=`
|
|
|
`;for(let br=0;br<_o;br++){let uo=[],Yr=[];for(let Li=0;Li<No;Li++)br===1&&Yr.push(lr[Lo]),uo.push(" ");br===1&&(ua+=`| ${Yr.join(" | ")} |
|
|
|
`),ua+=`| ${uo.join(No===1?"":" | ")} |
|
|
|
`}return Mn.replaceSelection(ua+`
|
|
|
`),Mn.focus();default:throw new Error}},[Mn,hi]),Ur=(0,Me.useMemo)(()=>{switch(hi){case Hn:return Me.createElement(mt,{callback:Mt,onCancel:Hr});case Ci:return Me.createElement(Pt.Z,{callback:Mt,onCancel:Hr});case An:return Me.createElement(gt.Z,{callback:Mt,onCancel:Hr});case qn:return Me.createElement(Ie,{callback:Mt,onCancel:Hr});case $i:return Me.createElement($e,{callback:Mt,onCancel:Hr});case"maths-latex":return Me.createElement(pn,{showSaveButton:!0,callback:Mt});case"inline-latex":return Me.createElement(ln.Z,{showSaveButton:!0,callback:Mt});default:return null}},[hi]);function Hr(){Oi("")}(0,Me.useEffect)(()=>{if(Yi.current){let sr=function(Bo){to=!0,Ro=Bo.pageY},Ki=function(){to=!1},Xn=function(Bo){if(to){let Xo=Bo.pageY-Ro;Xo<0&&(Xo=0),Xo>300&&(Xo=300);let as=St+Xo+"px";mr(as)}},ar=Yi.current,to=!1,Ro=0;return ar.addEventListener("mousedown",sr),document.addEventListener("mousemove",Xn),document.addEventListener("mouseup",Ki),()=>{ar.removeEventListener("mousedown",sr),document.removeEventListener("mousemove",Xn),document.removeEventListener("mouseup",Ki)}}},[Mn,Yi]),(0,Me.useEffect)(()=>{mr(St)},[St]);const ts=$r(Ye),Ao=$r(Hi),ss={width:ts,height:Ao},_r=(0,Me.useMemo)(()=>{if(tr){let sr=new Date(tr),Ki=sr.getHours(),Xn=sr.getMinutes(),ar=sr.getSeconds();return Ki=Ki<10?"0"+Ki:Ki,Xn=Xn<10?"0"+Xn:Xn,ar=ar<10?"0"+ar:ar,`${Ki}:${Xn}:${ar}`}return 0},[tr]),fr=sr=>{const Ki=[];if(Ln){let Xn=-1;sr=sr.replace(/(@▁▁@|@▁@)/g,function(ar,to,Ro){Ki.push({multiLine:ar!==rt})})}return Ki};function Kr(){window.sessionStorage.removeItem(mn),Br(!1),Fi(0)}function pr(){Br(!1),Fi(0),Mn.setValue(window.sessionStorage.getItem(mn))}(0,Me.useEffect)(()=>{lo[hi]&&hi!==ai&&hi!==qn&&setTimeout(()=>{const sr=document.getElementsByClassName("markdown-popup-form")[0],Ki=window.innerWidth/2-sr.offsetWidth/2,Xn=window.innerHeight/2-sr.offsetHeight/2;vr(Ki),Dr(Xn)},0)},[hi]);const eo=sr=>{sr.preventDefault();const Ki=sr.clientX-Nn,Xn=sr.clientY-So;document.body.onmousemove=ar=>{let to=ar.clientX-Ki,Ro=ar.clientY-Xn;const Bo=document.getElementsByClassName("markdown-popup-form")[0],Xo=window.innerWidth-Bo.offsetWidth,as=window.innerHeight-Bo.offsetHeight;to=Math.max(0,Math.min(to,Xo)),Ro=Math.max(0,Math.min(Ro,as)),Yo(ar.clientX,ar.clientY,Ki,Xn)&&(vr(to),Dr(Ro))},document.body.onmouseup=function(){document.body.onmousemove=null}},Yo=(sr,Ki,Xn,ar)=>{const to=document.body.clientHeight,Ro=document.body.clientWidth;return sr<20&&Xn>sr||sr>Ro-20&&Xn<sr||Ki<20&&ar>Ki||Ki>to-20&&ar<Ki?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"markdown-editor-wrapper",ref:ho},Me.createElement("div",{className:`markdown-editor-container ${ei} ${En?"on-preview":""} ${Ot?"mini":""} ${fi?"full-screen":""}`,style:ss},Me.createElement(De,{insertTemp:dn,watch:En,fullScreen:fi,showNullButton:un,showNullProgramButton:Ln,onActionCallback:ci,hidetoolBar:Dn,extraUse:Ri}),Me.createElement("div",{className:"markdown-editor-body"},Me.createElement("div",{className:"codemirror-container"},Me.createElement("textarea",{ref:Co,placeholder:li})),En?Me.createElement("div",{ref:Ui,className:"preview-container"},Pn==="stex"&&Me.createElement(ve,{value:Nr}),Pn!=="stex"&&Me.createElement(le.Z,{disabledFill:Bn,showProgramFill:Ln,value:Nr})):null))),sn?Me.createElement("a",{ref:Yi,className:"editor-resize"}):null,hi===ai&&Me.createElement(bn,{callback:Mt,onCancel:Hr}),hi===qn&&Me.createElement(Ie,{callback:Mt,onCancel:Hr}),Me.createElement(ze.Z,null,lo[hi]&&hi!==ai&&hi!==qn?Me.createElement(Ft.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Nn,top:So},title:Me.createElement("div",{style:{cursor:"move"},onMouseDown:eo},lo[hi]),open:!0,onCancel:Hr,footer:null,destroyOnClose:!0,width:hi===qn?"1200px":null,height:hi===qn?"80vh":null,className:"markdown-popup-form"},Ur):null))}},28451:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return Pe},I:function(){return De}});var Me=Ee(78241),me=Ee(8591),Be=Ee(92832),ke=Ee(81327),Ce=Ee(5871),Le=Ee(5112),he=Ee(3113),ye=Ee(77903),xe=Ee(59301),ge=Ee(59301),le=Object.defineProperty,ve=Object.defineProperties,de=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(ze,Ze,Xe)=>Ze in ze?le(ze,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ze[Ze]=Xe,ie=(ze,Ze)=>{for(var Xe in Ze||(Ze={}))z.call(Ze,Xe)&&oe(ze,Xe,Ze[Xe]);if(ce)for(var Xe of ce(Ze))ee.call(Ze,Xe)&&oe(ze,Xe,Ze[Xe]);return ze},se=(ze,Ze)=>ve(ze,de(Ze));const{useForm:ue}=Me.default,Se={width:280,marginRight:10},we={labelCol:{span:5},wrapperCol:{span:19}};var Pe=({callback:ze,onCancel:Ze})=>{const[Xe]=ue();let Ge=(0,xe.useRef)();function ft(et){Ge.current.width=Xe.getFieldValue("width"),Ge.current.align=Xe.getFieldValue("align"),ze(et,Ge.current)}function at(et,yt){if(et.status===-1){me.ZP.error(et.message);return}Xe.setFieldsValue({src:`/api/attachments/${et.id}`,type:yt.type})}function Ct(et){let yt=et.target.files[0];Ge.current=yt,De(yt,at)}return ge.createElement(Me.default,se(ie({form:Xe},we),{className:"upload-image-panel",onFinish:ft,style:{width:470,overflow:"hidden"}}),ge.createElement(Me.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ge.createElement("div",{className:"flex-container"},ge.createElement(Me.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},ge.createElement(Be.default,{style:Se})),ge.createElement(Ae,{onFileChange:Ct}))),ge.createElement(Me.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ge.createElement(Be.default,{style:{width:264}})),ge.createElement(Me.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ge.createElement(ke.Z,null,ge.createElement(Me.default.Item,{name:"width",style:{margin:0}},ge.createElement(Ce.Z,{style:{width:264}})),ge.createElement("span",{className:"ml8"},"%"))),ge.createElement(Me.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ge.createElement(Le.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),ge.createElement("aside",null,ge.createElement(Me.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ge.createElement(he.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ge.createElement(he.ZP,{type:"default",onClick:Ze},"\u53D6\u6D88"))))};function Ae({onFileChange:ze}){return ge.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ge.createElement("input",{type:"file",onChange:ze}))}function De(ze,Ze){if(!ze)throw new String("\u6CA1\u6709\u6587\u4EF6");let Xe=new FormData;Xe.append("editormd-image-file",ze),Xe.append("file_param_name","editormd-image-file"),Xe.append("byxhr","true");var Ge=new window.XMLHttpRequest;Ge.withCredentials=!0,Ge.addEventListener("load",function(ft){Ze(JSON.parse(ft.target.responseText),ze)},!1),Ge.addEventListener("error",function(ft){console.error(ft)},!1),Ge.open("POST",`${ye.KI}/api/attachments.json`),Ge.send(Xe)}},79346:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return Be}});var Me=Ee(59301),me=Ee(4676);class Be extends Me.Component{constructor(Ce){super(Ce);const Le=window.document;this.node=Le.createElement("div"),Le.body.appendChild(this.node)}render(){const{children:Ce}=this.props;return(0,me.createPortal)(Ce,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(_n,en,Ee){"use strict";Ee.d(en,{SV:function(){return nt},ZP:function(){return vt}});var Me=Ee(59301),me=Ee(76374);const Be={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},ke={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},Ce={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},Le={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},he={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
|
`)}]};var ye=Ee(53184),xe=Ee.n(ye),ge=Object.defineProperty,le=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ee=(He,Ie,We)=>Ie in He?ge(He,Ie,{enumerable:!0,configurable:!0,writable:!0,value:We}):He[Ie]=We,oe=(He,Ie)=>{for(var We in Ie||(Ie={}))ce.call(Ie,We)&&ee(He,We,Ie[We]);if(de)for(var We of de(Ie))z.call(Ie,We)&&ee(He,We,Ie[We]);return He},ie=(He,Ie)=>le(He,ve(Ie)),se=(He,Ie,We)=>new Promise((Oe,be)=>{var Ne=Je=>{try{dt(We.next(Je))}catch(At){be(At)}},$e=Je=>{try{dt(We.throw(Je))}catch(At){be(At)}},dt=Je=>Je.done?Oe(Je.value):Promise.resolve(Je.value).then(Ne,$e);dt((We=We.apply(He,Ie)).next())});const ue={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},Se=(He,Ie)=>Ie.map(We=>({label:We,kind:He.languages.CompletionItemKind.Keyword,insertText:We})),we=He=>Object.keys(ue.tables).map(Ie=>({label:Ie,kind:He.languages.CompletionItemKind.Variable,insertText:Ie})),Pe=(He,Ie)=>{const We=ue.tables[He];return We?We.map(Oe=>({label:Oe,kind:Ie.languages.CompletionItemKind.Field,insertText:Oe})):[]};function Ae(He,Ie,We,Oe,be){let Ne=Ie.getWordUntilPosition(We),$e={startLineNumber:We.lineNumber,endLineNumber:We.lineNumber,startColumn:Ne.startColumn,endColumn:Ne.endColumn},dt=Oe.map(Je=>({label:Je,kind:He.languages.CompletionItemKind.Keyword,insertText:Je,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e}));return be.map(Je=>{dt.push(ie(oe({},Je),{range:$e}))}),dt}var De=He=>{ue.languages.map(be=>(He.languages.registerDocumentFormattingEditProvider(be,{provideDocumentFormattingEdits(Ne,$e,dt){return se(this,null,function*(){const Je=xe()(Ne.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Ne.getFullModelRange(),text:Je}]})}}),be));const Ie=Ce.quickKey.map(be=>({label:be.label,kind:He.languages.CompletionItemKind.Method,insertText:be.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet})),We=Le.quickKey.map(be=>({label:be.label,kind:He.languages.CompletionItemKind.Method,insertText:be.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Oe=ke.quickKey.map(be=>({label:be.label,kind:He.languages.CompletionItemKind.Method,insertText:be.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet}));He.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(be,Ne){var $e=be.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=be.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...Ce.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...Ce.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Je.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(be,Ne){var $e=be.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn};return{suggestions:[...Be.keywords.map(Je=>({label:Je,kind:He.languages.CompletionItemKind.Function,documentation:Je,insertText:Je,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(be,Ne){var $e=be.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=be.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...ke.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...ke.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Je.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(be,Ne){var $e=be.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=be.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...he.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...he.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Je.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}}),He.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(be,Ne){var $e=be.getWordUntilPosition(Ne),dt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Je=be.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...Le.keywords.map(At=>({label:At,kind:He.languages.CompletionItemKind.Function,documentation:At,insertText:At,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt})),...Le.quickKey.map(At=>({label:At.label,kind:He.languages.CompletionItemKind.Function,documentation:At.content,insertText:Je.startsWith("#")?At.content.replace(/#/,""):At.content,insertTextRules:He.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:dt}))]}}})};const ze="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ze=Object.defineProperty,Xe=(He,Ie,We)=>Ie in He?Ze(He,Ie,{enumerable:!0,configurable:!0,writable:!0,value:We}):He[Ie]=We,Ge=(He,Ie,We)=>Xe(He,typeof Ie!="symbol"?Ie+"":Ie,We);const ft=class mx{constructor(Ie,We,Oe){this.placeholder=Ie,this.editor=We,this.monaco=Oe,We.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};Ge(ft,"ID","editor.widget.placeholderHint");var Ct=ft,et=Ee(96236),yt=Ee(8591),st=Ee(6848),zt=Ee(89392),lt=Ee(34604),tt=Ee(56102),ut=Object.defineProperty,mt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,hn=(He,Ie,We)=>Ie in He?ut(He,Ie,{enumerable:!0,configurable:!0,writable:!0,value:We}):He[Ie]=We,Qt=(He,Ie)=>{for(var We in Ie||(Ie={}))Ft.call(Ie,We)&&hn(He,We,Ie[We]);if(gt)for(var We of gt(Ie))Ht.call(Ie,We)&&hn(He,We,Ie[We]);return He},bn=(He,Ie)=>mt(He,Pt(Ie)),Wt=(He,Ie)=>{var We={};for(var Oe in He)Ft.call(He,Oe)&&Ie.indexOf(Oe)<0&&(We[Oe]=He[Oe]);if(He!=null&>)for(var Oe of gt(He))Ie.indexOf(Oe)<0&&Ht.call(He,Oe)&&(We[Oe]=He[Oe]);return We},Kt=(He,Ie,We)=>new Promise((Oe,be)=>{var Ne=Je=>{try{dt(We.next(Je))}catch(At){be(At)}},$e=Je=>{try{dt(We.throw(Je))}catch(At){be(At)}},dt=Je=>Je.done?Oe(Je.value):Promise.resolve(Je.value).then(Ne,$e);dt((We=We.apply(He,Ie)).next())});function Jt(He){return/^\d+$/.test(He)?`${He}px`:He}function Yt(){}let kt=!1;const pt={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Bt(He=[]){let Ie=He;if(Array.isArray(He)){for(let We=0;We<He.length;We++){let Oe=pt[He[We]];if(Oe)return Oe}return Ie[0]}return pt[Ie]||Ie}let xt=null;var vt=He=>{var Ie=He,{width:We="100%",height:Oe="100%",value:be,language:Ne="javascript",style:$e={},options:dt={},overrideServices:Je={},theme:At="vs-dark",onEditBlur:tn,isCopy:pn=!1,onSave:ln,autoHeight:gn=!1,forbidCopy:Hn=!1,onChange:An=Yt,editorDidMount:qn=Yt,onFocus:ai=Yt,onBreakPoint:Ti=Yt,breakPointValue:Ci=[],filename:$i="educoder.txt",errorLine:or,errorContent:lr="",highlightLine:qi,openBreakPoint:Fr=!1,placeholder:Mr=""}=Ie,yi=Wt(Ie,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"]);const dr=(0,Me.useRef)(),Zi=(0,Me.useRef)({}),rt=(0,Me.useRef)(),Ir=(0,Me.useRef)(),Ar=(0,Me.useRef)([]),$r=(0,Me.useRef)(!1),co=(0,Me.useRef)(),mo=(0,Me.useRef)(),no=(0,Me.useRef)(!1),[lo,ri]=(0,Me.useState)(!1);function Ke(){let $t;return dr.current&&($t=new me.Z(rn=>{for(let jn of rn)(jn.target.offsetHeight>0||jn.target.offsetWidth>0)&&Zi.current.instance.layout()}),$t.observe(dr.current)),$t}function qe(){yt.ZP.warning({content:decodeURIComponent(ze),key:"monaco-editor-tip"})}const Ye=()=>{let $t=Zi.current.instance;if(be!=null&&$t&&lo){const rn=$t.getModel();rn&&be!==rn.getValue()&&(kt=!0,rn.setValue(be),$t.layout(),kt=!1)}};(0,Me.useEffect)(()=>{const $t=lt.Z.subscribe("formatDocument",rn=>{var jn;let On=Zi.current.instance;(jn=On==null?void 0:On.getAction)==null||jn.call(On,"editor.action.formatDocument").run()});return window.updateMonacoValue=rn=>{An(rn)},$t},[]),(0,Me.useEffect)(()=>{var $t;let rn=Zi.current.instance;Ir.current&&clearTimeout(Ir.current),Ir.current=setTimeout(()=>{Ye()},500),be&&(be!=null&&be.length)&&(($t=rn==null?void 0:rn.updateOptions)==null||$t.call(rn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(be.split(/\r\n|\r|\n/g).length))+3,5)}))},[be,lo,Zi.current]),(0,Me.useEffect)(()=>{if(or&&Zi.current&&Zi.current.instance){let rn=Zi.current.instance;rn.changeViewZones(function(jn){var On=document.createElement("div");On.style.padding="10px 20px",On.style.width="calc(100% - 20px)",On.className="my-error-line-wrp",On.innerHTML=lr,jn.addZone({afterLineNumber:or||11,heightInLines:3,domNode:On})});var $t={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};rn.addOverlayWidget($t),rn.revealPositionInCenter({lineNumber:20,column:1})}},[or,Zi.current,lo]);const St=($t="",rn)=>{if(!$t||$t.trim()==="")return!0;const On=Zi.current.instance.getModel().getLineTokens(rn);let ei=!1;for(let Gn=0;Gn<2;Gn++)On.getStandardTokenType(Gn)===1&&(ei=!0);return ei};(0,Me.useEffect)(()=>{var $t;const rn=($t=Zi.current)==null?void 0:$t.instance;if(rn&&lo&&Hn){const jn=rn.onDidBlurEditorWidget(()=>{no.current=!1}),On=rn.onDidFocusEditorText(()=>{no.current=!0});return()=>{jn.dispose(),On.dispose()}}},[Zi.current,lo,Hn]),(0,Me.useEffect)(()=>{var $t;if(($t=Zi.current)!=null&&$t.instance&&lo&&Fr){let rn=Zi.current.instance,jn=rn.getModel();if(!jn)return;(()=>{var zi;let En=[],Jn=[];const fi=jn.getAllDecorations();for(let hi of fi)hi.options.className==="highlighted-line"&&(En.push((zi=hi==null?void 0:hi.range)==null?void 0:zi.startLineNumber),Jn.push(hi==null?void 0:hi.id));if(qi===En[0])return;jn.deltaDecorations(Jn,[]);const Si=jn.getLineCount();qi&&qi<=Si&&(rn.deltaDecorations([],[{range:new xt.Range(qi,1,qi,jn.getLineMaxColumn(qi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),rn.revealLineInCenter(qi))})();const ei=(zi=!1)=>{var En;let Jn=[],fi=[];const Si=jn.getAllDecorations();for(let hi of Si)hi.options.linesDecorationsClassName==="breakpoints-select"&&(Jn.push((En=hi==null?void 0:hi.range)==null?void 0:En.startLineNumber),fi.push(hi==null?void 0:hi.id));if(zi)return{lines:Jn,ids:fi};Ti(Jn)},Gn=zi=>Kt(void 0,null,function*(){let En={range:new xt.Range(zi,1,zi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield jn.deltaDecorations([],[En]),ei()}),ti=zi=>Kt(void 0,null,function*(){let En=[];const Jn=rn.getLineDecorations(zi);for(let fi of Jn)fi.options.linesDecorationsClassName==="breakpoints-select"&&En.push(fi.id);yield jn.deltaDecorations(En,[]),ei()}),Bn=zi=>{let En=rn.getLineDecorations(zi);for(let Jn of En)if(Jn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,zt.isEqual)(Ci,ei(!0).lines)){jn.deltaDecorations(ei(!0).ids,[]);const zi=Ci.map(En=>({range:new xt.Range(En,1,En,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));jn.deltaDecorations([],zi)}const li=rn.onDidChangeModelContent(zi=>{let En=rn.getPosition();if(En){let Jn=En.lineNumber;clearTimeout(mo.current),mo.current=setTimeout(()=>{St(jn.getLineContent(Jn),Jn)?ti(Jn):Bn(Jn)?(ti(Jn),Gn(Jn)):ei()},100)}}),Di=rn.onMouseDown(zi=>{var En,Jn,fi;if(zi.target.detail&&((fi=(Jn=(En=zi.target)==null?void 0:En.element)==null?void 0:Jn.className)!=null&&fi.includes("line-numbers"))){let Si=zi.target.position.lineNumber;if(St(jn.getLineContent(Si),Si))return;Bn(Si)?ti(Si):Gn(Si)}}),Ri=zi=>{let En={range:new xt.Range(zi,1,zi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ar.current=rn.deltaDecorations(Ar.current,[En])},Mn=()=>{Ar.current=rn.deltaDecorations(Ar.current,[])},Xi=rn.onMouseMove(zi=>{var En,Jn,fi;if(Mn(),zi.target.detail&&((fi=(Jn=(En=zi.target)==null?void 0:En.element)==null?void 0:Jn.className)!=null&&fi.includes("line-numbers"))){let Si=zi.target.position.lineNumber;if(St(jn.getLineContent(Si),Si))return;Ri(Si)}}),Nr=rn.onMouseLeave(()=>{Mn()});return()=>{li.dispose(),Di.dispose(),Xi.dispose(),Nr.dispose()}}},[Zi.current,lo,Ci,qi,Fr,Ne]),(0,Me.useEffect)(()=>{var $t;($t=Zi.current)!=null&&$t.instance&&Fr&&Zi.current.instance.setPosition({lineNumber:0,column:0})},[qi]);function Ot(){let $t=Zi.current.instance;if($t){const rn=$t.getSelection(),jn=Zi.current.pastePos||{},On=new xt.Range(jn.startLineNumber||rn.endLineNumber,jn.startColumn||rn.endColumn,jn.endLineNumber||rn.endLineNumber,jn.endColumn||rn.endColumn);setTimeout(()=>{$t.executeEdits("",[{range:On,text:""}])},300)}}function Tt($t){(window.navigator.platform.match("Mac")?$t.metaKey:$t.ctrlKey)&&$t.keyCode==83&&($t.preventDefault(),ln())}const _t=()=>{if(gn&&Zi.current.instance){const $t=Zi.current.instance.getContentHeight();Ln($t<Oe?Oe:$t)}else Ln(Oe)};function dn($t){var rn=document.createEvent("MouseEvents");rn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),$t.dispatchEvent(rn)}const Pn=$t=>{if(!no.current)return;const{keyCode:rn,ctrlKey:jn,metaKey:On,target:ei,type:Gn}=$t;return(Gn==="paste"||(rn===67||rn===86)&&(On||jn))&&ei.nodeName==="TEXTAREA"&&(qe(),$t.preventDefault()),!1};function mn($t,rn){var jn=window.URL||window.webkitURL||window,On=new Blob([rn]),ei=document.createElementNS("http://www.w3.org/1999/xhtml","a");ei.href=jn.createObjectURL(On),ei.download=$t,dn(ei)}(0,Me.useEffect)(()=>{_t()},[_t]),(0,Me.useEffect)(()=>{dr.current&&!lo&&Promise.all([Ee.e(8909),Ee.e(3267)]).then(Ee.bind(Ee,71448)).then($t=>{try{xt=$t,Zi.current.instance=xt.editor.create(dr.current,{value:be,language:Bt(Ne),theme:At,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Je);const rn=Zi.current.instance;let ei=[...et.BH._menuItems].find(li=>li[0]._debugName=="EditorContext")[1],Gn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ti=(li,Di)=>{var Ri,Mn;let Xi=li._first;do Di.includes((Mn=(Ri=Xi.element)==null?void 0:Ri.command)==null?void 0:Mn.id)&&li._remove(Xi);while(Xi=Xi.next)};if(qn(rn,xt),setTimeout(()=>{_t(),Zi.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{mn($i||"educoder.txt",rn.getValue())}})},500),Zi.current.subscription=rn.onDidChangeModelContent(li=>{$r.current?clearTimeout(co.current):(_t(),An(rn.getValue(),li)),co.current=setTimeout(()=>{$r.current=!1},500)}),window.Monaco||De(xt,Bt(Ne)),Hn&&(ti(ei,Gn),dr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Pn),window.removeEventListener("paste",Pn),window.addEventListener("keydown",Pn),window.addEventListener("paste",Pn)),window.Monaco=xt,tn&&rn.onDidBlurEditorWidget(()=>{tn(rn.getValue())}),ai&&rn.onDidFocusEditorText(()=>{ai(rn.getValue())}),Hn)try{rn.onDidPaste(li=>{const Di=rn.getSelection(),Ri=Zi.current.pastePos||{},Mn=new xt.Range(Ri.startLineNumber||Di.endLineNumber,Ri.startColumn||Di.endColumn,Ri.endLineNumber||Di.endLineNumber,Ri.endColumn||Di.endColumn);rn.executeEdits("",[{range:li.range,text:""}])})}catch(li){}let Bn=Ke();return Mr&&typeof Mr=="string"&&new Ct(Mr,rn,xt),ri(!0),()=>{const li=Zi.current.instance;li.dispose();const Di=li.getModel();Di&&Di.dispose(),Zi.current.subscription&&Zi.current.subscription.dispose(),Bn.unobserve(dr.current)}}catch(rn){}})},[]),(0,Me.useEffect)(()=>{if(Zi.current.instance&&lo)return document.addEventListener("keydown",Tt,!1),()=>{document.removeEventListener("keydown",Tt)}},[ln,lo]),(0,Me.useEffect)(()=>{let $t=Zi.current.instance;if($t&&lo){let rn=Bt(Ne);xt.editor.setModelLanguage($t.getModel(),rn)}},[Ne,lo]),(0,Me.useEffect)(()=>{Zi.current.instance&&lo&&xt.editor.setTheme(At)},[At,lo]),(0,Me.useEffect)(()=>{let $t=Zi.current.instance;rt.current=dt,$t&&lo&&($t.updateOptions(Qt({},dt)),setTimeout(()=>{$t.getModel().updateOptions(Qt({},dt))},200))},[JSON.stringify(dt),lo]),(0,Me.useEffect)(()=>{let $t=Zi.current.instance;$t&&lo&&$t.layout()},[We,Oe,lo]);const[sn,Nt]=(0,Me.useState)(Jt(We)),[un,Ln]=(0,Me.useState)(Jt(Oe)),Dn=bn(Qt({},$e),{width:sn,height:un,position:"relative"});return Me.createElement("div",{className:"my-monaco-editor",ref:dr,style:Dn},pn&&Me.createElement(tt.CopyToClipboard,{text:be,onCopy:()=>yt.ZP.success("\u590D\u5236\u6210\u529F")},Me.createElement(st.Z,{title:"\u590D\u5236\u4EE3\u7801"},Me.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Me.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function nt({width:He="100%",height:Ie="100%",original:We,modified:Oe,language:be,options:Ne={}}){const $e=(0,Me.useRef)(),[dt,Je]=(0,Me.useState)(null);function At(gn){let Hn;return $e.current&&(Hn=new me.Z(An=>{for(let qn of An)(qn.target.offsetHeight>0||qn.target.offsetWidth>0)&&gn.layout()}),Hn.observe($e.current)),Hn}(0,Me.useEffect)(()=>($e.current&&Promise.all([Ee.e(8909),Ee.e(9404)]).then(Ee.bind(Ee,2550)).then(gn=>{xt=gn;const Hn=xt.editor.createDiffEditor($e.current,bn(Qt({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ne),{wordWrap:!0}));Je(Hn);let An=At(Hn);return()=>{Hn.dispose();const qn=Hn.getModel();qn&&qn.dispose(),An.unobserve($e.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Me.useEffect)(()=>{dt&&dt.setModel({original:xt.editor.createModel(We,be),modified:xt.editor.createModel(Oe,be)})},[We,Oe,be,dt]);const tn=Jt(He),pn=Jt(Ie),ln={width:tn,height:pn};return Me.createElement("div",{className:"my-diff-editor",ref:$e,style:ln})}},16869:function(_n,en,Ee){"use strict";var Me=Ee(38476),me=Ee(57809),Be=Ee(78673),ke=Ee(59301);const Ce=me.default.Option;en.Z=({isTheoretical:Le,onFontSizeChange:he,cmFontSize:ye,cmCodeMode:xe,autoFormat:ge,onCodeModeChange:le,onTabToSpace:ve,onAutoFormat:de,formatDocument:ce,className:z="",tabToSpace:ee,children:oe,code_editor:ie,challenge:se})=>{const ue={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return ke.createElement("div",{className:`tpi-code-setting ${z}`},ke.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),ke.createElement("section",null,ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),ke.createElement(me.default,{bordered:!1,size:"small",value:xe,onChange:le},ke.createElement(Ce,{value:"vs"},"\u767D\u8272\u80CC\u666F"),ke.createElement(Ce,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!Le&&ke.createElement(ke.Fragment,null,ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),ke.createElement(me.default,{bordered:!1,size:"small",value:ye,onChange:he},ke.createElement(Ce,{value:12},"12px"),ke.createElement(Ce,{value:14},"14px"),ke.createElement(Ce,{value:16},"16px"),ke.createElement(Ce,{value:18},"18px"),ke.createElement(Ce,{value:20},"20px"),ke.createElement(Ce,{value:22},"22px"))),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"Tab\u8F6C\u6362"),ke.createElement(Be.Z,{checked:ee,onChange:ve})),ke.createElement("div",{className:"file-item",onClick:ce},ke.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!Le&&ke.createElement(ke.Fragment,null,ke.createElement("h3",null,"\u5FEB\u6377\u952E"),ke.createElement("section",null,ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),ke.createElement("span",null,"Ctrl + S")),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),ke.createElement("span",null,"F1 / Alt + F1")),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),ke.createElement("span",null,"Ctrl + ]/[")),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),ke.createElement("span",null,"Ctrl + Shift + \\")),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),ke.createElement("span",null,"Home")),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),ke.createElement("span",null,"End"))),oe),!Le&&ke.createElement(ke.Fragment,null,ke.createElement("h3",null,"\u5FEB\u6377\u952E"),ke.createElement("section",null,ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),ke.createElement("span",null,ue[se==null?void 0:se.difficulty])),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),ke.createElement("span",null,ie==null?void 0:ie.name)),ke.createElement("div",{className:"file-item"},ke.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),ke.createElement("span",null,ie!=null&&ie.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},58856:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return me}});var Me=Ee(59301);function me(Be,ke){const Ce=(0,Me.useRef)();(0,Me.useEffect)(()=>{Ce.current=Be}),(0,Me.useEffect)(()=>{function Le(){Ce.current()}if(ke!==null){let he=setInterval(Le,ke);return()=>clearInterval(he)}},[ke])}},25555:function(_n,en,Ee){"use strict";Ee.d(en,{Im:function(){return Ze},ZP:function(){return et},gZ:function(){return at}});var Me=Ee(59301),me=Ee(92832),Be=Ee(3113),ke=Ee(84105),Ce=Ee(87395),Le=Ee(35106),he=Ee(24334),ye=Ee(33538),xe=Ee(85149),ge=Ee(955),le=Ee(13787),ve=Ee(34376),de=Ee(92310),ce=Ee.n(de),z=Ee(59301),ee=Object.defineProperty,oe=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,we=(yt,st,zt)=>st in yt?ee(yt,st,{enumerable:!0,configurable:!0,writable:!0,value:zt}):yt[st]=zt,Pe=(yt,st)=>{for(var zt in st||(st={}))ue.call(st,zt)&&we(yt,zt,st[zt]);if(se)for(var zt of se(st))Se.call(st,zt)&&we(yt,zt,st[zt]);return yt},Ae=(yt,st)=>oe(yt,ie(st));const{TextArea:De}=me.default,ze={visible:!1,tabIndex:"0"},Ze={[Le.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[Le.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[Le.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 Xe=(yt=>(yt[yt.SET_VISIBLE=0]="SET_VISIBLE",yt[yt.SET_TABINDEX=1]="SET_TABINDEX",yt))(Xe||{});function Ge(yt,st){switch(st.type){case 0:return Ae(Pe({},yt),{visible:st.payload});case 1:return Ae(Pe({},yt),{tabIndex:st.payload});default:throw new Error}}function ft({value:yt,className:st}){const[zt,lt]=(0,Me.useState)(!1),tt=(0,Me.useRef)(),ut=(0,Me.useRef)();return(0,Me.useEffect)(()=>{zt&&(ut.current.reset(),ut.current.write((0,ge.pp)(yt||"")))},[yt,zt]),(0,Me.useEffect)(()=>{var mt,Pt,gt,Ft;if(tt.current){ut.current=new ve.Terminal({fontSize:14,disableStdin:!0}),ut.current.open(tt.current);const Ht=tt.current.offsetWidth-14,hn=((Ft=(gt=(Pt=(mt=ut.current)==null?void 0:mt._core)==null?void 0:Pt._renderService)==null?void 0:gt.dimensions)==null?void 0:Ft.actualCellWidth)||9.5,Qt=Math.ceil(Ht/hn);ut.current.resize(Qt,8),lt(!0)}},[]),z.createElement("div",{ref:tt,className:ce()("XtermText-valueRef",st)})}function at(yt){const{status:st,error_msg:zt,output:lt,input:tt,expected_output:ut,is_file:mt,input_file_url:Pt,output_file_url:gt,expected_output_file_url:Ft}=yt;let Ht=null;const hn={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(st){case Le.h.NOMATCH:Ht=z.createElement(z.Fragment,null,z.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!mt&&z.createElement(ft,{className:"mb10",value:tt}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(Pt,tt)},tt)),z.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!mt&&z.createElement(ft,{className:"mb10",value:lt&&he.Base64.decode(lt)||""}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(gt,lt)},lt)),z.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!mt&&z.createElement(ft,{className:"mb10",value:ut&&he.Base64.decode(ut)||""}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(Ft,ut)},ut)));break;case Le.h.EXECUTEFAILURE:Ht=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!mt&&z.createElement(xe.Z,{value:tt,style:hn}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(Pt,tt)},tt)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(zt)));break;case Le.h.COMPILEFAILURE:Ht=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!mt&&z.createElement(xe.Z,{value:tt,style:hn}),mt&&z.createElement("div",{style:hn},z.createElement("a",{onClick:()=>(0,ge.LR)(Pt,tt)},tt)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(zt)));break;case Le.h.PODFAILURE:Ht=z.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Le.h.TIMEOUT:Ht=z.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return z.createElement(z.Fragment,null," ",Ht," ")}function Ct(yt){const{status:st,error_msg:zt,execute_time:lt,output:tt,input:ut,expected_output:mt,is_file:Pt,input_file_url:gt,output_file_url:Ft,expected_output_file_url:Ht}=yt;let hn=null;switch(st){case Le.h.OK:hn=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",lt,"\u79D2"),z.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),z.createElement("pre",null,he.Base64.decode(tt)));break;case Le.h.NOMATCH:hn=z.createElement(z.Fragment,null,z.createElement("p",null,"\u8F93\u5165\uFF1A",z.createElement("pre",null,ut)),z.createElement("p",null,"\u8F93\u51FA\uFF1A",tt&&he.Base64.decode(tt)),z.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",mt&&he.Base64.decode(mt)));break;case Le.h.EXECUTEFAILURE:hn=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",z.createElement("pre",null,ut)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(zt)));break;case Le.h.COMPILEFAILURE:hn=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",z.createElement("pre",null,ut)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(zt)));break;case Le.h.PODFAILURE:hn=z.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Le.h.TIMEOUT:hn=z.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return z.createElement(z.Fragment,null," ",hn," ")}var et=({id:yt,is_file:st,input:zt,debuging:lt,submitting:tt,executingMessage:ut,debugResult:mt,onChangeInput:Pt,onDebugCode:gt,onSubmitCode:Ft})=>{const[Ht,hn]=(0,Me.useReducer)(Ge,ze),{visible:Qt,tabIndex:bn}=Ht;(0,Me.useEffect)(()=>{hn({type:0,payload:!1})},[yt]);function Wt(kt){let pt=kt.target.id;hn({type:1,payload:pt})}function Kt(){hn({type:0,payload:!Qt})}const Jt=(0,Me.useMemo)(()=>{if(mt){const{status:kt}=mt;return z.createElement(z.Fragment,null,Ct(mt))}return null},[mt]);function Yt(){hn({type:0,payload:!0}),hn({type:1,payload:"1"}),gt()}return z.createElement("div",{className:"test-case-panel"},z.createElement("div",{className:`test-case-panel-body ${Qt?"active":""}`},z.createElement("ul",{className:"s-navs"},z.createElement("li",null,z.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),z.createElement(le.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:z.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:st?"":zt,onChange:Pt}),rightNode:lt?z.createElement(ye.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):mt?Jt:z.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")})),z.createElement("a",{className:`btn-collapse ${Qt?"up":""}`,onClick:Kt},Qt?z.createElement(ke.Z,null):z.createElement(Ce.Z,null)),z.createElement("footer",{className:"footer"},z.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),z.createElement("div",{className:"flex-container"},z.createElement(Be.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),z.createElement(Be.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),z.createElement(Be.ZP,{className:"btn-green",type:"ghost",loading:lt,onClick:Yt},"\u8C03\u8BD5\u4EE3\u7801"),z.createElement(Be.ZP,{type:"primary",className:"custom-ant-disabled",loading:tt,disabled:tt,onClick:()=>{hn({type:0,payload:!1}),Ft()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},31723:function(_n,en,Ee){"use strict";Ee.r(en),Ee.d(en,{default:function(){return jt}});var Me=Ee(59301),me=Ee(10906),Be=Ee(76618),ke=Ee(89070),Ce=Ee(31797),Le=Ee(8591),he=Ee(43418),ye=Ee(71418),xe=Ee(57809),ge=Ee(49802),le=Ee(17064),ve=Ee(3294),de=Ee(87169),ce=Ee(43428),z=Ee(23954),ee=Ee(79346),oe=Ee(16479),ie=Ee(16869),se=Ee(59301),ue=Object.defineProperty,Se=Object.defineProperties,we=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,ze=(ht,bt,Et)=>bt in ht?ue(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ze=(ht,bt)=>{for(var Et in bt||(bt={}))Ae.call(bt,Et)&&ze(ht,Et,bt[Et]);if(Pe)for(var Et of Pe(bt))De.call(bt,Et)&&ze(ht,Et,bt[Et]);return ht},Xe=(ht,bt)=>Se(ht,we(bt));const Ge={theme:(0,oe.G)("cmCodeMode","vs-dark"),fontSize:(0,oe.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,oe.G)("cmTabToSpace",!0)};var ft=(ht=>(ht[ht.set_font_size=0]="set_font_size",ht[ht.set_theme=1]="set_theme",ht[ht.on_tab_to_space=2]="on_tab_to_space",ht[ht.set_show_editor_setting=3]="set_show_editor_setting",ht))(ft||{});function at(ht,bt){switch(bt.type){case 3:return Xe(Ze({},ht),{showEditorSetting:bt.payload});case 1:return Xe(Ze({},ht),{theme:bt.payload});case 0:return Xe(Ze({},ht),{fontSize:bt.payload});case 2:return Xe(Ze({},ht),{tabToSpace:bt.payload});default:throw new Error}}var Ct=({isLoading:ht,value:bt,onChange:Et,language:wn,onUpdateCode:fn,ActionBarRender:an=Sn=>se.createElement(et,{onShowCodeSetting:Sn})})=>{const[Sn,xn]=(0,Me.useReducer)(at,Ge),{theme:Cn,fontSize:zn,showEditorSetting:ni,tabToSpace:Zn}=Sn,wi=(0,Me.useRef)(),Kn=(0,Me.useRef)(),gi={onFontSizeChange:Gi=>{xn({type:0,payload:Gi}),(0,oe.t)("cmFontSize",Gi)},tabToSpace:Zn,cmFontSize:zn,className:"oj",cmCodeMode:Cn,onTabToSpace:Gi=>{xn({type:2,payload:Gi}),(0,oe.t)("cmTabToSpace",Gi)},onCodeModeChange:Gi=>{xn({type:1,payload:Gi}),(0,oe.t)("cmCodeMode",Gi)}};function si(){xn({type:3,payload:!1})}function Ii(){xn({type:3,payload:!0})}const Ni={value:bt,language:wn,theme:Cn,height:"calc(100% - 56px)",options:{fontSize:zn,insertSpaces:Zn},onChange:Gi=>{Et(Gi),Kn.current=Gi,clearTimeout(wi.current),wi.current=setTimeout(()=>{fn(Kn.current)},1e4)},onEditBlur:Gi=>{Kn.current&&fn(Kn.current)}};return se.createElement(Me.Fragment,null,se.createElement("div",{className:"code-panel-container"},an(Ii),!ht&&se.createElement(z.ZP,Ze({},Ni))),se.createElement(ee.Z,null,se.createElement(ce.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ni,onClose:si},se.createElement(ie.Z,Ze({},gi)))))};function et({onShowCodeSetting:ht}){return se.createElement("div",{className:"action-bar"},se.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),se.createElement("a",{onClick:ht},se.createElement("i",{className:"iconfont icon-shezhi"})))}var yt=Ee(24334),st=Ee(23257),zt=Ee(25555),lt=Ee(92832),tt=Ee(78241),ut=Ee(3113);const{TextArea:mt}=lt.default,Pt=5e3;var gt=({callback:ht,onCancel:bt,notes:Et})=>{function wn(fn){ht(fn)}return Me.createElement(tt.default,{className:"note-form-panel",onFinish:wn,initialValues:{notes:Et}},Me.createElement(tt.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:Pt,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${Pt}`}]},Me.createElement(mt,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),Me.createElement(tt.default.Item,{style:{textAlign:"right"}},Me.createElement(ut.ZP,{type:"ghost",onClick:bt,style:{marginRight:10}}," \u53D6\u6D88 "),Me.createElement(ut.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},Ft={"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"},Ht={pagination:"pagination___npPu7",info:"info___aRH6C"},hn=Ee(1710),Qt=Ee(58421),bn=Ee(58617),Wt=Ee(81953),Kt=Ee(35106),Jt=Ee(955),Yt=Ee(61186),kt=Ee.n(Yt);const{Column:pt}=hn.default;var Bt=({submitResult:ht,submitting:bt,submitRecords:Et,page:wn,onPageChange:fn,topicId:an})=>{const{status:Sn,id:xn,input:Cn,output:zn,expected_output:ni,is_file:Zn,input_file_url:wi,output_file_url:Kn,expected_output_file_url:gi,error_msg:si}=ht||{},{records:Ii,records_count:Ni}=Et||{},Gi=(0,ke.useParams)();function ki(){Zn?navigator.clipboard.writeText(yt.Base64.decode(si)).then(()=>{Le.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(yt.Base64.decode(zn)).then(()=>{Le.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return Me.createElement(ye.Z,{spinning:bt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:Me.createElement(bn.Z,{style:{fontSize:24},spin:!0})},xn?Me.createElement(Me.Fragment,null,Me.createElement("ul",{className:Ht.info},Me.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",Me.createElement("span",{className:Sn===Kt.h.OK?"c-green":"c-red"},zt.Im[Sn])),Me.createElement("li",{className:Ht.error},Me.createElement("a",{onClick:ki},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",Me.createElement(Wt.Z,null)," ")),Me.createElement("li",null,Me.createElement(ke.Link,{to:`/problems/${an}/record-detail/${xn}?backId=${Gi==null?void 0:Gi.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),Sn!==Kt.h.OK?Me.createElement(Me.Fragment,null,Me.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),Me.createElement("pre",null,!Zn&&Cn,Zn&&Me.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Jt.LR)(wi,Cn)},Cn)),Me.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),Me.createElement("pre",null,(Sn===4||Sn===5)&&yt.Base64.decode(si),Sn!=4&&Sn!=5&&(Zn?Me.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Jt.LR)(Kn,zn)},zn):yt.Base64.decode(zn))),Me.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),Me.createElement("pre",null,!Zn&&yt.Base64.decode(ni),Zn&&Me.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Jt.LR)(gi,ni)},ni))):null):null,(Ii==null?void 0:Ii.length)>0?Me.createElement(hn.default,{dataSource:Ii,rowKey:"id",pagination:!1},Me.createElement(pt,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(Ai,ur)=>Me.createElement("span",null," ",kt()(Ai).format("YYYY-MM-DD HH:mm:ss"))}),Me.createElement(pt,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(Ai,ur)=>{var Qn;return Me.createElement(ke.Link,{className:Ai===0?"c-green":"c-red",to:`/problems/${an}/record-detail/${ur.id}?backId=${Gi==null?void 0:Gi.save_identifier}`},(Qn=zt.Im[Ai])==null?void 0:Qn.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),Me.createElement(pt,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),Me.createElement(pt,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),Me.createElement(pt,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,Ni>15?Me.createElement(Qt.Z,{className:Ht.pagination,current:wn,pageSize:15,total:Ni,onChange:fn}):null)},xt=Ee(8797),vt=Ee(12563),nt=Ee(81327),He={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Ie=Ee(85149),We=Ee(59301);const Oe={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var be=({hack:ht,onTriggerPraise:bt,toDiscuss:Et})=>{const{language:wn,difficulty:fn,time_limit:an,username:Sn,user_path:xn,user_praise:Cn,comments_count:zn,praises_count:ni,description:Zn,pass_count:wi,submit_count:Kn}=ht,gi=(0,ke.useLocation)();console.log(ht.language,"language");const si=Oe[fn];return We.createElement(We.Fragment,null,We.createElement("ul",{className:He.info},We.createElement("li",null,"\u96BE\u5EA6\uFF1A",We.createElement(vt.default,{color:si==null?void 0:si.color},si==null?void 0:si.name)),We.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",We.createElement("b",null,an,"\u79D2"))),We.createElement(Ie.Z,{value:Zn,className:He.desc}),We.createElement("ul",{className:He["commit-info"]},We.createElement("li",null,We.createElement(nt.Z,{size:4},We.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",We.createElement("b",null,wi))),We.createElement("li",null,We.createElement(nt.Z,{size:4},We.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",We.createElement("b",null,Kn))," "),We.createElement("li",{style:{flex:"1 0 0"}}),We.createElement("li",null,We.createElement(nt.Z,{size:4},We.createElement("i",{className:"iconfont icon-huifu1",onClick:Et})," ",We.createElement("b",null,zn))," ")))},Ne=Ee(34604),$e=Object.defineProperty,dt=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,tn=(ht,bt,Et)=>bt in ht?$e(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,pn=(ht,bt)=>{for(var Et in bt||(bt={}))Je.call(bt,Et)&&tn(ht,Et,bt[Et]);if(dt)for(var Et of dt(bt))At.call(bt,Et)&&tn(ht,Et,bt[Et]);return ht};const ln=ht=>React.createElement("svg",pn({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},ht),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 gn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Hn=Ee(99064);function An(ht){return(0,Hn.U2)("comments.json",ht)}function qn(ht){return(0,Hn.v_)(`/discusses/${ht}/plus.json`,{container_type:"Discuss",type:1})}function ai(ht){return(0,Hn.v_)("comments/reply.json",ht)}function Ti(ht){return(0,Hn.v_)("comments.json",ht)}function Ci(ht){return(0,Hn.v_)(`comments/${ht==null?void 0:ht.id}/hidden.json`,ht)}function $i(ht){return(0,Hn.IV)(`comments/${ht==null?void 0:ht.id}.json`)}var or=Ee(34362),lr=Ee(24065);function qi({author:ht}){return Me.createElement("a",{href:`/users/${ht.login}`,target:"_blank"},Me.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${ve.Z.IMG_SERVER}/images/${ht.image_url}`,width:"50"}))}function Fr({data:ht,index:bt,parentDiscussIndex:Et,user:wn,onSetActionType:fn}){const{author:an,can_delete:Sn,content:xn,id:Cn,time:zn}=ht;function ni(){fn({id:Cn,index:bt,type:"delete-discuss",parentDiscussIndex:Et,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Zn=wn.admin||Sn||an.user_id===wn.user_id;return Me.createElement("div",{className:"discuss-item-container second-discuss "},Me.createElement(qi,{author:an}),Me.createElement("section",null,Me.createElement("div",{className:"discuss-info"},Me.createElement("a",{href:`/users/${an.login}`,target:"_blank"},an.name),Me.createElement("span",{className:"grey"},zn),Me.createElement("div",{className:"btn-group",style:{marginBottom:0}},Zn?Me.createElement("a",{onClick:ni,title:"\u5220\u9664"},Me.createElement("i",{className:"iconfont icon-shanchu"})):null)),Me.createElement(Ie.Z,{className:"discuss-content",value:xn})))}var Mr=({user:ht,data:bt,index:Et,onPlusDiscuss:wn,onSetActionType:fn,activeDiscussIndex:an,onReplyDiscuss:Sn,onSetActiveDiscussIndex:xn})=>{const{content:Cn,children:zn,hidden:ni,id:Zn,praise_count:wi,time:Kn,user_praise:gi,can_delete:si,author:Ii}=bt;console.log(si&&(!zn||zn.length==0),"children22");function Ni(){xn(Zn)}function Gi(){wn(Zn,!gi,Et)}function ki(){fn({id:Zn,index:Et,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Ai(){fn({id:Zn,index:Et,params:{hidden:ni?"0":"1"},type:"hidden-discuss",message:ni?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const ur=ht.admin||ht.user_id===Ii.user_id;return Me.createElement("div",{className:"discuss-item-container",key:Zn},Me.createElement(qi,{author:Ii}),Me.createElement("section",null,Me.createElement("div",{className:"discuss-info"},Me.createElement("a",{href:`/users/${Ii.login}`,target:"_blank"}," ",Ii.name," "),Me.createElement("span",{className:"grey"},Kn)),Me.createElement(Ie.Z,{className:"discuss-content",value:Cn}),zn&&zn.length>0?Me.createElement("div",{className:"reply-discuss-container"},zn.map((Qn,ji)=>Me.createElement(Fr,{key:Qn.id,data:Qn,index:ji,user:ht,onSetActionType:fn,parentDiscussIndex:Et}))):null,Me.createElement("div",{className:"btn-group"},(0,lr.Ny)()?Me.createElement("a",{onClick:Ai,title:ni?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},Me.createElement("i",{className:ni?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,si&&(!zn||zn.length==0)?Me.createElement("a",{onClick:ki,title:"\u5220\u9664"},Me.createElement("i",{className:"iconfont icon-shanchu"})):null,Me.createElement("a",{onClick:Ni,title:"\u56DE\u590D"}," ",Me.createElement("i",{className:"iconfont icon-huifu1"})," "),Me.createElement("a",{onClick:Gi,className:gi?"c-orange":""},Me.createElement("i",{className:gi?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),Me.createElement("span",null,wi||""))),Me.createElement(or.Z,{id:Zn,activeDiscussIndex:an,onReplyDiscuss:Sn})))},yi=Ee(61398),dr=Ee(12290),Zi=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())}),rt=({user_praise:ht,praise_count:bt,praisePlus:Et,onCreateDiscuss:wn,discuss_count:fn})=>{const[an,Sn]=(0,Me.useState)(!1),[xn,Cn]=(0,Me.useState)("");function zn(Kn){Cn(Kn)}function ni(){Sn(!0)}function Zn(){Sn(!1)}function wi(){return Zi(this,null,function*(){wn(xn),Cn(""),Sn(!1)})}return Me.createElement("div",{className:`dis-input-editor-container ${an?"active":""} `},Me.createElement("div",{className:an?"text-area hide":"text-area"},Me.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:ni}),Me.createElement("a",{style:{alignItems:"center"}}," ",Me.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",fn," "),Me.createElement("a",{className:"c-light-black",onClick:Et,style:{alignItems:"center"},title:ht?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Me.createElement("i",{className:`mr3 ${ht?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),bt?Me.createElement("span",null,bt):"")),an?Me.createElement("div",{className:"input-mask",onClick:Zn}):null,Me.createElement("div",{className:an?"md-container":"md-container hide"},Me.createElement(dr.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:xn,height:240,onChange:zn}),Me.createElement("div",{className:"tip-container",onClick:Zn},Me.createElement("a",{className:"btn-send",onClick:wi}," \u53D1\u9001 "))))},Ir=Object.defineProperty,Ar=Object.defineProperties,$r=Object.getOwnPropertyDescriptors,co=Object.getOwnPropertySymbols,mo=Object.prototype.hasOwnProperty,no=Object.prototype.propertyIsEnumerable,lo=(ht,bt,Et)=>bt in ht?Ir(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,ri=(ht,bt)=>{for(var Et in bt||(bt={}))mo.call(bt,Et)&&lo(ht,Et,bt[Et]);if(co)for(var Et of co(bt))no.call(bt,Et)&&lo(ht,Et,bt[Et]);return ht},Ke=(ht,bt)=>Ar(ht,$r(bt)),qe=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())});const Ye={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var St=(ht=>(ht[ht.GET_DISCUSSES=0]="GET_DISCUSSES",ht[ht.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",ht[ht.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",ht[ht.PLUS_DISCUSS=3]="PLUS_DISCUSS",ht[ht.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",ht[ht.SET_PAGE=5]="SET_PAGE",ht[ht.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",ht))(St||{});function Ot(ht,bt){switch(bt.type){case 6:return Ke(ri({},ht),{loading:!0});case 0:return ri(ri({},ht),bt.payload);case 1:return ri(ri({},ht),bt.payload);case 4:return ri(ri({},ht),bt.payload);case 3:return ri(ri({},ht),bt.payload);case 5:return ri(ri({},ht),bt.payload);case 2:return ri(ri({},ht),bt.payload);default:throw new Error}}var Tt=({user:ht,identifier:bt,hack:Et,onTriggerPraise:wn,setDiscussTotal:fn})=>{const[an,Sn]=(0,Me.useReducer)(Ot,Ye),{loading:xn,page:Cn,data:zn,count:ni,actionType:Zn,activeDiscussIndex:wi}=an;console.log("---",an);const Kn=(0,Me.useCallback)(()=>qe(void 0,null,function*(){Sn({type:6});const Qn=yield An({container_type:"Practice",container_identifier:bt,limit:10,page:Cn}),{comments:ji,disscuss_count:Ei}=Qn;Sn({type:0,payload:{data:ji,count:Ei,loading:!1}}),fn(Ei)}),[Cn,bt]);(0,Me.useEffect)(()=>{Kn()},[bt,Cn]);function gi(Qn){Sn({type:5,payload:{page:Qn}})}function si(Qn){Sn({type:4,payload:{actionType:Qn}})}function Ii(Qn){Sn(wi===Qn?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:Qn}})}function Ni(Qn,ji,Ei){return qe(this,null,function*(){try{const bi=yield qn(Qn);zn[Ei].user_praise=ji,zn[Ei].praise_count=bi.praise_count,Sn({type:3,payload:{data:[...zn]}})}catch(bi){console.log(bi)}})}function Gi(){return qe(this,null,function*(){const{id:Qn,params:ji,type:Ei,index:bi,parentDiscussIndex:Ji}=Zn;Ei==="hidden-discuss"&&(console.log(ji,"params"),yield Ci(ri({id:Qn,container_type:"Practice",container_identifier:bt},ji)),Ji?zn[Ji].children[bi].hidden=ji.hidden==1:zn[bi].hidden=ji.hidden==1,Sn({type:4,payload:{actionType:null,data:[...zn]}})),Ei==="delete-discuss"&&(yield $i({id:Qn,container_type:"Practice",container_identifier:bt}),Sn({type:4,payload:{actionType:null}}),yield Kn())})}function ki(){Sn({type:4,payload:{actionType:null}})}function Ai(Qn,ji){return qe(this,null,function*(){try{yield ai({container_type:"Practice",container_identifier:bt,comments:{content:ji,parent_id:Qn}}),Kn()}catch(Ei){console.log(Ei)}})}function ur(Qn){return qe(this,null,function*(){Sn({type:6}),yield Ti({comments:{content:Qn},container_type:"Practice",container_identifier:bt}),Kn()})}return Me.createElement(Me.Fragment,null,Me.createElement("div",{className:"discuss-panel"},zn.length===0?Me.createElement(xt.Z,null):Me.createElement(ye.Z,{spinning:xn},zn.map((Qn,ji)=>Me.createElement(Mr,{onReplyDiscuss:Ai,onPlusDiscuss:Ni,onSetActiveDiscussIndex:Ii,onSetActionType:si,data:Qn,index:ji,user:ht,activeDiscussIndex:wi}))),ni>10?Me.createElement("div",{className:"pagination-container mt10 mb10"},Me.createElement(Qt.Z,{showQuickJumper:!0,onChange:gi,current:Cn,total:ni,showTotal:Qn=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},Qn),"\u6761\u6570\u636E")})):null),Me.createElement(rt,{user_praise:Et.user_praise,praise_count:Et.praises_count,praisePlus:wn,discuss_count:Et.comments_count,onCreateDiscuss:ur}),Me.createElement(ee.Z,null,Me.createElement(he.default,{centered:!0,title:"\u63D0\u793A",open:!!Zn,onOk:Gi,onCancel:ki},Me.createElement("p",null,Zn?Zn.message:"")),Me.createElement(yi.Z,null)))},_t={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"},dn={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"},Pn=Object.defineProperty,mn=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,un=(ht,bt,Et)=>bt in ht?Pn(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ln=(ht,bt)=>{for(var Et in bt||(bt={}))sn.call(bt,Et)&&un(ht,Et,bt[Et]);if(mn)for(var Et of mn(bt))Nt.call(bt,Et)&&un(ht,Et,bt[Et]);return ht};const Dn=ht=>React.createElement("svg",Ln({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},ht),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 $t="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",rn=Object.defineProperty,jn=Object.getOwnPropertySymbols,On=Object.prototype.hasOwnProperty,ei=Object.prototype.propertyIsEnumerable,Gn=(ht,bt,Et)=>bt in ht?rn(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,ti=(ht,bt)=>{for(var Et in bt||(bt={}))On.call(bt,Et)&&Gn(ht,Et,bt[Et]);if(jn)for(var Et of jn(bt))ei.call(bt,Et)&&Gn(ht,Et,bt[Et]);return ht};const Bn=ht=>React.createElement("svg",ti({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ht),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 li="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",Di=Object.defineProperty,Ri=Object.getOwnPropertySymbols,Mn=Object.prototype.hasOwnProperty,Xi=Object.prototype.propertyIsEnumerable,Nr=(ht,bt,Et)=>bt in ht?Di(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,zi=(ht,bt)=>{for(var Et in bt||(bt={}))Mn.call(bt,Et)&&Nr(ht,Et,bt[Et]);if(Ri)for(var Et of Ri(bt))Xi.call(bt,Et)&&Nr(ht,Et,bt[Et]);return ht};const En=ht=>React.createElement("svg",zi({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ht),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 Jn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",fi=Object.defineProperty,Si=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,Oi=Object.prototype.propertyIsEnumerable,tr=(ht,bt,Et)=>bt in ht?fi(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Fi=(ht,bt)=>{for(var Et in bt||(bt={}))hi.call(bt,Et)&&tr(ht,Et,bt[Et]);if(Si)for(var Et of Si(bt))Oi.call(bt,Et)&&tr(ht,Et,bt[Et]);return ht};const Hi=ht=>React.createElement("svg",Fi({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ht),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 mr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",Rn=Object.defineProperty,Br=Object.getOwnPropertySymbols,Nn=Object.prototype.hasOwnProperty,vr=Object.prototype.propertyIsEnumerable,So=(ht,bt,Et)=>bt in ht?Rn(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Dr=(ht,bt)=>{for(var Et in bt||(bt={}))Nn.call(bt,Et)&&So(ht,Et,bt[Et]);if(Br)for(var Et of Br(bt))vr.call(bt,Et)&&So(ht,Et,bt[Et]);return ht};const Co=ht=>React.createElement("svg",Dr({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},ht),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 ho="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Ui=({style:ht={},onClick:bt,onAssist:Et,onHide:wn,data:fn,active:an,showLine:Sn})=>Me.createElement(Me.Fragment,null,Me.createElement("div",{className:an===(fn==null?void 0:fn.id)?`${dn.list} ${dn.active}`:dn.list,style:ht,onClick:()=>bt(fn)},(fn==null?void 0:fn.video)&&Me.createElement("div",{className:dn.left},Me.createElement("img",{src:fn==null?void 0:fn.video_cover}),Me.createElement("div",null,Me.createElement("img",{src:$t}),Me.createElement("span",null,fn==null?void 0:fn.video_duration)),Me.createElement("div",{className:dn.mask})),Me.createElement("div",{className:dn.right},Me.createElement("div",{className:dn.name},Me.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(fn==null?void 0:fn.image_url),width:30,height:30}),Me.createElement("div",{title:fn==null?void 0:fn.name,className:dn.title},fn==null?void 0:fn.name),(fn==null?void 0:fn.is_authority)&&Me.createElement("div",{className:dn.b},"\u5B98\u65B9"),(fn==null?void 0:fn.is_excellent)&&Me.createElement("div",{className:dn.a},"\u7CBE\u9009")),Me.createElement("div",{className:dn.des},Me.createElement(Ie.Z,{showLines:2,showTextOnly:!0,value:(fn==null?void 0:fn.content)||"\u6682\u65E0\u5185\u5BB9"})),Me.createElement("div",{className:dn.tag},Me.createElement("span",{className:"current",onClick:xn=>{xn.stopPropagation(),Et(fn)}},Me.createElement("img",{src:fn!=null&&fn.user_liker?Jn:li}),Me.createElement("span",{style:{color:fn!=null&&fn.user_liker?"#0152d9":"#656f87"}},fn==null?void 0:fn.praises_count)),Me.createElement("span",null,Me.createElement("img",{src:mr}),Me.createElement("span",null,fn==null?void 0:fn.discusses_count)),Me.createElement("span",null,Me.createElement("img",{src:ho}),Me.createElement("span",null,fn==null?void 0:fn.viewed_count)),(0,lr.Ny)()&&Me.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:xn=>{xn.stopPropagation(),wn(fn)}},fn!=null&&fn.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),Sn&&Me.createElement("div",{className:dn.line})),hr={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"},Pr=Ee(6848),ci=Ee(70750),Mt=Object.defineProperty,Ur=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,ts=Object.prototype.propertyIsEnumerable,Ao=(ht,bt,Et)=>bt in ht?Mt(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,ss=(ht,bt)=>{for(var Et in bt||(bt={}))Hr.call(bt,Et)&&Ao(ht,Et,bt[Et]);if(Ur)for(var Et of Ur(bt))ts.call(bt,Et)&&Ao(ht,Et,bt[Et]);return ht};const _r=ht=>React.createElement("svg",ss({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},ht),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 fr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Kr=Object.defineProperty,pr=Object.getOwnPropertySymbols,eo=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable,sr=(ht,bt,Et)=>bt in ht?Kr(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ki=(ht,bt)=>{for(var Et in bt||(bt={}))eo.call(bt,Et)&&sr(ht,Et,bt[Et]);if(pr)for(var Et of pr(bt))Yo.call(bt,Et)&&sr(ht,Et,bt[Et]);return ht};const Xn=ht=>React.createElement("svg",Ki({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},ht),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 ar="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",to=Object.defineProperty,Ro=Object.getOwnPropertySymbols,Bo=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable,as=(ht,bt,Et)=>bt in ht?to(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ho=(ht,bt)=>{for(var Et in bt||(bt={}))Bo.call(bt,Et)&&as(ht,Et,bt[Et]);if(Ro)for(var Et of Ro(bt))Xo.call(bt,Et)&&as(ht,Et,bt[Et]);return ht};const ia=ht=>React.createElement("svg",Ho({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},ht),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 _s="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",la=Object.defineProperty,kn=Object.getOwnPropertySymbols,Is=Object.prototype.hasOwnProperty,Pu=Object.prototype.propertyIsEnumerable,Ua=(ht,bt,Et)=>bt in ht?la(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Sa=(ht,bt)=>{for(var Et in bt||(bt={}))Is.call(bt,Et)&&Ua(ht,Et,bt[Et]);if(kn)for(var Et of kn(bt))Pu.call(bt,Et)&&Ua(ht,Et,bt[Et]);return ht},us=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())});const Ws=(ht,bt)=>{var Et,wn,fn;const{uploadInfo:an={}}=bt.payload;switch(bt.type){case"addVideo":return{videoList:[...ht.videoList,{name:an.file.name,size:an.file.size,type:an.file.type,fileHash:an.fileHash,state:an.state,video_id:an.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:ht.videoList.filter(Sn=>Sn.name!==bt.payload.name)};case"replaceVideo":return{videoList:bt.payload};case"removeAll":return[];case"updateProgress":return{videoList:ht.videoList.map(Sn=>Sn.name===bt.payload.uploadInfo.file.name?Sa(Sa({},Sn),{loaded:bt.payload.progressPercent,video_id:an.videoId,fileHash:an.fileHash}):Sn)};case"updateTitle":return{videoList:(Et=ht.videoList)==null?void 0:Et.map(Sn=>Sn.name===bt.payload.item.name?Sa(Sa({},Sn),{title:bt.payload.title}):Sn)};case"updateImg":return{videoList:(wn=ht.videoList)==null?void 0:wn.map(Sn=>Sn.name===bt.payload.item.name?Sa(Sa({},Sn),{attachment_id:bt.payload.attachment_id}):Sn)};case"updateImg":return{videoList:(fn=ht.videoList)==null?void 0:fn.map(Sn=>Sn.name===bt.payload.item.name?Sa(Sa({},Sn),{attachment_id:bt.payload.attachment_id}):Sn)};default:return[]}};var No=({onClose:ht,onOk:bt,identifier:Et,active:wn})=>{var fn,an;const[Sn]=tt.default.useForm(),[xn,Cn]=(0,Me.useState)({}),[zn,ni]=(0,Me.useState)(!1),[Zn,wi]=(0,Me.useState)(!1),[Kn,gi]=(0,Me.useReducer)(Ws,{videoList:[]}),si=(0,lr.eY)(),Ii=(0,ke.useParams)(),Ni=(0,Me.useRef)();(0,Me.useEffect)(()=>{wn&&Gi()},[wn]);const Gi=()=>us(void 0,null,function*(){var Wi,Sr,nr,xo,Po,is,so,Tr,Oo,Or;const Xr=yield(0,ge.M3)(Et,{active:wn});if((Xr==null?void 0:Xr.status)===0){const rs={name:(Wi=Xr==null?void 0:Xr.data)==null?void 0:Wi.name,content:(Sr=Xr==null?void 0:Xr.data)==null?void 0:Sr.content};Sn.setFieldsValue(rs),Cn(rs),(xo=(nr=Xr==null?void 0:Xr.data)==null?void 0:nr.videos)!=null&&xo[0]&&gi({type:"replaceVideo",payload:[{video_id:(so=(is=(Po=Xr==null?void 0:Xr.data)==null?void 0:Po.videos)==null?void 0:is[0])==null?void 0:so.video_id,name:(Or=(Oo=(Tr=Xr==null?void 0:Xr.data)==null?void 0:Tr.videos)==null?void 0:Oo[0])==null?void 0:Or.title,loaded:100}]})}}),ki=(Wi,Sr)=>{Cn(Sa({},Sr))},Ai=Wi=>us(void 0,null,function*(){const Sr={videos:Kn.videoList,articles:Wi};wi(!0);let nr;wn?(Sr.active=wn,nr=yield(0,ge.gu)(Et,Sr)):nr=yield(0,ge.bx)(Et,Sr),(nr==null?void 0:nr.status)===0&&(console.log(wn||(nr==null?void 0:nr.id),44),bt(wn||(nr==null?void 0:nr.id))),wi(!1)}),ur=()=>{const Wi=document.getElementById("fileUpload");Wi.value=""},Qn=Wi=>{var Sr='{"Vod":{}}';if(ni(!0),Ni.current){Ni.current.addFile(Wi,null,null,null,Sr);return}(0,ci.o)(si==null?void 0:si.login,"",{create:!Ni,addFileSuccess:nr=>{gi({type:"addVideo",payload:{uploadInfo:nr}})},onUploadProgress:(nr,xo,Po)=>{const is=Math.ceil(Po*100);gi({type:"updateProgress",payload:{uploadInfo:nr,progressPercent:is}}),ur()},onUploadFailed:nr=>{Le.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:nr=>{ni(!1)},onUploadSucceed:nr=>{ni(!1)},onUploadError:nr=>{ni(!1)},gotUploader:nr=>{nr.addFile(Wi,null,null,null,Sr),Ni.current=nr}})},ji=Wi=>{var Sr;const xo=Wi.target.files[0];if(!xo){ur();return}let Po=xo.name.toLowerCase();if(Po&&Po.indexOf(".avi")==-1&&Po.indexOf(".flv")==-1&&Po.indexOf(".f4v")==-1&&Po.indexOf(".m4v")==-1&&Po.indexOf(".mov")==-1&&Po.indexOf(".mp4")==-1&&Po.indexOf(".rmvb")==-1&&Po.indexOf(".swf")==-1&&Po.indexOf(".webm")==-1&&Po.indexOf(".wmv")==-1){Le.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),ur();return}if(xo.size>1024*1024*1024){Le.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),ur();return}if((Sr=Kn.videoList)!=null&&Sr.find(is=>is.name===xo.name)){Le.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),ur();return}Qn(xo)},Ei=(Wi,Sr)=>{he.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:Me.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",Sr?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{ur(),gi({type:"removeVideo",payload:{name:Wi}})}})},bi=()=>Me.createElement("label",{htmlFor:"fileUpload",className:hr.main},Me.createElement("img",{src:fr,alt:""}),Me.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Ji=Wi=>Me.createElement("div",{className:hr.mainLoading},Me.createElement("div",{className:hr.proWarp},Me.createElement("div",{className:hr.pro},Me.createElement("div",{style:{width:Wi}})),Me.createElement("span",null,Wi||0,"%")),Me.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),Me.createElement("div",{className:hr.tip},Me.createElement(Pr.Z,{getPopupContainer:Sr=>Sr.parentNode,title:Me.createElement("div",null,Me.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",Me.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"),Me.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),Me.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},Me.createElement("img",{src:_s,alt:""})))),pi=Wi=>Me.createElement("div",{className:hr.mainSucceed},Me.createElement("img",{src:ar,alt:""}),Me.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),Me.createElement("div",{className:hr.tip},Me.createElement(Pr.Z,{getPopupContainer:Sr=>Sr.parentNode,title:Me.createElement("div",null,Me.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",Me.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"),Me.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),Me.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},Me.createElement("img",{src:_s,alt:""}))),Me.createElement("div",{className:hr.del,onClick:()=>Ei(Wi.name,Wi.loaded==100)},Me.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),cr=()=>{var Wi;return Me.createElement(Me.Fragment,null,(Wi=Kn.videoList)==null?void 0:Wi.map((Sr,nr)=>Me.createElement(Me.Fragment,{key:nr},Sr.loaded==100?pi(Sr):Ji(Sr.loaded))))},Qi=()=>{he.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:ht})},Pi=(fn=Kn.videoList)==null?void 0:fn.length;return Me.createElement("div",{className:hr.listForm},Me.createElement("header",null,wn?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),Me.createElement("section",{className:hr.scroll,id:"sss"},Me.createElement("div",{className:hr.formWrap}," ",Me.createElement(tt.default,{form:Sn,scrollToFirstError:!0,layout:"vertical",onValuesChange:ki,onFinish:Ai},Me.createElement(tt.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"}]},Me.createElement(lt.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((an=xn.name)==null?void 0:an.length)||0}/60`})),Me.createElement(tt.default.Item,{name:"content",label:"\u5185\u5BB9:"},Me.createElement(dr.Z,{defaultValue:xn.content||"",watch:!0})))),Me.createElement("div",{className:hr.upload},Pi?cr():bi(),Me.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:ji,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),Me.createElement("div",{className:hr.btns},Me.createElement(ut.ZP,{onClick:Qi,type:"primary",ghost:!0},"\u5173\u95ED"),Me.createElement(ut.ZP,{loading:Zn,disabled:zn,onClick:()=>Sn.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Lo={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"},ua=Ee(61621),br=Object.defineProperty,uo=Object.getOwnPropertySymbols,Yr=Object.prototype.hasOwnProperty,Li=Object.prototype.propertyIsEnumerable,Es=(ht,bt,Et)=>bt in ht?br(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ls=(ht,bt)=>{for(var Et in bt||(bt={}))Yr.call(bt,Et)&&Es(ht,Et,bt[Et]);if(uo)for(var Et of uo(bt))Li.call(bt,Et)&&Es(ht,Et,bt[Et]);return ht};const xa=ht=>React.createElement("svg",Ls({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},ht),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 xl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Il=Object.defineProperty,vi=Object.getOwnPropertySymbols,ms=Object.prototype.hasOwnProperty,Xs=Object.prototype.propertyIsEnumerable,qa=(ht,bt,Et)=>bt in ht?Il(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,wl=(ht,bt)=>{for(var Et in bt||(bt={}))ms.call(bt,Et)&&qa(ht,Et,bt[Et]);if(vi)for(var Et of vi(bt))Xs.call(bt,Et)&&qa(ht,Et,bt[Et]);return ht};const Dl=ht=>React.createElement("svg",wl({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},ht),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 jr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",nc=Object.defineProperty,Ia=Object.getOwnPropertySymbols,Ga=Object.prototype.hasOwnProperty,Na=Object.prototype.propertyIsEnumerable,$l=(ht,bt,Et)=>bt in ht?nc(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,_u=(ht,bt)=>{for(var Et in bt||(bt={}))Ga.call(bt,Et)&&$l(ht,Et,bt[Et]);if(Ia)for(var Et of Ia(bt))Na.call(bt,Et)&&$l(ht,Et,bt[Et]);return ht};const Wa=ht=>React.createElement("svg",_u({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},ht),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 Za="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Uu={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"},yc=Ee(95237),Eu=Ee(43604),Rl={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"},Sc=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())});const Gu=({id:ht,cb:bt})=>{const[Et,wn]=(0,Me.useState)("");return Me.createElement("aside",{className:"mt10"},Me.createElement(dr.Z,{defaultValue:Et,id:"writeForumsReviewId",onChange:fn=>{wn(fn)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Me.createElement(yc.Z,null,Me.createElement(Eu.Z,{flex:"1"}),Me.createElement(Eu.Z,null,Me.createElement(ut.ZP,{type:"primary",size:"middle",onClick:()=>Sc(void 0,null,function*(){Et===""?Le.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):bt(ht,Et)})},"\u53D1\u9001"))))},Lu=({data:ht})=>{var bt;return Me.createElement("div",{className:Rl.thirdlyLevelDiscuss},Me.createElement("span",{className:"c-grey-333"},Me.createElement("span",{className:"font 14 c-light-primary"},(bt=ht==null?void 0:ht.author)==null?void 0:bt.name),"@",Me.createElement("span",{className:"font 14 c-light-primary"},ht==null?void 0:ht.parent_name),":"),Me.createElement(Ie.Z,{value:ht==null?void 0:ht.content}))},bl=({data:ht,onReplyDiscuss:bt,thirdlyReply:Et,setThirdlyReply:wn})=>{var fn,an,Sn,xn;const Cn=(0,lr.eY)();return console.log(Cn,"user"),Me.createElement("div",{className:Rl.list},Me.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+((fn=ht==null?void 0:ht.author)==null?void 0:fn.image_url)}),Me.createElement("div",{className:Rl.wrap},Me.createElement("div",{className:"font14",style:{marginBottom:6}},Me.createElement("span",{className:"c-grey-333"},(an=ht==null?void 0:ht.author)==null?void 0:an.name),(Cn==null?void 0:Cn.login)!==((Sn=ht==null?void 0:ht.author)==null?void 0:Sn.login)&&Me.createElement("span",{onClick:()=>wn(ht==null?void 0:ht.id),className:"c-grey-999 current",style:{float:"right"}},Me.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),Me.createElement("span",null,"\u56DE\u590D"))),Me.createElement(Ie.Z,{value:ht==null?void 0:ht.content}),(xn=ht==null?void 0:ht.children)==null?void 0:xn.map(zn=>Me.createElement(Lu,{key:zn.id,data:zn})),Et===(ht==null?void 0:ht.id)&&Me.createElement("div",null,Me.createElement(Gu,{id:ht==null?void 0:ht.id,cb:bt}),Me.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>wn(null),className:"c-light-primary current"},Me.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),Me.createElement("div",{className:Rl.line})))};var xc=({data:ht,onReplyDiscuss:bt,secondReply:Et,setSecondReply:wn,thirdlyReply:fn,setThirdlyReply:an,onPlusDiscuss:Sn})=>{var xn,Cn,zn,ni;const[Zn,wi]=(0,Me.useState)(!1);return console.log(ht,"data"),Me.createElement("div",{className:Rl.discussItem},Me.createElement("div",{className:Rl.list},Me.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+((xn=ht==null?void 0:ht.author)==null?void 0:xn.image_url)}),Me.createElement("div",{className:Rl.wrap},Me.createElement("div",{className:"font14",style:{marginBottom:6}},Me.createElement("span",{className:"c-grey-333 mr30"},(Cn=ht==null?void 0:ht.author)==null?void 0:Cn.name),Me.createElement("span",{className:"c-grey-999"},ht==null?void 0:ht.time)),Me.createElement(Ie.Z,{value:ht==null?void 0:ht.content}),Me.createElement("div",{className:Rl.btns},Me.createElement("div",{onClick:()=>Sn(ht==null?void 0:ht.id),className:ht!=null&&ht.user_praise?"c-light-primary":"c-grey-999"},Me.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),Me.createElement("span",null,ht==null?void 0:ht.praise_count)),Me.createElement("div",{onClick:()=>{var Kn;((Kn=ht==null?void 0:ht.children)==null?void 0:Kn.length)!==0&&(wn(null),wi(!Zn))},style:{color:Zn?"#0152d9":"#999999"}},Me.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),Me.createElement("span",null,Zn?"\u6536\u8D77\u8BC4\u8BBA":(zn=ht==null?void 0:ht.children)==null?void 0:zn.length)),Me.createElement("div",{onClick:()=>{wi(!1),wn(Et===(ht==null?void 0:ht.id)?null:ht==null?void 0:ht.id)},style:{color:Et===(ht==null?void 0:ht.id)?"#0152d9":"#999999"}},Me.createElement("i",{className:"iconfont icon-huifu3 mr3"}),Me.createElement("span",null,Et===(ht==null?void 0:ht.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Et===(ht==null?void 0:ht.id)&&Me.createElement(Gu,{id:ht==null?void 0:ht.id,cb:(Kn,gi)=>{bt(Kn,gi),wi(!0)}}),Zn&&Me.createElement("div",{className:Rl.secondLevelDiscuss},(ni=ht==null?void 0:ht.children)==null?void 0:ni.map(Kn=>Me.createElement(bl,{thirdlyReply:fn,setThirdlyReply:an,key:Kn.id,data:Kn,onReplyDiscuss:bt}))))))},lu=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())}),Uo=({identifier:ht,active:bt,onOk:Et})=>{const[wn,fn]=(0,Me.useState)(""),[an,Sn]=(0,Me.useState)(1),[xn,Cn]=(0,Me.useState)([]),[zn,ni]=(0,Me.useState)(0),[Zn,wi]=(0,Me.useState)(null),[Kn,gi]=(0,Me.useState)(null);(0,Me.useEffect)(()=>{si(1),Sn(1)},[bt]);const si=Ai=>lu(void 0,null,function*(){const ur=yield An({container_type:"QuestionSolutionArticle",container_identifier:bt,limit:5,page:Ai});ur!=null&&ur.comments&&(Cn((ur==null?void 0:ur.comments)||[]),Sn(Ai),ni(ur==null?void 0:ur.disscuss_count))}),Ii=()=>lu(void 0,null,function*(){if(wn===""){Le.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const Ai=yield Ti({comments:{content:wn},container_type:"QuestionSolutionArticle",container_identifier:bt});Ai!=null&&Ai.discuss&&(fn(""),si(an),Et())}),Ni=(Ai,ur,Qn)=>lu(void 0,null,function*(){const ji=yield ai({container_type:"QuestionSolutionArticle",container_identifier:bt,comments:{content:ur,parent_id:Ai}});wi(null),gi(null),si(an)}),Gi=Ai=>lu(void 0,null,function*(){const ur=yield qn(Ai);si(an)}),ki=Ai=>{Sn(Ai),si(Ai)};return Me.createElement("div",{className:Uu.discuss},Me.createElement("aside",{className:Uu.reply,style:{borderWidth:zn?1:0}},Me.createElement(dr.Z,{defaultValue:wn,id:"writeForumsReviewId",onChange:Ai=>{fn(Ai)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Me.createElement(yc.Z,null,Me.createElement(Eu.Z,{flex:"1"}),Me.createElement(Eu.Z,null,Me.createElement(ut.ZP,{type:"primary",size:"middle",onClick:()=>Ii()},"\u53D1\u9001")))),xn==null?void 0:xn.map(Ai=>Me.createElement(xc,{secondReply:Zn,setSecondReply:wi,thirdlyReply:Kn,setThirdlyReply:gi,key:Ai.id,data:Ai,onReplyDiscuss:Ni,onPlusDiscuss:Gi})),Me.createElement(Qt.Z,{className:Uu.pagination,showTotal:Ai=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},Ai),"\u6761\u6570\u636E"),current:an,onChange:ki,total:zn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},ka=Ee(71839),ra=Object.defineProperty,Ds=Object.getOwnPropertySymbols,bs=Object.prototype.hasOwnProperty,ks=Object.prototype.propertyIsEnumerable,Zs=(ht,bt,Et)=>bt in ht?ra(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,Ks=(ht,bt)=>{for(var Et in bt||(bt={}))bs.call(bt,Et)&&Zs(ht,Et,bt[Et]);if(Ds)for(var Et of Ds(bt))ks.call(bt,Et)&&Zs(ht,Et,bt[Et]);return ht},Yl=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())}),Rs=({active:ht,identifier:bt,onAssist:Et,onEdit:wn,onArticlesSkip:fn,onClose:an,onOk:Sn,onDelete:xn,detailsIndex:Cn,btnShowStatus:zn})=>{var ni,Zn,wi,Kn,gi,si,Ii,Ni,Gi,ki;const[Ai,ur]=(0,Me.useState)(!0),[Qn,ji]=(0,Me.useState)({});(0,Me.useEffect)(()=>{ht&&Ei()},[ht,Cn]);const Ei=(Qi=!0)=>Yl(void 0,null,function*(){Qi&&ur(!0);const Pi=yield(0,ge.wO)(bt,{active:ht});(Pi==null?void 0:Pi.status)===0&&ji((Pi==null?void 0:Pi.data)||{}),ur(!1)}),bi=Qi=>Yl(void 0,null,function*(){const Pi=yield(0,ge.qe)(bt,Ks({active:ht},Qi));(Pi==null?void 0:Pi.status)===0&&(Ei(!1),Sn())}),Ji=Qi=>Yl(void 0,null,function*(){(yield(0,ge.Rg)(bt,{active:Qi==null?void 0:Qi.id})).status===0&&(Ei(!1),Sn())}),pi=Qi=>{he.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:()=>xn(Qi)})},cr=()=>{Ei(!1),Sn()};return Me.createElement("div",{className:Lo.listDetails},Me.createElement(ua.Z,{className:"pt20 pl20 pr20",loading:Ai,active:!0,paragraph:{rows:5}},Me.createElement("div",{className:Lo.head},Me.createElement("div",{className:Lo.name},Me.createElement("div",{title:Qn==null?void 0:Qn.name,className:Lo.title},Qn==null?void 0:Qn.name),(Qn==null?void 0:Qn.is_authority)&&Me.createElement("div",{className:Lo.b},"\u5B98\u65B9"),(Qn==null?void 0:Qn.is_excellent)&&Me.createElement("div",{className:Lo.a},"\u7CBE\u9009")),Me.createElement("div",{className:Lo.tag},Me.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(Qn==null?void 0:Qn.image_url)}),Me.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Qn==null?void 0:Qn.username),Me.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",kt()(Qn==null?void 0:Qn.created_at).format("YYYY-MM-DD")),Me.createElement("span",null,Me.createElement("img",{src:li}),Me.createElement("span",null,Qn==null?void 0:Qn.praises_count)),Me.createElement("span",null,Me.createElement("img",{src:mr}),Me.createElement("span",null,Qn==null?void 0:Qn.discusses_count)),Me.createElement("span",null,Me.createElement("img",{src:ho}),Me.createElement("span",null,Qn==null?void 0:Qn.viewed_count)),Me.createElement("div",{className:Lo.btn},((0,lr.Ny)()||(Qn==null?void 0:Qn.is_self))&&Me.createElement(Me.Fragment,null,Me.createElement(ut.ZP,{onClick:()=>pi(Qn),type:"primary",ghost:!0},"\u5220\u9664"),Me.createElement(ut.ZP,{onClick:()=>wn(Qn),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,lr.Ny)()&&Me.createElement(ut.ZP,{onClick:()=>bi({is_authority:!(Qn!=null&&Qn.is_authority)}),type:"primary"},Me.createElement("img",{src:jr}),Qn!=null&&Qn.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,lr.Ny)()&&Me.createElement(ut.ZP,{onClick:()=>bi({is_excellent:!(Qn!=null&&Qn.is_excellent)}),type:"primary"},Me.createElement("img",{src:xl}),Qn!=null&&Qn.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),Me.createElement("div",{className:Lo.scroll},((Zn=(ni=Qn==null?void 0:Qn.videos)==null?void 0:ni[0])==null?void 0:Zn.id)&&Me.createElement("div",{className:Lo.video},Me.createElement(ye.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Kn=(wi=Qn==null?void 0:Qn.videos)==null?void 0:wi[0])!=null&&Kn.transcoded)},Me.createElement(ka.Z,{poster:(si=(gi=Qn==null?void 0:Qn.videos)==null?void 0:gi[0])==null?void 0:si.cover_url,src:((Ni=(Ii=Qn==null?void 0:Qn.videos)==null?void 0:Ii[0])==null?void 0:Ni.play_url)||"",videoId:(ki=(Gi=Qn==null?void 0:Qn.videos)==null?void 0:Gi[0])==null?void 0:ki.id,logWatchHistory:()=>{}}))),Me.createElement(Ie.Z,{className:Lo.html,value:(Qn==null?void 0:Qn.content)||""}),Me.createElement("div",{onClick:()=>Ji(Qn),className:Lo.g},Me.createElement("img",{className:"mr10",src:(Qn!=null&&Qn.user_liker,Za)}),Me.createElement("span",null,Qn==null?void 0:Qn.praises_count)),Me.createElement(Uo,{onOk:cr,active:ht,identifier:bt})),Me.createElement("div",{className:Lo.btns},Me.createElement(ut.ZP,{onClick:()=>an(),type:"primary",ghost:!0},"\u5173\u95ED"),zn[0]&&Me.createElement(ut.ZP,{onClick:Qi=>fn(Qi,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),zn[1]&&Me.createElement(ut.ZP,{onClick:Qi=>fn(Qi,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},xh=Object.defineProperty,nh=Object.getOwnPropertySymbols,wc=Object.prototype.hasOwnProperty,yr=Object.prototype.propertyIsEnumerable,bc=(ht,bt,Et)=>bt in ht?xh(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,on=(ht,bt)=>{for(var Et in bt||(bt={}))wc.call(bt,Et)&&bc(ht,Et,bt[Et]);if(nh)for(var Et of nh(bt))yr.call(bt,Et)&&bc(ht,Et,bt[Et]);return ht};const Yn=ht=>React.createElement("svg",on({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},ht),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 wh="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",Qh=Ee(59477),Mu=Ee(89489),Tu=Object.defineProperty,Wu=Object.defineProperties,bh=Object.getOwnPropertyDescriptors,Cc=Object.getOwnPropertySymbols,Vs=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable,Da=(ht,bt,Et)=>bt in ht?Tu(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,$s=(ht,bt)=>{for(var Et in bt||(bt={}))Vs.call(bt,Et)&&Da(ht,Et,bt[Et]);if(Cc)for(var Et of Cc(bt))Vr.call(bt,Et)&&Da(ht,Et,bt[Et]);return ht},Ms=(ht,bt)=>Wu(ht,bh(bt)),wo=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())}),dl=({identifier:ht,tabStatus:bt,setFilterListTotal:Et,setListStatus:wn})=>{const fn={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[an,Sn]=(0,Me.useState)($s({},fn));const[xn,Cn]=(0,Me.useState)(!1),[zn,ni]=(0,Me.useState)(0),[Zn,wi]=(0,Me.useState)(1),[Kn,gi]=(0,Me.useState)(null),[si,Ii]=(0,Me.useState)([]),[Ni,Gi]=(0,Me.useState)([!0,!0]),[ki,Ai]=(0,Me.useState)(0),ur=(0,Me.useRef)(null);(0,Me.useEffect)(()=>{Wi()},[bt]),(0,Me.useEffect)(()=>{Qn()},[Kn]),(0,Me.useEffect)(()=>{Ei($s({},fn)),Wi()},[ht]),(0,Me.useEffect)(()=>(window.addEventListener("resize",ji),wn(ki),()=>{window.removeEventListener("resize",ji)}),[ki]);const Qn=()=>wo(void 0,null,function*(){if(!Kn){Gi([!0,!0]);return}const Or=[!0,!0],Xr=si==null?void 0:si.findIndex(rs=>rs.id===Kn);Xr===0&&an.page===1&&(Or[0]=!1),(an.page-1)*an.limit+(Xr+1)===an.total&&(Or[1]=!1),Gi(Or)}),ji=()=>{var Or;if(ki){const Xr=window.innerWidth-((Or=ur.current)==null?void 0:Or.clientWidth);ni(Xr)}},Ei=Or=>wo(void 0,null,function*(){var Xr,rs,Wr;Cn(!0);const Er=yield(0,ge.WH)(ht,Or);return(Er==null?void 0:Er.status)===0&&(Ii(((Xr=Er==null?void 0:Er.data)==null?void 0:Xr.articles)||[]),Sn(Ms($s({},Or),{total:(rs=Er==null?void 0:Er.data)==null?void 0:rs.articles_count})),Et((Wr=Er==null?void 0:Er.data)==null?void 0:Wr.articles_count)),Cn(!1),Er}),bi=()=>{(an==null?void 0:an.sort_direction)===null?an.sort_direction="asc":(an==null?void 0:an.sort_direction)==="asc"?an.sort_direction="desc":(an==null?void 0:an.sort_direction)==="desc"&&(an.sort_direction=null),an.page=1,Wi(),Sn($s({},an)),Ei(an)},Ji=()=>{an.page=1,an.search=an==null?void 0:an.save_search,Wi(),Sn($s({},an)),Ei(an)},pi=()=>{var Or;const Xr=document.getElementsByClassName("btn-resize");Xr[0].style.visibility="hidden";const rs=window.innerWidth-((Or=ur.current)==null?void 0:Or.clientWidth);ni(rs)},cr=()=>{pi(),Ai(1)},Qi=Or=>{pi(),gi(Or==null?void 0:Or.id),Ai(3)},Pi=Or=>{pi(),gi(Or==null?void 0:Or.id),Ai(2)},Wi=()=>{const Or=document.getElementsByClassName("btn-resize");Or[0].style.visibility="visible",ni(0),Ai(0),gi(null)},Sr=Or=>{Ai(3),gi(Or),an.page=1,Sn($s({},an)),Ei(an)},nr=Or=>{Ai(3),gi(Or),Sn($s({},an)),Ei(an)},xo=Or=>{Sn($s({},an)),Ei(an)},Po=Or=>wo(void 0,null,function*(){(yield(0,ge.Rg)(ht,{active:Or==null?void 0:Or.id})).status===0&&(Ei(an),wi(Zn+1))}),is=Or=>wo(void 0,null,function*(){(yield(0,ge.rL)(ht,{active:Or==null?void 0:Or.id})).status===0&&(Ei(an),wi(Zn+1))}),so=Or=>wo(void 0,null,function*(){(yield(0,ge.de)(ht,{active:Or==null?void 0:Or.id})).status===0&&(Wi(),Ei(an))}),Tr=Or=>{an.page=Or,Sn($s({},an)),Ei(an)},Oo=(Or,Xr)=>wo(void 0,null,function*(){var rs,Wr,Er,Jr;const Cr=si==null?void 0:si.findIndex(ao=>ao.id===Kn);if(console.log(Cr,Xr,22),Xr==="prev"){if(Cr===void 0){Le.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Cr===0){if(an.page===1){Le.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(an.page!==1){an.page=an.page-1,Sn($s({},an));const ao=yield Ei(an);if((ao==null?void 0:ao.status)===0){const Lr=(Er=ao==null?void 0:ao.data)==null?void 0:Er.articles[((Wr=(rs=ao==null?void 0:ao.data)==null?void 0:rs.articles)==null?void 0:Wr.length)-1];gi(Lr==null?void 0:Lr.id),console.log(Or.target,555)}}}else{const ao=si[Cr-1];gi(ao==null?void 0:ao.id)}}if(Xr==="next"){if(Cr===void 0){Le.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((an.page-1)*an.limit+(Cr+1)===an.total){Le.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Cr+1===an.limit){an.page=an.page+1,Sn($s({},an));const ao=yield Ei(an);if((ao==null?void 0:ao.status)===0){const Lr=(Jr=ao==null?void 0:ao.data)==null?void 0:Jr.articles[0];gi(Lr==null?void 0:Lr.id)}}else{const ao=si[Cr+1];gi(ao==null?void 0:ao.id)}}});return Me.createElement("div",{className:_t.wrap,ref:ur},Me.createElement("div",{className:_t.head},Me.createElement("div",{className:_t.sort,onClick:bi},Me.createElement("span",null,"\u6700\u65B0"),Me.createElement("aside",null,Me.createElement(Qh.Z,{style:{color:(an==null?void 0:an.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),Me.createElement(Mu.Z,{style:{color:(an==null?void 0:an.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),Me.createElement(lt.default.Search,{value:an.save_search,className:_t["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:Or=>{an.save_search=Or.target.value,Sn($s({},an))},onSearch:Ji}),Me.createElement("div",{onClick:cr,className:_t.btn},Me.createElement("img",{src:wh}),"\u5199\u9898\u89E3")),Me.createElement("div",{className:_t.listWarp},Me.createElement(ye.Z,{spinning:xn,className:"mt20"},si==null?void 0:si.map((Or,Xr)=>{let rs=!0;return Xr+1===si.length&&Xr!==0&&(rs=!1),Me.createElement(Ui,{active:Kn,key:Or.id,data:Or,showLine:rs,onClick:Qi,onAssist:Po,onHide:is})}),(si==null?void 0:si.length)===0&&Me.createElement(xt.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),Me.createElement(Qt.Z,{className:_t.pagination,showTotal:Or=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},Or),"\u6761\u6570\u636E"),total:an.total,showSizeChanger:!1,current:an==null?void 0:an.page,onChange:Tr,hideOnSinglePage:!0,showQuickJumper:!0}),ki>0&&Me.createElement("div",{className:_t.fixedRight,style:{width:zn}},ki===1&&Me.createElement(No,{identifier:ht,onClose:Wi,onOk:Sr}),ki===2&&Me.createElement(No,{active:Kn,identifier:ht,onClose:Wi,onOk:nr}),ki===3&&Me.createElement(Rs,{btnShowStatus:Ni,onArticlesSkip:Oo,detailsIndex:Zn,active:Kn,identifier:ht,onClose:Wi,onOk:xo,onEdit:Pi,onAssist:Po,onDelete:so})))},cs={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"},Cl=Object.defineProperty,Ea=Object.defineProperties,Pc=Object.getOwnPropertyDescriptors,Go=Object.getOwnPropertySymbols,Ka=Object.prototype.hasOwnProperty,Vo=Object.prototype.propertyIsEnumerable,vs=(ht,bt,Et)=>bt in ht?Cl(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,ds=(ht,bt)=>{for(var Et in bt||(bt={}))Ka.call(bt,Et)&&vs(ht,Et,bt[Et]);if(Go)for(var Et of Go(bt))Vo.call(bt,Et)&&vs(ht,Et,bt[Et]);return ht},Bs=(ht,bt)=>Ea(ht,Pc(bt)),Fo=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())}),Gr=({visible:ht,onVisible:bt,value:Et,onChange:wn,setIndex:fn})=>{var an;const Sn={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[xn,Cn]=(0,Me.useState)(Sn);const[zn,ni]=(0,Me.useState)([]),[Zn,wi]=(0,Me.useState)([]),[Kn,gi]=(0,Me.useState)(!1),si=(0,Me.useRef)([]),Ii=(0,Me.useRef)(null),Ni=(0,ke.useParams)();(0,Me.useEffect)(()=>(Ni!=null&&Ni.id&&(Ii.current=setInterval(()=>{Gi(30)},3e4)),()=>{clearInterval(Ii.current)}),[]);const Gi=pi=>Fo(void 0,null,function*(){const cr=yield(0,ge.uc)(Ni==null?void 0:Ni.id,{practice_time:pi})});(0,Me.useEffect)(()=>{Ei(xn),Qn()},[]),(0,Me.useEffect)(()=>(window.addEventListener("click",Ai),()=>{window.removeEventListener("click",Ai)}),[Ni==null?void 0:Ni.save_identifier,ht]),(0,Me.useEffect)(()=>{const pi=si.current.findIndex(Sr=>Sr.identifier===(Ni==null?void 0:Ni.save_identifier)),cr=si.current[pi-1],Qi=si.current[pi+1],Pi=document.getElementById("oj-prev"),Wi=document.getElementById("oj-next");cr?Pi.style.display="block":Pi.style.display="none",Qi?Wi.style.display="block":Wi.style.display="none"},[Ni==null?void 0:Ni.save_identifier,si.current]);const ki=(pi,cr)=>{if(pi.id===cr)return pi;for(let Qi=0,Pi=pi;Pi=Pi.parentNode;Qi++){if(Pi.id===cr)return Pi;if(Pi==document.documentElement)return!1}},Ai=pi=>Fo(void 0,null,function*(){!ki(pi.target,"oj-drawer")&&ht&&bt(!1);const cr=si.current.findIndex(Wi=>Wi.identifier===(Ni==null?void 0:Ni.save_identifier)),Qi=si.current[cr-1],Pi=si.current[cr+1];if(pi.target.id==="oj-prev"){if(!Qi||cr===-1){Le.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}pi.target.style.pointerEvents="none",pi.target.style.cursor="not-allowed",yield bi(Qi==null?void 0:Qi.identifier),fn("0"),setTimeout(()=>{pi.target.style.pointerEvents="auto",pi.target.style.cursor="pointer"},400)}if(pi.target.id==="oj-next"||pi.target.id==="oj-modal-next"){if(!Pi||cr===-1){Le.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}pi.target.style.pointerEvents="none",pi.target.style.cursor="not-allowed",yield bi(Pi==null?void 0:Pi.identifier),fn("0"),setTimeout(()=>{pi.target.style.pointerEvents="auto",pi.target.style.cursor="pointer"},400)}});(0,Me.useEffect)(()=>{wn(Ni==null?void 0:Ni.save_identifier);const pi=Zn.findIndex(cr=>cr.some(Qi=>Qi.identifier===(Ni==null?void 0:Ni.save_identifier)));Cn(pi===-1?Bs(ds({},xn),{page:1}):Bs(ds({},xn),{page:pi+1}))},[Ni==null?void 0:Ni.save_identifier,Zn]);const ur=pi=>{xn.page=1,xn.tag_discipline_id=pi,Cn(ds({},xn)),Ei(xn)},Qn=()=>Fo(void 0,null,function*(){const pi=yield(0,Hn.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});ni(pi.tag_disciplines||[])}),ji=pi=>{xn.page=1,xn.difficulty=typeof pi=="number"?pi:null,Cn(ds({},xn)),Ei(xn)},Ei=pi=>Fo(void 0,null,function*(){var cr,Qi;gi(!0);const Pi=yield(0,ge.KC)(pi);if(Pi!=null&&Pi.practices_list){for(var Wi=(cr=Pi==null?void 0:Pi.practices_list)==null?void 0:cr.length,Sr=[],nr=0;nr<Wi;nr+=xn==null?void 0:xn.per_page)Sr.push((Qi=Pi==null?void 0:Pi.practices_list)==null?void 0:Qi.slice(nr,nr+(xn==null?void 0:xn.per_page)));Cn(Bs(ds({},xn),{total:Pi==null?void 0:Pi.practices_count})),si.current=(Pi==null?void 0:Pi.practices_list)||[],wi(Sr)}gi(!1)}),bi=(pi,cr)=>Fo(void 0,null,function*(){const Qi=yield(0,Hn.ZP)(`/api/practices/${pi}/start`,{method:"get"});(Qi==null?void 0:Qi.status)===0&&ke.history.push(`/problems/${Qi==null?void 0:Qi.identifier}/oj/${pi}`)}),Ji=pi=>{xn.page=pi,Cn(ds({},xn))};return Me.createElement("div",{className:cs.wrap,id:"oj-drawer",style:{left:ht?0:-700}},Me.createElement("div",{className:cs.head},Me.createElement("div",{className:cs.title},"\u9898\u76EE\u5217\u8868"),Me.createElement(lt.default.Search,{value:xn==null?void 0:xn.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:pi=>{xn.save_search=pi.target.value,Cn(ds({},xn))},onSearch:()=>{xn.page=1,xn.search=xn.save_search,Cn(ds({},xn)),Ei(xn)}}),Me.createElement(xe.default,{value:xn==null?void 0:xn.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:pi=>pi.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:ur},zn.map(pi=>Me.createElement(xe.default.Option,{key:pi.id,value:pi.id},pi.name))),Me.createElement(xe.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:pi=>pi.parentNode,value:xn==null?void 0:xn.difficulty,onChange:ji},Me.createElement(xe.default.Option,{value:1},"\u7B80\u5355"),Me.createElement(xe.default.Option,{value:2},"\u9002\u4E2D"),Me.createElement(xe.default.Option,{value:3},"\u56F0\u96BE"))),Me.createElement("div",{className:cs.content},Me.createElement(ye.Z,{spinning:Kn},(an=Zn==null?void 0:Zn[xn.page-1])==null?void 0:an.map(pi=>Me.createElement("div",{key:pi.identifier,className:cs.list,onClick:cr=>bi(pi.identifier,cr)},Me.createElement("i",{style:{visibility:Et===pi.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),Me.createElement("span",{style:{fontWeight:Et===pi.identifier?"bold":400,color:Et===pi.identifier?"#ffffff":"#bac4cd"},title:pi==null?void 0:pi.name},pi.name),(pi==null?void 0:pi.difficulty)===1&&Me.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(pi==null?void 0:pi.difficulty)===2&&Me.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(pi==null?void 0:pi.difficulty)===3&&Me.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),Me.createElement("div",{className:cs.footer},Me.createElement(Qt.Z,{showTotal:pi=>Me.createElement("span",{style:{color:"#656F87"}},"\u5171",Me.createElement("span",{className:"c-light-primary"},pi),"\u6761\u6570\u636E"),total:xn.total,pageSize:xn==null?void 0:xn.per_page,current:xn==null?void 0:xn.page,showSizeChanger:!1,onChange:Ji,showQuickJumper:!0,hideOnSinglePage:!0})))},Ad=({hack:ht,onTriggerPraise:bt,topicId:Et,page:wn,onPageChange:fn,user:an,submitRecords:Sn,submitting:xn,submitResult:Cn})=>{const[zn]=(0,ke.useSearchParams)(),ni=(0,ke.useLocation)(),[Zn,wi]=(0,Me.useState)(zn.get("tab")||"0"),[Kn,gi]=(0,Me.useState)(0),[si,Ii]=(0,Me.useState)(0),[Ni,Gi]=(0,Me.useState)(0),[ki,Ai]=(0,Me.useState)(),[ur,Qn]=(0,Me.useState)(!1);function ji(bi){const Ji=bi.target.id;if(Zn==="3"&&Ji!==Zn&&(si===1||si===2)){he.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:()=>{wi(Ji)}});return}wi(Ji)}(0,Me.useEffect)(()=>Ne.Z.subscribe("to-commit-info",()=>{wi("1")}),[]);function Ei(){wi("2")}return Me.createElement("div",{className:Ft["left-panel"]},Me.createElement("ul",{className:`${Ft["s-navs"]} ${Ft["bg-white"]} ${Ft.b1}`},Me.createElement("li",{className:"mr40 current"},Me.createElement("img",{onClick:()=>Qn(!0),src:gn})),Me.createElement("li",{className:Ft["oj-mr"]},Me.createElement("a",{className:Zn==="0"?Ft.active:"",id:"0",onClick:ji},"\u4EFB\u52A1\u63CF\u8FF0")),Me.createElement("li",{className:Ft["oj-mr"]},Me.createElement("a",{className:Zn==="3"?Ft.active:"",id:"3",onClick:ji},"\u9898\u89E3",Ni?`(${Ni})`:"")),Me.createElement("li",{className:Ft["oj-mr"]},Me.createElement("a",{className:Zn==="2"?Ft.active:"",id:"2",onClick:ji},"\u8BC4\u8BBA",Kn?`(${Kn})`:"")),Me.createElement("li",null,Me.createElement("a",{className:Zn==="1"?Ft.active:"",id:"1",onClick:ji},"\u63D0\u4EA4\u8BB0\u5F55"))),Me.createElement("div",{className:`${Ft["tab-panel-body"]} ${Zn==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},Me.createElement(be,{hack:ht,onTriggerPraise:bt,toDiscuss:Ei})),Me.createElement("div",{className:`${Ft["tab-panel-body"]} ${Zn==="1"?"":"hide"}`},Sn!=null&&Sn.records_count?Me.createElement(Bt,{page:wn,onPageChange:fn,topicId:Et,submitting:xn,submitRecords:Sn,submitResult:Cn}):Me.createElement(xt.Z,null)),Me.createElement("div",{className:`${Ft["tab-panel-body"]} ${Zn==="2"?"":"hide"}`,style:{padding:0}},Me.createElement(Tt,{setDiscussTotal:gi,user:an,identifier:ht.identifier,hack:ht,onTriggerPraise:bt})),Me.createElement("div",{className:`${Ft["tab-panel-body"]} ${Zn==="3"?"":"hide"}`,style:{padding:0}},Me.createElement(dl,{setListStatus:Ii,setFilterListTotal:Gi,tabStatus:Zn,identifier:ht.identifier})),Me.createElement(Gr,{visible:ur,setIndex:wi,onVisible:bi=>Qn(bi),value:ki,onChange:bi=>Ai(bi)}))},Wo=Ee(19105),Nd=Ee(62522),ih=Ee(39775),rh=Ee(93450),Od=Ee(89392),Ch=Ee.n(Od),ic=Ee(56102),ro=Ee(59301),ns=Object.defineProperty,ku=Object.defineProperties,qh=Object.getOwnPropertyDescriptors,Au=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,uu=Object.prototype.propertyIsEnumerable,Fl=(ht,bt,Et)=>bt in ht?ns(ht,bt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ht[bt]=Et,ps=(ht,bt)=>{for(var Et in bt||(bt={}))ed.call(bt,Et)&&Fl(ht,Et,bt[Et]);if(Au)for(var Et of Au(bt))uu.call(bt,Et)&&Fl(ht,Et,bt[Et]);return ht},Fs=(ht,bt)=>ku(ht,qh(bt)),rc=(ht,bt)=>{var Et={};for(var wn in ht)ed.call(ht,wn)&&bt.indexOf(wn)<0&&(Et[wn]=ht[wn]);if(ht!=null&&Au)for(var wn of Au(ht))bt.indexOf(wn)<0&&uu.call(ht,wn)&&(Et[wn]=ht[wn]);return Et},el=(ht,bt,Et)=>new Promise((wn,fn)=>{var an=Cn=>{try{xn(Et.next(Cn))}catch(zn){fn(zn)}},Sn=Cn=>{try{xn(Et.throw(Cn))}catch(zn){fn(zn)}},xn=Cn=>Cn.done?wn(Cn.value):Promise.resolve(Cn.value).then(an,Sn);xn((Et=Et.apply(ht,bt)).next())});const{Countdown:Id}=Ce.default,td={Java:"java",C:"c",Python:"py","C++":"c"};var Dd=(ht=>(ht[ht.SET_LOADING=0]="SET_LOADING",ht[ht.GET_DATA=1]="GET_DATA",ht[ht.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",ht[ht.SET_DATA=3]="SET_DATA",ht[ht.SET_DEBUGING=4]="SET_DEBUGING",ht[ht.SET_SUBMITING=5]="SET_SUBMITING",ht[ht.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",ht[ht.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",ht[ht.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",ht[ht.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",ht[ht.SET_PAGE=10]="SET_PAGE",ht[ht.GET_LANGUAGE=11]="GET_LANGUAGE",ht[ht.GET_DRAWER=12]="GET_DRAWER",ht))(Dd||{});function Oa(){return new Date().getTime()}const oc={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 gf(ht,bt){switch(bt.type){case 1:return ps(ps({},ht),bt.payload);case 3:return Fs(ps({},ht),{data:bt.payload});case 0:return Fs(ps({},ht),{loading:bt.payload});case 11:return Fs(ps({},ht),{languageList:bt.payload});case 12:return Fs(ps({},ht),{drawerData:bt.payload});case 9:return Fs(ps({},ht),{showNote:bt.payload});case 4:return Fs(ps({},ht),{debuging:bt.payload});case 5:return Fs(ps({},ht),{submitting:bt.payload});case 2:return Fs(ps({},ht),{submitRecords:bt.payload});case 10:return Fs(ps({},ht),{submitRecordPage:bt.payload});case 6:return Fs(ps({},ht),{executingMessage:bt.payload});case 7:return ps(ps({},ht),bt.payload);case 8:return ps(ps({},ht),bt.payload);default:throw new Error}}var jt=({children:ht})=>{var bt,Et,wn,fn;const[an,Sn]=(0,Me.useReducer)(gf,oc),{id:xn}=(0,ke.useParams)(),Cn=(0,ke.useLocation)(),[zn]=(0,ke.useSearchParams)(),{languageValue:ni,languageList:Zn,loading:wi,data:Kn,debugResult:gi,submitResult:si,submitRecords:Ii,submitRecordPage:Ni,showNote:Gi,debuging:ki,submitting:Ai,executingMessage:ur}=an,[Qn,ji]=(0,Me.useState)("#FFF"),[Ei,bi]=(0,Me.useState)(null),[Ji,pi]=(0,Me.useState)({}),[cr,Qi]=(0,Me.useState)(!1),Pi=(0,Me.useRef)(null),Wi=(0,Me.useRef)(null),Sr=Kn==null?void 0:Kn.user,nr=Kn==null?void 0:Kn.hack;(0,Me.useEffect)(()=>((0,ke.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,ke.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,ke.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,ke.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,Me.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,Me.useEffect)(()=>{var Qr;if(cr){const Do=document.getElementById("oj-next"),Cs=document.getElementById("oj-modal-next");((Qr=Do==null?void 0:Do.style)==null?void 0:Qr.display)==="none"?Cs.style.display="none":Cs.style.display="block"}},[cr]),(0,Me.useEffect)(()=>{function Qr(){return el(this,null,function*(){var Do,Cs,Mo;const Jo=yield(0,ge.fu)(xn);if(Jo.status===401)document.location.href="/user/login";else{Jo.hack=Jo.practice,Jo.hack.code=yt.Base64.decode((Do=Jo==null?void 0:Jo.hack)==null?void 0:Do.code);const Ss=`${Sr==null?void 0:Sr.login}-language`;localStorage.getItem(Ss)&&(Jo.hack.language=localStorage.getItem(Ss)),Wi.current=Ch().cloneDeep(Jo),Wi.current.language=(Cs=Jo==null?void 0:Jo.hack)==null?void 0:Cs.language,Sn({type:1,payload:{loading:!1,data:Jo}}),Sn({type:8,payload:{languageValue:(Mo=Jo==null?void 0:Jo.hack)==null?void 0:Mo.language}})}})}xn&&Qr()},[xn]),(0,Me.useEffect)(()=>{Sn({type:8,payload:{debugResult:void 0}}),is(),Qi(!1)},[xn]),(0,Me.useEffect)(()=>{clearTimeout(Pi.current)},[xn]),(0,Me.useEffect)(()=>{Po()},[xn,Ni]);const xo=()=>{window.parent.postMessage("backExercise","*")};function Po(){return el(this,null,function*(){try{const Qr=yield(0,ge.zO)(xn,{limit:15,page:Ni});Sn({type:2,payload:Qr})}catch(Qr){console.log(Qr)}})}function is(){return el(this,null,function*(){try{const Qr=yield(0,ge.dd)(xn);Sn({type:11,payload:Qr==null?void 0:Qr.data})}catch(Qr){console.log(Qr)}})}function so(Qr){Sn({type:10,payload:Qr})}function Tr(Qr){return el(this,null,function*(){var Do,Cs,Mo;const Jo=((Mo=(Cs=(Do=window==null?void 0:window.location)==null?void 0:Do.pathname)==null?void 0:Cs.split("/"))==null?void 0:Mo[2])||xn;return yield(0,ge.n4)(Jo,Qr||{code:yt.Base64.encode(nr.code),language:ni})})}function Oo(){return el(this,null,function*(){var Qr;if(!nr.code||((Qr=nr.code)==null?void 0:Qr.trim())===""){Le.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(!Ai){Sn({type:5,payload:!0});try{if(Ne.Z.publish("to-commit-info"),(yield Tr()).status===0){let Pl=function(){return el(this,null,function*(){const{status:Qo,data:qo}=yield(0,ge.rX)(xn,"submit"),Ts=Oa()-Js>(Jo*Ss+3)*1e3;if(Qo!==0&&!Ts&&setTimeout(Pl,1e3),Ts){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Sn({type:5,payload:!1});return}if(Qo===0){qo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const ma=yield(0,ge.zO)(xn,{limit:15,page:Ni});Sn({type:8,payload:Fs(ps({},an),{submitResult:qo,submitting:!1,submitRecords:ma})}),(qo==null?void 0:qo.status)===0&&Qi(!0)}})},Cs={};if((yield(0,ge.bM)(xn,Cs)).status===-1&&zn.get("exercisesId")){window.parent.location.href=`/classrooms/${zn.get("coursesId")}/exercise/${zn.get("exercisesId")}/detail`;return}const{time_limit:Jo,test_case_size:Ss}=nr,Js=Oa();Pl()}}catch(Do){Sn({type:5,payload:!1})}}})}function Or(){return el(this,null,function*(){var Qr;if(!nr.code||((Qr=nr.code)==null?void 0:Qr.trim())===""){Le.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}an.debuging=!0,Sn({type:4,payload:!0});try{if((yield Tr()).status===0){let Js=function(){return el(this,null,function*(){const{status:Pl,message:Qo,data:qo}=yield(0,ge.rX)(xn,"debug"),Ts=Oa()-Ss>(Cs+3)*1e3;if(Pl!==0&&!Ts&&(Sn({type:6,payload:Qo}),setTimeout(Js,1e3)),Ts){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Sn({type:4,payload:!1});return}Pl===0&&(Sn({type:4,payload:!1}),qo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Sn({type:7,payload:Fs(ps({},an),{debugResult:qo,debuging:!1})}))})};const{time_limit:Cs}=nr;let Mo={input:encodeURIComponent(Kn.test_case.input)};if((yield(0,ge.MU)(xn,Mo)).status===-1&&zn.get("exercisesId")){window.parent.location.href=`/classrooms/${zn.get("coursesId")}/exercise/${zn.get("exercisesId")}/detail`;return}const Ss=Oa();Js()}else Sn({type:4,payload:!1})}catch(Do){console.log(Do)}finally{}})}function Xr(Qr){var Do;clearTimeout(Pi.current),Pi.current=setTimeout(()=>{var Cs;Tr({code:yt.Base64.encode(Qr),language:(Cs=Wi==null?void 0:Wi.current)==null?void 0:Cs.language})},2e3),Sn({type:3,payload:Fs(ps({},Wi==null?void 0:Wi.current),{hack:Fs(ps({},(Do=Wi==null?void 0:Wi.current)==null?void 0:Do.hack),{code:Qr})})})}function rs(Qr){let Do=Qr.target.value;Sn({type:3,payload:Fs(ps({},Kn),{test_case:{input:Do}})})}const Wr=Qr=>el(void 0,null,function*(){var Do;if(Sn({type:0,payload:!0}),(yield Tr()).status===0){Sn({type:8,payload:{languageValue:Qr}}),Wi.current.language=Qr;const Mo=`${Sr==null?void 0:Sr.login}-language`;localStorage.setItem(Mo,Qr);const Jo=yield(0,ge.dd)(xn);if(Jo.status===0){const Ss=(Do=Jo==null?void 0:Jo.data)==null?void 0:Do.find(Js=>Js.language===Qr);Xr(yt.Base64.decode(Ss.code))}setTimeout(()=>{Sn({type:0,payload:!1})},300)}});function Er(){return el(this,null,function*(){try{const Qr=yield(0,ge.H7)(xn,{language:ni});Qr.status===401?ke.history.replace("/login",{from:Cn.pathname}):(Xr(yt.Base64.decode(Qr.code)),is())}catch(Qr){console.log(Qr)}})}function Jr(){he.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ro.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",ro.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return el(this,null,function*(){const Qr=yield(0,ge.fi)(xn,{language:ni});Qr.status===401?ke.history.replace("/login",{from:Cn.pathname}):Xr(yt.Base64.decode(Qr.code))})}})}function Cr(){Sn({type:9,payload:!0})}function ao(){Sn({type:9,payload:!1})}function Lr(Qr){return el(this,null,function*(){yield(0,ge.MK)(xn,Qr),Sn({type:1,payload:{showNote:!1,data:Fs(ps({},Kn),{hack:Fs(ps({},nr),{notes:Qr.notes})})}})})}const fo={input:(bt=Kn==null?void 0:Kn.test_case)==null?void 0:bt.input,is_file:(Et=Kn==null?void 0:Kn.test_case)==null?void 0:Et.is_file,language:((wn=Wi.current)==null?void 0:wn.language)||(nr==null?void 0:nr.language),code:nr==null?void 0:nr.code,title:"main."+td[nr==null?void 0:nr.language],modify_code:nr==null?void 0:nr.modify_code,notes:nr==null?void 0:nr.notes,debugResult:gi,debuging:ki,submitting:Ai,executingMessage:ur,id:xn,languageValue:ni,languageList:Zn,onChangeLanguage:Wr,onCancelNote:ao,onAddNote:Lr,showNote:Gi,onShowNote:Cr,onSubmitCode:Oo,onChangeCode:Xr,onChangeInput:rs,onDebugCode:Or,onResetCode:Er,onSyncCode:Jr,onUpdateCode:Tr};function Zo(){return el(this,null,function*(){const{praise_count:Qr}=yield(0,ge.vl)(nr.id,{container_type:"Hack",type:1});let Do=Fs(ps({},Kn),{hack:Fs(ps({},nr),{praises_count:Qr,user_praise:!nr.user_praise})});Sn({type:3,payload:Do})})}const Ko={topicId:xn,submitResult:si,submitRecords:Ii,submitting:Ai,page:Ni,onPageChange:so,hack:nr,user:Kn==null?void 0:Kn.user,onTriggerPraise:Zo};return console.log(Kn,Wi==null?void 0:Wi.current,"data--------"),ro.createElement(ro.Fragment,null,ro.createElement(ye.Z,{className:"oj-custom-large-spin",size:"large",spinning:wi},Kn?ro.createElement("div",{className:"oj-custom-warp"},ro.createElement("header",{className:st.Z.header,style:{minWidth:1200}},ro.createElement("div",null,ro.createElement("img",{src:`${ve.Z.IMG_SERVER}/images/${Sr.image_url}`,alt:"user",width:30}),ro.createElement("span",null,Sr.name)),ro.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},ro.createElement("div",null,nr.name),ro.createElement(Wo.Z,{onChange:Qr=>{},className:"font12 c-grey-999"})),ro.createElement(ic.CopyToClipboard,{text:`${(fn=window.location)==null?void 0:fn.origin}/problems/${nr.identifier}/share`,onCopy:()=>Le.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},ro.createElement("span",{className:st.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",ro.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),nr.edit_privilege?ro.createElement(ke.Link,{className:st.Z.btn_back,to:`/problems/${nr.identifier}/ojedit`,style:{marginRight:10}}," ",ro.createElement(me.Z,null)," \u7F16\u8F91"):null,ro.createElement(ke.Link,{className:st.Z.btn_back,onClick:()=>{},to:"/problems"}," ",ro.createElement(Be.Z,null),"\u9000\u51FA")),ro.createElement(le.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:ro.createElement(Ad,ps({},Ko)),rightChild:ro.createElement(cn,ps({},fo))})):null),ro.createElement(he.default,{centered:!0,closable:!1,width:680,footer:null,open:cr,className:"oj-modal"},ro.createElement("section",{className:"oj-modal-content"},ro.createElement("div",{className:"oj-modal-head"},ro.createElement("img",{src:Nd,alt:""}),ro.createElement("i",{onClick:()=>Qi(!1),className:"iconfont icon-guanbi1"})),ro.createElement("aside",null,ro.createElement("img",{className:"mr30",src:rh.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",ro.createElement("span",{style:{color:"#75d6ba",marginRight:100}},si==null?void 0:si.execute_time,"s"),"\u4F18\u4E8E",ro.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(si==null?void 0:si.time_better_than)||100,"%"),"\u7684\u7528\u6237"),ro.createElement("aside",{className:"mb50"},ro.createElement("img",{src:ih.Z,className:"mr30"}),ro.createElement("span",{className:"oj-modal-tt"},ro.createElement("span",null,ro.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),ro.createElement("span",{className:"c-light-primary"},si==null?void 0:si.execute_memory,"mb")),ro.createElement("span",null,ro.createElement("span",null))),"\u4F18\u4E8E",ro.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(si==null?void 0:si.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),ro.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Ut({languageValue:ht,languageList:bt,onChangeLanguage:Et,title:wn,modify_code:fn,onSyncCode:an,onShowCodeSetting:Sn,onResetCode:xn}){const Cn=(0,ke.useLocation)(),zn=()=>{he.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:ro.createElement(de.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:xn})};return ro.createElement("div",{className:"action-bar"},ro.createElement(xe.default,{className:"oj-select",value:ht,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Et},bt==null?void 0:bt.map(ni=>ro.createElement(xe.default.Option,{key:ni.language,value:ni.language},ni.language))),ro.createElement("span",null),ro.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:zn},ro.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),ro.createElement("a",{onClick:Sn},ro.createElement("i",{className:"iconfont icon-shezhi"})))}function cn(ht){var bt=ht,{id:Et,input:wn,is_file:fn,showNote:an,onShowNote:Sn,notes:xn,onCancelNote:Cn,onAddNote:zn,debugResult:ni,language:Zn,debuging:wi,submitting:Kn,executingMessage:gi,code:si,onSubmitCode:Ii,onDebugCode:Ni,onChangeCode:Gi,onChangeInput:ki,onUpdateCode:Ai}=bt,ur=rc(bt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function Qn(Ei){return ro.createElement(Ut,Fs(ps({},ur),{onShowCodeSetting:Ei}))}const ji={id:Et,input:wn,debugResult:ni,debuging:wi,is_file:fn,submitting:Kn,executingMessage:gi,onDebugCode:Ni,onChangeCode:Gi,onSubmitCode:Ii,onChangeInput:ki};return ro.createElement("div",{className:"right-panel"},ro.createElement(Ct,{onUpdateCode:()=>{},language:Zn,value:si,onChange:Gi,ActionBarRender:Qn}),ro.createElement("div",{className:`note-form-area ${an?"active":""}`},ro.createElement(gt,{onCancel:Cn,notes:xn,callback:zn})),ro.createElement(zt.ZP,ps({},ji)))}},35106:function(_n,en,Ee){"use strict";Ee.d(en,{h:function(){return Me}});var Me=(me=>(me[me.NOMATCH=-1]="NOMATCH",me[me.OK=0]="OK",me[me.TIMEOUT=2]="TIMEOUT",me[me.PODFAILURE=3]="PODFAILURE",me[me.COMPILEFAILURE=4]="COMPILEFAILURE",me[me.EXECUTEFAILURE=5]="EXECUTEFAILURE",me[me.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",me))(Me||{})},49802:function(_n,en,Ee){"use strict";Ee.d(en,{H7:function(){return xe},KC:function(){return ce},M3:function(){return ie},MK:function(){return ye},MU:function(){return ke},Rg:function(){return Se},WH:function(){return z},X6:function(){return Le},bM:function(){return Be},bx:function(){return ee},dd:function(){return ve},de:function(){return Pe},fi:function(){return ge},fu:function(){return me},gu:function(){return oe},n4:function(){return le},qe:function(){return ue},rL:function(){return we},rX:function(){return he},uc:function(){return Ae},vl:function(){return de},wO:function(){return se},zO:function(){return Ce}});var Me=Ee(99064);function me(De){return(0,Me.U2)(`mypractices/${De}.json`,{hidePopLogin:!0})}function Be(De,ze){return(0,Me.v_)(`mypractices/${De}/code_submit.json`,ze)}function ke(De,ze){return(0,Me.v_)(`mypractices/${De}/code_debug.json`,ze)}function Ce(De,ze){return ze.language&&(ze.language=encodeURIComponent(ze.language)),(0,Me.U2)(`mypractices/${De}/submit_records.json`,ze)}function Le(De){return(0,Me.U2)("mypractices/record_detail.json",{id:De})}function he(De,ze){return(0,Me.U2)(`mypractices/${De}/result.json`,{mode:ze})}function ye(De,ze){return(0,Me.v_)(`mypractices/${De}/add_notes.json`,ze)}function xe(De,ze){return(0,Me.v_)(`mypractices/${De}/restore_initial_code.json`,ze)}function ge(De,ze){return(0,Me.v_)(`mypractices/${De}/sync_code.json`,ze)}function le(De,ze){return(0,Me.v_)(`mypractices/${De}/update_code.json`,ze)}function ve(De){return(0,Me.v_)(`mypractices/${De}/initial_codes.json`)}function de(De,ze){return(0,Me.v_)(`discusses/${De}/plus.json`,ze)}function ce(De){return(0,Me.U2)("practices/practices_list.json",De)}function z(De,ze){return(0,Me.U2)(`practices/${De}/question_solution_articles`,ze)}function ee(De,ze){return(0,Me.v_)(`practices/${De}/question_solution_articles`,ze)}function oe(De,ze){return(0,Me.gz)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}`,ze)}function ie(De,ze){return(0,Me.U2)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}/edit`,ze)}function se(De,ze){return(0,Me.U2)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}`,ze)}function ue(De,ze){return(0,Me.v_)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}/set_authority_or_excellent`,ze)}function Se(De,ze){return(0,Me.v_)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}/praise_or_treads`,ze)}function we(De,ze){return(0,Me.v_)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}/hide`)}function Pe(De,ze){return(0,Me.IV)(`practices/${De}/question_solution_articles/${ze==null?void 0:ze.active}`,ze)}function Ae(De,ze){return(0,Me.v_)(`mypractices/${De}/update_practice_time_sum`,ze)}},34362:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return de}});var Me=Ee(59301),me=Ee(8591),Be=Ee(6848),ke=Ee(71418),Ce=Ee(95237),Le=Ee(43604),he=Ee(58421),ye=Ee(3113),xe=Ee(12290),ge=Ee(99064),le=Ee(85149),ve=(z,ee,oe)=>new Promise((ie,se)=>{var ue=Pe=>{try{we(oe.next(Pe))}catch(Ae){se(Ae)}},Se=Pe=>{try{we(oe.throw(Pe))}catch(Ae){se(Ae)}},we=Pe=>Pe.done?ie(Pe.value):Promise.resolve(Pe.value).then(ue,Se);we((oe=oe.apply(z,ee)).next())}),de=({id:z,activeDiscussIndex:ee,onReplyDiscuss:oe,adminOrOperator:ie})=>{const[se,ue]=(0,Me.useState)(""),[Se,we]=(0,Me.useState)(!1);function Pe(De){ue(De)}function Ae(){if(!se){me.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}oe(z,se),ue("")}return(0,Me.useEffect)(()=>{ee!=z&&we(!1)},[ee]),Me.createElement("div",{key:z,className:"discuss-item-editor",style:{display:ee===z?"block":"none",width:"100%"}},Me.createElement(xe.Z,{miniToolbar:!0,startInit:ee===z,defaultValue:se,id:z,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:Pe,extraUse:ie&&Me.createElement(Be.Z,{color:"#fff",open:Se,destroyTooltipOnHide:!0,title:ce({id:z,isOpen:Se,activeDiscussIndex:ee,onChange:Pe,setIsOpen:we}),overlayStyle:{maxWidth:600}},Me.createElement("a",{title:Se?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>we(!Se)},Me.createElement("i",{className:"iconfont icon-dianzan11"})))}),Me.createElement("a",{onClick:Ae,className:"btn-send"},"\u53D1\u9001"))};const ce=z=>{const[ee,oe]=(0,Me.useState)(!1),[ie,se]=(0,Me.useState)([]),[ue,Se]=(0,Me.useState)(1);(0,Me.useEffect)(()=>{z!=null&&z.isOpen?we():(Se(1),se([]))},[z==null?void 0:z.isOpen]);const we=()=>ve(void 0,null,function*(){oe(!0);const Pe=yield(0,ge.ZP)(`/api/discusses/${z==null?void 0:z.id}/recommend_answer.json`,{method:"get"});(Pe==null?void 0:Pe.status)==0&&se(Pe==null?void 0:Pe.answer),oe(!1)});return Me.createElement(ke.Z,{spinning:ee},Me.createElement("div",{style:{color:"#000"}},Me.createElement(le.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(ie==null?void 0:ie[ue-1])||""}),Me.createElement(Ce.Z,{justify:"end",align:"middle"},Me.createElement(Le.Z,null,Me.createElement(he.Z,{simple:!0,current:ue,pageSize:1,total:(ie==null?void 0:ie.length)||0,onChange:Pe=>{Se(Pe)}})),Me.createElement(Le.Z,null,Me.createElement(ye.ZP,{onClick:()=>ve(void 0,null,function*(){z==null||z.onChange(ie==null?void 0:ie[ue-1]),z==null||z.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},70750:function(_n,en,Ee){"use strict";Ee.d(en,{o:function(){return xe}});var Me=Ee(99064),me=Ee(93125),Be=Ee.n(me);let ke="",Ce,Le="";function he(ge){ye(ge)}function ye(ge){Ce=new(Be()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(le){console.log("addFileSuccess: "+le.file.name),ge.addFileSuccess&&ge.addFileSuccess(le),Ce.startUpload()},onUploadstarted:function(le){const ve=le.file.name;if(le.videoId){var ce=`/api/users/${ke}/video_auths.json`;(0,Me.ZP)(ce,{method:"put",body:{video_id:le.videoId,title:ve,file_name:ve,virtual_classroom_id:Le}}).then(z=>{if(z.status==-1){ge.onUploadError&&ge.onUploadError(le);return}const ee=z.data;var oe=ee.UploadAuth,ie=ee.UploadAddress,se=ee.VideoId;Ce.setUploadAuthAndAddress(le,oe,ie)}).catch(z=>{Ce.deleteFile(Ce._curIndex),Ce.nextUpload(),console.log(z)})}else{var de=`/api/users/${ke}/video_auths.json`;const z="";(0,Me.ZP)(de,{method:"Post",body:{title:z+ve,file_name:z+ve,virtual_classroom_id:Le}}).then(ee=>{if(ee){const ue=ee.data;var oe=ue.UploadAuth,ie=ue.UploadAddress,se=ue.VideoId;Ce.setUploadAuthAndAddress(le,oe,ie,se)}}).catch(ee=>{Ce.deleteFile(Ce._curIndex),Ce.nextUpload(),console.log(ee)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(le){ge.onUploadSucceed&&ge.onUploadSucceed(le),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(le,ve,de){ge.onUploadFailed&&ge.onUploadFailed(le),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(le,ve,de){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(le,ve,de){ge.onUploadProgress&&ge.onUploadProgress(le,ve,de);var ce=Math.ceil(de*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(le){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var ve=`/api/users/${ke}/video_auths.json`;(0,Me.ZP)(ve,{method:"put",body:{video_id:le.videoId}}).then(de=>{var z=de.data.UploadAuth;Ce.resumeUploadWithAuth(z)}).catch(de=>{console.log(de)})},onUploadEnd:function(le){ge.onUploadEnd&&ge.onUploadEnd(le),console.log("onUploadEnd: uploaded all the files")}}),ge.gotUploader&&ge.gotUploader(Ce)}function xe(ge,le,ve){ge&&(ke=ge),le&&(Le=le),he(ve)}},4901:function(_n,en,Ee){"use strict";Ee.d(en,{BU:function(){return me},Dj:function(){return Me},gH:function(){return Be},vp:function(){return ke}});function Me(Ce){try{Ce.mozRequestFullScreen?Ce.mozRequestFullScreen():Ce.webkitRequestFullScreen&&Ce.webkitRequestFullScreen()}catch(Le){console.log(Le,":e")}}function me(){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 Be=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function ke(){var Ce=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,Le=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",Ce),window.isFullScreen?window.isFullScreen:Ce!=null}},24768:function(_n,en,Ee){"use strict";Ee.d(en,{AL:function(){return Se},Iy:function(){return le},Qv:function(){return ce},ez:function(){return ue},jb:function(){return ve}});var Me=Ee(32834),me=Ee.n(Me),Be=Ee(11690),ke=Ee.n(Be);let Ce=1;function Le(ze,Ze){const Xe=ze.match(/^(\s+)(?:```)/);if(Xe===null)return Ze;const Ge=Xe[1];return Ze.split(`
|
|
|
`).map(ft=>{const at=ft.match(/^\s+/);if(at===null)return ft;const[Ct]=at;return Ct.length>=Ge.length?ft.slice(Ge.length):ft}).join(`
|
|
|
`)}let he=[],ye=["<ul>"];const xe=new(me()).Renderer,ge=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function le(){he.length=0,ye=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function de(ze,Ze,Xe,Ge){if(Ze>=ze.length||ze[Ze].level<=Xe)return Ze;var ft=ze[Ze];Ge.push("<li><a href='#"+Ce+ft.anchor+"'>"+ft.text+"</a>"),Ze++;var at=[];return Ze=de(ze,Ze,ft.level,at),at.length>0&&(Ge.push("<ul>"),at.forEach(function(Ct){Ge.push(Ct)}),Ge.push("</ul>")),Ge.push("</li>"),Ze=de(ze,Ze,Xe,Ge),Ze}function ce(){return de(he,0,0,ye),ye.push("</ul>"),ye.join("")}const z={heading(ze){const Ze=ge.exec(ze);if(Ce+=1,Ze)return{type:"heading",raw:Ze[0],depth:Ze[1].length,text:Ze[2]}},fences(ze){const Ze=this.rules.block.fences.exec(ze);if(Ze){const Xe=Ze[0];let Ge=Le(Xe,Ze[3]||"");const ft=Ze[2]?Ze[2].trim():Ze[2];if(["latex","katex","math"].indexOf(ft)>=0){const at=ie(),Ct=Ge;Ge=at,se[at]={type:"block",expression:Ct}}return{type:"code",raw:Xe,lang:ft,text:Ge}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let oe=0;const ie=()=>`__special_katext_id_${oe++}__`;let se={};function ue(){return se}function Se(){oe=0,se={}}function we(ze){return ze=ze.replace(ee,(Ze,Xe)=>{const Ge=ie();return se[Ge]={type:"inline",expression:Xe},Ge}),ze}const Pe=xe.listitem;xe.listitem=function(ze){return Pe(we(ze))};const Ae=xe.paragraph;xe.paragraph=function(ze){return Ae(we(ze))};const De=xe.tablecell;xe.tablecell=function(ze,Ze){return De(we(ze),Ze)},xe.code=function(ze,Ze,Xe){const Ge=(Ze||"").match(/\S*/)[0];return Ge?["latex","katex","math"].indexOf(Ge)>=0?`<p class='editormd-tex'>${ze}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ze}">${Xe?ze:(0,Be.escape)(ze,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Xe?ze:(0,Be.escape)(ze,!0))+"</code></pre>"},xe.heading=function(ze,Ze,Xe){let Ge=this.options.headerPrefix+Xe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return he.push({anchor:Ge,level:Ze,text:ze}),"<h"+Ze+' id="'+Ce+Ge+'">'+ze+"</h"+Ze+">"},me().setOptions({silent:!0,gfm:!0,pedantic:!1}),me().use({tokenizer:z,renderer:xe}),en.ZP=me()},16479:function(_n,en,Ee){"use strict";Ee.d(en,{G:function(){return Ce},t:function(){return ke}});var Me=Ee(7062),me=Ee.n(Me);const Be=null;function ke(Le,he){let ye=me().get("__ec");ye||(ye={}),ye[Le]=he,me().set("__ec",ye)}function Ce(Le,he){let ye=me().get("__ec");return ye?ye[Le]===void 0?he:ye[Le]:he}},29382:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return lo}});class Me{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(Ke,qe){return Ke.__proto__=qe,Ke},Object.assign=Object.assign||function(Ke){if(Ke==null)throw new TypeError("Cannot convert undefined or null to object");let qe=Object(Ke);for(let Ye=1;Ye<arguments.length;Ye++){let St=arguments[Ye];if(St!=null)for(let Ot in St)St.hasOwnProperty(Ot)&&(qe[Ot]=St[Ot])}return qe},typeof self.Promise!="function"&&Ee(3867).polyfill()}}Me.install();var me=Me,Be=Ee(86204),ke=Ee.n(Be);class Ce{static e(Ke,qe){(!Ke||Ce.FORCE_GLOBAL_TAG)&&(Ke=Ce.GLOBAL_TAG);let Ye=`[${Ke}] > ${qe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","error",Ye),Ce.ENABLE_ERROR&&(console.error?console.error(Ye):console.warn?console.warn(Ye):console.log(Ye))}static i(Ke,qe){(!Ke||Ce.FORCE_GLOBAL_TAG)&&(Ke=Ce.GLOBAL_TAG);let Ye=`[${Ke}] > ${qe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","info",Ye),Ce.ENABLE_INFO&&(console.info?console.info(Ye):console.log(Ye))}static w(Ke,qe){(!Ke||Ce.FORCE_GLOBAL_TAG)&&(Ke=Ce.GLOBAL_TAG);let Ye=`[${Ke}] > ${qe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","warn",Ye),Ce.ENABLE_WARN&&(console.warn?console.warn(Ye):console.log(Ye))}static d(Ke,qe){(!Ke||Ce.FORCE_GLOBAL_TAG)&&(Ke=Ce.GLOBAL_TAG);let Ye=`[${Ke}] > ${qe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","debug",Ye),Ce.ENABLE_DEBUG&&(console.debug?console.debug(Ye):console.log(Ye))}static v(Ke,qe){(!Ke||Ce.FORCE_GLOBAL_TAG)&&(Ke=Ce.GLOBAL_TAG);let Ye=`[${Ke}] > ${qe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","verbose",Ye),Ce.ENABLE_VERBOSE&&console.log(Ye)}}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(ke());var Le=Ce;class he{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(Ke){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=Ke,this._totalBytes+=Ke):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=Ke,this._totalBytes+=Ke):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=Ke,this._totalBytes+=Ke,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let Ke=(this._now()-this._lastCheckpoint)/1e3;return Ke==0&&(Ke=1),this._intervalBytes/Ke/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let Ke=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/Ke/1024}}var ye=he;class xe{constructor(Ke){this._message=Ke}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class ge extends xe{constructor(Ke){super(Ke)}get name(){return"IllegalStateException"}}class le extends xe{constructor(Ke){super(Ke)}get name(){return"InvalidArgumentException"}}class ve extends xe{constructor(Ke){super(Ke)}get name(){return"NotImplementedException"}}const de={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},ce={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class z{constructor(Ke){this._type=Ke||"undefined",this._status=de.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=de.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===de.kConnecting||this._status===de.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(Ke){this._onContentLengthKnown=Ke}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(Ke){this._onURLRedirect=Ke}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ke){this._onDataArrival=Ke}get onError(){return this._onError}set onError(Ke){this._onError=Ke}get onComplete(){return this._onComplete}set onComplete(Ke){this._onComplete=Ke}open(Ke,qe){throw new ve("Unimplemented abstract function!")}abort(){throw new ve("Unimplemented abstract function!")}}let ee={};function oe(){let ri=self.navigator.userAgent.toLowerCase(),Ke=/(edge)\/([\w.]+)/.exec(ri)||/(opr)[\/]([\w.]+)/.exec(ri)||/(chrome)[ \/]([\w.]+)/.exec(ri)||/(iemobile)[\/]([\w.]+)/.exec(ri)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ri)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ri)||/(webkit)[ \/]([\w.]+)/.exec(ri)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ri)||/(msie) ([\w.]+)/.exec(ri)||ri.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(ri)||ri.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(ri)||[],qe=/(ipad)/.exec(ri)||/(ipod)/.exec(ri)||/(windows phone)/.exec(ri)||/(iphone)/.exec(ri)||/(kindle)/.exec(ri)||/(android)/.exec(ri)||/(windows)/.exec(ri)||/(mac)/.exec(ri)||/(linux)/.exec(ri)||/(cros)/.exec(ri)||[],Ye={browser:Ke[5]||Ke[3]||Ke[1]||"",version:Ke[2]||Ke[4]||"0",majorVersion:Ke[4]||Ke[2]||"0",platform:qe[0]||""},St={};if(Ye.browser){St[Ye.browser]=!0;let Ot=Ye.majorVersion.split(".");St.version={major:parseInt(Ye.majorVersion,10),string:Ye.version},Ot.length>1&&(St.version.minor=parseInt(Ot[1],10)),Ot.length>2&&(St.version.build=parseInt(Ot[2],10))}if(Ye.platform&&(St[Ye.platform]=!0),(St.chrome||St.opr||St.safari)&&(St.webkit=!0),St.rv||St.iemobile){St.rv&&delete St.rv;let Ot="msie";Ye.browser=Ot,St[Ot]=!0}if(St.edge){delete St.edge;let Ot="msedge";Ye.browser=Ot,St[Ot]=!0}if(St.opr){let Ot="opera";Ye.browser=Ot,St[Ot]=!0}if(St.safari&&St.android){let Ot="android";Ye.browser=Ot,St[Ot]=!0}St.name=Ye.browser,St.platform=Ye.platform;for(let Ot in ee)ee.hasOwnProperty(Ot)&&delete ee[Ot];Object.assign(ee,St)}oe();var ie=ee;class se extends z{static isSupported(){try{let Ke=ie.msedge&&ie.version.minor>=15048,qe=ie.msedge?Ke:!0;return self.fetch&&self.ReadableStream&&qe}catch(Ke){return!1}}constructor(Ke,qe){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=Ke,this._config=qe,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(Ke,qe){this._dataSource=Ke,this._range=qe;let Ye=Ke.url;this._config.reuseRedirectedURL&&Ke.redirectedURL!=null&&(Ye=Ke.redirectedURL);let St=this._seekHandler.getConfig(Ye,qe),Ot=new self.Headers;if(typeof St.headers=="object"){let _t=St.headers;for(let dn in _t)_t.hasOwnProperty(dn)&&Ot.append(dn,_t[dn])}let Tt={method:"GET",headers:Ot,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let _t in this._config.headers)Ot.append(_t,this._config.headers[_t]);Ke.cors===!1&&(Tt.mode="same-origin"),Ke.withCredentials&&(Tt.credentials="include"),Ke.referrerPolicy&&(Tt.referrerPolicy=Ke.referrerPolicy),this._status=de.kConnecting,self.fetch(St.url,Tt).then(_t=>{if(this._requestAbort){this._requestAbort=!1,this._status=de.kIdle;return}if(_t.ok&&_t.status>=200&&_t.status<=299){if(_t.url!==St.url&&this._onURLRedirect){let Pn=this._seekHandler.removeURLParameters(_t.url);this._onURLRedirect(Pn)}let dn=_t.headers.get("Content-Length");return dn!=null&&(this._contentLength=parseInt(dn),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,_t.body.getReader())}else if(this._status=de.kError,this._onError)this._onError(ce.HTTP_STATUS_CODE_INVALID,{code:_t.status,msg:_t.statusText});else throw new xe("FetchStreamLoader: Http code invalid, "+_t.status+" "+_t.statusText)}).catch(_t=>{if(this._status=de.kError,this._onError)this._onError(ce.EXCEPTION,{code:-1,msg:_t.message});else throw _t})}abort(){this._requestAbort=!0}_pump(Ke){return Ke.read().then(qe=>{if(qe.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=de.kError;let Ye=ce.EARLY_EOF,St={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(Ye,St);else throw new xe(St.msg)}else this._status=de.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=de.kComplete,Ke.cancel();this._status=de.kBuffering;let Ye=qe.value.buffer,St=this._range.from+this._receivedLength;this._receivedLength+=Ye.byteLength,this._onDataArrival&&this._onDataArrival(Ye,St,this._receivedLength),this._pump(Ke)}}).catch(qe=>{if(qe.code===11&&ie.msedge)return;this._status=de.kError;let Ye=0,St=null;if((qe.code===19||qe.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(Ye=ce.EARLY_EOF,St={code:qe.code,msg:"Fetch stream meet Early-EOF"}):(Ye=ce.EXCEPTION,St={code:qe.code,msg:qe.message}),this._onError)this._onError(Ye,St);else throw new xe(St.msg)})}}var ue=se;class Se extends z{static isSupported(){try{let Ke=new XMLHttpRequest;return Ke.open("GET","https://example.com",!0),Ke.responseType="moz-chunked-arraybuffer",Ke.responseType==="moz-chunked-arraybuffer"}catch(Ke){return Le.w("MozChunkedLoader",Ke.message),!1}}constructor(Ke,qe){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=Ke,this._config=qe,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(Ke,qe){this._dataSource=Ke,this._range=qe;let Ye=Ke.url;this._config.reuseRedirectedURL&&Ke.redirectedURL!=null&&(Ye=Ke.redirectedURL);let St=this._seekHandler.getConfig(Ye,qe);this._requestURL=St.url;let Ot=this._xhr=new XMLHttpRequest;if(Ot.open("GET",St.url,!0),Ot.responseType="moz-chunked-arraybuffer",Ot.onreadystatechange=this._onReadyStateChange.bind(this),Ot.onprogress=this._onProgress.bind(this),Ot.onloadend=this._onLoadEnd.bind(this),Ot.onerror=this._onXhrError.bind(this),Ke.withCredentials&&(Ot.withCredentials=!0),typeof St.headers=="object"){let Tt=St.headers;for(let _t in Tt)Tt.hasOwnProperty(_t)&&Ot.setRequestHeader(_t,Tt[_t])}if(typeof this._config.headers=="object"){let Tt=this._config.headers;for(let _t in Tt)Tt.hasOwnProperty(_t)&&Ot.setRequestHeader(_t,Tt[_t])}this._status=de.kConnecting,Ot.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=de.kComplete}_onReadyStateChange(Ke){let qe=Ke.target;if(qe.readyState===2){if(qe.responseURL!=null&&qe.responseURL!==this._requestURL&&this._onURLRedirect){let Ye=this._seekHandler.removeURLParameters(qe.responseURL);this._onURLRedirect(Ye)}if(qe.status!==0&&(qe.status<200||qe.status>299))if(this._status=de.kError,this._onError)this._onError(ce.HTTP_STATUS_CODE_INVALID,{code:qe.status,msg:qe.statusText});else throw new xe("MozChunkedLoader: Http code invalid, "+qe.status+" "+qe.statusText);else this._status=de.kBuffering}}_onProgress(Ke){if(this._status===de.kError)return;this._contentLength===null&&Ke.total!==null&&Ke.total!==0&&(this._contentLength=Ke.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let qe=Ke.target.response,Ye=this._range.from+this._receivedLength;this._receivedLength+=qe.byteLength,this._onDataArrival&&this._onDataArrival(qe,Ye,this._receivedLength)}_onLoadEnd(Ke){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===de.kError)return;this._status=de.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(Ke){this._status=de.kError;let qe=0,Ye=null;if(this._contentLength&&Ke.loaded<this._contentLength?(qe=ce.EARLY_EOF,Ye={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(qe=ce.EXCEPTION,Ye={code:-1,msg:Ke.constructor.name+" "+Ke.type}),this._onError)this._onError(qe,Ye);else throw new xe(Ye.msg)}}var we=Se;class Pe extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let Ke=new XMLHttpRequest;return Ke.open("GET","https://example.com",!0),Ke.responseType="ms-stream",Ke.responseType==="ms-stream"}catch(Ke){return Log.w("MSStreamLoader",Ke.message),!1}}constructor(Ke,qe){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=Ke,this._config=qe,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(Ke,qe){this._internalOpen(Ke,qe,!1)}_internalOpen(Ke,qe,Ye){this._dataSource=Ke,Ye?this._currentRange=qe:this._totalRange=qe;let St=Ke.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?St=this._currentRedirectedURL:Ke.redirectedURL!=null&&(St=Ke.redirectedURL));let Ot=this._seekHandler.getConfig(St,qe);this._currentRequestURL=Ot.url;let Tt=this._reader=new self.MSStreamReader;Tt.onprogress=this._msrOnProgress.bind(this),Tt.onload=this._msrOnLoad.bind(this),Tt.onerror=this._msrOnError.bind(this);let _t=this._xhr=new XMLHttpRequest;if(_t.open("GET",Ot.url,!0),_t.responseType="ms-stream",_t.onreadystatechange=this._xhrOnReadyStateChange.bind(this),_t.onerror=this._xhrOnError.bind(this),Ke.withCredentials&&(_t.withCredentials=!0),typeof Ot.headers=="object"){let dn=Ot.headers;for(let Pn in dn)dn.hasOwnProperty(Pn)&&_t.setRequestHeader(Pn,dn[Pn])}if(typeof this._config.headers=="object"){let dn=this._config.headers;for(let Pn in dn)dn.hasOwnProperty(Pn)&&_t.setRequestHeader(Pn,dn[Pn])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,_t.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(Ke){let qe=Ke.target;if(qe.readyState===2)if(qe.status>=200&&qe.status<=299){if(this._status=LoaderStatus.kBuffering,qe.responseURL!=null){let St=this._seekHandler.removeURLParameters(qe.responseURL);qe.responseURL!==this._currentRequestURL&&St!==this._currentRedirectedURL&&(this._currentRedirectedURL=St,this._onURLRedirect&&this._onURLRedirect(St))}let Ye=qe.getResponseHeader("Content-Length");if(Ye!=null&&this._contentLength==null){let St=parseInt(Ye);St>0&&(this._contentLength=St,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:qe.status,msg:qe.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+qe.status+" "+qe.statusText);else if(qe.readyState===3&&qe.status>=200&&qe.status<=299){this._status=LoaderStatus.kBuffering;let Ye=qe.response;this._reader.readAsArrayBuffer(Ye)}}_xhrOnError(Ke){this._status=LoaderStatus.kError;let qe=LoaderErrors.EXCEPTION,Ye={code:-1,msg:Ke.constructor.name+" "+Ke.type};if(this._onError)this._onError(qe,Ye);else throw new RuntimeException(Ye.msg)}_msrOnProgress(Ke){let Ye=Ke.target.result;if(Ye==null){this._doReconnectIfNeeded();return}let St=Ye.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Ye.byteLength;let Ot=this._totalRange.from+this._receivedLength;this._receivedLength+=St.byteLength,this._onDataArrival&&this._onDataArrival(St,Ot,this._receivedLength),Ye.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${Ot+St.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let Ke={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,Ke,!0)}}_msrOnLoad(Ke){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(Ke){this._status=LoaderStatus.kError;let qe=0,Ye=null;if(this._contentLength&&this._receivedLength<this._contentLength?(qe=LoaderErrors.EARLY_EOF,Ye={code:-1,msg:"MSStream meet Early-Eof"}):(qe=LoaderErrors.EARLY_EOF,Ye={code:-1,msg:Ke.constructor.name+" "+Ke.type}),this._onError)this._onError(qe,Ye);else throw new RuntimeException(Ye.msg)}}var Ae=null;class De extends z{static isSupported(){try{let Ke=new XMLHttpRequest;return Ke.open("GET","https://example.com",!0),Ke.responseType="arraybuffer",Ke.responseType==="arraybuffer"}catch(Ke){return Le.w("RangeLoader",Ke.message),!1}}constructor(Ke,qe){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=Ke,this._config=qe,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 ye,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(Ke,qe){this._dataSource=Ke,this._range=qe,this._status=de.kConnecting;let Ye=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Ye=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Ye?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let Ke=this._currentChunkSizeKB*1024,qe=this._range.from+this._receivedLength,Ye=qe+Ke;this._contentLength!=null&&Ye-this._range.from>=this._contentLength&&(Ye=this._range.from+this._contentLength-1),this._currentRequestRange={from:qe,to:Ye},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(Ke,qe){this._lastTimeLoaded=0;let Ye=Ke.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Ye=this._currentRedirectedURL:Ke.redirectedURL!=null&&(Ye=Ke.redirectedURL));let St=this._seekHandler.getConfig(Ye,qe);this._currentRequestURL=St.url;let Ot=this._xhr=new XMLHttpRequest;if(Ot.open("GET",St.url,!0),Ot.responseType="arraybuffer",Ot.onreadystatechange=this._onReadyStateChange.bind(this),Ot.onprogress=this._onProgress.bind(this),Ot.onload=this._onLoad.bind(this),Ot.onerror=this._onXhrError.bind(this),Ke.withCredentials&&(Ot.withCredentials=!0),typeof St.headers=="object"){let Tt=St.headers;for(let _t in Tt)Tt.hasOwnProperty(_t)&&Ot.setRequestHeader(_t,Tt[_t])}if(typeof this._config.headers=="object"){let Tt=this._config.headers;for(let _t in Tt)Tt.hasOwnProperty(_t)&&Ot.setRequestHeader(_t,Tt[_t])}Ot.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=de.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(Ke){let qe=Ke.target;if(qe.readyState===2){if(qe.responseURL!=null){let Ye=this._seekHandler.removeURLParameters(qe.responseURL);qe.responseURL!==this._currentRequestURL&&Ye!==this._currentRedirectedURL&&(this._currentRedirectedURL=Ye,this._onURLRedirect&&this._onURLRedirect(Ye))}if(qe.status>=200&&qe.status<=299){if(this._waitForTotalLength)return;this._status=de.kBuffering}else if(this._status=de.kError,this._onError)this._onError(ce.HTTP_STATUS_CODE_INVALID,{code:qe.status,msg:qe.statusText});else throw new xe("RangeLoader: Http code invalid, "+qe.status+" "+qe.statusText)}}_onProgress(Ke){if(this._status===de.kError)return;if(this._contentLength===null){let Ye=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,Ye=!0;let St=Ke.total;this._internalAbort(),St!=null&St!==0&&(this._totalLength=St)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,Ye){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let qe=Ke.loaded-this._lastTimeLoaded;this._lastTimeLoaded=Ke.loaded,this._speedSampler.addBytes(qe)}_normalizeSpeed(Ke){let qe=this._chunkSizeKBList,Ye=qe.length-1,St=0,Ot=0,Tt=Ye;if(Ke<qe[0])return qe[0];for(;Ot<=Tt;){if(St=Ot+Math.floor((Tt-Ot)/2),St===Ye||Ke>=qe[St]&&Ke<qe[St+1])return qe[St];qe[St]<Ke?Ot=St+1:Tt=St-1}}_onLoad(Ke){if(this._status===de.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let qe=this._speedSampler.lastSecondKBps;if(qe===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(qe=this._speedSampler.currentKBps)),qe!==0){let Tt=this._normalizeSpeed(qe);this._currentSpeedNormalized!==Tt&&(this._currentSpeedNormalized=Tt,this._currentChunkSizeKB=Tt)}let Ye=Ke.target.response,St=this._range.from+this._receivedLength;this._receivedLength+=Ye.byteLength;let Ot=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():Ot=!0,this._onDataArrival&&this._onDataArrival(Ye,St,this._receivedLength),Ot&&(this._status=de.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(Ke){this._status=de.kError;let qe=0,Ye=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(qe=ce.EARLY_EOF,Ye={code:-1,msg:"RangeLoader meet Early-Eof"}):(qe=ce.EXCEPTION,Ye={code:-1,msg:Ke.constructor.name+" "+Ke.type}),this._onError)this._onError(qe,Ye);else throw new xe(Ye.msg)}}var ze=De;class Ze extends z{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(Ke){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(Ke){try{let qe=this._ws=new self.WebSocket(Ke.url);qe.binaryType="arraybuffer",qe.onopen=this._onWebSocketOpen.bind(this),qe.onclose=this._onWebSocketClose.bind(this),qe.onmessage=this._onWebSocketMessage.bind(this),qe.onerror=this._onWebSocketError.bind(this),this._status=de.kConnecting}catch(qe){this._status=de.kError;let Ye={code:qe.code,msg:qe.message};if(this._onError)this._onError(ce.EXCEPTION,Ye);else throw new xe(Ye.msg)}}abort(){let Ke=this._ws;Ke&&(Ke.readyState===0||Ke.readyState===1)&&(this._requestAbort=!0,Ke.close()),this._ws=null,this._status=de.kComplete}_onWebSocketOpen(Ke){this._status=de.kBuffering}_onWebSocketClose(Ke){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=de.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(Ke){if(Ke.data instanceof ArrayBuffer)this._dispatchArrayBuffer(Ke.data);else if(Ke.data instanceof Blob){let qe=new FileReader;qe.onload=()=>{this._dispatchArrayBuffer(qe.result)},qe.readAsArrayBuffer(Ke.data)}else{this._status=de.kError;let qe={code:-1,msg:"Unsupported WebSocket message type: "+Ke.data.constructor.name};if(this._onError)this._onError(ce.EXCEPTION,qe);else throw new xe(qe.msg)}}_dispatchArrayBuffer(Ke){let qe=Ke,Ye=this._receivedLength;this._receivedLength+=qe.byteLength,this._onDataArrival&&this._onDataArrival(qe,Ye,this._receivedLength)}_onWebSocketError(Ke){this._status=de.kError;let qe={code:Ke.code,msg:Ke.message};if(this._onError)this._onError(ce.EXCEPTION,qe);else throw new xe(qe.msg)}}var Xe=Ze;class Ge{constructor(Ke){this._zeroStart=Ke||!1}getConfig(Ke,qe){let Ye={};if(qe.from!==0||qe.to!==-1){let St;qe.to!==-1?St=`bytes=${qe.from.toString()}-${qe.to.toString()}`:St=`bytes=${qe.from.toString()}-`,Ye.Range=St}else this._zeroStart&&(Ye.Range="bytes=0-");return{url:Ke,headers:Ye}}removeURLParameters(Ke){return Ke}}var ft=Ge;class at{constructor(Ke,qe){this._startName=Ke,this._endName=qe}getConfig(Ke,qe){let Ye=Ke;if(qe.from!==0||qe.to!==-1){let St=!0;Ye.indexOf("?")===-1&&(Ye+="?",St=!1),St&&(Ye+="&"),Ye+=`${this._startName}=${qe.from.toString()}`,qe.to!==-1&&(Ye+=`&${this._endName}=${qe.to.toString()}`)}return{url:Ye,headers:{}}}removeURLParameters(Ke){let qe=Ke.split("?")[0],Ye,St=Ke.indexOf("?");St!==-1&&(Ye=Ke.substring(St+1));let Ot="";if(Ye!=null&&Ye.length>0){let Tt=Ye.split("&");for(let _t=0;_t<Tt.length;_t++){let dn=Tt[_t].split("="),Pn=_t>0;dn[0]!==this._startName&&dn[0]!==this._endName&&(Pn&&(Ot+="&"),Ot+=Tt[_t])}}return Ot.length===0?qe:qe+"?"+Ot}}var Ct=at;class et{constructor(Ke,qe,Ye){this.TAG="IOController",this._config=qe,this._extraData=Ye,this._stashInitialSize=1024*384,qe.stashInitialSize!=null&&qe.stashInitialSize>0&&(this._stashInitialSize=qe.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,qe.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=Ke,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(Ke.url),this._refTotalLength=Ke.filesize?Ke.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new ye,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(Ke){this._extraData=Ke}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ke){this._onDataArrival=Ke}get onSeeked(){return this._onSeeked}set onSeeked(Ke){this._onSeeked=Ke}get onError(){return this._onError}set onError(Ke){this._onError=Ke}get onComplete(){return this._onComplete}set onComplete(Ke){this._onComplete=Ke}get onRedirect(){return this._onRedirect}set onRedirect(Ke){this._onRedirect=Ke}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(Ke){this._onRecoveredEarlyEof=Ke}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===ze?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let Ke=this._config;if(Ke.seekType==="range")this._seekHandler=new ft(this._config.rangeLoadZeroStart);else if(Ke.seekType==="param"){let qe=Ke.seekParamStart||"bstart",Ye=Ke.seekParamEnd||"bend";this._seekHandler=new Ct(qe,Ye)}else if(Ke.seekType==="custom"){if(typeof Ke.customSeekHandler!="function")throw new le("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new Ke.customSeekHandler}else throw new le(`Invalid seekType in config: ${Ke.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=Xe;else if(ue.isSupported())this._loaderClass=ue;else if(we.isSupported())this._loaderClass=we;else if(ze.isSupported())this._loaderClass=ze;else throw new xe("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(Ke){this._currentRange={from:0,to:-1},Ke&&(this._currentRange.from=Ke),this._speedSampler.reset(),Ke||(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 Ke=this._resumeFrom;this._resumeFrom=0,this._internalSeek(Ke,!0)}}seek(Ke){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(Ke,!0)}_internalSeek(Ke,qe){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(qe),this._loader.destroy(),this._loader=null;let Ye={from:Ke,to:-1};this._currentRange={from:Ye.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,Ye),this._onSeeked&&this._onSeeked()}updateUrl(Ke){if(!Ke||typeof Ke!="string"||Ke.length===0)throw new le("Url must be a non-empty string!");this._dataSource.url=Ke}_expandBuffer(Ke){let qe=this._stashSize;for(;qe+1024*1024*1<Ke;)qe*=2;if(qe+=1024*1024*1,qe===this._bufferSize)return;let Ye=new ArrayBuffer(qe);if(this._stashUsed>0){let St=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(Ye,0,qe).set(St,0)}this._stashBuffer=Ye,this._bufferSize=qe}_normalizeSpeed(Ke){let qe=this._speedNormalizeList,Ye=qe.length-1,St=0,Ot=0,Tt=Ye;if(Ke<qe[0])return qe[0];for(;Ot<=Tt;){if(St=Ot+Math.floor((Tt-Ot)/2),St===Ye||Ke>=qe[St]&&Ke<qe[St+1])return qe[St];qe[St]<Ke?Ot=St+1:Tt=St-1}}_adjustStashSize(Ke){let qe=0;this._config.isLive||Ke<512?qe=Ke:Ke>=512&&Ke<=1024?qe=Math.floor(Ke*1.5):qe=Ke*2,qe>8192&&(qe=8192);let Ye=qe*1024+1024*1024*1;this._bufferSize<Ye&&this._expandBuffer(Ye),this._stashSize=qe*1024}_dispatchChunks(Ke,qe){return this._currentRange.to=qe+Ke.byteLength-1,this._onDataArrival(Ke,qe)}_onURLRedirect(Ke){this._redirectedURL=Ke,this._onRedirect&&this._onRedirect(Ke)}_onContentLengthKnown(Ke){Ke&&this._fullRequestFlag&&(this._totalLength=Ke,this._fullRequestFlag=!1)}_onLoaderChunkArrival(Ke,qe,Ye){if(!this._onDataArrival)throw new ge("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(Ke.byteLength);let St=this._speedSampler.lastSecondKBps;if(St!==0){let Ot=this._normalizeSpeed(St);this._speedNormalized!==Ot&&(this._speedNormalized=Ot,this._adjustStashSize(Ot))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=qe),this._stashUsed+Ke.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(Ke),this._stashUsed),this._stashUsed+=Ke.byteLength;else{let Ot=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let Tt=this._stashBuffer.slice(0,this._stashUsed),_t=this._dispatchChunks(Tt,this._stashByteStart);if(_t<Tt.byteLength){if(_t>0){let dn=new Uint8Array(Tt,_t);Ot.set(dn,0),this._stashUsed=dn.byteLength,this._stashByteStart+=_t}}else this._stashUsed=0,this._stashByteStart+=_t;this._stashUsed+Ke.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+Ke.byteLength),Ot=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Ot.set(new Uint8Array(Ke),this._stashUsed),this._stashUsed+=Ke.byteLength}else{let Tt=this._dispatchChunks(Ke,qe);if(Tt<Ke.byteLength){let _t=Ke.byteLength-Tt;_t>this._bufferSize&&(this._expandBuffer(_t),Ot=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Ot.set(new Uint8Array(Ke,Tt),0),this._stashUsed+=_t,this._stashByteStart=qe+Tt}}}else if(this._stashUsed===0){let Ot=this._dispatchChunks(Ke,qe);if(Ot<Ke.byteLength){let Tt=Ke.byteLength-Ot;Tt>this._bufferSize&&this._expandBuffer(Tt),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(Ke,Ot),0),this._stashUsed+=Tt,this._stashByteStart=qe+Ot}}else{this._stashUsed+Ke.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+Ke.byteLength);let Ot=new Uint8Array(this._stashBuffer,0,this._bufferSize);Ot.set(new Uint8Array(Ke),this._stashUsed),this._stashUsed+=Ke.byteLength;let Tt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(Tt<this._stashUsed&&Tt>0){let _t=new Uint8Array(this._stashBuffer,Tt);Ot.set(_t,0)}this._stashUsed-=Tt,this._stashByteStart+=Tt}}_flushStashBuffer(Ke){if(this._stashUsed>0){let qe=this._stashBuffer.slice(0,this._stashUsed),Ye=this._dispatchChunks(qe,this._stashByteStart),St=qe.byteLength-Ye;if(Ye<qe.byteLength)if(Ke)Le.w(this.TAG,`${St} bytes unconsumed data remain when flush buffer, dropped`);else{if(Ye>0){let Ot=new Uint8Array(this._stashBuffer,0,this._bufferSize),Tt=new Uint8Array(qe,Ye);Ot.set(Tt,0),this._stashUsed=Tt.byteLength,this._stashByteStart+=Ye}return 0}return this._stashUsed=0,this._stashByteStart=0,St}return 0}_onLoaderComplete(Ke,qe){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(Ke,qe){switch(Le.e(this.TAG,`Loader error, code = ${qe.code}, msg = ${qe.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,Ke=ce.UNRECOVERABLE_EARLY_EOF),Ke){case ce.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let Ye=this._currentRange.to+1;Ye<this._totalLength&&(Le.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(Ye,!1));return}Ke=ce.UNRECOVERABLE_EARLY_EOF;break}case ce.UNRECOVERABLE_EARLY_EOF:case ce.CONNECTING_TIMEOUT:case ce.HTTP_STATUS_CODE_INVALID:case ce.EXCEPTION:break}if(this._onError)this._onError(Ke,qe);else throw new xe("IOException: "+qe.msg)}}var yt=et;const st={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 zt(){return Object.assign({},st)}class lt{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let Ke=new yt({},zt()),qe=Ke.loaderType;return Ke.destroy(),qe=="fetch-stream-loader"||qe=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let Ke=new yt({},zt()),qe=Ke.loaderType;return Ke.destroy(),qe}static supportNativeMediaPlayback(Ke){lt.videoElement==null&&(lt.videoElement=window.document.createElement("video"));let qe=lt.videoElement.canPlayType(Ke);return qe==="probably"||qe=="maybe"}static getFeatureList(){let Ke={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return Ke.mseFlvPlayback=lt.supportMSEH264Playback(),Ke.networkStreamIO=lt.supportNetworkStreamIO(),Ke.networkLoaderName=lt.getNetworkLoaderTypeName(),Ke.mseLiveFlvPlayback=Ke.mseFlvPlayback&&Ke.networkStreamIO,Ke.nativeMP4H264Playback=lt.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),Ke.nativeWebmVP8Playback=lt.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),Ke.nativeWebmVP9Playback=lt.supportNativeMediaPlayback('video/webm; codecs="vp9"'),Ke}}var tt=lt,mt={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 Pt{static get forceGlobalTag(){return Le.FORCE_GLOBAL_TAG}static set forceGlobalTag(Ke){Le.FORCE_GLOBAL_TAG=Ke,Pt._notifyChange()}static get globalTag(){return Le.GLOBAL_TAG}static set globalTag(Ke){Le.GLOBAL_TAG=Ke,Pt._notifyChange()}static get enableAll(){return Le.ENABLE_VERBOSE&&Le.ENABLE_DEBUG&&Le.ENABLE_INFO&&Le.ENABLE_WARN&&Le.ENABLE_ERROR}static set enableAll(Ke){Le.ENABLE_VERBOSE=Ke,Le.ENABLE_DEBUG=Ke,Le.ENABLE_INFO=Ke,Le.ENABLE_WARN=Ke,Le.ENABLE_ERROR=Ke,Pt._notifyChange()}static get enableDebug(){return Le.ENABLE_DEBUG}static set enableDebug(Ke){Le.ENABLE_DEBUG=Ke,Pt._notifyChange()}static get enableVerbose(){return Le.ENABLE_VERBOSE}static set enableVerbose(Ke){Le.ENABLE_VERBOSE=Ke,Pt._notifyChange()}static get enableInfo(){return Le.ENABLE_INFO}static set enableInfo(Ke){Le.ENABLE_INFO=Ke,Pt._notifyChange()}static get enableWarn(){return Le.ENABLE_WARN}static set enableWarn(Ke){Le.ENABLE_WARN=Ke,Pt._notifyChange()}static get enableError(){return Le.ENABLE_ERROR}static set enableError(Ke){Le.ENABLE_ERROR=Ke,Pt._notifyChange()}static getConfig(){return{globalTag:Le.GLOBAL_TAG,forceGlobalTag:Le.FORCE_GLOBAL_TAG,enableVerbose:Le.ENABLE_VERBOSE,enableDebug:Le.ENABLE_DEBUG,enableInfo:Le.ENABLE_INFO,enableWarn:Le.ENABLE_WARN,enableError:Le.ENABLE_ERROR,enableCallback:Le.ENABLE_CALLBACK}}static applyConfig(Ke){Le.GLOBAL_TAG=Ke.globalTag,Le.FORCE_GLOBAL_TAG=Ke.forceGlobalTag,Le.ENABLE_VERBOSE=Ke.enableVerbose,Le.ENABLE_DEBUG=Ke.enableDebug,Le.ENABLE_INFO=Ke.enableInfo,Le.ENABLE_WARN=Ke.enableWarn,Le.ENABLE_ERROR=Ke.enableError,Le.ENABLE_CALLBACK=Ke.enableCallback}static _notifyChange(){let Ke=Pt.emitter;if(Ke.listenerCount("change")>0){let qe=Pt.getConfig();Ke.emit("change",qe)}}static registerListener(Ke){Pt.emitter.addListener("change",Ke)}static removeListener(Ke){Pt.emitter.removeListener("change",Ke)}static addLogListener(Ke){Le.emitter.addListener("log",Ke),Le.emitter.listenerCount("log")>0&&(Le.ENABLE_CALLBACK=!0,Pt._notifyChange())}static removeLogListener(Ke){Le.emitter.removeListener("log",Ke),Le.emitter.listenerCount("log")===0&&(Le.ENABLE_CALLBACK=!1,Pt._notifyChange())}}Pt.emitter=new(ke());var gt=Pt;class Ft{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 Ke=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,qe=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&&Ke&&qe}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(Ke){if(this.keyframesIndex==null)return null;let qe=this.keyframesIndex,Ye=this._search(qe.times,Ke);return{index:Ye,milliseconds:qe.times[Ye],fileposition:qe.filepositions[Ye]}}_search(Ke,qe){let Ye=0,St=Ke.length-1,Ot=0,Tt=0,_t=St;for(qe<Ke[0]&&(Ye=0,Tt=_t+1);Tt<=_t;)if(Ot=Tt+Math.floor((_t-Tt)/2),Ot===St||qe>=Ke[Ot]&&qe<Ke[Ot+1]){Ye=Ot;break}else Ke[Ot]<qe?Tt=Ot+1:_t=Ot-1;return Ye}}var Ht=Ft;function hn(ri,Ke,qe){let Ye=ri;if(Ke+qe<Ye.length){for(;qe--;)if((Ye[++Ke]&192)!==128)return!1;return!0}else return!1}function Qt(ri){let Ke=[],qe=ri,Ye=0,St=ri.length;for(;Ye<St;){if(qe[Ye]<128){Ke.push(String.fromCharCode(qe[Ye])),++Ye;continue}else if(!(qe[Ye]<192)){if(qe[Ye]<224){if(hn(qe,Ye,1)){let Ot=(qe[Ye]&31)<<6|qe[Ye+1]&63;if(Ot>=128){Ke.push(String.fromCharCode(Ot&65535)),Ye+=2;continue}}}else if(qe[Ye]<240){if(hn(qe,Ye,2)){let Ot=(qe[Ye]&15)<<12|(qe[Ye+1]&63)<<6|qe[Ye+2]&63;if(Ot>=2048&&(Ot&63488)!==55296){Ke.push(String.fromCharCode(Ot&65535)),Ye+=3;continue}}}else if(qe[Ye]<248&&hn(qe,Ye,3)){let Ot=(qe[Ye]&7)<<18|(qe[Ye+1]&63)<<12|(qe[Ye+2]&63)<<6|qe[Ye+3]&63;if(Ot>65536&&Ot<1114112){Ot-=65536,Ke.push(String.fromCharCode(Ot>>>10|55296)),Ke.push(String.fromCharCode(Ot&1023|56320)),Ye+=4;continue}}}Ke.push("\uFFFD"),++Ye}return Ke.join("")}var bn=Qt;let Wt=function(){let ri=new ArrayBuffer(2);return new DataView(ri).setInt16(0,256,!0),new Int16Array(ri)[0]===256}();class Kt{static parseScriptData(Ke,qe,Ye){let St={};try{let Ot=Kt.parseValue(Ke,qe,Ye),Tt=Kt.parseValue(Ke,qe+Ot.size,Ye-Ot.size);St[Ot.data]=Tt.data}catch(Ot){Le.e("AMF",Ot.toString())}return St}static parseObject(Ke,qe,Ye){if(Ye<3)throw new ge("Data not enough when parse ScriptDataObject");let St=Kt.parseString(Ke,qe,Ye),Ot=Kt.parseValue(Ke,qe+St.size,Ye-St.size),Tt=Ot.objectEnd;return{data:{name:St.data,value:Ot.data},size:St.size+Ot.size,objectEnd:Tt}}static parseVariable(Ke,qe,Ye){return Kt.parseObject(Ke,qe,Ye)}static parseString(Ke,qe,Ye){if(Ye<2)throw new ge("Data not enough when parse String");let Ot=new DataView(Ke,qe,Ye).getUint16(0,!Wt),Tt;return Ot>0?Tt=bn(new Uint8Array(Ke,qe+2,Ot)):Tt="",{data:Tt,size:2+Ot}}static parseLongString(Ke,qe,Ye){if(Ye<4)throw new ge("Data not enough when parse LongString");let Ot=new DataView(Ke,qe,Ye).getUint32(0,!Wt),Tt;return Ot>0?Tt=bn(new Uint8Array(Ke,qe+4,Ot)):Tt="",{data:Tt,size:4+Ot}}static parseDate(Ke,qe,Ye){if(Ye<10)throw new ge("Data size invalid when parse Date");let St=new DataView(Ke,qe,Ye),Ot=St.getFloat64(0,!Wt),Tt=St.getInt16(8,!Wt);return Ot+=Tt*60*1e3,{data:new Date(Ot),size:10}}static parseValue(Ke,qe,Ye){if(Ye<1)throw new ge("Data not enough when parse Value");let St=new DataView(Ke,qe,Ye),Ot=1,Tt=St.getUint8(0),_t,dn=!1;try{switch(Tt){case 0:_t=St.getFloat64(1,!Wt),Ot+=8;break;case 1:{_t=!!St.getUint8(1),Ot+=1;break}case 2:{let Pn=Kt.parseString(Ke,qe+1,Ye-1);_t=Pn.data,Ot+=Pn.size;break}case 3:{_t={};let Pn=0;for((St.getUint32(Ye-4,!Wt)&16777215)===9&&(Pn=3);Ot<Ye-4;){let mn=Kt.parseObject(Ke,qe+Ot,Ye-Ot-Pn);if(mn.objectEnd)break;_t[mn.data.name]=mn.data.value,Ot+=mn.size}Ot<=Ye-3&&(St.getUint32(Ot-1,!Wt)&16777215)===9&&(Ot+=3);break}case 8:{_t={},Ot+=4;let Pn=0;for((St.getUint32(Ye-4,!Wt)&16777215)===9&&(Pn=3);Ot<Ye-8;){let mn=Kt.parseVariable(Ke,qe+Ot,Ye-Ot-Pn);if(mn.objectEnd)break;_t[mn.data.name]=mn.data.value,Ot+=mn.size}Ot<=Ye-3&&(St.getUint32(Ot-1,!Wt)&16777215)===9&&(Ot+=3);break}case 9:_t=void 0,Ot=1,dn=!0;break;case 10:{_t=[];let Pn=St.getUint32(1,!Wt);Ot+=4;for(let mn=0;mn<Pn;mn++){let sn=Kt.parseValue(Ke,qe+Ot,Ye-Ot);_t.push(sn.data),Ot+=sn.size}break}case 11:{let Pn=Kt.parseDate(Ke,qe+1,Ye-1);_t=Pn.data,Ot+=Pn.size;break}case 12:{let Pn=Kt.parseString(Ke,qe+1,Ye-1);_t=Pn.data,Ot+=Pn.size;break}default:Ot=Ye,Le.w("AMF","Unsupported AMF value type "+Tt)}}catch(Pn){Le.e("AMF",Pn.toString())}return{data:_t,size:Ot,objectEnd:dn}}}var Jt=Kt;class Yt{constructor(Ke){this.TAG="ExpGolomb",this._buffer=Ke,this._buffer_index=0,this._total_bytes=Ke.byteLength,this._total_bits=Ke.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let Ke=this._total_bytes-this._buffer_index;if(Ke<=0)throw new ge("ExpGolomb: _fillCurrentWord() but no bytes available");let qe=Math.min(4,Ke),Ye=new Uint8Array(4);Ye.set(this._buffer.subarray(this._buffer_index,this._buffer_index+qe)),this._current_word=new DataView(Ye.buffer).getUint32(0,!1),this._buffer_index+=qe,this._current_word_bits_left=qe*8}readBits(Ke){if(Ke>32)throw new le("ExpGolomb: readBits() bits exceeded max 32bits!");if(Ke<=this._current_word_bits_left){let Tt=this._current_word>>>32-Ke;return this._current_word<<=Ke,this._current_word_bits_left-=Ke,Tt}let qe=this._current_word_bits_left?this._current_word:0;qe=qe>>>32-this._current_word_bits_left;let Ye=Ke-this._current_word_bits_left;this._fillCurrentWord();let St=Math.min(Ye,this._current_word_bits_left),Ot=this._current_word>>>32-St;return this._current_word<<=St,this._current_word_bits_left-=St,qe=qe<<St|Ot,qe}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let Ke;for(Ke=0;Ke<this._current_word_bits_left;Ke++)if(this._current_word&2147483648>>>Ke)return this._current_word<<=Ke,this._current_word_bits_left-=Ke,Ke;return this._fillCurrentWord(),Ke+this._skipLeadingZero()}readUEG(){let Ke=this._skipLeadingZero();return this.readBits(Ke+1)-1}readSEG(){let Ke=this.readUEG();return Ke&1?Ke+1>>>1:-1*(Ke>>>1)}}var kt=Yt;class pt{static _ebsp2rbsp(Ke){let qe=Ke,Ye=qe.byteLength,St=new Uint8Array(Ye),Ot=0;for(let Tt=0;Tt<Ye;Tt++)Tt>=2&&qe[Tt]===3&&qe[Tt-1]===0&&qe[Tt-2]===0||(St[Ot]=qe[Tt],Ot++);return new Uint8Array(St.buffer,0,Ot)}static parseSPS(Ke){let qe=pt._ebsp2rbsp(Ke),Ye=new kt(qe);Ye.readByte();let St=Ye.readByte();Ye.readByte();let Ot=Ye.readByte();Ye.readUEG();let Tt=pt.getProfileString(St),_t=pt.getLevelString(Ot),dn=1,Pn=420,mn=[0,420,422,444],sn=8;if((St===100||St===110||St===122||St===244||St===44||St===83||St===86||St===118||St===128||St===138||St===144)&&(dn=Ye.readUEG(),dn===3&&Ye.readBits(1),dn<=3&&(Pn=mn[dn]),sn=Ye.readUEG()+8,Ye.readUEG(),Ye.readBits(1),Ye.readBool())){let hi=dn!==3?8:12;for(let Oi=0;Oi<hi;Oi++)Ye.readBool()&&(Oi<6?pt._skipScalingList(Ye,16):pt._skipScalingList(Ye,64))}Ye.readUEG();let Nt=Ye.readUEG();if(Nt===0)Ye.readUEG();else if(Nt===1){Ye.readBits(1),Ye.readSEG(),Ye.readSEG();let hi=Ye.readUEG();for(let Oi=0;Oi<hi;Oi++)Ye.readSEG()}let un=Ye.readUEG();Ye.readBits(1);let Ln=Ye.readUEG(),Dn=Ye.readUEG(),$t=Ye.readBits(1);$t===0&&Ye.readBits(1),Ye.readBits(1);let rn=0,jn=0,On=0,ei=0;Ye.readBool()&&(rn=Ye.readUEG(),jn=Ye.readUEG(),On=Ye.readUEG(),ei=Ye.readUEG());let ti=1,Bn=1,li=0,Di=!0,Ri=0,Mn=0;if(Ye.readBool()){if(Ye.readBool()){let hi=Ye.readByte(),Oi=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],tr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];hi>0&&hi<16?(ti=Oi[hi-1],Bn=tr[hi-1]):hi===255&&(ti=Ye.readByte()<<8|Ye.readByte(),Bn=Ye.readByte()<<8|Ye.readByte())}if(Ye.readBool()&&Ye.readBool(),Ye.readBool()&&(Ye.readBits(4),Ye.readBool()&&Ye.readBits(24)),Ye.readBool()&&(Ye.readUEG(),Ye.readUEG()),Ye.readBool()){let hi=Ye.readBits(32),Oi=Ye.readBits(32);Di=Ye.readBool(),Ri=Oi,Mn=hi*2,li=Ri/Mn}}let Nr=1;(ti!==1||Bn!==1)&&(Nr=ti/Bn);let zi=0,En=0;if(dn===0)zi=1,En=2-$t;else{let hi=dn===3?1:2,Oi=dn===1?2:1;zi=hi,En=Oi*(2-$t)}let Jn=(Ln+1)*16,fi=(2-$t)*((Dn+1)*16);Jn-=(rn+jn)*zi,fi-=(On+ei)*En;let Si=Math.ceil(Jn*Nr);return Ye.destroy(),Ye=null,{profile_string:Tt,level_string:_t,bit_depth:sn,ref_frames:un,chroma_format:Pn,chroma_format_string:pt.getChromaFormatString(Pn),frame_rate:{fixed:Di,fps:li,fps_den:Mn,fps_num:Ri},sar_ratio:{width:ti,height:Bn},codec_size:{width:Jn,height:fi},present_size:{width:Si,height:fi}}}static _skipScalingList(Ke,qe){let Ye=8,St=8,Ot=0;for(let Tt=0;Tt<qe;Tt++)St!==0&&(Ot=Ke.readSEG(),St=(Ye+Ot+256)%256),Ye=St===0?Ye:St}static getProfileString(Ke){switch(Ke){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(Ke){return(Ke/10).toFixed(1)}static getChromaFormatString(Ke){switch(Ke){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var Bt=pt,vt={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function nt(ri){return ri>>>8&255|(ri&255)<<8}function He(ri){return(ri&4278190080)>>>24|(ri&16711680)>>>8|(ri&65280)<<8|(ri&255)<<24}function Ie(ri,Ke){return ri[Ke]<<24|ri[Ke+1]<<16|ri[Ke+2]<<8|ri[Ke+3]}class We{constructor(Ke,qe){this.TAG="FLVDemuxer",this._config=qe,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=Ke.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=Ke.hasAudioTrack,this._hasVideo=Ke.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Ht,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 Ye=new ArrayBuffer(2);return new DataView(Ye).setInt16(0,256,!0),new Int16Array(Ye)[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(Ke){let qe=new Uint8Array(Ke),Ye={match:!1};if(qe[0]!==70||qe[1]!==76||qe[2]!==86||qe[3]!==1)return Ye;let St=(qe[4]&4)>>>2!==0,Ot=(qe[4]&1)!==0,Tt=Ie(qe,5);return Tt<9?Ye:{match:!0,consumed:Tt,dataOffset:Tt,hasAudioTrack:St,hasVideoTrack:Ot}}bindDataSource(Ke){return Ke.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(Ke){this._onTrackMetadata=Ke}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(Ke){this._onMediaInfo=Ke}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(Ke){this._onMetaDataArrived=Ke}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(Ke){this._onScriptDataArrived=Ke}get onError(){return this._onError}set onError(Ke){this._onError=Ke}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(Ke){this._onDataAvailable=Ke}get timestampBase(){return this._timestampBase}set timestampBase(Ke){this._timestampBase=Ke}get overridedDuration(){return this._duration}set overridedDuration(Ke){this._durationOverrided=!0,this._duration=Ke,this._mediaInfo.duration=Ke}set overridedHasAudio(Ke){this._hasAudioFlagOverrided=!0,this._hasAudio=Ke,this._mediaInfo.hasAudio=Ke}set overridedHasVideo(Ke){this._hasVideoFlagOverrided=!0,this._hasVideo=Ke,this._mediaInfo.hasVideo=Ke}resetMediaInfo(){this._mediaInfo=new Ht}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(Ke,qe){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new ge("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let Ye=0,St=this._littleEndian;if(qe===0)if(Ke.byteLength>13)Ye=We.probe(Ke).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,qe+Ye!==this._dataOffset&&Le.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(Ke,Ye).getUint32(0,!St)!==0&&Le.w(this.TAG,"PrevTagSize0 !== 0 !!!"),Ye+=4);Ye<Ke.byteLength;){this._dispatch=!0;let Ot=new DataView(Ke,Ye);if(Ye+11+4>Ke.byteLength)break;let Tt=Ot.getUint8(0),_t=Ot.getUint32(0,!St)&16777215;if(Ye+11+_t+4>Ke.byteLength)break;if(Tt!==8&&Tt!==9&&Tt!==18){Le.w(this.TAG,`Unsupported tag type ${Tt}, skipped`),Ye+=11+_t+4;continue}let dn=Ot.getUint8(4),Pn=Ot.getUint8(5),mn=Ot.getUint8(6),sn=Ot.getUint8(7),Nt=mn|Pn<<8|dn<<16|sn<<24;(Ot.getUint32(7,!St)&16777215)!==0&&Le.w(this.TAG,"Meet tag which has StreamID != 0!");let Ln=Ye+11;switch(Tt){case 8:this._parseAudioData(Ke,Ln,_t,Nt);break;case 9:this._parseVideoData(Ke,Ln,_t,Nt,qe+Ye);break;case 18:this._parseScriptData(Ke,Ln,_t);break}let Dn=Ot.getUint32(11+_t,!St);Dn!==11+_t&&Le.w(this.TAG,`Invalid PrevTagSize ${Dn}`),Ye+=11+_t+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),Ye}_parseScriptData(Ke,qe,Ye){let St=Jt.parseScriptData(Ke,qe,Ye);if(St.hasOwnProperty("onMetaData")){if(St.onMetaData==null||typeof St.onMetaData!="object"){Le.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&Le.w(this.TAG,"Found another onMetaData tag!"),this._metadata=St;let Ot=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Ot)),typeof Ot.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=Ot.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof Ot.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=Ot.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof Ot.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Ot.audiodatarate),typeof Ot.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Ot.videodatarate),typeof Ot.width=="number"&&(this._mediaInfo.width=Ot.width),typeof Ot.height=="number"&&(this._mediaInfo.height=Ot.height),typeof Ot.duration=="number"){if(!this._durationOverrided){let Tt=Math.floor(Ot.duration*this._timescale);this._duration=Tt,this._mediaInfo.duration=Tt}}else this._mediaInfo.duration=0;if(typeof Ot.framerate=="number"){let Tt=Math.floor(Ot.framerate*1e3);if(Tt>0){let _t=Tt/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=_t,this._referenceFrameRate.fps_num=Tt,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=_t}}if(typeof Ot.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let Tt=Ot.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Tt),Ot.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Ot,Le.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(St).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},St))}_parseKeyframesIndex(Ke){let qe=[],Ye=[];for(let St=1;St<Ke.times.length;St++){let Ot=this._timestampBase+Math.floor(Ke.times[St]*1e3);qe.push(Ot),Ye.push(Ke.filepositions[St])}return{times:qe,filepositions:Ye}}_parseAudioData(Ke,qe,Ye,St){if(Ye<=1){Le.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let Ot=this._littleEndian,_t=new DataView(Ke,qe,Ye).getUint8(0),dn=_t>>>4;if(dn!==2&&dn!==10){this._onError(vt.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+dn);return}let Pn=0,mn=(_t&12)>>>2;if(mn>=0&&mn<=4)Pn=this._flvSoundRateTable[mn];else{this._onError(vt.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+mn);return}let sn=(_t&2)>>>1,Nt=_t&1,un=this._audioMetadata,Ln=this._audioTrack;if(un||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),un=this._audioMetadata={},un.type="audio",un.id=Ln.id,un.timescale=this._timescale,un.duration=this._duration,un.audioSampleRate=Pn,un.channelCount=Nt===0?1:2),dn===10){let Dn=this._parseAACAudioData(Ke,qe+1,Ye-1);if(Dn==null)return;if(Dn.packetType===0){un.config&&Le.w(this.TAG,"Found another AudioSpecificConfig!");let $t=Dn.data;un.audioSampleRate=$t.samplingRate,un.channelCount=$t.channelCount,un.codec=$t.codec,un.originalCodec=$t.originalCodec,un.config=$t.config,un.refSampleDuration=1024/un.audioSampleRate*un.timescale,Le.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",un);let rn=this._mediaInfo;rn.audioCodec=un.originalCodec,rn.audioSampleRate=un.audioSampleRate,rn.audioChannelCount=un.channelCount,rn.hasVideo?rn.videoCodec!=null&&(rn.mimeType='video/x-flv; codecs="'+rn.videoCodec+","+rn.audioCodec+'"'):rn.mimeType='video/x-flv; codecs="'+rn.audioCodec+'"',rn.isComplete()&&this._onMediaInfo(rn)}else if(Dn.packetType===1){let $t=this._timestampBase+St,rn={unit:Dn.data,length:Dn.data.byteLength,dts:$t,pts:$t};Ln.samples.push(rn),Ln.length+=Dn.data.length}else Le.e(this.TAG,`Flv: Unsupported AAC data type ${Dn.packetType}`)}else if(dn===2){if(!un.codec){let jn=this._parseMP3AudioData(Ke,qe+1,Ye-1,!0);if(jn==null)return;un.audioSampleRate=jn.samplingRate,un.channelCount=jn.channelCount,un.codec=jn.codec,un.originalCodec=jn.originalCodec,un.refSampleDuration=1152/un.audioSampleRate*un.timescale,Le.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",un);let On=this._mediaInfo;On.audioCodec=un.codec,On.audioSampleRate=un.audioSampleRate,On.audioChannelCount=un.channelCount,On.audioDataRate=jn.bitRate,On.hasVideo?On.videoCodec!=null&&(On.mimeType='video/x-flv; codecs="'+On.videoCodec+","+On.audioCodec+'"'):On.mimeType='video/x-flv; codecs="'+On.audioCodec+'"',On.isComplete()&&this._onMediaInfo(On)}let Dn=this._parseMP3AudioData(Ke,qe+1,Ye-1,!1);if(Dn==null)return;let $t=this._timestampBase+St,rn={unit:Dn,length:Dn.byteLength,dts:$t,pts:$t};Ln.samples.push(rn),Ln.length+=Dn.length}}_parseAACAudioData(Ke,qe,Ye){if(Ye<=1){Le.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let St={},Ot=new Uint8Array(Ke,qe,Ye);return St.packetType=Ot[0],Ot[0]===0?St.data=this._parseAACAudioSpecificConfig(Ke,qe+1,Ye-1):St.data=Ot.subarray(1),St}_parseAACAudioSpecificConfig(Ke,qe,Ye){let St=new Uint8Array(Ke,qe,Ye),Ot=null,Tt=0,_t=0,dn=null,Pn=0,mn=null;if(Tt=_t=St[0]>>>3,Pn=(St[0]&7)<<1|St[1]>>>7,Pn<0||Pn>=this._mpegSamplingRates.length){this._onError(vt.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let sn=this._mpegSamplingRates[Pn],Nt=(St[1]&120)>>>3;if(Nt<0||Nt>=8){this._onError(vt.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Tt===5&&(mn=(St[1]&7)<<1|St[2]>>>7,dn=(St[2]&124)>>>2);let un=self.navigator.userAgent.toLowerCase();return un.indexOf("firefox")!==-1?Pn>=6?(Tt=5,Ot=new Array(4),mn=Pn-3):(Tt=2,Ot=new Array(2),mn=Pn):un.indexOf("android")!==-1?(Tt=2,Ot=new Array(2),mn=Pn):(Tt=5,mn=Pn,Ot=new Array(4),Pn>=6?mn=Pn-3:Nt===1&&(Tt=2,Ot=new Array(2),mn=Pn)),Ot[0]=Tt<<3,Ot[0]|=(Pn&15)>>>1,Ot[1]=(Pn&15)<<7,Ot[1]|=(Nt&15)<<3,Tt===5&&(Ot[1]|=(mn&15)>>>1,Ot[2]=(mn&1)<<7,Ot[2]|=8,Ot[3]=0),{config:Ot,samplingRate:sn,channelCount:Nt,codec:"mp4a.40."+Tt,originalCodec:"mp4a.40."+_t}}_parseMP3AudioData(Ke,qe,Ye,St){if(Ye<4){Le.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let Ot=this._littleEndian,Tt=new Uint8Array(Ke,qe,Ye),_t=null;if(St){if(Tt[0]!==255)return;let dn=Tt[1]>>>3&3,Pn=(Tt[1]&6)>>1,mn=(Tt[2]&240)>>>4,sn=(Tt[2]&12)>>>2,un=(Tt[3]>>>6&3)!==3?2:1,Ln=0,Dn=0,$t=34,rn="mp3";switch(dn){case 0:Ln=this._mpegAudioV25SampleRateTable[sn];break;case 2:Ln=this._mpegAudioV20SampleRateTable[sn];break;case 3:Ln=this._mpegAudioV10SampleRateTable[sn];break}switch(Pn){case 1:$t=34,mn<this._mpegAudioL3BitRateTable.length&&(Dn=this._mpegAudioL3BitRateTable[mn]);break;case 2:$t=33,mn<this._mpegAudioL2BitRateTable.length&&(Dn=this._mpegAudioL2BitRateTable[mn]);break;case 3:$t=32,mn<this._mpegAudioL1BitRateTable.length&&(Dn=this._mpegAudioL1BitRateTable[mn]);break}_t={bitRate:Dn,samplingRate:Ln,channelCount:un,codec:rn,originalCodec:rn}}else _t=Tt;return _t}_parseVideoData(Ke,qe,Ye,St,Ot){if(Ye<=1){Le.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let Tt=new Uint8Array(Ke,qe,Ye)[0],_t=(Tt&240)>>>4,dn=Tt&15;if(dn!==7){this._onError(vt.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${dn}`);return}this._parseAVCVideoPacket(Ke,qe+1,Ye-1,St,Ot,_t)}_parseAVCVideoPacket(Ke,qe,Ye,St,Ot,Tt){if(Ye<4){Le.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let _t=this._littleEndian,dn=new DataView(Ke,qe,Ye),Pn=dn.getUint8(0),sn=(dn.getUint32(0,!_t)&16777215)<<8>>8;if(Pn===0)this._parseAVCDecoderConfigurationRecord(Ke,qe+4,Ye-4);else if(Pn===1)this._parseAVCVideoData(Ke,qe+4,Ye-4,St,Ot,Tt,sn);else if(Pn!==2){this._onError(vt.FORMAT_ERROR,`Flv: Invalid video packet type ${Pn}`);return}}_parseAVCDecoderConfigurationRecord(Ke,qe,Ye){if(Ye<7){Le.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let St=this._videoMetadata,Ot=this._videoTrack,Tt=this._littleEndian,_t=new DataView(Ke,qe,Ye);St?typeof St.avcc!="undefined"&&Le.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),St=this._videoMetadata={},St.type="video",St.id=Ot.id,St.timescale=this._timescale,St.duration=this._duration);let dn=_t.getUint8(0),Pn=_t.getUint8(1),mn=_t.getUint8(2),sn=_t.getUint8(3);if(dn!==1||Pn===0){this._onError(vt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(_t.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(vt.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let Nt=_t.getUint8(5)&31;if(Nt===0){this._onError(vt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Nt>1&&Le.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${Nt}`);let un=6;for(let Dn=0;Dn<Nt;Dn++){let $t=_t.getUint16(un,!Tt);if(un+=2,$t===0)continue;let rn=new Uint8Array(Ke,qe+un,$t);un+=$t;let jn=Bt.parseSPS(rn);if(Dn!==0)continue;St.codecWidth=jn.codec_size.width,St.codecHeight=jn.codec_size.height,St.presentWidth=jn.present_size.width,St.presentHeight=jn.present_size.height,St.profile=jn.profile_string,St.level=jn.level_string,St.bitDepth=jn.bit_depth,St.chromaFormat=jn.chroma_format,St.sarRatio=jn.sar_ratio,St.frameRate=jn.frame_rate,(jn.frame_rate.fixed===!1||jn.frame_rate.fps_num===0||jn.frame_rate.fps_den===0)&&(St.frameRate=this._referenceFrameRate);let On=St.frameRate.fps_den,ei=St.frameRate.fps_num;St.refSampleDuration=St.timescale*(On/ei);let Gn=rn.subarray(1,4),ti="avc1.";for(let li=0;li<3;li++){let Di=Gn[li].toString(16);Di.length<2&&(Di="0"+Di),ti+=Di}St.codec=ti;let Bn=this._mediaInfo;Bn.width=St.codecWidth,Bn.height=St.codecHeight,Bn.fps=St.frameRate.fps,Bn.profile=St.profile,Bn.level=St.level,Bn.refFrames=jn.ref_frames,Bn.chromaFormat=jn.chroma_format_string,Bn.sarNum=St.sarRatio.width,Bn.sarDen=St.sarRatio.height,Bn.videoCodec=ti,Bn.hasAudio?Bn.audioCodec!=null&&(Bn.mimeType='video/x-flv; codecs="'+Bn.videoCodec+","+Bn.audioCodec+'"'):Bn.mimeType='video/x-flv; codecs="'+Bn.videoCodec+'"',Bn.isComplete()&&this._onMediaInfo(Bn)}let Ln=_t.getUint8(un);if(Ln===0){this._onError(vt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else Ln>1&&Le.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${Ln}`);un++;for(let Dn=0;Dn<Ln;Dn++){let $t=_t.getUint16(un,!Tt);un+=2,$t!==0&&(un+=$t)}St.avcc=new Uint8Array(Ye),St.avcc.set(new Uint8Array(Ke,qe,Ye),0),Le.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",St)}_parseAVCVideoData(Ke,qe,Ye,St,Ot,Tt,_t){let dn=this._littleEndian,Pn=new DataView(Ke,qe,Ye),mn=[],sn=0,Nt=0;const un=this._naluLengthSize;let Ln=this._timestampBase+St,Dn=Tt===1;for(;Nt<Ye;){if(Nt+4>=Ye){Le.w(this.TAG,`Malformed Nalu near timestamp ${Ln}, offset = ${Nt}, dataSize = ${Ye}`);break}let $t=Pn.getUint32(Nt,!dn);if(un===3&&($t>>>=8),$t>Ye-un){Le.w(this.TAG,`Malformed Nalus near timestamp ${Ln}, NaluSize > DataSize!`);return}let rn=Pn.getUint8(Nt+un)&31;rn===5&&(Dn=!0);let jn=new Uint8Array(Ke,qe+Nt,un+$t),On={type:rn,data:jn};mn.push(On),sn+=jn.byteLength,Nt+=un+$t}if(mn.length){let $t=this._videoTrack,rn={units:mn,length:sn,isKeyframe:Dn,dts:Ln,cts:_t,pts:Ln+_t};Dn&&(rn.fileposition=Ot),$t.samples.push(rn),$t.length+=sn}}}var Oe=We;class be{static init(){be.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 qe in be.types)be.types.hasOwnProperty(qe)&&(be.types[qe]=[qe.charCodeAt(0),qe.charCodeAt(1),qe.charCodeAt(2),qe.charCodeAt(3)]);let Ke=be.constants={};Ke.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Ke.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Ke.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Ke.STSC=Ke.STCO=Ke.STTS,Ke.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ke.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]),Ke.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]),Ke.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ke.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ke.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(Ke){let qe=8,Ye=null,St=Array.prototype.slice.call(arguments,1),Ot=St.length;for(let _t=0;_t<Ot;_t++)qe+=St[_t].byteLength;Ye=new Uint8Array(qe),Ye[0]=qe>>>24&255,Ye[1]=qe>>>16&255,Ye[2]=qe>>>8&255,Ye[3]=qe&255,Ye.set(Ke,4);let Tt=8;for(let _t=0;_t<Ot;_t++)Ye.set(St[_t],Tt),Tt+=St[_t].byteLength;return Ye}static generateInitSegment(Ke){let qe=be.box(be.types.ftyp,be.constants.FTYP),Ye=be.moov(Ke),St=new Uint8Array(qe.byteLength+Ye.byteLength);return St.set(qe,0),St.set(Ye,qe.byteLength),St}static moov(Ke){let qe=be.mvhd(Ke.timescale,Ke.duration),Ye=be.trak(Ke),St=be.mvex(Ke);return be.box(be.types.moov,qe,Ye,St)}static mvhd(Ke,qe){return be.box(be.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Ke>>>24&255,Ke>>>16&255,Ke>>>8&255,Ke&255,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&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(Ke){return be.box(be.types.trak,be.tkhd(Ke),be.mdia(Ke))}static tkhd(Ke){let qe=Ke.id,Ye=Ke.duration,St=Ke.presentWidth,Ot=Ke.presentHeight;return be.box(be.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,0,0,0,0,Ye>>>24&255,Ye>>>16&255,Ye>>>8&255,Ye&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,St>>>8&255,St&255,0,0,Ot>>>8&255,Ot&255,0,0]))}static mdia(Ke){return be.box(be.types.mdia,be.mdhd(Ke),be.hdlr(Ke),be.minf(Ke))}static mdhd(Ke){let qe=Ke.timescale,Ye=Ke.duration;return be.box(be.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,Ye>>>24&255,Ye>>>16&255,Ye>>>8&255,Ye&255,85,196,0,0]))}static hdlr(Ke){let qe=null;return Ke.type==="audio"?qe=be.constants.HDLR_AUDIO:qe=be.constants.HDLR_VIDEO,be.box(be.types.hdlr,qe)}static minf(Ke){let qe=null;return Ke.type==="audio"?qe=be.box(be.types.smhd,be.constants.SMHD):qe=be.box(be.types.vmhd,be.constants.VMHD),be.box(be.types.minf,qe,be.dinf(),be.stbl(Ke))}static dinf(){return be.box(be.types.dinf,be.box(be.types.dref,be.constants.DREF))}static stbl(Ke){return be.box(be.types.stbl,be.stsd(Ke),be.box(be.types.stts,be.constants.STTS),be.box(be.types.stsc,be.constants.STSC),be.box(be.types.stsz,be.constants.STSZ),be.box(be.types.stco,be.constants.STCO))}static stsd(Ke){return Ke.type==="audio"?Ke.codec==="mp3"?be.box(be.types.stsd,be.constants.STSD_PREFIX,be.mp3(Ke)):be.box(be.types.stsd,be.constants.STSD_PREFIX,be.mp4a(Ke)):be.box(be.types.stsd,be.constants.STSD_PREFIX,be.avc1(Ke))}static mp3(Ke){let qe=Ke.channelCount,Ye=Ke.audioSampleRate,St=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,qe,0,16,0,0,0,0,Ye>>>8&255,Ye&255,0,0]);return be.box(be.types[".mp3"],St)}static mp4a(Ke){let qe=Ke.channelCount,Ye=Ke.audioSampleRate,St=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,qe,0,16,0,0,0,0,Ye>>>8&255,Ye&255,0,0]);return be.box(be.types.mp4a,St,be.esds(Ke))}static esds(Ke){let qe=Ke.config||[],Ye=qe.length,St=new Uint8Array([0,0,0,0,3,23+Ye,0,1,0,4,15+Ye,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([Ye]).concat(qe).concat([6,1,2]));return be.box(be.types.esds,St)}static avc1(Ke){let qe=Ke.avcc,Ye=Ke.codecWidth,St=Ke.codecHeight,Ot=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,Ye>>>8&255,Ye&255,St>>>8&255,St&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 be.box(be.types.avc1,Ot,be.box(be.types.avcC,qe))}static mvex(Ke){return be.box(be.types.mvex,be.trex(Ke))}static trex(Ke){let qe=Ke.id,Ye=new Uint8Array([0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return be.box(be.types.trex,Ye)}static moof(Ke,qe){return be.box(be.types.moof,be.mfhd(Ke.sequenceNumber),be.traf(Ke,qe))}static mfhd(Ke){let qe=new Uint8Array([0,0,0,0,Ke>>>24&255,Ke>>>16&255,Ke>>>8&255,Ke&255]);return be.box(be.types.mfhd,qe)}static traf(Ke,qe){let Ye=Ke.id,St=be.box(be.types.tfhd,new Uint8Array([0,0,0,0,Ye>>>24&255,Ye>>>16&255,Ye>>>8&255,Ye&255])),Ot=be.box(be.types.tfdt,new Uint8Array([0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255])),Tt=be.sdtp(Ke),_t=be.trun(Ke,Tt.byteLength+16+16+8+16+8+8);return be.box(be.types.traf,St,Ot,_t,Tt)}static sdtp(Ke){let qe=Ke.samples||[],Ye=qe.length,St=new Uint8Array(4+Ye);for(let Ot=0;Ot<Ye;Ot++){let Tt=qe[Ot].flags;St[Ot+4]=Tt.isLeading<<6|Tt.dependsOn<<4|Tt.isDependedOn<<2|Tt.hasRedundancy}return be.box(be.types.sdtp,St)}static trun(Ke,qe){let Ye=Ke.samples||[],St=Ye.length,Ot=12+16*St,Tt=new Uint8Array(Ot);qe+=8+Ot,Tt.set([0,0,15,1,St>>>24&255,St>>>16&255,St>>>8&255,St&255,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255],0);for(let _t=0;_t<St;_t++){let dn=Ye[_t].duration,Pn=Ye[_t].size,mn=Ye[_t].flags,sn=Ye[_t].cts;Tt.set([dn>>>24&255,dn>>>16&255,dn>>>8&255,dn&255,Pn>>>24&255,Pn>>>16&255,Pn>>>8&255,Pn&255,mn.isLeading<<2|mn.dependsOn,mn.isDependedOn<<6|mn.hasRedundancy<<4|mn.isNonSync,0,0,sn>>>24&255,sn>>>16&255,sn>>>8&255,sn&255],12+16*_t)}return be.box(be.types.trun,Tt)}static mdat(Ke){return be.box(be.types.mdat,Ke)}}be.init();var Ne=be;class $e{static getSilentFrame(Ke,qe){if(Ke==="mp4a.40.2"){if(qe===1)return new Uint8Array([0,200,0,128,35,128]);if(qe===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(qe===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(qe===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(qe===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(qe===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(qe===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(qe===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(qe===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 dt=$e;class Je{constructor(Ke,qe,Ye,St,Ot){this.dts=Ke,this.pts=qe,this.duration=Ye,this.originalDts=St,this.isSyncPoint=Ot,this.fileposition=null}}class At{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(Ke){Ke.isSyncPoint=!0,this.syncPoints.push(Ke)}}class tn{constructor(){this._list=[]}clear(){this._list=[]}appendArray(Ke){let qe=this._list;Ke.length!==0&&(qe.length>0&&Ke[0].originalDts<qe[qe.length-1].originalDts&&this.clear(),Array.prototype.push.apply(qe,Ke))}getLastSyncPointBeforeDts(Ke){if(this._list.length==0)return null;let qe=this._list,Ye=0,St=qe.length-1,Ot=0,Tt=0,_t=St;for(Ke<qe[0].dts&&(Ye=0,Tt=_t+1);Tt<=_t;)if(Ot=Tt+Math.floor((_t-Tt)/2),Ot===St||Ke>=qe[Ot].dts&&Ke<qe[Ot+1].dts){Ye=Ot;break}else qe[Ot].dts<Ke?Tt=Ot+1:_t=Ot-1;return this._list[Ye]}}class pn{constructor(Ke){this._type=Ke,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(Ke){let qe=this._list;if(qe.length===0)return-2;let Ye=qe.length-1,St=0,Ot=0,Tt=Ye,_t=0;if(Ke<qe[0].originalBeginDts)return _t=-1,_t;for(;Ot<=Tt;)if(St=Ot+Math.floor((Tt-Ot)/2),St===Ye||Ke>qe[St].lastSample.originalDts&&Ke<qe[St+1].originalBeginDts){_t=St;break}else qe[St].originalBeginDts<Ke?Ot=St+1:Tt=St-1;return _t}_searchNearestSegmentAfter(Ke){return this._searchNearestSegmentBefore(Ke)+1}append(Ke){let qe=this._list,Ye=Ke,St=this._lastAppendLocation,Ot=0;St!==-1&&St<qe.length&&Ye.originalBeginDts>=qe[St].lastSample.originalDts&&(St===qe.length-1||St<qe.length-1&&Ye.originalBeginDts<qe[St+1].originalBeginDts)?Ot=St+1:qe.length>0&&(Ot=this._searchNearestSegmentBefore(Ye.originalBeginDts)+1),this._lastAppendLocation=Ot,this._list.splice(Ot,0,Ye)}getLastSegmentBefore(Ke){let qe=this._searchNearestSegmentBefore(Ke);return qe>=0?this._list[qe]:null}getLastSampleBefore(Ke){let qe=this.getLastSegmentBefore(Ke);return qe!=null?qe.lastSample:null}getLastSyncPointBefore(Ke){let qe=this._searchNearestSegmentBefore(Ke),Ye=this._list[qe].syncPoints;for(;Ye.length===0&&qe>0;)qe--,Ye=this._list[qe].syncPoints;return Ye.length>0?Ye[Ye.length-1]:null}}class ln{constructor(Ke){this.TAG="MP4Remuxer",this._config=Ke,this._isLive=Ke.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 pn("audio"),this._videoSegmentInfoList=new pn("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(ie.chrome&&(ie.version.major<50||ie.version.major===50&&ie.version.build<2661)),this._fillSilentAfterSeek=ie.msedge||ie.msie,this._mp3UseMpegAudio=!ie.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(Ke){return Ke.onDataAvailable=this.remux.bind(this),Ke.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(Ke){this._onInitSegment=Ke}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(Ke){this._onMediaSegment=Ke}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(Ke){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(Ke,qe){if(!this._onMediaSegment)throw new ge("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(Ke,qe),this._remuxVideo(qe),this._remuxAudio(Ke)}_onTrackMetadataReceived(Ke,qe){let Ye=null,St="mp4",Ot=qe.codec;if(Ke==="audio")this._audioMeta=qe,qe.codec==="mp3"&&this._mp3UseMpegAudio?(St="mpeg",Ot="",Ye=new Uint8Array):Ye=Ne.generateInitSegment(qe);else if(Ke==="video")this._videoMeta=qe,Ye=Ne.generateInitSegment(qe);else return;if(!this._onInitSegment)throw new ge("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(Ke,{type:Ke,data:Ye.buffer,codec:Ot,container:`${Ke}/${St}`,mediaDuration:qe.duration})}_calculateDtsBase(Ke,qe){this._dtsBaseInited||(Ke.samples&&Ke.samples.length&&(this._audioDtsBase=Ke.samples[0].dts),qe.samples&&qe.samples.length&&(this._videoDtsBase=qe.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let Ke=this._videoStashedLastSample,qe=this._audioStashedLastSample,Ye={type:"video",id:1,sequenceNumber:0,samples:[],length:0};Ke!=null&&(Ye.samples.push(Ke),Ye.length=Ke.length);let St={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};qe!=null&&(St.samples.push(qe),St.length=qe.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(Ye,!0),this._remuxAudio(St,!0)}_remuxAudio(Ke,qe){if(this._audioMeta==null)return;let Ye=Ke,St=Ye.samples,Ot,Tt=-1,_t=-1,dn=-1,Pn=this._audioMeta.refSampleDuration,mn=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,sn=this._dtsBaseInited&&this._audioNextDts===void 0,Nt=!1;if(!St||St.length===0||St.length===1&&!qe)return;let un=0,Ln=null,Dn=0;mn?(un=0,Dn=Ye.length):(un=8,Dn=8+Ye.length);let $t=null;if(St.length>1&&($t=St.pop(),Dn-=$t.length),this._audioStashedLastSample!=null){let Bn=this._audioStashedLastSample;this._audioStashedLastSample=null,St.unshift(Bn),Dn+=Bn.length}$t!=null&&(this._audioStashedLastSample=$t);let rn=St[0].dts-this._dtsBase;if(this._audioNextDts)Ot=rn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Ot=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(Nt=!0);else{let Bn=this._audioSegmentInfoList.getLastSampleBefore(rn);if(Bn!=null){let li=rn-(Bn.originalDts+Bn.duration);li<=3&&(li=0);let Di=Bn.dts+Bn.duration+li;Ot=rn-Di}else Ot=0}if(Nt){let Bn=rn-Ot,li=this._videoSegmentInfoList.getLastSegmentBefore(rn);if(li!=null&&li.beginDts<Bn){let Di=dt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(Di){let Ri=li.beginDts,Mn=Bn-li.beginDts;Le.v(this.TAG,`InsertPrefixSilentAudio: dts: ${Ri}, duration: ${Mn}`),St.unshift({unit:Di,dts:Ri,pts:Ri}),Dn+=Di.byteLength}}else Nt=!1}let jn=[];for(let Bn=0;Bn<St.length;Bn++){let li=St[Bn],Di=li.unit,Ri=li.dts-this._dtsBase,Mn=Ri-Ot;Tt===-1&&(Tt=Mn);let Xi=0;Bn!==St.length-1?Xi=St[Bn+1].dts-this._dtsBase-Ot-Mn:$t!=null?Xi=$t.dts-this._dtsBase-Ot-Mn:jn.length>=1?Xi=jn[jn.length-1].duration:Xi=Math.floor(Pn);let Nr=!1,zi=null;if(Xi>Pn*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!ie.safari){Nr=!0;let En=Math.abs(Xi-Pn),Jn=Math.ceil(En/Pn),fi=Mn+Pn;Le.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${Mn+Xi} ms, expected: ${Mn+Math.round(Pn)} ms, delta: ${Math.round(En)} ms, generate: ${Jn} frames`);let Si=dt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Si==null&&(Le.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),Si=Di),zi=[];for(let Oi=0;Oi<Jn;Oi++){let tr=Math.round(fi);if(zi.length>0){let Hi=zi[zi.length-1];Hi.duration=tr-Hi.dts}let Fi={dts:tr,pts:tr,cts:0,unit:Si,size:Si.byteLength,duration:0,originalDts:Ri,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};zi.push(Fi),Dn+=Fi.size,fi+=Pn}let hi=zi[zi.length-1];hi.duration=Mn+Xi-hi.dts,Xi=Math.round(Pn)}jn.push({dts:Mn,pts:Mn,cts:0,unit:li.unit,size:li.unit.byteLength,duration:Xi,originalDts:Ri,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Nr&&jn.push.apply(jn,zi)}mn?Ln=new Uint8Array(Dn):(Ln=new Uint8Array(Dn),Ln[0]=Dn>>>24&255,Ln[1]=Dn>>>16&255,Ln[2]=Dn>>>8&255,Ln[3]=Dn&255,Ln.set(Ne.types.mdat,4));for(let Bn=0;Bn<jn.length;Bn++){let li=jn[Bn].unit;Ln.set(li,un),un+=li.byteLength}let On=jn[jn.length-1];_t=On.dts+On.duration,this._audioNextDts=_t;let ei=new At;ei.beginDts=Tt,ei.endDts=_t,ei.beginPts=Tt,ei.endPts=_t,ei.originalBeginDts=jn[0].originalDts,ei.originalEndDts=On.originalDts+On.duration,ei.firstSample=new Je(jn[0].dts,jn[0].pts,jn[0].duration,jn[0].originalDts,!1),ei.lastSample=new Je(On.dts,On.pts,On.duration,On.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(ei),Ye.samples=jn,Ye.sequenceNumber++;let Gn=null;mn?Gn=new Uint8Array:Gn=Ne.moof(Ye,Tt),Ye.samples=[],Ye.length=0;let ti={type:"audio",data:this._mergeBoxes(Gn,Ln).buffer,sampleCount:jn.length,info:ei};mn&&sn&&(ti.timestampOffset=Tt),this._onMediaSegment("audio",ti)}_remuxVideo(Ke,qe){if(this._videoMeta==null)return;let Ye=Ke,St=Ye.samples,Ot,Tt=-1,_t=-1,dn=-1,Pn=-1;if(!St||St.length===0||St.length===1&&!qe)return;let mn=8,sn=null,Nt=8+Ke.length,un=null;if(St.length>1&&(un=St.pop(),Nt-=un.length),this._videoStashedLastSample!=null){let On=this._videoStashedLastSample;this._videoStashedLastSample=null,St.unshift(On),Nt+=On.length}un!=null&&(this._videoStashedLastSample=un);let Ln=St[0].dts-this._dtsBase;if(this._videoNextDts)Ot=Ln-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Ot=0;else{let On=this._videoSegmentInfoList.getLastSampleBefore(Ln);if(On!=null){let ei=Ln-(On.originalDts+On.duration);ei<=3&&(ei=0);let Gn=On.dts+On.duration+ei;Ot=Ln-Gn}else Ot=0}let Dn=new At,$t=[];for(let On=0;On<St.length;On++){let ei=St[On],Gn=ei.dts-this._dtsBase,ti=ei.isKeyframe,Bn=Gn-Ot,li=ei.cts,Di=Bn+li;Tt===-1&&(Tt=Bn,dn=Di);let Ri=0;if(On!==St.length-1?Ri=St[On+1].dts-this._dtsBase-Ot-Bn:un!=null?Ri=un.dts-this._dtsBase-Ot-Bn:$t.length>=1?Ri=$t[$t.length-1].duration:Ri=Math.floor(this._videoMeta.refSampleDuration),ti){let Mn=new Je(Bn,Di,Ri,ei.dts,!0);Mn.fileposition=ei.fileposition,Dn.appendSyncPoint(Mn)}$t.push({dts:Bn,pts:Di,cts:li,units:ei.units,size:ei.length,isKeyframe:ti,duration:Ri,originalDts:Gn,flags:{isLeading:0,dependsOn:ti?2:1,isDependedOn:ti?1:0,hasRedundancy:0,isNonSync:ti?0:1}})}sn=new Uint8Array(Nt),sn[0]=Nt>>>24&255,sn[1]=Nt>>>16&255,sn[2]=Nt>>>8&255,sn[3]=Nt&255,sn.set(Ne.types.mdat,4);for(let On=0;On<$t.length;On++){let ei=$t[On].units;for(;ei.length;){let ti=ei.shift().data;sn.set(ti,mn),mn+=ti.byteLength}}let rn=$t[$t.length-1];if(_t=rn.dts+rn.duration,Pn=rn.pts+rn.duration,this._videoNextDts=_t,Dn.beginDts=Tt,Dn.endDts=_t,Dn.beginPts=dn,Dn.endPts=Pn,Dn.originalBeginDts=$t[0].originalDts,Dn.originalEndDts=rn.originalDts+rn.duration,Dn.firstSample=new Je($t[0].dts,$t[0].pts,$t[0].duration,$t[0].originalDts,$t[0].isKeyframe),Dn.lastSample=new Je(rn.dts,rn.pts,rn.duration,rn.originalDts,rn.isKeyframe),this._isLive||this._videoSegmentInfoList.append(Dn),Ye.samples=$t,Ye.sequenceNumber++,this._forceFirstIDR){let On=$t[0].flags;On.dependsOn=2,On.isNonSync=0}let jn=Ne.moof(Ye,Tt);Ye.samples=[],Ye.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(jn,sn).buffer,sampleCount:$t.length,info:Dn})}_mergeBoxes(Ke,qe){let Ye=new Uint8Array(Ke.byteLength+qe.byteLength);return Ye.set(Ke,0),Ye.set(qe,Ke.byteLength),Ye}}var gn=ln,An={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 qn{constructor(Ke,qe){this.TAG="TransmuxingController",this._emitter=new(ke()),this._config=qe,Ke.segments||(Ke.segments=[{duration:Ke.duration,filesize:Ke.filesize,url:Ke.url}]),typeof Ke.cors!="boolean"&&(Ke.cors=!0),typeof Ke.withCredentials!="boolean"&&(Ke.withCredentials=!1),this._mediaDataSource=Ke,this._currentSegmentIndex=0;let Ye=0;this._mediaDataSource.segments.forEach(St=>{St.timestampBase=Ye,Ye+=St.duration,St.cors=Ke.cors,St.withCredentials=Ke.withCredentials,qe.referrerPolicy&&(St.referrerPolicy=qe.referrerPolicy)}),!isNaN(Ye)&&this._mediaDataSource.duration!==Ye&&(this._mediaDataSource.duration=Ye),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(Ke,qe){this._emitter.addListener(Ke,qe)}off(Ke,qe){this._emitter.removeListener(Ke,qe)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(Ke,qe){this._currentSegmentIndex=Ke;let Ye=this._mediaDataSource.segments[Ke],St=this._ioctl=new yt(Ye,this._config,Ke);St.onError=this._onIOException.bind(this),St.onSeeked=this._onIOSeeked.bind(this),St.onComplete=this._onIOComplete.bind(this),St.onRedirect=this._onIORedirect.bind(this),St.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),qe?this._demuxer.bindDataSource(this._ioctl):St.onDataArrival=this._onInitChunkArrival.bind(this),St.open(qe)}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(Ke){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let qe=this._searchSegmentIndexContains(Ke);if(qe===this._currentSegmentIndex){let Ye=this._mediaInfo.segments[qe];if(Ye==null)this._pendingSeekTime=Ke;else{let St=Ye.getNearestKeyframe(Ke);this._remuxer.seek(St.milliseconds),this._ioctl.seek(St.fileposition),this._pendingResolveSeekPoint=St.milliseconds}}else{let Ye=this._mediaInfo.segments[qe];if(Ye==null)this._pendingSeekTime=Ke,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(qe);else{let St=Ye.getNearestKeyframe(Ke);this._internalAbort(),this._remuxer.seek(Ke),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[qe].timestampBase,this._loadSegment(qe,St.fileposition),this._pendingResolveSeekPoint=St.milliseconds,this._reportSegmentMediaInfo(qe)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(Ke){let qe=this._mediaDataSource.segments,Ye=qe.length-1;for(let St=0;St<qe.length;St++)if(Ke<qe[St].timestampBase){Ye=St-1;break}return Ye}_onInitChunkArrival(Ke,qe){let Ye=null,St=0;if(qe>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,St=this._demuxer.parseChunks(Ke,qe);else if((Ye=Oe.probe(Ke)).match){this._demuxer=new Oe(Ye,this._config),this._remuxer||(this._remuxer=new gn(this._config));let Ot=this._mediaDataSource;Ot.duration!=null&&!isNaN(Ot.duration)&&(this._demuxer.overridedDuration=Ot.duration),typeof Ot.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Ot.hasAudio),typeof Ot.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Ot.hasVideo),this._demuxer.timestampBase=Ot.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),St=this._demuxer.parseChunks(Ke,qe)}else Ye=null,Le.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(An.DEMUX_ERROR,vt.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),St=0;return St}_onMediaInfo(Ke){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},Ke),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Ht.prototype));let qe=Object.assign({},Ke);Object.setPrototypeOf(qe,Ht.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=qe,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let Ye=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(Ye)})}_onMetaDataArrived(Ke){this._emitter.emit(An.METADATA_ARRIVED,Ke)}_onScriptDataArrived(Ke){this._emitter.emit(An.SCRIPTDATA_ARRIVED,Ke)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(Ke){let Ye=Ke+1;Ye<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(Ye)):(this._remuxer.flushStashedSamples(),this._emitter.emit(An.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(Ke){let qe=this._ioctl.extraData;this._mediaDataSource.segments[qe].redirectedURL=Ke}_onIORecoveredEarlyEof(){this._emitter.emit(An.RECOVERED_EARLY_EOF)}_onIOException(Ke,qe){Le.e(this.TAG,`IOException: type = ${Ke}, code = ${qe.code}, msg = ${qe.msg}`),this._emitter.emit(An.IO_ERROR,Ke,qe),this._disableStatisticsReporter()}_onDemuxException(Ke,qe){Le.e(this.TAG,`DemuxException: type = ${Ke}, info = ${qe}`),this._emitter.emit(An.DEMUX_ERROR,Ke,qe)}_onRemuxerInitSegmentArrival(Ke,qe){this._emitter.emit(An.INIT_SEGMENT,Ke,qe)}_onRemuxerMediaSegmentArrival(Ke,qe){if(this._pendingSeekTime==null&&(this._emitter.emit(An.MEDIA_SEGMENT,Ke,qe),this._pendingResolveSeekPoint!=null&&Ke==="video")){let Ye=qe.info.syncPoints,St=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,ie.safari&&Ye.length>0&&Ye[0].originalDts===St&&(St=Ye[0].pts),this._emitter.emit(An.RECOMMEND_SEEKPOINT,St)}}_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(Ke){let qe=this._mediaInfo.segments[Ke],Ye=Object.assign({},qe);Ye.duration=this._mediaInfo.duration,Ye.segmentCount=this._mediaInfo.segmentCount,delete Ye.segments,delete Ye.keyframesIndex,this._emitter.emit(An.MEDIA_INFO,Ye)}_reportStatisticsInfo(){let Ke={};Ke.url=this._ioctl.currentURL,Ke.hasRedirect=this._ioctl.hasRedirect,Ke.hasRedirect&&(Ke.redirectedURL=this._ioctl.currentRedirectedURL),Ke.speed=this._ioctl.currentSpeed,Ke.loaderType=this._ioctl.loaderType,Ke.currentSegmentIndex=this._currentSegmentIndex,Ke.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(An.STATISTICS_INFO,Ke)}}var ai=qn,Ci=function(ri){let Ke="TransmuxingWorker",qe=null,Ye=Dn.bind(this);me.install(),ri.addEventListener("message",function($t){switch($t.data.cmd){case"init":qe=new ai($t.data.param[0],$t.data.param[1]),qe.on(An.IO_ERROR,Nt.bind(this)),qe.on(An.DEMUX_ERROR,un.bind(this)),qe.on(An.INIT_SEGMENT,St.bind(this)),qe.on(An.MEDIA_SEGMENT,Ot.bind(this)),qe.on(An.LOADING_COMPLETE,Tt.bind(this)),qe.on(An.RECOVERED_EARLY_EOF,_t.bind(this)),qe.on(An.MEDIA_INFO,dn.bind(this)),qe.on(An.METADATA_ARRIVED,Pn.bind(this)),qe.on(An.SCRIPTDATA_ARRIVED,mn.bind(this)),qe.on(An.STATISTICS_INFO,sn.bind(this)),qe.on(An.RECOMMEND_SEEKPOINT,Ln.bind(this));break;case"destroy":qe&&(qe.destroy(),qe=null),ri.postMessage({msg:"destroyed"});break;case"start":qe.start();break;case"stop":qe.stop();break;case"seek":qe.seek($t.data.param);break;case"pause":qe.pause();break;case"resume":qe.resume();break;case"logging_config":{let rn=$t.data.param;gt.applyConfig(rn),rn.enableCallback===!0?gt.addLogListener(Ye):gt.removeLogListener(Ye);break}}});function St($t,rn){let jn={msg:An.INIT_SEGMENT,data:{type:$t,data:rn}};ri.postMessage(jn,[rn.data])}function Ot($t,rn){let jn={msg:An.MEDIA_SEGMENT,data:{type:$t,data:rn}};ri.postMessage(jn,[rn.data])}function Tt(){let $t={msg:An.LOADING_COMPLETE};ri.postMessage($t)}function _t(){let $t={msg:An.RECOVERED_EARLY_EOF};ri.postMessage($t)}function dn($t){let rn={msg:An.MEDIA_INFO,data:$t};ri.postMessage(rn)}function Pn($t){let rn={msg:An.METADATA_ARRIVED,data:$t};ri.postMessage(rn)}function mn($t){let rn={msg:An.SCRIPTDATA_ARRIVED,data:$t};ri.postMessage(rn)}function sn($t){let rn={msg:An.STATISTICS_INFO,data:$t};ri.postMessage(rn)}function Nt($t,rn){ri.postMessage({msg:An.IO_ERROR,data:{type:$t,info:rn}})}function un($t,rn){ri.postMessage({msg:An.DEMUX_ERROR,data:{type:$t,info:rn}})}function Ln($t){ri.postMessage({msg:An.RECOMMEND_SEEKPOINT,data:$t})}function Dn($t,rn){ri.postMessage({msg:"logcat_callback",data:{type:$t,logcat:rn}})}};class $i{constructor(Ke,qe){if(this.TAG="Transmuxer",this._emitter=new(ke()),qe.enableWorker&&typeof Worker!="undefined")try{let Ye=Ee(82059);this._worker=Ye(Ci),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[Ke,qe]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},gt.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:gt.getConfig()})}catch(Ye){Le.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ai(Ke,qe)}else this._controller=new ai(Ke,qe);if(this._controller){let Ye=this._controller;Ye.on(An.IO_ERROR,this._onIOError.bind(this)),Ye.on(An.DEMUX_ERROR,this._onDemuxError.bind(this)),Ye.on(An.INIT_SEGMENT,this._onInitSegment.bind(this)),Ye.on(An.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),Ye.on(An.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),Ye.on(An.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),Ye.on(An.MEDIA_INFO,this._onMediaInfo.bind(this)),Ye.on(An.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),Ye.on(An.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),Ye.on(An.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),Ye.on(An.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),gt.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(Ke,qe){this._emitter.addListener(Ke,qe)}off(Ke,qe){this._emitter.removeListener(Ke,qe)}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(Ke){this._worker?this._worker.postMessage({cmd:"seek",param:Ke}):this._controller.seek(Ke)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(An.INIT_SEGMENT,Ke,qe)})}_onMediaSegment(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(An.MEDIA_SEGMENT,Ke,qe)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(An.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(An.RECOVERED_EARLY_EOF)})}_onMediaInfo(Ke){Promise.resolve().then(()=>{this._emitter.emit(An.MEDIA_INFO,Ke)})}_onMetaDataArrived(Ke){Promise.resolve().then(()=>{this._emitter.emit(An.METADATA_ARRIVED,Ke)})}_onScriptDataArrived(Ke){Promise.resolve().then(()=>{this._emitter.emit(An.SCRIPTDATA_ARRIVED,Ke)})}_onStatisticsInfo(Ke){Promise.resolve().then(()=>{this._emitter.emit(An.STATISTICS_INFO,Ke)})}_onIOError(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(An.IO_ERROR,Ke,qe)})}_onDemuxError(Ke,qe){Promise.resolve().then(()=>{this._emitter.emit(An.DEMUX_ERROR,Ke,qe)})}_onRecommendSeekpoint(Ke){Promise.resolve().then(()=>{this._emitter.emit(An.RECOMMEND_SEEKPOINT,Ke)})}_onLoggingConfigChanged(Ke){this._worker&&this._worker.postMessage({cmd:"logging_config",param:Ke})}_onWorkerMessage(Ke){let qe=Ke.data,Ye=qe.data;if(qe.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(qe.msg){case An.INIT_SEGMENT:case An.MEDIA_SEGMENT:this._emitter.emit(qe.msg,Ye.type,Ye.data);break;case An.LOADING_COMPLETE:case An.RECOVERED_EARLY_EOF:this._emitter.emit(qe.msg);break;case An.MEDIA_INFO:Object.setPrototypeOf(Ye,Ht.prototype),this._emitter.emit(qe.msg,Ye);break;case An.METADATA_ARRIVED:case An.SCRIPTDATA_ARRIVED:case An.STATISTICS_INFO:this._emitter.emit(qe.msg,Ye);break;case An.IO_ERROR:case An.DEMUX_ERROR:this._emitter.emit(qe.msg,Ye.type,Ye.info);break;case An.RECOMMEND_SEEKPOINT:this._emitter.emit(qe.msg,Ye);break;case"logcat_callback":Le.emitter.emit("log",Ye.type,Ye.logcat);break;default:break}}}var or=$i,qi={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class Fr{constructor(Ke){this.TAG="MSEController",this._config=Ke,this._emitter=new(ke()),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 tn}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ke,qe){this._emitter.addListener(Ke,qe)}off(Ke,qe){this._emitter.removeListener(Ke,qe)}attachMediaElement(Ke){if(this._mediaSource)throw new ge("MediaSource has been attached to an HTMLMediaElement!");let qe=this._mediaSource=new window.MediaSource;qe.addEventListener("sourceopen",this.e.onSourceOpen),qe.addEventListener("sourceended",this.e.onSourceEnded),qe.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=Ke,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),Ke.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let Ke=this._mediaSource;for(let qe in this._sourceBuffers){let Ye=this._pendingSegments[qe];Ye.splice(0,Ye.length),this._pendingSegments[qe]=null,this._pendingRemoveRanges[qe]=null,this._lastInitSegments[qe]=null;let St=this._sourceBuffers[qe];if(St){if(Ke.readyState!=="closed"){try{Ke.removeSourceBuffer(St)}catch(Ot){Le.e(this.TAG,Ot.message)}St.removeEventListener("error",this.e.onSourceBufferError),St.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[qe]=null,this._sourceBuffers[qe]=null}}if(Ke.readyState==="open")try{Ke.endOfStream()}catch(qe){Le.e(this.TAG,qe.message)}Ke.removeEventListener("sourceopen",this.e.onSourceOpen),Ke.removeEventListener("sourceended",this.e.onSourceEnded),Ke.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(Ke,qe){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(Ke),this._pendingSegments[Ke.type].push(Ke);return}let Ye=Ke,St=`${Ye.container}`;Ye.codec&&Ye.codec.length>0&&(St+=`;codecs=${Ye.codec}`);let Ot=!1;if(Le.v(this.TAG,"Received Initialization Segment, mimeType: "+St),this._lastInitSegments[Ye.type]=Ye,St!==this._mimeTypes[Ye.type]){if(this._mimeTypes[Ye.type])Le.v(this.TAG,`Notice: ${Ye.type} mimeType changed, origin: ${this._mimeTypes[Ye.type]}, target: ${St}`);else{Ot=!0;try{let Tt=this._sourceBuffers[Ye.type]=this._mediaSource.addSourceBuffer(St);Tt.addEventListener("error",this.e.onSourceBufferError),Tt.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Tt){Le.e(this.TAG,Tt.message),this._emitter.emit(qi.ERROR,{code:Tt.code,msg:Tt.message});return}}this._mimeTypes[Ye.type]=St}qe||this._pendingSegments[Ye.type].push(Ye),Ot||this._sourceBuffers[Ye.type]&&!this._sourceBuffers[Ye.type].updating&&this._doAppendSegments(),ie.safari&&Ye.container==="audio/mpeg"&&Ye.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=Ye.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(Ke){let qe=Ke;this._pendingSegments[qe.type].push(qe),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let Ye=this._sourceBuffers[qe.type];Ye&&!Ye.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(Ke){for(let qe in this._sourceBuffers){if(!this._sourceBuffers[qe])continue;let Ye=this._sourceBuffers[qe];if(this._mediaSource.readyState==="open")try{Ye.abort()}catch(Ot){Le.e(this.TAG,Ot.message)}this._idrList.clear();let St=this._pendingSegments[qe];if(St.splice(0,St.length),this._mediaSource.readyState!=="closed"){for(let Ot=0;Ot<Ye.buffered.length;Ot++){let Tt=Ye.buffered.start(Ot),_t=Ye.buffered.end(Ot);this._pendingRemoveRanges[qe].push({start:Tt,end:_t})}if(Ye.updating||this._doRemoveRanges(),ie.safari){let Ot=this._lastInitSegments[qe];Ot&&(this._pendingSegments[qe].push(Ot),Ye.updating||this._doAppendSegments())}}}}endOfStream(){let Ke=this._mediaSource,qe=this._sourceBuffers;if(!Ke||Ke.readyState!=="open"){Ke&&Ke.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}qe.video&&qe.video.updating||qe.audio&&qe.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,Ke.endOfStream())}getNearestKeyframe(Ke){return this._idrList.getLastSyncPointBeforeDts(Ke)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let Ke=this._mediaElement.currentTime;for(let qe in this._sourceBuffers){let Ye=this._sourceBuffers[qe];if(Ye){let St=Ye.buffered;if(St.length>=1&&Ke-St.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let Ke=this._mediaElement.currentTime;for(let qe in this._sourceBuffers){let Ye=this._sourceBuffers[qe];if(Ye){let St=Ye.buffered,Ot=!1;for(let Tt=0;Tt<St.length;Tt++){let _t=St.start(Tt),dn=St.end(Tt);if(_t<=Ke&&Ke<dn+3){if(Ke-_t>=this._config.autoCleanupMaxBackwardDuration){Ot=!0;let Pn=Ke-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[qe].push({start:_t,end:Pn})}}else dn<Ke&&(Ot=!0,this._pendingRemoveRanges[qe].push({start:_t,end:dn}))}Ot&&!Ye.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let Ke=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||Ke.video&&Ke.video.updating||Ke.audio&&Ke.audio.updating)return;let qe=this._mediaSource.duration,Ye=this._pendingMediaDuration;Ye>0&&(isNaN(qe)||Ye>qe)&&(Le.v(this.TAG,`Update MediaSource duration from ${qe} to ${Ye}`),this._mediaSource.duration=Ye),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let Ke in this._pendingRemoveRanges){if(!this._sourceBuffers[Ke]||this._sourceBuffers[Ke].updating)continue;let qe=this._sourceBuffers[Ke],Ye=this._pendingRemoveRanges[Ke];for(;Ye.length&&!qe.updating;){let St=Ye.shift();qe.remove(St.start,St.end)}}}_doAppendSegments(){let Ke=this._pendingSegments;for(let qe in Ke)if(!(!this._sourceBuffers[qe]||this._sourceBuffers[qe].updating)&&Ke[qe].length>0){let Ye=Ke[qe].shift();if(Ye.timestampOffset){let St=this._sourceBuffers[qe].timestampOffset,Ot=Ye.timestampOffset/1e3;Math.abs(St-Ot)>.1&&(Le.v(this.TAG,`Update MPEG audio timestampOffset from ${St} to ${Ot}`),this._sourceBuffers[qe].timestampOffset=Ot),delete Ye.timestampOffset}if(!Ye.data||Ye.data.byteLength===0)continue;try{this._sourceBuffers[qe].appendBuffer(Ye.data),this._isBufferFull=!1,qe==="video"&&Ye.hasOwnProperty("info")&&this._idrList.appendArray(Ye.info.syncPoints)}catch(St){this._pendingSegments[qe].unshift(Ye),St.code===22?(this._isBufferFull||this._emitter.emit(qi.BUFFER_FULL),this._isBufferFull=!0):(Le.e(this.TAG,St.message),this._emitter.emit(qi.ERROR,{code:St.code,msg:St.message}))}}}_onSourceOpen(){if(Le.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let Ke=this._pendingSourceBufferInit;for(;Ke.length;){let qe=Ke.shift();this.appendInitSegment(qe,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(qi.SOURCE_OPEN)}_onSourceEnded(){Le.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){Le.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 Ke=this._pendingSegments;return Ke.video.length>0||Ke.audio.length>0}_hasPendingRemoveRanges(){let Ke=this._pendingRemoveRanges;return Ke.video.length>0||Ke.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(qi.UPDATE_END)}_onSourceBufferError(Ke){Le.e(this.TAG,`SourceBuffer Error: ${Ke}`)}}var Mr=Fr;const yi={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},dr={NETWORK_EXCEPTION:ce.EXCEPTION,NETWORK_STATUS_CODE_INVALID:ce.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:ce.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:ce.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:vt.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:vt.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:vt.CODEC_UNSUPPORTED};class Zi{constructor(Ke,qe){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(ke()),this._config=zt(),typeof qe=="object"&&Object.assign(this._config,qe),Ke.type.toLowerCase()!=="flv")throw new le("FlvPlayer requires an flv MediaDataSource input!");Ke.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=Ke,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 Ye=ie.chrome&&(ie.version.major<50||ie.version.major===50&&ie.version.build<2661);this._alwaysSeekKeyframe=!!(Ye||ie.msedge||ie.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(Ke,qe){Ke===mt.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(mt.MEDIA_INFO,this.mediaInfo)}):Ke===mt.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(mt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ke,qe)}off(Ke,qe){this._emitter.removeListener(Ke,qe)}attachMediaElement(Ke){if(this._mediaElement=Ke,Ke.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),Ke.addEventListener("seeking",this.e.onvSeeking),Ke.addEventListener("canplay",this.e.onvCanPlay),Ke.addEventListener("stalled",this.e.onvStalled),Ke.addEventListener("progress",this.e.onvProgress),this._msectl=new Mr(this._config),this._msectl.on(qi.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(qi.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(qi.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(qi.ERROR,qe=>{this._emitter.emit(mt.ERROR,yi.MEDIA_ERROR,dr.MEDIA_MSE_ERROR,qe)}),this._msectl.attachMediaElement(Ke),this._pendingSeekTime!=null)try{Ke.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(qe){}}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 ge("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new ge("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 or(this._mediaDataSource,this._config),this._transmuxer.on(An.INIT_SEGMENT,(Ke,qe)=>{this._msectl.appendInitSegment(qe)}),this._transmuxer.on(An.MEDIA_SEGMENT,(Ke,qe)=>{if(this._msectl.appendMediaSegment(qe),this._config.lazyLoad&&!this._config.isLive){let Ye=this._mediaElement.currentTime;qe.info.endDts>=(Ye+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(Le.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(An.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(mt.LOADING_COMPLETE)}),this._transmuxer.on(An.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(mt.RECOVERED_EARLY_EOF)}),this._transmuxer.on(An.IO_ERROR,(Ke,qe)=>{this._emitter.emit(mt.ERROR,yi.NETWORK_ERROR,Ke,qe)}),this._transmuxer.on(An.DEMUX_ERROR,(Ke,qe)=>{this._emitter.emit(mt.ERROR,yi.MEDIA_ERROR,Ke,{code:-1,msg:qe})}),this._transmuxer.on(An.MEDIA_INFO,Ke=>{this._mediaInfo=Ke,this._emitter.emit(mt.MEDIA_INFO,Object.assign({},Ke))}),this._transmuxer.on(An.METADATA_ARRIVED,Ke=>{this._emitter.emit(mt.METADATA_ARRIVED,Ke)}),this._transmuxer.on(An.SCRIPTDATA_ARRIVED,Ke=>{this._emitter.emit(mt.SCRIPTDATA_ARRIVED,Ke)}),this._transmuxer.on(An.STATISTICS_INFO,Ke=>{this._statisticsInfo=this._fillStatisticsInfo(Ke),this._emitter.emit(mt.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(An.RECOMMEND_SEEKPOINT,Ke=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ke/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(Ke){this._mediaElement.volume=Ke}get muted(){return this._mediaElement.muted}set muted(Ke){this._mediaElement.muted=Ke}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ke){this._mediaElement?this._internalSeek(Ke):this._pendingSeekTime=Ke}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(Ke){if(Ke.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return Ke;let qe=!0,Ye=0,St=0;if(this._mediaElement.getVideoPlaybackQuality){let Ot=this._mediaElement.getVideoPlaybackQuality();Ye=Ot.totalVideoFrames,St=Ot.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Ye=this._mediaElement.webkitDecodedFrameCount,St=this._mediaElement.webkitDroppedFrameCount):qe=!1;return qe&&(Ke.decodedFrames=Ye,Ke.droppedFrames=St),Ke}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let Ke=this._mediaElement.buffered,qe=this._mediaElement.currentTime,Ye=0,St=0;for(let Ot=0;Ot<Ke.length;Ot++){let Tt=Ke.start(Ot),_t=Ke.end(Ot);if(Tt<=qe&&qe<_t){Ye=Tt,St=_t;break}}St>=qe+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(Le.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){Le.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 Ke=this._mediaElement.currentTime,qe=this._mediaElement.buffered,Ye=!1;for(let St=0;St<qe.length;St++){let Ot=qe.start(St),Tt=qe.end(St);if(Ke>=Ot&&Ke<Tt){Ke>=Tt-this._config.lazyLoadRecoverDuration&&(Ye=!0);break}}Ye&&(window.clearInterval(this._progressChecker),this._progressChecker=null,Ye&&(Le.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(Ke){let qe=this._mediaElement.buffered;for(let Ye=0;Ye<qe.length;Ye++){let St=qe.start(Ye),Ot=qe.end(Ye);if(Ke>=St&&Ke<Ot)return!0}return!1}_internalSeek(Ke){let qe=this._isTimepointBuffered(Ke),Ye=!1,St=0;if(Ke<1&&this._mediaElement.buffered.length>0){let Ot=this._mediaElement.buffered.start(0);(Ot<1&&Ke<Ot||ie.safari)&&(Ye=!0,St=ie.safari?.1:Ot)}if(Ye)this._requestSetTime=!0,this._mediaElement.currentTime=St;else if(qe){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=Ke;else{let Ot=this._msectl.getNearestKeyframe(Math.floor(Ke*1e3));this._requestSetTime=!0,Ot!=null?this._mediaElement.currentTime=Ot.dts/1e3:this._mediaElement.currentTime=Ke}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ke),this._transmuxer.seek(Math.floor(Ke*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ke)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let Ke=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(Ke)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ke),this._transmuxer.seek(Math.floor(Ke*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ke))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(Ke){let qe=this._mediaElement;if(Ke||!this._receivedCanPlay||qe.readyState<2){let Ye=qe.buffered;Ye.length>0&&qe.currentTime<Ye.start(0)&&(Le.w(this.TAG,`Playback seems stuck at ${qe.currentTime}, seek to ${Ye.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=Ye.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(Ke){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(Ke){let qe=this._mediaElement.currentTime,Ye=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(qe<1&&Ye.length>0){let St=Ye.start(0);if(St<1&&qe<St||ie.safari){this._requestSetTime=!0,this._mediaElement.currentTime=ie.safari?.1:St;return}}if(this._isTimepointBuffered(qe)){if(this._alwaysSeekKeyframe){let St=this._msectl.getNearestKeyframe(Math.floor(qe*1e3));St!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=St.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:qe,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(Ke){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(Ke){this._checkAndResumeStuckPlayback(!0)}_onvProgress(Ke){this._checkAndResumeStuckPlayback()}}var rt=Zi;class Ir{constructor(Ke,qe){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(ke()),this._config=zt(),typeof qe=="object"&&Object.assign(this._config,qe),Ke.type.toLowerCase()==="flv")throw new le("NativePlayer does't support flv MediaDataSource input!");if(Ke.hasOwnProperty("segments"))throw new le(`NativePlayer(${Ke.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=Ke,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ke,qe){Ke===mt.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(mt.MEDIA_INFO,this.mediaInfo)}):Ke===mt.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(mt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ke,qe)}off(Ke,qe){this._emitter.removeListener(Ke,qe)}attachMediaElement(Ke){if(this._mediaElement=Ke,Ke.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{Ke.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(qe){}}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 ge("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(Ke){this._mediaElement.volume=Ke}get muted(){return this._mediaElement.muted}set muted(Ke){this._mediaElement.muted=Ke}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ke){this._mediaElement?this._mediaElement.currentTime=Ke:this._pendingSeekTime=Ke}get mediaInfo(){let qe={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(qe.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(qe.width=this._mediaElement.videoWidth,qe.height=this._mediaElement.videoHeight)),qe}get statisticsInfo(){let Ke={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return Ke;let qe=!0,Ye=0,St=0;if(this._mediaElement.getVideoPlaybackQuality){let Ot=this._mediaElement.getVideoPlaybackQuality();Ye=Ot.totalVideoFrames,St=Ot.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Ye=this._mediaElement.webkitDecodedFrameCount,St=this._mediaElement.webkitDroppedFrameCount):qe=!1;return qe&&(Ke.decodedFrames=Ye,Ke.droppedFrames=St),Ke}_onvLoadedMetadata(Ke){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(mt.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(mt.STATISTICS_INFO,this.statisticsInfo)}}var Ar=Ir;me.install();function $r(ri,Ke){let qe=ri;if(qe==null||typeof qe!="object")throw new le("MediaDataSource must be an javascript object!");if(!qe.hasOwnProperty("type"))throw new le("MediaDataSource must has type field to indicate video file type!");switch(qe.type){case"flv":return new rt(qe,Ke);default:return new Ar(qe,Ke)}}function co(){return tt.supportMSEH264Playback()}function mo(){return tt.getFeatureList()}let no={};no.createPlayer=$r,no.isSupported=co,no.getFeatureList=mo,no.BaseLoader=z,no.LoaderStatus=de,no.LoaderErrors=ce,no.Events=mt,no.ErrorTypes=yi,no.ErrorDetails=dr,no.FlvPlayer=rt,no.NativePlayer=Ar,no.LoggingControl=gt,Object.defineProperty(no,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var lo=no},93125:function(_n,en,Ee){(function(Me){if(1)window.OSS=Me(),_n.exports=Me();else var me})(function(){var Me;return function(){function me(Be,ke,Ce){function Le(xe,ge){if(!ke[xe]){if(!Be[xe]){var le=void 0;if(!ge&&le)return require(xe,!0);if(he)return he(xe,!0);var ve=new Error("Cannot find module '"+xe+"'");throw ve.code="MODULE_NOT_FOUND",ve}var de=ke[xe]={exports:{}};Be[xe][0].call(de.exports,function(ce){return Le(Be[xe][1][ce]||ce)},de,de.exports,me,Be,ke,Ce)}return ke[xe].exports}for(var he=void 0,ye=0;ye<Ce.length;ye++)Le(Ce[ye]);return Le}return me}()({1:[function(me,Be,ke){"use strict";var Ce=me("./browser/client");Ce.Buffer=me("buffer").Buffer,Ce.co=me("co"),Ce.urllib=me("../shims/xhr"),Ce.version=me("./browser/version").version,Be.exports=Ce},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(me,Be,ke){(function(Ce,Le){"use strict";function he(tt){return tt&&tt.__esModule?tt:{default:tt}}function ye(tt,ut){return tt[ut]||tt[ut.toLowerCase()]}function xe(tt,ut){var mt=ze.parse(tt);if(!mt.protocol){var Pt=ut?"https://":"http://";mt=ze.parse(Pt+tt)}if(mt.protocol!=="http:"&&mt.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return mt}function ge(tt,ut,mt){var Pt=mt?"https://":"http://",gt=ut?"-internal.aliyuncs.com":".aliyuncs.com";return tt.substr(0,14)==="vpc100-oss-cn-"&&(gt=".aliyuncs.com"),ze.parse(Pt+tt+gt)}function le(){return document&&document.location&&document.location.protocol==="https:"}function ve(tt,ut){if(!(this instanceof ve))return new ve(tt,ut);tt&&tt.inited?this.options=tt:this.options=ve.initOptions(tt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=ft,this.agent=this.options.agent||zt),this.ctx=ut,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var de=me("babel-runtime/regenerator"),ce=he(de),z=me("babel-runtime/core-js/object/keys"),ee=he(z),oe=me("debug")("ali-oss"),ie=me("./../../shims/crypto/crypto.js"),se=me("path"),ue=me("copy-to"),Se=me("mime"),we=me("xml2js"),Pe=me("humanize-ms"),Ae=me("agentkeepalive"),De=me("merge-descriptors"),ze=me("url"),Ze=me("is-type-of"),Xe=me("platform"),Ge=me("utility"),ft=me("urllib"),at=me("./version"),Ct=me("dateformat"),et=me("bowser"),yt=me("../common/signUtils"),st=me("../common/utils"),zt=new Ae;Be.exports=ve,ve.initOptions=function(tt){if(!tt||!tt.accessKeyId||!tt.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var ut=le(),mt={region:"oss-cn-hangzhou",internal:!1,secure:ut,bucket:null,endpoint:null,cname:!1};if((0,ee.default)(tt).forEach(function(Pt){tt[Pt]!==void 0&&(mt[Pt]=tt[Pt])}),mt.accessKeyId=mt.accessKeyId.trim(),mt.accessKeySecret=mt.accessKeySecret.trim(),mt.timeout&&(mt.timeout=Pe(mt.timeout)),mt.endpoint)mt.endpoint=xe(mt.endpoint,mt.secure);else{if(!mt.region)throw new Error("require options.endpoint or options.region");mt.endpoint=ge(mt.region,mt.internal,mt.secure)}return mt.inited=!0,mt};var lt=ve.prototype;De(lt,me("./object")),De(lt,me("./managed_upload")),De(lt,me("../common/multipart")),De(lt,me("../common/thunkpool.js")),ve.Wrapper=me("./wrapper"),lt.signature=function(tt){return oe("authorization stringToSign: %s",tt),yt.computeSignature(this.options.accessKeySecret,tt)},lt.authorization=function(tt,ut,mt,Pt){var gt=yt.buildCanonicalString(tt.toUpperCase(),ut,{headers:Pt,parameters:mt});return yt.authorization(this.options.accessKeyId,this.options.accessKeySecret,gt)},lt.createRequest=function(tt){var ut={"x-oss-date":Ct(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(ut["x-oss-security-token"]=this.options.stsToken),ue(tt.headers).to(ut),ye(ut,"Content-Type")||(tt.mime===Se.default_type&&(tt.mime=""),tt.mime&&tt.mime.indexOf("/")>0?ut["Content-Type"]=tt.mime:ut["Content-Type"]=Se.getType(tt.mime||se.extname(tt.object||""))||"application/octet-stream"),tt.content&&(ut["Content-Md5"]=ie.createHash("md5").update(new Le(tt.content,"utf8")).digest("base64"),ut["Content-Length"]||(ut["Content-Length"]=tt.content.length));var mt=this._getResource(tt);ut.authorization=this.authorization(tt.method,mt,tt.subres,ut);var Pt=this._getReqUrl(tt);oe("request %s %s, with headers %j, !!stream: %s",tt.method,Pt,ut,!!tt.stream);var gt=tt.timeout||this.options.timeout;return{url:Pt,params:{agent:this.agent,method:tt.method,content:tt.content,stream:tt.stream,headers:ut,timeout:gt,writeStream:tt.writeStream,customResponse:tt.customResponse,ctx:tt.ctx||this.ctx}}},lt.request=ce.default.mark(function tt(ut){var mt,Pt,gt,Ft;return ce.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return mt=this.createRequest(ut),Pt=void 0,gt=void 0,Ht.prev=3,Ht.next=6,this.urllib.request(mt.url,mt.params);case 6:Pt=Ht.sent,oe("response %s %s, got %s, headers: %j",ut.method,mt.url,Pt.status,Pt.headers),Ht.next=13;break;case 10:Ht.prev=10,Ht.t0=Ht.catch(3),gt=Ht.t0;case 13:if(Ft=void 0,!Pt||!ut.successStatuses||ut.successStatuses.indexOf(Pt.status)!==-1){Ht.next=26;break}return Ht.next=17,this.requestError(Pt);case 17:if(Ft=Ht.sent,Ft.code!=="RequestTimeTooSkewed"){Ht.next=23;break}return this.options.amendTimeSkewed=+new Date(Ft.serverTime)-new Date,Ht.next=22,this.request(ut);case 22:return Ht.abrupt("return",Ht.sent);case 23:Ft.params=ut,Ht.next=30;break;case 26:if(!gt){Ht.next=30;break}return Ht.next=29,this.requestError(gt);case 29:Ft=Ht.sent;case 30:if(!Ft){Ht.next=32;break}throw Ft;case 32:if(!ut.xmlResponse){Ht.next=36;break}return Ht.next=35,this.parseXML(Pt.data);case 35:Pt.data=Ht.sent;case 36:return Ht.abrupt("return",Pt);case 37:case"end":return Ht.stop()}},tt,this,[[3,10]])}),lt._getResource=function(tt){var ut="/";return tt.bucket&&(ut+=tt.bucket+"/"),tt.object&&(ut+=tt.object),ut},lt._isIP=function(tt){return st._isIP(tt)},lt._escape=function(tt){return Ge.encodeURIComponent(tt).replace(/%2F/g,"/")},lt._getReqUrl=function(tt){var ut={};ue(this.options.endpoint).to(ut);var mt=this._isIP(ut.hostname),Pt=this.options.cname;!tt.bucket||Pt||mt||(ut.host=tt.bucket+"."+ut.host);var gt="/";tt.bucket&&mt&&(gt+=tt.bucket+"/"),tt.object&&(gt+=this._escape(tt.object).replace(/\+/g,"%2B")),ut.pathname=gt;var Ft={};if(tt.query&&De(Ft,tt.query),tt.subres){var Ht={};Ze.string(tt.subres)?Ht[tt.subres]="":Ze.array(tt.subres)?tt.subres.forEach(function(hn){Ht[hn]=""}):Ht=tt.subres,De(Ft,Ht)}return ut.query=Ft,ze.format(ut)},lt._getUserAgent=function(){var tt=Ce&&Ce.browser?"js":"nodejs",ut="aliyun-sdk-"+tt+"/"+at.version,mt=Xe.description;return!mt&&Ce&&(mt="Node.js "+Ce.version.slice(1)+" on "+Ce.platform+" "+Ce.arch),this._checkUserAgent(ut+" "+mt)},lt._checkUserAgent=function(tt){return tt.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},lt.checkBrowserAndVersion=function(tt,ut){return et.name===tt&&et.version.split(".")[0]===ut},lt.parseXML=function(tt){return function(ut){Le.isBuffer(tt)&&(tt=tt.toString()),we.parseString(tt,{explicitRoot:!1,explicitArray:!1},ut)}},lt.requestError=ce.default.mark(function tt(ut){var mt,Pt,gt,Ft;return ce.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(mt=null,ut.data&&ut.data.length){Ht.next=5;break}ut.status===-1||ut.status===-2?(mt=new Error(ut.message),mt.name=ut.name,mt.status=ut.status,mt.code=ut.name):(ut.status===404?(mt=new Error("Object not exists"),mt.name="NoSuchKeyError",mt.status=404,mt.code="NoSuchKey"):ut.status===412?(mt=new Error("Pre condition failed"),mt.name="PreconditionFailedError",mt.status=412,mt.code="PreconditionFailed"):(mt=new Error("Unknow error, status: "+ut.status),mt.name="UnknowError",mt.status=ut.status),mt.requestId=ut.headers["x-oss-request-id"],mt.host=""),Ht.next=30;break;case 5:return Pt=String(ut.data),oe("request response error data: %s",Pt),gt=void 0,Ht.prev=8,Ht.next=11,this.parseXML(Pt)||{};case 11:gt=Ht.sent,Ht.next=21;break;case 14:return Ht.prev=14,Ht.t0=Ht.catch(8),oe(Pt),Ht.t0.message+=`
|
|
|
raw xml: `+Pt,Ht.t0.status=ut.status,Ht.t0.requestId=ut.headers["x-oss-request-id"],Ht.abrupt("return",Ht.t0);case 21:Ft=gt.Message||"unknow request error, status: "+ut.status,gt.Condition&&(Ft+=" (condition: "+gt.Condition+")"),mt=new Error(Ft),mt.name=gt.Code?gt.Code+"Error":"UnknowError",mt.status=ut.status,mt.code=gt.Code,mt.requestId=gt.RequestId,mt.hostId=gt.HostId,mt.serverTime=gt.ServerTime;case 30:return oe("generate error %j",mt),Ht.abrupt("return",mt);case 32:case"end":return Ht.stop()}},tt,this,[[8,14]])})}).call(this,me("_process"),me("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(me,Be,ke){(function(Ce){"use strict";function Le(ue){return ue&&ue.__esModule?ue:{default:ue}}function he(ue,Se){if(!(this instanceof he))return new he(ue,Se);se.call(this,Se),this.file=ue,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var ye=me("babel-runtime/core-js/array/from"),xe=Le(ye),ge=me("babel-runtime/regenerator"),le=Le(ge),ve=me("is-type-of"),de=me("util"),ce=me("path"),z=me("mime"),ee=me("copy-to"),oe=ke;oe.multipartUpload=le.default.mark(function ue(Se,we,Pe){var Ae,De,ze,Ze,Xe,Ge,ft,at,Ct;return le.default.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(this.resetCancelFlag(),Pe=Pe||{},!Pe.checkpoint||!Pe.checkpoint.uploadId){et.next=6;break}return et.next=5,this._resumeMultipart(Pe.checkpoint,Pe);case 5:return et.abrupt("return",et.sent);case 6:return Ae=102400,Pe.mime||(ve.file(we)?Pe.mime=z.getType(ce.extname(we.name)):ve.blob(we)?Pe.mime=we.type:Pe.mime=z.getType(ce.extname(we))),Pe.headers=Pe.headers||{},this._convertMetaToHeaders(Pe.meta,Pe.headers),et.next=12,this._getFileSize(we);case 12:if(!((De=et.sent)<Ae)){et.next=25;break}return ze=this._createStream(we,0,De),Pe.contentLength=De,et.next=18,this.putStream(Se,ze,Pe);case 18:if(Ze=et.sent,!Pe||!Pe.progress){et.next=22;break}return et.next=22,Pe.progress(1);case 22:return Xe={res:Ze.res,bucket:this.options.bucket,name:Se,etag:Ze.res.headers.etag},(Pe.headers&&Pe.headers["x-oss-callback"]||Pe.callback)&&(Xe.data=Ze.data),et.abrupt("return",Xe);case 25:if(!(Pe.partSize&&Pe.partSize<Ae)){et.next=27;break}throw new Error("partSize must not be smaller than "+Ae);case 27:return et.next=29,this.initMultipartUpload(Se,Pe);case 29:if(Ge=et.sent,ft=Ge.uploadId,at=this._getPartSize(De,Pe.partSize),Ct={file:we,name:Se,fileSize:De,partSize:at,uploadId:ft,doneParts:[]},!Pe||!Pe.progress){et.next=36;break}return et.next=36,Pe.progress(0,Ct,Ge.res);case 36:return et.next=38,this._resumeMultipart(Ct,Pe);case 38:return et.abrupt("return",et.sent);case 39:case"end":return et.stop()}},ue,this)}),oe._resumeMultipart=le.default.mark(function ue(Se,we){var Pe,Ae,De,ze,Ze,Xe,Ge,ft,at,Ct,et,yt,st,zt,lt,tt,ut,mt,Pt,gt,Ft;return le.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!this.isCancel()){Ht.next=2;break}throw this._makeCancelEvent();case 2:if(Pe=Se.file,Ae=Se.fileSize,De=Se.partSize,ze=Se.uploadId,Ze=Se.doneParts,Xe=Se.name,Ge=[],Ze.length>0&&ee(Ze).to(Ge),ft=this._divideParts(Ae,De),at=ft.length,Ct=!1,et=le.default.mark(function hn(Qt,bn){var Wt,Kt,Jt;return le.default.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:if(Qt.isCancel()){Yt.next=21;break}return Yt.prev=1,Wt=ft[bn-1],Kt={stream:Qt._createStream(Pe,Wt.start,Wt.end),size:Wt.end-Wt.start},Yt.next=6,Qt._uploadPart(Xe,ze,bn,Kt);case 6:if(Jt=Yt.sent,Qt.isCancel()||Ct){Yt.next=13;break}if(Se.doneParts.push({number:bn,etag:Jt.res.headers.etag}),Ge.push({number:bn,etag:Jt.res.headers.etag}),!we||!we.progress){Yt.next=13;break}return Yt.next=13,we.progress(Ze.length/at,Se,Jt.res);case 13:Yt.next=21;break;case 15:if(Yt.prev=15,Yt.t0=Yt.catch(1),Qt.isCancel()){Yt.next=21;break}throw Qt.cancel(),Yt.t0.partNum=bn,Yt.t0;case 21:case"end":return Yt.stop()}},hn,this,[[1,15]])}),yt=(0,xe.default)(new Array(at),function(hn,Qt){return Qt+1}),st=Ge.map(function(hn){return hn.number}),zt=yt.filter(function(hn){return st.indexOf(hn)<0}),lt=5,tt=we.parallel||lt,!this.checkBrowserAndVersion("Internet Explorer","10")&&tt!==1){Ht.next=26;break}ut=0;case 16:if(!(ut<zt.length)){Ht.next=24;break}if(!this.isCancel()){Ht.next=19;break}throw this._makeCancelEvent();case 19:return Ht.next=21,et(this,zt[ut]);case 21:ut++,Ht.next=16;break;case 24:Ht.next=40;break;case 26:for(mt=[],Pt=0;Pt<zt.length;Pt++)mt.push(et(this,zt[Pt]));return Ht.next=30,this._thunkPool(mt,tt);case 30:if(gt=Ht.sent,Ct=!0,!(gt&>.length>0)){Ht.next=37;break}throw this.resetCancelFlag(),Ft=gt[0],Ft.message="Failed to upload some parts with error: "+Ft.toString()+" part_num: "+Ft.partNum,Ft;case 37:if(!this.isCancel()){Ht.next=40;break}throw mt=null,this._makeCancelEvent();case 40:return Ht.next=42,this.completeMultipartUpload(Xe,ze,Ge,we);case 42:return Ht.abrupt("return",Ht.sent);case 43:case"end":return Ht.stop()}},ue,this)}),ve.file=function(ue){return typeof File!="undefined"&&ue instanceof File},ve.blob=function(ue){return typeof Blob!="undefined"&&ue instanceof Blob},oe._getFileSize=le.default.mark(function ue(Se){var we;return le.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!ve.buffer(Se)){Pe.next=4;break}return Pe.abrupt("return",Se.length);case 4:if(!ve.blob(Se)&&!ve.file(Se)){Pe.next=6;break}return Pe.abrupt("return",Se.size);case 6:if(!ve.string(Se)){Pe.next=11;break}return Pe.next=9,this._statFile(Se);case 9:return we=Pe.sent,Pe.abrupt("return",we.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return Pe.stop()}},ue,this)});var ie=me("stream"),se=ie.Readable;de.inherits(he,se),he.prototype.readFileAndPush=function(ue){if(this.fileBuffer)for(var Se=!0;Se&&this.fileBuffer&&this.start<this.fileBuffer.length;){var we=this.start,Pe=we+ue;Pe=Pe>this.fileBuffer.length?this.fileBuffer.length:Pe,this.start=Pe,Se=this.push(this.fileBuffer.slice(we,Pe))}},he.prototype._read=function(ue){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);ue=ue||16384;var Se=this;this.reader.onload=function(we){Se.fileBuffer=new Ce(new Uint8Array(we.target.result)),Se.file=null,Se.readFileAndPush(ue)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(ue)},oe._createStream=function(ue,Se,we){if(ve.blob(ue)||ve.file(ue))return new he(ue.slice(Se,we));throw new Error("_createStream requires File/String.")},oe._getPartSize=function(ue,Se){return Se?Math.max(Math.ceil(ue/1e4),Se):1048576},oe._divideParts=function(ue,Se){for(var we=Math.ceil(ue/Se),Pe=[],Ae=0;Ae<we;Ae++){var De=Se*Ae,ze=Math.min(De+Se,ue);Pe.push({start:De,end:ze})}return Pe},oe._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,me("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(me,Be,ke){"use strict";function Ce(Se){return Se&&Se.__esModule?Se:{default:Se}}var Le=me("babel-runtime/core-js/object/keys"),he=Ce(Le),ye=me("babel-runtime/regenerator"),xe=Ce(ye),ge=me("debug")("ali-oss:object"),le=me("utility"),ve=me("fs"),de=me("is-type-of"),ce=me("url"),z=me("copy-to"),ee=me("path"),oe=me("mime"),ie=me("../common/callback"),se=me("../common/signUtils"),ue=ke;ue.append=xe.default.mark(function Se(we,Pe,Ae){var De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Ae=Ae||{},Ae.position===void 0&&(Ae.position="0"),Ae.subres={append:"",position:Ae.position},Ae.method="POST",ze.next=6,this.put(we,Pe,Ae);case 6:return De=ze.sent,De.nextAppendPosition=De.res.headers["x-oss-next-append-position"],ze.abrupt("return",De);case 9:case"end":return ze.stop()}},Se,this)}),ue.put=xe.default.mark(function Se(we,Pe,Ae){var De,ze,Ze,Xe,Ge,ft;return xe.default.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(De=void 0,Ae=Ae||{},!de.buffer(Pe)){at.next=6;break}De=Pe,at.next=18;break;case 6:if(!de.blob(Pe)&&!de.file(Pe)){at.next=17;break}return Ae.mime||(de.file(Pe)?Ae.mime=oe.getType(ee.extname(Pe.name)):Ae.mime=Pe.type),ze=this._createStream(Pe,0,Pe.size),at.next=11,this._getFileSize(Pe);case 11:return Ae.contentLength=at.sent,at.next=14,this.putStream(we,ze,Ae);case 14:return at.abrupt("return",at.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return Ae.headers=Ae.headers||{},this._convertMetaToHeaders(Ae.meta,Ae.headers),Ze=Ae.method||"PUT",Xe=this._objectRequestParams(Ze,we,Ae),ie.encodeCallback(Xe,Ae),Xe.mime=Ae.mime,Xe.content=De,Xe.successStatuses=[200],at.next=28,this.request(Xe);case 28:return Ge=at.sent,ft={name:we,url:this._objectUrl(we),res:Ge.res},Xe.headers&&Xe.headers["x-oss-callback"]&&(ft.data=JSON.parse(Ge.data.toString())),at.abrupt("return",ft);case 32:case"end":return at.stop()}},Se,this)}),ue.putStream=xe.default.mark(function Se(we,Pe,Ae){var De,ze,Ze,Xe;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},Ae.contentLength?Ae.headers["Content-Length"]=Ae.contentLength:Ae.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Ae.meta,Ae.headers),De=Ae.method||"PUT",ze=this._objectRequestParams(De,we,Ae),ie.encodeCallback(ze,Ae),ze.mime=Ae.mime,ze.stream=Pe,ze.successStatuses=[200],Ge.next=12,this.request(ze);case 12:return Ze=Ge.sent,Xe={name:we,url:this._objectUrl(we),res:Ze.res},ze.headers&&ze.headers["x-oss-callback"]&&(Xe.data=JSON.parse(Ze.data.toString())),Ge.abrupt("return",Xe);case 16:case"end":return Ge.stop()}},Se,this)}),ue.head=xe.default.mark(function Se(we,Pe){var Ae,De,ze;return xe.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ae=this._objectRequestParams("HEAD",we,Pe),Ae.successStatuses=[200,304],Ze.next=4,this.request(Ae);case 4:return De=Ze.sent,ze={meta:null,res:De.res,status:De.status},De.status===200&&(0,he.default)(De.headers).forEach(function(Xe){Xe.indexOf("x-oss-meta-")===0&&(ze.meta||(ze.meta={}),ze.meta[Xe.substring(11)]=De.headers[Xe])}),Ze.abrupt("return",ze);case 8:case"end":return Ze.stop()}},Se,this)}),ue.get=xe.default.mark(function Se(we,Pe,Ae){var De,ze,Ze,Xe;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return De=null,ze=!1,de.writableStream(Pe)?De=Pe:de.string(Pe)?(De=ve.createWriteStream(Pe),ze=!0):Ae=Pe,Ae=Ae||{},Ae.process&&(Ae.subres=Ae.subres||{},Ae.subres["x-oss-process"]=Ae.process),Ze=void 0,Ge.prev=6,Xe=this._objectRequestParams("GET",we,Ae),Xe.writeStream=De,Xe.successStatuses=[200,206,304],Ge.next=12,this.request(Xe);case 12:Ze=Ge.sent,ze&&De.destroy(),Ge.next=24;break;case 16:if(Ge.prev=16,Ge.t0=Ge.catch(6),!ze){Ge.next=23;break}return De.destroy(),ge("get error: %s, delete the exists file %s",Ge.t0,Pe),Ge.next=23,this._deleteFileSafe(Pe);case 23:throw Ge.t0;case 24:return Ge.abrupt("return",{res:Ze.res,content:Ze.data});case 25:case"end":return Ge.stop()}},Se,this,[[6,16]])}),ue.getStream=xe.default.mark(function Se(we,Pe){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Pe=Pe||{},Ae=this._objectRequestParams("GET",we,Pe),Ae.customResponse=!0,Ae.successStatuses=[200,206,304],ze.next=6,this.request(Ae);case 6:return De=ze.sent,ze.abrupt("return",{stream:De.res,res:{status:De.status,headers:De.headers}});case 8:case"end":return ze.stop()}},Se,this)}),ue.delete=xe.default.mark(function Se(we,Pe){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Ae=this._objectRequestParams("DELETE",we,Pe),Ae.successStatuses=[204],ze.next=4,this.request(Ae);case 4:return De=ze.sent,ze.abrupt("return",{res:De.res});case 6:case"end":return ze.stop()}},Se,this)}),ue.deleteMulti=xe.default.mark(function Se(we,Pe){var Ae,De,ze,Ze,Xe,Ge;return xe.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:for(Pe=Pe||{},Ae=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,Pe.quiet?Ae+=` <Quiet>true</Quiet>
|
|
|
`:Ae+=` <Quiet>false</Quiet>
|
|
|
`,De=0;De<we.length;De++)Ae+=" <Object><Key>"+le.escape(this._objectName(we[De]))+`</Key></Object>
|
|
|
`;return Ae+="</Delete>",ge("delete multi objects: %s",Ae),Pe.subres="delete",ze=this._objectRequestParams("POST","",Pe),ze.mime="xml",ze.content=Ae,ze.xmlResponse=!0,ze.successStatuses=[200],ft.next=14,this.request(ze);case 14:return Ze=ft.sent,Xe=Ze.data,Ge=Xe&&Xe.Deleted||null,Ge&&(Array.isArray(Ge)||(Ge=[Ge]),Ge=Ge.map(function(at){return at.Key})),ft.abrupt("return",{res:Ze.res,deleted:Ge});case 19:case"end":return ft.stop()}},Se,this)}),ue.copy=xe.default.mark(function Se(we,Pe,Ae){var De,ze,Ze;return xe.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},(0,he.default)(Ae.headers).forEach(function(Ge){Ae.headers["x-oss-copy-source-"+Ge.toLowerCase()]=Ae.headers[Ge]}),Ae.meta&&(Ae.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(Ae.meta,Ae.headers),Pe=Pe[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(Pe):"/"+encodeURIComponent(Pe.slice(1)),Ae.headers["x-oss-copy-source"]=Pe,De=this._objectRequestParams("PUT",we,Ae),De.xmlResponse=!0,De.successStatuses=[200,304],Xe.next=12,this.request(De);case 12:return ze=Xe.sent,Ze=ze.data,Ze&&(Ze={etag:Ze.ETag,lastModified:Ze.LastModified}),Xe.abrupt("return",{data:Ze,res:ze.res});case 16:case"end":return Xe.stop()}},Se,this)}),ue.putMeta=xe.default.mark(function Se(we,Pe,Ae){return xe.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,this.copy(we,we,{meta:Pe||{},timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx});case 2:return De.abrupt("return",De.sent);case 3:case"end":return De.stop()}},Se,this)}),ue.list=xe.default.mark(function Se(we,Pe){var Ae,De,ze,Ze,Xe;return xe.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return Ae=this._objectRequestParams("GET","",Pe),Ae.query=we,Ae.xmlResponse=!0,Ae.successStatuses=[200],Ge.next=6,this.request(Ae);case 6:return De=Ge.sent,ze=De.data.Contents,Ze=this,ze&&(Array.isArray(ze)||(ze=[ze]),ze=ze.map(function(ft){return{name:ft.Key,url:Ze._objectUrl(ft.Key),lastModified:ft.LastModified,etag:ft.ETag,type:ft.Type,size:Number(ft.Size),storageClass:ft.StorageClass,owner:{id:ft.Owner.ID,displayName:ft.Owner.DisplayName}}})),Xe=De.data.CommonPrefixes||null,Xe&&(Array.isArray(Xe)||(Xe=[Xe]),Xe=Xe.map(function(ft){return ft.Prefix})),Ge.abrupt("return",{res:De.res,objects:ze,prefixes:Xe,nextMarker:De.data.NextMarker||null,isTruncated:De.data.IsTruncated==="true"});case 13:case"end":return Ge.stop()}},Se,this)}),ue.putACL=xe.default.mark(function Se(we,Pe,Ae){var De,ze;return xe.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ae=Ae||{},Ae.subres="acl",Ae.headers=Ae.headers||{},Ae.headers["x-oss-object-acl"]=Pe,we=this._objectName(we),De=this._objectRequestParams("PUT",we,Ae),De.successStatuses=[200],Ze.next=9,this.request(De);case 9:return ze=Ze.sent,Ze.abrupt("return",{res:ze.res});case 11:case"end":return Ze.stop()}},Se,this)}),ue.getACL=xe.default.mark(function Se(we,Pe){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Pe=Pe||{},Pe.subres="acl",we=this._objectName(we),Ae=this._objectRequestParams("GET",we,Pe),Ae.successStatuses=[200],Ae.xmlResponse=!0,ze.next=8,this.request(Ae);case 8:return De=ze.sent,ze.abrupt("return",{acl:De.data.AccessControlList.Grant,owner:{id:De.data.Owner.ID,displayName:De.data.Owner.DisplayName},res:De.res});case 10:case"end":return ze.stop()}},Se,this)}),ue.restore=xe.default.mark(function Se(we,Pe){var Ae,De;return xe.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Pe=Pe||{},Pe.subres="restore",Ae=this._objectRequestParams("POST",we,Pe),Ae.successStatuses=[202],ze.next=6,this.request(Ae);case 6:return De=ze.sent,ze.abrupt("return",{res:De.res});case 8:case"end":return ze.stop()}},Se,this)}),ue.signatureUrl=function(Se,we){we=we||{},Se=this._objectName(Se),we.method=we.method||"GET";var Pe=le.timestamp()+(we.expires||1800),Ae={bucket:this.options.bucket,object:Se},De=this._getResource(Ae);this.options.stsToken&&(we["security-token"]=this.options.stsToken);var ze=se._signatureForURL(this.options.accessKeySecret,we,De,Pe),Ze=ce.parse(this._getReqUrl(Ae));return Ze.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Pe,Signature:ze.Signature},z(ze.subResource).to(Ze.query),Ze.format()},ue.getObjectUrl=function(Se,we){return we?we[we.length-1]!=="/"&&(we+="/"):we=this.options.endpoint.format(),we+this._escape(this._objectName(Se))},ue._objectUrl=function(Se){return this._getReqUrl({bucket:this.options.bucket,object:Se})},ue.generateObjectUrl=function(Se,we){if(we)we[we.length-1]!=="/"&&(we+="/");else{we=this.options.endpoint.format();var Pe=ce.parse(we),Ae=this.options.bucket;Pe.hostname=Ae+"."+Pe.hostname,Pe.host=Ae+"."+Pe.host,we=Pe.format()}return we+this._escape(this._objectName(Se))},ue._objectRequestParams=function(Se,we,Pe){if(!this.options.bucket)throw new Error("Please create a bucket first");Pe=Pe||{},we=this._objectName(we);var Ae={object:we,bucket:this.options.bucket,method:Se,subres:Pe&&Pe.subres,timeout:Pe&&Pe.timeout,ctx:Pe&&Pe.ctx};return Pe.headers&&(Ae.headers={},z(Pe.headers).to(Ae.headers)),Ae},ue._objectName=function(Se){return Se.replace(/^\/+/,"")},ue._statFile=function(Se){return function(we){ve.stat(Se,we)}},ue._convertMetaToHeaders=function(Se,we){Se&&(0,he.default)(Se).forEach(function(Pe){we["x-oss-meta-"+Pe]=Se[Pe]})},ue._deleteFileSafe=function(Se){return function(we){ve.exists(Se,function(Pe){Pe?ve.unlink(Se,function(Ae){Ae&&ge("unlink %j error: %s",Se,Ae),we()}):we()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(me,Be,ke){"use strict";ke.version="5.3.1"},{}],6:[function(me,Be,ke){"use strict";function Ce(ee){return ee&&ee.__esModule?ee:{default:ee}}function Le(ee){return ee&&typeof ee.next=="function"&&typeof ee.throw=="function"}function he(ee){if(!ee)return!1;var oe=ee.constructor;return!!oe&&(oe.name==="GeneratorFunction"||oe.displayName==="GeneratorFunction"||Le(oe.prototype)||Le(ee.prototype))}function ye(ee,oe){var ie=new ee(oe),se=(0,de.default)(ie),ue=(0,de.default)((0,le.default)(ie));se.concat(ue).forEach(function(Se){he(ie[Se])?this[Se]=ce.wrap(ie[Se]).bind(ie):this[Se]=ie[Se]},this)}function xe(ee){if(!(this instanceof xe))return new xe(ee);ye.call(this,z,ee)}var ge=me("babel-runtime/core-js/object/get-prototype-of"),le=Ce(ge),ve=me("babel-runtime/core-js/object/keys"),de=Ce(ve),ce=me("co"),z=me("./client");Be.exports=xe,xe.STS=function ee(oe){if(!(this instanceof ee))return new ee(oe);ye.call(this,z.STS,oe)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(me,Be,ke){(function(Ce){"use strict";function Le(le){return le&&le.__esModule?le:{default:le}}var he=me("babel-runtime/core-js/object/keys"),ye=Le(he),xe=me("babel-runtime/core-js/json/stringify"),ge=Le(xe);ke.encodeCallback=function(le,ve){if(le.headers=le.headers||{},!Object.prototype.hasOwnProperty.call(le.headers,"x-oss-callback")&&ve.callback){var de={callbackUrl:encodeURI(ve.callback.url),callbackBody:ve.callback.body};ve.callback.host&&(de.callbackHost=ve.callback.host),ve.callback.contentType&&(de.callbackBodyType=ve.callback.contentType);var ce=new Ce((0,ge.default)(de)).toString("base64");if(le.headers["x-oss-callback"]=ce,ve.callback.customValue){var z={};(0,ye.default)(ve.callback.customValue).forEach(function(ee){z["x:"+ee]=ve.callback.customValue[ee]}),le.headers["x-oss-callback-var"]=new Ce((0,ge.default)(z)).toString("base64")}}}}).call(this,me("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/regenerator"),Le=function(ge){return ge&&ge.__esModule?ge:{default:ge}}(Ce),he=me("copy-to"),ye=me("./callback"),xe=ke;xe.listUploads=Le.default.mark(function ge(le,ve){var de,ce,z,ee;return Le.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return ve=ve||{},de={},he(ve).to(de),de.subres="uploads",ce=this._objectRequestParams("GET","",de),ce.query=le,ce.xmlResponse=!0,ce.successStatuses=[200],oe.next=10,this.request(ce);case 10:return z=oe.sent,ee=z.data.Upload||[],Array.isArray(ee)||(ee=[ee]),ee=ee.map(function(ie){return{name:ie.Key,uploadId:ie.UploadId,initiated:ie.Initiated}}),oe.abrupt("return",{res:z.res,uploads:ee,bucket:z.data.Bucket,nextKeyMarker:z.data.NextKeyMarker,nextUploadIdMarker:z.data.NextUploadIdMarker,isTruncated:z.data.IsTruncated==="true"});case 15:case"end":return oe.stop()}},ge,this)}),xe.listParts=Le.default.mark(function ge(le,ve,de,ce){var z,ee,oe;return Le.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return ce=ce||{},z={},he(ce).to(z),z.subres={uploadId:ve},ee=this._objectRequestParams("GET",le,z),ee.query=de,ee.xmlResponse=!0,ee.successStatuses=[200],ie.next=10,this.request(ee);case 10:return oe=ie.sent,ie.abrupt("return",{res:oe.res,uploadId:oe.data.UploadId,bucket:oe.data.Bucket,name:oe.data.Key,partNumberMarker:oe.data.PartNumberMarker,nextPartNumberMarker:oe.data.NextPartNumberMarker,maxParts:oe.data.MaxParts,isTruncated:oe.data.IsTruncated,parts:oe.data.Part||[]});case 12:case"end":return ie.stop()}},ge,this)}),xe.abortMultipartUpload=Le.default.mark(function ge(le,ve,de){var ce,z,ee;return Le.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return this.cancel(),de=de||{},ce={},he(de).to(ce),ce.subres={uploadId:ve},z=this._objectRequestParams("DELETE",le,ce),z.successStatuses=[204],oe.next=9,this.request(z);case 9:return ee=oe.sent,oe.abrupt("return",{res:ee.res});case 11:case"end":return oe.stop()}},ge,this)}),xe.initMultipartUpload=Le.default.mark(function ge(le,ve){var de,ce,z;return Le.default.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return ve=ve||{},de={},he(ve).to(de),de.headers=de.headers||{},this._convertMetaToHeaders(ve.meta,de.headers),de.subres="uploads",ce=this._objectRequestParams("POST",le,de),ce.mime=ve.mime,ce.xmlResponse=!0,ce.successStatuses=[200],ee.next=12,this.request(ce);case 12:return z=ee.sent,ee.abrupt("return",{res:z.res,bucket:z.data.Bucket,name:z.data.Key,uploadId:z.data.UploadId});case 14:case"end":return ee.stop()}},ge,this)}),xe.uploadPart=Le.default.mark(function ge(le,ve,de,ce,z,ee,oe){var ie;return Le.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return ie={stream:this._createStream(ce,z,ee),size:ee-z},se.next=3,this._uploadPart(le,ve,de,ie,oe);case 3:return se.abrupt("return",se.sent);case 4:case"end":return se.stop()}},ge,this)}),xe.completeMultipartUpload=Le.default.mark(function ge(le,ve,de,ce){var z,ee,oe,ie,se,ue,Se,we;return Le.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:for(z=de.concat().sort(function(Ae,De){return Ae.number-De.number}).filter(function(Ae,De,ze){return!De||Ae.number!==ze[De-1].number}),ee=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,oe=0;oe<z.length;oe++)ie=z[oe],ee+=`<Part>
|
|
|
`,ee+="<PartNumber>"+ie.number+`</PartNumber>
|
|
|
`,ee+="<ETag>"+ie.etag+`</ETag>
|
|
|
`,ee+=`</Part>
|
|
|
`;return ee+="</CompleteMultipartUpload>",ce=ce||{},se={},he(ce).to(se),se.subres={uploadId:ve},ue=this._objectRequestParams("POST",le,se),ye.encodeCallback(ue,se),ue.mime="xml",ue.content=ee,ue.headers&&ue.headers["x-oss-callback"]||(ue.xmlResponse=!0),ue.successStatuses=[200],Pe.next=16,this.request(ue);case 16:return Se=Pe.sent,we={res:Se.res,bucket:ue.bucket,name:le,etag:Se.res.headers.etag},ue.headers&&ue.headers["x-oss-callback"]&&(we.data=JSON.parse(Se.data.toString())),Pe.abrupt("return",we);case 20:case"end":return Pe.stop()}},ge,this)}),xe._uploadPart=Le.default.mark(function ge(le,ve,de,ce,z){var ee,oe,ie;return Le.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return z=z||{},ee={},he(z).to(ee),ee.headers={"Content-Length":ce.size},ee.subres={partNumber:de,uploadId:ve},oe=this._objectRequestParams("PUT",le,ee),oe.mime=ee.mime,oe.stream=ce.stream,oe.successStatuses=[200],se.next=11,this.request(oe);case 11:return ie=se.sent,ce.stream=null,oe.stream=null,se.abrupt("return",{name:le,etag:ie.res.headers.etag,res:ie.res});case 15:case"end":return se.stop()}},ge,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(me,Be,ke){(function(Ce){"use strict";function Le(de){return de&&de.__esModule?de:{default:de}}var he=me("babel-runtime/core-js/json/stringify"),ye=Le(he),xe=me("babel-runtime/core-js/object/keys"),ge=Le(xe),le=me("./../../shims/crypto/crypto.js"),ve=me("is-type-of");ke.buildCanonicalizedResource=function(de,ce){var z=""+de,ee="?";if(ve.string(ce)&&ce.trim()!=="")z+=ee+ce;else if(ve.array(ce))ce.sort(),z+=ee+ce.join("&");else if(ce){var oe=function(se,ue){return se[0]>ue[0]?1:se[0]<ue[0]?-1:0},ie=function(se){z+=ee+se,ce[se]&&(z+="="+ce[se]),ee="&"};(0,ge.default)(ce).sort(oe).forEach(ie)}return z},ke.buildCanonicalString=function(de,ce,z,ee){z=z||{};var oe=z.headers||{},ie=[],se={},ue=[de.toUpperCase(),oe["Content-Md5"]||"",oe["Content-Type"]||oe["Content-Type".toLowerCase()],ee||oe["x-oss-date"]];return(0,ge.default)(oe).forEach(function(Se){var we=Se.toLowerCase();we.indexOf("x-oss-")===0&&(se[we]=String(oe[Se]).trim())}),(0,ge.default)(se).sort().forEach(function(Se){ie.push(Se+":"+se[Se])}),ue=ue.concat(ie),ue.push(this.buildCanonicalizedResource(ce,z.parameters)),ue.join(`
|
|
|
`)},ke.computeSignature=function(de,ce){return le.createHmac("sha1",de).update(new Ce(ce,"utf8")).digest("base64")},ke.authorization=function(de,ce,z){return"OSS "+de+":"+this.computeSignature(ce,z)},ke._signatureForURL=function(de,ce,z,ee){var oe={},ie={};if(ce.process&&(ie["x-oss-process"]=ce.process),ce.response&&(0,ge.default)(ce.response).forEach(function(we){var Pe="response-"+we.toLowerCase();ie[Pe]=ce.response[we]}),(0,ge.default)(ce).forEach(function(we){var Pe=we.toLowerCase(),Ae=ce[we];Pe.indexOf("x-oss-")===0?oe[Pe]=Ae:Pe.indexOf("content-md5")===0||Pe.indexOf("content-type")===0?oe[we]=Ae:Pe!=="expires"&&Pe!=="response"&&Pe!=="process"&&Pe!=="method"&&(ie[Pe]=Ae)}),Object.prototype.hasOwnProperty.call(ce,"security-token")&&(ie["security-token"]=ce["security-token"]),Object.prototype.hasOwnProperty.call(ce,"callback")){var se={callbackUrl:encodeURI(ce.callback.url),callbackBody:ce.callback.body};if(ce.callback.host&&(se.callbackHost=ce.callback.host),ce.callback.contentType&&(se.callbackBodyType=ce.callback.contentType),ie.callback=new Ce((0,ye.default)(se)).toString("base64"),ce.callback.customValue){var ue={};(0,ge.default)(ce.callback.customValue).forEach(function(we){ue["x:"+we]=ce.callback.customValue[we]}),ie["callback-var"]=new Ce((0,ye.default)(ue)).toString("base64")}}var Se=this.buildCanonicalString(ce.method,z,{headers:oe,parameters:ie},ee.toString());return{Signature:this.computeSignature(de,Se),subResource:ie}}}).call(this,me("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/regenerator"),Le=function(le){return le&&le.__esModule?le:{default:le}}(Ce),he=me("co"),ye=me("co-priority-queue"),xe=me("any-promise"),ge=ke;ge._thunkPool=function(le,ve){function de(ie,se){++ee===ie.length&&se(oe)}function ce(ie,se){function ue(){var ze;return Le.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:ze=void 0;case 1:if(z.isCancel()){Ze.next=9;break}return Ze.next=4,Pe.next();case 4:return ze=Ze.sent,Ze.next=7,ze();case 7:Ze.next=1;break;case 9:Ae+=1,Ae===ie&&(Pe.fns=[],Pe.buffer=[],se(oe));case 11:case"end":return Ze.stop()}},we,this)}function Se(ze){console.error(ze.stack)}for(var we=Le.default.mark(ue),Pe=new ye,Ae=0,De=0;De<ie;De++)he(ue).catch(Se);return function(ze,Ze){return function(Xe){Pe.push(Le.default.mark(function Ge(){return Le.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return ft.prev=0,ft.t0=Xe,ft.next=4,ze;case 4:ft.t1=ft.sent,(0,ft.t0)(null,ft.t1),ft.next=11;break;case 8:ft.prev=8,ft.t2=ft.catch(0),Xe(ft.t2);case 11:case"end":return ft.stop()}},Ge,this,[[0,8]])}),Ze)}}}var z=this,ee=0,oe=[];return new xe(function(ie){function se(Ae){return Le.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,we(le[Ae]);case 2:de(le,ie);case 3:case"end":return De.stop()}},Se,this)}function ue(Ae){oe.push(Ae),de(le,ie)}for(var Se=Le.default.mark(se),we=new ce(ve,ie),Pe=0;Pe<le.length;Pe++)he(se(Pe)).catch(ue)})},ge.cancel=function(){this.options.cancelFlag=!0},ge.isCancel=function(){return this.options.cancelFlag},ge.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(me,Be,ke){"use strict";ke._isIP=function(Ce){var Le=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,he=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return Le.test(Ce)||he.test(Ce)}},{}],12:[function(me,Be,ke){function Ce(){}Be.exports=Ce,Be.exports.HttpsAgent=Ce},{}],13:[function(me,Be,ke){Be.exports=me("./register")().Promise},{"./register":15}],14:[function(me,Be,ke){"use strict";var Ce=null;Be.exports=function(Le,he){return function(ye,xe){ye=ye||null,xe=xe||{};var ge=xe.global!==!1;if(Ce===null&&ge&&(Ce=Le["@@any-promise/REGISTRATION"]||null),Ce!==null&&ye!==null&&Ce.implementation!==ye)throw new Error('any-promise already defined as "'+Ce.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return Ce===null&&(Ce=ye!==null&&xe.Promise!==void 0?{Promise:xe.Promise,implementation:ye}:he(ye),ge&&(Le["@@any-promise/REGISTRATION"]=Ce)),Ce}}},{}],15:[function(me,Be,ke){"use strict";function Ce(){if(window.Promise===void 0)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}Be.exports=me("./loader")(window,Ce)},{"./loader":14}],16:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(me,Be,ke){Be.exports={default:me("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(me,Be,ke){"use strict";ke.__esModule=!0,ke.default=function(Ce,Le){if(!(Ce instanceof Le))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(me,Be,ke){"use strict";ke.__esModule=!0;var Ce=me("../core-js/object/define-property"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);ke.default=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),(0,Le.default)(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}()},{"../core-js/object/define-property":20}],32:[function(me,Be,ke){"use strict";function Ce(le){return le&&le.__esModule?le:{default:le}}ke.__esModule=!0;var Le=me("../core-js/symbol/iterator"),he=Ce(Le),ye=me("../core-js/symbol"),xe=Ce(ye),ge=typeof xe.default=="function"&&typeof he.default=="symbol"?function(le){return typeof le}:function(le){return le&&typeof xe.default=="function"&&le.constructor===xe.default&&le!==xe.default.prototype?"symbol":typeof le};ke.default=typeof xe.default=="function"&&ge(he.default)==="symbol"?function(le){return le===void 0?"undefined":ge(le)}:function(le){return le&&typeof xe.default=="function"&&le.constructor===xe.default&&le!==xe.default.prototype?"symbol":le===void 0?"undefined":ge(le)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(me,Be,ke){Be.exports=me("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(me,Be,ke){"use strict";function Ce(ie){var se=ie.length;if(se%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ue=ie.indexOf("=");return ue===-1&&(ue=se),[ue,ue===se?0:4-ue%4]}function Le(ie){var se=Ce(ie),ue=se[0],Se=se[1];return 3*(ue+Se)/4-Se}function he(ie,se,ue){return 3*(se+ue)/4-ue}function ye(ie){for(var se,ue=Ce(ie),Se=ue[0],we=ue[1],Pe=new ce(he(ie,Se,we)),Ae=0,De=we>0?Se-4:Se,ze=0;ze<De;ze+=4)se=de[ie.charCodeAt(ze)]<<18|de[ie.charCodeAt(ze+1)]<<12|de[ie.charCodeAt(ze+2)]<<6|de[ie.charCodeAt(ze+3)],Pe[Ae++]=se>>16&255,Pe[Ae++]=se>>8&255,Pe[Ae++]=255&se;return we===2&&(se=de[ie.charCodeAt(ze)]<<2|de[ie.charCodeAt(ze+1)]>>4,Pe[Ae++]=255&se),we===1&&(se=de[ie.charCodeAt(ze)]<<10|de[ie.charCodeAt(ze+1)]<<4|de[ie.charCodeAt(ze+2)]>>2,Pe[Ae++]=se>>8&255,Pe[Ae++]=255&se),Pe}function xe(ie){return ve[ie>>18&63]+ve[ie>>12&63]+ve[ie>>6&63]+ve[63&ie]}function ge(ie,se,ue){for(var Se,we=[],Pe=se;Pe<ue;Pe+=3)Se=(ie[Pe]<<16&16711680)+(ie[Pe+1]<<8&65280)+(255&ie[Pe+2]),we.push(xe(Se));return we.join("")}function le(ie){for(var se,ue=ie.length,Se=ue%3,we=[],Pe=0,Ae=ue-Se;Pe<Ae;Pe+=16383)we.push(ge(ie,Pe,Pe+16383>Ae?Ae:Pe+16383));return Se===1?(se=ie[ue-1],we.push(ve[se>>2]+ve[se<<4&63]+"==")):Se===2&&(se=(ie[ue-2]<<8)+ie[ue-1],we.push(ve[se>>10]+ve[se>>4&63]+ve[se<<2&63]+"=")),we.join("")}ke.byteLength=Le,ke.toByteArray=ye,ke.fromByteArray=le;for(var ve=[],de=[],ce=typeof Uint8Array!="undefined"?Uint8Array:Array,z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ee=0,oe=z.length;ee<oe;++ee)ve[ee]=z[ee],de[z.charCodeAt(ee)]=ee;de[45]=62,de[95]=63},{}],35:[function(me,Be,ke){(function(Ce,Le,he){Be!==void 0&&Be.exports?Be.exports=he():typeof Me=="function"&&Me.amd?Me("bowser",he):Ce.bowser=he()})(this,0,function(){function Ce(de){function ce(tt){var ut=de.match(tt);return ut&&ut.length>1&&ut[1]||""}function z(tt){var ut=de.match(tt);return ut&&ut.length>1&&ut[2]||""}var ee,oe=ce(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(de),se=!ie&&/android/i.test(de),ue=/nexus\s*[0-6]\s*/i.test(de),Se=!ue&&/nexus\s*[0-9]+/i.test(de),we=/CrOS/.test(de),Pe=/silk/i.test(de),Ae=/sailfish/i.test(de),De=/tizen/i.test(de),ze=/(web|hpw)os/i.test(de),Ze=/windows phone/i.test(de),Xe=(/SamsungBrowser/i.test(de),!Ze&&/windows/i.test(de)),Ge=!oe&&!Pe&&/macintosh/i.test(de),ft=!se&&!Ae&&!De&&!ze&&/linux/i.test(de),at=z(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),Ct=ce(/version\/(\d+(\.\d+)?)/i),et=/tablet/i.test(de)&&!/tablet pc/i.test(de),yt=!et&&/[^-]mobi/i.test(de),st=/xbox/i.test(de);/opera/i.test(de)?ee={name:"Opera",opera:le,version:Ct||ce(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(de)?ee={name:"Opera",opera:le,version:ce(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||Ct}:/SamsungBrowser/i.test(de)?ee={name:"Samsung Internet for Android",samsungBrowser:le,version:Ct||ce(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(de)?ee={name:"Opera Coast",coast:le,version:Ct||ce(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(de)?ee={name:"Yandex Browser",yandexbrowser:le,version:Ct||ce(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(de)?ee={name:"UC Browser",ucbrowser:le,version:ce(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(de)?ee={name:"Maxthon",maxthon:le,version:ce(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(de)?ee={name:"Epiphany",epiphany:le,version:ce(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(de)?ee={name:"Puffin",puffin:le,version:ce(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(de)?ee={name:"Sleipnir",sleipnir:le,version:ce(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(de)?ee={name:"K-Meleon",kMeleon:le,version:ce(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ze?(ee={name:"Windows Phone",osname:"Windows Phone",windowsphone:le},at?(ee.msedge=le,ee.version=at):(ee.msie=le,ee.version=ce(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(de)?ee={name:"Internet Explorer",msie:le,version:ce(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:we?ee={name:"Chrome",osname:"Chrome OS",chromeos:le,chromeBook:le,chrome:le,version:ce(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(de)?ee={name:"Microsoft Edge",msedge:le,version:at}:/vivaldi/i.test(de)?ee={name:"Vivaldi",vivaldi:le,version:ce(/vivaldi\/(\d+(\.\d+)?)/i)||Ct}:Ae?ee={name:"Sailfish",osname:"Sailfish OS",sailfish:le,version:ce(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(de)?ee={name:"SeaMonkey",seamonkey:le,version:ce(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(de)?(ee={name:"Firefox",firefox:le,version:ce(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(de)&&(ee.firefoxos=le,ee.osname="Firefox OS")):Pe?ee={name:"Amazon Silk",silk:le,version:ce(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(de)?ee={name:"PhantomJS",phantom:le,version:ce(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(de)?ee={name:"SlimerJS",slimer:le,version:ce(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(de)||/rim\stablet/i.test(de)?ee={name:"BlackBerry",osname:"BlackBerry OS",blackberry:le,version:Ct||ce(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:ze?(ee={name:"WebOS",osname:"WebOS",webos:le,version:Ct||ce(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(de)&&(ee.touchpad=le)):/bada/i.test(de)?ee={name:"Bada",osname:"Bada",bada:le,version:ce(/dolfin\/(\d+(\.\d+)?)/i)}:De?ee={name:"Tizen",osname:"Tizen",tizen:le,version:ce(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||Ct}:/qupzilla/i.test(de)?ee={name:"QupZilla",qupzilla:le,version:ce(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||Ct}:/chromium/i.test(de)?ee={name:"Chromium",chromium:le,version:ce(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||Ct}:/chrome|crios|crmo/i.test(de)?ee={name:"Chrome",chrome:le,version:ce(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:se?ee={name:"Android",version:Ct}:/safari|applewebkit/i.test(de)?(ee={name:"Safari",safari:le},Ct&&(ee.version=Ct)):oe?(ee={name:oe=="iphone"?"iPhone":oe=="ipad"?"iPad":"iPod"},Ct&&(ee.version=Ct)):ee=/googlebot/i.test(de)?{name:"Googlebot",googlebot:le,version:ce(/googlebot\/(\d+(\.\d+))/i)||Ct}:{name:ce(/^(.*)\/(.*) /),version:z(/^(.*)\/(.*) /)},!ee.msedge&&/(apple)?webkit/i.test(de)?(/(apple)?webkit\/537\.36/i.test(de)?(ee.name=ee.name||"Blink",ee.blink=le):(ee.name=ee.name||"Webkit",ee.webkit=le),!ee.version&&Ct&&(ee.version=Ct)):!ee.opera&&/gecko\//i.test(de)&&(ee.name=ee.name||"Gecko",ee.gecko=le,ee.version=ee.version||ce(/gecko\/(\d+(\.\d+)?)/i)),ee.windowsphone||!se&&!ee.silk?!ee.windowsphone&&oe?(ee[oe]=le,ee.ios=le,ee.osname="iOS"):Ge?(ee.mac=le,ee.osname="macOS"):st?(ee.xbox=le,ee.osname="Xbox"):Xe?(ee.windows=le,ee.osname="Windows"):ft&&(ee.linux=le,ee.osname="Linux"):(ee.android=le,ee.osname="Android");var zt="";ee.windows?zt=function(tt){switch(tt){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(ce(/Windows ((NT|XP)( \d\d?.\d)?)/i)):ee.windowsphone?zt=ce(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):ee.mac?(zt=ce(/Mac OS X (\d+([_\.\s]\d+)*)/i),zt=zt.replace(/[_\s]/g,".")):oe?(zt=ce(/os (\d+([_\s]\d+)*) like mac os x/i),zt=zt.replace(/[_\s]/g,".")):se?zt=ce(/android[ \/-](\d+(\.\d+)*)/i):ee.webos?zt=ce(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):ee.blackberry?zt=ce(/rim\stablet\sos\s(\d+(\.\d+)*)/i):ee.bada?zt=ce(/bada\/(\d+(\.\d+)*)/i):ee.tizen&&(zt=ce(/tizen[\/\s](\d+(\.\d+)*)/i)),zt&&(ee.osversion=zt);var lt=!ee.windows&&zt.split(".")[0];return et||Se||oe=="ipad"||se&&(lt==3||lt>=4&&!yt)||ee.silk?ee.tablet=le:(yt||oe=="iphone"||oe=="ipod"||se||ue||ee.blackberry||ee.webos||ee.bada)&&(ee.mobile=le),ee.msedge||ee.msie&&ee.version>=10||ee.yandexbrowser&&ee.version>=15||ee.vivaldi&&ee.version>=1||ee.chrome&&ee.version>=20||ee.samsungBrowser&&ee.version>=4||ee.firefox&&ee.version>=20||ee.safari&&ee.version>=6||ee.opera&&ee.version>=10||ee.ios&&ee.osversion&&ee.osversion.split(".")[0]>=6||ee.blackberry&&ee.version>=10.1||ee.chromium&&ee.version>=20?ee.a=le:ee.msie&&ee.version<10||ee.chrome&&ee.version<20||ee.firefox&&ee.version<20||ee.safari&&ee.version<6||ee.opera&&ee.version<10||ee.ios&&ee.osversion&&ee.osversion.split(".")[0]<6||ee.chromium&&ee.version<20?ee.c=le:ee.x=le,ee}function Le(de){return de.split(".").length}function he(de,ce){var z,ee=[];if(Array.prototype.map)return Array.prototype.map.call(de,ce);for(z=0;z<de.length;z++)ee.push(ce(de[z]));return ee}function ye(de){for(var ce=Math.max(Le(de[0]),Le(de[1])),z=he(de,function(ee){var oe=ce-Le(ee);return ee+=new Array(oe+1).join(".0"),he(ee.split("."),function(ie){return new Array(20-ie.length).join("0")+ie}).reverse()});--ce>=0;){if(z[0][ce]>z[1][ce])return 1;if(z[0][ce]!==z[1][ce])return-1;if(ce===0)return 0}}function xe(de,ce,z){var ee=ve;typeof ce=="string"&&(z=ce,ce=void 0),ce===void 0&&(ce=!1),z&&(ee=Ce(z));var oe=""+ee.version;for(var ie in de)if(de.hasOwnProperty(ie)&&ee[ie]){if(typeof de[ie]!="string")throw new Error("Browser version in the minVersion map should be a string: "+ie+": "+String(de));return ye([oe,de[ie]])<0}return ce}function ge(de,ce,z){return!xe(de,ce,z)}var le=!0,ve=Ce(typeof navigator!="undefined"&&navigator.userAgent||"");return ve.test=function(de){for(var ce=0;ce<de.length;++ce){var z=de[ce];if(typeof z=="string"&&z in ve)return!0}return!1},ve.isUnsupportedBrowser=xe,ve.compareVersions=ye,ve.check=ge,ve._detect=Ce,ve.detect=Ce,ve})},{}],36:[function(me,Be,ke){},{}],37:[function(me,Be,ke){function Ce(ve){if(ve&&!ge(ve))throw new Error("Unknown encoding: "+ve)}function Le(ve){return ve.toString(this.encoding)}function he(ve){this.charReceived=ve.length%2,this.charLength=this.charReceived?2:0}function ye(ve){this.charReceived=ve.length%3,this.charLength=this.charReceived?3:0}var xe=me("buffer").Buffer,ge=xe.isEncoding||function(ve){switch(ve&&ve.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},le=ke.StringDecoder=function(ve){switch(this.encoding=(ve||"utf8").toLowerCase().replace(/[-_]/,""),Ce(ve),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=he;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=ye;break;default:return void(this.write=Le)}this.charBuffer=new xe(6),this.charReceived=0,this.charLength=0};le.prototype.write=function(ve){for(var de="";this.charLength;){var ce=ve.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:ve.length;if(ve.copy(this.charBuffer,this.charReceived,0,ce),this.charReceived+=ce,this.charReceived<this.charLength)return"";ve=ve.slice(ce,ve.length),de=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var ee=de.charCodeAt(de.length-1);if(!(ee>=55296&&ee<=56319)){if(this.charReceived=this.charLength=0,ve.length===0)return de;break}this.charLength+=this.surrogateSize,de=""}this.detectIncompleteChar(ve);var z=ve.length;this.charLength&&(ve.copy(this.charBuffer,0,ve.length-this.charReceived,z),z-=this.charReceived),de+=ve.toString(this.encoding,0,z);var z=de.length-1,ee=de.charCodeAt(z);if(ee>=55296&&ee<=56319){var oe=this.surrogateSize;return this.charLength+=oe,this.charReceived+=oe,this.charBuffer.copy(this.charBuffer,oe,0,oe),ve.copy(this.charBuffer,0,0,oe),de.substring(0,z)}return de},le.prototype.detectIncompleteChar=function(ve){for(var de=ve.length>=3?3:ve.length;de>0;de--){var ce=ve[ve.length-de];if(de==1&&ce>>5==6){this.charLength=2;break}if(de<=2&&ce>>4==14){this.charLength=3;break}if(de<=3&&ce>>3==30){this.charLength=4;break}}this.charReceived=de},le.prototype.end=function(ve){var de="";if(ve&&ve.length&&(de=this.write(ve)),this.charReceived){var ce=this.charReceived,z=this.charBuffer,ee=this.encoding;de+=z.slice(0,ce).toString(ee)}return de}},{buffer:38}],38:[function(me,Be,ke){(function(Ce){"use strict";function Le(){return ye.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function he(He,Ie){if(Le()<Ie)throw new RangeError("Invalid typed array length");return ye.TYPED_ARRAY_SUPPORT?(He=new Uint8Array(Ie),He.__proto__=ye.prototype):(He===null&&(He=new ye(Ie)),He.length=Ie),He}function ye(He,Ie,We){if(!(ye.TYPED_ARRAY_SUPPORT||this instanceof ye))return new ye(He,Ie,We);if(typeof He=="number"){if(typeof Ie=="string")throw new Error("If encoding is specified then the first argument must be a string");return ve(this,He)}return xe(this,He,Ie,We)}function xe(He,Ie,We,Oe){if(typeof Ie=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Ie instanceof ArrayBuffer?z(He,Ie,We,Oe):typeof Ie=="string"?de(He,Ie,We):ee(He,Ie)}function ge(He){if(typeof He!="number")throw new TypeError('"size" argument must be a number');if(He<0)throw new RangeError('"size" argument must not be negative')}function le(He,Ie,We,Oe){return ge(Ie),Ie<=0?he(He,Ie):We!==void 0?typeof Oe=="string"?he(He,Ie).fill(We,Oe):he(He,Ie).fill(We):he(He,Ie)}function ve(He,Ie){if(ge(Ie),He=he(He,Ie<0?0:0|oe(Ie)),!ye.TYPED_ARRAY_SUPPORT)for(var We=0;We<Ie;++We)He[We]=0;return He}function de(He,Ie,We){if(typeof We=="string"&&We!==""||(We="utf8"),!ye.isEncoding(We))throw new TypeError('"encoding" must be a valid string encoding');var Oe=0|se(Ie,We);He=he(He,Oe);var be=He.write(Ie,We);return be!==Oe&&(He=He.slice(0,be)),He}function ce(He,Ie){var We=Ie.length<0?0:0|oe(Ie.length);He=he(He,We);for(var Oe=0;Oe<We;Oe+=1)He[Oe]=255&Ie[Oe];return He}function z(He,Ie,We,Oe){if(Ie.byteLength,We<0||Ie.byteLength<We)throw new RangeError("'offset' is out of bounds");if(Ie.byteLength<We+(Oe||0))throw new RangeError("'length' is out of bounds");return Ie=We===void 0&&Oe===void 0?new Uint8Array(Ie):Oe===void 0?new Uint8Array(Ie,We):new Uint8Array(Ie,We,Oe),ye.TYPED_ARRAY_SUPPORT?(He=Ie,He.__proto__=ye.prototype):He=ce(He,Ie),He}function ee(He,Ie){if(ye.isBuffer(Ie)){var We=0|oe(Ie.length);return He=he(He,We),He.length===0||Ie.copy(He,0,0,We),He}if(Ie){if(typeof ArrayBuffer!="undefined"&&Ie.buffer instanceof ArrayBuffer||"length"in Ie)return typeof Ie.length!="number"||kt(Ie.length)?he(He,0):ce(He,Ie);if(Ie.type==="Buffer"&&xt(Ie.data))return ce(He,Ie.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(He){if(He>=Le())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Le().toString(16)+" bytes");return 0|He}function ie(He){return+He!=He&&(He=0),ye.alloc(+He)}function se(He,Ie){if(ye.isBuffer(He))return He.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(He)||He instanceof ArrayBuffer))return He.byteLength;typeof He!="string"&&(He=""+He);var We=He.length;if(We===0)return 0;for(var Oe=!1;;)switch(Ie){case"ascii":case"latin1":case"binary":return We;case"utf8":case"utf-8":case void 0:return bn(He).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*We;case"hex":return We>>>1;case"base64":return Jt(He).length;default:if(Oe)return bn(He).length;Ie=(""+Ie).toLowerCase(),Oe=!0}}function ue(He,Ie,We){var Oe=!1;if((Ie===void 0||Ie<0)&&(Ie=0),Ie>this.length||((We===void 0||We>this.length)&&(We=this.length),We<=0)||(We>>>=0,Ie>>>=0,We<=Ie))return"";for(He||(He="utf8");;)switch(He){case"hex":return st(this,Ie,We);case"utf8":case"utf-8":return at(this,Ie,We);case"ascii":return et(this,Ie,We);case"latin1":case"binary":return yt(this,Ie,We);case"base64":return ft(this,Ie,We);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zt(this,Ie,We);default:if(Oe)throw new TypeError("Unknown encoding: "+He);He=(He+"").toLowerCase(),Oe=!0}}function Se(He,Ie,We){var Oe=He[Ie];He[Ie]=He[We],He[We]=Oe}function we(He,Ie,We,Oe,be){if(He.length===0)return-1;if(typeof We=="string"?(Oe=We,We=0):We>2147483647?We=2147483647:We<-2147483648&&(We=-2147483648),We=+We,isNaN(We)&&(We=be?0:He.length-1),We<0&&(We=He.length+We),We>=He.length){if(be)return-1;We=He.length-1}else if(We<0){if(!be)return-1;We=0}if(typeof Ie=="string"&&(Ie=ye.from(Ie,Oe)),ye.isBuffer(Ie))return Ie.length===0?-1:Pe(He,Ie,We,Oe,be);if(typeof Ie=="number")return Ie&=255,ye.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?be?Uint8Array.prototype.indexOf.call(He,Ie,We):Uint8Array.prototype.lastIndexOf.call(He,Ie,We):Pe(He,[Ie],We,Oe,be);throw new TypeError("val must be string, number or Buffer")}function Pe(He,Ie,We,Oe,be){function Ne(gn,Hn){return $e===1?gn[Hn]:gn.readUInt16BE(Hn*$e)}var $e=1,dt=He.length,Je=Ie.length;if(Oe!==void 0&&((Oe=String(Oe).toLowerCase())==="ucs2"||Oe==="ucs-2"||Oe==="utf16le"||Oe==="utf-16le")){if(He.length<2||Ie.length<2)return-1;$e=2,dt/=2,Je/=2,We/=2}var At;if(be){var tn=-1;for(At=We;At<dt;At++)if(Ne(He,At)===Ne(Ie,tn===-1?0:At-tn)){if(tn===-1&&(tn=At),At-tn+1===Je)return tn*$e}else tn!==-1&&(At-=At-tn),tn=-1}else for(We+Je>dt&&(We=dt-Je),At=We;At>=0;At--){for(var pn=!0,ln=0;ln<Je;ln++)if(Ne(He,At+ln)!==Ne(Ie,ln)){pn=!1;break}if(pn)return At}return-1}function Ae(He,Ie,We,Oe){We=Number(We)||0;var be=He.length-We;Oe?(Oe=Number(Oe))>be&&(Oe=be):Oe=be;var Ne=Ie.length;if(Ne%2!=0)throw new TypeError("Invalid hex string");Oe>Ne/2&&(Oe=Ne/2);for(var $e=0;$e<Oe;++$e){var dt=parseInt(Ie.substr(2*$e,2),16);if(isNaN(dt))return $e;He[We+$e]=dt}return $e}function De(He,Ie,We,Oe){return Yt(bn(Ie,He.length-We),He,We,Oe)}function ze(He,Ie,We,Oe){return Yt(Wt(Ie),He,We,Oe)}function Ze(He,Ie,We,Oe){return ze(He,Ie,We,Oe)}function Xe(He,Ie,We,Oe){return Yt(Jt(Ie),He,We,Oe)}function Ge(He,Ie,We,Oe){return Yt(Kt(Ie,He.length-We),He,We,Oe)}function ft(He,Ie,We){return Ie===0&&We===He.length?pt.fromByteArray(He):pt.fromByteArray(He.slice(Ie,We))}function at(He,Ie,We){We=Math.min(He.length,We);for(var Oe=[],be=Ie;be<We;){var Ne=He[be],$e=null,dt=Ne>239?4:Ne>223?3:Ne>191?2:1;if(be+dt<=We){var Je,At,tn,pn;switch(dt){case 1:Ne<128&&($e=Ne);break;case 2:Je=He[be+1],(192&Je)==128&&(pn=(31&Ne)<<6|63&Je)>127&&($e=pn);break;case 3:Je=He[be+1],At=He[be+2],(192&Je)==128&&(192&At)==128&&(pn=(15&Ne)<<12|(63&Je)<<6|63&At)>2047&&(pn<55296||pn>57343)&&($e=pn);break;case 4:Je=He[be+1],At=He[be+2],tn=He[be+3],(192&Je)==128&&(192&At)==128&&(192&tn)==128&&(pn=(15&Ne)<<18|(63&Je)<<12|(63&At)<<6|63&tn)>65535&&pn<1114112&&($e=pn)}}$e===null?($e=65533,dt=1):$e>65535&&($e-=65536,Oe.push($e>>>10&1023|55296),$e=56320|1023&$e),Oe.push($e),be+=dt}return Ct(Oe)}function Ct(He){var Ie=He.length;if(Ie<=vt)return String.fromCharCode.apply(String,He);for(var We="",Oe=0;Oe<Ie;)We+=String.fromCharCode.apply(String,He.slice(Oe,Oe+=vt));return We}function et(He,Ie,We){var Oe="";We=Math.min(He.length,We);for(var be=Ie;be<We;++be)Oe+=String.fromCharCode(127&He[be]);return Oe}function yt(He,Ie,We){var Oe="";We=Math.min(He.length,We);for(var be=Ie;be<We;++be)Oe+=String.fromCharCode(He[be]);return Oe}function st(He,Ie,We){var Oe=He.length;(!Ie||Ie<0)&&(Ie=0),(!We||We<0||We>Oe)&&(We=Oe);for(var be="",Ne=Ie;Ne<We;++Ne)be+=Qt(He[Ne]);return be}function zt(He,Ie,We){for(var Oe=He.slice(Ie,We),be="",Ne=0;Ne<Oe.length;Ne+=2)be+=String.fromCharCode(Oe[Ne]+256*Oe[Ne+1]);return be}function lt(He,Ie,We){if(He%1!=0||He<0)throw new RangeError("offset is not uint");if(He+Ie>We)throw new RangeError("Trying to access beyond buffer length")}function tt(He,Ie,We,Oe,be,Ne){if(!ye.isBuffer(He))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ie>be||Ie<Ne)throw new RangeError('"value" argument is out of bounds');if(We+Oe>He.length)throw new RangeError("Index out of range")}function ut(He,Ie,We,Oe){Ie<0&&(Ie=65535+Ie+1);for(var be=0,Ne=Math.min(He.length-We,2);be<Ne;++be)He[We+be]=(Ie&255<<8*(Oe?be:1-be))>>>8*(Oe?be:1-be)}function mt(He,Ie,We,Oe){Ie<0&&(Ie=4294967295+Ie+1);for(var be=0,Ne=Math.min(He.length-We,4);be<Ne;++be)He[We+be]=Ie>>>8*(Oe?be:3-be)&255}function Pt(He,Ie,We,Oe,be,Ne){if(We+Oe>He.length)throw new RangeError("Index out of range");if(We<0)throw new RangeError("Index out of range")}function gt(He,Ie,We,Oe,be){return be||Pt(He,Ie,We,4,34028234663852886e22,-34028234663852886e22),Bt.write(He,Ie,We,Oe,23,4),We+4}function Ft(He,Ie,We,Oe,be){return be||Pt(He,Ie,We,8,17976931348623157e292,-17976931348623157e292),Bt.write(He,Ie,We,Oe,52,8),We+8}function Ht(He){if(He=hn(He).replace(nt,""),He.length<2)return"";for(;He.length%4!=0;)He+="=";return He}function hn(He){return He.trim?He.trim():He.replace(/^\s+|\s+$/g,"")}function Qt(He){return He<16?"0"+He.toString(16):He.toString(16)}function bn(He,Ie){Ie=Ie||1/0;for(var We,Oe=He.length,be=null,Ne=[],$e=0;$e<Oe;++$e){if((We=He.charCodeAt($e))>55295&&We<57344){if(!be){if(We>56319){(Ie-=3)>-1&&Ne.push(239,191,189);continue}if($e+1===Oe){(Ie-=3)>-1&&Ne.push(239,191,189);continue}be=We;continue}if(We<56320){(Ie-=3)>-1&&Ne.push(239,191,189),be=We;continue}We=65536+(be-55296<<10|We-56320)}else be&&(Ie-=3)>-1&&Ne.push(239,191,189);if(be=null,We<128){if((Ie-=1)<0)break;Ne.push(We)}else if(We<2048){if((Ie-=2)<0)break;Ne.push(We>>6|192,63&We|128)}else if(We<65536){if((Ie-=3)<0)break;Ne.push(We>>12|224,We>>6&63|128,63&We|128)}else{if(!(We<1114112))throw new Error("Invalid code point");if((Ie-=4)<0)break;Ne.push(We>>18|240,We>>12&63|128,We>>6&63|128,63&We|128)}}return Ne}function Wt(He){for(var Ie=[],We=0;We<He.length;++We)Ie.push(255&He.charCodeAt(We));return Ie}function Kt(He,Ie){for(var We,Oe,be,Ne=[],$e=0;$e<He.length&&!((Ie-=2)<0);++$e)We=He.charCodeAt($e),Oe=We>>8,be=We%256,Ne.push(be),Ne.push(Oe);return Ne}function Jt(He){return pt.toByteArray(Ht(He))}function Yt(He,Ie,We,Oe){for(var be=0;be<Oe&&!(be+We>=Ie.length||be>=He.length);++be)Ie[be+We]=He[be];return be}function kt(He){return He!==He}var pt=me("base64-js"),Bt=me("ieee754"),xt=me("isarray");ke.Buffer=ye,ke.SlowBuffer=ie,ke.INSPECT_MAX_BYTES=50,ye.TYPED_ARRAY_SUPPORT=Ce.TYPED_ARRAY_SUPPORT!==void 0?Ce.TYPED_ARRAY_SUPPORT:function(){try{var He=new Uint8Array(1);return He.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},He.foo()===42&&typeof He.subarray=="function"&&He.subarray(1,1).byteLength===0}catch(Ie){return!1}}(),ke.kMaxLength=Le(),ye.poolSize=8192,ye._augment=function(He){return He.__proto__=ye.prototype,He},ye.from=function(He,Ie,We){return xe(null,He,Ie,We)},ye.TYPED_ARRAY_SUPPORT&&(ye.prototype.__proto__=Uint8Array.prototype,ye.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&ye[Symbol.species]===ye&&Object.defineProperty(ye,Symbol.species,{value:null,configurable:!0})),ye.alloc=function(He,Ie,We){return le(null,He,Ie,We)},ye.allocUnsafe=function(He){return ve(null,He)},ye.allocUnsafeSlow=function(He){return ve(null,He)},ye.isBuffer=function(He){return!(He==null||!He._isBuffer)},ye.compare=function(He,Ie){if(!ye.isBuffer(He)||!ye.isBuffer(Ie))throw new TypeError("Arguments must be Buffers");if(He===Ie)return 0;for(var We=He.length,Oe=Ie.length,be=0,Ne=Math.min(We,Oe);be<Ne;++be)if(He[be]!==Ie[be]){We=He[be],Oe=Ie[be];break}return We<Oe?-1:Oe<We?1:0},ye.isEncoding=function(He){switch(String(He).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ye.concat=function(He,Ie){if(!xt(He))throw new TypeError('"list" argument must be an Array of Buffers');if(He.length===0)return ye.alloc(0);var We;if(Ie===void 0)for(Ie=0,We=0;We<He.length;++We)Ie+=He[We].length;var Oe=ye.allocUnsafe(Ie),be=0;for(We=0;We<He.length;++We){var Ne=He[We];if(!ye.isBuffer(Ne))throw new TypeError('"list" argument must be an Array of Buffers');Ne.copy(Oe,be),be+=Ne.length}return Oe},ye.byteLength=se,ye.prototype._isBuffer=!0,ye.prototype.swap16=function(){var He=this.length;if(He%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ie=0;Ie<He;Ie+=2)Se(this,Ie,Ie+1);return this},ye.prototype.swap32=function(){var He=this.length;if(He%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ie=0;Ie<He;Ie+=4)Se(this,Ie,Ie+3),Se(this,Ie+1,Ie+2);return this},ye.prototype.swap64=function(){var He=this.length;if(He%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ie=0;Ie<He;Ie+=8)Se(this,Ie,Ie+7),Se(this,Ie+1,Ie+6),Se(this,Ie+2,Ie+5),Se(this,Ie+3,Ie+4);return this},ye.prototype.toString=function(){var He=0|this.length;return He===0?"":arguments.length===0?at(this,0,He):ue.apply(this,arguments)},ye.prototype.equals=function(He){if(!ye.isBuffer(He))throw new TypeError("Argument must be a Buffer");return this===He||ye.compare(this,He)===0},ye.prototype.inspect=function(){var He="",Ie=ke.INSPECT_MAX_BYTES;return this.length>0&&(He=this.toString("hex",0,Ie).match(/.{2}/g).join(" "),this.length>Ie&&(He+=" ... ")),"<Buffer "+He+">"},ye.prototype.compare=function(He,Ie,We,Oe,be){if(!ye.isBuffer(He))throw new TypeError("Argument must be a Buffer");if(Ie===void 0&&(Ie=0),We===void 0&&(We=He?He.length:0),Oe===void 0&&(Oe=0),be===void 0&&(be=this.length),Ie<0||We>He.length||Oe<0||be>this.length)throw new RangeError("out of range index");if(Oe>=be&&Ie>=We)return 0;if(Oe>=be)return-1;if(Ie>=We)return 1;if(Ie>>>=0,We>>>=0,Oe>>>=0,be>>>=0,this===He)return 0;for(var Ne=be-Oe,$e=We-Ie,dt=Math.min(Ne,$e),Je=this.slice(Oe,be),At=He.slice(Ie,We),tn=0;tn<dt;++tn)if(Je[tn]!==At[tn]){Ne=Je[tn],$e=At[tn];break}return Ne<$e?-1:$e<Ne?1:0},ye.prototype.includes=function(He,Ie,We){return this.indexOf(He,Ie,We)!==-1},ye.prototype.indexOf=function(He,Ie,We){return we(this,He,Ie,We,!0)},ye.prototype.lastIndexOf=function(He,Ie,We){return we(this,He,Ie,We,!1)},ye.prototype.write=function(He,Ie,We,Oe){if(Ie===void 0)Oe="utf8",We=this.length,Ie=0;else if(We===void 0&&typeof Ie=="string")Oe=Ie,We=this.length,Ie=0;else{if(!isFinite(Ie))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Ie|=0,isFinite(We)?(We|=0,Oe===void 0&&(Oe="utf8")):(Oe=We,We=void 0)}var be=this.length-Ie;if((We===void 0||We>be)&&(We=be),He.length>0&&(We<0||Ie<0)||Ie>this.length)throw new RangeError("Attempt to write outside buffer bounds");Oe||(Oe="utf8");for(var Ne=!1;;)switch(Oe){case"hex":return Ae(this,He,Ie,We);case"utf8":case"utf-8":return De(this,He,Ie,We);case"ascii":return ze(this,He,Ie,We);case"latin1":case"binary":return Ze(this,He,Ie,We);case"base64":return Xe(this,He,Ie,We);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ge(this,He,Ie,We);default:if(Ne)throw new TypeError("Unknown encoding: "+Oe);Oe=(""+Oe).toLowerCase(),Ne=!0}},ye.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var vt=4096;ye.prototype.slice=function(He,Ie){var We=this.length;He=~~He,Ie=Ie===void 0?We:~~Ie,He<0?(He+=We)<0&&(He=0):He>We&&(He=We),Ie<0?(Ie+=We)<0&&(Ie=0):Ie>We&&(Ie=We),Ie<He&&(Ie=He);var Oe;if(ye.TYPED_ARRAY_SUPPORT)Oe=this.subarray(He,Ie),Oe.__proto__=ye.prototype;else{var be=Ie-He;Oe=new ye(be,void 0);for(var Ne=0;Ne<be;++Ne)Oe[Ne]=this[Ne+He]}return Oe},ye.prototype.readUIntLE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=this[He],be=1,Ne=0;++Ne<Ie&&(be*=256);)Oe+=this[He+Ne]*be;return Oe},ye.prototype.readUIntBE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=this[He+--Ie],be=1;Ie>0&&(be*=256);)Oe+=this[He+--Ie]*be;return Oe},ye.prototype.readUInt8=function(He,Ie){return Ie||lt(He,1,this.length),this[He]},ye.prototype.readUInt16LE=function(He,Ie){return Ie||lt(He,2,this.length),this[He]|this[He+1]<<8},ye.prototype.readUInt16BE=function(He,Ie){return Ie||lt(He,2,this.length),this[He]<<8|this[He+1]},ye.prototype.readUInt32LE=function(He,Ie){return Ie||lt(He,4,this.length),(this[He]|this[He+1]<<8|this[He+2]<<16)+16777216*this[He+3]},ye.prototype.readUInt32BE=function(He,Ie){return Ie||lt(He,4,this.length),16777216*this[He]+(this[He+1]<<16|this[He+2]<<8|this[He+3])},ye.prototype.readIntLE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=this[He],be=1,Ne=0;++Ne<Ie&&(be*=256);)Oe+=this[He+Ne]*be;return be*=128,Oe>=be&&(Oe-=Math.pow(2,8*Ie)),Oe},ye.prototype.readIntBE=function(He,Ie,We){He|=0,Ie|=0,We||lt(He,Ie,this.length);for(var Oe=Ie,be=1,Ne=this[He+--Oe];Oe>0&&(be*=256);)Ne+=this[He+--Oe]*be;return be*=128,Ne>=be&&(Ne-=Math.pow(2,8*Ie)),Ne},ye.prototype.readInt8=function(He,Ie){return Ie||lt(He,1,this.length),128&this[He]?-1*(255-this[He]+1):this[He]},ye.prototype.readInt16LE=function(He,Ie){Ie||lt(He,2,this.length);var We=this[He]|this[He+1]<<8;return 32768&We?4294901760|We:We},ye.prototype.readInt16BE=function(He,Ie){Ie||lt(He,2,this.length);var We=this[He+1]|this[He]<<8;return 32768&We?4294901760|We:We},ye.prototype.readInt32LE=function(He,Ie){return Ie||lt(He,4,this.length),this[He]|this[He+1]<<8|this[He+2]<<16|this[He+3]<<24},ye.prototype.readInt32BE=function(He,Ie){return Ie||lt(He,4,this.length),this[He]<<24|this[He+1]<<16|this[He+2]<<8|this[He+3]},ye.prototype.readFloatLE=function(He,Ie){return Ie||lt(He,4,this.length),Bt.read(this,He,!0,23,4)},ye.prototype.readFloatBE=function(He,Ie){return Ie||lt(He,4,this.length),Bt.read(this,He,!1,23,4)},ye.prototype.readDoubleLE=function(He,Ie){return Ie||lt(He,8,this.length),Bt.read(this,He,!0,52,8)},ye.prototype.readDoubleBE=function(He,Ie){return Ie||lt(He,8,this.length),Bt.read(this,He,!1,52,8)},ye.prototype.writeUIntLE=function(He,Ie,We,Oe){He=+He,Ie|=0,We|=0,!Oe&&tt(this,He,Ie,We,Math.pow(2,8*We)-1,0);var be=1,Ne=0;for(this[Ie]=255&He;++Ne<We&&(be*=256);)this[Ie+Ne]=He/be&255;return Ie+We},ye.prototype.writeUIntBE=function(He,Ie,We,Oe){He=+He,Ie|=0,We|=0,!Oe&&tt(this,He,Ie,We,Math.pow(2,8*We)-1,0);var be=We-1,Ne=1;for(this[Ie+be]=255&He;--be>=0&&(Ne*=256);)this[Ie+be]=He/Ne&255;return Ie+We},ye.prototype.writeUInt8=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,1,255,0),ye.TYPED_ARRAY_SUPPORT||(He=Math.floor(He)),this[Ie]=255&He,Ie+1},ye.prototype.writeUInt16LE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,2,65535,0),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=255&He,this[Ie+1]=He>>>8):ut(this,He,Ie,!0),Ie+2},ye.prototype.writeUInt16BE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,2,65535,0),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=He>>>8,this[Ie+1]=255&He):ut(this,He,Ie,!1),Ie+2},ye.prototype.writeUInt32LE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,4,4294967295,0),ye.TYPED_ARRAY_SUPPORT?(this[Ie+3]=He>>>24,this[Ie+2]=He>>>16,this[Ie+1]=He>>>8,this[Ie]=255&He):mt(this,He,Ie,!0),Ie+4},ye.prototype.writeUInt32BE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,4,4294967295,0),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=He>>>24,this[Ie+1]=He>>>16,this[Ie+2]=He>>>8,this[Ie+3]=255&He):mt(this,He,Ie,!1),Ie+4},ye.prototype.writeIntLE=function(He,Ie,We,Oe){if(He=+He,Ie|=0,!Oe){var be=Math.pow(2,8*We-1);tt(this,He,Ie,We,be-1,-be)}var Ne=0,$e=1,dt=0;for(this[Ie]=255&He;++Ne<We&&($e*=256);)He<0&&dt===0&&this[Ie+Ne-1]!==0&&(dt=1),this[Ie+Ne]=(He/$e>>0)-dt&255;return Ie+We},ye.prototype.writeIntBE=function(He,Ie,We,Oe){if(He=+He,Ie|=0,!Oe){var be=Math.pow(2,8*We-1);tt(this,He,Ie,We,be-1,-be)}var Ne=We-1,$e=1,dt=0;for(this[Ie+Ne]=255&He;--Ne>=0&&($e*=256);)He<0&&dt===0&&this[Ie+Ne+1]!==0&&(dt=1),this[Ie+Ne]=(He/$e>>0)-dt&255;return Ie+We},ye.prototype.writeInt8=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,1,127,-128),ye.TYPED_ARRAY_SUPPORT||(He=Math.floor(He)),He<0&&(He=255+He+1),this[Ie]=255&He,Ie+1},ye.prototype.writeInt16LE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,2,32767,-32768),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=255&He,this[Ie+1]=He>>>8):ut(this,He,Ie,!0),Ie+2},ye.prototype.writeInt16BE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,2,32767,-32768),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=He>>>8,this[Ie+1]=255&He):ut(this,He,Ie,!1),Ie+2},ye.prototype.writeInt32LE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,4,2147483647,-2147483648),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=255&He,this[Ie+1]=He>>>8,this[Ie+2]=He>>>16,this[Ie+3]=He>>>24):mt(this,He,Ie,!0),Ie+4},ye.prototype.writeInt32BE=function(He,Ie,We){return He=+He,Ie|=0,We||tt(this,He,Ie,4,2147483647,-2147483648),He<0&&(He=4294967295+He+1),ye.TYPED_ARRAY_SUPPORT?(this[Ie]=He>>>24,this[Ie+1]=He>>>16,this[Ie+2]=He>>>8,this[Ie+3]=255&He):mt(this,He,Ie,!1),Ie+4},ye.prototype.writeFloatLE=function(He,Ie,We){return gt(this,He,Ie,!0,We)},ye.prototype.writeFloatBE=function(He,Ie,We){return gt(this,He,Ie,!1,We)},ye.prototype.writeDoubleLE=function(He,Ie,We){return Ft(this,He,Ie,!0,We)},ye.prototype.writeDoubleBE=function(He,Ie,We){return Ft(this,He,Ie,!1,We)},ye.prototype.copy=function(He,Ie,We,Oe){if(We||(We=0),Oe||Oe===0||(Oe=this.length),Ie>=He.length&&(Ie=He.length),Ie||(Ie=0),Oe>0&&Oe<We&&(Oe=We),Oe===We||He.length===0||this.length===0)return 0;if(Ie<0)throw new RangeError("targetStart out of bounds");if(We<0||We>=this.length)throw new RangeError("sourceStart out of bounds");if(Oe<0)throw new RangeError("sourceEnd out of bounds");Oe>this.length&&(Oe=this.length),He.length-Ie<Oe-We&&(Oe=He.length-Ie+We);var be,Ne=Oe-We;if(this===He&&We<Ie&&Ie<Oe)for(be=Ne-1;be>=0;--be)He[be+Ie]=this[be+We];else if(Ne<1e3||!ye.TYPED_ARRAY_SUPPORT)for(be=0;be<Ne;++be)He[be+Ie]=this[be+We];else Uint8Array.prototype.set.call(He,this.subarray(We,We+Ne),Ie);return Ne},ye.prototype.fill=function(He,Ie,We,Oe){if(typeof He=="string"){if(typeof Ie=="string"?(Oe=Ie,Ie=0,We=this.length):typeof We=="string"&&(Oe=We,We=this.length),He.length===1){var be=He.charCodeAt(0);be<256&&(He=be)}if(Oe!==void 0&&typeof Oe!="string")throw new TypeError("encoding must be a string");if(typeof Oe=="string"&&!ye.isEncoding(Oe))throw new TypeError("Unknown encoding: "+Oe)}else typeof He=="number"&&(He&=255);if(Ie<0||this.length<Ie||this.length<We)throw new RangeError("Out of range index");if(We<=Ie)return this;Ie>>>=0,We=We===void 0?this.length:We>>>0,He||(He=0);var Ne;if(typeof He=="number")for(Ne=Ie;Ne<We;++Ne)this[Ne]=He;else{var $e=ye.isBuffer(He)?He:bn(new ye(He,Oe).toString()),dt=$e.length;for(Ne=0;Ne<We-Ie;++Ne)this[Ne+Ie]=$e[Ne%dt]}return this};var nt=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(me,Be,ke){Be.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],40:[function(me,Be,ke){"use strict";var Ce=function(){this.buffer=[],this.fns=[]};Ce.prototype.push=function(he,ye){if(this.fns.length)return this.fns.shift()(null,he);var xe={data:he,priority:ye},ge=Le(this.buffer,xe,function(le){return le.priority});this.buffer.splice(ge,0,xe)},Ce.prototype.next=function(){var he=this;return function(ye){if(he.buffer.length)return ye(null,he.buffer.pop().data);he.fns.push(ye)}};var Le=function(he,ye,xe){ye=xe(ye);for(var ge=0,le=he?he.length:ge;ge<le;){var ve=ge+le>>>1;xe(he[ve])<ye?ge=ve+1:le=ve}return ge};Be.exports=Ce},{}],41:[function(me,Be,ke){function Ce(z){var ee=this,oe=ce.call(arguments,1);return new Promise(function(ie,se){function ue(Pe){var Ae;try{Ae=z.next(Pe)}catch(De){return se(De)}we(Ae)}function Se(Pe){var Ae;try{Ae=z.throw(Pe)}catch(De){return se(De)}we(Ae)}function we(Pe){if(Pe.done)return ie(Pe.value);var Ae=Le.call(ee,Pe.value);return Ae&&ge(Ae)?Ae.then(ue,Se):Se(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(Pe.value)+'"'))}if(typeof z=="function"&&(z=z.apply(ee,oe)),!z||typeof z.next!="function")return ie(z);ue()})}function Le(z){return z&&(ge(z)?z:ve(z)||le(z)?Ce.call(this,z):typeof z=="function"?he.call(this,z):Array.isArray(z)?ye.call(this,z):de(z)?xe.call(this,z):z)}function he(z){var ee=this;return new Promise(function(oe,ie){z.call(ee,function(se,ue){if(se)return ie(se);arguments.length>2&&(ue=ce.call(arguments,1)),oe(ue)})})}function ye(z){return Promise.all(z.map(Le,this))}function xe(z){for(var ee=new z.constructor,oe=Object.keys(z),ie=[],se=0;se<oe.length;se++){var ue=oe[se],Se=Le.call(this,z[ue]);Se&&ge(Se)?function(we,Pe){ee[Pe]=void 0,ie.push(we.then(function(Ae){ee[Pe]=Ae}))}(Se,ue):ee[ue]=z[ue]}return Promise.all(ie).then(function(){return ee})}function ge(z){return typeof z.then=="function"}function le(z){return typeof z.next=="function"&&typeof z.throw=="function"}function ve(z){var ee=z.constructor;return!!ee&&(ee.name==="GeneratorFunction"||ee.displayName==="GeneratorFunction"||le(ee.prototype))}function de(z){return Object==z.constructor}var ce=Array.prototype.slice;Be.exports=Ce.default=Ce.co=Ce,Ce.wrap=function(z){function ee(){return Ce.call(this,z.apply(this,arguments))}return ee.__generatorFunction__=z,ee}},{}],42:[function(me,Be,ke){Be.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],43:[function(me,Be,ke){"use strict";function Ce(ye,xe){if(!(this instanceof Ce))return new Ce(ye,xe);this.src=ye,this._withAccess=xe}function Le(ye,xe){return ye[xe]===void 0&&ye.__lookupGetter__(xe)===void 0&&ye.__lookupSetter__(xe)===void 0}var he=Array.prototype.slice;Be.exports=Ce,Ce.prototype.withAccess=function(ye){return this._withAccess=ye!==!1,this},Ce.prototype.pick=function(ye){return Array.isArray(ye)||(ye=he.call(arguments)),ye.length&&(this.keys=ye),this},Ce.prototype.to=function(ye){if(ye=ye||{},!this.src)return ye;var xe=this.keys||Object.keys(this.src);if(!this._withAccess){for(var ge=0;ge<xe.length;ge++)le=xe[ge],ye[le]===void 0&&(ye[le]=this.src[le]);return ye}for(var ge=0;ge<xe.length;ge++){var le=xe[ge];if(Le(ye,le)){var ve=this.src.__lookupGetter__(le),de=this.src.__lookupSetter__(le);ve&&ye.__defineGetter__(le,ve),de&&ye.__defineSetter__(le,de),ve||de||(ye[le]=this.src[le])}}return ye},Ce.prototype.toCover=function(ye){for(var xe=this.keys||Object.keys(this.src),ge=0;ge<xe.length;ge++){var le=xe[ge];delete ye[le];var ve=this.src.__lookupGetter__(le),de=this.src.__lookupSetter__(le);ve&&ye.__defineGetter__(le,ve),de&&ye.__defineSetter__(le,de),ve||de||(ye[le]=this.src[le])}},Ce.prototype.override=Ce.prototype.toCover,Ce.prototype.and=function(ye){var xe={};return this.to(xe),this.src=ye,this.to(xe),this.src=xe,this}},{}],44:[function(me,Be,ke){me("../../modules/es6.string.iterator"),me("../../modules/es6.array.from"),Be.exports=me("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(me,Be,ke){var Ce=me("../../modules/_core"),Le=Ce.JSON||(Ce.JSON={stringify:JSON.stringify});Be.exports=function(he){return Le.stringify.apply(Le,arguments)}},{"../../modules/_core":65}],46:[function(me,Be,ke){me("../../modules/es6.object.assign"),Be.exports=me("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(me,Be,ke){me("../../modules/es6.object.create");var Ce=me("../../modules/_core").Object;Be.exports=function(Le,he){return Ce.create(Le,he)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(me,Be,ke){me("../../modules/es6.object.define-property");var Ce=me("../../modules/_core").Object;Be.exports=function(Le,he,ye){return Ce.defineProperty(Le,he,ye)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(me,Be,ke){me("../../modules/es6.object.get-own-property-names");var Ce=me("../../modules/_core").Object;Be.exports=function(Le){return Ce.getOwnPropertyNames(Le)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(me,Be,ke){me("../../modules/es6.object.get-prototype-of"),Be.exports=me("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(me,Be,ke){me("../../modules/es6.object.keys"),Be.exports=me("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(me,Be,ke){me("../modules/es6.object.to-string"),me("../modules/es6.string.iterator"),me("../modules/web.dom.iterable"),me("../modules/es6.promise"),me("../modules/es7.promise.finally"),me("../modules/es7.promise.try"),Be.exports=me("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(me,Be,ke){me("../modules/web.immediate"),Be.exports=me("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(me,Be,ke){me("../../modules/es6.string.from-code-point"),Be.exports=me("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(me,Be,ke){me("../../modules/es6.function.has-instance"),Be.exports=me("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(me,Be,ke){me("../../modules/es6.symbol"),me("../../modules/es6.object.to-string"),me("../../modules/es7.symbol.async-iterator"),me("../../modules/es7.symbol.observable"),Be.exports=me("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(me,Be,ke){me("../../modules/es6.string.iterator"),me("../../modules/web.dom.iterable"),Be.exports=me("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(me,Be,ke){Be.exports=function(Ce){if(typeof Ce!="function")throw TypeError(Ce+" is not a function!");return Ce}},{}],59:[function(me,Be,ke){Be.exports=function(){}},{}],60:[function(me,Be,ke){Be.exports=function(Ce,Le,he,ye){if(!(Ce instanceof Le)||ye!==void 0&&ye in Ce)throw TypeError(he+": incorrect invocation!");return Ce}},{}],61:[function(me,Be,ke){var Ce=me("./_is-object");Be.exports=function(Le){if(!Ce(Le))throw TypeError(Le+" is not an object!");return Le}},{"./_is-object":85}],62:[function(me,Be,ke){var Ce=me("./_to-iobject"),Le=me("./_to-length"),he=me("./_to-absolute-index");Be.exports=function(ye){return function(xe,ge,le){var ve,de=Ce(xe),ce=Le(de.length),z=he(le,ce);if(ye&&ge!=ge){for(;ce>z;)if((ve=de[z++])!=ve)return!0}else for(;ce>z;z++)if((ye||z in de)&&de[z]===ge)return ye||z||0;return!ye&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(me,Be,ke){var Ce=me("./_cof"),Le=me("./_wks")("toStringTag"),he=Ce(function(){return arguments}())=="Arguments",ye=function(xe,ge){try{return xe[ge]}catch(le){}};Be.exports=function(xe){var ge,le,ve;return xe===void 0?"Undefined":xe===null?"Null":typeof(le=ye(ge=Object(xe),Le))=="string"?le:he?Ce(ge):(ve=Ce(ge))=="Object"&&typeof ge.callee=="function"?"Arguments":ve}},{"./_cof":64,"./_wks":131}],64:[function(me,Be,ke){var Ce={}.toString;Be.exports=function(Le){return Ce.call(Le).slice(8,-1)}},{}],65:[function(me,Be,ke){var Ce=Be.exports={version:"2.5.7"};typeof __e=="number"&&(__e=Ce)},{}],66:[function(me,Be,ke){"use strict";var Ce=me("./_object-dp"),Le=me("./_property-desc");Be.exports=function(he,ye,xe){ye in he?Ce.f(he,ye,Le(0,xe)):he[ye]=xe}},{"./_object-dp":98,"./_property-desc":111}],67:[function(me,Be,ke){var Ce=me("./_a-function");Be.exports=function(Le,he,ye){if(Ce(Le),he===void 0)return Le;switch(ye){case 1:return function(xe){return Le.call(he,xe)};case 2:return function(xe,ge){return Le.call(he,xe,ge)};case 3:return function(xe,ge,le){return Le.call(he,xe,ge,le)}}return function(){return Le.apply(he,arguments)}}},{"./_a-function":58}],68:[function(me,Be,ke){Be.exports=function(Ce){if(Ce==null)throw TypeError("Can't call method on "+Ce);return Ce}},{}],69:[function(me,Be,ke){Be.exports=!me("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(me,Be,ke){var Ce=me("./_is-object"),Le=me("./_global").document,he=Ce(Le)&&Ce(Le.createElement);Be.exports=function(ye){return he?Le.createElement(ye):{}}},{"./_global":76,"./_is-object":85}],71:[function(me,Be,ke){Be.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(me,Be,ke){var Ce=me("./_object-keys"),Le=me("./_object-gops"),he=me("./_object-pie");Be.exports=function(ye){var xe=Ce(ye),ge=Le.f;if(ge)for(var le,ve=ge(ye),de=he.f,ce=0;ve.length>ce;)de.call(ye,le=ve[ce++])&&xe.push(le);return xe}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(me,Be,ke){var Ce=me("./_global"),Le=me("./_core"),he=me("./_ctx"),ye=me("./_hide"),xe=me("./_has"),ge=function(le,ve,de){var ce,z,ee,oe=le&ge.F,ie=le&ge.G,se=le&ge.S,ue=le&ge.P,Se=le&ge.B,we=le&ge.W,Pe=ie?Le:Le[ve]||(Le[ve]={}),Ae=Pe.prototype,De=ie?Ce:se?Ce[ve]:(Ce[ve]||{}).prototype;ie&&(de=ve);for(ce in de)(z=!oe&&De&&De[ce]!==void 0)&&xe(Pe,ce)||(ee=z?De[ce]:de[ce],Pe[ce]=ie&&typeof De[ce]!="function"?de[ce]:Se&&z?he(ee,Ce):we&&De[ce]==ee?function(ze){var Ze=function(Xe,Ge,ft){if(this instanceof ze){switch(arguments.length){case 0:return new ze;case 1:return new ze(Xe);case 2:return new ze(Xe,Ge)}return new ze(Xe,Ge,ft)}return ze.apply(this,arguments)};return Ze.prototype=ze.prototype,Ze}(ee):ue&&typeof ee=="function"?he(Function.call,ee):ee,ue&&((Pe.virtual||(Pe.virtual={}))[ce]=ee,le&ge.R&&Ae&&!Ae[ce]&&ye(Ae,ce,ee)))};ge.F=1,ge.G=2,ge.S=4,ge.P=8,ge.B=16,ge.W=32,ge.U=64,ge.R=128,Be.exports=ge},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(me,Be,ke){Be.exports=function(Ce){try{return!!Ce()}catch(Le){return!0}}},{}],75:[function(me,Be,de){var Ce=me("./_ctx"),Le=me("./_iter-call"),he=me("./_is-array-iter"),ye=me("./_an-object"),xe=me("./_to-length"),ge=me("./core.get-iterator-method"),le={},ve={},de=Be.exports=function(ce,z,ee,oe,ie){var se,ue,Se,we,Pe=ie?function(){return ce}:ge(ce),Ae=Ce(ee,oe,z?2:1),De=0;if(typeof Pe!="function")throw TypeError(ce+" is not iterable!");if(he(Pe)){for(se=xe(ce.length);se>De;De++)if((we=z?Ae(ye(ue=ce[De])[0],ue[1]):Ae(ce[De]))===le||we===ve)return we}else for(Se=Pe.call(ce);!(ue=Se.next()).done;)if((we=Le(Se,Ae,ue.value,z))===le||we===ve)return we};de.BREAK=le,de.RETURN=ve},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(me,Be,ke){var Ce=Be.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=Ce)},{}],77:[function(me,Be,ke){var Ce={}.hasOwnProperty;Be.exports=function(Le,he){return Ce.call(Le,he)}},{}],78:[function(me,Be,ke){var Ce=me("./_object-dp"),Le=me("./_property-desc");Be.exports=me("./_descriptors")?function(he,ye,xe){return Ce.f(he,ye,Le(1,xe))}:function(he,ye,xe){return he[ye]=xe,he}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(me,Be,ke){var Ce=me("./_global").document;Be.exports=Ce&&Ce.documentElement},{"./_global":76}],80:[function(me,Be,ke){Be.exports=!me("./_descriptors")&&!me("./_fails")(function(){return Object.defineProperty(me("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(me,Be,ke){Be.exports=function(Ce,Le,he){var ye=he===void 0;switch(Le.length){case 0:return ye?Ce():Ce.call(he);case 1:return ye?Ce(Le[0]):Ce.call(he,Le[0]);case 2:return ye?Ce(Le[0],Le[1]):Ce.call(he,Le[0],Le[1]);case 3:return ye?Ce(Le[0],Le[1],Le[2]):Ce.call(he,Le[0],Le[1],Le[2]);case 4:return ye?Ce(Le[0],Le[1],Le[2],Le[3]):Ce.call(he,Le[0],Le[1],Le[2],Le[3])}return Ce.apply(he,Le)}},{}],82:[function(me,Be,ke){var Ce=me("./_cof");Be.exports=Object("z").propertyIsEnumerable(0)?Object:function(Le){return Ce(Le)=="String"?Le.split(""):Object(Le)}},{"./_cof":64}],83:[function(me,Be,ke){var Ce=me("./_iterators"),Le=me("./_wks")("iterator"),he=Array.prototype;Be.exports=function(ye){return ye!==void 0&&(Ce.Array===ye||he[Le]===ye)}},{"./_iterators":91,"./_wks":131}],84:[function(me,Be,ke){var Ce=me("./_cof");Be.exports=Array.isArray||function(Le){return Ce(Le)=="Array"}},{"./_cof":64}],85:[function(me,Be,ke){Be.exports=function(Ce){return typeof Ce=="object"?Ce!==null:typeof Ce=="function"}},{}],86:[function(me,Be,ke){var Ce=me("./_an-object");Be.exports=function(Le,he,ye,xe){try{return xe?he(Ce(ye)[0],ye[1]):he(ye)}catch(le){var ge=Le.return;throw ge!==void 0&&Ce(ge.call(Le)),le}}},{"./_an-object":61}],87:[function(me,Be,ke){"use strict";var Ce=me("./_object-create"),Le=me("./_property-desc"),he=me("./_set-to-string-tag"),ye={};me("./_hide")(ye,me("./_wks")("iterator"),function(){return this}),Be.exports=function(xe,ge,le){xe.prototype=Ce(ye,{next:Le(1,le)}),he(xe,ge+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(me,Be,ke){"use strict";var Ce=me("./_library"),Le=me("./_export"),he=me("./_redefine"),ye=me("./_hide"),xe=me("./_iterators"),ge=me("./_iter-create"),le=me("./_set-to-string-tag"),ve=me("./_object-gpo"),de=me("./_wks")("iterator"),ce=!([].keys&&"next"in[].keys()),z=function(){return this};Be.exports=function(ee,oe,ie,se,ue,Se,we){ge(ie,oe,se);var Pe,Ae,De,ze=function(st){if(!ce&&st in ft)return ft[st];switch(st){case"keys":case"values":return function(){return new ie(this,st)}}return function(){return new ie(this,st)}},Ze=oe+" Iterator",Xe=ue=="values",Ge=!1,ft=ee.prototype,at=ft[de]||ft["@@iterator"]||ue&&ft[ue],Ct=at||ze(ue),et=ue?Xe?ze("entries"):Ct:void 0,yt=oe=="Array"&&ft.entries||at;if(yt&&(De=ve(yt.call(new ee)))!==Object.prototype&&De.next&&(le(De,Ze,!0),Ce||typeof De[de]=="function"||ye(De,de,z)),Xe&&at&&at.name!=="values"&&(Ge=!0,Ct=function(){return at.call(this)}),Ce&&!we||!ce&&!Ge&&ft[de]||ye(ft,de,Ct),xe[oe]=Ct,xe[Ze]=z,ue)if(Pe={values:Xe?Ct:ze("values"),keys:Se?Ct:ze("keys"),entries:et},we)for(Ae in Pe)Ae in ft||he(ft,Ae,Pe[Ae]);else Le(Le.P+Le.F*(ce||Ge),oe,Pe);return Pe}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(me,Be,ke){var Ce=me("./_wks")("iterator"),Le=!1;try{var he=[7][Ce]();he.return=function(){Le=!0},Array.from(he,function(){throw 2})}catch(ye){}Be.exports=function(ye,xe){if(!xe&&!Le)return!1;var ge=!1;try{var le=[7],ve=le[Ce]();ve.next=function(){return{done:ge=!0}},le[Ce]=function(){return ve},ye(le)}catch(de){}return ge}},{"./_wks":131}],90:[function(me,Be,ke){Be.exports=function(Ce,Le){return{value:Le,done:!!Ce}}},{}],91:[function(me,Be,ke){Be.exports={}},{}],92:[function(me,Be,ke){Be.exports=!0},{}],93:[function(me,Be,ke){var Ce=me("./_uid")("meta"),Le=me("./_is-object"),he=me("./_has"),ye=me("./_object-dp").f,xe=0,ge=Object.isExtensible||function(){return!0},le=!me("./_fails")(function(){return ge(Object.preventExtensions({}))}),ve=function(oe){ye(oe,Ce,{value:{i:"O"+ ++xe,w:{}}})},de=function(oe,ie){if(!Le(oe))return typeof oe=="symbol"?oe:(typeof oe=="string"?"S":"P")+oe;if(!he(oe,Ce)){if(!ge(oe))return"F";if(!ie)return"E";ve(oe)}return oe[Ce].i},ce=function(oe,ie){if(!he(oe,Ce)){if(!ge(oe))return!0;if(!ie)return!1;ve(oe)}return oe[Ce].w},z=function(oe){return le&&ee.NEED&&ge(oe)&&!he(oe,Ce)&&ve(oe),oe},ee=Be.exports={KEY:Ce,NEED:!1,fastKey:de,getWeak:ce,onFreeze:z}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(me,Be,ke){var Ce=me("./_global"),Le=me("./_task").set,he=Ce.MutationObserver||Ce.WebKitMutationObserver,ye=Ce.process,xe=Ce.Promise,ge=me("./_cof")(ye)=="process";Be.exports=function(){var le,ve,de,ce=function(){var ie,se;for(ge&&(ie=ye.domain)&&ie.exit();le;){se=le.fn,le=le.next;try{se()}catch(ue){throw le?de():ve=void 0,ue}}ve=void 0,ie&&ie.enter()};if(ge)de=function(){ye.nextTick(ce)};else if(!he||Ce.navigator&&Ce.navigator.standalone)if(xe&&xe.resolve){var z=xe.resolve(void 0);de=function(){z.then(ce)}}else de=function(){Le.call(Ce,ce)};else{var ee=!0,oe=document.createTextNode("");new he(ce).observe(oe,{characterData:!0}),de=function(){oe.data=ee=!ee}}return function(ie){var se={fn:ie,next:void 0};ve&&(ve.next=se),le||(le=se,de()),ve=se}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(me,Be,ke){"use strict";function Ce(he){var ye,xe;this.promise=new he(function(ge,le){if(ye!==void 0||xe!==void 0)throw TypeError("Bad Promise constructor");ye=ge,xe=le}),this.resolve=Le(ye),this.reject=Le(xe)}var Le=me("./_a-function");Be.exports.f=function(he){return new Ce(he)}},{"./_a-function":58}],96:[function(me,Be,ke){"use strict";var Ce=me("./_object-keys"),Le=me("./_object-gops"),he=me("./_object-pie"),ye=me("./_to-object"),xe=me("./_iobject"),ge=Object.assign;Be.exports=!ge||me("./_fails")(function(){var le={},ve={},de=Symbol(),ce="abcdefghijklmnopqrst";return le[de]=7,ce.split("").forEach(function(z){ve[z]=z}),ge({},le)[de]!=7||Object.keys(ge({},ve)).join("")!=ce})?function(le,ve){for(var de=ye(le),ce=arguments.length,z=1,ee=Le.f,oe=he.f;ce>z;)for(var ie,se=xe(arguments[z++]),ue=ee?Ce(se).concat(ee(se)):Ce(se),Se=ue.length,we=0;Se>we;)oe.call(se,ie=ue[we++])&&(de[ie]=se[ie]);return de}:ge},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(me,Be,ke){var Ce=me("./_an-object"),Le=me("./_object-dps"),he=me("./_enum-bug-keys"),ye=me("./_shared-key")("IE_PROTO"),xe=function(){},ge=function(){var le,ve=me("./_dom-create")("iframe"),de=he.length;for(ve.style.display="none",me("./_html").appendChild(ve),ve.src="javascript:",le=ve.contentWindow.document,le.open(),le.write("<script>document.F=Object<\/script>"),le.close(),ge=le.F;de--;)delete ge.prototype[he[de]];return ge()};Be.exports=Object.create||function(le,ve){var de;return le!==null?(xe.prototype=Ce(le),de=new xe,xe.prototype=null,de[ye]=le):de=ge(),ve===void 0?de:Le(de,ve)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(me,Be,ke){var Ce=me("./_an-object"),Le=me("./_ie8-dom-define"),he=me("./_to-primitive"),ye=Object.defineProperty;ke.f=me("./_descriptors")?Object.defineProperty:function(xe,ge,le){if(Ce(xe),ge=he(ge,!0),Ce(le),Le)try{return ye(xe,ge,le)}catch(ve){}if("get"in le||"set"in le)throw TypeError("Accessors not supported!");return"value"in le&&(xe[ge]=le.value),xe}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(me,Be,ke){var Ce=me("./_object-dp"),Le=me("./_an-object"),he=me("./_object-keys");Be.exports=me("./_descriptors")?Object.defineProperties:function(ye,xe){Le(ye);for(var ge,le=he(xe),ve=le.length,de=0;ve>de;)Ce.f(ye,ge=le[de++],xe[ge]);return ye}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(me,Be,ke){var Ce=me("./_object-pie"),Le=me("./_property-desc"),he=me("./_to-iobject"),ye=me("./_to-primitive"),xe=me("./_has"),ge=me("./_ie8-dom-define"),le=Object.getOwnPropertyDescriptor;ke.f=me("./_descriptors")?le:function(ve,de){if(ve=he(ve),de=ye(de,!0),ge)try{return le(ve,de)}catch(ce){}if(xe(ve,de))return Le(!Ce.f.call(ve,de),ve[de])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(me,Be,ke){var Ce=me("./_to-iobject"),Le=me("./_object-gopn").f,he={}.toString,ye=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],xe=function(ge){try{return Le(ge)}catch(le){return ye.slice()}};Be.exports.f=function(ge){return ye&&he.call(ge)=="[object Window]"?xe(ge):Le(Ce(ge))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(me,Be,ke){var Ce=me("./_object-keys-internal"),Le=me("./_enum-bug-keys").concat("length","prototype");ke.f=Object.getOwnPropertyNames||function(he){return Ce(he,Le)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(me,Be,ke){ke.f=Object.getOwnPropertySymbols},{}],104:[function(me,Be,ke){var Ce=me("./_has"),Le=me("./_to-object"),he=me("./_shared-key")("IE_PROTO"),ye=Object.prototype;Be.exports=Object.getPrototypeOf||function(xe){return xe=Le(xe),Ce(xe,he)?xe[he]:typeof xe.constructor=="function"&&xe instanceof xe.constructor?xe.constructor.prototype:xe instanceof Object?ye:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(me,Be,ke){var Ce=me("./_has"),Le=me("./_to-iobject"),he=me("./_array-includes")(!1),ye=me("./_shared-key")("IE_PROTO");Be.exports=function(xe,ge){var le,ve=Le(xe),de=0,ce=[];for(le in ve)le!=ye&&Ce(ve,le)&&ce.push(le);for(;ge.length>de;)Ce(ve,le=ge[de++])&&(~he(ce,le)||ce.push(le));return ce}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(me,Be,ke){var Ce=me("./_object-keys-internal"),Le=me("./_enum-bug-keys");Be.exports=Object.keys||function(he){return Ce(he,Le)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(me,Be,ke){ke.f={}.propertyIsEnumerable},{}],108:[function(me,Be,ke){var Ce=me("./_export"),Le=me("./_core"),he=me("./_fails");Be.exports=function(ye,xe){var ge=(Le.Object||{})[ye]||Object[ye],le={};le[ye]=xe(ge),Ce(Ce.S+Ce.F*he(function(){ge(1)}),"Object",le)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(me,Be,ke){Be.exports=function(Ce){try{return{e:!1,v:Ce()}}catch(Le){return{e:!0,v:Le}}}},{}],110:[function(me,Be,ke){var Ce=me("./_an-object"),Le=me("./_is-object"),he=me("./_new-promise-capability");Be.exports=function(ye,xe){if(Ce(ye),Le(xe)&&xe.constructor===ye)return xe;var ge=he.f(ye);return(0,ge.resolve)(xe),ge.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(me,Be,ke){Be.exports=function(Ce,Le){return{enumerable:!(1&Ce),configurable:!(2&Ce),writable:!(4&Ce),value:Le}}},{}],112:[function(me,Be,ke){var Ce=me("./_hide");Be.exports=function(Le,he,ye){for(var xe in he)ye&&Le[xe]?Le[xe]=he[xe]:Ce(Le,xe,he[xe]);return Le}},{"./_hide":78}],113:[function(me,Be,ke){Be.exports=me("./_hide")},{"./_hide":78}],114:[function(me,Be,ke){"use strict";var Ce=me("./_global"),Le=me("./_core"),he=me("./_object-dp"),ye=me("./_descriptors"),xe=me("./_wks")("species");Be.exports=function(ge){var le=typeof Le[ge]=="function"?Le[ge]:Ce[ge];ye&&le&&!le[xe]&&he.f(le,xe,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(me,Be,ke){var Ce=me("./_object-dp").f,Le=me("./_has"),he=me("./_wks")("toStringTag");Be.exports=function(ye,xe,ge){ye&&!Le(ye=ge?ye:ye.prototype,he)&&Ce(ye,he,{configurable:!0,value:xe})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(me,Be,ke){var Ce=me("./_shared")("keys"),Le=me("./_uid");Be.exports=function(he){return Ce[he]||(Ce[he]=Le(he))}},{"./_shared":117,"./_uid":127}],117:[function(me,Be,ke){var Ce=me("./_core"),Le=me("./_global"),he=Le["__core-js_shared__"]||(Le["__core-js_shared__"]={});(Be.exports=function(ye,xe){return he[ye]||(he[ye]=xe!==void 0?xe:{})})("versions",[]).push({version:Ce.version,mode:me("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(me,Be,ke){var Ce=me("./_an-object"),Le=me("./_a-function"),he=me("./_wks")("species");Be.exports=function(ye,xe){var ge,le=Ce(ye).constructor;return le===void 0||(ge=Ce(le)[he])==null?xe:Le(ge)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(me,Be,ke){var Ce=me("./_to-integer"),Le=me("./_defined");Be.exports=function(he){return function(ye,xe){var ge,le,ve=String(Le(ye)),de=Ce(xe),ce=ve.length;return de<0||de>=ce?he?"":void 0:(ge=ve.charCodeAt(de),ge<55296||ge>56319||de+1===ce||(le=ve.charCodeAt(de+1))<56320||le>57343?he?ve.charAt(de):ge:he?ve.slice(de,de+2):le-56320+(ge-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(me,Be,ke){var Ce,Le,he,ye=me("./_ctx"),xe=me("./_invoke"),ge=me("./_html"),le=me("./_dom-create"),ve=me("./_global"),de=ve.process,ce=ve.setImmediate,z=ve.clearImmediate,ee=ve.MessageChannel,oe=ve.Dispatch,ie=0,se={},ue=function(){var we=+this;if(se.hasOwnProperty(we)){var Pe=se[we];delete se[we],Pe()}},Se=function(we){ue.call(we.data)};ce&&z||(ce=function(we){for(var Pe=[],Ae=1;arguments.length>Ae;)Pe.push(arguments[Ae++]);return se[++ie]=function(){xe(typeof we=="function"?we:Function(we),Pe)},Ce(ie),ie},z=function(we){delete se[we]},me("./_cof")(de)=="process"?Ce=function(we){de.nextTick(ye(ue,we,1))}:oe&&oe.now?Ce=function(we){oe.now(ye(ue,we,1))}:ee?(Le=new ee,he=Le.port2,Le.port1.onmessage=Se,Ce=ye(he.postMessage,he,1)):ve.addEventListener&&typeof postMessage=="function"&&!ve.importScripts?(Ce=function(we){ve.postMessage(we+"","*")},ve.addEventListener("message",Se,!1)):Ce="onreadystatechange"in le("script")?function(we){ge.appendChild(le("script")).onreadystatechange=function(){ge.removeChild(this),ue.call(we)}}:function(we){setTimeout(ye(ue,we,1),0)}),Be.exports={set:ce,clear:z}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(me,Be,ke){var Ce=me("./_to-integer"),Le=Math.max,he=Math.min;Be.exports=function(ye,xe){return ye=Ce(ye),ye<0?Le(ye+xe,0):he(ye,xe)}},{"./_to-integer":122}],122:[function(me,Be,ke){var Ce=Math.ceil,Le=Math.floor;Be.exports=function(he){return isNaN(he=+he)?0:(he>0?Le:Ce)(he)}},{}],123:[function(me,Be,ke){var Ce=me("./_iobject"),Le=me("./_defined");Be.exports=function(he){return Ce(Le(he))}},{"./_defined":68,"./_iobject":82}],124:[function(me,Be,ke){var Ce=me("./_to-integer"),Le=Math.min;Be.exports=function(he){return he>0?Le(Ce(he),9007199254740991):0}},{"./_to-integer":122}],125:[function(me,Be,ke){var Ce=me("./_defined");Be.exports=function(Le){return Object(Ce(Le))}},{"./_defined":68}],126:[function(me,Be,ke){var Ce=me("./_is-object");Be.exports=function(Le,he){if(!Ce(Le))return Le;var ye,xe;if(he&&typeof(ye=Le.toString)=="function"&&!Ce(xe=ye.call(Le))||typeof(ye=Le.valueOf)=="function"&&!Ce(xe=ye.call(Le))||!he&&typeof(ye=Le.toString)=="function"&&!Ce(xe=ye.call(Le)))return xe;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(me,Be,ke){var Ce=0,Le=Math.random();Be.exports=function(he){return"Symbol(".concat(he===void 0?"":he,")_",(++Ce+Le).toString(36))}},{}],128:[function(me,Be,ke){var Ce=me("./_global"),Le=Ce.navigator;Be.exports=Le&&Le.userAgent||""},{"./_global":76}],129:[function(me,Be,ke){var Ce=me("./_global"),Le=me("./_core"),he=me("./_library"),ye=me("./_wks-ext"),xe=me("./_object-dp").f;Be.exports=function(ge){var le=Le.Symbol||(Le.Symbol=he?{}:Ce.Symbol||{});ge.charAt(0)=="_"||ge in le||xe(le,ge,{value:ye.f(ge)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(me,Be,ke){ke.f=me("./_wks")},{"./_wks":131}],131:[function(me,Be,ke){var Ce=me("./_shared")("wks"),Le=me("./_uid"),he=me("./_global").Symbol,ye=typeof he=="function";(Be.exports=function(xe){return Ce[xe]||(Ce[xe]=ye&&he[xe]||(ye?he:Le)("Symbol."+xe))}).store=Ce},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(me,Be,ke){var Ce=me("./_classof"),Le=me("./_wks")("iterator"),he=me("./_iterators");Be.exports=me("./_core").getIteratorMethod=function(ye){if(ye!=null)return ye[Le]||ye["@@iterator"]||he[Ce(ye)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(me,Be,ke){"use strict";var Ce=me("./_ctx"),Le=me("./_export"),he=me("./_to-object"),ye=me("./_iter-call"),xe=me("./_is-array-iter"),ge=me("./_to-length"),le=me("./_create-property"),ve=me("./core.get-iterator-method");Le(Le.S+Le.F*!me("./_iter-detect")(function(de){Array.from(de)}),"Array",{from:function(de){var ce,z,ee,oe,ie=he(de),se=typeof this=="function"?this:Array,ue=arguments.length,Se=ue>1?arguments[1]:void 0,we=Se!==void 0,Pe=0,Ae=ve(ie);if(we&&(Se=Ce(Se,ue>2?arguments[2]:void 0,2)),Ae==null||se==Array&&xe(Ae))for(ce=ge(ie.length),z=new se(ce);ce>Pe;Pe++)le(z,Pe,we?Se(ie[Pe],Pe):ie[Pe]);else for(oe=Ae.call(ie),z=new se;!(ee=oe.next()).done;Pe++)le(z,Pe,we?ye(oe,Se,[ee.value,Pe],!0):ee.value);return z.length=Pe,z}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(me,Be,ke){"use strict";var Ce=me("./_add-to-unscopables"),Le=me("./_iter-step"),he=me("./_iterators"),ye=me("./_to-iobject");Be.exports=me("./_iter-define")(Array,"Array",function(xe,ge){this._t=ye(xe),this._i=0,this._k=ge},function(){var xe=this._t,ge=this._k,le=this._i++;return!xe||le>=xe.length?(this._t=void 0,Le(1)):ge=="keys"?Le(0,le):ge=="values"?Le(0,xe[le]):Le(0,[le,xe[le]])},"values"),he.Arguments=he.Array,Ce("keys"),Ce("values"),Ce("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(me,Be,ke){"use strict";var Ce=me("./_is-object"),Le=me("./_object-gpo"),he=me("./_wks")("hasInstance"),ye=Function.prototype;he in ye||me("./_object-dp").f(ye,he,{value:function(xe){if(typeof this!="function"||!Ce(xe))return!1;if(!Ce(this.prototype))return xe instanceof this;for(;xe=Le(xe);)if(this.prototype===xe)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(me,Be,ke){var Ce=me("./_export");Ce(Ce.S+Ce.F,"Object",{assign:me("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(me,Be,ke){var Ce=me("./_export");Ce(Ce.S,"Object",{create:me("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(me,Be,ke){var Ce=me("./_export");Ce(Ce.S+Ce.F*!me("./_descriptors"),"Object",{defineProperty:me("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(me,Be,ke){me("./_object-sap")("getOwnPropertyNames",function(){return me("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(me,Be,ke){var Ce=me("./_to-object"),Le=me("./_object-gpo");me("./_object-sap")("getPrototypeOf",function(){return function(he){return Le(Ce(he))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(me,Be,ke){var Ce=me("./_to-object"),Le=me("./_object-keys");me("./_object-sap")("keys",function(){return function(he){return Le(Ce(he))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(me,Be,ke){arguments[4][36][0].apply(ke,arguments)},{dup:36}],143:[function(me,Be,ke){"use strict";var Ce,Le,he,ye,xe=me("./_library"),ge=me("./_global"),le=me("./_ctx"),ve=me("./_classof"),de=me("./_export"),ce=me("./_is-object"),z=me("./_a-function"),ee=me("./_an-instance"),oe=me("./_for-of"),ie=me("./_species-constructor"),se=me("./_task").set,ue=me("./_microtask")(),Se=me("./_new-promise-capability"),we=me("./_perform"),Pe=me("./_user-agent"),Ae=me("./_promise-resolve"),De=ge.TypeError,ze=ge.process,Ze=ze&&ze.versions,Xe=Ze&&Ze.v8||"",Ge=ge.Promise,ft=ve(ze)=="process",at=function(){},Ct=Le=Se.f,et=!!function(){try{var Pt=Ge.resolve(1),gt=(Pt.constructor={})[me("./_wks")("species")]=function(Ft){Ft(at,at)};return(ft||typeof PromiseRejectionEvent=="function")&&Pt.then(at)instanceof gt&&Xe.indexOf("6.6")!==0&&Pe.indexOf("Chrome/66")===-1}catch(Ft){}}(),yt=function(Pt){var gt;return!(!ce(Pt)||typeof(gt=Pt.then)!="function")&>},st=function(Pt,gt){if(!Pt._n){Pt._n=!0;var Ft=Pt._c;ue(function(){for(var Ht=Pt._v,hn=Pt._s==1,Qt=0;Ft.length>Qt;)(function(bn){var Wt,Kt,Jt,Yt=hn?bn.ok:bn.fail,kt=bn.resolve,pt=bn.reject,Bt=bn.domain;try{Yt?(hn||(Pt._h==2&&tt(Pt),Pt._h=1),Yt===!0?Wt=Ht:(Bt&&Bt.enter(),Wt=Yt(Ht),Bt&&(Bt.exit(),Jt=!0)),Wt===bn.promise?pt(De("Promise-chain cycle")):(Kt=yt(Wt))?Kt.call(Wt,kt,pt):kt(Wt)):pt(Ht)}catch(xt){Bt&&!Jt&&Bt.exit(),pt(xt)}})(Ft[Qt++]);Pt._c=[],Pt._n=!1,gt&&!Pt._h&&zt(Pt)})}},zt=function(Pt){se.call(ge,function(){var gt,Ft,Ht,hn=Pt._v,Qt=lt(Pt);if(Qt&&(gt=we(function(){ft?ze.emit("unhandledRejection",hn,Pt):(Ft=ge.onunhandledrejection)?Ft({promise:Pt,reason:hn}):(Ht=ge.console)&&Ht.error&&Ht.error("Unhandled promise rejection",hn)}),Pt._h=ft||lt(Pt)?2:1),Pt._a=void 0,Qt&>.e)throw gt.v})},lt=function(Pt){return Pt._h!==1&&(Pt._a||Pt._c).length===0},tt=function(Pt){se.call(ge,function(){var gt;ft?ze.emit("rejectionHandled",Pt):(gt=ge.onrejectionhandled)&>({promise:Pt,reason:Pt._v})})},ut=function(Pt){var gt=this;gt._d||(gt._d=!0,gt=gt._w||gt,gt._v=Pt,gt._s=2,gt._a||(gt._a=gt._c.slice()),st(gt,!0))},mt=function(Pt){var gt,Ft=this;if(!Ft._d){Ft._d=!0,Ft=Ft._w||Ft;try{if(Ft===Pt)throw De("Promise can't be resolved itself");(gt=yt(Pt))?ue(function(){var Ht={_w:Ft,_d:!1};try{gt.call(Pt,le(mt,Ht,1),le(ut,Ht,1))}catch(hn){ut.call(Ht,hn)}}):(Ft._v=Pt,Ft._s=1,st(Ft,!1))}catch(Ht){ut.call({_w:Ft,_d:!1},Ht)}}};et||(Ge=function(Pt){ee(this,Ge,"Promise","_h"),z(Pt),Ce.call(this);try{Pt(le(mt,this,1),le(ut,this,1))}catch(gt){ut.call(this,gt)}},Ce=function(Pt){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},Ce.prototype=me("./_redefine-all")(Ge.prototype,{then:function(Pt,gt){var Ft=Ct(ie(this,Ge));return Ft.ok=typeof Pt!="function"||Pt,Ft.fail=typeof gt=="function"&>,Ft.domain=ft?ze.domain:void 0,this._c.push(Ft),this._a&&this._a.push(Ft),this._s&&st(this,!1),Ft.promise},catch:function(Pt){return this.then(void 0,Pt)}}),he=function(){var Pt=new Ce;this.promise=Pt,this.resolve=le(mt,Pt,1),this.reject=le(ut,Pt,1)},Se.f=Ct=function(Pt){return Pt===Ge||Pt===ye?new he(Pt):Le(Pt)}),de(de.G+de.W+de.F*!et,{Promise:Ge}),me("./_set-to-string-tag")(Ge,"Promise"),me("./_set-species")("Promise"),ye=me("./_core").Promise,de(de.S+de.F*!et,"Promise",{reject:function(Pt){var gt=Ct(this);return(0,gt.reject)(Pt),gt.promise}}),de(de.S+de.F*(xe||!et),"Promise",{resolve:function(Pt){return Ae(xe&&this===ye?Ge:this,Pt)}}),de(de.S+de.F*!(et&&me("./_iter-detect")(function(Pt){Ge.all(Pt).catch(at)})),"Promise",{all:function(Pt){var gt=this,Ft=Ct(gt),Ht=Ft.resolve,hn=Ft.reject,Qt=we(function(){var bn=[],Wt=0,Kt=1;oe(Pt,!1,function(Jt){var Yt=Wt++,kt=!1;bn.push(void 0),Kt++,gt.resolve(Jt).then(function(pt){kt||(kt=!0,bn[Yt]=pt,--Kt||Ht(bn))},hn)}),--Kt||Ht(bn)});return Qt.e&&hn(Qt.v),Ft.promise},race:function(Pt){var gt=this,Ft=Ct(gt),Ht=Ft.reject,hn=we(function(){oe(Pt,!1,function(Qt){gt.resolve(Qt).then(Ft.resolve,Ht)})});return hn.e&&Ht(hn.v),Ft.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(me,Be,ke){var Ce=me("./_export"),Le=me("./_to-absolute-index"),he=String.fromCharCode,ye=String.fromCodePoint;Ce(Ce.S+Ce.F*(!!ye&&ye.length!=1),"String",{fromCodePoint:function(xe){for(var ge,le=[],ve=arguments.length,de=0;ve>de;){if(ge=+arguments[de++],Le(ge,1114111)!==ge)throw RangeError(ge+" is not a valid code point");le.push(ge<65536?he(ge):he(55296+((ge-=65536)>>10),ge%1024+56320))}return le.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(me,Be,ke){"use strict";var Ce=me("./_string-at")(!0);me("./_iter-define")(String,"String",function(Le){this._t=String(Le),this._i=0},function(){var Le,he=this._t,ye=this._i;return ye>=he.length?{value:void 0,done:!0}:(Le=Ce(he,ye),this._i+=Le.length,{value:Le,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(me,Be,ke){"use strict";var Ce=me("./_global"),Le=me("./_has"),he=me("./_descriptors"),ye=me("./_export"),xe=me("./_redefine"),ge=me("./_meta").KEY,le=me("./_fails"),ve=me("./_shared"),de=me("./_set-to-string-tag"),ce=me("./_uid"),z=me("./_wks"),ee=me("./_wks-ext"),oe=me("./_wks-define"),ie=me("./_enum-keys"),se=me("./_is-array"),ue=me("./_an-object"),Se=me("./_is-object"),we=me("./_to-iobject"),Pe=me("./_to-primitive"),Ae=me("./_property-desc"),De=me("./_object-create"),ze=me("./_object-gopn-ext"),Ze=me("./_object-gopd"),Xe=me("./_object-dp"),Ge=me("./_object-keys"),ft=Ze.f,at=Xe.f,Ct=ze.f,et=Ce.Symbol,yt=Ce.JSON,st=yt&&yt.stringify,zt=z("_hidden"),lt=z("toPrimitive"),tt={}.propertyIsEnumerable,ut=ve("symbol-registry"),mt=ve("symbols"),Pt=ve("op-symbols"),gt=Object.prototype,Ft=typeof et=="function",Ht=Ce.QObject,hn=!Ht||!Ht.prototype||!Ht.prototype.findChild,Qt=he&&le(function(){return De(at({},"a",{get:function(){return at(this,"a",{value:7}).a}})).a!=7})?function(We,Oe,be){var Ne=ft(gt,Oe);Ne&&delete gt[Oe],at(We,Oe,be),Ne&&We!==gt&&at(gt,Oe,Ne)}:at,bn=function(We){var Oe=mt[We]=De(et.prototype);return Oe._k=We,Oe},Wt=Ft&&typeof et.iterator=="symbol"?function(We){return typeof We=="symbol"}:function(We){return We instanceof et},Kt=function(We,Oe,be){return We===gt&&Kt(Pt,Oe,be),ue(We),Oe=Pe(Oe,!0),ue(be),Le(mt,Oe)?(be.enumerable?(Le(We,zt)&&We[zt][Oe]&&(We[zt][Oe]=!1),be=De(be,{enumerable:Ae(0,!1)})):(Le(We,zt)||at(We,zt,Ae(1,{})),We[zt][Oe]=!0),Qt(We,Oe,be)):at(We,Oe,be)},Jt=function(We,Oe){ue(We);for(var be,Ne=ie(Oe=we(Oe)),$e=0,dt=Ne.length;dt>$e;)Kt(We,be=Ne[$e++],Oe[be]);return We},Yt=function(We,Oe){return Oe===void 0?De(We):Jt(De(We),Oe)},kt=function(We){var Oe=tt.call(this,We=Pe(We,!0));return!(this===gt&&Le(mt,We)&&!Le(Pt,We))&&(!(Oe||!Le(this,We)||!Le(mt,We)||Le(this,zt)&&this[zt][We])||Oe)},pt=function(We,Oe){if(We=we(We),Oe=Pe(Oe,!0),We!==gt||!Le(mt,Oe)||Le(Pt,Oe)){var be=ft(We,Oe);return!be||!Le(mt,Oe)||Le(We,zt)&&We[zt][Oe]||(be.enumerable=!0),be}},Bt=function(We){for(var Oe,be=Ct(we(We)),Ne=[],$e=0;be.length>$e;)Le(mt,Oe=be[$e++])||Oe==zt||Oe==ge||Ne.push(Oe);return Ne},xt=function(We){for(var Oe,be=We===gt,Ne=Ct(be?Pt:we(We)),$e=[],dt=0;Ne.length>dt;)!Le(mt,Oe=Ne[dt++])||be&&!Le(gt,Oe)||$e.push(mt[Oe]);return $e};Ft||(et=function(){if(this instanceof et)throw TypeError("Symbol is not a constructor!");var We=ce(arguments.length>0?arguments[0]:void 0),Oe=function(be){this===gt&&Oe.call(Pt,be),Le(this,zt)&&Le(this[zt],We)&&(this[zt][We]=!1),Qt(this,We,Ae(1,be))};return he&&hn&&Qt(gt,We,{configurable:!0,set:Oe}),bn(We)},xe(et.prototype,"toString",function(){return this._k}),Ze.f=pt,Xe.f=Kt,me("./_object-gopn").f=ze.f=Bt,me("./_object-pie").f=kt,me("./_object-gops").f=xt,he&&!me("./_library")&&xe(gt,"propertyIsEnumerable",kt,!0),ee.f=function(We){return bn(z(We))}),ye(ye.G+ye.W+ye.F*!Ft,{Symbol:et});for(var vt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;vt.length>nt;)z(vt[nt++]);for(var He=Ge(z.store),Ie=0;He.length>Ie;)oe(He[Ie++]);ye(ye.S+ye.F*!Ft,"Symbol",{for:function(We){return Le(ut,We+="")?ut[We]:ut[We]=et(We)},keyFor:function(We){if(!Wt(We))throw TypeError(We+" is not a symbol!");for(var Oe in ut)if(ut[Oe]===We)return Oe},useSetter:function(){hn=!0},useSimple:function(){hn=!1}}),ye(ye.S+ye.F*!Ft,"Object",{create:Yt,defineProperty:Kt,defineProperties:Jt,getOwnPropertyDescriptor:pt,getOwnPropertyNames:Bt,getOwnPropertySymbols:xt}),yt&&ye(ye.S+ye.F*(!Ft||le(function(){var We=et();return st([We])!="[null]"||st({a:We})!="{}"||st(Object(We))!="{}"})),"JSON",{stringify:function(We){for(var Oe,be,Ne=[We],$e=1;arguments.length>$e;)Ne.push(arguments[$e++]);if(be=Oe=Ne[1],(Se(Oe)||We!==void 0)&&!Wt(We))return se(Oe)||(Oe=function(dt,Je){if(typeof be=="function"&&(Je=be.call(this,dt,Je)),!Wt(Je))return Je}),Ne[1]=Oe,st.apply(yt,Ne)}}),et.prototype[lt]||me("./_hide")(et.prototype,lt,et.prototype.valueOf),de(et,"Symbol"),de(Math,"Math",!0),de(Ce.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(me,Be,ke){"use strict";var Ce=me("./_export"),Le=me("./_core"),he=me("./_global"),ye=me("./_species-constructor"),xe=me("./_promise-resolve");Ce(Ce.P+Ce.R,"Promise",{finally:function(ge){var le=ye(this,Le.Promise||he.Promise),ve=typeof ge=="function";return this.then(ve?function(de){return xe(le,ge()).then(function(){return de})}:ge,ve?function(de){return xe(le,ge()).then(function(){throw de})}:ge)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(me,Be,ke){"use strict";var Ce=me("./_export"),Le=me("./_new-promise-capability"),he=me("./_perform");Ce(Ce.S,"Promise",{try:function(ye){var xe=Le.f(this),ge=he(ye);return(ge.e?xe.reject:xe.resolve)(ge.v),xe.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(me,Be,ke){me("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(me,Be,ke){me("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(me,Be,ke){me("./es6.array.iterator");for(var Ce=me("./_global"),Le=me("./_hide"),he=me("./_iterators"),ye=me("./_wks")("toStringTag"),xe="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),ge=0;ge<xe.length;ge++){var le=xe[ge],ve=Ce[le],de=ve&&ve.prototype;de&&!de[ye]&&Le(de,ye,le),he[le]=he.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(me,Be,ke){var Ce=me("./_export"),Le=me("./_task");Ce(Ce.G+Ce.B,{setImmediate:Le.set,clearImmediate:Le.clear})},{"./_export":73,"./_task":120}],153:[function(me,Be,ke){(function(Ce){"use strict";function Le(Pe){return Array.isArray?Array.isArray(Pe):ue(Pe)==="[object Array]"}function he(Pe){return typeof Pe=="boolean"}function ye(Pe){return Pe===null}function xe(Pe){return Pe==null}function ge(Pe){return typeof Pe=="number"}function le(Pe){return typeof Pe=="string"}function ve(Pe){return(Pe===void 0?"undefined":(0,we.default)(Pe))==="symbol"}function de(Pe){return Pe===void 0}function ce(Pe){return ue(Pe)==="[object RegExp]"}function z(Pe){return(Pe===void 0?"undefined":(0,we.default)(Pe))==="object"&&Pe!==null}function ee(Pe){return ue(Pe)==="[object Date]"}function oe(Pe){return ue(Pe)==="[object Error]"||Pe instanceof Error}function ie(Pe){return typeof Pe=="function"}function se(Pe){return Pe===null||typeof Pe=="boolean"||typeof Pe=="number"||typeof Pe=="string"||(Pe===void 0?"undefined":(0,we.default)(Pe))==="symbol"||Pe===void 0}function ue(Pe){return Object.prototype.toString.call(Pe)}var Se=me("babel-runtime/helpers/typeof"),we=function(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}(Se);ke.isArray=Le,ke.isBoolean=he,ke.isNull=ye,ke.isNullOrUndefined=xe,ke.isNumber=ge,ke.isString=le,ke.isSymbol=ve,ke.isUndefined=de,ke.isRegExp=ce,ke.isObject=z,ke.isDate=ee,ke.isError=oe,ke.isFunction=ie,ke.isPrimitive=se,ke.isBuffer=Ce.isBuffer}).call(this,{isBuffer:me("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/helpers/typeof"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(he){function ye(de,ce){for(de=String(de),ce=ce||2;de.length<ce;)de="0"+de;return de}function xe(de){var ce=new Date(de.getFullYear(),de.getMonth(),de.getDate());ce.setDate(ce.getDate()-(ce.getDay()+6)%7+3);var z=new Date(ce.getFullYear(),0,4);z.setDate(z.getDate()-(z.getDay()+6)%7+3);var ee=ce.getTimezoneOffset()-z.getTimezoneOffset();ce.setHours(ce.getHours()-ee);var oe=(ce-z)/6048e5;return 1+Math.floor(oe)}function ge(de){var ce=de.getDay();return ce===0&&(ce=7),ce}function le(de){return de===null?"null":de===void 0?"undefined":(de===void 0?"undefined":(0,Le.default)(de))!=="object"?de===void 0?"undefined":(0,Le.default)(de):Array.isArray(de)?"array":{}.toString.call(de).slice(8,-1).toLowerCase()}var ve=function(){var de=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,ce=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,z=/[^-+\dA-Z]/g;return function(ee,oe,ie,se){if(arguments.length!==1||le(ee)!=="string"||/\d/.test(ee)||(oe=ee,ee=void 0),ee=ee||new Date,ee instanceof Date||(ee=new Date(ee)),isNaN(ee))throw TypeError("Invalid date");oe=String(ve.masks[oe]||oe||ve.masks.default);var ue=oe.slice(0,4);ue!=="UTC:"&&ue!=="GMT:"||(oe=oe.slice(4),ie=!0,ue==="GMT:"&&(se=!0));var Se=ie?"getUTC":"get",we=ee[Se+"Date"](),Pe=ee[Se+"Day"](),Ae=ee[Se+"Month"](),De=ee[Se+"FullYear"](),ze=ee[Se+"Hours"](),Ze=ee[Se+"Minutes"](),Xe=ee[Se+"Seconds"](),Ge=ee[Se+"Milliseconds"](),ft=ie?0:ee.getTimezoneOffset(),at=xe(ee),Ct=ge(ee),et={d:we,dd:ye(we),ddd:ve.i18n.dayNames[Pe],dddd:ve.i18n.dayNames[Pe+7],m:Ae+1,mm:ye(Ae+1),mmm:ve.i18n.monthNames[Ae],mmmm:ve.i18n.monthNames[Ae+12],yy:String(De).slice(2),yyyy:De,h:ze%12||12,hh:ye(ze%12||12),H:ze,HH:ye(ze),M:Ze,MM:ye(Ze),s:Xe,ss:ye(Xe),l:ye(Ge,3),L:ye(Math.round(Ge/10)),t:ze<12?"a":"p",tt:ze<12?"am":"pm",T:ze<12?"A":"P",TT:ze<12?"AM":"PM",Z:se?"GMT":ie?"UTC":(String(ee).match(ce)||[""]).pop().replace(z,""),o:(ft>0?"-":"+")+ye(100*Math.floor(Math.abs(ft)/60)+Math.abs(ft)%60,4),S:["th","st","nd","rd"][we%10>3?0:(we%100-we%10!=10)*we%10],W:at,N:Ct};return oe.replace(de,function(yt){return yt in et?et[yt]:yt.slice(1,yt.length-1)})}}();ve.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},ve.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof Me=="function"&&Me.amd?Me(function(){return ve}):(ke===void 0?"undefined":(0,Le.default)(ke))==="object"?Be.exports=ve:he.dateFormat=ve})(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(me,Be,ke){(function(Ce){function Le(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function he(le){var ve=this.useColors;if(le[0]=(ve?"%c":"")+this.namespace+(ve?" %c":" ")+le[0]+(ve?"%c ":" ")+"+"+ke.humanize(this.diff),ve){var de="color: "+this.color;le.splice(1,0,de,"color: inherit");var ce=0,z=0;le[0].replace(/%[a-zA-Z%]/g,function(ee){ee!=="%%"&&(ce++,ee==="%c"&&(z=ce))}),le.splice(z,0,de)}}function ye(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function xe(le){try{le==null?ke.storage.removeItem("debug"):ke.storage.debug=le}catch(ve){}}function ge(){var le;try{le=ke.storage.debug}catch(ve){}return!le&&Ce!==void 0&&"env"in Ce&&(le=Ce.env.DEBUG),le}ke=Be.exports=me("./debug"),ke.log=ye,ke.formatArgs=he,ke.save=xe,ke.load=ge,ke.useColors=Le,ke.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(le){}}(),ke.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],ke.formatters.j=function(le){try{return JSON.stringify(le)}catch(ve){return"[UnexpectedJSONParseError]: "+ve.message}},ke.enable(ge())}).call(this,me("_process"))},{"./debug":156,_process:173}],156:[function(me,Be,ke){function Ce(ve){var de,ce=0;for(de in ve)ce=(ce<<5)-ce+ve.charCodeAt(de),ce|=0;return ke.colors[Math.abs(ce)%ke.colors.length]}function Le(ve){function de(){if(de.enabled){var ce=de,z=+new Date,ee=z-(le||z);ce.diff=ee,ce.prev=le,ce.curr=z,le=z;for(var oe=new Array(arguments.length),ie=0;ie<oe.length;ie++)oe[ie]=arguments[ie];oe[0]=ke.coerce(oe[0]),typeof oe[0]!="string"&&oe.unshift("%O");var se=0;oe[0]=oe[0].replace(/%([a-zA-Z%])/g,function(ue,Se){if(ue==="%%")return ue;se++;var we=ke.formatters[Se];if(typeof we=="function"){var Pe=oe[se];ue=we.call(ce,Pe),oe.splice(se,1),se--}return ue}),ke.formatArgs.call(ce,oe),(de.log||ke.log||console.log.bind(console)).apply(ce,oe)}}return de.namespace=ve,de.enabled=ke.enabled(ve),de.useColors=ke.useColors(),de.color=Ce(ve),typeof ke.init=="function"&&ke.init(de),de}function he(ve){ke.save(ve),ke.names=[],ke.skips=[];for(var de=(typeof ve=="string"?ve:"").split(/[\s,]+/),ce=de.length,z=0;z<ce;z++)de[z]&&(ve=de[z].replace(/\*/g,".*?"),ve[0]==="-"?ke.skips.push(new RegExp("^"+ve.substr(1)+"$")):ke.names.push(new RegExp("^"+ve+"$")))}function ye(){ke.enable("")}function xe(ve){var de,ce;for(de=0,ce=ke.skips.length;de<ce;de++)if(ke.skips[de].test(ve))return!1;for(de=0,ce=ke.names.length;de<ce;de++)if(ke.names[de].test(ve))return!0;return!1}function ge(ve){return ve instanceof Error?ve.stack||ve.message:ve}ke=Be.exports=Le.debug=Le.default=Le,ke.coerce=ge,ke.disable=ye,ke.enable=he,ke.enabled=xe,ke.humanize=me("ms"),ke.names=[],ke.skips=[],ke.formatters={};var le},{ms:169}],157:[function(me,Be,ke){"use strict";function Ce(he){var ye=""+he,xe=Le.exec(ye);if(!xe)return ye;var ge,le="",ve=0,de=0;for(ve=xe.index;ve<ye.length;ve++){switch(ye.charCodeAt(ve)){case 34:ge=""";break;case 38:ge="&";break;case 39:ge="'";break;case 60:ge="<";break;case 62:ge=">";break;default:continue}de!==ve&&(le+=ye.substring(de,ve)),de=ve+1,le+=ge}return de!==ve?le+ye.substring(de,ve):le}var Le=/["'&<>]/;Be.exports=Ce},{}],158:[function(me,Be,ke){function Ce(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function Le(ge){return typeof ge=="function"}function he(ge){return typeof ge=="number"}function ye(ge){return typeof ge=="object"&&ge!==null}function xe(ge){return ge===void 0}Be.exports=Ce,Ce.EventEmitter=Ce,Ce.prototype._events=void 0,Ce.prototype._maxListeners=void 0,Ce.defaultMaxListeners=10,Ce.prototype.setMaxListeners=function(ge){if(!he(ge)||ge<0||isNaN(ge))throw TypeError("n must be a positive number");return this._maxListeners=ge,this},Ce.prototype.emit=function(ge){var le,ve,de,ce,z,ee;if(this._events||(this._events={}),ge==="error"&&(!this._events.error||ye(this._events.error)&&!this._events.error.length)){if((le=arguments[1])instanceof Error)throw le;var oe=new Error('Uncaught, unspecified "error" event. ('+le+")");throw oe.context=le,oe}if(ve=this._events[ge],xe(ve))return!1;if(Le(ve))switch(arguments.length){case 1:ve.call(this);break;case 2:ve.call(this,arguments[1]);break;case 3:ve.call(this,arguments[1],arguments[2]);break;default:ce=Array.prototype.slice.call(arguments,1),ve.apply(this,ce)}else if(ye(ve))for(ce=Array.prototype.slice.call(arguments,1),ee=ve.slice(),de=ee.length,z=0;z<de;z++)ee[z].apply(this,ce);return!0},Ce.prototype.addListener=function(ge,le){var ve;if(!Le(le))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",ge,Le(le.listener)?le.listener:le),this._events[ge]?ye(this._events[ge])?this._events[ge].push(le):this._events[ge]=[this._events[ge],le]:this._events[ge]=le,ye(this._events[ge])&&!this._events[ge].warned&&(ve=xe(this._maxListeners)?Ce.defaultMaxListeners:this._maxListeners)&&ve>0&&this._events[ge].length>ve&&(this._events[ge].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[ge].length),typeof console.trace=="function"&&console.trace()),this},Ce.prototype.on=Ce.prototype.addListener,Ce.prototype.once=function(ge,le){function ve(){this.removeListener(ge,ve),de||(de=!0,le.apply(this,arguments))}if(!Le(le))throw TypeError("listener must be a function");var de=!1;return ve.listener=le,this.on(ge,ve),this},Ce.prototype.removeListener=function(ge,le){var ve,de,ce,z;if(!Le(le))throw TypeError("listener must be a function");if(!this._events||!this._events[ge])return this;if(ve=this._events[ge],ce=ve.length,de=-1,ve===le||Le(ve.listener)&&ve.listener===le)delete this._events[ge],this._events.removeListener&&this.emit("removeListener",ge,le);else if(ye(ve)){for(z=ce;z-- >0;)if(ve[z]===le||ve[z].listener&&ve[z].listener===le){de=z;break}if(de<0)return this;ve.length===1?(ve.length=0,delete this._events[ge]):ve.splice(de,1),this._events.removeListener&&this.emit("removeListener",ge,le)}return this},Ce.prototype.removeAllListeners=function(ge){var le,ve;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[ge]&&delete this._events[ge],this;if(arguments.length===0){for(le in this._events)le!=="removeListener"&&this.removeAllListeners(le);return this.removeAllListeners("removeListener"),this._events={},this}if(ve=this._events[ge],Le(ve))this.removeListener(ge,ve);else if(ve)for(;ve.length;)this.removeListener(ge,ve[ve.length-1]);return delete this._events[ge],this},Ce.prototype.listeners=function(ge){return this._events&&this._events[ge]?Le(this._events[ge])?[this._events[ge]]:this._events[ge].slice():[]},Ce.prototype.listenerCount=function(ge){if(this._events){var le=this._events[ge];if(Le(le))return 1;if(le)return le.length}return 0},Ce.listenerCount=function(ge,le){return ge.listenerCount(le)}},{}],159:[function(me,Be,ke){var Ce=me("http"),Le=Be.exports;for(var he in Ce)Ce.hasOwnProperty(he)&&(Le[he]=Ce[he]);Le.request=function(ye,xe){return ye||(ye={}),ye.scheme="https",ye.protocol="https:",Ce.request.call(this,ye,xe)}},{http:196}],160:[function(me,Be,ke){"use strict";var Ce=me("util"),Le=me("ms");Be.exports=function(he){if(typeof he=="number")return he;var ye=Le(he);if(ye===void 0){var xe=new Error(Ce.format("humanize-ms(%j) result undefined",he));console.warn(xe.stack)}return ye}},{ms:169,util:207}],161:[function(me,Be,ke){ke.read=function(Ce,Le,he,ye,xe){var ge,le,ve=8*xe-ye-1,de=(1<<ve)-1,ce=de>>1,z=-7,ee=he?xe-1:0,oe=he?-1:1,ie=Ce[Le+ee];for(ee+=oe,ge=ie&(1<<-z)-1,ie>>=-z,z+=ve;z>0;ge=256*ge+Ce[Le+ee],ee+=oe,z-=8);for(le=ge&(1<<-z)-1,ge>>=-z,z+=ye;z>0;le=256*le+Ce[Le+ee],ee+=oe,z-=8);if(ge===0)ge=1-ce;else{if(ge===de)return le?NaN:1/0*(ie?-1:1);le+=Math.pow(2,ye),ge-=ce}return(ie?-1:1)*le*Math.pow(2,ge-ye)},ke.write=function(Ce,Le,he,ye,xe,ge){var le,ve,de,ce=8*ge-xe-1,z=(1<<ce)-1,ee=z>>1,oe=xe===23?Math.pow(2,-24)-Math.pow(2,-77):0,ie=ye?0:ge-1,se=ye?1:-1,ue=Le<0||Le===0&&1/Le<0?1:0;for(Le=Math.abs(Le),isNaN(Le)||Le===1/0?(ve=isNaN(Le)?1:0,le=z):(le=Math.floor(Math.log(Le)/Math.LN2),Le*(de=Math.pow(2,-le))<1&&(le--,de*=2),Le+=le+ee>=1?oe/de:oe*Math.pow(2,1-ee),Le*de>=2&&(le++,de/=2),le+ee>=z?(ve=0,le=z):le+ee>=1?(ve=(Le*de-1)*Math.pow(2,xe),le+=ee):(ve=Le*Math.pow(2,ee-1)*Math.pow(2,xe),le=0));xe>=8;Ce[he+ie]=255&ve,ie+=se,ve/=256,xe-=8);for(le=le<<xe|ve,ce+=xe;ce>0;Ce[he+ie]=255&le,ie+=se,le/=256,ce-=8);Ce[he+ie-se]|=128*ue}},{}],162:[function(me,Be,ke){typeof Object.create=="function"?Be.exports=function(Ce,Le){Ce.super_=Le,Ce.prototype=Object.create(Le.prototype,{constructor:{value:Ce,enumerable:!1,writable:!0,configurable:!0}})}:Be.exports=function(Ce,Le){Ce.super_=Le;var he=function(){};he.prototype=Le.prototype,Ce.prototype=new he,Ce.prototype.constructor=Ce}},{}],163:[function(me,Be,ke){function Ce(he){return!!he.constructor&&typeof he.constructor.isBuffer=="function"&&he.constructor.isBuffer(he)}function Le(he){return typeof he.readFloatLE=="function"&&typeof he.slice=="function"&&Ce(he.slice(0,0))}Be.exports=function(he){return he!=null&&(Ce(he)||Le(he)||!!he._isBuffer)}},{}],164:[function(me,Be,ke){(function(Ce){function Le(xe){return ye.call(xe).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function he(xe){return typeof xe=="function"&&(/^class(\s|\{\}$)/.test(ye.call(xe))||/^.*classCallCheck\(/.test(Le(xe)))}var ye=Function.prototype.toString;ke!==void 0?(Be!==void 0&&Be.exports&&(ke=Be.exports=he),ke.isClass=he):typeof Me=="function"&&Me.amd?Me([],function(){return he}):Ce.isClass=he})(this)},{}],165:[function(me,Be,ke){"use strict";function Ce(ge){var le=ge.slice(2);return le=le[0].toLowerCase()+le.slice(1)}var Le=me("core-util-is"),he=me("isstream"),ye=me("is-class");Object.keys(Le).map(function(ge){ke[Ce(ge)]=Le[ge]}),ke.stream=he,ke.readableStream=he.isReadable,ke.writableStream=he.isWritable,ke.duplexStream=he.isDuplex,ke.class=ye,ke.finite=function(ge){return Number.isFinite(ge)},ke.NaN=function(ge){return Number.isNaN(ge)},ke.generator=function(ge){return ge&&typeof ge.next=="function"&&typeof ge.throw=="function"},ke.generatorFunction=function(ge){return ge&&ge.constructor&&ge.constructor.name==="GeneratorFunction"},ke.asyncFunction=function(ge){return ge&&ge.constructor&&ge.constructor.name==="AsyncFunction"},ke.promise=function(ge){return ge&&typeof ge.then=="function"};var xe=Math.pow(2,31);ke.int=function(ge){return Le.isNumber(ge)&&ge%1==0},ke.int32=function(ge){return ke.int(ge)&&ge<xe&&ge>=-xe},ke.long=function(ge){return ke.int(ge)&&(ge>=xe||ge<-xe)},ke.Long=function(ge){return ke.object(ge)&&ke.number(ge.high)&&ke.number(ge.low)},ke.double=function(ge){return Le.isNumber(ge)&&!isNaN(ge)&&ge%1!=0},ke.date=function(ge){return ge instanceof Date},ke.regExp=function(ge){return ge instanceof RegExp},ke.regexp=ke.regExp,ke.error=function(ge){return ge instanceof Error},ke.array=function(ge){return Array.isArray(ge)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(me,Be,ke){var Ce={}.toString;Be.exports=Array.isArray||function(Le){return Ce.call(Le)=="[object Array]"}},{}],167:[function(me,Be,ke){function Ce(ge){return ge instanceof xe.Stream}function Le(ge){return Ce(ge)&&typeof ge._read=="function"&&typeof ge._readableState=="object"}function he(ge){return Ce(ge)&&typeof ge._write=="function"&&typeof ge._writableState=="object"}function ye(ge){return Le(ge)&&he(ge)}var xe=me("stream");Be.exports=Ce,Be.exports.isReadable=Le,Be.exports.isWritable=he,Be.exports.isDuplex=ye},{stream:195}],168:[function(me,Be,ke){"use strict";function Ce(he,ye,xe){if(!he)throw new TypeError("argument dest is required");if(!ye)throw new TypeError("argument src is required");return xe===void 0&&(xe=!0),Object.getOwnPropertyNames(ye).forEach(function(ge){if(xe||!Le.call(he,ge)){var le=Object.getOwnPropertyDescriptor(ye,ge);Object.defineProperty(he,ge,le)}}),he}Be.exports=Ce;var Le=Object.prototype.hasOwnProperty},{}],169:[function(me,Be,ke){function Ce(ce){if(ce=String(ce),!(ce.length>100)){var z=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(ce);if(z){var ee=parseFloat(z[1]);switch((z[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return ee*de;case"days":case"day":case"d":return ee*ve;case"hours":case"hour":case"hrs":case"hr":case"h":return ee*le;case"minutes":case"minute":case"mins":case"min":case"m":return ee*ge;case"seconds":case"second":case"secs":case"sec":case"s":return ee*xe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return ee;default:return}}}}function Le(ce){return ce>=ve?Math.round(ce/ve)+"d":ce>=le?Math.round(ce/le)+"h":ce>=ge?Math.round(ce/ge)+"m":ce>=xe?Math.round(ce/xe)+"s":ce+"ms"}function he(ce){return ye(ce,ve,"day")||ye(ce,le,"hour")||ye(ce,ge,"minute")||ye(ce,xe,"second")||ce+" ms"}function ye(ce,z,ee){if(!(ce<z))return ce<1.5*z?Math.floor(ce/z)+" "+ee:Math.ceil(ce/z)+" "+ee+"s"}var xe=1e3,ge=60*xe,le=60*ge,ve=24*le,de=365.25*ve;Be.exports=function(ce,z){z=z||{};var ee=typeof ce;if(ee==="string"&&ce.length>0)return Ce(ce);if(ee==="number"&&isNaN(ce)===!1)return z.long?he(ce):Le(ce);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ce))}},{}],170:[function(me,Be,ke){(function(Ce){function Le(ge,le){for(var ve=0,de=ge.length-1;de>=0;de--){var ce=ge[de];ce==="."?ge.splice(de,1):ce===".."?(ge.splice(de,1),ve++):ve&&(ge.splice(de,1),ve--)}if(le)for(;ve--;ve)ge.unshift("..");return ge}function he(ge){typeof ge!="string"&&(ge+="");var le,ve=0,de=-1,ce=!0;for(le=ge.length-1;le>=0;--le)if(ge.charCodeAt(le)===47){if(!ce){ve=le+1;break}}else de===-1&&(ce=!1,de=le+1);return de===-1?"":ge.slice(ve,de)}function ye(ge,le){if(ge.filter)return ge.filter(le);for(var ve=[],de=0;de<ge.length;de++)le(ge[de],de,ge)&&ve.push(ge[de]);return ve}ke.resolve=function(){for(var ge="",le=!1,ve=arguments.length-1;ve>=-1&&!le;ve--){var de=ve>=0?arguments[ve]:Ce.cwd();if(typeof de!="string")throw new TypeError("Arguments to path.resolve must be strings");de&&(ge=de+"/"+ge,le=de.charAt(0)==="/")}return ge=Le(ye(ge.split("/"),function(ce){return!!ce}),!le).join("/"),(le?"/":"")+ge||"."},ke.normalize=function(ge){var le=ke.isAbsolute(ge),ve=xe(ge,-1)==="/";return ge=Le(ye(ge.split("/"),function(de){return!!de}),!le).join("/"),ge||le||(ge="."),ge&&ve&&(ge+="/"),(le?"/":"")+ge},ke.isAbsolute=function(ge){return ge.charAt(0)==="/"},ke.join=function(){var ge=Array.prototype.slice.call(arguments,0);return ke.normalize(ye(ge,function(le,ve){if(typeof le!="string")throw new TypeError("Arguments to path.join must be strings");return le}).join("/"))},ke.relative=function(ge,le){function ve(se){for(var ue=0;ue<se.length&&se[ue]==="";ue++);for(var Se=se.length-1;Se>=0&&se[Se]==="";Se--);return ue>Se?[]:se.slice(ue,Se-ue+1)}ge=ke.resolve(ge).substr(1),le=ke.resolve(le).substr(1);for(var de=ve(ge.split("/")),ce=ve(le.split("/")),z=Math.min(de.length,ce.length),ee=z,oe=0;oe<z;oe++)if(de[oe]!==ce[oe]){ee=oe;break}for(var ie=[],oe=ee;oe<de.length;oe++)ie.push("..");return ie=ie.concat(ce.slice(ee)),ie.join("/")},ke.sep="/",ke.delimiter=":",ke.dirname=function(ge){if(typeof ge!="string"&&(ge+=""),ge.length===0)return".";for(var le=ge.charCodeAt(0),ve=le===47,de=-1,ce=!0,z=ge.length-1;z>=1;--z)if((le=ge.charCodeAt(z))===47){if(!ce){de=z;break}}else ce=!1;return de===-1?ve?"/":".":ve&&de===1?"/":ge.slice(0,de)},ke.basename=function(ge,le){var ve=he(ge);return le&&ve.substr(-1*le.length)===le&&(ve=ve.substr(0,ve.length-le.length)),ve},ke.extname=function(ge){typeof ge!="string"&&(ge+="");for(var le=-1,ve=0,de=-1,ce=!0,z=0,ee=ge.length-1;ee>=0;--ee){var oe=ge.charCodeAt(ee);if(oe!==47)de===-1&&(ce=!1,de=ee+1),oe===46?le===-1?le=ee:z!==1&&(z=1):le!==-1&&(z=-1);else if(!ce){ve=ee+1;break}}return le===-1||de===-1||z===0||z===1&&le===de-1&&le===ve+1?"":ge.slice(le,de)};var xe=function(ge,le,ve){return ge.substr(le,ve)}}).call(this,me("_process"))},{_process:173}],171:[function(me,Be,ke){(function(Ce){(function(){"use strict";function Le(Xe){return Xe=String(Xe),Xe.charAt(0).toUpperCase()+Xe.slice(1)}function he(Xe,Ge,ft){var at={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Ge&&ft&&/^Win/i.test(Xe)&&!/^Windows Phone /i.test(Xe)&&(at=at[/[\d.]+$/.exec(Xe)])&&(Xe="Windows "+at),Xe=String(Xe),Ge&&ft&&(Xe=Xe.replace(RegExp(Ge,"i"),ft)),Xe=xe(Xe.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function ye(Xe,Ge){var ft=-1,at=Xe?Xe.length:0;if(typeof at=="number"&&at>-1&&at<=we)for(;++ft<at;)Ge(Xe[ft],ft,Xe);else ge(Xe,Ge)}function xe(Xe){return Xe=z(Xe),/^(?:webOS|i(?:OS|P))/.test(Xe)?Xe:Le(Xe)}function ge(Xe,Ge){for(var ft in Xe)De.call(Xe,ft)&&Ge(Xe[ft],ft,Xe)}function le(Xe){return Xe==null?Le(Xe):ze.call(Xe).slice(8,-1)}function ve(Xe,Ge){var ft=Xe!=null?typeof Xe[Ge]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(ft)||ft=="object"&&!Xe[Ge])}function de(Xe){return String(Xe).replace(/([ -])(?!$)/g,"$1?")}function ce(Xe,Ge){var ft=null;return ye(Xe,function(at,Ct){ft=Ge(ft,at,Ct,Xe)}),ft}function z(Xe){return String(Xe).replace(/^ +| +$/g,"")}function ee(Xe){function Ge(We){return ce(We,function(Oe,be){var Ne=be.pattern||de(be);return!Oe&&(Oe=RegExp("\\b"+Ne+" *\\d+[.\\w_]*","i").exec(Xe)||RegExp("\\b"+Ne+" *\\w+-[\\w]*","i").exec(Xe)||RegExp("\\b"+Ne+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Xe))&&((Oe=String(be.label&&!RegExp(Ne,"i").test(be.label)?be.label:Oe).split("/"))[1]&&!/[\d.]+/.test(Oe[0])&&(Oe[0]+=" "+Oe[1]),be=be.label||be,Oe=xe(Oe[0].replace(RegExp(Ne,"i"),be).replace(RegExp("; *(?:"+be+"[_-])?","i")," ").replace(RegExp("("+be+")[-_.]?(\\w)","i"),"$1 $2"))),Oe})}function ft(){return this.description||""}var at=ie,Ct=Xe&&typeof Xe=="object"&&le(Xe)!="String";Ct&&(at=Xe,Xe=null);var et=at.navigator||{},yt=et.userAgent||"";Xe||(Xe=yt);var st,zt,lt=Ct?!!et.likeChrome:/\bChrome\b/.test(Xe)&&!/internal|\n/i.test(ze.toString()),tt=Ct?"Object":"ScriptBridgingProxyObject",ut=Ct?"Object":"Environment",mt=Ct&&at.java?"JavaPackage":le(at.java),Pt=Ct?"Object":"RuntimeObject",gt=/\bJava/.test(mt)&&at.java,Ft=gt&&le(at.environment)==ut,Ht=gt?"a":"\u4F2A",hn=gt?"b":"\u5C3E",Qt=at.document||{},bn=at.operamini||at.opera,Wt=Pe.test(Wt=Ct&&bn?bn["[[Class]]"]:le(bn))?Wt:bn=null,Kt=Xe,Jt=[],Yt=null,kt=Xe==yt,pt=kt&&bn&&typeof bn.version=="function"&&bn.version(),Bt=function(We){return ce(We,function(Oe,be){return Oe||RegExp("\\b"+(be.pattern||de(be))+"\\b","i").exec(Xe)&&(be.label||be)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),xt=function(We){return ce(We,function(Oe,be){return Oe||RegExp("\\b"+(be.pattern||de(be))+"\\b","i").exec(Xe)&&(be.label||be)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),vt=Ge([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),nt=function(We){return ce(We,function(Oe,be,Ne){return Oe||(be[vt]||be[/^[a-z]+(?: +[a-z]+\b)*/i.exec(vt)]||RegExp("\\b"+de(Ne)+"(?:\\b|\\w*\\d)","i").exec(Xe))&&Ne})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),He=function(We){return ce(We,function(Oe,be){var Ne=be.pattern||de(be);return!Oe&&(Oe=RegExp("\\b"+Ne+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Xe))&&(Oe=he(Oe,Ne,be.label||be)),Oe})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(Bt&&(Bt=[Bt]),nt&&!vt&&(vt=Ge([nt])),(st=/\bGoogle TV\b/.exec(vt))&&(vt=st[0]),/\bSimulator\b/i.test(Xe)&&(vt=(vt?vt+" ":"")+"Simulator"),xt=="Opera Mini"&&/\bOPiOS\b/.test(Xe)&&Jt.push("running in Turbo/Uncompressed mode"),xt=="IE"&&/\blike iPhone OS\b/.test(Xe)?(st=ee(Xe.replace(/like iPhone OS/,"")),nt=st.manufacturer,vt=st.product):/^iP/.test(vt)?(xt||(xt="Safari"),He="iOS"+((st=/ OS ([\d_]+)/i.exec(Xe))?" "+st[1].replace(/_/g,"."):"")):xt!="Konqueror"||/buntu/i.test(He)?nt&&nt!="Google"&&(/Chrome/.test(xt)&&!/\bMobile Safari\b/i.test(Xe)||/\bVita\b/.test(vt))||/\bAndroid\b/.test(He)&&/^Chrome/.test(xt)&&/\bVersion\//i.test(Xe)?(xt="Android Browser",He=/\bAndroid\b/.test(He)?He:"Android"):xt=="Silk"?(/\bMobi/i.test(Xe)||(He="Android",Jt.unshift("desktop mode")),/Accelerated *= *true/i.test(Xe)&&Jt.unshift("accelerated")):xt=="PaleMoon"&&(st=/\bFirefox\/([\d.]+)\b/.exec(Xe))?Jt.push("identifying as Firefox "+st[1]):xt=="Firefox"&&(st=/\b(Mobile|Tablet|TV)\b/i.exec(Xe))?(He||(He="Firefox OS"),vt||(vt=st[1])):!xt||(st=!/\bMinefield\b/i.test(Xe)&&/\b(?:Firefox|Safari)\b/.exec(xt))?(xt&&!vt&&/[\/,]|^[^(]+?\)/.test(Xe.slice(Xe.indexOf(st+"/")+8))&&(xt=null),(st=vt||nt||He)&&(vt||nt||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(He))&&(xt=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(He)?He:st)+" Browser")):xt=="Electron"&&(st=(/\bChrome\/([\d.]+)\b/.exec(Xe)||0)[1])&&Jt.push("Chromium "+st):He="Kubuntu",pt||(pt=function(We){return ce(We,function(Oe,be){return Oe||(RegExp(be+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Xe)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",de(xt),"(?:Firefox|Minefield|NetFront)"])),(st=Bt=="iCab"&&parseFloat(pt)>3&&"WebKit"||/\bOpera\b/.test(xt)&&(/\bOPR\b/.test(Xe)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Xe)&&!/^(?:Trident|EdgeHTML)$/.test(Bt)&&"WebKit"||!Bt&&/\bMSIE\b/i.test(Xe)&&(He=="Mac OS"?"Tasman":"Trident")||Bt=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(xt)&&"NetFront")&&(Bt=[st]),xt=="IE"&&(st=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Xe)||0)[1])?(xt+=" Mobile",He="Windows Phone "+(/\+$/.test(st)?st:st+".x"),Jt.unshift("desktop mode")):/\bWPDesktop\b/i.test(Xe)?(xt="IE Mobile",He="Windows Phone 8.x",Jt.unshift("desktop mode"),pt||(pt=(/\brv:([\d.]+)/.exec(Xe)||0)[1])):xt!="IE"&&Bt=="Trident"&&(st=/\brv:([\d.]+)/.exec(Xe))&&(xt&&Jt.push("identifying as "+xt+(pt?" "+pt:"")),xt="IE",pt=st[1]),kt){if(ve(at,"global"))if(gt&&(st=gt.lang.System,Kt=st.getProperty("os.arch"),He=He||st.getProperty("os.name")+" "+st.getProperty("os.version")),Ft){try{pt=at.require("ringo/engine").version.join("."),xt="RingoJS"}catch(We){(st=at.system)&&st.global.system==at.system&&(xt="Narwhal",He||(He=st[0].os||null))}xt||(xt="Rhino")}else typeof at.process=="object"&&!at.process.browser&&(st=at.process)&&(typeof st.versions=="object"&&(typeof st.versions.electron=="string"?(Jt.push("Node "+st.versions.node),xt="Electron",pt=st.versions.electron):typeof st.versions.nw=="string"&&(Jt.push("Chromium "+pt,"Node "+st.versions.node),xt="NW.js",pt=st.versions.nw)),xt||(xt="Node.js",Kt=st.arch,He=st.platform,pt=/[\d.]+/.exec(st.version),pt=pt?pt[0]:null));else le(st=at.runtime)==tt?(xt="Adobe AIR",He=st.flash.system.Capabilities.os):le(st=at.phantom)==Pt?(xt="PhantomJS",pt=(st=st.version||null)&&st.major+"."+st.minor+"."+st.patch):typeof Qt.documentMode=="number"&&(st=/\bTrident\/(\d+)/i.exec(Xe))?(pt=[pt,Qt.documentMode],(st=+st[1]+4)!=pt[1]&&(Jt.push("IE "+pt[1]+" mode"),Bt&&(Bt[1]=""),pt[1]=st),pt=xt=="IE"?String(pt[1].toFixed(1)):pt[0]):typeof Qt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(xt)&&(Jt.push("masking as "+xt+" "+pt),xt="IE",pt="11.0",Bt=["Trident"],He="Windows");He=He&&xe(He)}if(pt&&(st=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(pt)||/(?:alpha|beta)(?: ?\d)?/i.exec(Xe+";"+(kt&&et.appMinorVersion))||/\bMinefield\b/i.test(Xe)&&"a")&&(Yt=/b/i.test(st)?"beta":"alpha",pt=pt.replace(RegExp(st+"\\+?$"),"")+(Yt=="beta"?hn:Ht)+(/\d+\+?/.exec(st)||"")),xt=="Fennec"||xt=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(He))xt="Firefox Mobile";else if(xt=="Maxthon"&&pt)pt=pt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(vt))vt=="Xbox 360"&&(He=null),vt=="Xbox 360"&&/\bIEMobile\b/.test(Xe)&&Jt.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(xt)&&(!xt||vt||/Browser|Mobi/.test(xt))||He!="Windows CE"&&!/Mobi/i.test(Xe))if(xt=="IE"&&kt)try{at.external===null&&Jt.unshift("platform preview")}catch(We){Jt.unshift("embedded")}else(/\bBlackBerry\b/.test(vt)||/\bBB10\b/.test(Xe))&&(st=(RegExp(vt.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Xe)||0)[1]||pt)?(st=[st,/BB10/.test(Xe)],He=(st[1]?(vt=null,nt="BlackBerry"):"Device Software")+" "+st[0],pt=null):this!=ge&&vt!="Wii"&&(kt&&bn||/Opera/.test(xt)&&/\b(?:MSIE|Firefox)\b/i.test(Xe)||xt=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(He)||xt=="IE"&&(He&&!/^Win/.test(He)&&pt>5.5||/\bWindows XP\b/.test(He)&&pt>8||pt==8&&!/\bTrident\b/.test(Xe)))&&!Pe.test(st=ee.call(ge,Xe.replace(Pe,"")+";"))&&st.name&&(st="ing as "+st.name+((st=st.version)?" "+st:""),Pe.test(xt)?(/\bIE\b/.test(st)&&He=="Mac OS"&&(He=null),st="identify"+st):(st="mask"+st,xt=Wt?xe(Wt.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(st)&&(He=null),kt||(pt=null)),Bt=["Presto"],Jt.push(st));else xt+=" Mobile";(st=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Xe)||0)[1])&&(st=[parseFloat(st.replace(/\.(\d)$/,".0$1")),st],xt=="Safari"&&st[1].slice(-1)=="+"?(xt="WebKit Nightly",Yt="alpha",pt=st[1].slice(0,-1)):pt!=st[1]&&pt!=(st[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Xe)||0)[1])||(pt=null),st[1]=(/\bChrome\/([\d.]+)/i.exec(Xe)||0)[1],st[0]==537.36&&st[2]==537.36&&parseFloat(st[1])>=28&&Bt=="WebKit"&&(Bt=["Blink"]),kt&&(lt||st[1])?(Bt&&(Bt[1]="like Chrome"),st=st[1]||(st=st[0],st<530?1:st<532?2:st<532.05?3:st<533?4:st<534.03?5:st<534.07?6:st<534.1?7:st<534.13?8:st<534.16?9:st<534.24?10:st<534.3?11:st<535.01?12:st<535.02?"13+":st<535.07?15:st<535.11?16:st<535.19?17:st<536.05?18:st<536.1?19:st<537.01?20:st<537.11?"21+":st<537.13?23:st<537.18?24:st<537.24?25:st<537.36?26:Bt!="Blink"?"27":"28")):(Bt&&(Bt[1]="like Safari"),st=st[0],st=st<400?1:st<500?2:st<526?3:st<533?4:st<534?"4+":st<535?5:st<537?6:st<538?7:st<601?8:"8"),Bt&&(Bt[1]+=" "+(st+=typeof st=="number"?".x":/[.+]/.test(st)?"":"+")),xt=="Safari"&&(!pt||parseInt(pt)>45)&&(pt=st)),xt=="Opera"&&(st=/\bzbov|zvav$/.exec(He))?(xt+=" ",Jt.unshift("desktop mode"),st=="zvav"?(xt+="Mini",pt=null):xt+="Mobile",He=He.replace(RegExp(" *"+st+"$"),"")):xt=="Safari"&&/\bChrome\b/.exec(Bt&&Bt[1])&&(Jt.unshift("desktop mode"),xt="Chrome Mobile",pt=null,/\bOS X\b/.test(He)?(nt="Apple",He="iOS 4.3+"):He=null),pt&&pt.indexOf(st=/[\d.]+$/.exec(He))==0&&Xe.indexOf("/"+st+"-")>-1&&(He=z(He.replace(st,""))),Bt&&!/\b(?:Avant|Nook)\b/.test(xt)&&(/Browser|Lunascape|Maxthon/.test(xt)||xt!="Safari"&&/^iOS/.test(He)&&/\bSafari\b/.test(Bt[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(xt)&&Bt[1])&&(st=Bt[Bt.length-1])&&Jt.push(st),Jt.length&&(Jt=["("+Jt.join("; ")+")"]),nt&&vt&&vt.indexOf(nt)<0&&Jt.push("on "+nt),vt&&Jt.push((/^on /.test(Jt[Jt.length-1])?"":"on ")+vt),He&&(st=/ ([\d.+]+)$/.exec(He),zt=st&&He.charAt(He.length-st[0].length-1)=="/",He={architecture:32,family:st&&!zt?He.replace(st[0],""):He,version:st?st[1]:null,toString:function(){var We=this.version;return this.family+(We&&!zt?" "+We:"")+(this.architecture==64?" 64-bit":"")}}),(st=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Kt))&&!/\bi686\b/i.test(Kt)?(He&&(He.architecture=64,He.family=He.family.replace(RegExp(" *"+st),"")),xt&&(/\bWOW64\b/i.test(Xe)||kt&&/\w(?:86|32)$/.test(et.cpuClass||et.platform)&&!/\bWin64; x64\b/i.test(Xe))&&Jt.unshift("32-bit")):He&&/^OS X/.test(He.family)&&xt=="Chrome"&&parseFloat(pt)>=39&&(He.architecture=64),Xe||(Xe=null);var Ie={};return Ie.description=Xe,Ie.layout=Bt&&Bt[0],Ie.manufacturer=nt,Ie.name=xt,Ie.prerelease=Yt,Ie.product=vt,Ie.ua=Xe,Ie.version=xt&&pt,Ie.os=He||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ie.parse=ee,Ie.toString=ft,Ie.version&&Jt.unshift(pt),Ie.name&&Jt.unshift(xt),He&&xt&&(He!=String(He).split(" ")[0]||He!=xt.split(" ")[0]&&!vt)&&Jt.push(vt?"("+He+")":"on "+He),Jt.length&&(Ie.description=Jt.join(" ")),Ie}var oe={function:!0,object:!0},ie=oe[typeof window]&&window||this,se=oe[typeof ke]&&ke,ue=oe[typeof Be]&&Be&&!Be.nodeType&&Be,Se=se&&ue&&typeof Ce=="object"&&Ce;!Se||Se.global!==Se&&Se.window!==Se&&Se.self!==Se||(ie=Se);var we=Math.pow(2,53)-1,Pe=/\bOpera/,Ae=Object.prototype,De=Ae.hasOwnProperty,ze=Ae.toString,Ze=ee();typeof Me=="function"&&typeof Me.amd=="object"&&Me.amd?(ie.platform=Ze,Me(function(){return Ze})):se&&ue?ge(Ze,function(Xe,Ge){se[Ge]=Xe}):ie.platform=Ze}).call(this)}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(me,Be,ke){(function(Ce){"use strict";function Le(he,ye,xe,ge){if(typeof he!="function")throw new TypeError('"callback" argument must be a function');var le,ve,de=arguments.length;switch(de){case 0:case 1:return Ce.nextTick(he);case 2:return Ce.nextTick(function(){he.call(null,ye)});case 3:return Ce.nextTick(function(){he.call(null,ye,xe)});case 4:return Ce.nextTick(function(){he.call(null,ye,xe,ge)});default:for(le=new Array(de-1),ve=0;ve<le.length;)le[ve++]=arguments[ve];return Ce.nextTick(function(){he.apply(null,le)})}}!Ce.version||Ce.version.indexOf("v0.")===0||Ce.version.indexOf("v1.")===0&&Ce.version.indexOf("v1.8.")!==0?Be.exports={nextTick:Le}:Be.exports=Ce}).call(this,me("_process"))},{_process:173}],173:[function(me,Be,ke){function Ce(){throw new Error("setTimeout has not been defined")}function Le(){throw new Error("clearTimeout has not been defined")}function he(ue){if(de===setTimeout)return setTimeout(ue,0);if((de===Ce||!de)&&setTimeout)return de=setTimeout,setTimeout(ue,0);try{return de(ue,0)}catch(Se){try{return de.call(null,ue,0)}catch(we){return de.call(this,ue,0)}}}function ye(ue){if(ce===clearTimeout)return clearTimeout(ue);if((ce===Le||!ce)&&clearTimeout)return ce=clearTimeout,clearTimeout(ue);try{return ce(ue)}catch(Se){try{return ce.call(null,ue)}catch(we){return ce.call(this,ue)}}}function xe(){ie&&ee&&(ie=!1,ee.length?oe=ee.concat(oe):se=-1,oe.length&&ge())}function ge(){if(!ie){var ue=he(xe);ie=!0;for(var Se=oe.length;Se;){for(ee=oe,oe=[];++se<Se;)ee&&ee[se].run();se=-1,Se=oe.length}ee=null,ie=!1,ye(ue)}}function le(ue,Se){this.fun=ue,this.array=Se}function ve(){}var de,ce,z=Be.exports={};(function(){try{de=typeof setTimeout=="function"?setTimeout:Ce}catch(ue){de=Ce}try{ce=typeof clearTimeout=="function"?clearTimeout:Le}catch(ue){ce=Le}})();var ee,oe=[],ie=!1,se=-1;z.nextTick=function(ue){var Se=new Array(arguments.length-1);if(arguments.length>1)for(var we=1;we<arguments.length;we++)Se[we-1]=arguments[we];oe.push(new le(ue,Se)),oe.length!==1||ie||he(ge)},le.prototype.run=function(){this.fun.apply(null,this.array)},z.title="browser",z.browser=!0,z.env={},z.argv=[],z.version="",z.versions={},z.on=ve,z.addListener=ve,z.once=ve,z.off=ve,z.removeListener=ve,z.removeAllListeners=ve,z.emit=ve,z.prependListener=ve,z.prependOnceListener=ve,z.listeners=function(ue){return[]},z.binding=function(ue){throw new Error("process.binding is not supported")},z.cwd=function(){return"/"},z.chdir=function(ue){throw new Error("process.chdir is not supported")},z.umask=function(){return 0}},{}],174:[function(me,Be,ke){(function(Ce){(function(Le){function he(mt){throw new RangeError(zt[mt])}function ye(mt,Pt){for(var gt=mt.length,Ft=[];gt--;)Ft[gt]=Pt(mt[gt]);return Ft}function xe(mt,Pt){var gt=mt.split("@"),Ft="";return gt.length>1&&(Ft=gt[0]+"@",mt=gt[1]),mt=mt.replace(st,"."),Ft+ye(mt.split("."),Pt).join(".")}function ge(mt){for(var Pt,gt,Ft=[],Ht=0,hn=mt.length;Ht<hn;)Pt=mt.charCodeAt(Ht++),Pt>=55296&&Pt<=56319&&Ht<hn?(gt=mt.charCodeAt(Ht++),(64512>)==56320?Ft.push(((1023&Pt)<<10)+(1023>)+65536):(Ft.push(Pt),Ht--)):Ft.push(Pt);return Ft}function le(mt){return ye(mt,function(Pt){var gt="";return Pt>65535&&(Pt-=65536,gt+=ut(Pt>>>10&1023|55296),Pt=56320|1023&Pt),gt+=ut(Pt)}).join("")}function ve(mt){return mt-48<10?mt-22:mt-65<26?mt-65:mt-97<26?mt-97:De}function de(mt,Pt){return mt+22+75*(mt<26)-((Pt!=0)<<5)}function ce(mt,Pt,gt){var Ft=0;for(mt=gt?tt(mt/Ge):mt>>1,mt+=tt(mt/Pt);mt>lt*Ze>>1;Ft+=De)mt=tt(mt/lt);return tt(Ft+(lt+1)*mt/(mt+Xe))}function z(mt){var Pt,gt,Ft,Ht,hn,Qt,bn,Wt,Kt,Jt,Yt=[],kt=mt.length,pt=0,Bt=at,xt=ft;for(gt=mt.lastIndexOf(Ct),gt<0&&(gt=0),Ft=0;Ft<gt;++Ft)mt.charCodeAt(Ft)>=128&&he("not-basic"),Yt.push(mt.charCodeAt(Ft));for(Ht=gt>0?gt+1:0;Ht<kt;){for(hn=pt,Qt=1,bn=De;Ht>=kt&&he("invalid-input"),Wt=ve(mt.charCodeAt(Ht++)),(Wt>=De||Wt>tt((Ae-pt)/Qt))&&he("overflow"),pt+=Wt*Qt,Kt=bn<=xt?ze:bn>=xt+Ze?Ze:bn-xt,!(Wt<Kt);bn+=De)Jt=De-Kt,Qt>tt(Ae/Jt)&&he("overflow"),Qt*=Jt;Pt=Yt.length+1,xt=ce(pt-hn,Pt,hn==0),tt(pt/Pt)>Ae-Bt&&he("overflow"),Bt+=tt(pt/Pt),pt%=Pt,Yt.splice(pt++,0,Bt)}return le(Yt)}function ee(mt){var Pt,gt,Ft,Ht,hn,Qt,bn,Wt,Kt,Jt,Yt,kt,pt,Bt,xt,vt=[];for(mt=ge(mt),kt=mt.length,Pt=at,gt=0,hn=ft,Qt=0;Qt<kt;++Qt)(Yt=mt[Qt])<128&&vt.push(ut(Yt));for(Ft=Ht=vt.length,Ht&&vt.push(Ct);Ft<kt;){for(bn=Ae,Qt=0;Qt<kt;++Qt)(Yt=mt[Qt])>=Pt&&Yt<bn&&(bn=Yt);for(pt=Ft+1,bn-Pt>tt((Ae-gt)/pt)&&he("overflow"),gt+=(bn-Pt)*pt,Pt=bn,Qt=0;Qt<kt;++Qt)if(Yt=mt[Qt],Yt<Pt&&++gt>Ae&&he("overflow"),Yt==Pt){for(Wt=gt,Kt=De;Jt=Kt<=hn?ze:Kt>=hn+Ze?Ze:Kt-hn,!(Wt<Jt);Kt+=De)xt=Wt-Jt,Bt=De-Jt,vt.push(ut(de(Jt+xt%Bt,0))),Wt=tt(xt/Bt);vt.push(ut(de(Wt,0))),hn=ce(gt,pt,Ft==Ht),gt=0,++Ft}++gt,++Pt}return vt.join("")}function oe(mt){return xe(mt,function(Pt){return et.test(Pt)?z(Pt.slice(4).toLowerCase()):Pt})}function ie(mt){return xe(mt,function(Pt){return yt.test(Pt)?"xn--"+ee(Pt):Pt})}var se=typeof ke=="object"&&ke&&!ke.nodeType&&ke,ue=typeof Be=="object"&&Be&&!Be.nodeType&&Be,Se=typeof Ce=="object"&&Ce;Se.global!==Se&&Se.window!==Se&&Se.self!==Se||(Le=Se);var we,Pe,Ae=2147483647,De=36,ze=1,Ze=26,Xe=38,Ge=700,ft=72,at=128,Ct="-",et=/^xn--/,yt=/[^\x20-\x7E]/,st=/[\x2E\u3002\uFF0E\uFF61]/g,zt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},lt=De-ze,tt=Math.floor,ut=String.fromCharCode;if(we={version:"1.4.1",ucs2:{decode:ge,encode:le},decode:z,encode:ee,toASCII:ie,toUnicode:oe},typeof Me=="function"&&typeof Me.amd=="object"&&Me.amd)Me("punycode",function(){return we});else if(se&&ue)if(Be.exports==se)ue.exports=we;else for(Pe in we)we.hasOwnProperty(Pe)&&(se[Pe]=we[Pe]);else Le.punycode=we})(this)}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(me,Be,ke){"use strict";function Ce(he,ye){return Object.prototype.hasOwnProperty.call(he,ye)}Be.exports=function(he,ye,xe,ge){ye=ye||"&",xe=xe||"=";var le={};if(typeof he!="string"||he.length===0)return le;var ve=/\+/g;he=he.split(ye);var de=1e3;ge&&typeof ge.maxKeys=="number"&&(de=ge.maxKeys);var ce=he.length;de>0&&ce>de&&(ce=de);for(var z=0;z<ce;++z){var ee,oe,ie,se,ue=he[z].replace(ve,"%20"),Se=ue.indexOf(xe);Se>=0?(ee=ue.substr(0,Se),oe=ue.substr(Se+1)):(ee=ue,oe=""),ie=decodeURIComponent(ee),se=decodeURIComponent(oe),Ce(le,ie)?Le(le[ie])?le[ie].push(se):le[ie]=[le[ie],se]:le[ie]=se}return le};var Le=Array.isArray||function(he){return Object.prototype.toString.call(he)==="[object Array]"}},{}],176:[function(me,Be,ke){"use strict";function Ce(xe,ge){if(xe.map)return xe.map(ge);for(var le=[],ve=0;ve<xe.length;ve++)le.push(ge(xe[ve],ve));return le}var Le=function(xe){switch(typeof xe){case"string":return xe;case"boolean":return xe?"true":"false";case"number":return isFinite(xe)?xe:"";default:return""}};Be.exports=function(xe,ge,le,ve){return ge=ge||"&",le=le||"=",xe===null&&(xe=void 0),typeof xe=="object"?Ce(ye(xe),function(de){var ce=encodeURIComponent(Le(de))+le;return he(xe[de])?Ce(xe[de],function(z){return ce+encodeURIComponent(Le(z))}).join(ge):ce+encodeURIComponent(Le(xe[de]))}).join(ge):ve?encodeURIComponent(Le(ve))+le+encodeURIComponent(Le(xe)):""};var he=Array.isArray||function(xe){return Object.prototype.toString.call(xe)==="[object Array]"},ye=Object.keys||function(xe){var ge=[];for(var le in xe)Object.prototype.hasOwnProperty.call(xe,le)&&ge.push(le);return ge}},{}],177:[function(me,Be,ke){"use strict";ke.decode=ke.parse=me("./decode"),ke.encode=ke.stringify=me("./encode")},{"./decode":175,"./encode":176}],178:[function(me,Be,ke){Be.exports=me("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(me,Be,ke){"use strict";function Ce(ie){if(!(this instanceof Ce))return new Ce(ie);de.call(this,ie),ce.call(this,ie),ie&&ie.readable===!1&&(this.readable=!1),ie&&ie.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,ie&&ie.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",Le)}function Le(){this.allowHalfOpen||this._writableState.ended||ge.nextTick(he,this)}function he(ie){ie.end()}var ye=me("babel-runtime/core-js/object/keys"),xe=function(ie){return ie&&ie.__esModule?ie:{default:ie}}(ye),ge=me("process-nextick-args"),le=xe.default||function(ie){var se=[];for(var ue in ie)se.push(ue);return se};Be.exports=Ce;var ve=me("core-util-is");ve.inherits=me("inherits");var de=me("./_stream_readable"),ce=me("./_stream_writable");ve.inherits(Ce,de);for(var z=le(ce.prototype),ee=0;ee<z.length;ee++){var oe=z[ee];Ce.prototype[oe]||(Ce.prototype[oe]=ce.prototype[oe])}Object.defineProperty(Ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Ce.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(ie){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=ie,this._writableState.destroyed=ie)}}),Ce.prototype._destroy=function(ie,se){this.push(null),this.end(),ge.nextTick(se,ie)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(me,Be,ke){"use strict";function Ce(ye){if(!(this instanceof Ce))return new Ce(ye);Le.call(this,ye)}Be.exports=Ce;var Le=me("./_stream_transform"),he=me("core-util-is");he.inherits=me("inherits"),he.inherits(Ce,Le),Ce.prototype._transform=function(ye,xe,ge){ge(null,ye)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(me,Be,ke){(function(Ce,Le){"use strict";function he(kt){return gt.from(kt)}function ye(kt){return gt.isBuffer(kt)||kt instanceof Ft}function xe(kt,pt,Bt){if(typeof kt.prependListener=="function")return kt.prependListener(pt,Bt);kt._events&&kt._events[pt]?ut(kt._events[pt])?kt._events[pt].unshift(Bt):kt._events[pt]=[Bt,kt._events[pt]]:kt.on(pt,Bt)}function ge(kt,pt){tt=tt||me("./_stream_duplex"),kt=kt||{};var Bt=pt instanceof tt;this.objectMode=!!kt.objectMode,Bt&&(this.objectMode=this.objectMode||!!kt.readableObjectMode);var xt=kt.highWaterMark,vt=kt.readableHighWaterMark,nt=this.objectMode?16:16384;this.highWaterMark=xt||xt===0?xt:Bt&&(vt||vt===0)?vt:nt,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Wt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=kt.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,kt.encoding&&(bn||(bn=me("string_decoder/").StringDecoder),this.decoder=new bn(kt.encoding),this.encoding=kt.encoding)}function le(kt){if(tt=tt||me("./_stream_duplex"),!(this instanceof le))return new le(kt);this._readableState=new ge(kt,this),this.readable=!0,kt&&(typeof kt.read=="function"&&(this._read=kt.read),typeof kt.destroy=="function"&&(this._destroy=kt.destroy)),Pt.call(this)}function ve(kt,pt,Bt,xt,vt){var nt=kt._readableState;if(pt===null)nt.reading=!1,ie(kt,nt);else{var He;vt||(He=ce(nt,pt)),He?kt.emit("error",He):nt.objectMode||pt&&pt.length>0?(typeof pt=="string"||nt.objectMode||(0,zt.default)(pt)===gt.prototype||(pt=he(pt)),xt?nt.endEmitted?kt.emit("error",new Error("stream.unshift() after end event")):de(kt,nt,pt,!0):nt.ended?kt.emit("error",new Error("stream.push() after EOF")):(nt.reading=!1,nt.decoder&&!Bt?(pt=nt.decoder.write(pt),nt.objectMode||pt.length!==0?de(kt,nt,pt,!1):Se(kt,nt)):de(kt,nt,pt,!1))):xt||(nt.reading=!1)}return z(nt)}function de(kt,pt,Bt,xt){pt.flowing&&pt.length===0&&!pt.sync?(kt.emit("data",Bt),kt.read(0)):(pt.length+=pt.objectMode?1:Bt.length,xt?pt.buffer.unshift(Bt):pt.buffer.push(Bt),pt.needReadable&&se(kt)),Se(kt,pt)}function ce(kt,pt){var Bt;return ye(pt)||typeof pt=="string"||pt===void 0||kt.objectMode||(Bt=new TypeError("Invalid non-string/buffer chunk")),Bt}function z(kt){return!kt.ended&&(kt.needReadable||kt.length<kt.highWaterMark||kt.length===0)}function ee(kt){return kt>=Yt?kt=Yt:(kt--,kt|=kt>>>1,kt|=kt>>>2,kt|=kt>>>4,kt|=kt>>>8,kt|=kt>>>16,kt++),kt}function oe(kt,pt){return kt<=0||pt.length===0&&pt.ended?0:pt.objectMode?1:kt!==kt?pt.flowing&&pt.length?pt.buffer.head.data.length:pt.length:(kt>pt.highWaterMark&&(pt.highWaterMark=ee(kt)),kt<=pt.length?kt:pt.ended?pt.length:(pt.needReadable=!0,0))}function ie(kt,pt){if(!pt.ended){if(pt.decoder){var Bt=pt.decoder.end();Bt&&Bt.length&&(pt.buffer.push(Bt),pt.length+=pt.objectMode?1:Bt.length)}pt.ended=!0,se(kt)}}function se(kt){var pt=kt._readableState;pt.needReadable=!1,pt.emittedReadable||(Qt("emitReadable",pt.flowing),pt.emittedReadable=!0,pt.sync?lt.nextTick(ue,kt):ue(kt))}function ue(kt){Qt("emit readable"),kt.emit("readable"),Ze(kt)}function Se(kt,pt){pt.readingMore||(pt.readingMore=!0,lt.nextTick(we,kt,pt))}function we(kt,pt){for(var Bt=pt.length;!pt.reading&&!pt.flowing&&!pt.ended&&pt.length<pt.highWaterMark&&(Qt("maybeReadMore read 0"),kt.read(0),Bt!==pt.length);)Bt=pt.length;pt.readingMore=!1}function Pe(kt){return function(){var pt=kt._readableState;Qt("pipeOnDrain",pt.awaitDrain),pt.awaitDrain&&pt.awaitDrain--,pt.awaitDrain===0&&mt(kt,"data")&&(pt.flowing=!0,Ze(kt))}}function Ae(kt){Qt("readable nexttick read 0"),kt.read(0)}function De(kt,pt){pt.resumeScheduled||(pt.resumeScheduled=!0,lt.nextTick(ze,kt,pt))}function ze(kt,pt){pt.reading||(Qt("resume read 0"),kt.read(0)),pt.resumeScheduled=!1,pt.awaitDrain=0,kt.emit("resume"),Ze(kt),pt.flowing&&!pt.reading&&kt.read(0)}function Ze(kt){var pt=kt._readableState;for(Qt("flow",pt.flowing);pt.flowing&&kt.read()!==null;);}function Xe(kt,pt){if(pt.length===0)return null;var Bt;return pt.objectMode?Bt=pt.buffer.shift():!kt||kt>=pt.length?(Bt=pt.decoder?pt.buffer.join(""):pt.buffer.length===1?pt.buffer.head.data:pt.buffer.concat(pt.length),pt.buffer.clear()):Bt=Ge(kt,pt.buffer,pt.decoder),Bt}function Ge(kt,pt,Bt){var xt;return kt<pt.head.data.length?(xt=pt.head.data.slice(0,kt),pt.head.data=pt.head.data.slice(kt)):xt=kt===pt.head.data.length?pt.shift():Bt?ft(kt,pt):at(kt,pt),xt}function ft(kt,pt){var Bt=pt.head,xt=1,vt=Bt.data;for(kt-=vt.length;Bt=Bt.next;){var nt=Bt.data,He=kt>nt.length?nt.length:kt;if(He===nt.length?vt+=nt:vt+=nt.slice(0,kt),(kt-=He)===0){He===nt.length?(++xt,Bt.next?pt.head=Bt.next:pt.head=pt.tail=null):(pt.head=Bt,Bt.data=nt.slice(He));break}++xt}return pt.length-=xt,vt}function at(kt,pt){var Bt=gt.allocUnsafe(kt),xt=pt.head,vt=1;for(xt.data.copy(Bt),kt-=xt.data.length;xt=xt.next;){var nt=xt.data,He=kt>nt.length?nt.length:kt;if(nt.copy(Bt,Bt.length-kt,0,He),(kt-=He)===0){He===nt.length?(++vt,xt.next?pt.head=xt.next:pt.head=pt.tail=null):(pt.head=xt,xt.data=nt.slice(He));break}++vt}return pt.length-=vt,Bt}function Ct(kt){var pt=kt._readableState;if(pt.length>0)throw new Error('"endReadable()" called on non-empty stream');pt.endEmitted||(pt.ended=!0,lt.nextTick(et,pt,kt))}function et(kt,pt){kt.endEmitted||kt.length!==0||(kt.endEmitted=!0,pt.readable=!1,pt.emit("end"))}function yt(kt,pt){for(var Bt=0,xt=kt.length;Bt<xt;Bt++)if(kt[Bt]===pt)return Bt;return-1}var st=me("babel-runtime/core-js/object/get-prototype-of"),zt=function(kt){return kt&&kt.__esModule?kt:{default:kt}}(st),lt=me("process-nextick-args");Be.exports=le;var tt,ut=me("isarray");le.ReadableState=ge;var mt=(me("events").EventEmitter,function(kt,pt){return kt.listeners(pt).length}),Pt=me("./internal/streams/stream"),gt=me("safe-buffer").Buffer,Ft=Le.Uint8Array||function(){},Ht=me("core-util-is");Ht.inherits=me("inherits");var hn=me("util"),Qt=void 0;Qt=hn&&hn.debuglog?hn.debuglog("stream"):function(){};var bn,Wt=me("./internal/streams/BufferList"),Kt=me("./internal/streams/destroy");Ht.inherits(le,Pt);var Jt=["error","close","destroy","pause","resume"];Object.defineProperty(le.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(kt){this._readableState&&(this._readableState.destroyed=kt)}}),le.prototype.destroy=Kt.destroy,le.prototype._undestroy=Kt.undestroy,le.prototype._destroy=function(kt,pt){this.push(null),pt(kt)},le.prototype.push=function(kt,pt){var Bt,xt=this._readableState;return xt.objectMode?Bt=!0:typeof kt=="string"&&(pt=pt||xt.defaultEncoding,pt!==xt.encoding&&(kt=gt.from(kt,pt),pt=""),Bt=!0),ve(this,kt,pt,!1,Bt)},le.prototype.unshift=function(kt){return ve(this,kt,null,!0,!1)},le.prototype.isPaused=function(){return this._readableState.flowing===!1},le.prototype.setEncoding=function(kt){return bn||(bn=me("string_decoder/").StringDecoder),this._readableState.decoder=new bn(kt),this._readableState.encoding=kt,this};var Yt=8388608;le.prototype.read=function(kt){Qt("read",kt),kt=parseInt(kt,10);var pt=this._readableState,Bt=kt;if(kt!==0&&(pt.emittedReadable=!1),kt===0&&pt.needReadable&&(pt.length>=pt.highWaterMark||pt.ended))return Qt("read: emitReadable",pt.length,pt.ended),pt.length===0&&pt.ended?Ct(this):se(this),null;if((kt=oe(kt,pt))===0&&pt.ended)return pt.length===0&&Ct(this),null;var xt=pt.needReadable;Qt("need readable",xt),(pt.length===0||pt.length-kt<pt.highWaterMark)&&(xt=!0,Qt("length less than watermark",xt)),pt.ended||pt.reading?(xt=!1,Qt("reading or ended",xt)):xt&&(Qt("do read"),pt.reading=!0,pt.sync=!0,pt.length===0&&(pt.needReadable=!0),this._read(pt.highWaterMark),pt.sync=!1,pt.reading||(kt=oe(Bt,pt)));var vt;return vt=kt>0?Xe(kt,pt):null,vt===null?(pt.needReadable=!0,kt=0):pt.length-=kt,pt.length===0&&(pt.ended||(pt.needReadable=!0),Bt!==kt&&pt.ended&&Ct(this)),vt!==null&&this.emit("data",vt),vt},le.prototype._read=function(kt){this.emit("error",new Error("_read() is not implemented"))},le.prototype.pipe=function(kt,pt){function Bt(pn,ln){Qt("onunpipe"),pn===be&&ln&&ln.hasUnpiped===!1&&(ln.hasUnpiped=!0,vt())}function xt(){Qt("onend"),kt.end()}function vt(){Qt("cleanup"),kt.removeListener("close",Ie),kt.removeListener("finish",We),kt.removeListener("drain",Je),kt.removeListener("error",He),kt.removeListener("unpipe",Bt),be.removeListener("end",xt),be.removeListener("end",Oe),be.removeListener("data",nt),At=!0,!Ne.awaitDrain||kt._writableState&&!kt._writableState.needDrain||Je()}function nt(pn){Qt("ondata"),tn=!1,kt.write(pn)!==!1||tn||((Ne.pipesCount===1&&Ne.pipes===kt||Ne.pipesCount>1&&yt(Ne.pipes,kt)!==-1)&&!At&&(Qt("false write response, pause",be._readableState.awaitDrain),be._readableState.awaitDrain++,tn=!0),be.pause())}function He(pn){Qt("onerror",pn),Oe(),kt.removeListener("error",He),mt(kt,"error")===0&&kt.emit("error",pn)}function Ie(){kt.removeListener("finish",We),Oe()}function We(){Qt("onfinish"),kt.removeListener("close",Ie),Oe()}function Oe(){Qt("unpipe"),be.unpipe(kt)}var be=this,Ne=this._readableState;switch(Ne.pipesCount){case 0:Ne.pipes=kt;break;case 1:Ne.pipes=[Ne.pipes,kt];break;default:Ne.pipes.push(kt)}Ne.pipesCount+=1,Qt("pipe count=%d opts=%j",Ne.pipesCount,pt);var $e=(!pt||pt.end!==!1)&&kt!==Ce.stdout&&kt!==Ce.stderr,dt=$e?xt:Oe;Ne.endEmitted?lt.nextTick(dt):be.once("end",dt),kt.on("unpipe",Bt);var Je=Pe(be);kt.on("drain",Je);var At=!1,tn=!1;return be.on("data",nt),xe(kt,"error",He),kt.once("close",Ie),kt.once("finish",We),kt.emit("pipe",be),Ne.flowing||(Qt("pipe resume"),be.resume()),kt},le.prototype.unpipe=function(kt){var pt=this._readableState,Bt={hasUnpiped:!1};if(pt.pipesCount===0)return this;if(pt.pipesCount===1)return kt&&kt!==pt.pipes?this:(kt||(kt=pt.pipes),pt.pipes=null,pt.pipesCount=0,pt.flowing=!1,kt&&kt.emit("unpipe",this,Bt),this);if(!kt){var xt=pt.pipes,vt=pt.pipesCount;pt.pipes=null,pt.pipesCount=0,pt.flowing=!1;for(var nt=0;nt<vt;nt++)xt[nt].emit("unpipe",this,Bt);return this}var He=yt(pt.pipes,kt);return He===-1?this:(pt.pipes.splice(He,1),pt.pipesCount-=1,pt.pipesCount===1&&(pt.pipes=pt.pipes[0]),kt.emit("unpipe",this,Bt),this)},le.prototype.on=function(kt,pt){var Bt=Pt.prototype.on.call(this,kt,pt);if(kt==="data")this._readableState.flowing!==!1&&this.resume();else if(kt==="readable"){var xt=this._readableState;xt.endEmitted||xt.readableListening||(xt.readableListening=xt.needReadable=!0,xt.emittedReadable=!1,xt.reading?xt.length&&se(this):lt.nextTick(Ae,this))}return Bt},le.prototype.addListener=le.prototype.on,le.prototype.resume=function(){var kt=this._readableState;return kt.flowing||(Qt("resume"),kt.flowing=!0,De(this,kt)),this},le.prototype.pause=function(){return Qt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Qt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},le.prototype.wrap=function(kt){var pt=this,Bt=this._readableState,xt=!1;kt.on("end",function(){if(Qt("wrapped end"),Bt.decoder&&!Bt.ended){var He=Bt.decoder.end();He&&He.length&&pt.push(He)}pt.push(null)}),kt.on("data",function(He){Qt("wrapped data"),Bt.decoder&&(He=Bt.decoder.write(He)),(!Bt.objectMode||He!=null)&&(Bt.objectMode||He&&He.length)&&(pt.push(He)||(xt=!0,kt.pause()))});for(var vt in kt)this[vt]===void 0&&typeof kt[vt]=="function"&&(this[vt]=function(He){return function(){return kt[He].apply(kt,arguments)}}(vt));for(var nt=0;nt<Jt.length;nt++)kt.on(Jt[nt],this.emit.bind(this,Jt[nt]));return this._read=function(He){Qt("wrapped _read",He),xt&&(xt=!1,kt.resume())},this},Object.defineProperty(le.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),le._fromList=Xe}).call(this,me("_process"),typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(me,Be,ke){"use strict";function Ce(le,ve){var de=this._transformState;de.transforming=!1;var ce=de.writecb;if(!ce)return this.emit("error",new Error("write callback called multiple times"));de.writechunk=null,de.writecb=null,ve!=null&&this.push(ve),ce(le);var z=this._readableState;z.reading=!1,(z.needReadable||z.length<z.highWaterMark)&&this._read(z.highWaterMark)}function Le(le){if(!(this instanceof Le))return new Le(le);xe.call(this,le),this._transformState={afterTransform:Ce.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,le&&(typeof le.transform=="function"&&(this._transform=le.transform),typeof le.flush=="function"&&(this._flush=le.flush)),this.on("prefinish",he)}function he(){var le=this;typeof this._flush=="function"?this._flush(function(ve,de){ye(le,ve,de)}):ye(this,null,null)}function ye(le,ve,de){if(ve)return le.emit("error",ve);if(de!=null&&le.push(de),le._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(le._transformState.transforming)throw new Error("Calling transform done when still transforming");return le.push(null)}Be.exports=Le;var xe=me("./_stream_duplex"),ge=me("core-util-is");ge.inherits=me("inherits"),ge.inherits(Le,xe),Le.prototype.push=function(le,ve){return this._transformState.needTransform=!1,xe.prototype.push.call(this,le,ve)},Le.prototype._transform=function(le,ve,de){throw new Error("_transform() is not implemented")},Le.prototype._write=function(le,ve,de){var ce=this._transformState;if(ce.writecb=de,ce.writechunk=le,ce.writeencoding=ve,!ce.transforming){var z=this._readableState;(ce.needTransform||z.needReadable||z.length<z.highWaterMark)&&this._read(z.highWaterMark)}},Le.prototype._read=function(le){var ve=this._transformState;ve.writechunk!==null&&ve.writecb&&!ve.transforming?(ve.transforming=!0,this._transform(ve.writechunk,ve.writeencoding,ve.afterTransform)):ve.needTransform=!0},Le.prototype._destroy=function(le,ve){var de=this;xe.prototype._destroy.call(this,le,function(ce){ve(ce),de.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(me,Be,ke){(function(Ce,Le){"use strict";function he(Kt){return Kt&&Kt.__esModule?Kt:{default:Kt}}function ye(Kt){var Jt=this;this.next=null,this.entry=null,this.finish=function(){ft(Jt,Kt)}}function xe(Kt){return hn.from(Kt)}function ge(Kt){return hn.isBuffer(Kt)||Kt instanceof Qt}function le(){}function ve(Kt,Jt){mt=mt||me("./_stream_duplex"),Kt=Kt||{};var Yt=Jt instanceof mt;this.objectMode=!!Kt.objectMode,Yt&&(this.objectMode=this.objectMode||!!Kt.writableObjectMode);var kt=Kt.highWaterMark,pt=Kt.writableHighWaterMark,Bt=this.objectMode?16:16384;this.highWaterMark=kt||kt===0?kt:Yt&&(pt||pt===0)?pt:Bt,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var xt=Kt.decodeStrings===!1;this.decodeStrings=!xt,this.defaultEncoding=Kt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(vt){Se(Jt,vt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new ye(this)}function de(Kt){if(mt=mt||me("./_stream_duplex"),!(Wt.call(de,this)||this instanceof mt))return new de(Kt);this._writableState=new ve(Kt,this),this.writable=!0,Kt&&(typeof Kt.write=="function"&&(this._write=Kt.write),typeof Kt.writev=="function"&&(this._writev=Kt.writev),typeof Kt.destroy=="function"&&(this._destroy=Kt.destroy),typeof Kt.final=="function"&&(this._final=Kt.final)),Ht.call(this)}function ce(Kt,Jt){var Yt=new Error("write after end");Kt.emit("error",Yt),ut.nextTick(Jt,Yt)}function z(Kt,Jt,Yt,kt){var pt=!0,Bt=!1;return Yt===null?Bt=new TypeError("May not write null values to stream"):typeof Yt=="string"||Yt===void 0||Jt.objectMode||(Bt=new TypeError("Invalid non-string/buffer chunk")),Bt&&(Kt.emit("error",Bt),ut.nextTick(kt,Bt),pt=!1),pt}function ee(Kt,Jt,Yt){return Kt.objectMode||Kt.decodeStrings===!1||typeof Jt!="string"||(Jt=hn.from(Jt,Yt)),Jt}function oe(Kt,Jt,Yt,kt,pt,Bt){if(!Yt){var xt=ee(Jt,kt,pt);kt!==xt&&(Yt=!0,pt="buffer",kt=xt)}var vt=Jt.objectMode?1:kt.length;Jt.length+=vt;var nt=Jt.length<Jt.highWaterMark;if(nt||(Jt.needDrain=!0),Jt.writing||Jt.corked){var He=Jt.lastBufferedRequest;Jt.lastBufferedRequest={chunk:kt,encoding:pt,isBuf:Yt,callback:Bt,next:null},He?He.next=Jt.lastBufferedRequest:Jt.bufferedRequest=Jt.lastBufferedRequest,Jt.bufferedRequestCount+=1}else ie(Kt,Jt,!1,vt,kt,pt,Bt);return nt}function ie(Kt,Jt,Yt,kt,pt,Bt,xt){Jt.writelen=kt,Jt.writecb=xt,Jt.writing=!0,Jt.sync=!0,Yt?Kt._writev(pt,Jt.onwrite):Kt._write(pt,Bt,Jt.onwrite),Jt.sync=!1}function se(Kt,Jt,Yt,kt,pt){--Jt.pendingcb,Yt?(ut.nextTick(pt,kt),ut.nextTick(Xe,Kt,Jt),Kt._writableState.errorEmitted=!0,Kt.emit("error",kt)):(pt(kt),Kt._writableState.errorEmitted=!0,Kt.emit("error",kt),Xe(Kt,Jt))}function ue(Kt){Kt.writing=!1,Kt.writecb=null,Kt.length-=Kt.writelen,Kt.writelen=0}function Se(Kt,Jt){var Yt=Kt._writableState,kt=Yt.sync,pt=Yt.writecb;if(ue(Yt),Jt)se(Kt,Yt,kt,Jt,pt);else{var Bt=De(Yt);Bt||Yt.corked||Yt.bufferProcessing||!Yt.bufferedRequest||Ae(Kt,Yt),kt?Pt(we,Kt,Yt,Bt,pt):we(Kt,Yt,Bt,pt)}}function we(Kt,Jt,Yt,kt){Yt||Pe(Kt,Jt),Jt.pendingcb--,kt(),Xe(Kt,Jt)}function Pe(Kt,Jt){Jt.length===0&&Jt.needDrain&&(Jt.needDrain=!1,Kt.emit("drain"))}function Ae(Kt,Jt){Jt.bufferProcessing=!0;var Yt=Jt.bufferedRequest;if(Kt._writev&&Yt&&Yt.next){var kt=Jt.bufferedRequestCount,pt=new Array(kt),Bt=Jt.corkedRequestsFree;Bt.entry=Yt;for(var xt=0,vt=!0;Yt;)pt[xt]=Yt,Yt.isBuf||(vt=!1),Yt=Yt.next,xt+=1;pt.allBuffers=vt,ie(Kt,Jt,!0,Jt.length,pt,"",Bt.finish),Jt.pendingcb++,Jt.lastBufferedRequest=null,Bt.next?(Jt.corkedRequestsFree=Bt.next,Bt.next=null):Jt.corkedRequestsFree=new ye(Jt),Jt.bufferedRequestCount=0}else{for(;Yt;){var nt=Yt.chunk,He=Yt.encoding,Ie=Yt.callback;if(ie(Kt,Jt,!1,Jt.objectMode?1:nt.length,nt,He,Ie),Yt=Yt.next,Jt.bufferedRequestCount--,Jt.writing)break}Yt===null&&(Jt.lastBufferedRequest=null)}Jt.bufferedRequest=Yt,Jt.bufferProcessing=!1}function De(Kt){return Kt.ending&&Kt.length===0&&Kt.bufferedRequest===null&&!Kt.finished&&!Kt.writing}function ze(Kt,Jt){Kt._final(function(Yt){Jt.pendingcb--,Yt&&Kt.emit("error",Yt),Jt.prefinished=!0,Kt.emit("prefinish"),Xe(Kt,Jt)})}function Ze(Kt,Jt){Jt.prefinished||Jt.finalCalled||(typeof Kt._final=="function"?(Jt.pendingcb++,Jt.finalCalled=!0,ut.nextTick(ze,Kt,Jt)):(Jt.prefinished=!0,Kt.emit("prefinish")))}function Xe(Kt,Jt){var Yt=De(Jt);return Yt&&(Ze(Kt,Jt),Jt.pendingcb===0&&(Jt.finished=!0,Kt.emit("finish"))),Yt}function Ge(Kt,Jt,Yt){Jt.ending=!0,Xe(Kt,Jt),Yt&&(Jt.finished?ut.nextTick(Yt):Kt.once("finish",Yt)),Jt.ended=!0,Kt.writable=!1}function ft(Kt,Jt,Yt){var kt=Kt.entry;for(Kt.entry=null;kt;){var pt=kt.callback;Jt.pendingcb--,pt(Yt),kt=kt.next}Jt.corkedRequestsFree?Jt.corkedRequestsFree.next=Kt:Jt.corkedRequestsFree=Kt}var at=me("babel-runtime/core-js/object/define-property"),Ct=he(at),et=me("babel-runtime/core-js/symbol/has-instance"),yt=he(et),st=me("babel-runtime/core-js/symbol"),zt=he(st),lt=me("babel-runtime/core-js/set-immediate"),tt=he(lt),ut=me("process-nextick-args");Be.exports=de;var mt,Pt=!Ce.browser&&["v0.10","v0.9."].indexOf(Ce.version.slice(0,5))>-1?tt.default:ut.nextTick;de.WritableState=ve;var gt=me("core-util-is");gt.inherits=me("inherits");var Ft={deprecate:me("util-deprecate")},Ht=me("./internal/streams/stream"),hn=me("safe-buffer").Buffer,Qt=Le.Uint8Array||function(){},bn=me("./internal/streams/destroy");gt.inherits(de,Ht),ve.prototype.getBuffer=function(){for(var Kt=this.bufferedRequest,Jt=[];Kt;)Jt.push(Kt),Kt=Kt.next;return Jt},function(){try{Object.defineProperty(ve.prototype,"buffer",{get:Ft.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Kt){}}();var Wt;typeof zt.default=="function"&&yt.default&&typeof Function.prototype[yt.default]=="function"?(Wt=Function.prototype[yt.default],(0,Ct.default)(de,yt.default,{value:function(Kt){return!!Wt.call(this,Kt)||this===de&&Kt&&Kt._writableState instanceof ve}})):Wt=function(Kt){return Kt instanceof this},de.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},de.prototype.write=function(Kt,Jt,Yt){var kt=this._writableState,pt=!1,Bt=!kt.objectMode&&ge(Kt);return Bt&&!hn.isBuffer(Kt)&&(Kt=xe(Kt)),typeof Jt=="function"&&(Yt=Jt,Jt=null),Bt?Jt="buffer":Jt||(Jt=kt.defaultEncoding),typeof Yt!="function"&&(Yt=le),kt.ended?ce(this,Yt):(Bt||z(this,kt,Kt,Yt))&&(kt.pendingcb++,pt=oe(this,kt,Bt,Kt,Jt,Yt)),pt},de.prototype.cork=function(){this._writableState.corked++},de.prototype.uncork=function(){var Kt=this._writableState;Kt.corked&&(Kt.corked--,Kt.writing||Kt.corked||Kt.finished||Kt.bufferProcessing||!Kt.bufferedRequest||Ae(this,Kt))},de.prototype.setDefaultEncoding=function(Kt){if(typeof Kt=="string"&&(Kt=Kt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Kt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Kt);return this._writableState.defaultEncoding=Kt,this},Object.defineProperty(de.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),de.prototype._write=function(Kt,Jt,Yt){Yt(new Error("_write() is not implemented"))},de.prototype._writev=null,de.prototype.end=function(Kt,Jt,Yt){var kt=this._writableState;typeof Kt=="function"?(Yt=Kt,Kt=null,Jt=null):typeof Jt=="function"&&(Yt=Jt,Jt=null),Kt!=null&&this.write(Kt,Jt),kt.corked&&(kt.corked=1,this.uncork()),kt.ending||kt.finished||Ge(this,kt,Yt)},Object.defineProperty(de.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Kt){this._writableState&&(this._writableState.destroyed=Kt)}}),de.prototype.destroy=bn.destroy,de.prototype._undestroy=bn.undestroy,de.prototype._destroy=function(Kt,Jt){this.end(),Jt(Kt)}}).call(this,me("_process"),typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(me,Be,ke){"use strict";function Ce(xe,ge){if(!(xe instanceof ge))throw new TypeError("Cannot call a class as a function")}function Le(xe,ge,le){xe.copy(ge,le)}var he=me("safe-buffer").Buffer,ye=me("util");Be.exports=function(){function xe(){Ce(this,xe),this.head=null,this.tail=null,this.length=0}return xe.prototype.push=function(ge){var le={data:ge,next:null};this.length>0?this.tail.next=le:this.head=le,this.tail=le,++this.length},xe.prototype.unshift=function(ge){var le={data:ge,next:this.head};this.length===0&&(this.tail=le),this.head=le,++this.length},xe.prototype.shift=function(){if(this.length!==0){var ge=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ge}},xe.prototype.clear=function(){this.head=this.tail=null,this.length=0},xe.prototype.join=function(ge){if(this.length===0)return"";for(var le=this.head,ve=""+le.data;le=le.next;)ve+=ge+le.data;return ve},xe.prototype.concat=function(ge){if(this.length===0)return he.alloc(0);if(this.length===1)return this.head.data;for(var le=he.allocUnsafe(ge>>>0),ve=this.head,de=0;ve;)Le(ve.data,le,de),de+=ve.data.length,ve=ve.next;return le},xe}(),ye&&ye.inspect&&ye.inspect.custom&&(Be.exports.prototype[ye.inspect.custom]=function(){var xe=ye.inspect({length:this.length});return this.constructor.name+" "+xe})},{"safe-buffer":193,util:36}],185:[function(me,Be,ke){"use strict";function Ce(xe,ge){var le=this,ve=this._readableState&&this._readableState.destroyed,de=this._writableState&&this._writableState.destroyed;return ve||de?(ge?ge(xe):!xe||this._writableState&&this._writableState.errorEmitted||ye.nextTick(he,this,xe),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(xe||null,function(ce){!ge&&ce?(ye.nextTick(he,le,ce),le._writableState&&(le._writableState.errorEmitted=!0)):ge&&ge(ce)}),this)}function Le(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function he(xe,ge){xe.emit("error",ge)}var ye=me("process-nextick-args");Be.exports={destroy:Ce,undestroy:Le}},{"process-nextick-args":172}],186:[function(me,Be,ke){"use strict";Be.exports=me("events").EventEmitter},{events:158}],187:[function(me,Be,ke){Be.exports=me("./readable").PassThrough},{"./readable":188}],188:[function(me,Be,ke){ke=Be.exports=me("./lib/_stream_readable.js"),ke.Stream=ke,ke.Readable=ke,ke.Writable=me("./lib/_stream_writable.js"),ke.Duplex=me("./lib/_stream_duplex.js"),ke.Transform=me("./lib/_stream_transform.js"),ke.PassThrough=me("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(me,Be,ke){Be.exports=me("./readable").Transform},{"./readable":188}],190:[function(me,Be,ke){Be.exports=me("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(me,Be,ke){var Ce=function(){return this}()||Function("return this")(),Le=Ce.regeneratorRuntime&&Object.getOwnPropertyNames(Ce).indexOf("regeneratorRuntime")>=0,he=Le&&Ce.regeneratorRuntime;if(Ce.regeneratorRuntime=void 0,Be.exports=me("./runtime"),Le)Ce.regeneratorRuntime=he;else try{delete Ce.regeneratorRuntime}catch(ye){Ce.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(me,Be,ke){(function(Ce){"use strict";function Le(tt,ut,mt,Pt){var gt=ut&&ut.prototype instanceof ye?ut:ye,Ft=Object.create(gt.prototype),Ht=new oe(Pt||[]);return Ft._invoke=de(tt,mt,Ht),Ft}function he(tt,ut,mt){try{return{type:"normal",arg:tt.call(ut,mt)}}catch(Pt){return{type:"throw",arg:Pt}}}function ye(){}function xe(){}function ge(){}function le(tt){["next","throw","return"].forEach(function(ut){tt[ut]=function(mt){return this._invoke(ut,mt)}})}function ve(tt){function ut(gt,Ft,Ht,hn){var Qt=he(tt[gt],tt,Ft);if(Qt.type!=="throw"){var bn=Qt.arg,Wt=bn.value;return Wt&&typeof Wt=="object"&&we.call(Wt,"__await")?Promise.resolve(Wt.__await).then(function(Kt){ut("next",Kt,Ht,hn)},function(Kt){ut("throw",Kt,Ht,hn)}):Promise.resolve(Wt).then(function(Kt){bn.value=Kt,Ht(bn)},hn)}hn(Qt.arg)}function mt(gt,Ft){function Ht(){return new Promise(function(hn,Qt){ut(gt,Ft,hn,Qt)})}return Pt=Pt?Pt.then(Ht,Ht):Ht()}var Pt;this._invoke=mt}function de(tt,ut,mt){var Pt=Ge;return function(gt,Ft){if(Pt===at)throw new Error("Generator is already running");if(Pt===Ct){if(gt==="throw")throw Ft;return se()}for(mt.method=gt,mt.arg=Ft;;){var Ht=mt.delegate;if(Ht){var hn=ce(Ht,mt);if(hn){if(hn===et)continue;return hn}}if(mt.method==="next")mt.sent=mt._sent=mt.arg;else if(mt.method==="throw"){if(Pt===Ge)throw Pt=Ct,mt.arg;mt.dispatchException(mt.arg)}else mt.method==="return"&&mt.abrupt("return",mt.arg);Pt=at;var Qt=he(tt,ut,mt);if(Qt.type==="normal"){if(Pt=mt.done?Ct:ft,Qt.arg===et)continue;return{value:Qt.arg,done:mt.done}}Qt.type==="throw"&&(Pt=Ct,mt.method="throw",mt.arg=Qt.arg)}}}function ce(tt,ut){var mt=tt.iterator[ut.method];if(mt===ue){if(ut.delegate=null,ut.method==="throw"){if(tt.iterator.return&&(ut.method="return",ut.arg=ue,ce(tt,ut),ut.method==="throw"))return et;ut.method="throw",ut.arg=new TypeError("The iterator does not provide a 'throw' method")}return et}var Pt=he(mt,tt.iterator,ut.arg);if(Pt.type==="throw")return ut.method="throw",ut.arg=Pt.arg,ut.delegate=null,et;var gt=Pt.arg;return gt?gt.done?(ut[tt.resultName]=gt.value,ut.next=tt.nextLoc,ut.method!=="return"&&(ut.method="next",ut.arg=ue),ut.delegate=null,et):gt:(ut.method="throw",ut.arg=new TypeError("iterator result is not an object"),ut.delegate=null,et)}function z(tt){var ut={tryLoc:tt[0]};1 in tt&&(ut.catchLoc=tt[1]),2 in tt&&(ut.finallyLoc=tt[2],ut.afterLoc=tt[3]),this.tryEntries.push(ut)}function ee(tt){var ut=tt.completion||{};ut.type="normal",delete ut.arg,tt.completion=ut}function oe(tt){this.tryEntries=[{tryLoc:"root"}],tt.forEach(z,this),this.reset(!0)}function ie(tt){if(tt){var ut=tt[Ae];if(ut)return ut.call(tt);if(typeof tt.next=="function")return tt;if(!isNaN(tt.length)){var mt=-1,Pt=function gt(){for(;++mt<tt.length;)if(we.call(tt,mt))return gt.value=tt[mt],gt.done=!1,gt;return gt.value=ue,gt.done=!0,gt};return Pt.next=Pt}}return{next:se}}function se(){return{value:ue,done:!0}}var ue,Se=Object.prototype,we=Se.hasOwnProperty,Pe=typeof Symbol=="function"?Symbol:{},Ae=Pe.iterator||"@@iterator",De=Pe.asyncIterator||"@@asyncIterator",ze=Pe.toStringTag||"@@toStringTag",Ze=typeof Be=="object",Xe=Ce.regeneratorRuntime;if(Xe)return void(Ze&&(Be.exports=Xe));Xe=Ce.regeneratorRuntime=Ze?Be.exports:{},Xe.wrap=Le;var Ge="suspendedStart",ft="suspendedYield",at="executing",Ct="completed",et={},yt={};yt[Ae]=function(){return this};var st=Object.getPrototypeOf,zt=st&&st(st(ie([])));zt&&zt!==Se&&we.call(zt,Ae)&&(yt=zt);var lt=ge.prototype=ye.prototype=Object.create(yt);xe.prototype=lt.constructor=ge,ge.constructor=xe,ge[ze]=xe.displayName="GeneratorFunction",Xe.isGeneratorFunction=function(tt){var ut=typeof tt=="function"&&tt.constructor;return!!ut&&(ut===xe||(ut.displayName||ut.name)==="GeneratorFunction")},Xe.mark=function(tt){return Object.setPrototypeOf?Object.setPrototypeOf(tt,ge):(tt.__proto__=ge,ze in tt||(tt[ze]="GeneratorFunction")),tt.prototype=Object.create(lt),tt},Xe.awrap=function(tt){return{__await:tt}},le(ve.prototype),ve.prototype[De]=function(){return this},Xe.AsyncIterator=ve,Xe.async=function(tt,ut,mt,Pt){var gt=new ve(Le(tt,ut,mt,Pt));return Xe.isGeneratorFunction(ut)?gt:gt.next().then(function(Ft){return Ft.done?Ft.value:gt.next()})},le(lt),lt[ze]="Generator",lt[Ae]=function(){return this},lt.toString=function(){return"[object Generator]"},Xe.keys=function(tt){var ut=[];for(var mt in tt)ut.push(mt);return ut.reverse(),function Pt(){for(;ut.length;){var gt=ut.pop();if(gt in tt)return Pt.value=gt,Pt.done=!1,Pt}return Pt.done=!0,Pt}},Xe.values=ie,oe.prototype={constructor:oe,reset:function(tt){if(this.prev=0,this.next=0,this.sent=this._sent=ue,this.done=!1,this.delegate=null,this.method="next",this.arg=ue,this.tryEntries.forEach(ee),!tt)for(var ut in this)ut.charAt(0)==="t"&&we.call(this,ut)&&!isNaN(+ut.slice(1))&&(this[ut]=ue)},stop:function(){this.done=!0;var tt=this.tryEntries[0],ut=tt.completion;if(ut.type==="throw")throw ut.arg;return this.rval},dispatchException:function(tt){function ut(Qt,bn){return Ft.type="throw",Ft.arg=tt,mt.next=Qt,bn&&(mt.method="next",mt.arg=ue),!!bn}if(this.done)throw tt;for(var mt=this,Pt=this.tryEntries.length-1;Pt>=0;--Pt){var gt=this.tryEntries[Pt],Ft=gt.completion;if(gt.tryLoc==="root")return ut("end");if(gt.tryLoc<=this.prev){var Ht=we.call(gt,"catchLoc"),hn=we.call(gt,"finallyLoc");if(Ht&&hn){if(this.prev<gt.catchLoc)return ut(gt.catchLoc,!0);if(this.prev<gt.finallyLoc)return ut(gt.finallyLoc)}else if(Ht){if(this.prev<gt.catchLoc)return ut(gt.catchLoc,!0)}else{if(!hn)throw new Error("try statement without catch or finally");if(this.prev<gt.finallyLoc)return ut(gt.finallyLoc)}}}},abrupt:function(tt,ut){for(var mt=this.tryEntries.length-1;mt>=0;--mt){var Pt=this.tryEntries[mt];if(Pt.tryLoc<=this.prev&&we.call(Pt,"finallyLoc")&&this.prev<Pt.finallyLoc){var gt=Pt;break}}gt&&(tt==="break"||tt==="continue")&>.tryLoc<=ut&&ut<=gt.finallyLoc&&(gt=null);var Ft=gt?gt.completion:{};return Ft.type=tt,Ft.arg=ut,gt?(this.method="next",this.next=gt.finallyLoc,et):this.complete(Ft)},complete:function(tt,ut){if(tt.type==="throw")throw tt.arg;return tt.type==="break"||tt.type==="continue"?this.next=tt.arg:tt.type==="return"?(this.rval=this.arg=tt.arg,this.method="return",this.next="end"):tt.type==="normal"&&ut&&(this.next=ut),et},finish:function(tt){for(var ut=this.tryEntries.length-1;ut>=0;--ut){var mt=this.tryEntries[ut];if(mt.finallyLoc===tt)return this.complete(mt.completion,mt.afterLoc),ee(mt),et}},catch:function(tt){for(var ut=this.tryEntries.length-1;ut>=0;--ut){var mt=this.tryEntries[ut];if(mt.tryLoc===tt){var Pt=mt.completion;if(Pt.type==="throw"){var gt=Pt.arg;ee(mt)}return gt}}throw new Error("illegal catch attempt")},delegateYield:function(tt,ut,mt){return this.delegate={iterator:ie(tt),resultName:ut,nextLoc:mt},this.method==="next"&&(this.arg=ue),et}}})(function(){return this}()||Function("return this")())},{}],193:[function(me,Be,ke){function Ce(xe,ge){for(var le in xe)ge[le]=xe[le]}function Le(xe,ge,le){return ye(xe,ge,le)}var he=me("buffer"),ye=he.Buffer;ye.from&&ye.alloc&&ye.allocUnsafe&&ye.allocUnsafeSlow?Be.exports=he:(Ce(he,ke),ke.Buffer=Le),Ce(ye,Le),Le.from=function(xe,ge,le){if(typeof xe=="number")throw new TypeError("Argument must not be a number");return ye(xe,ge,le)},Le.alloc=function(xe,ge,le){if(typeof xe!="number")throw new TypeError("Argument must be a number");var ve=ye(xe);return ge!==void 0?typeof le=="string"?ve.fill(ge,le):ve.fill(ge):ve.fill(0),ve},Le.allocUnsafe=function(xe){if(typeof xe!="number")throw new TypeError("Argument must be a number");return ye(xe)},Le.allocUnsafeSlow=function(xe){if(typeof xe!="number")throw new TypeError("Argument must be a number");return he.SlowBuffer(xe)}},{buffer:38}],194:[function(me,Be,ke){(function(Ce){"use strict";function Le(se){return se&&se.__esModule?se:{default:se}}var he=me("babel-runtime/core-js/string/from-code-point"),ye=Le(he),xe=me("babel-runtime/core-js/json/stringify"),ge=Le(xe),le=me("babel-runtime/helpers/typeof"),ve=Le(le),de=me("babel-runtime/core-js/object/define-property"),ce=Le(de),z=me("babel-runtime/core-js/object/keys"),ee=Le(z),oe=me("babel-runtime/core-js/object/create"),ie=Le(oe);(function(se){function ue(Oe,be){if(!(this instanceof ue))return new ue(Oe,be);var Ne=this;we(Ne),Ne.q=Ne.c="",Ne.bufferCheckPosition=se.MAX_BUFFER_LENGTH,Ne.opt=be||{},Ne.opt.lowercase=Ne.opt.lowercase||Ne.opt.lowercasetags,Ne.looseCase=Ne.opt.lowercase?"toLowerCase":"toUpperCase",Ne.tags=[],Ne.closed=Ne.closedRoot=Ne.sawRoot=!1,Ne.tag=Ne.error=null,Ne.strict=!!Oe,Ne.noscript=!(!Oe&&!Ne.opt.noscript),Ne.state=Ie.BEGIN,Ne.strictEntities=Ne.opt.strictEntities,Ne.ENTITIES=Ne.strictEntities?(0,ie.default)(se.XML_ENTITIES):(0,ie.default)(se.ENTITIES),Ne.attribList=[],Ne.opt.xmlns&&(Ne.ns=(0,ie.default)(Bt)),Ne.trackPosition=Ne.opt.position!==!1,Ne.trackPosition&&(Ne.position=Ne.line=Ne.column=0),at(Ne,"onready")}function Se(Oe){for(var be=Math.max(se.MAX_BUFFER_LENGTH,10),Ne=0,$e=0,dt=bn.length;$e<dt;$e++){var Je=Oe[bn[$e]].length;if(Je>be)switch(bn[$e]){case"textNode":et(Oe);break;case"cdata":Ct(Oe,"oncdata",Oe.cdata),Oe.cdata="";break;case"script":Ct(Oe,"onscript",Oe.script),Oe.script="";break;default:st(Oe,"Max buffer length exceeded: "+bn[$e])}Ne=Math.max(Ne,Je)}var At=se.MAX_BUFFER_LENGTH-Ne;Oe.bufferCheckPosition=At+Oe.position}function we(Oe){for(var be=0,Ne=bn.length;be<Ne;be++)Oe[bn[be]]=""}function Pe(Oe){et(Oe),Oe.cdata!==""&&(Ct(Oe,"oncdata",Oe.cdata),Oe.cdata=""),Oe.script!==""&&(Ct(Oe,"onscript",Oe.script),Oe.script="")}function Ae(Oe,be){return new De(Oe,be)}function De(Oe,be){if(!(this instanceof De))return new De(Oe,be);Wt.apply(this),this._parser=new ue(Oe,be),this.writable=!0,this.readable=!0;var Ne=this;this._parser.onend=function(){Ne.emit("end")},this._parser.onerror=function($e){Ne.emit("error",$e),Ne._parser.error=null},this._decoder=null,Kt.forEach(function($e){(0,ce.default)(Ne,"on"+$e,{get:function(){return Ne._parser["on"+$e]},set:function(dt){if(!dt)return Ne.removeAllListeners($e),Ne._parser["on"+$e]=dt,dt;Ne.on($e,dt)},enumerable:!0,configurable:!1})})}function ze(Oe){return Oe===" "||Oe===`
|
|
|
`||Oe==="\r"||Oe===" "}function Ze(Oe){return Oe==='"'||Oe==="'"}function Xe(Oe){return Oe===">"||ze(Oe)}function Ge(Oe,be){return Oe.test(be)}function ft(Oe,be){return!Ge(Oe,be)}function at(Oe,be,Ne){Oe[be]&&Oe[be](Ne)}function Ct(Oe,be,Ne){Oe.textNode&&et(Oe),at(Oe,be,Ne)}function et(Oe){Oe.textNode=yt(Oe.opt,Oe.textNode),Oe.textNode&&at(Oe,"ontext",Oe.textNode),Oe.textNode=""}function yt(Oe,be){return Oe.trim&&(be=be.trim()),Oe.normalize&&(be=be.replace(/\s+/g," ")),be}function st(Oe,be){return et(Oe),Oe.trackPosition&&(be+=`
|
|
|
Line: `+Oe.line+`
|
|
|
Column: `+Oe.column+`
|
|
|
Char: `+Oe.c),be=new Error(be),Oe.error=be,at(Oe,"onerror",be),Oe}function zt(Oe){return Oe.sawRoot&&!Oe.closedRoot&<(Oe,"Unclosed root tag"),Oe.state!==Ie.BEGIN&&Oe.state!==Ie.BEGIN_WHITESPACE&&Oe.state!==Ie.TEXT&&st(Oe,"Unexpected end"),et(Oe),Oe.c="",Oe.closed=!0,at(Oe,"onend"),ue.call(Oe,Oe.strict,Oe.opt),Oe}function lt(Oe,be){if((Oe===void 0?"undefined":(0,ve.default)(Oe))!=="object"||!(Oe instanceof ue))throw new Error("bad call to strictFail");Oe.strict&&st(Oe,be)}function tt(Oe){Oe.strict||(Oe.tagName=Oe.tagName[Oe.looseCase]());var be=Oe.tags[Oe.tags.length-1]||Oe,Ne=Oe.tag={name:Oe.tagName,attributes:{}};Oe.opt.xmlns&&(Ne.ns=be.ns),Oe.attribList.length=0,Ct(Oe,"onopentagstart",Ne)}function ut(Oe,be){var Ne=Oe.indexOf(":"),$e=Ne<0?["",Oe]:Oe.split(":"),dt=$e[0],Je=$e[1];return be&&Oe==="xmlns"&&(dt="xmlns",Je=""),{prefix:dt,local:Je}}function mt(Oe){if(Oe.strict||(Oe.attribName=Oe.attribName[Oe.looseCase]()),Oe.attribList.indexOf(Oe.attribName)!==-1||Oe.tag.attributes.hasOwnProperty(Oe.attribName))return void(Oe.attribName=Oe.attribValue="");if(Oe.opt.xmlns){var be=ut(Oe.attribName,!0),Ne=be.prefix,$e=be.local;if(Ne==="xmlns")if($e==="xml"&&Oe.attribValue!==kt)lt(Oe,"xml: prefix must be bound to "+kt+`
|
|
|
Actual: `+Oe.attribValue);else if($e==="xmlns"&&Oe.attribValue!==pt)lt(Oe,"xmlns: prefix must be bound to "+pt+`
|
|
|
Actual: `+Oe.attribValue);else{var dt=Oe.tag,Je=Oe.tags[Oe.tags.length-1]||Oe;dt.ns===Je.ns&&(dt.ns=(0,ie.default)(Je.ns)),dt.ns[$e]=Oe.attribValue}Oe.attribList.push([Oe.attribName,Oe.attribValue])}else Oe.tag.attributes[Oe.attribName]=Oe.attribValue,Ct(Oe,"onattribute",{name:Oe.attribName,value:Oe.attribValue});Oe.attribName=Oe.attribValue=""}function Pt(Oe,be){if(Oe.opt.xmlns){var Ne=Oe.tag,$e=ut(Oe.tagName);Ne.prefix=$e.prefix,Ne.local=$e.local,Ne.uri=Ne.ns[$e.prefix]||"",Ne.prefix&&!Ne.uri&&(lt(Oe,"Unbound namespace prefix: "+(0,ge.default)(Oe.tagName)),Ne.uri=$e.prefix);var dt=Oe.tags[Oe.tags.length-1]||Oe;Ne.ns&&dt.ns!==Ne.ns&&(0,ee.default)(Ne.ns).forEach(function(Ti){Ct(Oe,"onopennamespace",{prefix:Ti,uri:Ne.ns[Ti]})});for(var Je=0,At=Oe.attribList.length;Je<At;Je++){var tn=Oe.attribList[Je],pn=tn[0],ln=tn[1],gn=ut(pn,!0),Hn=gn.prefix,An=gn.local,qn=Hn===""?"":Ne.ns[Hn]||"",ai={name:pn,value:ln,prefix:Hn,local:An,uri:qn};Hn&&Hn!=="xmlns"&&!qn&&(lt(Oe,"Unbound namespace prefix: "+(0,ge.default)(Hn)),ai.uri=Hn),Oe.tag.attributes[pn]=ai,Ct(Oe,"onattribute",ai)}Oe.attribList.length=0}Oe.tag.isSelfClosing=!!be,Oe.sawRoot=!0,Oe.tags.push(Oe.tag),Ct(Oe,"onopentag",Oe.tag),be||(Oe.noscript||Oe.tagName.toLowerCase()!=="script"?Oe.state=Ie.TEXT:Oe.state=Ie.SCRIPT,Oe.tag=null,Oe.tagName=""),Oe.attribName=Oe.attribValue="",Oe.attribList.length=0}function gt(Oe){if(!Oe.tagName)return lt(Oe,"Weird empty close tag."),Oe.textNode+="</>",void(Oe.state=Ie.TEXT);if(Oe.script){if(Oe.tagName!=="script")return Oe.script+="</"+Oe.tagName+">",Oe.tagName="",void(Oe.state=Ie.SCRIPT);Ct(Oe,"onscript",Oe.script),Oe.script=""}var be=Oe.tags.length,Ne=Oe.tagName;Oe.strict||(Ne=Ne[Oe.looseCase]());for(var $e=Ne;be--&&Oe.tags[be].name!==$e;)lt(Oe,"Unexpected close tag");if(be<0)return lt(Oe,"Unmatched closing tag: "+Oe.tagName),Oe.textNode+="</"+Oe.tagName+">",void(Oe.state=Ie.TEXT);Oe.tagName=Ne;for(var dt=Oe.tags.length;dt-- >be;){var Je=Oe.tag=Oe.tags.pop();Oe.tagName=Oe.tag.name,Ct(Oe,"onclosetag",Oe.tagName);var At={};for(var tn in Je.ns)At[tn]=Je.ns[tn];var pn=Oe.tags[Oe.tags.length-1]||Oe;Oe.opt.xmlns&&Je.ns!==pn.ns&&(0,ee.default)(Je.ns).forEach(function(ln){var gn=Je.ns[ln];Ct(Oe,"onclosenamespace",{prefix:ln,uri:gn})})}be===0&&(Oe.closedRoot=!0),Oe.tagName=Oe.attribValue=Oe.attribName="",Oe.attribList.length=0,Oe.state=Ie.TEXT}function Ft(Oe){var be,Ne=Oe.entity,$e=Ne.toLowerCase(),dt="";return Oe.ENTITIES[Ne]?Oe.ENTITIES[Ne]:Oe.ENTITIES[$e]?Oe.ENTITIES[$e]:(Ne=$e,Ne.charAt(0)==="#"&&(Ne.charAt(1)==="x"?(Ne=Ne.slice(2),be=parseInt(Ne,16),dt=be.toString(16)):(Ne=Ne.slice(1),be=parseInt(Ne,10),dt=be.toString(10))),Ne=Ne.replace(/^0+/,""),isNaN(be)||dt.toLowerCase()!==Ne?(lt(Oe,"Invalid character entity"),"&"+Oe.entity+";"):(0,ye.default)(be))}function Ht(Oe,be){be==="<"?(Oe.state=Ie.OPEN_WAKA,Oe.startTagPosition=Oe.position):ze(be)||(lt(Oe,"Non-whitespace before first tag."),Oe.textNode=be,Oe.state=Ie.TEXT)}function hn(Oe,be){var Ne="";return be<Oe.length&&(Ne=Oe.charAt(be)),Ne}function Qt(Oe){var be=this;if(this.error)throw this.error;if(be.closed)return st(be,"Cannot write after close. Assign an onready handler.");if(Oe===null)return zt(be);(Oe===void 0?"undefined":(0,ve.default)(Oe))==="object"&&(Oe=Oe.toString());for(var Ne=0,$e="";$e=hn(Oe,Ne++),be.c=$e,!!$e;)switch(be.trackPosition&&(be.position++,$e===`
|
|
|
`?(be.line++,be.column=0):be.column++),be.state){case Ie.BEGIN:if(be.state=Ie.BEGIN_WHITESPACE,$e==="\uFEFF")continue;Ht(be,$e);continue;case Ie.BEGIN_WHITESPACE:Ht(be,$e);continue;case Ie.TEXT:if(be.sawRoot&&!be.closedRoot){for(var dt=Ne-1;$e&&$e!=="<"&&$e!=="&";)($e=hn(Oe,Ne++))&&be.trackPosition&&(be.position++,$e===`
|
|
|
`?(be.line++,be.column=0):be.column++);be.textNode+=Oe.substring(dt,Ne-1)}$e!=="<"||be.sawRoot&&be.closedRoot&&!be.strict?(ze($e)||be.sawRoot&&!be.closedRoot||lt(be,"Text data outside of root node."),$e==="&"?be.state=Ie.TEXT_ENTITY:be.textNode+=$e):(be.state=Ie.OPEN_WAKA,be.startTagPosition=be.position);continue;case Ie.SCRIPT:$e==="<"?be.state=Ie.SCRIPT_ENDING:be.script+=$e;continue;case Ie.SCRIPT_ENDING:$e==="/"?be.state=Ie.CLOSE_TAG:(be.script+="<"+$e,be.state=Ie.SCRIPT);continue;case Ie.OPEN_WAKA:if($e==="!")be.state=Ie.SGML_DECL,be.sgmlDecl="";else if(!ze($e))if(Ge(xt,$e))be.state=Ie.OPEN_TAG,be.tagName=$e;else if($e==="/")be.state=Ie.CLOSE_TAG,be.tagName="";else if($e==="?")be.state=Ie.PROC_INST,be.procInstName=be.procInstBody="";else{if(lt(be,"Unencoded <"),be.startTagPosition+1<be.position){var Je=be.position-be.startTagPosition;$e=new Array(Je).join(" ")+$e}be.textNode+="<"+$e,be.state=Ie.TEXT}continue;case Ie.SGML_DECL:(be.sgmlDecl+$e).toUpperCase()===Jt?(Ct(be,"onopencdata"),be.state=Ie.CDATA,be.sgmlDecl="",be.cdata=""):be.sgmlDecl+$e==="--"?(be.state=Ie.COMMENT,be.comment="",be.sgmlDecl=""):(be.sgmlDecl+$e).toUpperCase()===Yt?(be.state=Ie.DOCTYPE,(be.doctype||be.sawRoot)&<(be,"Inappropriately located doctype declaration"),be.doctype="",be.sgmlDecl=""):$e===">"?(Ct(be,"onsgmldeclaration",be.sgmlDecl),be.sgmlDecl="",be.state=Ie.TEXT):(Ze($e)&&(be.state=Ie.SGML_DECL_QUOTED),be.sgmlDecl+=$e);continue;case Ie.SGML_DECL_QUOTED:$e===be.q&&(be.state=Ie.SGML_DECL,be.q=""),be.sgmlDecl+=$e;continue;case Ie.DOCTYPE:$e===">"?(be.state=Ie.TEXT,Ct(be,"ondoctype",be.doctype),be.doctype=!0):(be.doctype+=$e,$e==="["?be.state=Ie.DOCTYPE_DTD:Ze($e)&&(be.state=Ie.DOCTYPE_QUOTED,be.q=$e));continue;case Ie.DOCTYPE_QUOTED:be.doctype+=$e,$e===be.q&&(be.q="",be.state=Ie.DOCTYPE);continue;case Ie.DOCTYPE_DTD:be.doctype+=$e,$e==="]"?be.state=Ie.DOCTYPE:Ze($e)&&(be.state=Ie.DOCTYPE_DTD_QUOTED,be.q=$e);continue;case Ie.DOCTYPE_DTD_QUOTED:be.doctype+=$e,$e===be.q&&(be.state=Ie.DOCTYPE_DTD,be.q="");continue;case Ie.COMMENT:$e==="-"?be.state=Ie.COMMENT_ENDING:be.comment+=$e;continue;case Ie.COMMENT_ENDING:$e==="-"?(be.state=Ie.COMMENT_ENDED,be.comment=yt(be.opt,be.comment),be.comment&&Ct(be,"oncomment",be.comment),be.comment=""):(be.comment+="-"+$e,be.state=Ie.COMMENT);continue;case Ie.COMMENT_ENDED:$e!==">"?(lt(be,"Malformed comment"),be.comment+="--"+$e,be.state=Ie.COMMENT):be.state=Ie.TEXT;continue;case Ie.CDATA:$e==="]"?be.state=Ie.CDATA_ENDING:be.cdata+=$e;continue;case Ie.CDATA_ENDING:$e==="]"?be.state=Ie.CDATA_ENDING_2:(be.cdata+="]"+$e,be.state=Ie.CDATA);continue;case Ie.CDATA_ENDING_2:$e===">"?(be.cdata&&Ct(be,"oncdata",be.cdata),Ct(be,"onclosecdata"),be.cdata="",be.state=Ie.TEXT):$e==="]"?be.cdata+="]":(be.cdata+="]]"+$e,be.state=Ie.CDATA);continue;case Ie.PROC_INST:$e==="?"?be.state=Ie.PROC_INST_ENDING:ze($e)?be.state=Ie.PROC_INST_BODY:be.procInstName+=$e;continue;case Ie.PROC_INST_BODY:if(!be.procInstBody&&ze($e))continue;$e==="?"?be.state=Ie.PROC_INST_ENDING:be.procInstBody+=$e;continue;case Ie.PROC_INST_ENDING:$e===">"?(Ct(be,"onprocessinginstruction",{name:be.procInstName,body:be.procInstBody}),be.procInstName=be.procInstBody="",be.state=Ie.TEXT):(be.procInstBody+="?"+$e,be.state=Ie.PROC_INST_BODY);continue;case Ie.OPEN_TAG:Ge(vt,$e)?be.tagName+=$e:(tt(be),$e===">"?Pt(be):$e==="/"?be.state=Ie.OPEN_TAG_SLASH:(ze($e)||lt(be,"Invalid character in tag name"),be.state=Ie.ATTRIB));continue;case Ie.OPEN_TAG_SLASH:$e===">"?(Pt(be,!0),gt(be)):(lt(be,"Forward-slash in opening tag not followed by >"),be.state=Ie.ATTRIB);continue;case Ie.ATTRIB:if(ze($e))continue;$e===">"?Pt(be):$e==="/"?be.state=Ie.OPEN_TAG_SLASH:Ge(xt,$e)?(be.attribName=$e,be.attribValue="",be.state=Ie.ATTRIB_NAME):lt(be,"Invalid attribute name");continue;case Ie.ATTRIB_NAME:$e==="="?be.state=Ie.ATTRIB_VALUE:$e===">"?(lt(be,"Attribute without value"),be.attribValue=be.attribName,mt(be),Pt(be)):ze($e)?be.state=Ie.ATTRIB_NAME_SAW_WHITE:Ge(vt,$e)?be.attribName+=$e:lt(be,"Invalid attribute name");continue;case Ie.ATTRIB_NAME_SAW_WHITE:if($e==="=")be.state=Ie.ATTRIB_VALUE;else{if(ze($e))continue;lt(be,"Attribute without value"),be.tag.attributes[be.attribName]="",be.attribValue="",Ct(be,"onattribute",{name:be.attribName,value:""}),be.attribName="",$e===">"?Pt(be):Ge(xt,$e)?(be.attribName=$e,be.state=Ie.ATTRIB_NAME):(lt(be,"Invalid attribute name"),be.state=Ie.ATTRIB)}continue;case Ie.ATTRIB_VALUE:if(ze($e))continue;Ze($e)?(be.q=$e,be.state=Ie.ATTRIB_VALUE_QUOTED):(lt(be,"Unquoted attribute value"),be.state=Ie.ATTRIB_VALUE_UNQUOTED,be.attribValue=$e);continue;case Ie.ATTRIB_VALUE_QUOTED:if($e!==be.q){$e==="&"?be.state=Ie.ATTRIB_VALUE_ENTITY_Q:be.attribValue+=$e;continue}mt(be),be.q="",be.state=Ie.ATTRIB_VALUE_CLOSED;continue;case Ie.ATTRIB_VALUE_CLOSED:ze($e)?be.state=Ie.ATTRIB:$e===">"?Pt(be):$e==="/"?be.state=Ie.OPEN_TAG_SLASH:Ge(xt,$e)?(lt(be,"No whitespace between attributes"),be.attribName=$e,be.attribValue="",be.state=Ie.ATTRIB_NAME):lt(be,"Invalid attribute name");continue;case Ie.ATTRIB_VALUE_UNQUOTED:if(!Xe($e)){$e==="&"?be.state=Ie.ATTRIB_VALUE_ENTITY_U:be.attribValue+=$e;continue}mt(be),$e===">"?Pt(be):be.state=Ie.ATTRIB;continue;case Ie.CLOSE_TAG:if(be.tagName)$e===">"?gt(be):Ge(vt,$e)?be.tagName+=$e:be.script?(be.script+="</"+be.tagName,be.tagName="",be.state=Ie.SCRIPT):(ze($e)||lt(be,"Invalid tagname in closing tag"),be.state=Ie.CLOSE_TAG_SAW_WHITE);else{if(ze($e))continue;ft(xt,$e)?be.script?(be.script+="</"+$e,be.state=Ie.SCRIPT):lt(be,"Invalid tagname in closing tag."):be.tagName=$e}continue;case Ie.CLOSE_TAG_SAW_WHITE:if(ze($e))continue;$e===">"?gt(be):lt(be,"Invalid characters in closing tag");continue;case Ie.TEXT_ENTITY:case Ie.ATTRIB_VALUE_ENTITY_Q:case Ie.ATTRIB_VALUE_ENTITY_U:var At,tn;switch(be.state){case Ie.TEXT_ENTITY:At=Ie.TEXT,tn="textNode";break;case Ie.ATTRIB_VALUE_ENTITY_Q:At=Ie.ATTRIB_VALUE_QUOTED,tn="attribValue";break;case Ie.ATTRIB_VALUE_ENTITY_U:At=Ie.ATTRIB_VALUE_UNQUOTED,tn="attribValue"}$e===";"?(be[tn]+=Ft(be),be.entity="",be.state=At):Ge(be.entity.length?He:nt,$e)?be.entity+=$e:(lt(be,"Invalid character in entity name"),be[tn]+="&"+be.entity+$e,be.entity="",be.state=At);continue;default:throw new Error(be,"Unknown state: "+be.state)}return be.position>=be.bufferCheckPosition&&Se(be),be}se.parser=function(Oe,be){return new ue(Oe,be)},se.SAXParser=ue,se.SAXStream=De,se.createStream=Ae,se.MAX_BUFFER_LENGTH=65536;var bn=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];se.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],ie.default||(Object.create=function(Oe){function be(){}return be.prototype=Oe,new be}),ee.default||(Object.keys=function(Oe){var be=[];for(var Ne in Oe)Oe.hasOwnProperty(Ne)&&be.push(Ne);return be}),ue.prototype={end:function(){zt(this)},write:Qt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){Pe(this)}};var Wt;try{Wt=me("stream").Stream}catch(Oe){Wt=function(){}}var Kt=se.EVENTS.filter(function(Oe){return Oe!=="error"&&Oe!=="end"});De.prototype=(0,ie.default)(Wt.prototype,{constructor:{value:De}}),De.prototype.write=function(Oe){if(typeof Ce=="function"&&typeof Ce.isBuffer=="function"&&Ce.isBuffer(Oe)){if(!this._decoder){var be=me("string_decoder").StringDecoder;this._decoder=new be("utf8")}Oe=this._decoder.write(Oe)}return this._parser.write(Oe.toString()),this.emit("data",Oe),!0},De.prototype.end=function(Oe){return Oe&&Oe.length&&this.write(Oe),this._parser.end(),!0},De.prototype.on=function(Oe,be){var Ne=this;return Ne._parser["on"+Oe]||Kt.indexOf(Oe)===-1||(Ne._parser["on"+Oe]=function(){var $e=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);$e.splice(0,0,Oe),Ne.emit.apply(Ne,$e)}),Wt.prototype.on.call(Ne,Oe,be)};var Jt="[CDATA[",Yt="DOCTYPE",kt="http://www.w3.org/XML/1998/namespace",pt="http://www.w3.org/2000/xmlns/",Bt={xml:kt,xmlns:pt},xt=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,vt=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,nt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,He=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Ie=0;se.STATE={BEGIN:Ie++,BEGIN_WHITESPACE:Ie++,TEXT:Ie++,TEXT_ENTITY:Ie++,OPEN_WAKA:Ie++,SGML_DECL:Ie++,SGML_DECL_QUOTED:Ie++,DOCTYPE:Ie++,DOCTYPE_QUOTED:Ie++,DOCTYPE_DTD:Ie++,DOCTYPE_DTD_QUOTED:Ie++,COMMENT_STARTING:Ie++,COMMENT:Ie++,COMMENT_ENDING:Ie++,COMMENT_ENDED:Ie++,CDATA:Ie++,CDATA_ENDING:Ie++,CDATA_ENDING_2:Ie++,PROC_INST:Ie++,PROC_INST_BODY:Ie++,PROC_INST_ENDING:Ie++,OPEN_TAG:Ie++,OPEN_TAG_SLASH:Ie++,ATTRIB:Ie++,ATTRIB_NAME:Ie++,ATTRIB_NAME_SAW_WHITE:Ie++,ATTRIB_VALUE:Ie++,ATTRIB_VALUE_QUOTED:Ie++,ATTRIB_VALUE_CLOSED:Ie++,ATTRIB_VALUE_UNQUOTED:Ie++,ATTRIB_VALUE_ENTITY_Q:Ie++,ATTRIB_VALUE_ENTITY_U:Ie++,CLOSE_TAG:Ie++,CLOSE_TAG_SAW_WHITE:Ie++,SCRIPT:Ie++,SCRIPT_ENDING:Ie++},se.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},se.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,ee.default)(se.ENTITIES).forEach(function(Oe){var be=se.ENTITIES[Oe],Ne=typeof be=="number"?String.fromCharCode(be):be;se.ENTITIES[Oe]=Ne});for(var We in se.STATE)se.STATE[se.STATE[We]]=We;Ie=se.STATE,ye.default||function(){var Oe=String.fromCharCode,be=Math.floor,Ne=function(){var $e,dt,Je=[],At=-1,tn=arguments.length;if(!tn)return"";for(var pn="";++At<tn;){var ln=Number(arguments[At]);if(!isFinite(ln)||ln<0||ln>1114111||be(ln)!==ln)throw RangeError("Invalid code point: "+ln);ln<=65535?Je.push(ln):(ln-=65536,$e=55296+(ln>>10),dt=ln%1024+56320,Je.push($e,dt)),(At+1===tn||Je.length>16384)&&(pn+=Oe.apply(null,Je),Je.length=0)}return pn};ce.default?Object.defineProperty(String,"fromCodePoint",{value:Ne,configurable:!0,writable:!0}):String.fromCodePoint=Ne}()})(ke===void 0?(void 0).sax={}:ke)}).call(this,me("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(me,Be,ke){function Ce(){Le.call(this)}Be.exports=Ce;var Le=me("events").EventEmitter;me("inherits")(Ce,Le),Ce.Readable=me("readable-stream/readable.js"),Ce.Writable=me("readable-stream/writable.js"),Ce.Duplex=me("readable-stream/duplex.js"),Ce.Transform=me("readable-stream/transform.js"),Ce.PassThrough=me("readable-stream/passthrough.js"),Ce.Stream=Ce,Ce.prototype.pipe=function(he,ye){function xe(oe){he.writable&&he.write(oe)===!1&&z.pause&&z.pause()}function ge(){z.readable&&z.resume&&z.resume()}function le(){ee||(ee=!0,he.end())}function ve(){ee||(ee=!0,typeof he.destroy=="function"&&he.destroy())}function de(oe){if(ce(),Le.listenerCount(this,"error")===0)throw oe}function ce(){z.removeListener("data",xe),he.removeListener("drain",ge),z.removeListener("end",le),z.removeListener("close",ve),z.removeListener("error",de),he.removeListener("error",de),z.removeListener("end",ce),z.removeListener("close",ce),he.removeListener("close",ce)}var z=this;z.on("data",xe),he.on("drain",ge),he._isStdio||ye&&ye.end===!1||(z.on("end",le),z.on("close",ve));var ee=!1;return z.on("error",de),he.on("error",de),z.on("end",ce),z.on("close",ce),he.on("close",ce),he.emit("pipe",z),he}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(me,Be,ke){(function(Ce){var Le=me("./lib/request"),he=me("./lib/response"),ye=me("xtend"),xe=me("builtin-status-codes"),ge=me("url"),le=ke;le.request=function(ve,de){ve=typeof ve=="string"?ge.parse(ve):ye(ve);var ce=Ce.location.protocol.search(/^https?:$/)===-1?"http:":"",z=ve.protocol||ce,ee=ve.hostname||ve.host,oe=ve.port,ie=ve.path||"/";ee&&ee.indexOf(":")!==-1&&(ee="["+ee+"]"),ve.url=(ee?z+"//"+ee:"")+(oe?":"+oe:"")+ie,ve.method=(ve.method||"GET").toUpperCase(),ve.headers=ve.headers||{};var se=new Le(ve);return de&&se.on("response",de),se},le.get=function(ve,de){var ce=le.request(ve,de);return ce.end(),ce},le.ClientRequest=Le,le.IncomingMessage=he.IncomingMessage,le.Agent=function(){},le.Agent.defaultMaxSockets=4,le.globalAgent=new le.Agent,le.STATUS_CODES=xe,le.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(me,Be,ke){(function(Ce){"use strict";function Le(){if(xe!==void 0)return xe;if(Ce.XMLHttpRequest){xe=new Ce.XMLHttpRequest;try{xe.open("GET",Ce.XDomainRequest?"/":"https://example.com")}catch(ve){xe=null}}else xe=null;return xe}function he(ve){var de=Le();if(!de)return!1;try{return de.responseType=ve,de.responseType===ve}catch(ce){}return!1}function ye(ve){return typeof ve=="function"}ke.fetch=ye(Ce.fetch)&&ye(Ce.ReadableStream),ke.writableStream=ye(Ce.WritableStream),ke.abortController=ye(Ce.AbortController),ke.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),ke.blobConstructor=!0}catch(ve){}var xe,ge=Ce.ArrayBuffer!==void 0,le=ge&&ye(Ce.ArrayBuffer.prototype.slice);ke.arraybuffer=ke.fetch||ge&&he("arraybuffer"),ke.msstream=!ke.fetch&&le&&he("ms-stream"),ke.mozchunkedarraybuffer=!ke.fetch&&ge&&he("moz-chunked-arraybuffer"),ke.overrideMimeType=ke.fetch||!!Le()&&ye(Le().overrideMimeType),ke.vbArray=ye(Ce.VBArray),xe=null}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(me,Be,ke){(function(Ce,Le,he){"use strict";function ye(Se,we){return ve.fetch&&we?"fetch":ve.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ve.msstream?"ms-stream":ve.arraybuffer&&Se?"arraybuffer":ve.vbArray&&Se?"text:vbarray":"text"}function xe(Se){try{var we=Se.status;return we!==null&&we!==0}catch(Pe){return!1}}var ge=me("babel-runtime/core-js/object/keys"),le=function(Se){return Se&&Se.__esModule?Se:{default:Se}}(ge),ve=me("./capability"),de=me("inherits"),ce=me("./response"),z=me("readable-stream"),ee=me("to-arraybuffer"),oe=ce.IncomingMessage,ie=ce.readyStates,se=Be.exports=function(Se){var we=this;z.Writable.call(we),we._opts=Se,we._body=[],we._headers={},Se.auth&&we.setHeader("Authorization","Basic "+new he(Se.auth).toString("base64")),(0,le.default)(Se.headers).forEach(function(De){we.setHeader(De,Se.headers[De])});var Pe,Ae=!0;if(Se.mode==="disable-fetch"||"requestTimeout"in Se&&!ve.abortController)Ae=!1,Pe=!0;else if(Se.mode==="prefer-streaming")Pe=!1;else if(Se.mode==="allow-wrong-content-type")Pe=!ve.overrideMimeType;else{if(Se.mode&&Se.mode!=="default"&&Se.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");Pe=!0}we._mode=ye(Pe,Ae),we._fetchTimer=null,we.on("finish",function(){we._onFinish()})};de(se,z.Writable),se.prototype.setHeader=function(Se,we){var Pe=this,Ae=Se.toLowerCase();ue.indexOf(Ae)===-1&&(Pe._headers[Ae]={name:Se,value:we})},se.prototype.getHeader=function(Se){var we=this._headers[Se.toLowerCase()];return we?we.value:null},se.prototype.removeHeader=function(Se){delete this._headers[Se.toLowerCase()]},se.prototype._onFinish=function(){var Se=this;if(!Se._destroyed){var we=Se._opts,Pe=Se._headers,Ae=null;we.method!=="GET"&&we.method!=="HEAD"&&(Ae=ve.arraybuffer?ee(he.concat(Se._body)):ve.blobConstructor?new Le.Blob(Se._body.map(function(Ge){return ee(Ge)}),{type:(Pe["content-type"]||{}).value||""}):he.concat(Se._body).toString());var De=[];if((0,le.default)(Pe).forEach(function(Ge){var ft=Pe[Ge].name,at=Pe[Ge].value;Array.isArray(at)?at.forEach(function(Ct){De.push([ft,Ct])}):De.push([ft,at])}),Se._mode==="fetch"){var ze=null;if(ve.abortController){var Ze=new AbortController;ze=Ze.signal,Se._fetchAbortController=Ze,"requestTimeout"in we&&we.requestTimeout!==0&&(Se._fetchTimer=Le.setTimeout(function(){Se.emit("requestTimeout"),Se._fetchAbortController&&Se._fetchAbortController.abort()},we.requestTimeout))}Le.fetch(Se._opts.url,{method:Se._opts.method,headers:De,body:Ae||void 0,mode:"cors",credentials:we.withCredentials?"include":"same-origin",signal:ze}).then(function(Ge){Se._fetchResponse=Ge,Se._connect()},function(Ge){Le.clearTimeout(Se._fetchTimer),Se._destroyed||Se.emit("error",Ge)})}else{var Xe=Se._xhr=new Le.XMLHttpRequest;try{Xe.open(Se._opts.method,Se._opts.url,!0)}catch(Ge){return void Ce.nextTick(function(){Se.emit("error",Ge)})}"responseType"in Xe&&(Xe.responseType=Se._mode.split(":")[0]),"withCredentials"in Xe&&(Xe.withCredentials=!!we.withCredentials),Se._mode==="text"&&"overrideMimeType"in Xe&&Xe.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in we&&(Xe.timeout=we.requestTimeout,Xe.ontimeout=function(){Se.emit("requestTimeout")}),De.forEach(function(Ge){Xe.setRequestHeader(Ge[0],Ge[1])}),Se._response=null,Xe.onreadystatechange=function(){switch(Xe.readyState){case ie.LOADING:case ie.DONE:Se._onXHRProgress()}},Se._mode==="moz-chunked-arraybuffer"&&(Xe.onprogress=function(){Se._onXHRProgress()}),Xe.onerror=function(){Se._destroyed||Se.emit("error",new Error("XHR error"))};try{Xe.send(Ae)}catch(Ge){return void Ce.nextTick(function(){Se.emit("error",Ge)})}}}},se.prototype._onXHRProgress=function(){var Se=this;xe(Se._xhr)&&!Se._destroyed&&(Se._response||Se._connect(),Se._response._onXHRProgress())},se.prototype._connect=function(){var Se=this;Se._destroyed||(Se._response=new oe(Se._xhr,Se._fetchResponse,Se._mode,Se._fetchTimer),Se._response.on("error",function(we){Se.emit("error",we)}),Se.emit("response",Se._response))},se.prototype._write=function(Se,we,Pe){this._body.push(Se),Pe()},se.prototype.abort=se.prototype.destroy=function(){var Se=this;Se._destroyed=!0,Le.clearTimeout(Se._fetchTimer),Se._response&&(Se._response._destroyed=!0),Se._xhr?Se._xhr.abort():Se._fetchAbortController&&Se._fetchAbortController.abort()},se.prototype.end=function(Se,we,Pe){var Ae=this;typeof Se=="function"&&(Pe=Se,Se=void 0),z.Writable.prototype.end.call(Ae,Se,we,Pe)},se.prototype.flushHeaders=function(){},se.prototype.setTimeout=function(){},se.prototype.setNoDelay=function(){},se.prototype.setSocketKeepAlive=function(){};var ue=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,me("_process"),typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},me("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(me,Be,ke){(function(Ce,Le,he){"use strict";var ye=me("babel-runtime/core-js/promise"),xe=function(z){return z&&z.__esModule?z:{default:z}}(ye),ge=me("./capability"),le=me("inherits"),ve=me("readable-stream"),de=ke.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},ce=ke.IncomingMessage=function(z,ee,oe,ie){var se=this;if(ve.Readable.call(se),se._mode=oe,se.headers={},se.rawHeaders=[],se.trailers={},se.rawTrailers=[],se.on("end",function(){Ce.nextTick(function(){se.emit("close")})}),oe==="fetch"){if(se._fetchResponse=ee,se.url=ee.url,se.statusCode=ee.status,se.statusMessage=ee.statusText,ee.headers.forEach(function(Ae,De){se.headers[De.toLowerCase()]=Ae,se.rawHeaders.push(De,Ae)}),ge.writableStream){var ue=new WritableStream({write:function(Ae){return new xe.default(function(De,ze){se._destroyed?ze():se.push(new he(Ae))?De():se._resumeFetch=De})},close:function(){Le.clearTimeout(ie),se._destroyed||se.push(null)},abort:function(Ae){se._destroyed||se.emit("error",Ae)}});try{return void ee.body.pipeTo(ue).catch(function(Ae){Le.clearTimeout(ie),se._destroyed||se.emit("error",Ae)})}catch(Ae){}}var Se=ee.body.getReader();(function Ae(){Se.read().then(function(De){if(!se._destroyed){if(De.done)return Le.clearTimeout(ie),void se.push(null);se.push(new he(De.value)),Ae()}}).catch(function(De){Le.clearTimeout(ie),se._destroyed||se.emit("error",De)})})()}else if(se._xhr=z,se._pos=0,se.url=z.responseURL,se.statusCode=z.status,se.statusMessage=z.statusText,z.getAllResponseHeaders().split(/\r?\n/).forEach(function(Ae){var De=Ae.match(/^([^:]+):\s*(.*)/);if(De){var ze=De[1].toLowerCase();ze==="set-cookie"?(se.headers[ze]===void 0&&(se.headers[ze]=[]),se.headers[ze].push(De[2])):se.headers[ze]!==void 0?se.headers[ze]+=", "+De[2]:se.headers[ze]=De[2],se.rawHeaders.push(De[1],De[2])}}),se._charset="x-user-defined",!ge.overrideMimeType){var we=se.rawHeaders["mime-type"];if(we){var Pe=we.match(/;\s*charset=([^;])(;|$)/);Pe&&(se._charset=Pe[1].toLowerCase())}se._charset||(se._charset="utf-8")}};le(ce,ve.Readable),ce.prototype._read=function(){var z=this,ee=z._resumeFetch;ee&&(z._resumeFetch=null,ee())},ce.prototype._onXHRProgress=function(){var z=this,ee=z._xhr,oe=null;switch(z._mode){case"text:vbarray":if(ee.readyState!==de.DONE)break;try{oe=new Le.VBArray(ee.responseBody).toArray()}catch(we){}if(oe!==null){z.push(new he(oe));break}case"text":try{oe=ee.responseText}catch(we){z._mode="text:vbarray";break}if(oe.length>z._pos){var ie=oe.substr(z._pos);if(z._charset==="x-user-defined"){for(var se=new he(ie.length),ue=0;ue<ie.length;ue++)se[ue]=255&ie.charCodeAt(ue);z.push(se)}else z.push(ie,z._charset);z._pos=oe.length}break;case"arraybuffer":if(ee.readyState!==de.DONE||!ee.response)break;oe=ee.response,z.push(new he(new Uint8Array(oe)));break;case"moz-chunked-arraybuffer":if(oe=ee.response,ee.readyState!==de.LOADING||!oe)break;z.push(new he(new Uint8Array(oe)));break;case"ms-stream":if(oe=ee.response,ee.readyState!==de.LOADING)break;var Se=new Le.MSStreamReader;Se.onprogress=function(){Se.result.byteLength>z._pos&&(z.push(new he(new Uint8Array(Se.result.slice(z._pos)))),z._pos=Se.result.byteLength)},Se.onload=function(){z.push(null)},Se.readAsArrayBuffer(oe)}z._xhr.readyState===de.DONE&&z._mode!=="ms-stream"&&z.push(null)}}).call(this,me("_process"),typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},me("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(me,Be,ke){"use strict";function Ce(we){if(!we)return"utf8";for(var Pe;;)switch(we){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return we;default:if(Pe)return;we=(""+we).toLowerCase(),Pe=!0}}function Le(we){var Pe=Ce(we);if(typeof Pe!="string"&&(ue.isEncoding===Se||!Se(we)))throw new Error("Unknown encoding: "+we);return Pe||we}function he(we){this.encoding=Le(we);var Pe;switch(this.encoding){case"utf16le":this.text=ce,this.end=z,Pe=4;break;case"utf8":this.fillLast=le,Pe=4;break;case"base64":this.text=ee,this.end=oe,Pe=3;break;default:return this.write=ie,void(this.end=se)}this.lastNeed=0,this.lastTotal=0,this.lastChar=ue.allocUnsafe(Pe)}function ye(we){return we<=127?0:we>>5==6?2:we>>4==14?3:we>>3==30?4:we>>6==2?-1:-2}function xe(we,Pe,Ae){var De=Pe.length-1;if(De<Ae)return 0;var ze=ye(Pe[De]);return ze>=0?(ze>0&&(we.lastNeed=ze-1),ze):--De<Ae||ze===-2?0:(ze=ye(Pe[De]))>=0?(ze>0&&(we.lastNeed=ze-2),ze):--De<Ae||ze===-2?0:(ze=ye(Pe[De]),ze>=0?(ze>0&&(ze===2?ze=0:we.lastNeed=ze-3),ze):0)}function ge(we,Pe,Ae){if((192&Pe[0])!=128)return we.lastNeed=0,"\u951F\uFFFD";if(we.lastNeed>1&&Pe.length>1){if((192&Pe[1])!=128)return we.lastNeed=1,"\u951F\uFFFD";if(we.lastNeed>2&&Pe.length>2&&(192&Pe[2])!=128)return we.lastNeed=2,"\u951F\uFFFD"}}function le(we){var Pe=this.lastTotal-this.lastNeed,Ae=ge(this,we,Pe);return Ae!==void 0?Ae:this.lastNeed<=we.length?(we.copy(this.lastChar,Pe,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(we.copy(this.lastChar,Pe,0,we.length),void(this.lastNeed-=we.length))}function ve(we,Pe){var Ae=xe(this,we,Pe);if(!this.lastNeed)return we.toString("utf8",Pe);this.lastTotal=Ae;var De=we.length-(Ae-this.lastNeed);return we.copy(this.lastChar,0,De),we.toString("utf8",Pe,De)}function de(we){var Pe=we&&we.length?this.write(we):"";return this.lastNeed?Pe+"\u951F\uFFFD":Pe}function ce(we,Pe){if((we.length-Pe)%2==0){var Ae=we.toString("utf16le",Pe);if(Ae){var De=Ae.charCodeAt(Ae.length-1);if(De>=55296&&De<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=we[we.length-2],this.lastChar[1]=we[we.length-1],Ae.slice(0,-1)}return Ae}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=we[we.length-1],we.toString("utf16le",Pe,we.length-1)}function z(we){var Pe=we&&we.length?this.write(we):"";if(this.lastNeed){var Ae=this.lastTotal-this.lastNeed;return Pe+this.lastChar.toString("utf16le",0,Ae)}return Pe}function ee(we,Pe){var Ae=(we.length-Pe)%3;return Ae===0?we.toString("base64",Pe):(this.lastNeed=3-Ae,this.lastTotal=3,Ae===1?this.lastChar[0]=we[we.length-1]:(this.lastChar[0]=we[we.length-2],this.lastChar[1]=we[we.length-1]),we.toString("base64",Pe,we.length-Ae))}function oe(we){var Pe=we&&we.length?this.write(we):"";return this.lastNeed?Pe+this.lastChar.toString("base64",0,3-this.lastNeed):Pe}function ie(we){return we.toString(this.encoding)}function se(we){return we&&we.length?this.write(we):""}var ue=me("safe-buffer").Buffer,Se=ue.isEncoding||function(we){switch((we=""+we)&&we.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};ke.StringDecoder=he,he.prototype.write=function(we){if(we.length===0)return"";var Pe,Ae;if(this.lastNeed){if((Pe=this.fillLast(we))===void 0)return"";Ae=this.lastNeed,this.lastNeed=0}else Ae=0;return Ae<we.length?Pe?Pe+this.text(we,Ae):this.text(we,Ae):Pe||""},he.prototype.end=de,he.prototype.text=ve,he.prototype.fillLast=function(we){if(this.lastNeed<=we.length)return we.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);we.copy(this.lastChar,this.lastTotal-this.lastNeed,0,we.length),this.lastNeed-=we.length}},{"safe-buffer":193}],201:[function(me,Be,ke){(function(Ce,Le){function he(de,ce){this._id=de,this._clearFn=ce}var ye=me("process/browser.js").nextTick,xe=Function.prototype.apply,ge=Array.prototype.slice,le={},ve=0;ke.setTimeout=function(){return new he(xe.call(setTimeout,window,arguments),clearTimeout)},ke.setInterval=function(){return new he(xe.call(setInterval,window,arguments),clearInterval)},ke.clearTimeout=ke.clearInterval=function(de){de.close()},he.prototype.unref=he.prototype.ref=function(){},he.prototype.close=function(){this._clearFn.call(window,this._id)},ke.enroll=function(de,ce){clearTimeout(de._idleTimeoutId),de._idleTimeout=ce},ke.unenroll=function(de){clearTimeout(de._idleTimeoutId),de._idleTimeout=-1},ke._unrefActive=ke.active=function(de){clearTimeout(de._idleTimeoutId);var ce=de._idleTimeout;ce>=0&&(de._idleTimeoutId=setTimeout(function(){de._onTimeout&&de._onTimeout()},ce))},ke.setImmediate=typeof Ce=="function"?Ce:function(de){var ce=ve++,z=!(arguments.length<2)&&ge.call(arguments,1);return le[ce]=!0,ye(function(){le[ce]&&(z?de.apply(null,z):de.call(null),ke.clearImmediate(ce))}),ce},ke.clearImmediate=typeof Le=="function"?Le:function(de){delete le[de]}}).call(this,me("timers").setImmediate,me("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(me,Be,ke){var Ce=me("buffer").Buffer;Be.exports=function(Le){if(Le instanceof Uint8Array){if(Le.byteOffset===0&&Le.byteLength===Le.buffer.byteLength)return Le.buffer;if(typeof Le.buffer.slice=="function")return Le.buffer.slice(Le.byteOffset,Le.byteOffset+Le.byteLength)}if(Ce.isBuffer(Le)){for(var he=new Uint8Array(Le.length),ye=Le.length,xe=0;xe<ye;xe++)he[xe]=Le[xe];return he.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(me,Be,ke){"use strict";function Ce(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function Le(ze,Ze,Xe){if(ze&&le.isObject(ze)&&ze instanceof Ce)return ze;var Ge=new Ce;return Ge.parse(ze,Ze,Xe),Ge}function he(ze){return le.isString(ze)&&(ze=Le(ze)),ze instanceof Ce?ze.format():Ce.prototype.format.call(ze)}function ye(ze,Ze){return Le(ze,!1,!0).resolve(Ze)}function xe(ze,Ze){return ze?Le(ze,!1,!0).resolveObject(Ze):Ze}var ge=me("punycode"),le=me("./util");ke.parse=Le,ke.resolve=ye,ke.resolveObject=xe,ke.format=he,ke.Url=Ce;var ve=/^([a-z0-9.+-]+:)/i,de=/:[0-9]*$/,ce=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,z=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],ee=["{","}","|","\\","^","`"].concat(z),oe=["'"].concat(ee),ie=["%","/","?",";","#"].concat(oe),se=["/","?","#"],ue=/^[+a-z0-9A-Z_-]{0,63}$/,Se=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,we={javascript:!0,"javascript:":!0},Pe={javascript:!0,"javascript:":!0},Ae={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},De=me("querystring");Ce.prototype.parse=function(ze,Ze,Xe){if(!le.isString(ze))throw new TypeError("Parameter 'url' must be a string, not "+typeof ze);var Ge=ze.indexOf("?"),ft=Ge!==-1&&Ge<ze.indexOf("#")?"?":"#",at=ze.split(ft),Ct=/\\/g;at[0]=at[0].replace(Ct,"/"),ze=at.join(ft);var et=ze;if(et=et.trim(),!Xe&&ze.split("#").length===1){var yt=ce.exec(et);if(yt)return this.path=et,this.href=et,this.pathname=yt[1],yt[2]?(this.search=yt[2],this.query=Ze?De.parse(this.search.substr(1)):this.search.substr(1)):Ze&&(this.search="",this.query={}),this}var st=ve.exec(et);if(st){st=st[0];var zt=st.toLowerCase();this.protocol=zt,et=et.substr(st.length)}if(Xe||st||et.match(/^\/\/[^@\/]+@[^@\/]+/)){var lt=et.substr(0,2)==="//";!lt||st&&Pe[st]||(et=et.substr(2),this.slashes=!0)}if(!Pe[st]&&(lt||st&&!Ae[st])){for(var tt=-1,ut=0;ut<se.length;ut++){var mt=et.indexOf(se[ut]);mt!==-1&&(tt===-1||mt<tt)&&(tt=mt)}var Pt,gt;gt=tt===-1?et.lastIndexOf("@"):et.lastIndexOf("@",tt),gt!==-1&&(Pt=et.slice(0,gt),et=et.slice(gt+1),this.auth=decodeURIComponent(Pt)),tt=-1;for(var ut=0;ut<ie.length;ut++){var mt=et.indexOf(ie[ut]);mt!==-1&&(tt===-1||mt<tt)&&(tt=mt)}tt===-1&&(tt=et.length),this.host=et.slice(0,tt),et=et.slice(tt),this.parseHost(),this.hostname=this.hostname||"";var Ft=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Ft)for(var Ht=this.hostname.split(/\./),ut=0,hn=Ht.length;ut<hn;ut++){var Qt=Ht[ut];if(Qt&&!Qt.match(ue)){for(var bn="",Wt=0,Kt=Qt.length;Wt<Kt;Wt++)Qt.charCodeAt(Wt)>127?bn+="x":bn+=Qt[Wt];if(!bn.match(ue)){var Jt=Ht.slice(0,ut),Yt=Ht.slice(ut+1),kt=Qt.match(Se);kt&&(Jt.push(kt[1]),Yt.unshift(kt[2])),Yt.length&&(et="/"+Yt.join(".")+et),this.hostname=Jt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Ft||(this.hostname=ge.toASCII(this.hostname));var pt=this.port?":"+this.port:"",Bt=this.hostname||"";this.host=Bt+pt,this.href+=this.host,Ft&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),et[0]!=="/"&&(et="/"+et))}if(!we[zt])for(var ut=0,hn=oe.length;ut<hn;ut++){var xt=oe[ut];if(et.indexOf(xt)!==-1){var vt=encodeURIComponent(xt);vt===xt&&(vt=escape(xt)),et=et.split(xt).join(vt)}}var nt=et.indexOf("#");nt!==-1&&(this.hash=et.substr(nt),et=et.slice(0,nt));var He=et.indexOf("?");if(He!==-1?(this.search=et.substr(He),this.query=et.substr(He+1),Ze&&(this.query=De.parse(this.query)),et=et.slice(0,He)):Ze&&(this.search="",this.query={}),et&&(this.pathname=et),Ae[zt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var pt=this.pathname||"",Ie=this.search||"";this.path=pt+Ie}return this.href=this.format(),this},Ce.prototype.format=function(){var ze=this.auth||"";ze&&(ze=encodeURIComponent(ze),ze=ze.replace(/%3A/i,":"),ze+="@");var Ze=this.protocol||"",Xe=this.pathname||"",Ge=this.hash||"",ft=!1,at="";this.host?ft=ze+this.host:this.hostname&&(ft=ze+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ft+=":"+this.port)),this.query&&le.isObject(this.query)&&Object.keys(this.query).length&&(at=De.stringify(this.query));var Ct=this.search||at&&"?"+at||"";return Ze&&Ze.substr(-1)!==":"&&(Ze+=":"),this.slashes||(!Ze||Ae[Ze])&&ft!==!1?(ft="//"+(ft||""),Xe&&Xe.charAt(0)!=="/"&&(Xe="/"+Xe)):ft||(ft=""),Ge&&Ge.charAt(0)!=="#"&&(Ge="#"+Ge),Ct&&Ct.charAt(0)!=="?"&&(Ct="?"+Ct),Xe=Xe.replace(/[?#]/g,function(et){return encodeURIComponent(et)}),Ct=Ct.replace("#","%23"),Ze+ft+Xe+Ct+Ge},Ce.prototype.resolve=function(ze){return this.resolveObject(Le(ze,!1,!0)).format()},Ce.prototype.resolveObject=function(ze){if(le.isString(ze)){var Ze=new Ce;Ze.parse(ze,!1,!0),ze=Ze}for(var Xe=new Ce,Ge=Object.keys(this),ft=0;ft<Ge.length;ft++){var at=Ge[ft];Xe[at]=this[at]}if(Xe.hash=ze.hash,ze.href==="")return Xe.href=Xe.format(),Xe;if(ze.slashes&&!ze.protocol){for(var Ct=Object.keys(ze),et=0;et<Ct.length;et++){var yt=Ct[et];yt!=="protocol"&&(Xe[yt]=ze[yt])}return Ae[Xe.protocol]&&Xe.hostname&&!Xe.pathname&&(Xe.path=Xe.pathname="/"),Xe.href=Xe.format(),Xe}if(ze.protocol&&ze.protocol!==Xe.protocol){if(!Ae[ze.protocol]){for(var st=Object.keys(ze),zt=0;zt<st.length;zt++){var lt=st[zt];Xe[lt]=ze[lt]}return Xe.href=Xe.format(),Xe}if(Xe.protocol=ze.protocol,ze.host||Pe[ze.protocol])Xe.pathname=ze.pathname;else{for(var hn=(ze.pathname||"").split("/");hn.length&&!(ze.host=hn.shift()););ze.host||(ze.host=""),ze.hostname||(ze.hostname=""),hn[0]!==""&&hn.unshift(""),hn.length<2&&hn.unshift(""),Xe.pathname=hn.join("/")}if(Xe.search=ze.search,Xe.query=ze.query,Xe.host=ze.host||"",Xe.auth=ze.auth,Xe.hostname=ze.hostname||ze.host,Xe.port=ze.port,Xe.pathname||Xe.search){var tt=Xe.pathname||"",ut=Xe.search||"";Xe.path=tt+ut}return Xe.slashes=Xe.slashes||ze.slashes,Xe.href=Xe.format(),Xe}var mt=Xe.pathname&&Xe.pathname.charAt(0)==="/",Pt=ze.host||ze.pathname&&ze.pathname.charAt(0)==="/",gt=Pt||mt||Xe.host&&ze.pathname,Ft=gt,Ht=Xe.pathname&&Xe.pathname.split("/")||[],hn=ze.pathname&&ze.pathname.split("/")||[],Qt=Xe.protocol&&!Ae[Xe.protocol];if(Qt&&(Xe.hostname="",Xe.port=null,Xe.host&&(Ht[0]===""?Ht[0]=Xe.host:Ht.unshift(Xe.host)),Xe.host="",ze.protocol&&(ze.hostname=null,ze.port=null,ze.host&&(hn[0]===""?hn[0]=ze.host:hn.unshift(ze.host)),ze.host=null),gt=gt&&(hn[0]===""||Ht[0]==="")),Pt)Xe.host=ze.host||ze.host===""?ze.host:Xe.host,Xe.hostname=ze.hostname||ze.hostname===""?ze.hostname:Xe.hostname,Xe.search=ze.search,Xe.query=ze.query,Ht=hn;else if(hn.length)Ht||(Ht=[]),Ht.pop(),Ht=Ht.concat(hn),Xe.search=ze.search,Xe.query=ze.query;else if(!le.isNullOrUndefined(ze.search)){if(Qt){Xe.hostname=Xe.host=Ht.shift();var bn=!!(Xe.host&&Xe.host.indexOf("@")>0)&&Xe.host.split("@");bn&&(Xe.auth=bn.shift(),Xe.host=Xe.hostname=bn.shift())}return Xe.search=ze.search,Xe.query=ze.query,le.isNull(Xe.pathname)&&le.isNull(Xe.search)||(Xe.path=(Xe.pathname?Xe.pathname:"")+(Xe.search?Xe.search:"")),Xe.href=Xe.format(),Xe}if(!Ht.length)return Xe.pathname=null,Xe.search?Xe.path="/"+Xe.search:Xe.path=null,Xe.href=Xe.format(),Xe;for(var Wt=Ht.slice(-1)[0],Kt=(Xe.host||ze.host||Ht.length>1)&&(Wt==="."||Wt==="..")||Wt==="",Jt=0,Yt=Ht.length;Yt>=0;Yt--)Wt=Ht[Yt],Wt==="."?Ht.splice(Yt,1):Wt===".."?(Ht.splice(Yt,1),Jt++):Jt&&(Ht.splice(Yt,1),Jt--);if(!gt&&!Ft)for(;Jt--;Jt)Ht.unshift("..");!gt||Ht[0]===""||Ht[0]&&Ht[0].charAt(0)==="/"||Ht.unshift(""),Kt&&Ht.join("/").substr(-1)!=="/"&&Ht.push("");var kt=Ht[0]===""||Ht[0]&&Ht[0].charAt(0)==="/";if(Qt){Xe.hostname=Xe.host=kt?"":Ht.length?Ht.shift():"";var bn=!!(Xe.host&&Xe.host.indexOf("@")>0)&&Xe.host.split("@");bn&&(Xe.auth=bn.shift(),Xe.host=Xe.hostname=bn.shift())}return gt=gt||Xe.host&&Ht.length,gt&&!kt&&Ht.unshift(""),Ht.length?Xe.pathname=Ht.join("/"):(Xe.pathname=null,Xe.path=null),le.isNull(Xe.pathname)&&le.isNull(Xe.search)||(Xe.path=(Xe.pathname?Xe.pathname:"")+(Xe.search?Xe.search:"")),Xe.auth=ze.auth||Xe.auth,Xe.slashes=Xe.slashes||ze.slashes,Xe.href=Xe.format(),Xe},Ce.prototype.parseHost=function(){var ze=this.host,Ze=de.exec(ze);Ze&&(Ze=Ze[0],Ze!==":"&&(this.port=Ze.substr(1)),ze=ze.substr(0,ze.length-Ze.length)),ze&&(this.hostname=ze)}},{"./util":204,punycode:174,querystring:177}],204:[function(me,Be,ke){"use strict";Be.exports={isString:function(Ce){return typeof Ce=="string"},isObject:function(Ce){return typeof Ce=="object"&&Ce!==null},isNull:function(Ce){return Ce===null},isNullOrUndefined:function(Ce){return Ce==null}}},{}],205:[function(me,Be,ke){(function(Ce){function Le(ye,xe){function ge(){if(!le){if(he("throwDeprecation"))throw new Error(xe);he("traceDeprecation")?console.trace(xe):console.warn(xe),le=!0}return ye.apply(this,arguments)}if(he("noDeprecation"))return ye;var le=!1;return ge}function he(ye){try{if(!Ce.localStorage)return!1}catch(ge){return!1}var xe=Ce.localStorage[ye];return xe!=null&&String(xe).toLowerCase()==="true"}Be.exports=Le}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(me,Be,ke){Be.exports=function(Ce){return Ce&&typeof Ce=="object"&&typeof Ce.copy=="function"&&typeof Ce.fill=="function"&&typeof Ce.readUInt8=="function"}},{}],207:[function(me,Be,ke){(function(Ce,Le){function he(ut,mt){var Pt={seen:[],stylize:xe};return arguments.length>=3&&(Pt.depth=arguments[2]),arguments.length>=4&&(Pt.colors=arguments[3]),ie(mt)?Pt.showHidden=mt:mt&&ke._extend(Pt,mt),Ae(Pt.showHidden)&&(Pt.showHidden=!1),Ae(Pt.depth)&&(Pt.depth=2),Ae(Pt.colors)&&(Pt.colors=!1),Ae(Pt.customInspect)&&(Pt.customInspect=!0),Pt.colors&&(Pt.stylize=ye),le(Pt,ut,Pt.depth)}function ye(ut,mt){var Pt=he.styles[mt];return Pt?"\x1B["+he.colors[Pt][0]+"m"+ut+"\x1B["+he.colors[Pt][1]+"m":ut}function xe(ut,mt){return ut}function ge(ut){var mt={};return ut.forEach(function(Pt,gt){mt[Pt]=!0}),mt}function le(ut,mt,Pt){if(ut.customInspect&&mt&&Ge(mt.inspect)&&mt.inspect!==ke.inspect&&(!mt.constructor||mt.constructor.prototype!==mt)){var gt=mt.inspect(Pt,ut);return we(gt)||(gt=le(ut,gt,Pt)),gt}var Ft=ve(ut,mt);if(Ft)return Ft;var Ht=Object.keys(mt),hn=ge(Ht);if(ut.showHidden&&(Ht=Object.getOwnPropertyNames(mt)),Xe(mt)&&(Ht.indexOf("message")>=0||Ht.indexOf("description")>=0))return de(mt);if(Ht.length===0){if(Ge(mt)){var Qt=mt.name?": "+mt.name:"";return ut.stylize("[Function"+Qt+"]","special")}if(De(mt))return ut.stylize(RegExp.prototype.toString.call(mt),"regexp");if(Ze(mt))return ut.stylize(Date.prototype.toString.call(mt),"date");if(Xe(mt))return de(mt)}var bn="",Wt=!1,Kt=["{","}"];if(oe(mt)&&(Wt=!0,Kt=["[","]"]),Ge(mt)&&(bn=" [Function"+(mt.name?": "+mt.name:"")+"]"),De(mt)&&(bn=" "+RegExp.prototype.toString.call(mt)),Ze(mt)&&(bn=" "+Date.prototype.toUTCString.call(mt)),Xe(mt)&&(bn=" "+de(mt)),Ht.length===0&&(!Wt||mt.length==0))return Kt[0]+bn+Kt[1];if(Pt<0)return De(mt)?ut.stylize(RegExp.prototype.toString.call(mt),"regexp"):ut.stylize("[Object]","special");ut.seen.push(mt);var Jt;return Jt=Wt?ce(ut,mt,Pt,hn,Ht):Ht.map(function(Yt){return z(ut,mt,Pt,hn,Yt,Wt)}),ut.seen.pop(),ee(Jt,bn,Kt)}function ve(ut,mt){if(Ae(mt))return ut.stylize("undefined","undefined");if(we(mt)){var Pt="'"+JSON.stringify(mt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ut.stylize(Pt,"string")}return Se(mt)?ut.stylize(""+mt,"number"):ie(mt)?ut.stylize(""+mt,"boolean"):se(mt)?ut.stylize("null","null"):void 0}function de(ut){return"["+Error.prototype.toString.call(ut)+"]"}function ce(ut,mt,Pt,gt,Ft){for(var Ht=[],hn=0,Qt=mt.length;hn<Qt;++hn)yt(mt,String(hn))?Ht.push(z(ut,mt,Pt,gt,String(hn),!0)):Ht.push("");return Ft.forEach(function(bn){bn.match(/^\d+$/)||Ht.push(z(ut,mt,Pt,gt,bn,!0))}),Ht}function z(ut,mt,Pt,gt,Ft,Ht){var hn,Qt,bn;if(bn=Object.getOwnPropertyDescriptor(mt,Ft)||{value:mt[Ft]},bn.get?Qt=bn.set?ut.stylize("[Getter/Setter]","special"):ut.stylize("[Getter]","special"):bn.set&&(Qt=ut.stylize("[Setter]","special")),yt(gt,Ft)||(hn="["+Ft+"]"),Qt||(ut.seen.indexOf(bn.value)<0?(Qt=se(Pt)?le(ut,bn.value,null):le(ut,bn.value,Pt-1),Qt.indexOf(`
|
|
|
`)>-1&&(Qt=Ht?Qt.split(`
|
|
|
`).map(function(Wt){return" "+Wt}).join(`
|
|
|
`).substr(2):`
|
|
|
`+Qt.split(`
|
|
|
`).map(function(Wt){return" "+Wt}).join(`
|
|
|
`))):Qt=ut.stylize("[Circular]","special")),Ae(hn)){if(Ht&&Ft.match(/^\d+$/))return Qt;hn=JSON.stringify(""+Ft),hn.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(hn=hn.substr(1,hn.length-2),hn=ut.stylize(hn,"name")):(hn=hn.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),hn=ut.stylize(hn,"string"))}return hn+": "+Qt}function ee(ut,mt,Pt){var gt=0;return ut.reduce(function(Ft,Ht){return gt++,Ht.indexOf(`
|
|
|
`)>=0&>++,Ft+Ht.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?Pt[0]+(mt===""?"":mt+`
|
|
|
`)+" "+ut.join(`,
|
|
|
`)+" "+Pt[1]:Pt[0]+mt+" "+ut.join(", ")+" "+Pt[1]}function oe(ut){return Array.isArray(ut)}function ie(ut){return typeof ut=="boolean"}function se(ut){return ut===null}function ue(ut){return ut==null}function Se(ut){return typeof ut=="number"}function we(ut){return typeof ut=="string"}function Pe(ut){return typeof ut=="symbol"}function Ae(ut){return ut===void 0}function De(ut){return ze(ut)&&at(ut)==="[object RegExp]"}function ze(ut){return typeof ut=="object"&&ut!==null}function Ze(ut){return ze(ut)&&at(ut)==="[object Date]"}function Xe(ut){return ze(ut)&&(at(ut)==="[object Error]"||ut instanceof Error)}function Ge(ut){return typeof ut=="function"}function ft(ut){return ut===null||typeof ut=="boolean"||typeof ut=="number"||typeof ut=="string"||typeof ut=="symbol"||ut===void 0}function at(ut){return Object.prototype.toString.call(ut)}function Ct(ut){return ut<10?"0"+ut.toString(10):ut.toString(10)}function et(){var ut=new Date,mt=[Ct(ut.getHours()),Ct(ut.getMinutes()),Ct(ut.getSeconds())].join(":");return[ut.getDate(),tt[ut.getMonth()],mt].join(" ")}function yt(ut,mt){return Object.prototype.hasOwnProperty.call(ut,mt)}var st=/%[sdj%]/g;ke.format=function(ut){if(!we(ut)){for(var mt=[],Pt=0;Pt<arguments.length;Pt++)mt.push(he(arguments[Pt]));return mt.join(" ")}for(var Pt=1,gt=arguments,Ft=gt.length,Ht=String(ut).replace(st,function(bn){if(bn==="%%")return"%";if(Pt>=Ft)return bn;switch(bn){case"%s":return String(gt[Pt++]);case"%d":return Number(gt[Pt++]);case"%j":try{return JSON.stringify(gt[Pt++])}catch(Wt){return"[Circular]"}default:return bn}}),hn=gt[Pt];Pt<Ft;hn=gt[++Pt])se(hn)||!ze(hn)?Ht+=" "+hn:Ht+=" "+he(hn);return Ht},ke.deprecate=function(ut,mt){function Pt(){if(!gt){if(Ce.throwDeprecation)throw new Error(mt);Ce.traceDeprecation?console.trace(mt):console.error(mt),gt=!0}return ut.apply(this,arguments)}if(Ae(Le.process))return function(){return ke.deprecate(ut,mt).apply(this,arguments)};if(Ce.noDeprecation===!0)return ut;var gt=!1;return Pt};var zt,lt={};ke.debuglog=function(ut){if(Ae(zt)&&(zt=Ce.env.NODE_DEBUG||""),ut=ut.toUpperCase(),!lt[ut])if(new RegExp("\\b"+ut+"\\b","i").test(zt)){var mt=Ce.pid;lt[ut]=function(){var Pt=ke.format.apply(ke,arguments);console.error("%s %d: %s",ut,mt,Pt)}}else lt[ut]=function(){};return lt[ut]},ke.inspect=he,he.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},he.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},ke.isArray=oe,ke.isBoolean=ie,ke.isNull=se,ke.isNullOrUndefined=ue,ke.isNumber=Se,ke.isString=we,ke.isSymbol=Pe,ke.isUndefined=Ae,ke.isRegExp=De,ke.isObject=ze,ke.isDate=Ze,ke.isError=Xe,ke.isFunction=Ge,ke.isPrimitive=ft,ke.isBuffer=me("./support/isBuffer");var tt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];ke.log=function(){console.log("%s - %s",et(),ke.format.apply(ke,arguments))},ke.inherits=me("inherits"),ke._extend=function(ut,mt){if(!mt||!ze(mt))return ut;for(var Pt=Object.keys(mt),gt=Pt.length;gt--;)ut[Pt[gt]]=mt[Pt[gt]];return ut}}).call(this,me("_process"),typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(me,Be,ke){"use strict";(function(){ke.stripBOM=function(Ce){return Ce[0]==="\uFEFF"?Ce.substring(1):Ce}}).call(void 0)},{}],209:[function(me,Be,ke){"use strict";function Ce(ge){return ge&&ge.__esModule?ge:{default:ge}}var Le=me("babel-runtime/helpers/typeof"),he=Ce(Le),ye=me("babel-runtime/core-js/object/keys"),xe=Ce(ye);(function(){var ge,le,ve,de,ce,z={}.hasOwnProperty;ge=me("xmlbuilder"),le=me("./defaults").defaults,de=function(ee){return typeof ee=="string"&&(ee.indexOf("&")>=0||ee.indexOf(">")>=0||ee.indexOf("<")>=0)},ce=function(ee){return"<![CDATA["+ve(ee)+"]]>"},ve=function(ee){return ee.replace("]]>","]]]]><![CDATA[>")},ke.Builder=function(){function ee(oe){var ie,se,ue;this.options={},se=le[.2];for(ie in se)z.call(se,ie)&&(ue=se[ie],this.options[ie]=ue);for(ie in oe)z.call(oe,ie)&&(ue=oe[ie],this.options[ie]=ue)}return ee.prototype.buildObject=function(oe){var ie,se,ue,Se,we;return ie=this.options.attrkey,se=this.options.charkey,(0,xe.default)(oe).length===1&&this.options.rootName===le[.2].rootName?(we=(0,xe.default)(oe)[0],oe=oe[we]):we=this.options.rootName,ue=function(Pe){return function(Ae,De){var ze,Ze,Xe,Ge,ft,at;if((De===void 0?"undefined":(0,he.default)(De))!=="object")Pe.options.cdata&&de(De)?Ae.raw(ce(De)):Ae.txt(De);else if(Array.isArray(De)){for(Ge in De)if(z.call(De,Ge)){Ze=De[Ge];for(ft in Ze)Xe=Ze[ft],Ae=ue(Ae.ele(ft),Xe).up()}}else for(ft in De)if(z.call(De,ft))if(Ze=De[ft],ft===ie){if((Ze===void 0?"undefined":(0,he.default)(Ze))==="object")for(ze in Ze)at=Ze[ze],Ae=Ae.att(ze,at)}else if(ft===se)Ae=Pe.options.cdata&&de(Ze)?Ae.raw(ce(Ze)):Ae.txt(Ze);else if(Array.isArray(Ze))for(Ge in Ze)z.call(Ze,Ge)&&(Xe=Ze[Ge],Ae=typeof Xe=="string"?Pe.options.cdata&&de(Xe)?Ae.ele(ft).raw(ce(Xe)).up():Ae.ele(ft,Xe).up():ue(Ae.ele(ft),Xe).up());else(Ze===void 0?"undefined":(0,he.default)(Ze))==="object"?Ae=ue(Ae.ele(ft),Ze).up():typeof Ze=="string"&&Pe.options.cdata&&de(Ze)?Ae=Ae.ele(ft).raw(ce(Ze)).up():(Ze==null&&(Ze=""),Ae=Ae.ele(ft,Ze.toString()).up());return Ae}}(this),Se=ge.create(we,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),ue(Se,oe).end(this.options.renderOpts)},ee}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(me,Be,ke){"use strict";(function(){ke.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(me,Be,ke){"use strict";function Ce(ve){return ve&&ve.__esModule?ve:{default:ve}}var Le=me("babel-runtime/core-js/object/get-own-property-names"),he=Ce(Le),ye=me("babel-runtime/core-js/object/keys"),xe=Ce(ye),ge=me("babel-runtime/helpers/typeof"),le=Ce(ge);(function(){var ve,de,ce,z,ee,oe,ie,se,ue=function(Pe,Ae){return function(){return Pe.apply(Ae,arguments)}},Se=function(Pe,Ae){function De(){this.constructor=Pe}for(var ze in Ae)we.call(Ae,ze)&&(Pe[ze]=Ae[ze]);return De.prototype=Ae.prototype,Pe.prototype=new De,Pe.__super__=Ae.prototype,Pe},we={}.hasOwnProperty;ie=me("sax"),ce=me("events"),ve=me("./bom"),oe=me("./processors"),se=me("timers").setImmediate,de=me("./defaults").defaults,z=function(Pe){return(Pe===void 0?"undefined":(0,le.default)(Pe))==="object"&&Pe!=null&&(0,xe.default)(Pe).length===0},ee=function(Pe,Ae,De){var ze,Ze,Xe;for(ze=0,Ze=Pe.length;ze<Ze;ze++)Xe=Pe[ze],Ae=Xe(Ae,De);return Ae},ke.Parser=function(Pe){function Ae(De){this.parseString=ue(this.parseString,this),this.reset=ue(this.reset,this),this.assignOrPush=ue(this.assignOrPush,this),this.processAsync=ue(this.processAsync,this);var ze,Ze,Xe;if(!(this instanceof ke.Parser))return new ke.Parser(De);this.options={},Ze=de[.2];for(ze in Ze)we.call(Ze,ze)&&(Xe=Ze[ze],this.options[ze]=Xe);for(ze in De)we.call(De,ze)&&(Xe=De[ze],this.options[ze]=Xe);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(oe.normalize)),this.reset()}return Se(Ae,Pe),Ae.prototype.processAsync=function(){var De,ze;try{return this.remaining.length<=this.options.chunkSize?(De=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(De),this.saxParser.close()):(De=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(De),se(this.processAsync))}catch(Ze){if(ze=Ze,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(ze)}},Ae.prototype.assignOrPush=function(De,ze,Ze){return ze in De?(De[ze]instanceof Array||(De[ze]=[De[ze]]),De[ze].push(Ze)):this.options.explicitArray?De[ze]=[Ze]:De[ze]=Ze},Ae.prototype.reset=function(){var De,ze,Ze,Xe;return this.removeAllListeners(),this.saxParser=ie.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Ge){return function(ft){if(Ge.saxParser.resume(),!Ge.saxParser.errThrown)return Ge.saxParser.errThrown=!0,Ge.emit("error",ft)}}(this),this.saxParser.onend=function(Ge){return function(){if(!Ge.saxParser.ended)return Ge.saxParser.ended=!0,Ge.emit("end",Ge.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,Xe=[],De=this.options.attrkey,ze=this.options.charkey,this.saxParser.onopentag=function(Ge){return function(ft){var at,Ct,et,yt,st;if(et={},et[ze]="",!Ge.options.ignoreAttrs){st=ft.attributes;for(at in st)we.call(st,at)&&(De in et||Ge.options.mergeAttrs||(et[De]={}),Ct=Ge.options.attrValueProcessors?ee(Ge.options.attrValueProcessors,ft.attributes[at],at):ft.attributes[at],yt=Ge.options.attrNameProcessors?ee(Ge.options.attrNameProcessors,at):at,Ge.options.mergeAttrs?Ge.assignOrPush(et,yt,Ct):et[De][yt]=Ct)}return et["#name"]=Ge.options.tagNameProcessors?ee(Ge.options.tagNameProcessors,ft.name):ft.name,Ge.options.xmlns&&(et[Ge.options.xmlnskey]={uri:ft.uri,local:ft.local}),Xe.push(et)}}(this),this.saxParser.onclosetag=function(Ge){return function(){var ft,at,Ct,et,yt,st,zt,lt,tt,ut;if(st=Xe.pop(),yt=st["#name"],Ge.options.explicitChildren&&Ge.options.preserveChildrenOrder||delete st["#name"],st.cdata===!0&&(ft=st.cdata,delete st.cdata),tt=Xe[Xe.length-1],st[ze].match(/^\s*$/)&&!ft?(at=st[ze],delete st[ze]):(Ge.options.trim&&(st[ze]=st[ze].trim()),Ge.options.normalize&&(st[ze]=st[ze].replace(/\s{2,}/g," ").trim()),st[ze]=Ge.options.valueProcessors?ee(Ge.options.valueProcessors,st[ze],yt):st[ze],(0,xe.default)(st).length===1&&ze in st&&!Ge.EXPLICIT_CHARKEY&&(st=st[ze])),z(st)&&(st=Ge.options.emptyTag!==""?Ge.options.emptyTag:at),Ge.options.validator!=null&&(ut="/"+function(){var mt,Pt,gt;for(gt=[],mt=0,Pt=Xe.length;mt<Pt;mt++)et=Xe[mt],gt.push(et["#name"]);return gt}().concat(yt).join("/"),function(){var mt;try{st=Ge.options.validator(ut,tt&&tt[yt],st)}catch(Pt){return mt=Pt,Ge.emit("error",mt)}}()),Ge.options.explicitChildren&&!Ge.options.mergeAttrs&&(st===void 0?"undefined":(0,le.default)(st))==="object")if(Ge.options.preserveChildrenOrder){if(tt){tt[Ge.options.childkey]=tt[Ge.options.childkey]||[],zt={};for(Ct in st)we.call(st,Ct)&&(zt[Ct]=st[Ct]);tt[Ge.options.childkey].push(zt),delete st["#name"],(0,xe.default)(st).length===1&&ze in st&&!Ge.EXPLICIT_CHARKEY&&(st=st[ze])}}else et={},Ge.options.attrkey in st&&(et[Ge.options.attrkey]=st[Ge.options.attrkey],delete st[Ge.options.attrkey]),!Ge.options.charsAsChildren&&Ge.options.charkey in st&&(et[Ge.options.charkey]=st[Ge.options.charkey],delete st[Ge.options.charkey]),(0,he.default)(st).length>0&&(et[Ge.options.childkey]=st),st=et;return Xe.length>0?Ge.assignOrPush(tt,yt,st):(Ge.options.explicitRoot&&(lt=st,st={},st[yt]=lt),Ge.resultObject=st,Ge.saxParser.ended=!0,Ge.emit("end",Ge.resultObject))}}(this),Ze=function(Ge){return function(ft){var at,Ct;if(Ct=Xe[Xe.length-1])return Ct[ze]+=ft,Ge.options.explicitChildren&&Ge.options.preserveChildrenOrder&&Ge.options.charsAsChildren&&(Ge.options.includeWhiteChars||ft.replace(/\\n/g,"").trim()!=="")&&(Ct[Ge.options.childkey]=Ct[Ge.options.childkey]||[],at={"#name":"__text__"},at[ze]=ft,Ge.options.normalize&&(at[ze]=at[ze].replace(/\s{2,}/g," ").trim()),Ct[Ge.options.childkey].push(at)),Ct}}(this),this.saxParser.ontext=Ze,this.saxParser.oncdata=function(Ge){return function(ft){var at;if(at=Ze(ft))return at.cdata=!0}}()},Ae.prototype.parseString=function(De,ze){var Ze;ze!=null&&typeof ze=="function"&&(this.on("end",function(Xe){return this.reset(),ze(null,Xe)}),this.on("error",function(Xe){return this.reset(),ze(Xe)}));try{return De=De.toString(),De.trim()===""?(this.emit("end",null),!0):(De=ve.stripBOM(De),this.options.async?(this.remaining=De,se(this.processAsync),this.saxParser):this.saxParser.write(De).close())}catch(Xe){if(Ze=Xe,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",Ze),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw Ze}},Ae}(ce.EventEmitter),ke.parseString=function(Pe,Ae,De){var ze,Ze,Xe;return De!=null?(typeof De=="function"&&(ze=De),(Ae===void 0?"undefined":(0,le.default)(Ae))==="object"&&(Ze=Ae)):(typeof Ae=="function"&&(ze=Ae),Ze={}),Xe=new ke.Parser(Ze),Xe.parseString(Pe,ze)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(me,Be,ke){"use strict";(function(){var Ce;Ce=new RegExp(/(?!xmlns)^.*:/),ke.normalize=function(Le){return Le.toLowerCase()},ke.firstCharLowerCase=function(Le){return Le.charAt(0).toLowerCase()+Le.slice(1)},ke.stripPrefix=function(Le){return Le.replace(Ce,"")},ke.parseNumbers=function(Le){return isNaN(Le)||(Le=Le%1==0?parseInt(Le,10):parseFloat(Le)),Le},ke.parseBooleans=function(Le){return/^(?:true|false)$/i.test(Le)&&(Le=Le.toLowerCase()==="true"),Le}}).call(void 0)},{}],213:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe=function(le,ve){function de(){this.constructor=le}for(var ce in ve)ge.call(ve,ce)&&(le[ce]=ve[ce]);return de.prototype=ve.prototype,le.prototype=new de,le.__super__=ve.prototype,le},ge={}.hasOwnProperty;Le=me("./defaults"),Ce=me("./builder"),he=me("./parser"),ye=me("./processors"),ke.defaults=Le.defaults,ke.processors=ye,ke.ValidationError=function(le){function ve(de){this.message=de}return xe(ve,le),ve}(Error),ke.Builder=Ce.Builder,ke.Parser=he.Parser,ke.parseString=he.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(me,Be,ke){"use strict";function Ce(ve){return ve&&ve.__esModule?ve:{default:ve}}var Le=me("babel-runtime/core-js/object/get-prototype-of"),he=Ce(Le),ye=me("babel-runtime/helpers/typeof"),xe=Ce(ye),ge=me("babel-runtime/core-js/object/assign"),le=Ce(ge);(function(){var ve,de,ce,z,ee,oe,ie=[].slice,se={}.hasOwnProperty;ve=function(){var ue,Se,we,Pe,Ae,De;if(De=arguments[0],Ae=2<=arguments.length?ie.call(arguments,1):[],z(le.default))le.default.apply(null,arguments);else for(ue=0,we=Ae.length;ue<we;ue++)if((Pe=Ae[ue])!=null)for(Se in Pe)se.call(Pe,Se)&&(De[Se]=Pe[Se]);return De},z=function(ue){return!!ue&&Object.prototype.toString.call(ue)==="[object Function]"},ee=function(ue){var Se;return!!ue&&((Se=ue===void 0?"undefined":(0,xe.default)(ue))==="function"||Se==="object")},de=function(ue){return z(Array.isArray)?Array.isArray(ue):Object.prototype.toString.call(ue)==="[object Array]"},ce=function(ue){var Se;if(de(ue))return!ue.length;for(Se in ue)if(se.call(ue,Se))return!1;return!0},oe=function(ue){var Se,we;return ee(ue)&&(we=(0,he.default)(ue))&&(Se=we.constructor)&&typeof Se=="function"&&Se instanceof Se&&Function.prototype.toString.call(Se)===Function.prototype.toString.call(Object)},Be.exports.assign=ve,Be.exports.isFunction=z,Be.exports.isObject=ee,Be.exports.isArray=de,Be.exports.isEmpty=ce,Be.exports.isPlainObject=oe}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){Be.exports=function(){function he(ye,xe,ge){if(this.options=ye.options,this.stringify=ye.stringify,xe==null)throw new Error("Missing attribute name of element "+ye.name);if(ge==null)throw new Error("Missing attribute value for attribute "+xe+" of element "+ye.name);this.name=this.stringify.attName(xe),this.value=this.stringify.attValue(ge)}return he.prototype.clone=function(){return(0,Le.default)(this)},he.prototype.toString=function(ye){return this.options.writer.set(ye).attribute(this)},he}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye=function(ge,le){function ve(){this.constructor=ge}for(var de in le)xe.call(le,de)&&(ge[de]=le[de]);return ve.prototype=le.prototype,ge.prototype=new ve,ge.__super__=le.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Be.exports=function(ge){function le(ve,de){if(le.__super__.constructor.call(this,ve),de==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(de)}return ye(le,ge),le.prototype.clone=function(){return(0,Le.default)(this)},le.prototype.toString=function(ve){return this.options.writer.set(ve).cdata(this)},le}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye=function(ge,le){function ve(){this.constructor=ge}for(var de in le)xe.call(le,de)&&(ge[de]=le[de]);return ve.prototype=le.prototype,ge.prototype=new ve,ge.__super__=le.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Be.exports=function(ge){function le(ve,de){if(le.__super__.constructor.call(this,ve),de==null)throw new Error("Missing comment text");this.text=this.stringify.comment(de)}return ye(le,ge),le.prototype.clone=function(){return(0,Le.default)(this)},le.prototype.toString=function(ve){return this.options.writer.set(ve).comment(this)},le}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(me,Be,ke){"use strict";(function(){var Ce,Le=function(ye,xe){function ge(){this.constructor=ye}for(var le in xe)he.call(xe,le)&&(ye[le]=xe[le]);return ge.prototype=xe.prototype,ye.prototype=new ge,ye.__super__=xe.prototype,ye},he={}.hasOwnProperty;Ce=me("./XMLNode"),Be.exports=function(ye){function xe(ge,le,ve,de,ce,z){if(xe.__super__.constructor.call(this,ge),le==null)throw new Error("Missing DTD element name");if(ve==null)throw new Error("Missing DTD attribute name");if(!de)throw new Error("Missing DTD attribute type");if(!ce)throw new Error("Missing DTD attribute default");if(ce.indexOf("#")!==0&&(ce="#"+ce),!ce.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(z&&!ce.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(le),this.attributeName=this.stringify.attName(ve),this.attributeType=this.stringify.dtdAttType(de),this.defaultValue=this.stringify.dtdAttDefault(z),this.defaultValueType=ce}return Le(xe,ye),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdAttList(this)},xe}(Ce)}).call(void 0)},{"./XMLNode":227}],219:[function(me,Be,ke){"use strict";(function(){var Ce,Le=function(ye,xe){function ge(){this.constructor=ye}for(var le in xe)he.call(xe,le)&&(ye[le]=xe[le]);return ge.prototype=xe.prototype,ye.prototype=new ge,ye.__super__=xe.prototype,ye},he={}.hasOwnProperty;Ce=me("./XMLNode"),Be.exports=function(ye){function xe(ge,le,ve){if(xe.__super__.constructor.call(this,ge),le==null)throw new Error("Missing DTD element name");ve||(ve="(#PCDATA)"),Array.isArray(ve)&&(ve="("+ve.join(",")+")"),this.name=this.stringify.eleName(le),this.value=this.stringify.dtdElementValue(ve)}return Le(xe,ye),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdElement(this)},xe}(Ce)}).call(void 0)},{"./XMLNode":227}],220:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he=function(xe,ge){function le(){this.constructor=xe}for(var ve in ge)ye.call(ge,ve)&&(xe[ve]=ge[ve]);return le.prototype=ge.prototype,xe.prototype=new le,xe.__super__=ge.prototype,xe},ye={}.hasOwnProperty;Le=me("./Utility").isObject,Ce=me("./XMLNode"),Be.exports=function(xe){function ge(le,ve,de,ce){if(ge.__super__.constructor.call(this,le),de==null)throw new Error("Missing entity name");if(ce==null)throw new Error("Missing entity value");if(this.pe=!!ve,this.name=this.stringify.eleName(de),Le(ce)){if(!ce.pubID&&!ce.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(ce.pubID&&!ce.sysID)throw new Error("System identifier is required for a public external entity");if(ce.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ce.pubID)),ce.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ce.sysID)),ce.nData!=null&&(this.nData=this.stringify.dtdNData(ce.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(ce)}return he(ge,xe),ge.prototype.toString=function(le){return this.options.writer.set(le).dtdEntity(this)},ge}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(me,Be,ke){"use strict";(function(){var Ce,Le=function(ye,xe){function ge(){this.constructor=ye}for(var le in xe)he.call(xe,le)&&(ye[le]=xe[le]);return ge.prototype=xe.prototype,ye.prototype=new ge,ye.__super__=xe.prototype,ye},he={}.hasOwnProperty;Ce=me("./XMLNode"),Be.exports=function(ye){function xe(ge,le,ve){if(xe.__super__.constructor.call(this,ge),le==null)throw new Error("Missing notation name");if(!ve.pubID&&!ve.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(le),ve.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ve.pubID)),ve.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ve.sysID))}return Le(xe,ye),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdNotation(this)},xe}(Ce)}).call(void 0)},{"./XMLNode":227}],222:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he=function(xe,ge){function le(){this.constructor=xe}for(var ve in ge)ye.call(ge,ve)&&(xe[ve]=ge[ve]);return le.prototype=ge.prototype,xe.prototype=new le,xe.__super__=ge.prototype,xe},ye={}.hasOwnProperty;Le=me("./Utility").isObject,Ce=me("./XMLNode"),Be.exports=function(xe){function ge(le,ve,de,ce){var z;ge.__super__.constructor.call(this,le),Le(ve)&&(z=ve,ve=z.version,de=z.encoding,ce=z.standalone),ve||(ve="1.0"),this.version=this.stringify.xmlVersion(ve),de!=null&&(this.encoding=this.stringify.xmlEncoding(de)),ce!=null&&(this.standalone=this.stringify.xmlStandalone(ce))}return he(ge,xe),ge.prototype.toString=function(le){return this.options.writer.set(le).declaration(this)},ge}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le=function(de,ce){function z(){this.constructor=de}for(var ee in ce)ve.call(ce,ee)&&(de[ee]=ce[ee]);return z.prototype=ce.prototype,de.prototype=new z,de.__super__=ce.prototype,de},ve={}.hasOwnProperty;ge=me("./Utility").isObject,xe=me("./XMLNode"),Ce=me("./XMLDTDAttList"),he=me("./XMLDTDEntity"),Le=me("./XMLDTDElement"),ye=me("./XMLDTDNotation"),Be.exports=function(de){function ce(z,ee,oe){var ie,se;ce.__super__.constructor.call(this,z),this.documentObject=z,ge(ee)&&(ie=ee,ee=ie.pubID,oe=ie.sysID),oe==null&&(se=[ee,oe],oe=se[0],ee=se[1]),ee!=null&&(this.pubID=this.stringify.dtdPubID(ee)),oe!=null&&(this.sysID=this.stringify.dtdSysID(oe))}return le(ce,de),ce.prototype.element=function(z,ee){var oe;return oe=new Le(this,z,ee),this.children.push(oe),this},ce.prototype.attList=function(z,ee,oe,ie,se){var ue;return ue=new Ce(this,z,ee,oe,ie,se),this.children.push(ue),this},ce.prototype.entity=function(z,ee){var oe;return oe=new he(this,!1,z,ee),this.children.push(oe),this},ce.prototype.pEntity=function(z,ee){var oe;return oe=new he(this,!0,z,ee),this.children.push(oe),this},ce.prototype.notation=function(z,ee){var oe;return oe=new ye(this,z,ee),this.children.push(oe),this},ce.prototype.toString=function(z){return this.options.writer.set(z).docType(this)},ce.prototype.ele=function(z,ee){return this.element(z,ee)},ce.prototype.att=function(z,ee,oe,ie,se){return this.attList(z,ee,oe,ie,se)},ce.prototype.ent=function(z,ee){return this.entity(z,ee)},ce.prototype.pent=function(z,ee){return this.pEntity(z,ee)},ce.prototype.not=function(z,ee){return this.notation(z,ee)},ce.prototype.up=function(){return this.root()||this.documentObject},ce}(xe)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe=function(le,ve){function de(){this.constructor=le}for(var ce in ve)ge.call(ve,ce)&&(le[ce]=ve[ce]);return de.prototype=ve.prototype,le.prototype=new de,le.__super__=ve.prototype,le},ge={}.hasOwnProperty;ye=me("./Utility").isPlainObject,Ce=me("./XMLNode"),he=me("./XMLStringifier"),Le=me("./XMLStringWriter"),Be.exports=function(le){function ve(de){ve.__super__.constructor.call(this,null),de||(de={}),de.writer||(de.writer=new Le),this.options=de,this.stringify=new he(de),this.isDocument=!0}return xe(ve,le),ve.prototype.end=function(de){var ce;return de?ye(de)&&(ce=de,de=this.options.writer.set(ce)):de=this.options.writer,de.document(this)},ve.prototype.toString=function(de){return this.options.writer.set(de).document(this)},ve}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le,ve,de,ce,z,ee,oe,ie,se,ue,Se,we,Pe,Ae={}.hasOwnProperty;Pe=me("./Utility"),Se=Pe.isObject,ue=Pe.isFunction,we=Pe.isPlainObject,ce=me("./XMLElement"),Le=me("./XMLCData"),he=me("./XMLComment"),ee=me("./XMLRaw"),se=me("./XMLText"),z=me("./XMLProcessingInstruction"),ve=me("./XMLDeclaration"),de=me("./XMLDocType"),ye=me("./XMLDTDAttList"),ge=me("./XMLDTDEntity"),xe=me("./XMLDTDElement"),le=me("./XMLDTDNotation"),Ce=me("./XMLAttribute"),ie=me("./XMLStringifier"),oe=me("./XMLStringWriter"),Be.exports=function(){function De(ze,Ze,Xe){var Ge;ze||(ze={}),ze.writer?we(ze.writer)&&(Ge=ze.writer,ze.writer=new oe(Ge)):ze.writer=new oe(ze),this.options=ze,this.writer=ze.writer,this.stringify=new ie(ze),this.onDataCallback=Ze||function(){},this.onEndCallback=Xe||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return De.prototype.node=function(ze,Ze,Xe){var Ge;if(ze==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),ze=ze.valueOf(),Ze==null&&(Ze={}),Ze=Ze.valueOf(),Se(Ze)||(Ge=[Ze,Xe],Xe=Ge[0],Ze=Ge[1]),this.currentNode=new ce(this,ze,Ze),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,Xe!=null&&this.text(Xe),this},De.prototype.element=function(ze,Ze,Xe){return this.currentNode&&this.currentNode instanceof de?this.dtdElement.apply(this,arguments):this.node(ze,Ze,Xe)},De.prototype.attribute=function(ze,Ze){var Xe,Ge;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(ze!=null&&(ze=ze.valueOf()),Se(ze))for(Xe in ze)Ae.call(ze,Xe)&&(Ge=ze[Xe],this.attribute(Xe,Ge));else ue(Ze)&&(Ze=Ze.apply()),this.options.skipNullAttributes&&Ze==null||(this.currentNode.attributes[ze]=new Ce(this,ze,Ze));return this},De.prototype.text=function(ze){var Ze;return this.openCurrent(),Ze=new se(this,ze),this.onData(this.writer.text(Ze,this.currentLevel+1)),this},De.prototype.cdata=function(ze){var Ze;return this.openCurrent(),Ze=new Le(this,ze),this.onData(this.writer.cdata(Ze,this.currentLevel+1)),this},De.prototype.comment=function(ze){var Ze;return this.openCurrent(),Ze=new he(this,ze),this.onData(this.writer.comment(Ze,this.currentLevel+1)),this},De.prototype.raw=function(ze){var Ze;return this.openCurrent(),Ze=new ee(this,ze),this.onData(this.writer.raw(Ze,this.currentLevel+1)),this},De.prototype.instruction=function(ze,Ze){var Xe,Ge,ft,at,Ct;if(this.openCurrent(),ze!=null&&(ze=ze.valueOf()),Ze!=null&&(Ze=Ze.valueOf()),Array.isArray(ze))for(Xe=0,at=ze.length;Xe<at;Xe++)Ge=ze[Xe],this.instruction(Ge);else if(Se(ze))for(Ge in ze)Ae.call(ze,Ge)&&(ft=ze[Ge],this.instruction(Ge,ft));else ue(Ze)&&(Ze=Ze.apply()),Ct=new z(this,ze,Ze),this.onData(this.writer.processingInstruction(Ct,this.currentLevel+1));return this},De.prototype.declaration=function(ze,Ze,Xe){var Ge;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Ge=new ve(this,ze,Ze,Xe),this.onData(this.writer.declaration(Ge,this.currentLevel+1)),this},De.prototype.doctype=function(ze,Ze,Xe){if(this.openCurrent(),ze==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new de(this,Ze,Xe),this.currentNode.rootNodeName=ze,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},De.prototype.dtdElement=function(ze,Ze){var Xe;return this.openCurrent(),Xe=new xe(this,ze,Ze),this.onData(this.writer.dtdElement(Xe,this.currentLevel+1)),this},De.prototype.attList=function(ze,Ze,Xe,Ge,ft){var at;return this.openCurrent(),at=new ye(this,ze,Ze,Xe,Ge,ft),this.onData(this.writer.dtdAttList(at,this.currentLevel+1)),this},De.prototype.entity=function(ze,Ze){var Xe;return this.openCurrent(),Xe=new ge(this,!1,ze,Ze),this.onData(this.writer.dtdEntity(Xe,this.currentLevel+1)),this},De.prototype.pEntity=function(ze,Ze){var Xe;return this.openCurrent(),Xe=new ge(this,!0,ze,Ze),this.onData(this.writer.dtdEntity(Xe,this.currentLevel+1)),this},De.prototype.notation=function(ze,Ze){var Xe;return this.openCurrent(),Xe=new le(this,ze,Ze),this.onData(this.writer.dtdNotation(Xe,this.currentLevel+1)),this},De.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},De.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},De.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},De.prototype.openNode=function(ze){if(!ze.isOpen)return!this.root&&this.currentLevel===0&&ze instanceof ce&&(this.root=ze),this.onData(this.writer.openNode(ze,this.currentLevel)),ze.isOpen=!0},De.prototype.closeNode=function(ze){if(!ze.isClosed)return this.onData(this.writer.closeNode(ze,this.currentLevel)),ze.isClosed=!0},De.prototype.onData=function(ze){return this.documentStarted=!0,this.onDataCallback(ze)},De.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},De.prototype.ele=function(){return this.element.apply(this,arguments)},De.prototype.nod=function(ze,Ze,Xe){return this.node(ze,Ze,Xe)},De.prototype.txt=function(ze){return this.text(ze)},De.prototype.dat=function(ze){return this.cdata(ze)},De.prototype.com=function(ze){return this.comment(ze)},De.prototype.ins=function(ze,Ze){return this.instruction(ze,Ze)},De.prototype.dec=function(ze,Ze,Xe){return this.declaration(ze,Ze,Xe)},De.prototype.dtd=function(ze,Ze,Xe){return this.doctype(ze,Ze,Xe)},De.prototype.e=function(ze,Ze,Xe){return this.element(ze,Ze,Xe)},De.prototype.n=function(ze,Ze,Xe){return this.node(ze,Ze,Xe)},De.prototype.t=function(ze){return this.text(ze)},De.prototype.d=function(ze){return this.cdata(ze)},De.prototype.c=function(ze){return this.comment(ze)},De.prototype.r=function(ze){return this.raw(ze)},De.prototype.i=function(ze,Ze){return this.instruction(ze,Ze)},De.prototype.att=function(){return this.currentNode&&this.currentNode instanceof de?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},De.prototype.a=function(){return this.currentNode&&this.currentNode instanceof de?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},De.prototype.ent=function(ze,Ze){return this.entity(ze,Ze)},De.prototype.pent=function(ze,Ze){return this.pEntity(ze,Ze)},De.prototype.not=function(ze,Ze){return this.notation(ze,Ze)},De}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye,xe,ge,le,ve=function(ce,z){function ee(){this.constructor=ce}for(var oe in z)de.call(z,oe)&&(ce[oe]=z[oe]);return ee.prototype=z.prototype,ce.prototype=new ee,ce.__super__=z.prototype,ce},de={}.hasOwnProperty;le=me("./Utility"),ge=le.isObject,xe=le.isFunction,ye=me("./XMLNode"),he=me("./XMLAttribute"),Be.exports=function(ce){function z(ee,oe,ie){if(z.__super__.constructor.call(this,ee),oe==null)throw new Error("Missing element name");this.name=this.stringify.eleName(oe),this.attributes={},ie!=null&&this.attribute(ie),ee.isDocument&&(this.isRoot=!0,this.documentObject=ee,ee.rootObject=this)}return ve(z,ce),z.prototype.clone=function(){var ee,oe,ie,se;ie=(0,Le.default)(this),ie.isRoot&&(ie.documentObject=null),ie.attributes={},se=this.attributes;for(oe in se)de.call(se,oe)&&(ee=se[oe],ie.attributes[oe]=ee.clone());return ie.children=[],this.children.forEach(function(ue){var Se;return Se=ue.clone(),Se.parent=ie,ie.children.push(Se)}),ie},z.prototype.attribute=function(ee,oe){var ie,se;if(ee!=null&&(ee=ee.valueOf()),ge(ee))for(ie in ee)de.call(ee,ie)&&(se=ee[ie],this.attribute(ie,se));else xe(oe)&&(oe=oe.apply()),this.options.skipNullAttributes&&oe==null||(this.attributes[ee]=new he(this,ee,oe));return this},z.prototype.removeAttribute=function(ee){var oe,ie,se;if(ee==null)throw new Error("Missing attribute name");if(ee=ee.valueOf(),Array.isArray(ee))for(ie=0,se=ee.length;ie<se;ie++)oe=ee[ie],delete this.attributes[oe];else delete this.attributes[ee];return this},z.prototype.toString=function(ee){return this.options.writer.set(ee).element(this)},z.prototype.att=function(ee,oe){return this.attribute(ee,oe)},z.prototype.a=function(ee,oe){return this.attribute(ee,oe)},z}(ye)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le,ve,de,ce,z,ee,oe={}.hasOwnProperty;ee=me("./Utility"),z=ee.isObject,ce=ee.isFunction,de=ee.isEmpty,xe=null,Ce=null,Le=null,he=null,ye=null,le=null,ve=null,ge=null,Be.exports=function(){function ie(se){this.parent=se,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],xe||(xe=me("./XMLElement"),Ce=me("./XMLCData"),Le=me("./XMLComment"),he=me("./XMLDeclaration"),ye=me("./XMLDocType"),le=me("./XMLRaw"),ve=me("./XMLText"),ge=me("./XMLProcessingInstruction"))}return ie.prototype.element=function(se,ue,Se){var we,Pe,Ae,De,ze,Ze,Xe,Ge,ft,at;if(Ze=null,ue==null&&(ue={}),ue=ue.valueOf(),z(ue)||(ft=[ue,Se],Se=ft[0],ue=ft[1]),se!=null&&(se=se.valueOf()),Array.isArray(se))for(Ae=0,Xe=se.length;Ae<Xe;Ae++)Pe=se[Ae],Ze=this.element(Pe);else if(ce(se))Ze=this.element(se.apply());else if(z(se)){for(ze in se)if(oe.call(se,ze))if(at=se[ze],ce(at)&&(at=at.apply()),z(at)&&de(at)&&(at=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&ze.indexOf(this.stringify.convertAttKey)===0)Ze=this.attribute(ze.substr(this.stringify.convertAttKey.length),at);else if(!this.options.separateArrayItems&&Array.isArray(at))for(De=0,Ge=at.length;De<Ge;De++)Pe=at[De],we={},we[ze]=Pe,Ze=this.element(we);else z(at)?(Ze=this.element(ze),Ze.element(at)):Ze=this.element(ze,at)}else Ze=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&se.indexOf(this.stringify.convertTextKey)===0?this.text(Se):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&se.indexOf(this.stringify.convertCDataKey)===0?this.cdata(Se):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&se.indexOf(this.stringify.convertCommentKey)===0?this.comment(Se):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&se.indexOf(this.stringify.convertRawKey)===0?this.raw(Se):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&se.indexOf(this.stringify.convertPIKey)===0?this.instruction(se.substr(this.stringify.convertPIKey.length),Se):this.node(se,ue,Se);if(Ze==null)throw new Error("Could not create any elements with: "+se);return Ze},ie.prototype.insertBefore=function(se,ue,Se){var we,Pe,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Pe=this.parent.children.indexOf(this),Ae=this.parent.children.splice(Pe),we=this.parent.element(se,ue,Se),Array.prototype.push.apply(this.parent.children,Ae),we},ie.prototype.insertAfter=function(se,ue,Se){var we,Pe,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Pe=this.parent.children.indexOf(this),Ae=this.parent.children.splice(Pe+1),we=this.parent.element(se,ue,Se),Array.prototype.push.apply(this.parent.children,Ae),we},ie.prototype.remove=function(){var se;if(this.isRoot)throw new Error("Cannot remove the root element");return se=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[se,se-se+1].concat([])),this.parent},ie.prototype.node=function(se,ue,Se){var we,Pe;return se!=null&&(se=se.valueOf()),ue||(ue={}),ue=ue.valueOf(),z(ue)||(Pe=[ue,Se],Se=Pe[0],ue=Pe[1]),we=new xe(this,se,ue),Se!=null&&we.text(Se),this.children.push(we),we},ie.prototype.text=function(se){var ue;return ue=new ve(this,se),this.children.push(ue),this},ie.prototype.cdata=function(se){var ue;return ue=new Ce(this,se),this.children.push(ue),this},ie.prototype.comment=function(se){var ue;return ue=new Le(this,se),this.children.push(ue),this},ie.prototype.commentBefore=function(se){var ue,Se;return ue=this.parent.children.indexOf(this),Se=this.parent.children.splice(ue),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,Se),this},ie.prototype.commentAfter=function(se){var ue,Se;return ue=this.parent.children.indexOf(this),Se=this.parent.children.splice(ue+1),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,Se),this},ie.prototype.raw=function(se){var ue;return ue=new le(this,se),this.children.push(ue),this},ie.prototype.instruction=function(se,ue){var Se,we,Pe,Ae,De;if(se!=null&&(se=se.valueOf()),ue!=null&&(ue=ue.valueOf()),Array.isArray(se))for(Ae=0,De=se.length;Ae<De;Ae++)Se=se[Ae],this.instruction(Se);else if(z(se))for(Se in se)oe.call(se,Se)&&(we=se[Se],this.instruction(Se,we));else ce(ue)&&(ue=ue.apply()),Pe=new ge(this,se,ue),this.children.push(Pe);return this},ie.prototype.instructionBefore=function(se,ue){var Se,we;return Se=this.parent.children.indexOf(this),we=this.parent.children.splice(Se),this.parent.instruction(se,ue),Array.prototype.push.apply(this.parent.children,we),this},ie.prototype.instructionAfter=function(se,ue){var Se,we;return Se=this.parent.children.indexOf(this),we=this.parent.children.splice(Se+1),this.parent.instruction(se,ue),Array.prototype.push.apply(this.parent.children,we),this},ie.prototype.declaration=function(se,ue,Se){var we,Pe;return we=this.document(),Pe=new he(we,se,ue,Se),we.children[0]instanceof he?we.children[0]=Pe:we.children.unshift(Pe),we.root()||we},ie.prototype.doctype=function(se,ue){var Se,we,Pe,Ae,De,ze,Ze,Xe,Ge,ft;for(we=this.document(),Pe=new ye(we,se,ue),Ge=we.children,Ae=De=0,Ze=Ge.length;De<Ze;Ae=++De)if((Se=Ge[Ae])instanceof ye)return we.children[Ae]=Pe,Pe;for(ft=we.children,Ae=ze=0,Xe=ft.length;ze<Xe;Ae=++ze)if(Se=ft[Ae],Se.isRoot)return we.children.splice(Ae,0,Pe),Pe;return we.children.push(Pe),Pe},ie.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},ie.prototype.root=function(){var se;for(se=this;se;){if(se.isDocument)return se.rootObject;if(se.isRoot)return se;se=se.parent}},ie.prototype.document=function(){var se;for(se=this;se;){if(se.isDocument)return se;se=se.parent}},ie.prototype.end=function(se){return this.document().end(se)},ie.prototype.prev=function(){var se;if((se=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[se-1]},ie.prototype.next=function(){var se;if((se=this.parent.children.indexOf(this))===-1||se===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[se+1]},ie.prototype.importDocument=function(se){var ue;return ue=se.root().clone(),ue.parent=this,ue.isRoot=!1,this.children.push(ue),this},ie.prototype.ele=function(se,ue,Se){return this.element(se,ue,Se)},ie.prototype.nod=function(se,ue,Se){return this.node(se,ue,Se)},ie.prototype.txt=function(se){return this.text(se)},ie.prototype.dat=function(se){return this.cdata(se)},ie.prototype.com=function(se){return this.comment(se)},ie.prototype.ins=function(se,ue){return this.instruction(se,ue)},ie.prototype.doc=function(){return this.document()},ie.prototype.dec=function(se,ue,Se){return this.declaration(se,ue,Se)},ie.prototype.dtd=function(se,ue){return this.doctype(se,ue)},ie.prototype.e=function(se,ue,Se){return this.element(se,ue,Se)},ie.prototype.n=function(se,ue,Se){return this.node(se,ue,Se)},ie.prototype.t=function(se){return this.text(se)},ie.prototype.d=function(se){return this.cdata(se)},ie.prototype.c=function(se){return this.comment(se)},ie.prototype.r=function(se){return this.raw(se)},ie.prototype.i=function(se,ue){return this.instruction(se,ue)},ie.prototype.u=function(){return this.up()},ie.prototype.importXMLBuilder=function(se){return this.importDocument(se)},ie}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye=function(ge,le){function ve(){this.constructor=ge}for(var de in le)xe.call(le,de)&&(ge[de]=le[de]);return ve.prototype=le.prototype,ge.prototype=new ve,ge.__super__=le.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Be.exports=function(ge){function le(ve,de,ce){if(le.__super__.constructor.call(this,ve),de==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(de),ce&&(this.value=this.stringify.insValue(ce))}return ye(le,ge),le.prototype.clone=function(){return(0,Le.default)(this)},le.prototype.toString=function(ve){return this.options.writer.set(ve).processingInstruction(this)},le}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye=function(ge,le){function ve(){this.constructor=ge}for(var de in le)xe.call(le,de)&&(ge[de]=le[de]);return ve.prototype=le.prototype,ge.prototype=new ve,ge.__super__=le.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Be.exports=function(ge){function le(ve,de){if(le.__super__.constructor.call(this,ve),de==null)throw new Error("Missing raw text");this.value=this.stringify.raw(de)}return ye(le,ge),le.prototype.clone=function(){return(0,Le.default)(this)},le.prototype.toString=function(ve){return this.options.writer.set(ve).raw(this)},le}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le,ve,de,ce,z,ee,oe,ie=function(ue,Se){function we(){this.constructor=ue}for(var Pe in Se)se.call(Se,Pe)&&(ue[Pe]=Se[Pe]);return we.prototype=Se.prototype,ue.prototype=new we,ue.__super__=Se.prototype,ue},se={}.hasOwnProperty;le=me("./XMLDeclaration"),ve=me("./XMLDocType"),Ce=me("./XMLCData"),Le=me("./XMLComment"),de=me("./XMLElement"),z=me("./XMLRaw"),ee=me("./XMLText"),ce=me("./XMLProcessingInstruction"),he=me("./XMLDTDAttList"),ye=me("./XMLDTDElement"),xe=me("./XMLDTDEntity"),ge=me("./XMLDTDNotation"),oe=me("./XMLWriterBase"),Be.exports=function(ue){function Se(we,Pe){Se.__super__.constructor.call(this,Pe),this.stream=we}return ie(Se,ue),Se.prototype.document=function(we){var Pe,Ae,De,ze,Ze,Xe,Ge,ft;for(Xe=we.children,Ae=0,ze=Xe.length;Ae<ze;Ae++)Pe=Xe[Ae],Pe.isLastRootNode=!1;for(we.children[we.children.length-1].isLastRootNode=!0,Ge=we.children,ft=[],De=0,Ze=Ge.length;De<Ze;De++)switch(Pe=Ge[De],!1){case!(Pe instanceof le):ft.push(this.declaration(Pe));break;case!(Pe instanceof ve):ft.push(this.docType(Pe));break;case!(Pe instanceof Le):ft.push(this.comment(Pe));break;case!(Pe instanceof ce):ft.push(this.processingInstruction(Pe));break;default:ft.push(this.element(Pe))}return ft},Se.prototype.attribute=function(we){return this.stream.write(" "+we.name+'="'+we.value+'"')},Se.prototype.cdata=function(we,Pe){return this.stream.write(this.space(Pe)+"<![CDATA["+we.text+"]]>"+this.endline(we))},Se.prototype.comment=function(we,Pe){return this.stream.write(this.space(Pe)+"<!-- "+we.text+" -->"+this.endline(we))},Se.prototype.declaration=function(we,Pe){return this.stream.write(this.space(Pe)),this.stream.write('<?xml version="'+we.version+'"'),we.encoding!=null&&this.stream.write(' encoding="'+we.encoding+'"'),we.standalone!=null&&this.stream.write(' standalone="'+we.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(we))},Se.prototype.docType=function(we,Pe){var Ae,De,ze,Ze;if(Pe||(Pe=0),this.stream.write(this.space(Pe)),this.stream.write("<!DOCTYPE "+we.root().name),we.pubID&&we.sysID?this.stream.write(' PUBLIC "'+we.pubID+'" "'+we.sysID+'"'):we.sysID&&this.stream.write(' SYSTEM "'+we.sysID+'"'),we.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(we)),Ze=we.children,De=0,ze=Ze.length;De<ze;De++)switch(Ae=Ze[De],!1){case!(Ae instanceof he):this.dtdAttList(Ae,Pe+1);break;case!(Ae instanceof ye):this.dtdElement(Ae,Pe+1);break;case!(Ae instanceof xe):this.dtdEntity(Ae,Pe+1);break;case!(Ae instanceof ge):this.dtdNotation(Ae,Pe+1);break;case!(Ae instanceof Ce):this.cdata(Ae,Pe+1);break;case!(Ae instanceof Le):this.comment(Ae,Pe+1);break;case!(Ae instanceof ce):this.processingInstruction(Ae,Pe+1);break;default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(we))},Se.prototype.element=function(we,Pe){var Ae,De,ze,Ze,Xe,Ge,ft,at;Pe||(Pe=0),at=this.space(Pe),this.stream.write(at+"<"+we.name),Ge=we.attributes;for(Xe in Ge)se.call(Ge,Xe)&&(Ae=Ge[Xe],this.attribute(Ae));if(we.children.length===0||we.children.every(function(Ct){return Ct.value===""}))this.allowEmpty?this.stream.write("></"+we.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&we.children.length===1&&we.children[0].value!=null)this.stream.write(">"),this.stream.write(we.children[0].value),this.stream.write("</"+we.name+">");else{for(this.stream.write(">"+this.newline),ft=we.children,ze=0,Ze=ft.length;ze<Ze;ze++)switch(De=ft[ze],!1){case!(De instanceof Ce):this.cdata(De,Pe+1);break;case!(De instanceof Le):this.comment(De,Pe+1);break;case!(De instanceof de):this.element(De,Pe+1);break;case!(De instanceof z):this.raw(De,Pe+1);break;case!(De instanceof ee):this.text(De,Pe+1);break;case!(De instanceof ce):this.processingInstruction(De,Pe+1);break;default:throw new Error("Unknown XML node type: "+De.constructor.name)}this.stream.write(at+"</"+we.name+">")}return this.stream.write(this.endline(we))},Se.prototype.processingInstruction=function(we,Pe){return this.stream.write(this.space(Pe)+"<?"+we.target),we.value&&this.stream.write(" "+we.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(we))},Se.prototype.raw=function(we,Pe){return this.stream.write(this.space(Pe)+we.value+this.endline(we))},Se.prototype.text=function(we,Pe){return this.stream.write(this.space(Pe)+we.value+this.endline(we))},Se.prototype.dtdAttList=function(we,Pe){return this.stream.write(this.space(Pe)+"<!ATTLIST "+we.elementName+" "+we.attributeName+" "+we.attributeType),we.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+we.defaultValueType),we.defaultValue&&this.stream.write(' "'+we.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},Se.prototype.dtdElement=function(we,Pe){return this.stream.write(this.space(Pe)+"<!ELEMENT "+we.name+" "+we.value),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},Se.prototype.dtdEntity=function(we,Pe){return this.stream.write(this.space(Pe)+"<!ENTITY"),we.pe&&this.stream.write(" %"),this.stream.write(" "+we.name),we.value?this.stream.write(' "'+we.value+'"'):(we.pubID&&we.sysID?this.stream.write(' PUBLIC "'+we.pubID+'" "'+we.sysID+'"'):we.sysID&&this.stream.write(' SYSTEM "'+we.sysID+'"'),we.nData&&this.stream.write(" NDATA "+we.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},Se.prototype.dtdNotation=function(we,Pe){return this.stream.write(this.space(Pe)+"<!NOTATION "+we.name),we.pubID&&we.sysID?this.stream.write(' PUBLIC "'+we.pubID+'" "'+we.sysID+'"'):we.pubID?this.stream.write(' PUBLIC "'+we.pubID+'"'):we.sysID&&this.stream.write(' SYSTEM "'+we.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},Se.prototype.endline=function(we){return we.isLastRootNode?"":this.newline},Se}(oe)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le,ve,de,ce,z,ee,oe,ie=function(ue,Se){function we(){this.constructor=ue}for(var Pe in Se)se.call(Se,Pe)&&(ue[Pe]=Se[Pe]);return we.prototype=Se.prototype,ue.prototype=new we,ue.__super__=Se.prototype,ue},se={}.hasOwnProperty;le=me("./XMLDeclaration"),ve=me("./XMLDocType"),Ce=me("./XMLCData"),Le=me("./XMLComment"),de=me("./XMLElement"),z=me("./XMLRaw"),ee=me("./XMLText"),ce=me("./XMLProcessingInstruction"),he=me("./XMLDTDAttList"),ye=me("./XMLDTDElement"),xe=me("./XMLDTDEntity"),ge=me("./XMLDTDNotation"),oe=me("./XMLWriterBase"),Be.exports=function(ue){function Se(we){Se.__super__.constructor.call(this,we)}return ie(Se,ue),Se.prototype.document=function(we){var Pe,Ae,De,ze,Ze;for(this.textispresent=!1,ze="",Ze=we.children,Ae=0,De=Ze.length;Ae<De;Ae++)Pe=Ze[Ae],ze+=function(){switch(!1){case!(Pe instanceof le):return this.declaration(Pe);case!(Pe instanceof ve):return this.docType(Pe);case!(Pe instanceof Le):return this.comment(Pe);case!(Pe instanceof ce):return this.processingInstruction(Pe);default:return this.element(Pe,0)}}.call(this);return this.pretty&&ze.slice(-this.newline.length)===this.newline&&(ze=ze.slice(0,-this.newline.length)),ze},Se.prototype.attribute=function(we){return" "+we.name+'="'+we.value+'"'},Se.prototype.cdata=function(we,Pe){return this.space(Pe)+"<![CDATA["+we.text+"]]>"+this.newline},Se.prototype.comment=function(we,Pe){return this.space(Pe)+"<!-- "+we.text+" -->"+this.newline},Se.prototype.declaration=function(we,Pe){var Ae;return Ae=this.space(Pe),Ae+='<?xml version="'+we.version+'"',we.encoding!=null&&(Ae+=' encoding="'+we.encoding+'"'),we.standalone!=null&&(Ae+=' standalone="'+we.standalone+'"'),Ae+=this.spacebeforeslash+"?>",Ae+=this.newline},Se.prototype.docType=function(we,Pe){var Ae,De,ze,Ze,Xe;if(Pe||(Pe=0),Ze=this.space(Pe),Ze+="<!DOCTYPE "+we.root().name,we.pubID&&we.sysID?Ze+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(Ze+=' SYSTEM "'+we.sysID+'"'),we.children.length>0){for(Ze+=" [",Ze+=this.newline,Xe=we.children,De=0,ze=Xe.length;De<ze;De++)Ae=Xe[De],Ze+=function(){switch(!1){case!(Ae instanceof he):return this.dtdAttList(Ae,Pe+1);case!(Ae instanceof ye):return this.dtdElement(Ae,Pe+1);case!(Ae instanceof xe):return this.dtdEntity(Ae,Pe+1);case!(Ae instanceof ge):return this.dtdNotation(Ae,Pe+1);case!(Ae instanceof Ce):return this.cdata(Ae,Pe+1);case!(Ae instanceof Le):return this.comment(Ae,Pe+1);case!(Ae instanceof ce):return this.processingInstruction(Ae,Pe+1);default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}}.call(this);Ze+="]"}return Ze+=this.spacebeforeslash+">",Ze+=this.newline},Se.prototype.element=function(we,Pe){var Ae,De,ze,Ze,Xe,Ge,ft,at,Ct,et,yt,st,zt;Pe||(Pe=0),zt=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),st=this.space(Pe),at="",at+=st+"<"+we.name,Ct=we.attributes;for(ft in Ct)se.call(Ct,ft)&&(Ae=Ct[ft],at+=this.attribute(Ae));if(we.children.length===0||we.children.every(function(lt){return lt.value===""}))this.allowEmpty?at+="></"+we.name+">"+this.newline:at+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&we.children.length===1&&we.children[0].value!=null)at+=">",at+=we.children[0].value,at+="</"+we.name+">"+this.newline;else{if(this.dontprettytextnodes){for(et=we.children,ze=0,Xe=et.length;ze<Xe;ze++)if(De=et[ze],De.value!=null){this.textispresent++,zt=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,st=this.space(Pe)),at+=">"+this.newline,yt=we.children,Ze=0,Ge=yt.length;Ze<Ge;Ze++)De=yt[Ze],at+=function(){switch(!1){case!(De instanceof Ce):return this.cdata(De,Pe+1);case!(De instanceof Le):return this.comment(De,Pe+1);case!(De instanceof de):return this.element(De,Pe+1);case!(De instanceof z):return this.raw(De,Pe+1);case!(De instanceof ee):return this.text(De,Pe+1);case!(De instanceof ce):return this.processingInstruction(De,Pe+1);default:throw new Error("Unknown XML node type: "+De.constructor.name)}}.call(this);zt&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),at+=st+"</"+we.name+">"+this.newline}return at},Se.prototype.processingInstruction=function(we,Pe){var Ae;return Ae=this.space(Pe)+"<?"+we.target,we.value&&(Ae+=" "+we.value),Ae+=this.spacebeforeslash+"?>"+this.newline},Se.prototype.raw=function(we,Pe){return this.space(Pe)+we.value+this.newline},Se.prototype.text=function(we,Pe){return this.space(Pe)+we.value+this.newline},Se.prototype.dtdAttList=function(we,Pe){var Ae;return Ae=this.space(Pe)+"<!ATTLIST "+we.elementName+" "+we.attributeName+" "+we.attributeType,we.defaultValueType!=="#DEFAULT"&&(Ae+=" "+we.defaultValueType),we.defaultValue&&(Ae+=' "'+we.defaultValue+'"'),Ae+=this.spacebeforeslash+">"+this.newline},Se.prototype.dtdElement=function(we,Pe){return this.space(Pe)+"<!ELEMENT "+we.name+" "+we.value+this.spacebeforeslash+">"+this.newline},Se.prototype.dtdEntity=function(we,Pe){var Ae;return Ae=this.space(Pe)+"<!ENTITY",we.pe&&(Ae+=" %"),Ae+=" "+we.name,we.value?Ae+=' "'+we.value+'"':(we.pubID&&we.sysID?Ae+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(Ae+=' SYSTEM "'+we.sysID+'"'),we.nData&&(Ae+=" NDATA "+we.nData)),Ae+=this.spacebeforeslash+">"+this.newline},Se.prototype.dtdNotation=function(we,Pe){var Ae;return Ae=this.space(Pe)+"<!NOTATION "+we.name,we.pubID&&we.sysID?Ae+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.pubID?Ae+=' PUBLIC "'+we.pubID+'"':we.sysID&&(Ae+=' SYSTEM "'+we.sysID+'"'),Ae+=this.spacebeforeslash+">"+this.newline},Se.prototype.openNode=function(we,Pe){var Ae,De,ze,Ze;if(Pe||(Pe=0),we instanceof de){ze=this.space(Pe)+"<"+we.name,Ze=we.attributes;for(De in Ze)se.call(Ze,De)&&(Ae=Ze[De],ze+=this.attribute(Ae));return ze+=(we.children?">":"/>")+this.newline}return ze=this.space(Pe)+"<!DOCTYPE "+we.rootNodeName,we.pubID&&we.sysID?ze+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(ze+=' SYSTEM "'+we.sysID+'"'),ze+=(we.children?" [":">")+this.newline},Se.prototype.closeNode=function(we,Pe){switch(Pe||(Pe=0),!1){case!(we instanceof de):return this.space(Pe)+"</"+we.name+">"+this.newline;case!(we instanceof ve):return this.space(Pe)+"]>"+this.newline}},Se}(oe)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(me,Be,ke){"use strict";(function(){var Ce=function(he,ye){return function(){return he.apply(ye,arguments)}},Le={}.hasOwnProperty;Be.exports=function(){function he(ye){this.assertLegalChar=Ce(this.assertLegalChar,this);var xe,ge,le;ye||(ye={}),this.noDoubleEncoding=ye.noDoubleEncoding,ge=ye.stringify||{};for(xe in ge)Le.call(ge,xe)&&(le=ge[xe],this[xe]=le)}return he.prototype.eleName=function(ye){return ye=""+ye||"",this.assertLegalChar(ye)},he.prototype.eleText=function(ye){return ye=""+ye||"",this.assertLegalChar(this.elEscape(ye))},he.prototype.cdata=function(ye){return ye=""+ye||"",ye=ye.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(ye)},he.prototype.comment=function(ye){if(ye=""+ye||"",ye.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+ye);return this.assertLegalChar(ye)},he.prototype.raw=function(ye){return""+ye||""},he.prototype.attName=function(ye){return ye=""+ye||""},he.prototype.attValue=function(ye){return ye=""+ye||"",this.attEscape(ye)},he.prototype.insTarget=function(ye){return""+ye||""},he.prototype.insValue=function(ye){if(ye=""+ye||"",ye.match(/\?>/))throw new Error("Invalid processing instruction value: "+ye);return ye},he.prototype.xmlVersion=function(ye){if(ye=""+ye||"",!ye.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+ye);return ye},he.prototype.xmlEncoding=function(ye){if(ye=""+ye||"",!ye.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+ye);return ye},he.prototype.xmlStandalone=function(ye){return ye?"yes":"no"},he.prototype.dtdPubID=function(ye){return""+ye||""},he.prototype.dtdSysID=function(ye){return""+ye||""},he.prototype.dtdElementValue=function(ye){return""+ye||""},he.prototype.dtdAttType=function(ye){return""+ye||""},he.prototype.dtdAttDefault=function(ye){return ye!=null?""+ye||"":ye},he.prototype.dtdEntityValue=function(ye){return""+ye||""},he.prototype.dtdNData=function(ye){return""+ye||""},he.prototype.convertAttKey="@",he.prototype.convertPIKey="?",he.prototype.convertTextKey="#text",he.prototype.convertCDataKey="#cdata",he.prototype.convertCommentKey="#comment",he.prototype.convertRawKey="#raw",he.prototype.assertLegalChar=function(ye){var xe;if(xe=ye.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+ye+" at index "+xe.index);return ye},he.prototype.elEscape=function(ye){var xe;return xe=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(xe,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},he.prototype.attEscape=function(ye){var xe;return xe=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(xe,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},he}()}).call(void 0)},{}],233:[function(me,Be,ke){"use strict";var Ce=me("babel-runtime/core-js/object/create"),Le=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,ye=function(ge,le){function ve(){this.constructor=ge}for(var de in le)xe.call(le,de)&&(ge[de]=le[de]);return ve.prototype=le.prototype,ge.prototype=new ve,ge.__super__=le.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Be.exports=function(ge){function le(ve,de){if(le.__super__.constructor.call(this,ve),de==null)throw new Error("Missing element text");this.value=this.stringify.eleText(de)}return ye(le,ge),le.prototype.clone=function(){return(0,Le.default)(this)},le.prototype.toString=function(ve){return this.options.writer.set(ve).text(this)},le}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(me,Be,ke){"use strict";(function(){var Ce={}.hasOwnProperty;Be.exports=function(){function Le(he){var ye,xe,ge,le,ve,de,ce,z,ee;he||(he={}),this.pretty=he.pretty||!1,this.allowEmpty=(xe=he.allowEmpty)!=null&&xe,this.pretty?(this.indent=(ge=he.indent)!=null?ge:" ",this.newline=(le=he.newline)!=null?le:`
|
|
|
`,this.offset=(ve=he.offset)!=null?ve:0,this.dontprettytextnodes=(de=he.dontprettytextnodes)!=null?de:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(ce=he.spacebeforeslash)!=null?ce:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,z=he.writer||{};for(ye in z)Ce.call(z,ye)&&(ee=z[ye],this[ye]=ee)}return Le.prototype.set=function(he){var ye,xe,ge;he||(he={}),"pretty"in he&&(this.pretty=he.pretty),"allowEmpty"in he&&(this.allowEmpty=he.allowEmpty),this.pretty?(this.indent="indent"in he?he.indent:" ",this.newline="newline"in he?he.newline:`
|
|
|
`,this.offset="offset"in he?he.offset:0,this.dontprettytextnodes="dontprettytextnodes"in he?he.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in he?he.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,xe=he.writer||{};for(ye in xe)Ce.call(xe,ye)&&(ge=xe[ye],this[ye]=ge);return this},Le.prototype.space=function(he){var ye;return this.pretty?(ye=(he||0)+this.offset+1,ye>0?new Array(ye).join(this.indent):""):""},Le}()}).call(void 0)},{}],235:[function(me,Be,ke){"use strict";(function(){var Ce,Le,he,ye,xe,ge,le;le=me("./Utility"),xe=le.assign,ge=le.isFunction,Ce=me("./XMLDocument"),Le=me("./XMLDocumentCB"),ye=me("./XMLStringWriter"),he=me("./XMLStreamWriter"),Be.exports.create=function(ve,de,ce,z){var ee,oe;if(ve==null)throw new Error("Root element needs a name");return z=xe({},de,ce,z),ee=new Ce(z),oe=ee.element(ve),z.headless||(ee.declaration(z),z.pubID==null&&z.sysID==null||ee.doctype(z)),oe},Be.exports.begin=function(ve,de,ce){var z;return ge(ve)&&(z=[ve,de],de=z[0],ce=z[1],ve={}),de?new Le(ve,de,ce):new Ce(ve)},Be.exports.stringWriter=function(ve){return new ye(ve)},Be.exports.streamWriter=function(ve,de){return new he(ve,de)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(me,Be,ke){function Ce(){for(var he={},ye=0;ye<arguments.length;ye++){var xe=arguments[ye];for(var ge in xe)Le.call(xe,ge)&&(he[ge]=xe[ge])}return he}Be.exports=Ce;var Le=Object.prototype.hasOwnProperty},{}],237:[function(me,Be,ke){"use strict";function Ce(z,ee,oe){ye.isBuffer(ee)||(ee=new ye(ee)),ye.isBuffer(oe)||(oe=new ye(oe)),ee.length>de?ee=z(ee):ee.length<de&&(ee=ye.concat([ee,ce],de));for(var ie=new ye(de),se=new ye(de),ue=0;ue<de;ue++)ie[ue]=54^ee[ue],se[ue]=92^ee[ue];var Se=z(ye.concat([ie,oe]));return z(ye.concat([se,Se]))}function Le(z,ee){z=z||"sha1";var oe=ve[z],ie=[],se=0;return oe||he("algorithm:",z,"is not yet supported"),{update:function(ue){return ye.isBuffer(ue)||(ue=new ye(ue)),ie.push(ue),se+=ue.length,this},digest:function(ue){var Se=ye.concat(ie),we=ee?Ce(oe,ee,Se):oe(Se);return ie=null,ue?we.toString(ue):we}}}function he(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}var ye=me("buffer").Buffer,xe=me("./sha"),ge=me("./sha256"),le=me("./md5"),ve={sha1:xe,sha256:ge,md5:le},de=64,ce=new ye(de);ce.fill(0),ke.createHash=function(z){return Le(z)},ke.createHmac=function(z,ee){return Le(z,ee)},function(z,ee){for(var oe in z)ee(z[oe],oe)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(z){ke[z]=function(){he("sorry,",z,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(me,Be,ke){"use strict";function Ce(ve,de){if(ve.length%xe!=0){var ce=ve.length+(xe-ve.length%xe);ve=ye.concat([ve,ge],ce)}for(var z=[],ee=de?ve.readInt32BE:ve.readInt32LE,oe=0;oe<ve.length;oe+=xe)z.push(ee.call(ve,oe));return z}function Le(ve,de,ce){for(var z=new ye(de),ee=ce?z.writeInt32BE:z.writeInt32LE,oe=0;oe<ve.length;oe++)ee.call(z,ve[oe],4*oe,!0);return z}function he(ve,de,ce,z){return ye.isBuffer(ve)||(ve=new ye(ve)),Le(de(Ce(ve,z),ve.length*le),ce,z)}var ye=me("buffer").Buffer,xe=4,ge=new ye(xe);ge.fill(0);var le=8;Be.exports={hash:he}},{buffer:38}],239:[function(me,Be,ke){"use strict";function Ce(ce,z){ce[z>>5]|=128<<z%32,ce[14+(z+64>>>9<<4)]=z;for(var ee=1732584193,oe=-271733879,ie=-1732584194,se=271733878,ue=0;ue<ce.length;ue+=16){var Se=ee,we=oe,Pe=ie,Ae=se;ee=he(ee,oe,ie,se,ce[ue+0],7,-680876936),se=he(se,ee,oe,ie,ce[ue+1],12,-389564586),ie=he(ie,se,ee,oe,ce[ue+2],17,606105819),oe=he(oe,ie,se,ee,ce[ue+3],22,-1044525330),ee=he(ee,oe,ie,se,ce[ue+4],7,-176418897),se=he(se,ee,oe,ie,ce[ue+5],12,1200080426),ie=he(ie,se,ee,oe,ce[ue+6],17,-1473231341),oe=he(oe,ie,se,ee,ce[ue+7],22,-45705983),ee=he(ee,oe,ie,se,ce[ue+8],7,1770035416),se=he(se,ee,oe,ie,ce[ue+9],12,-1958414417),ie=he(ie,se,ee,oe,ce[ue+10],17,-42063),oe=he(oe,ie,se,ee,ce[ue+11],22,-1990404162),ee=he(ee,oe,ie,se,ce[ue+12],7,1804603682),se=he(se,ee,oe,ie,ce[ue+13],12,-40341101),ie=he(ie,se,ee,oe,ce[ue+14],17,-1502002290),oe=he(oe,ie,se,ee,ce[ue+15],22,1236535329),ee=ye(ee,oe,ie,se,ce[ue+1],5,-165796510),se=ye(se,ee,oe,ie,ce[ue+6],9,-1069501632),ie=ye(ie,se,ee,oe,ce[ue+11],14,643717713),oe=ye(oe,ie,se,ee,ce[ue+0],20,-373897302),ee=ye(ee,oe,ie,se,ce[ue+5],5,-701558691),se=ye(se,ee,oe,ie,ce[ue+10],9,38016083),ie=ye(ie,se,ee,oe,ce[ue+15],14,-660478335),oe=ye(oe,ie,se,ee,ce[ue+4],20,-405537848),ee=ye(ee,oe,ie,se,ce[ue+9],5,568446438),se=ye(se,ee,oe,ie,ce[ue+14],9,-1019803690),ie=ye(ie,se,ee,oe,ce[ue+3],14,-187363961),oe=ye(oe,ie,se,ee,ce[ue+8],20,1163531501),ee=ye(ee,oe,ie,se,ce[ue+13],5,-1444681467),se=ye(se,ee,oe,ie,ce[ue+2],9,-51403784),ie=ye(ie,se,ee,oe,ce[ue+7],14,1735328473),oe=ye(oe,ie,se,ee,ce[ue+12],20,-1926607734),ee=xe(ee,oe,ie,se,ce[ue+5],4,-378558),se=xe(se,ee,oe,ie,ce[ue+8],11,-2022574463),ie=xe(ie,se,ee,oe,ce[ue+11],16,1839030562),oe=xe(oe,ie,se,ee,ce[ue+14],23,-35309556),ee=xe(ee,oe,ie,se,ce[ue+1],4,-1530992060),se=xe(se,ee,oe,ie,ce[ue+4],11,1272893353),ie=xe(ie,se,ee,oe,ce[ue+7],16,-155497632),oe=xe(oe,ie,se,ee,ce[ue+10],23,-1094730640),ee=xe(ee,oe,ie,se,ce[ue+13],4,681279174),se=xe(se,ee,oe,ie,ce[ue+0],11,-358537222),ie=xe(ie,se,ee,oe,ce[ue+3],16,-722521979),oe=xe(oe,ie,se,ee,ce[ue+6],23,76029189),ee=xe(ee,oe,ie,se,ce[ue+9],4,-640364487),se=xe(se,ee,oe,ie,ce[ue+12],11,-421815835),ie=xe(ie,se,ee,oe,ce[ue+15],16,530742520),oe=xe(oe,ie,se,ee,ce[ue+2],23,-995338651),ee=ge(ee,oe,ie,se,ce[ue+0],6,-198630844),se=ge(se,ee,oe,ie,ce[ue+7],10,1126891415),ie=ge(ie,se,ee,oe,ce[ue+14],15,-1416354905),oe=ge(oe,ie,se,ee,ce[ue+5],21,-57434055),ee=ge(ee,oe,ie,se,ce[ue+12],6,1700485571),se=ge(se,ee,oe,ie,ce[ue+3],10,-1894986606),ie=ge(ie,se,ee,oe,ce[ue+10],15,-1051523),oe=ge(oe,ie,se,ee,ce[ue+1],21,-2054922799),ee=ge(ee,oe,ie,se,ce[ue+8],6,1873313359),se=ge(se,ee,oe,ie,ce[ue+15],10,-30611744),ie=ge(ie,se,ee,oe,ce[ue+6],15,-1560198380),oe=ge(oe,ie,se,ee,ce[ue+13],21,1309151649),ee=ge(ee,oe,ie,se,ce[ue+4],6,-145523070),se=ge(se,ee,oe,ie,ce[ue+11],10,-1120210379),ie=ge(ie,se,ee,oe,ce[ue+2],15,718787259),oe=ge(oe,ie,se,ee,ce[ue+9],21,-343485551),ee=le(ee,Se),oe=le(oe,we),ie=le(ie,Pe),se=le(se,Ae)}return Array(ee,oe,ie,se)}function Le(ce,z,ee,oe,ie,se){return le(ve(le(le(z,ce),le(oe,se)),ie),ee)}function he(ce,z,ee,oe,ie,se,ue){return Le(z&ee|~z&oe,ce,z,ie,se,ue)}function ye(ce,z,ee,oe,ie,se,ue){return Le(z&oe|ee&~oe,ce,z,ie,se,ue)}function xe(ce,z,ee,oe,ie,se,ue){return Le(z^ee^oe,ce,z,ie,se,ue)}function ge(ce,z,ee,oe,ie,se,ue){return Le(ee^(z|~oe),ce,z,ie,se,ue)}function le(ce,z){var ee=(65535&ce)+(65535&z);return(ce>>16)+(z>>16)+(ee>>16)<<16|65535&ee}function ve(ce,z){return ce<<z|ce>>>32-z}var de=me("./helpers");Be.exports=function(ce){return de.hash(ce,Ce,16)}},{"./helpers":238}],240:[function(me,Be,ke){"use strict";function Ce(le,ve){le[ve>>5]|=128<<24-ve%32,le[15+(ve+64>>9<<4)]=ve;for(var de=Array(80),ce=1732584193,z=-271733879,ee=-1732584194,oe=271733878,ie=-1009589776,se=0;se<le.length;se+=16){for(var ue=ce,Se=z,we=ee,Pe=oe,Ae=ie,De=0;De<80;De++){de[De]=De<16?le[se+De]:xe(de[De-3]^de[De-8]^de[De-14]^de[De-16],1);var ze=ye(ye(xe(ce,5),Le(De,z,ee,oe)),ye(ye(ie,de[De]),he(De)));ie=oe,oe=ee,ee=xe(z,30),z=ce,ce=ze}ce=ye(ce,ue),z=ye(z,Se),ee=ye(ee,we),oe=ye(oe,Pe),ie=ye(ie,Ae)}return Array(ce,z,ee,oe,ie)}function Le(le,ve,de,ce){return le<20?ve&de|~ve&ce:le<40?ve^de^ce:le<60?ve&de|ve&ce|de&ce:ve^de^ce}function he(le){return le<20?1518500249:le<40?1859775393:le<60?-1894007588:-899497514}function ye(le,ve){var de=(65535&le)+(65535&ve);return(le>>16)+(ve>>16)+(de>>16)<<16|65535&de}function xe(le,ve){return le<<ve|le>>>32-ve}var ge=me("./helpers");Be.exports=function(le){return ge.hash(le,Ce,20,!0)}},{"./helpers":238}],241:[function(me,Be,ke){"use strict";var Ce=me("./helpers"),Le=function(ee,oe){var ie=(65535&ee)+(65535&oe);return(ee>>16)+(oe>>16)+(ie>>16)<<16|65535&ie},he=function(ee,oe){return ee>>>oe|ee<<32-oe},ye=function(ee,oe){return ee>>>oe},xe=function(ee,oe,ie){return ee&oe^~ee&ie},ge=function(ee,oe,ie){return ee&oe^ee&ie^oe&ie},le=function(ee){return he(ee,2)^he(ee,13)^he(ee,22)},ve=function(ee){return he(ee,6)^he(ee,11)^he(ee,25)},de=function(ee){return he(ee,7)^he(ee,18)^ye(ee,3)},ce=function(ee){return he(ee,17)^he(ee,19)^ye(ee,10)},z=function(ee,oe){var ie,se,ue,Se,we,Pe,Ae,De,ze,Ze,Xe,Ge,ft=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),at=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),Ct=new Array(64);ee[oe>>5]|=128<<24-oe%32,ee[15+(oe+64>>9<<4)]=oe;for(var ze=0;ze<ee.length;ze+=16){ie=at[0],se=at[1],ue=at[2],Se=at[3],we=at[4],Pe=at[5],Ae=at[6],De=at[7];for(var Ze=0;Ze<64;Ze++)Ct[Ze]=Ze<16?ee[Ze+ze]:Le(Le(Le(ce(Ct[Ze-2]),Ct[Ze-7]),de(Ct[Ze-15])),Ct[Ze-16]),Xe=Le(Le(Le(Le(De,ve(we)),xe(we,Pe,Ae)),ft[Ze]),Ct[Ze]),Ge=Le(le(ie),ge(ie,se,ue)),De=Ae,Ae=Pe,Pe=we,we=Le(Se,Xe),Se=ue,ue=se,se=ie,ie=Le(Xe,Ge);at[0]=Le(ie,at[0]),at[1]=Le(se,at[1]),at[2]=Le(ue,at[2]),at[3]=Le(Se,at[3]),at[4]=Le(we,at[4]),at[5]=Le(Pe,at[5]),at[6]=Le(Ae,at[6]),at[7]=Le(De,at[7])}return at};Be.exports=function(ee){return Ce.hash(ee,z,32,!0)}},{"./helpers":238}],242:[function(me,Be,ke){(function(Ce){"use strict";function Le(z){return z&&z.__esModule?z:{default:z}}var he=me("babel-runtime/core-js/object/create"),ye=Le(he),xe=me("babel-runtime/helpers/classCallCheck"),ge=Le(xe),le=me("babel-runtime/helpers/createClass"),ve=Le(le),de=me("babel-runtime/helpers/typeof"),ce=Le(de);(function(z){if((ke===void 0?"undefined":(0,ce.default)(ke))==="object"&&Be!==void 0)Be.exports=z();else if(typeof Me=="function"&&Me.amd)Me([],z);else{var ee;ee=typeof window!="undefined"?window:Ce!==void 0?Ce:typeof self!="undefined"?self:this,ee.mime=z()}})(function(){return function z(ee,oe,ie){function se(we,Pe){if(!oe[we]){if(!ee[we]){var Ae=typeof me=="function"&&me;if(!Pe&&Ae)return Ae(we,!0);if(ue)return ue(we,!0);var De=new Error("Cannot find module '"+we+"'");throw De.code="MODULE_NOT_FOUND",De}var ze=oe[we]={exports:{}};ee[we][0].call(ze.exports,function(Ze){var Xe=ee[we][1][Ze];return se(Xe||Ze)},ze,ze.exports,z,ee,oe,ie)}return oe[we].exports}for(var ue=typeof me=="function"&&me,Se=0;Se<ie.length;Se++)se(ie[Se]);return se}({1:[function(z,ee,oe){var ie=function(){function se(){(0,ge.default)(this,se),this._types=(0,ye.default)(null),this._extensions=(0,ye.default)(null);for(var ue=0;ue<arguments.length;ue++)this.define(arguments[ue])}return(0,ve.default)(se,[{key:"define",value:function(ue,Se){for(var we in ue){for(var Pe=ue[we],Ae=0;Ae<Pe.length;Ae++){var De=Pe[Ae];if(!Se&&De in this._types)throw new Error('Attempt to change mapping for "'+De+'" extension from "'+this._types[De]+'" to "'+we+'". Pass `force=true` to allow this, otherwise remove "'+De+'" from the list of extensions for "'+we+'".');this._types[De]=we}!Se&&this._extensions[we]||(this._extensions[we]=Pe[0])}}},{key:"getType",value:function(ue){ue=String(ue);var Se=ue.replace(/^.*[\/\\]/,"").toLowerCase(),we=Se.replace(/^.*\./,"").toLowerCase(),Pe=Se.length<ue.length;return(we.length<Se.length-1||!Pe)&&this._types[we]||null}},{key:"getExtension",value:function(ue){return(ue=/^\s*([^;\s]*)/.test(ue)&&RegExp.$1)&&this._extensions[ue.toLowerCase()]||null}}]),se}();ee.exports=ie},{}],2:[function(z,ee,oe){var ie=z("./Mime");ee.exports=new ie(z("./types/standard"),z("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(z,ee,oe){ee.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(z,ee,oe){ee.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}]},{},[2])(2)})}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(me,Be,ke){"use strict";ke.encodeURIComponent=function(Ce){try{return encodeURIComponent(Ce)}catch(Le){return Ce}},ke.escape=me("escape-html"),ke.timestamp=function(Ce){if(Ce){var Le=Ce;return typeof Le=="string"&&(Le=Number(Le)),String(Ce).length===10&&(Le*=1e3),new Date(Le)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(me,Be,ke){(function(Ce,Le){"use strict";function he(De){return De&&De.__esModule?De:{default:De}}function ye(De,ze){return De===void 0?ze:De}function xe(De,ze){return function(Ze,Xe,Ge){if(Ze)return ze(Ze);De({data:Xe,status:Ge.statusCode,headers:Ge.headers,res:Ge})}}var ge,le=me("babel-runtime/core-js/json/stringify"),ve=he(le),de=me("babel-runtime/helpers/typeof"),ce=he(de),z=me("util"),ee=me("url"),oe=me("http"),ie=me("https"),se=me("debug")("urllib"),ue=me("humanize-ms"),Se=0,we=Math.pow(2,31)-10,Pe=/^https?:\/\//i;ke.TIMEOUTS=[ue("300s"),ue("300s")];var Ae=["json","text"];ke.request=function(De,ze,Ze){return arguments.length===2&&typeof ze=="function"&&(Ze=ze,ze=null),typeof Ze=="function"?ke.requestWithCallback(De,ze,Ze):(ge||(ge=me("any-promise")),new ge(function(Xe,Ge){ke.requestWithCallback(De,ze,xe(Xe,Ge))}))},ke.requestWithCallback=function(De,ze,Ze){function Xe(){vt&&(clearTimeout(vt),vt=null)}function Ge(){nt&&(clearTimeout(nt),nt=null)}function ft(gn,Hn,An){if(Ge(),!Ze)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),lt,Ce.pid,Qt.method,De),void(gn&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),lt,Ce.pid,gn.name,gn.message,gn.stack));var qn=Ze;Ze=null;var ai={};if(An&&(be=An.statusCode,ai=An.headers),be===401&&ai["www-authenticate"]&&(!ze.headers||!ze.headers.Authorization)&&ze.digestAuth){var Ti=ai["www-authenticate"];if(Ti.indexOf("Digest ")>=0)return se("Request#%d %s: got digest auth header WWW-Authenticate: %s",lt,De,Ti),ze.headers=ze.headers||{},ze.headers.Authorization=digestAuthHeader(Qt.method,Qt.path,Ti,ze.digestAuth),se("Request#%d %s: auth with digest header: %s",lt,De,ze.headers.Authorization),An.headers["set-cookie"]&&(ze.headers.Cookie=An.headers["set-cookie"].join(";")),ke.requestWithCallback(De,ze,qn)}var Ci=Date.now()-mt;Je&&(Je.contentDownload=Ci),se("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ci,Oe,be,Qt.method,Qt.host,Qt.path,We,Je);var $i={status:be,statusCode:be,headers:ai,size:Oe,aborted:Ne,rt:Ci,keepAliveSocket:We,data:Hn,requestUrls:ze.requestUrls,timing:Je,remoteAddress:$e,remotePort:dt};if(gn){var or="";Ht&&typeof Ht.getCurrentStatus=="function"&&(or=", agent status: "+(0,ve.default)(Ht.getCurrentStatus())),gn.message+=", "+Qt.method+" "+De+" "+be+" (connected: "+Ie+", keepalive socket: "+We+or+`)
|
|
|
headers: `+(0,ve.default)(ai),gn.data=Hn,gn.path=Qt.path,gn.status=be,gn.headers=ai,gn.res=$i}qn(gn,Hn,ze.streaming?An:$i),ze.emitter&&(tt.url=De,tt.socket=ln&&ln.connection,tt.options=Qt,tt.size=Bt,ze.emitter.emit("response",{requestId:lt,error:gn,ctx:ze.ctx,req:tt,res:$i}))}function at(gn){var Hn=null;if(ze.followRedirect&&statuses.redirect[gn.statusCode]){ze._followRedirectCount=(ze._followRedirectCount||0)+1;var An=gn.headers.location;if(An){if(!(ze._followRedirectCount>ze.maxRedirects)){var qn=ze.formatRedirectUrl?ze.formatRedirectUrl(De,An):ee.resolve(De,An);se("Request#%d %s: `redirected` from %s to %s",lt,Qt.path,De,qn),Ge(),ze.headers&&ze.headers.Host&&Pe.test(An)&&(ze.headers.Host=null);var ai=Ze;return Ze=null,ke.requestWithCallback(qn,ze,ai),{redirect:!0,error:null}}Hn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),Hn.name="MaxRedirectError"}else Hn=new Error("Got statusCode "+gn.statusCode+" but cannot resolve next location from headers"),Hn.name="FollowRedirectError"}return{redirect:!1,error:Hn}}function Ct(gn,Hn,An){return An(null,Hn,gn.headers["content-encoding"])}function et(gn){if(Je&&(Je.waiting=Date.now()-mt),se("Request#%d %s `req response` event emit: status %d, headers: %j",lt,De,gn.statusCode,gn.headers),ze.streaming){var Hn=at(gn);return Hn.redirect?void gn.resume():Hn.error?(gn.resume(),ft(Hn.error,null,gn)):ft(null,null,gn)}if(gn.on("close",function(){se("Request#%d %s: `res close` event emit, total size %d",lt,De,Oe)}),gn.on("error",function(){se("Request#%d %s: `res error` event emit, total size %d",lt,De,Oe)}),gn.on("aborted",function(){Ne=!0,se("Request#%d %s: `res aborted` event emit, total size %d",lt,De,Oe)}),At){var Hn=at(gn);return Hn.redirect?void gn.resume():Hn.error?(gn.resume(),At.end(),ft(Hn.error,null,gn)):(ze.consumeWriteStream===!1?gn.on("end",ft.bind(null,null,null,gn)):isNode010||isNode012?first([[At,"close"],[gn,"aborted"]],function(ai,Ti,Ci){se("Request#%d %s: writeStream or res %s event emitted",lt,De,Ci),ft(He||null,null,gn)}):At.on("close",function(){se("Request#%d %s: writeStream close event emitted",lt,De),ft(He||null,null,gn)}),gn.pipe(At))}var An=[];gn.on("data",function(qn){se("Request#%d %s: `res data` event emit, size %d",lt,De,qn.length),Oe+=qn.length,An.push(qn)}),gn.on("end",function(){var qn=Le.concat(An,Oe);if(se("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",lt,De,Oe,gn._dumped),He)return ft(He,qn,gn);var ai=at(gn);if(ai.error)return ft(ai.error,qn,gn);ai.redirect||Ct(gn,qn,function(Ti,Ci,$i){if(Ti)return ft(Ti,qn,gn);if(!$i&&Ae.indexOf(ze.dataType)>=0){try{Ci=decodeBodyByCharset(Ci,gn)}catch(lr){return se("decodeBodyByCharset error: %s",lr),ft(null,Ci,gn)}if(ze.dataType==="json")if(Oe===0)Ci=null;else{var or=parseJSON(Ci,hn);or.error?Ti=or.error:Ci=or.data}}Ne&&se("Request#%d %s: Remote socket was terminated before `response.end()` was called",lt,De),ft(Ti,Ci,gn)})})}function yt(){se("Response timer ticking, timeout: %d",pn),nt=setTimeout(function(){nt=null;var gn="Response timeout for "+pn+"ms";He=new Error(gn),He.name="ResponseTimeoutError",He.requestId=lt,se("ResponseTimeout: Request#%d %s %s: %s, connected: %s",lt,De,He.name,gn,Ie),st()},pn)}function st(){se("Request#%d %s abort, connected: %s",lt,De,Ie),ln.socket||(He.noSocket=!0,ft(He)),ln.abort()}if(!De||typeof De!="string"&&(De===void 0?"undefined":(0,ce.default)(De))!=="object"){var zt=z.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(zt)}arguments.length===2&&typeof ze=="function"&&(Ze=ze,ze=null),ze=ze||{},Se>=we&&(Se=0);var lt=++Se;ze.requestUrls=ze.requestUrls||[];var tt={requestId:lt,url:De,args:ze,ctx:ze.ctx};ze.emitter&&ze.emitter.emit("request",tt),ze.timeout=ze.timeout||ke.TIMEOUTS,ze.maxRedirects=ze.maxRedirects||10,ze.streaming=ze.streaming||ze.customResponse;var ut,mt=Date.now();typeof De=="string"?(Pe.test(De)||(De="http://"+De),ut=ee.parse(De)):ut=De;var Pt=(ze.type||ze.method||ut.method||"GET").toUpperCase(),gt=ut.port||80,Ft=oe,Ht=ye(ze.agent,ke.agent),hn=ze.fixJSONCtlChars;ut.protocol==="https:"&&(Ft=ie,Ht=ye(ze.httpsAgent,ke.httpsAgent),ut.port||(gt=443));var Qt={host:ut.hostname||ut.host||"localhost",path:ut.path||"/",method:Pt,port:gt,agent:Ht,headers:ze.headers||{},lookup:ze.lookup};Array.isArray(ze.timeout)?Qt.requestTimeout=ze.timeout[ze.timeout.length-1]:ze.timeout!==void 0&&(Qt.requestTimeout=ze.timeout);for(var bn=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Wt=0;Wt<bn.length;Wt++){var Kt=bn[Wt];ze.hasOwnProperty(Kt)&&(Qt[Kt]=ze[Kt])}Qt.rejectUnauthorized!==!1||Qt.hasOwnProperty("secureOptions")||(Qt.secureOptions=me("constants").SSL_OP_NO_TLSv1_2);var Jt=ze.auth||ut.auth;Jt&&(Qt.auth=Jt);var Yt=ze.content||ze.data,kt=Pt==="GET"||Pt==="HEAD"||ze.dataAsQueryString;if(!ze.content&&Yt&&typeof Yt!="string"&&!Le.isBuffer(Yt))if(kt)Yt=ze.nestedQuerystring?qs.stringify(Yt):querystring.stringify(Yt);else{var pt=Qt.headers["Content-Type"]||Qt.headers["content-type"];pt||(pt=ze.contentType==="json"?"application/json":"application/x-www-form-urlencoded",Qt.headers["Content-Type"]=pt),Yt=parseContentType(pt).type==="application/json"?(0,ve.default)(Yt):ze.nestedQuerystring?qs.stringify(Yt):querystring.stringify(Yt)}kt&&Yt&&(Qt.path+=(ut.query?"&":"?")+Yt,Yt=null);var Bt=0;if(Yt){var xt=Yt.length;Le.isBuffer(Yt)||(xt=Le.byteLength(Yt)),Bt=Qt.headers["Content-Length"]=xt}ze.dataType==="json"&&(Qt.headers.Accept="application/json"),typeof ze.beforeRequest=="function"&&ze.beforeRequest(Qt);var vt=null,nt=null,He=null,Ie=!1,We=!1,Oe=0,be=-1,Ne=!1,$e="",dt="",Je=null;ze.timing&&(Je={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),Qt.headers["User-Agent"]||Qt.headers["user-agent"]||(Qt.headers["User-Agent"]=navigator.userAgent),ze.gzip&&(Qt.headers["Accept-Encoding"]||Qt.headers["accept-encoding"]||(Qt.headers["Accept-Encoding"]="gzip"));var At=ze.writeStream;se("Request#%d %s %s with headers %j, options.path: %s",lt,Pt,De,Qt.headers,Qt.path),ze.requestUrls.push(De);var tn,pn;Array.isArray(ze.timeout)?(tn=ue(ze.timeout[0]),pn=ue(ze.timeout[1])):tn=pn=ue(ze.timeout),se("ConnectTimeout: %d, ResponseTimeout: %d",tn,pn);var ln;try{ln=Ft.request(Qt,et)}catch(gn){return ft(gn)}return typeof window=="undefined"?function(){se("Connect timer ticking, timeout: %d",tn),vt=setTimeout(function(){vt=null,be===-1&&(be=-2);var gn="Connect timeout for "+tn+"ms",Hn="ConnectionTimeoutError";ln.socket||(Hn="SocketAssignTimeoutError",gn+=", working sockets is full"),He=new Error(gn),He.name=Hn,He.requestId=lt,se("ConnectTimeout: Request#%d %s %s: %s, connected: %s",lt,De,He.name,gn,Ie),st()},tn)}():ln.on("requestTimeout",function(){be===-1&&(be=-2);var gn="Connect timeout for "+tn+"ms";He=new Error(gn),He.name="ConnectionTimeoutError",He.requestId=lt,st()}),Je&&ln.on("finish",function(){Je.requestSent=Date.now()-mt}),ln.once("socket",function(gn){Je&&(Je.queuing=Date.now()-mt),isNode010&&gn.socket&&(gn=gn.socket);var Hn=gn.readyState;if(Hn==="opening")return gn.once("lookup",function(An,qn,ai){se("Request#%d %s lookup: %s, %s, %s",lt,De,An,qn,ai),Je&&(Je.dnslookup=Date.now()-mt),qn&&($e=qn)}),void gn.once("connect",function(){Je&&(Je.connected=Date.now()-mt),Xe(),yt(),se("Request#%d %s new socket connected",lt,De),Ie=!0,$e||($e=gn.remoteAddress),dt=gn.remotePort});se("Request#%d %s reuse socket connected, readyState: %s",lt,De,Hn),Ie=!0,We=!0,$e||($e=gn.remoteAddress),dt=gn.remotePort,Xe(),yt()}),ln.on("error",function(gn){gn.name!=="Error"&&gn.name!=="TypeError"||(gn.name=Ie?"ResponseError":"RequestError"),gn.message+=' (req "error")',se("Request#%d %s `req error` event emit, %s: %s",lt,De,gn.name,gn.message),ft(He||gn)}),At&&At.once("error",function(gn){gn.message+=' (writeStream "error")',He=gn,se("Request#%d %s `writeStream error` event emit, %s: %s",lt,De,gn.name,gn.message),st()}),ze.stream?(ze.stream.pipe(ln),ze.stream.once("error",function(gn){gn.message+=' (stream "error")',He=gn,se("Request#%d %s `readStream error` event emit, %s: %s",lt,De,gn.name,gn.message),st()})):ln.end(Yt),ln.requestId=lt,ln}}).call(this,me("_process"),me("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)}),function(Me){function me(ke){if(Be[ke])return Be[ke].exports;var Ce=Be[ke]={i:ke,l:!1,exports:{}};return Me[ke].call(Ce.exports,Ce,Ce.exports,me),Ce.l=!0,Ce.exports}var Be={};me.m=Me,me.c=Be,me.d=function(ke,Ce,Le){me.o(ke,Ce)||Object.defineProperty(ke,Ce,{configurable:!1,enumerable:!0,get:Le})},me.n=function(ke){var Ce=ke&&ke.__esModule?function(){return ke.default}:function(){return ke};return me.d(Ce,"a",Ce),Ce},me.o=function(ke,Ce){return Object.prototype.hasOwnProperty.call(ke,Ce)},me.p="",me(me.s=12)}([function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce()})(0,function(){var ke=ke||function(Ce,Le){var he=Object.create||function(){function ie(){}return function(se){var ue;return ie.prototype=se,ue=new ie,ie.prototype=null,ue}}(),ye={},xe=ye.lib={},ge=xe.Base=function(){return{extend:function(ie){var se=he(this);return ie&&se.mixIn(ie),se.hasOwnProperty("init")&&this.init!==se.init||(se.init=function(){se.$super.init.apply(this,arguments)}),se.init.prototype=se,se.$super=this,se},create:function(){var ie=this.extend();return ie.init.apply(ie,arguments),ie},init:function(){},mixIn:function(ie){for(var se in ie)ie.hasOwnProperty(se)&&(this[se]=ie[se]);ie.hasOwnProperty("toString")&&(this.toString=ie.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),le=xe.WordArray=ge.extend({init:function(ie,se){ie=this.words=ie||[],this.sigBytes=se!=null?se:4*ie.length},toString:function(ie){return(ie||de).stringify(this)},concat:function(ie){var se=this.words,ue=ie.words,Se=this.sigBytes,we=ie.sigBytes;if(this.clamp(),Se%4)for(var Pe=0;Pe<we;Pe++){var Ae=ue[Pe>>>2]>>>24-Pe%4*8&255;se[Se+Pe>>>2]|=Ae<<24-(Se+Pe)%4*8}else for(var Pe=0;Pe<we;Pe+=4)se[Se+Pe>>>2]=ue[Pe>>>2];return this.sigBytes+=we,this},clamp:function(){var ie=this.words,se=this.sigBytes;ie[se>>>2]&=4294967295<<32-se%4*8,ie.length=Ce.ceil(se/4)},clone:function(){var ie=ge.clone.call(this);return ie.words=this.words.slice(0),ie},random:function(ie){for(var se,ue=[],Se=0;Se<ie;Se+=4){var we=function(Ae){var Ae=Ae,De=987654321,ze=4294967295;return function(){De=36969*(65535&De)+(De>>16)&ze,Ae=18e3*(65535&Ae)+(Ae>>16)&ze;var Ze=(De<<16)+Ae&ze;return Ze/=4294967296,(Ze+=.5)*(Ce.random()>.5?1:-1)}}(4294967296*(se||Ce.random()));se=987654071*we(),ue.push(4294967296*we()|0)}return new le.init(ue,ie)}}),ve=ye.enc={},de=ve.Hex={stringify:function(ie){for(var se=ie.words,ue=ie.sigBytes,Se=[],we=0;we<ue;we++){var Pe=se[we>>>2]>>>24-we%4*8&255;Se.push((Pe>>>4).toString(16)),Se.push((15&Pe).toString(16))}return Se.join("")},parse:function(ie){for(var se=ie.length,ue=[],Se=0;Se<se;Se+=2)ue[Se>>>3]|=parseInt(ie.substr(Se,2),16)<<24-Se%8*4;return new le.init(ue,se/2)}},ce=ve.Latin1={stringify:function(ie){for(var se=ie.words,ue=ie.sigBytes,Se=[],we=0;we<ue;we++){var Pe=se[we>>>2]>>>24-we%4*8&255;Se.push(String.fromCharCode(Pe))}return Se.join("")},parse:function(ie){for(var se=ie.length,ue=[],Se=0;Se<se;Se++)ue[Se>>>2]|=(255&ie.charCodeAt(Se))<<24-Se%4*8;return new le.init(ue,se)}},z=ve.Utf8={stringify:function(ie){try{return decodeURIComponent(escape(ce.stringify(ie)))}catch(se){throw new Error("Malformed UTF-8 data")}},parse:function(ie){return ce.parse(unescape(encodeURIComponent(ie)))}},ee=xe.BufferedBlockAlgorithm=ge.extend({reset:function(){this._data=new le.init,this._nDataBytes=0},_append:function(ie){typeof ie=="string"&&(ie=z.parse(ie)),this._data.concat(ie),this._nDataBytes+=ie.sigBytes},_process:function(ie){var se=this._data,ue=se.words,Se=se.sigBytes,we=this.blockSize,Pe=4*we,Ae=Se/Pe;Ae=ie?Ce.ceil(Ae):Ce.max((0|Ae)-this._minBufferSize,0);var De=Ae*we,ze=Ce.min(4*De,Se);if(De){for(var Ze=0;Ze<De;Ze+=we)this._doProcessBlock(ue,Ze);var Xe=ue.splice(0,De);se.sigBytes-=ze}return new le.init(Xe,ze)},clone:function(){var ie=ge.clone.call(this);return ie._data=this._data.clone(),ie},_minBufferSize:0}),oe=(xe.Hasher=ee.extend({cfg:ge.extend(),init:function(ie){this.cfg=this.cfg.extend(ie),this.reset()},reset:function(){ee.reset.call(this),this._doReset()},update:function(ie){return this._append(ie),this._process(),this},finalize:function(ie){return ie&&this._append(ie),this._doFinalize()},blockSize:16,_createHelper:function(ie){return function(se,ue){return new ie.init(ue).finalize(se)}},_createHmacHelper:function(ie){return function(se,ue){return new oe.HMAC.init(ie,ue).finalize(se)}}}),ye.algo={});return ye}(Math);return ke})},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"detectIEVersion",value:function(){for(var ye=4,xe=document.createElement("div"),ge=xe.getElementsByTagName("i");xe.innerHTML="<!--[if gt IE "+ye+"]><i></i><![endif]-->",ge[0];)ye++;return ye>4&&ye}},{key:"extend",value:function(ye,xe){for(var ge in xe)Object.prototype.hasOwnProperty.call(xe,ge)&&xe[ge]&&(ye[ge]=xe[ge])}},{key:"isArray",value:function(ye){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(ye){return ye=ye.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(ye)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(ye)?"audio":/.bmp|.jpg|.jpeg|.png/.test(ye)?"img":"other"}},{key:"isImage",value:function(ye){return ye=ye.toLowerCase(),!!/.jpg|.jpeg|.png/.test(ye)}},{key:"ISODateString",value:function(ye){function xe(ge){return ge<10?"0"+ge:ge}return ye.getUTCFullYear()+"-"+xe(ye.getUTCMonth()+1)+"-"+xe(ye.getUTCDate())+"T"+xe(ye.getUTCHours())+":"+xe(ye.getUTCMinutes())+":"+xe(ye.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(ye){return!!/^\d+$/.test(ye)}}]),he}();me.default=Le},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return function(Ce){function Le(oe,ie,se,ue,Se,we,Pe){var Ae=oe+(ie&se|~ie&ue)+Se+Pe;return(Ae<<we|Ae>>>32-we)+ie}function he(oe,ie,se,ue,Se,we,Pe){var Ae=oe+(ie&ue|se&~ue)+Se+Pe;return(Ae<<we|Ae>>>32-we)+ie}function ye(oe,ie,se,ue,Se,we,Pe){var Ae=oe+(ie^se^ue)+Se+Pe;return(Ae<<we|Ae>>>32-we)+ie}function xe(oe,ie,se,ue,Se,we,Pe){var Ae=oe+(se^(ie|~ue))+Se+Pe;return(Ae<<we|Ae>>>32-we)+ie}var ge=ke,le=ge.lib,ve=le.WordArray,de=le.Hasher,ce=ge.algo,z=[];(function(){for(var oe=0;oe<64;oe++)z[oe]=4294967296*Ce.abs(Ce.sin(oe+1))|0})();var ee=ce.MD5=de.extend({_doReset:function(){this._hash=new ve.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(oe,ie){for(var se=0;se<16;se++){var ue=ie+se,Se=oe[ue];oe[ue]=16711935&(Se<<8|Se>>>24)|4278255360&(Se<<24|Se>>>8)}var we=this._hash.words,Pe=oe[ie+0],Ae=oe[ie+1],De=oe[ie+2],ze=oe[ie+3],Ze=oe[ie+4],Xe=oe[ie+5],Ge=oe[ie+6],ft=oe[ie+7],at=oe[ie+8],Ct=oe[ie+9],et=oe[ie+10],yt=oe[ie+11],st=oe[ie+12],zt=oe[ie+13],lt=oe[ie+14],tt=oe[ie+15],ut=we[0],mt=we[1],Pt=we[2],gt=we[3];ut=Le(ut,mt,Pt,gt,Pe,7,z[0]),gt=Le(gt,ut,mt,Pt,Ae,12,z[1]),Pt=Le(Pt,gt,ut,mt,De,17,z[2]),mt=Le(mt,Pt,gt,ut,ze,22,z[3]),ut=Le(ut,mt,Pt,gt,Ze,7,z[4]),gt=Le(gt,ut,mt,Pt,Xe,12,z[5]),Pt=Le(Pt,gt,ut,mt,Ge,17,z[6]),mt=Le(mt,Pt,gt,ut,ft,22,z[7]),ut=Le(ut,mt,Pt,gt,at,7,z[8]),gt=Le(gt,ut,mt,Pt,Ct,12,z[9]),Pt=Le(Pt,gt,ut,mt,et,17,z[10]),mt=Le(mt,Pt,gt,ut,yt,22,z[11]),ut=Le(ut,mt,Pt,gt,st,7,z[12]),gt=Le(gt,ut,mt,Pt,zt,12,z[13]),Pt=Le(Pt,gt,ut,mt,lt,17,z[14]),mt=Le(mt,Pt,gt,ut,tt,22,z[15]),ut=he(ut,mt,Pt,gt,Ae,5,z[16]),gt=he(gt,ut,mt,Pt,Ge,9,z[17]),Pt=he(Pt,gt,ut,mt,yt,14,z[18]),mt=he(mt,Pt,gt,ut,Pe,20,z[19]),ut=he(ut,mt,Pt,gt,Xe,5,z[20]),gt=he(gt,ut,mt,Pt,et,9,z[21]),Pt=he(Pt,gt,ut,mt,tt,14,z[22]),mt=he(mt,Pt,gt,ut,Ze,20,z[23]),ut=he(ut,mt,Pt,gt,Ct,5,z[24]),gt=he(gt,ut,mt,Pt,lt,9,z[25]),Pt=he(Pt,gt,ut,mt,ze,14,z[26]),mt=he(mt,Pt,gt,ut,at,20,z[27]),ut=he(ut,mt,Pt,gt,zt,5,z[28]),gt=he(gt,ut,mt,Pt,De,9,z[29]),Pt=he(Pt,gt,ut,mt,ft,14,z[30]),mt=he(mt,Pt,gt,ut,st,20,z[31]),ut=ye(ut,mt,Pt,gt,Xe,4,z[32]),gt=ye(gt,ut,mt,Pt,at,11,z[33]),Pt=ye(Pt,gt,ut,mt,yt,16,z[34]),mt=ye(mt,Pt,gt,ut,lt,23,z[35]),ut=ye(ut,mt,Pt,gt,Ae,4,z[36]),gt=ye(gt,ut,mt,Pt,Ze,11,z[37]),Pt=ye(Pt,gt,ut,mt,ft,16,z[38]),mt=ye(mt,Pt,gt,ut,et,23,z[39]),ut=ye(ut,mt,Pt,gt,zt,4,z[40]),gt=ye(gt,ut,mt,Pt,Pe,11,z[41]),Pt=ye(Pt,gt,ut,mt,ze,16,z[42]),mt=ye(mt,Pt,gt,ut,Ge,23,z[43]),ut=ye(ut,mt,Pt,gt,Ct,4,z[44]),gt=ye(gt,ut,mt,Pt,st,11,z[45]),Pt=ye(Pt,gt,ut,mt,tt,16,z[46]),mt=ye(mt,Pt,gt,ut,De,23,z[47]),ut=xe(ut,mt,Pt,gt,Pe,6,z[48]),gt=xe(gt,ut,mt,Pt,ft,10,z[49]),Pt=xe(Pt,gt,ut,mt,lt,15,z[50]),mt=xe(mt,Pt,gt,ut,Xe,21,z[51]),ut=xe(ut,mt,Pt,gt,st,6,z[52]),gt=xe(gt,ut,mt,Pt,ze,10,z[53]),Pt=xe(Pt,gt,ut,mt,et,15,z[54]),mt=xe(mt,Pt,gt,ut,Ae,21,z[55]),ut=xe(ut,mt,Pt,gt,at,6,z[56]),gt=xe(gt,ut,mt,Pt,tt,10,z[57]),Pt=xe(Pt,gt,ut,mt,Ge,15,z[58]),mt=xe(mt,Pt,gt,ut,zt,21,z[59]),ut=xe(ut,mt,Pt,gt,Ze,6,z[60]),gt=xe(gt,ut,mt,Pt,yt,10,z[61]),Pt=xe(Pt,gt,ut,mt,De,15,z[62]),mt=xe(mt,Pt,gt,ut,Ct,21,z[63]),we[0]=we[0]+ut|0,we[1]=we[1]+mt|0,we[2]=we[2]+Pt|0,we[3]=we[3]+gt|0},_doFinalize:function(){var oe=this._data,ie=oe.words,se=8*this._nDataBytes,ue=8*oe.sigBytes;ie[ue>>>5]|=128<<24-ue%32;var Se=Ce.floor(se/4294967296),we=se;ie[15+(ue+64>>>9<<4)]=16711935&(Se<<8|Se>>>24)|4278255360&(Se<<24|Se>>>8),ie[14+(ue+64>>>9<<4)]=16711935&(we<<8|we>>>24)|4278255360&(we<<24|we>>>8),oe.sigBytes=4*(ie.length+1),this._process();for(var Pe=this._hash,Ae=Pe.words,De=0;De<4;De++){var ze=Ae[De];Ae[De]=16711935&(ze<<8|ze>>>24)|4278255360&(ze<<24|ze>>>8)}return Pe},clone:function(){var oe=de.clone.call(this);return oe._hash=this._hash.clone(),oe}});ge.MD5=de._createHelper(ee),ge.HmacMD5=de._createHmacHelper(ee)}(Math),ke.MD5})},function(Me,me,Be){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},me.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},me.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(Me,me,Be){"use strict";function ke(ee){return ee&&ee.__esModule?ee:{default:ee}}function Ce(ee,oe){if(!(ee instanceof oe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function ee(oe,ie){for(var se=0;se<ie.length;se++){var ue=ie[se];ue.enumerable=ue.enumerable||!1,ue.configurable=!0,"value"in ue&&(ue.writable=!0),Object.defineProperty(oe,ue.key,ue)}}return function(oe,ie,se){return ie&&ee(oe.prototype,ie),se&&ee(oe,se),oe}}(),he=Be(5),ye=ke(he),xe=Be(25),ge=ke(xe),le=Be(6),ve=ke(le),de=Be(7),ce=ke(de),z=function(){function ee(oe){Ce(this,ee);var ie=ce.default.os.name,se=ce.default.os.version||"",ue=ce.default.browser.name,Se=ce.default.browser.version||"",we=window.location.href,Pe="";we&&(Pe=ce.default.getHost(we));var Ae="pc";ce.default.os.ipad?Ae="pad":(ce.default.os.iphone||ce.default.os.android)&&(Ae="phone"),this._ri=ye.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:ve.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:ee.getUuid(),os:ie,ov:se,et:ue,ev:Se,uat:navigator.userAgent,app_n:Pe,tt:Ae,dm:"h5",ut:""}}return Le(ee,[{key:"log",value:function(oe,ie){ie&&ie.ri?(this._ri=ie.ri,delete ie.ri):this._ri=ye.default.create(),ie&&ie.ut&&(this.initParam.ut=ie.ut,delete ie.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=oe=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=oe;var se=[];if(ie)for(var ue in ie)se.push(ue+"="+ie[ue]);var Se=se.join("&");this.initParam.args=encodeURIComponent(Se==""?"0":Se);var we=[];for(var ue in this.initParam)we.push(ue+"="+this.initParam[ue]);var Pe=we.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(Pe):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+Pe}}],[{key:"getUuid",value:function(){var oe=ge.default.get("p_h5_upload_u");return oe||(oe=ye.default.create(),ge.default.set("p_h5_upload_u",oe,730)),oe}},{key:"getClientId",value:function(){return ge.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(oe){return oe||(oe=ye.default.create()),ge.default.set("p_h5_upload_clientId",oe,730),oe}}]),ee}();me.default=z},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"create",value:function(ye,xe){var ge,le="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),ve=[];if(xe=xe||le.length,ye)for(ge=0;ge<ye;ge++)ve[ge]=le[0|Math.random()*xe];else{var de;for(ve[8]=ve[13]=ve[18]=ve[23]="-",ve[14]="4",ge=0;ge<36;ge++)ve[ge]||(de=0|16*Math.random(),ve[ge]=le[ge==19?3&de|8:de])}return ve.join("")}}]),he}();me.default=Le},function(Me,me,Be){"use strict";Object.defineProperty(me,"__esModule",{value:!0});var ke={version:"1.5.0"};me.default=ke},function(Me,me,Be){"use strict";function ke(le,ve){if(!(le instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function le(ve,de){for(var ce=0;ce<de.length;ce++){var z=de[ce];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ve,z.key,z)}}return function(ve,de,ce){return de&&le(ve.prototype,de),ce&&le(ve,ce),ve}}(),Le=function(le){var ve=navigator.userAgent,de="other";if(le.ios)return"iOS";if(le.android)return"android";if(ve.indexOf("Baiduspider")>-1)return"Baiduspider";if(ve.indexOf("PlayStation")>-1)return"PS4";var ce=navigator.platform=="Win32"||navigator.platform=="Windows"||ve.indexOf("Windows")>-1,z=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return z&&(de="macOS"),navigator.platform=="X11"&&!ce&&!z&&(de="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(de="Linux"),ce?"windows":de},he=function(){var le=navigator.userAgent,ve="";return(le.indexOf("Windows NT 5.0")>-1||le.indexOf("Windows 2000")>-1)&&(ve="2000"),(le.indexOf("Windows NT 5.1")>-1||le.indexOf("Windows XP")>-1)&&(ve="XP"),(le.indexOf("Windows NT 5.2")>-1||le.indexOf("Windows 2003")>-1)&&(ve="2003"),(le.indexOf("Windows NT 6.0")>-1||le.indexOf("Windows Vista")>-1)&&(ve="Vista"),(le.indexOf("Windows NT 6.1")>-1||le.indexOf("Windows 7")>-1)&&(ve="7"),(le.indexOf("Windows NT 6.2")>-1||le.indexOf("Windows 8")>-1)&&(ve="8"),(le.indexOf("Windows NT 6.3")>-1||le.indexOf("Windows 8.1")>-1)&&(ve="8.1"),(le.indexOf("Windows NT 10")>-1||le.indexOf("Windows 10")>-1)&&(ve="10"),ve},ye=function(le){var ve=navigator.userAgent.toLowerCase();return le.chrome?"Chrome":le.firefox?"Firefox":le.safari?"Safari":le.webview?"webview":le.ie?/edge/.test(ve)?"Edge":"IE":/baiduspider/.test(ve)?"Baiduspider":/ucweb/.test(ve)||/UCBrowser/.test(ve)?"UC":/opera/.test(ve)?"Opera":/ucweb/.test(ve)?"UC":/360se/.test(ve)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(ve)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(ve)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(ve)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(ve)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(ve)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(ve)?"PS4\u6D4F\u89C8\u5668":void 0},xe=function(){var le={},ve={},de=navigator.userAgent,ce=navigator.platform,z=de.match(/Web[kK]it[\/]{0,1}([\d.]+)/),ee=de.match(/(Android);?[\s\/]+([\d.]+)?/),oe=!!de.match(/\(Macintosh\; Intel /),ie=de.match(/(iPad).*OS\s([\d_]+)/),se=de.match(/(iPod)(.*OS\s([\d_]+))?/),ue=!ie&&de.match(/(iPhone\sOS)\s([\d_]+)/),Se=de.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),we=/Win\d{2}|Windows/.test(ce),Pe=de.match(/Windows Phone ([\d.]+)/),Ae=Se&&de.match(/TouchPad/),De=de.match(/Kindle\/([\d.]+)/),ze=de.match(/Silk\/([\d._]+)/),Ze=de.match(/(BlackBerry).*Version\/([\d.]+)/),Xe=de.match(/(BB10).*Version\/([\d.]+)/),Ge=de.match(/(RIM\sTablet\sOS)\s([\d.]+)/),ft=de.match(/PlayBook/),at=de.match(/Chrome\/([\d.]+)/)||de.match(/CriOS\/([\d.]+)/),Ct=de.match(/Firefox\/([\d.]+)/),et=de.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),yt=de.match(/MSIE\s([\d.]+)/)||de.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),st=!at&&de.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),zt=st||de.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((ve.webkit=!!z)&&(ve.version=z[1]),ee&&(le.android=!0,le.version=ee[2]),ue&&!se&&(le.ios=le.iphone=!0,le.version=ue[2].replace(/_/g,".")),ie&&(le.ios=le.ipad=!0,le.version=ie[2].replace(/_/g,".")),se&&(le.ios=le.ipod=!0,le.version=se[3]?se[3].replace(/_/g,"."):null),Pe&&(le.wp=!0,le.version=Pe[1]),Se&&(le.webos=!0,le.version=Se[2]),Ae&&(le.touchpad=!0),Ze&&(le.blackberry=!0,le.version=Ze[2]),Xe&&(le.bb10=!0,le.version=Xe[2]),Ge&&(le.rimtabletos=!0,le.version=Ge[2]),ft&&(ve.playbook=!0),De&&(le.kindle=!0,le.version=De[1]),ze&&(ve.silk=!0,ve.version=ze[1]),!ze&&le.android&&de.match(/Kindle Fire/)&&(ve.silk=!0),at&&(ve.chrome=!0,ve.version=at[1]),Ct&&(ve.firefox=!0,ve.version=Ct[1]),et&&(le.firefoxos=!0,le.version=et[1]),yt&&(ve.ie=!0,ve.version=yt[1]),zt&&(oe||le.ios||we||ee)&&(ve.safari=!0,le.ios||(ve.version=zt[1])),st&&(ve.webview=!0),oe){var lt=de.match(/[\d]*_[\d]*_[\d]*/);lt&<.length>0&<[0]&&(le.version=lt[0].replace(/_/g,"."))}return le.tablet=!!(ie||ft||ee&&!de.match(/Mobile/)||Ct&&de.match(/Tablet/)||yt&&!de.match(/Phone/)&&de.match(/Touch/)),le.phone=!(le.tablet||le.ipod||!(ee||ue||Se||Ze||Xe||at&&de.match(/Android/)||at&&de.match(/CriOS\/([\d.]+)/)||Ct&&de.match(/Mobile/)||yt&&de.match(/Touch/))),le.pc=!le.tablet&&!le.phone,oe?le.name="macOS":we?(le.name="windows",le.version=he()):le.name=Le(le),ve.name=ye(ve),{os:le,browser:ve}}(),ge=function(){function le(){ke(this,le)}return Ce(le,null,[{key:"getHost",value:function(ve){var z="";if(ve===void 0||ve==null||ve=="")return"";var de=ve.indexOf("//"),ce=ve;de>-1&&(ce=ve.substring(de+2));var z=ce,ee=ce.split("/");return ee&&ee.length>0&&(z=ee[0]),ee=z.split(":"),ee&&ee.length>0&&(z=ee[0]),z}},{key:"os",get:function(){return xe.os}},{key:"browser",get:function(){var ve=xe.browser;return ve.name||(ve.name=ye()),ve}}]),le}();me.default=ge},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"get",value:function(ye,xe,ge,le,ve){var de;ge=ge||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(ce){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(ce){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(ce){}throw new Error("This browser does not support XMLHttpRequest.")}),de=new XMLHttpRequest,de.onreadystatechange=function(){de.readyState===4&&(de.status===200?xe(de.responseText):ge(de.responseText))};try{le===void 0&&(le=!0),de.open("GET",ye,le),ve&&(de.withCredentials=!0)}catch(ce){return void ge(ce)}try{de.send()}catch(ce){ge(ce)}}}]),he}();me.default=Le},function(Me,me,Be){"use strict";function ke(xe,ge){if(!(xe instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function xe(ge,le){for(var ve=0;ve<le.length;ve++){var de=le[ve];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ge,de.key,de)}}return function(ge,le,ve){return le&&xe(ge.prototype,le),ve&&xe(ge,ve),ge}}(),Le=Be(27),he=Be(30),ye=(Be(10),function(){function xe(){ke(this,xe)}return Ce(xe,null,[{key:"randomUUID",value:function(){for(var ge=[],le="0123456789abcdef",ve=0;ve<36;ve++)ge[ve]=le.substr(Math.floor(16*Math.random()),1);return ge[14]="4",ge[19]=le.substr(3&ge[19]|8,1),ge[8]=ge[13]=ge[18]=ge[23]="-",ge.join("")}},{key:"aliyunEncodeURI",value:function(ge){var le=encodeURIComponent(ge);return le=le.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(ge,le,ve){if(!ge)throw new Error("PrismPlayer Error: vid should not be null!");var de=[];for(var ce in ge)de.push(ce);for(var z=de.sort(),ee="",oe=z.length,ce=0;ce<oe;ce++){var ie=xe.aliyunEncodeURI(z[ce]),se=xe.aliyunEncodeURI(ge[z[ce]]);ee==""?ee=ie+le+se:ee+=ve+ie+le+se}return ee}},{key:"makeChangeSiga",value:function(ge,le){if(!ge)throw new Error("PrismPlayer Error: vid should not be null!");return he.stringify(Le("GET&"+xe.aliyunEncodeURI("/")+"&"+xe.aliyunEncodeURI(xe.makeUTF8sort(ge,"=","&")),le+"&"))}}]),xe}());me.default=ye},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return ke.enc.Utf8})},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return ke.enc.Hex})},function(Me,me,Be){Me.exports=Be(13)},function(Me,me,Be){"use strict";var ke,Ce,Le=Be(14),he=function(xe){return xe&&xe.__esModule?xe:{default:xe}}(Le),ye={Vod:he.default};ke=[],(Ce=function(){return ye}.apply(me,ke))!==void 0&&(Me.exports=Ce),window.AliyunUpload=ye,_n.exports=AliyunUpload},function(Me,me,Be){"use strict";function ke(Xe){return Xe&&Xe.__esModule?Xe:{default:Xe}}function Ce(Xe,Ge){if(!(Xe instanceof Ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function Xe(Ge,ft){for(var at=0;at<ft.length;at++){var Ct=ft[at];Ct.enumerable=Ct.enumerable||!1,Ct.configurable=!0,"value"in Ct&&(Ct.writable=!0),Object.defineProperty(Ge,Ct.key,Ct)}}return function(Ge,ft,at){return ft&&Xe(Ge.prototype,ft),at&&Xe(Ge,at),Ge}}(),he=Be(15),ye=Be(3),xe=Be(16),ge=ke(xe),le=Be(18),ve=ke(le),de=Be(24),ce=ke(de),z=Be(4),ee=ke(z),oe=Be(1),ie=ke(oe),se=Be(5),ue=ke(se),Se=Be(26),we=ke(Se),Pe=Be(31),Ae=ke(Pe),De=Be(32),ze=ke(De),Ze=(Be(2),function(){function Xe(Ge){Ce(this,Xe),this.options=Ge,this.options.partSize=this.options.partSize||ye.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||ye.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=he.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new ee.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=he.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return Le(Xe,[{key:"init",value:function(Ge,ft,at,Ct){return this._retryCount=0,!(at&&!Ct||!at&&Ct)&&!(Ge&&!ft||!Ge&&ft)&&(this._ossCreditor.accessKeyId=Ge,this._ossCreditor.accessKeySecret=ft,this._ossCreditor.securityToken=at,this._ossCreditor.expireTime=Ct,!0)}},{key:"addFile",value:function(Ge,ft,at,Ct,et,yt){if(!Ge)return!1;if(Ge.size==0)try{this.options.onUploadFailed({file:Ge},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(tt){console.log(tt)}for(var st=(this.options,0);st<this._uploadList.length;st++)if(this._uploadList[st].file==Ge)return!1;var zt=new Object;if(zt.file=Ge,zt._endpoint=ft,zt._bucket=at,zt._object=Ct,zt.state=he.UPLOADSTATE.INIT,zt.isImage=ie.default.isImage(Ge.name),!zt.isImage&&this.options.enableUploadProgress){var lt=this;ze.default.getMd5(Ge,function(tt){zt.fileHash=tt;var ut=lt._getCheckoutpoint(zt);lt.options.localCheckpoint||ut||lt._getCheckoutpointFromCloud(zt,function(mt){if(mt.UploadPoint){var Pt=JSON.parse(mt.UploadPoint);Pt.loaded!=1&&(zt.checkpoint=Pt.checkpoint,zt.loaded=Pt.loaded,zt.videoId=mt.VideoId,lt._saveCheckoutpoint(zt,Pt.checkpoint))}},function(mt){try{if((mt=JSON.parse(mt))&&mt.Code=="InvalidParameter"&&mt.Message.indexOf("UserId")>0){lt._invalidUserId=!0;var Pt=mt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(Pt)}}catch(gt){console.log(gt)}})})}et&&(zt.videoInfo=et?JSON.parse(et).Vod:{},zt.userData=ve.default.encode(et)),zt.ri=ue.default.create(),this._uploadList.push(zt),this._reportLog("20001",zt,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(zt)}catch(tt){console.log(tt)}return!0}},{key:"deleteFile",value:function(Ge){return!!this.cancelFile(Ge)&&(this._uploadList.splice(Ge,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(Ge){if(this.options,Ge<0||Ge>=this._uploadList.length)return!1;var ft=this._uploadList[Ge];if(Ge==this._curIndex&&ft.state==he.UPLOADSTATE.UPLOADING){ft.state=he.UPLOADSTATE.CANCELED;var at=this._getCheckoutpoint(ft);at&&at.checkpoint&&(at=at.checkpoint),at&&this._ossUpload.abort(ft),this._removeCheckoutpoint(ft),this.nextUpload()}else ft.state!=he.UPLOADSTATE.SUCCESS&&(ft.state=he.UPLOADSTATE.CANCELED);return this._reportLog("20008",ft),!0}},{key:"resumeFile",value:function(Ge){if(this.options,Ge<0||Ge>=this._uploadList.length)return!1;var ft=this._uploadList[Ge];return ft.state==he.UPLOADSTATE.CANCELED&&(ft.state=he.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(Ge){return this._getCheckoutpoint({file:Ge})}},{key:"startUpload",value:function(Ge){if(this._retryCount=0,this.options,this._state==he.VODSTATE.START||this._state==he.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=he.VODSTATE.END);var ft=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(ft),this._state=he.VODSTATE.START}},{key:"nextUpload",value:function(){var Ge=this.options;if(this._state==he.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var ft=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(ft)}else{this._state=he.VODSTATE.END;try{Ge.onUploadEnd&&Ge.onUploadEnd(ft)}catch(at){console.log(at)}}}},{key:"clear",value:function(Ge){for(var ft=this.options,at=0,Ct=0;Ct<this._uploadList.length;Ct++)ft.uploadList[Ct].state==he.UPLOADSTATE.SUCCESS&&at++,this._uploadList[Ct].state==Ge&&(ft.uploadList.splice(Ct,1),Ct--);ft.onClear&&ft.onClear(ft.uploadList.length,at)}},{key:"stopUpload",value:function(){if((this._state==he.VODSTATE.START||this._state==he.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var Ge=this._uploadList[this._curIndex];this._state=he.VODSTATE.STOP,Ge.state=he.UPLOADSTATE.STOPED,this._changeState(Ge,he.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(Ge){var ft=this;if(!Ge)return!1;var at=JSON.parse(ve.default.decode(Ge));return!!(at.AccessKeyId&&at.AccessKeySecret&&at.SecurityToken&&at.Expiration)&&ft.resumeUploadWithToken(at.AccessKeyId,at.AccessKeySecret,at.SecurityToken,at.Expiration)}},{key:"resumeUploadWithToken",value:function(Ge,ft,at,Ct){if(this.options,!(Ge&&ft&&at&&Ct)||this._state!=he.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var et="";return this._uploadList.length>this._curIndex&&(et=this._uploadList[this._curIndex]),et&&(this.init(Ge,ft,at,Ct),this._state=he.VODSTATE.START,this._ossUpload=null,this._uploadCore(et,et.retry),et.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(Ge,ft,at){if(this._curIndex==-1||this._state!=he.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var Ct=this._uploadList[this._curIndex];Ct.object?this._refreshSTSTokenUpload(Ct,Ge,ft,at):this.setSTSToken(Ct,Ge,ft,at)}}},{key:"setSTSTokenDirectlyUpload",value:function(Ge,ft,at,Ct,et){if(!(ft&&at&&Ct&&et))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var yt=Ge;this.init(ft,at,Ct,et),yt.endpoint=yt._endpoint,yt.bucket=yt._bucket,yt.object=yt._object,this._ossUpload=null,this._uploadCore(yt,Ge.retry),Ge.retry=!1}},{key:"setSTSToken",value:function(Ge,ft,at,Ct){if(!ft||!at||!Ct)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var et=Ge.videoInfo,yt={accessKeyId:ft,securityToken:Ct,accessKeySecret:at,fileName:Ge.file.name,title:et.Title,requestId:Ge.ri,region:this.options.region};et.ImageType&&(yt.imageType=et.ImageType),et.ImageExt&&(yt.imageExt=et.ImageExt),et.FileSize&&(yt.fileSize=et.FileSize),et.Description&&(yt.description=et.Description),et.CateId&&(yt.cateId=et.CateId),et.Tags&&(yt.tags=et.Tags),et.TemplateGroupId&&(yt.templateGroupId=et.TemplateGroupId),et.StorageLocation&&(yt.storageLocation=et.StorageLocation),et.CoverURL&&(yt.coverUrl=et.CoverURL),et.TransCodeMode&&(yt.transCodeMode=et.TransCodeMode),et.UserData&&(yt.userData=et.UserData);var st=this,zt="getUploadAuth";Ge.videoId?(yt.videoId=Ge.videoId,zt="refreshUploadAuth"):Ge.isImage&&(zt="getImageUploadAuth"),we.default[zt](yt,function(lt){Ge.videoId=lt.VideoId?lt.VideoId:Ge.videoId,st.setUploadAuthAndAddress(Ge,lt.UploadAuth,lt.UploadAddress),st._state=he.VODSTATE.START},function(lt){st._error(Ge,{name:lt.Code,code:lt.Code,message:lt.Message,requestId:lt.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(Ge,ft,at,Ct){if(!Ge||!ft||!at)return!1;var et=JSON.parse(ve.default.decode(ft));if(!(et.AccessKeyId&&et.AccessKeySecret&&et.SecurityToken&&et.Expiration))return console.error("uploadauth is invalid"),!1;var yt={},st=Ge;if(at){if(yt=JSON.parse(ve.default.decode(at)),!yt.Endpoint||!yt.Bucket||!yt.FileName)return console.error("uploadAddress is invalid"),!1}else yt.Endpoint=st.endpoint,yt.Bucket=st.bucket,yt.FileName=st.object;this._ut="vod",this._uploadWay="vod",this.options.region=et.Region||this.options.region,this.init(et.AccessKeyId,et.AccessKeySecret,et.SecurityToken,et.Expiration),st.endpoint=st._endpoint?st._endpoint:yt.Endpoint,st.bucket=st._bucket?st._bucket:yt.Bucket,st.object=st._object?st._object:yt.FileName,st.region=this.options.region,Ct&&(st.videoId=Ct),this._ossUpload=null,this._uploadCore(st,Ge.retry),Ge.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Ge,ft,at,Ct){if(!ft||!at||!Ct)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var et={accessKeyId:ft,securityToken:Ct,accessKeySecret:at,videoId:Ge.object,requestId:Ge.ri,region:this.options.region},yt=this,st="refreshUploadAuth";Ge.isImage&&(st="getImageUploadAuth"),we.default[st](et,function(zt){yt.setUploadAuthAndAddress(Ge,zt.UploadAuth,UploadAddress),yt._state=he.VODSTATE.START},function(zt){yt._error(Ge,{name:zt.Code,code:zt.Code,message:zt.Message,requestId:zt.RequestId})})}},{key:"_upload",value:function(Ge){var ft=arguments.length>1&&arguments[1]!==void 0&&arguments[1],at=this.options;if(Ge.retry=ft,at.onUploadstarted&&!ft)try{var Ct=this._getCheckoutpoint(Ge);Ct&&Ct.state!=he.UPLOADSTATE.UPLOADING&&(Ge.checkpoint=Ct,Ge.videoId=Ct.videoId),at.onUploadstarted(Ge)}catch(et){console.log(et)}}},{key:"_uploadCore",value:function(Ge){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(Ge.state=he.UPLOADSTATE.UPLOADING,!this._ossUpload){Ge.endpoint=Ge.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var ft=this;this._ossUpload=new ge.default({bucket:Ge.bucket,endpoint:Ge.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(lt,tt){ft._error.call(ft,lt,tt)},oncomplete:function(lt,tt){ft._complete.call(ft,lt,tt)},onprogress:function(lt,tt,ut){ft._progress.call(ft,lt,tt,ut)}})}var at=ie.default.getFileType(Ge.file.name),Ct=this._getCheckoutpoint(Ge),et="",yt="";Ct&&Ct.checkpoint&&(yt=Ct.state,et=Ct.videoId,Ct=Ct.checkpoint),Ct&&et==Ge.videoId&&yt!=he.UPLOADSTATE.UPLOADING&&(Ct.file=Ge.file,Ge.checkpoint=Ct,Ct.uploadId);var st=this._adjustPartSize(Ge);this._reportLog("20002",Ge,{ft:at,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,vid:Ge.videoId||"",fn:Ge.file.name,fw:null,fh:null,ps:st});var zt={headers:{"x-oss-notification":Ge.userData?Ge.userData:""},partSize:st,parallel:this.options.parallel};this._ossUpload.upload(Ge,zt)}},{key:"_findUploadIndex",value:function(){for(var Ge=-1,ft=0;ft<this._uploadList.length;ft++)if(this._uploadList[ft].state==he.UPLOADSTATE.INIT){Ge=ft;break}return Ge}},{key:"_error",value:function(Ge,ft){if(ft.name=="cancel")try{this.options.onUploadCanceled(Ge,ft)}catch(Ct){console.log(Ct)}else{if(ft.message.indexOf("InvalidAccessKeyIdError")>0||ft.name=="SignatureDoesNotMatchError"||ft.code=="SecurityTokenExpired"||ft.code=="InvalidSecurityToken.Expired"||ft.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=he.VODSTATE.EXPIRE,Ge.state=he.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(Ge,ft)}catch(Ct){console.log(Ct)}}return}if((ft.name=="RequestTimeoutError"||ft.name=="ConnectionTimeout"||ft.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var at=this;return setTimeout(function(){at._uploadCore(Ge,!0)},1e3*at._retryDuration),void this._retryCount++}ft.name=="NoSuchUploadError"&&this._removeCheckoutpoint(Ge),this._handleError(Ge,ft)}}},{key:"_handleError",value:function(Ge,ft){var at=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],Ct=he.UPLOADSTATE.FAIlURE;if(Ge.state!=he.UPLOADSTATE.CANCELED&&(Ge.state=he.UPLOADSTATE.FAIlURE,this._state=he.VODSTATE.FAILURE,this.options.onUploadFailed&&ft&&ft.code&&ft.message))try{this.options.onUploadFailed(Ge,ft.code,ft.message)}catch(yt){console.log(yt)}if(at&&this._changeState(Ge,Ct),this._reportLog("20006",Ge,{code:ft.name,message:ft.message,requestId:ft.requestId,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,fn:Ge.file.name}),this._reportLog("20004",Ge,{requestId:ft.requestId,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,fn:Ge.file.name}),Ge.ri=ue.default.create(),this._findUploadIndex()!=-1){var et=this;this._state=he.VODSTATE.START,setTimeout(function(){et.nextUpload()},100)}}},{key:"_complete",value:function(Ge,ft){if(Ge.state=he.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Ge)}catch(et){console.log(et)}var at=0;ft&&ft.res&&ft.res.headers&&(at=ft.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(Ge);var Ct=this;setTimeout(function(){Ct.nextUpload()},100),this._retryCount=0,this._reportLog("20003",Ge,{requestId:at})}},{key:"_progress",value:function(Ge,ft,at){if(this.options.onUploadProgress)try{Ge.loaded=ft.loaded,this.options.onUploadProgress(Ge,ft.total,ft.loaded)}catch(tt){console.log(tt)}var Ct=ft.checkpoint,et=0;Ct&&(Ge.checkpoint=Ct,this._saveCheckoutpoint(Ge,Ct,he.UPLOADSTATE.UPLOADING),et=Ct.uploadId),this._retryCount=0;var yt=this._getPortNumber(Ct),st=0;if(at&&at.headers&&(st=at.headers["x-oss-request-id"]),ft.loaded!=0&&this._reportLog("20007",Ge,{pn:yt,requestId:st}),ft.loaded!=1&&this._reportLog("20005",Ge,{UploadId:et,pn:yt+1,pr:Ge.retry?1:0,fs:Ge.file.size,bu:Ge.bucket,ok:Ge.object,fn:Ge.file.name}),!this._invalidUserId&&!Ge.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var zt={file:Ge.file,checkpoint:ft,userId:this.options.userId,videoId:Ge.videoId,region:this.options.region,fileHash:Ge.fileHash};try{var lt=this;Ae.default.upload(zt,function(){},function(tt){if((tt=JSON.parse(tt))&&tt.Code=="InvalidParameter"&&tt.Message.indexOf("UserId")>0){lt._invalidUserId=!0;var ut=tt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ut)}})}catch(tt){console.log(tt)}}}},{key:"_getPortNumber",value:function(Ge){if(Ge){var ft=Ge.doneParts;if(ft&&ft.length>0)return ft[ft.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(Ge){var ft=this._getCheckoutpointKey(Ge);ce.default.remove(ft)}},{key:"_getCheckoutpoint",value:function(Ge){var ft=this._getCheckoutpointKey(Ge),at=ce.default.get(ft);if(at)try{return JSON.parse(at)}catch(Ct){}return""}},{key:"_saveCheckoutpoint",value:function(Ge,ft,at){if(ft){var Ct=this._getCheckoutpointKey(Ge),et=Ge.file,yt={fileName:et.name,lastModified:et.lastModified,size:et.size,object:Ge.object,videoId:Ge.videoId,bucket:Ge.bucket,endpoint:Ge.endpoint,checkpoint:ft,loaded:Ge.loaded,state:at};ce.default.set(Ct,JSON.stringify(yt))}}},{key:"_changeState",value:function(Ge,ft){var at=this._getCheckoutpoint(Ge);at&&((this._onbeforeunload=!0)&&(ft=he.UPLOADSTATE.STOPED),this._saveCheckoutpoint(Ge,at.checkpoint,ft))}},{key:"_getCheckoutpointKey",value:function(Ge){return"upload_"+Ge.file.lastModified+"_"+Ge.file.name+"_"+Ge.file.size}},{key:"_getCheckoutpointFromCloud",value:function(Ge,ft,at){var Ct={userId:this.options.userId,uploadInfoList:[{FileName:Ge.file.name,FileSize:Ge.file.size,FileCreateTime:Ge.file.lastModified,FileHash:Ge.fileHash}],region:this.options.region};Ae.default.get(Ct,function(et){ft(et)},at)}},{key:"_reportLog",value:function(Ge,ft,at){at||(at={}),at.ri=ft.ri,this._ut&&(at.ut=this._ut),this._log.log(Ge,at)}},{key:"_initEvent",value:function(){var Ge=this;window&&(window.onbeforeunload=function(ft){if(Ge._onbeforeunload=!0,Ge._curIndex!=-1&&Ge._uploadList.length>Ge._curIndex){var at=Ge._uploadList[Ge._curIndex];Ge._changeState(at,he.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var Ge=0;Ge<this._uploadList.length;Ge++){var ft=this._uploadList[Ge];ft.state!=he.UPLOADSTATE.FAIlURE&&ft.state!=he.UPLOADSTATE.STOPED||(ft.state=he.UPLOADSTATE.INIT)}this._state=he.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(Ge){return Ge.file.size/this.options.partSize>1e4?Ge.file.size/9999:this.options.partSize}}]),Xe}());me.default=Ze},function(Me,me,Be){"use strict";Object.defineProperty(me,"__esModule",{value:!0}),me.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},me.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(Me,me,Be){"use strict";function ke(le){return le&&le.__esModule?le:{default:le}}function Ce(le,ve){if(!(le instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function le(ve,de){for(var ce=0;ce<de.length;ce++){var z=de[ce];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ve,z.key,z)}}return function(ve,de,ce){return de&&le(ve.prototype,de),ce&&le(ve,ce),ve}}(),he=Be(3),ye=Be(17),xe=(ke(ye),Be(1)),ge=(ke(xe),function(){function le(ve,de){if(Ce(this,le),ve){this._config=ve,this.create(this._config),this._uploadInfo=null,this._callback={};var ce=function(){};this._callback.onerror=de.onerror||ce,this._callback.oncomplete=de.oncomplete||ce,this._callback.onprogress=de.onprogress||ce}}return Le(le,[{key:"create",value:function(ve){if(ve.endpoint=ve.endpoint||this._config.endpoint,ve.bucket=ve.bucket||this._config.bucket,!(ve.AccessKeyId&&ve.AccessKeySecret&&ve.endpoint&&ve.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var de={accessKeyId:ve.AccessKeyId,accessKeySecret:ve.AccessKeySecret,stsToken:ve.SecurityToken,endpoint:ve.endpoint||this._config.endpoint,bucket:ve.bucket||this._config.bucket,secure:!0,cname:ve.cname};ve.timeout&&(de.timeout=ve.timeout),this.oss=new OSS.Wrapper(de)}},{key:"abort",value:function(ve){if(ve.checkpoint){var de=ve.checkpoint.uploadId;this.oss.abortMultipartUpload(ve.object,de)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(ve,de){this._uploadInfo=ve;var ce=this,z=function(oe,ie,se){return function(ue){ce._progress(oe,ie,se),ue()}},ee={parallel:de.parallel||this._config.parallel||he.UPLOADDEFAULT.PARALLEL,partSize:de.partSize||this._config.partSize||he.UPLOADDEFAULT.PARTSIZE,progress:z};de.headers&&(ee.headers=de.headers),ve.checkpoint&&(ee.checkpoint=ve.checkpoint),ve.bucket||(this.oss.options.bucket=ve.bucket),ve.endpoint||(this.oss.options.endpoint=ve.endpoint),this.oss.multipartUpload(ve.object,ve.file,ee).then(function(oe,ie){ce._complete(oe)}).catch(function(oe){ce.oss.cancel&&(ce.oss&&ce.oss.isCancel()?console.log("oss is cancel as error"):ce.oss.cancel()),ce._error(oe)})}},{key:"header",value:function(ve,de,ce){this.oss.get(ve.object).then(function(z){de(z)}).catch(function(z){ce(z)})}},{key:"_progress",value:function(ve,de,ce){this._callback.onprogress(this._uploadInfo,{loaded:ve,total:this._uploadInfo.file.size,checkpoint:de},ce)}},{key:"_error",value:function(ve){this._callback.onerror(this._uploadInfo,ve)}},{key:"_complete",value:function(ve){this._callback.oncomplete(this._uploadInfo,ve)}}]),le}());me.default=ge},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"format",value:function(ye){if(arguments.length<2)return null;for(var xe=arguments[1],ge=1;ge<arguments.length;ge++){var le=new RegExp("\\{"+(ge-1)+"\\}","gm");xe=xe.replace(le,arguments[ge+1])}return{code:ye,message:xe}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),he}();me.default=Le},function(Me,me,Be){"use strict";(function(ke){function Ce(ye,xe){if(!(ye instanceof xe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function ye(xe,ge){for(var le=0;le<ge.length;le++){var ve=ge[le];ve.enumerable=ve.enumerable||!1,ve.configurable=!0,"value"in ve&&(ve.writable=!0),Object.defineProperty(xe,ve.key,ve)}}return function(xe,ge,le){return ge&&ye(xe.prototype,ge),le&&ye(xe,le),xe}}(),he=function(){function ye(){Ce(this,ye)}return Le(ye,null,[{key:"encode",value:function(xe){return new ke(xe).toString("base64")}},{key:"decode",value:function(xe){return new ke(xe,"base64").toString()}}]),ye}();me.default=he}).call(me,Be(19).Buffer)},function(Me,me,Be){"use strict";(function(ke){function Ce(){return he.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Le(nt,He){if(Ce()<He)throw new RangeError("Invalid typed array length");return he.TYPED_ARRAY_SUPPORT?(nt=new Uint8Array(He),nt.__proto__=he.prototype):(nt===null&&(nt=new he(He)),nt.length=He),nt}function he(nt,He,Ie){if(!(he.TYPED_ARRAY_SUPPORT||this instanceof he))return new he(nt,He,Ie);if(typeof nt=="number"){if(typeof He=="string")throw new Error("If encoding is specified then the first argument must be a string");return le(this,nt)}return ye(this,nt,He,Ie)}function ye(nt,He,Ie,We){if(typeof He=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&He instanceof ArrayBuffer?ce(nt,He,Ie,We):typeof He=="string"?ve(nt,He,Ie):z(nt,He)}function xe(nt){if(typeof nt!="number")throw new TypeError('"size" argument must be a number');if(nt<0)throw new RangeError('"size" argument must not be negative')}function ge(nt,He,Ie,We){return xe(He),He<=0?Le(nt,He):Ie!==void 0?typeof We=="string"?Le(nt,He).fill(Ie,We):Le(nt,He).fill(Ie):Le(nt,He)}function le(nt,He){if(xe(He),nt=Le(nt,He<0?0:0|ee(He)),!he.TYPED_ARRAY_SUPPORT)for(var Ie=0;Ie<He;++Ie)nt[Ie]=0;return nt}function ve(nt,He,Ie){if(typeof Ie=="string"&&Ie!==""||(Ie="utf8"),!he.isEncoding(Ie))throw new TypeError('"encoding" must be a valid string encoding');var We=0|ie(He,Ie);nt=Le(nt,We);var Oe=nt.write(He,Ie);return Oe!==We&&(nt=nt.slice(0,Oe)),nt}function de(nt,He){var Ie=He.length<0?0:0|ee(He.length);nt=Le(nt,Ie);for(var We=0;We<Ie;We+=1)nt[We]=255&He[We];return nt}function ce(nt,He,Ie,We){if(He.byteLength,Ie<0||He.byteLength<Ie)throw new RangeError("'offset' is out of bounds");if(He.byteLength<Ie+(We||0))throw new RangeError("'length' is out of bounds");return He=Ie===void 0&&We===void 0?new Uint8Array(He):We===void 0?new Uint8Array(He,Ie):new Uint8Array(He,Ie,We),he.TYPED_ARRAY_SUPPORT?(nt=He,nt.__proto__=he.prototype):nt=de(nt,He),nt}function z(nt,He){if(he.isBuffer(He)){var Ie=0|ee(He.length);return nt=Le(nt,Ie),nt.length===0||He.copy(nt,0,0,Ie),nt}if(He){if(typeof ArrayBuffer!="undefined"&&He.buffer instanceof ArrayBuffer||"length"in He)return typeof He.length!="number"||Yt(He.length)?Le(nt,0):de(nt,He);if(He.type==="Buffer"&&Bt(He.data))return de(nt,He.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ee(nt){if(nt>=Ce())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ce().toString(16)+" bytes");return 0|nt}function oe(nt){return+nt!=nt&&(nt=0),he.alloc(+nt)}function ie(nt,He){if(he.isBuffer(nt))return nt.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(nt)||nt instanceof ArrayBuffer))return nt.byteLength;typeof nt!="string"&&(nt=""+nt);var Ie=nt.length;if(Ie===0)return 0;for(var We=!1;;)switch(He){case"ascii":case"latin1":case"binary":return Ie;case"utf8":case"utf-8":case void 0:return Qt(nt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ie;case"hex":return Ie>>>1;case"base64":return Kt(nt).length;default:if(We)return Qt(nt).length;He=(""+He).toLowerCase(),We=!0}}function se(nt,He,Ie){var We=!1;if((He===void 0||He<0)&&(He=0),He>this.length||((Ie===void 0||Ie>this.length)&&(Ie=this.length),Ie<=0)||(Ie>>>=0,He>>>=0,Ie<=He))return"";for(nt||(nt="utf8");;)switch(nt){case"hex":return yt(this,He,Ie);case"utf8":case"utf-8":return ft(this,He,Ie);case"ascii":return Ct(this,He,Ie);case"latin1":case"binary":return et(this,He,Ie);case"base64":return Ge(this,He,Ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,He,Ie);default:if(We)throw new TypeError("Unknown encoding: "+nt);nt=(nt+"").toLowerCase(),We=!0}}function ue(nt,He,Ie){var We=nt[He];nt[He]=nt[Ie],nt[Ie]=We}function Se(nt,He,Ie,We,Oe){if(nt.length===0)return-1;if(typeof Ie=="string"?(We=Ie,Ie=0):Ie>2147483647?Ie=2147483647:Ie<-2147483648&&(Ie=-2147483648),Ie=+Ie,isNaN(Ie)&&(Ie=Oe?0:nt.length-1),Ie<0&&(Ie=nt.length+Ie),Ie>=nt.length){if(Oe)return-1;Ie=nt.length-1}else if(Ie<0){if(!Oe)return-1;Ie=0}if(typeof He=="string"&&(He=he.from(He,We)),he.isBuffer(He))return He.length===0?-1:we(nt,He,Ie,We,Oe);if(typeof He=="number")return He&=255,he.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Oe?Uint8Array.prototype.indexOf.call(nt,He,Ie):Uint8Array.prototype.lastIndexOf.call(nt,He,Ie):we(nt,[He],Ie,We,Oe);throw new TypeError("val must be string, number or Buffer")}function we(nt,He,Ie,We,Oe){function be(ln,gn){return Ne===1?ln[gn]:ln.readUInt16BE(gn*Ne)}var Ne=1,$e=nt.length,dt=He.length;if(We!==void 0&&((We=String(We).toLowerCase())==="ucs2"||We==="ucs-2"||We==="utf16le"||We==="utf-16le")){if(nt.length<2||He.length<2)return-1;Ne=2,$e/=2,dt/=2,Ie/=2}var Je;if(Oe){var At=-1;for(Je=Ie;Je<$e;Je++)if(be(nt,Je)===be(He,At===-1?0:Je-At)){if(At===-1&&(At=Je),Je-At+1===dt)return At*Ne}else At!==-1&&(Je-=Je-At),At=-1}else for(Ie+dt>$e&&(Ie=$e-dt),Je=Ie;Je>=0;Je--){for(var tn=!0,pn=0;pn<dt;pn++)if(be(nt,Je+pn)!==be(He,pn)){tn=!1;break}if(tn)return Je}return-1}function Pe(nt,He,Ie,We){Ie=Number(Ie)||0;var Oe=nt.length-Ie;We?(We=Number(We))>Oe&&(We=Oe):We=Oe;var be=He.length;if(be%2!=0)throw new TypeError("Invalid hex string");We>be/2&&(We=be/2);for(var Ne=0;Ne<We;++Ne){var $e=parseInt(He.substr(2*Ne,2),16);if(isNaN($e))return Ne;nt[Ie+Ne]=$e}return Ne}function Ae(nt,He,Ie,We){return Jt(Qt(He,nt.length-Ie),nt,Ie,We)}function De(nt,He,Ie,We){return Jt(bn(He),nt,Ie,We)}function ze(nt,He,Ie,We){return De(nt,He,Ie,We)}function Ze(nt,He,Ie,We){return Jt(Kt(He),nt,Ie,We)}function Xe(nt,He,Ie,We){return Jt(Wt(He,nt.length-Ie),nt,Ie,We)}function Ge(nt,He,Ie){return He===0&&Ie===nt.length?kt.fromByteArray(nt):kt.fromByteArray(nt.slice(He,Ie))}function ft(nt,He,Ie){Ie=Math.min(nt.length,Ie);for(var We=[],Oe=He;Oe<Ie;){var be=nt[Oe],Ne=null,$e=be>239?4:be>223?3:be>191?2:1;if(Oe+$e<=Ie){var dt,Je,At,tn;switch($e){case 1:be<128&&(Ne=be);break;case 2:dt=nt[Oe+1],(192&dt)==128&&(tn=(31&be)<<6|63&dt)>127&&(Ne=tn);break;case 3:dt=nt[Oe+1],Je=nt[Oe+2],(192&dt)==128&&(192&Je)==128&&(tn=(15&be)<<12|(63&dt)<<6|63&Je)>2047&&(tn<55296||tn>57343)&&(Ne=tn);break;case 4:dt=nt[Oe+1],Je=nt[Oe+2],At=nt[Oe+3],(192&dt)==128&&(192&Je)==128&&(192&At)==128&&(tn=(15&be)<<18|(63&dt)<<12|(63&Je)<<6|63&At)>65535&&tn<1114112&&(Ne=tn)}}Ne===null?(Ne=65533,$e=1):Ne>65535&&(Ne-=65536,We.push(Ne>>>10&1023|55296),Ne=56320|1023&Ne),We.push(Ne),Oe+=$e}return at(We)}function at(nt){var He=nt.length;if(He<=xt)return String.fromCharCode.apply(String,nt);for(var Ie="",We=0;We<He;)Ie+=String.fromCharCode.apply(String,nt.slice(We,We+=xt));return Ie}function Ct(nt,He,Ie){var We="";Ie=Math.min(nt.length,Ie);for(var Oe=He;Oe<Ie;++Oe)We+=String.fromCharCode(127&nt[Oe]);return We}function et(nt,He,Ie){var We="";Ie=Math.min(nt.length,Ie);for(var Oe=He;Oe<Ie;++Oe)We+=String.fromCharCode(nt[Oe]);return We}function yt(nt,He,Ie){var We=nt.length;(!He||He<0)&&(He=0),(!Ie||Ie<0||Ie>We)&&(Ie=We);for(var Oe="",be=He;be<Ie;++be)Oe+=hn(nt[be]);return Oe}function st(nt,He,Ie){for(var We=nt.slice(He,Ie),Oe="",be=0;be<We.length;be+=2)Oe+=String.fromCharCode(We[be]+256*We[be+1]);return Oe}function zt(nt,He,Ie){if(nt%1!=0||nt<0)throw new RangeError("offset is not uint");if(nt+He>Ie)throw new RangeError("Trying to access beyond buffer length")}function lt(nt,He,Ie,We,Oe,be){if(!he.isBuffer(nt))throw new TypeError('"buffer" argument must be a Buffer instance');if(He>Oe||He<be)throw new RangeError('"value" argument is out of bounds');if(Ie+We>nt.length)throw new RangeError("Index out of range")}function tt(nt,He,Ie,We){He<0&&(He=65535+He+1);for(var Oe=0,be=Math.min(nt.length-Ie,2);Oe<be;++Oe)nt[Ie+Oe]=(He&255<<8*(We?Oe:1-Oe))>>>8*(We?Oe:1-Oe)}function ut(nt,He,Ie,We){He<0&&(He=4294967295+He+1);for(var Oe=0,be=Math.min(nt.length-Ie,4);Oe<be;++Oe)nt[Ie+Oe]=He>>>8*(We?Oe:3-Oe)&255}function mt(nt,He,Ie,We,Oe,be){if(Ie+We>nt.length)throw new RangeError("Index out of range");if(Ie<0)throw new RangeError("Index out of range")}function Pt(nt,He,Ie,We,Oe){return Oe||mt(nt,He,Ie,4,34028234663852886e22,-34028234663852886e22),pt.write(nt,He,Ie,We,23,4),Ie+4}function gt(nt,He,Ie,We,Oe){return Oe||mt(nt,He,Ie,8,17976931348623157e292,-17976931348623157e292),pt.write(nt,He,Ie,We,52,8),Ie+8}function Ft(nt){if(nt=Ht(nt).replace(vt,""),nt.length<2)return"";for(;nt.length%4!=0;)nt+="=";return nt}function Ht(nt){return nt.trim?nt.trim():nt.replace(/^\s+|\s+$/g,"")}function hn(nt){return nt<16?"0"+nt.toString(16):nt.toString(16)}function Qt(nt,He){He=He||1/0;for(var Ie,We=nt.length,Oe=null,be=[],Ne=0;Ne<We;++Ne){if((Ie=nt.charCodeAt(Ne))>55295&&Ie<57344){if(!Oe){if(Ie>56319){(He-=3)>-1&&be.push(239,191,189);continue}if(Ne+1===We){(He-=3)>-1&&be.push(239,191,189);continue}Oe=Ie;continue}if(Ie<56320){(He-=3)>-1&&be.push(239,191,189),Oe=Ie;continue}Ie=65536+(Oe-55296<<10|Ie-56320)}else Oe&&(He-=3)>-1&&be.push(239,191,189);if(Oe=null,Ie<128){if((He-=1)<0)break;be.push(Ie)}else if(Ie<2048){if((He-=2)<0)break;be.push(Ie>>6|192,63&Ie|128)}else if(Ie<65536){if((He-=3)<0)break;be.push(Ie>>12|224,Ie>>6&63|128,63&Ie|128)}else{if(!(Ie<1114112))throw new Error("Invalid code point");if((He-=4)<0)break;be.push(Ie>>18|240,Ie>>12&63|128,Ie>>6&63|128,63&Ie|128)}}return be}function bn(nt){for(var He=[],Ie=0;Ie<nt.length;++Ie)He.push(255&nt.charCodeAt(Ie));return He}function Wt(nt,He){for(var Ie,We,Oe,be=[],Ne=0;Ne<nt.length&&!((He-=2)<0);++Ne)Ie=nt.charCodeAt(Ne),We=Ie>>8,Oe=Ie%256,be.push(Oe),be.push(We);return be}function Kt(nt){return kt.toByteArray(Ft(nt))}function Jt(nt,He,Ie,We){for(var Oe=0;Oe<We&&!(Oe+Ie>=He.length||Oe>=nt.length);++Oe)He[Oe+Ie]=nt[Oe];return Oe}function Yt(nt){return nt!==nt}var kt=Be(21),pt=Be(22),Bt=Be(23);me.Buffer=he,me.SlowBuffer=oe,me.INSPECT_MAX_BYTES=50,he.TYPED_ARRAY_SUPPORT=ke.TYPED_ARRAY_SUPPORT!==void 0?ke.TYPED_ARRAY_SUPPORT:function(){try{var nt=new Uint8Array(1);return nt.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},nt.foo()===42&&typeof nt.subarray=="function"&&nt.subarray(1,1).byteLength===0}catch(He){return!1}}(),me.kMaxLength=Ce(),he.poolSize=8192,he._augment=function(nt){return nt.__proto__=he.prototype,nt},he.from=function(nt,He,Ie){return ye(null,nt,He,Ie)},he.TYPED_ARRAY_SUPPORT&&(he.prototype.__proto__=Uint8Array.prototype,he.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&he[Symbol.species]===he&&Object.defineProperty(he,Symbol.species,{value:null,configurable:!0})),he.alloc=function(nt,He,Ie){return ge(null,nt,He,Ie)},he.allocUnsafe=function(nt){return le(null,nt)},he.allocUnsafeSlow=function(nt){return le(null,nt)},he.isBuffer=function(nt){return!(nt==null||!nt._isBuffer)},he.compare=function(nt,He){if(!he.isBuffer(nt)||!he.isBuffer(He))throw new TypeError("Arguments must be Buffers");if(nt===He)return 0;for(var Ie=nt.length,We=He.length,Oe=0,be=Math.min(Ie,We);Oe<be;++Oe)if(nt[Oe]!==He[Oe]){Ie=nt[Oe],We=He[Oe];break}return Ie<We?-1:We<Ie?1:0},he.isEncoding=function(nt){switch(String(nt).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},he.concat=function(nt,He){if(!Bt(nt))throw new TypeError('"list" argument must be an Array of Buffers');if(nt.length===0)return he.alloc(0);var Ie;if(He===void 0)for(He=0,Ie=0;Ie<nt.length;++Ie)He+=nt[Ie].length;var We=he.allocUnsafe(He),Oe=0;for(Ie=0;Ie<nt.length;++Ie){var be=nt[Ie];if(!he.isBuffer(be))throw new TypeError('"list" argument must be an Array of Buffers');be.copy(We,Oe),Oe+=be.length}return We},he.byteLength=ie,he.prototype._isBuffer=!0,he.prototype.swap16=function(){var nt=this.length;if(nt%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var He=0;He<nt;He+=2)ue(this,He,He+1);return this},he.prototype.swap32=function(){var nt=this.length;if(nt%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var He=0;He<nt;He+=4)ue(this,He,He+3),ue(this,He+1,He+2);return this},he.prototype.swap64=function(){var nt=this.length;if(nt%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var He=0;He<nt;He+=8)ue(this,He,He+7),ue(this,He+1,He+6),ue(this,He+2,He+5),ue(this,He+3,He+4);return this},he.prototype.toString=function(){var nt=0|this.length;return nt===0?"":arguments.length===0?ft(this,0,nt):se.apply(this,arguments)},he.prototype.equals=function(nt){if(!he.isBuffer(nt))throw new TypeError("Argument must be a Buffer");return this===nt||he.compare(this,nt)===0},he.prototype.inspect=function(){var nt="",He=me.INSPECT_MAX_BYTES;return this.length>0&&(nt=this.toString("hex",0,He).match(/.{2}/g).join(" "),this.length>He&&(nt+=" ... ")),"<Buffer "+nt+">"},he.prototype.compare=function(nt,He,Ie,We,Oe){if(!he.isBuffer(nt))throw new TypeError("Argument must be a Buffer");if(He===void 0&&(He=0),Ie===void 0&&(Ie=nt?nt.length:0),We===void 0&&(We=0),Oe===void 0&&(Oe=this.length),He<0||Ie>nt.length||We<0||Oe>this.length)throw new RangeError("out of range index");if(We>=Oe&&He>=Ie)return 0;if(We>=Oe)return-1;if(He>=Ie)return 1;if(He>>>=0,Ie>>>=0,We>>>=0,Oe>>>=0,this===nt)return 0;for(var be=Oe-We,Ne=Ie-He,$e=Math.min(be,Ne),dt=this.slice(We,Oe),Je=nt.slice(He,Ie),At=0;At<$e;++At)if(dt[At]!==Je[At]){be=dt[At],Ne=Je[At];break}return be<Ne?-1:Ne<be?1:0},he.prototype.includes=function(nt,He,Ie){return this.indexOf(nt,He,Ie)!==-1},he.prototype.indexOf=function(nt,He,Ie){return Se(this,nt,He,Ie,!0)},he.prototype.lastIndexOf=function(nt,He,Ie){return Se(this,nt,He,Ie,!1)},he.prototype.write=function(nt,He,Ie,We){if(He===void 0)We="utf8",Ie=this.length,He=0;else if(Ie===void 0&&typeof He=="string")We=He,Ie=this.length,He=0;else{if(!isFinite(He))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");He|=0,isFinite(Ie)?(Ie|=0,We===void 0&&(We="utf8")):(We=Ie,Ie=void 0)}var Oe=this.length-He;if((Ie===void 0||Ie>Oe)&&(Ie=Oe),nt.length>0&&(Ie<0||He<0)||He>this.length)throw new RangeError("Attempt to write outside buffer bounds");We||(We="utf8");for(var be=!1;;)switch(We){case"hex":return Pe(this,nt,He,Ie);case"utf8":case"utf-8":return Ae(this,nt,He,Ie);case"ascii":return De(this,nt,He,Ie);case"latin1":case"binary":return ze(this,nt,He,Ie);case"base64":return Ze(this,nt,He,Ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xe(this,nt,He,Ie);default:if(be)throw new TypeError("Unknown encoding: "+We);We=(""+We).toLowerCase(),be=!0}},he.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var xt=4096;he.prototype.slice=function(nt,He){var Ie=this.length;nt=~~nt,He=He===void 0?Ie:~~He,nt<0?(nt+=Ie)<0&&(nt=0):nt>Ie&&(nt=Ie),He<0?(He+=Ie)<0&&(He=0):He>Ie&&(He=Ie),He<nt&&(He=nt);var We;if(he.TYPED_ARRAY_SUPPORT)We=this.subarray(nt,He),We.__proto__=he.prototype;else{var Oe=He-nt;We=new he(Oe,void 0);for(var be=0;be<Oe;++be)We[be]=this[be+nt]}return We},he.prototype.readUIntLE=function(nt,He,Ie){nt|=0,He|=0,Ie||zt(nt,He,this.length);for(var We=this[nt],Oe=1,be=0;++be<He&&(Oe*=256);)We+=this[nt+be]*Oe;return We},he.prototype.readUIntBE=function(nt,He,Ie){nt|=0,He|=0,Ie||zt(nt,He,this.length);for(var We=this[nt+--He],Oe=1;He>0&&(Oe*=256);)We+=this[nt+--He]*Oe;return We},he.prototype.readUInt8=function(nt,He){return He||zt(nt,1,this.length),this[nt]},he.prototype.readUInt16LE=function(nt,He){return He||zt(nt,2,this.length),this[nt]|this[nt+1]<<8},he.prototype.readUInt16BE=function(nt,He){return He||zt(nt,2,this.length),this[nt]<<8|this[nt+1]},he.prototype.readUInt32LE=function(nt,He){return He||zt(nt,4,this.length),(this[nt]|this[nt+1]<<8|this[nt+2]<<16)+16777216*this[nt+3]},he.prototype.readUInt32BE=function(nt,He){return He||zt(nt,4,this.length),16777216*this[nt]+(this[nt+1]<<16|this[nt+2]<<8|this[nt+3])},he.prototype.readIntLE=function(nt,He,Ie){nt|=0,He|=0,Ie||zt(nt,He,this.length);for(var We=this[nt],Oe=1,be=0;++be<He&&(Oe*=256);)We+=this[nt+be]*Oe;return Oe*=128,We>=Oe&&(We-=Math.pow(2,8*He)),We},he.prototype.readIntBE=function(nt,He,Ie){nt|=0,He|=0,Ie||zt(nt,He,this.length);for(var We=He,Oe=1,be=this[nt+--We];We>0&&(Oe*=256);)be+=this[nt+--We]*Oe;return Oe*=128,be>=Oe&&(be-=Math.pow(2,8*He)),be},he.prototype.readInt8=function(nt,He){return He||zt(nt,1,this.length),128&this[nt]?-1*(255-this[nt]+1):this[nt]},he.prototype.readInt16LE=function(nt,He){He||zt(nt,2,this.length);var Ie=this[nt]|this[nt+1]<<8;return 32768&Ie?4294901760|Ie:Ie},he.prototype.readInt16BE=function(nt,He){He||zt(nt,2,this.length);var Ie=this[nt+1]|this[nt]<<8;return 32768&Ie?4294901760|Ie:Ie},he.prototype.readInt32LE=function(nt,He){return He||zt(nt,4,this.length),this[nt]|this[nt+1]<<8|this[nt+2]<<16|this[nt+3]<<24},he.prototype.readInt32BE=function(nt,He){return He||zt(nt,4,this.length),this[nt]<<24|this[nt+1]<<16|this[nt+2]<<8|this[nt+3]},he.prototype.readFloatLE=function(nt,He){return He||zt(nt,4,this.length),pt.read(this,nt,!0,23,4)},he.prototype.readFloatBE=function(nt,He){return He||zt(nt,4,this.length),pt.read(this,nt,!1,23,4)},he.prototype.readDoubleLE=function(nt,He){return He||zt(nt,8,this.length),pt.read(this,nt,!0,52,8)},he.prototype.readDoubleBE=function(nt,He){return He||zt(nt,8,this.length),pt.read(this,nt,!1,52,8)},he.prototype.writeUIntLE=function(nt,He,Ie,We){nt=+nt,He|=0,Ie|=0,!We&<(this,nt,He,Ie,Math.pow(2,8*Ie)-1,0);var Oe=1,be=0;for(this[He]=255&nt;++be<Ie&&(Oe*=256);)this[He+be]=nt/Oe&255;return He+Ie},he.prototype.writeUIntBE=function(nt,He,Ie,We){nt=+nt,He|=0,Ie|=0,!We&<(this,nt,He,Ie,Math.pow(2,8*Ie)-1,0);var Oe=Ie-1,be=1;for(this[He+Oe]=255&nt;--Oe>=0&&(be*=256);)this[He+Oe]=nt/be&255;return He+Ie},he.prototype.writeUInt8=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,1,255,0),he.TYPED_ARRAY_SUPPORT||(nt=Math.floor(nt)),this[He]=255&nt,He+1},he.prototype.writeUInt16LE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,2,65535,0),he.TYPED_ARRAY_SUPPORT?(this[He]=255&nt,this[He+1]=nt>>>8):tt(this,nt,He,!0),He+2},he.prototype.writeUInt16BE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,2,65535,0),he.TYPED_ARRAY_SUPPORT?(this[He]=nt>>>8,this[He+1]=255&nt):tt(this,nt,He,!1),He+2},he.prototype.writeUInt32LE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,4,4294967295,0),he.TYPED_ARRAY_SUPPORT?(this[He+3]=nt>>>24,this[He+2]=nt>>>16,this[He+1]=nt>>>8,this[He]=255&nt):ut(this,nt,He,!0),He+4},he.prototype.writeUInt32BE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,4,4294967295,0),he.TYPED_ARRAY_SUPPORT?(this[He]=nt>>>24,this[He+1]=nt>>>16,this[He+2]=nt>>>8,this[He+3]=255&nt):ut(this,nt,He,!1),He+4},he.prototype.writeIntLE=function(nt,He,Ie,We){if(nt=+nt,He|=0,!We){var Oe=Math.pow(2,8*Ie-1);lt(this,nt,He,Ie,Oe-1,-Oe)}var be=0,Ne=1,$e=0;for(this[He]=255&nt;++be<Ie&&(Ne*=256);)nt<0&&$e===0&&this[He+be-1]!==0&&($e=1),this[He+be]=(nt/Ne>>0)-$e&255;return He+Ie},he.prototype.writeIntBE=function(nt,He,Ie,We){if(nt=+nt,He|=0,!We){var Oe=Math.pow(2,8*Ie-1);lt(this,nt,He,Ie,Oe-1,-Oe)}var be=Ie-1,Ne=1,$e=0;for(this[He+be]=255&nt;--be>=0&&(Ne*=256);)nt<0&&$e===0&&this[He+be+1]!==0&&($e=1),this[He+be]=(nt/Ne>>0)-$e&255;return He+Ie},he.prototype.writeInt8=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,1,127,-128),he.TYPED_ARRAY_SUPPORT||(nt=Math.floor(nt)),nt<0&&(nt=255+nt+1),this[He]=255&nt,He+1},he.prototype.writeInt16LE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,2,32767,-32768),he.TYPED_ARRAY_SUPPORT?(this[He]=255&nt,this[He+1]=nt>>>8):tt(this,nt,He,!0),He+2},he.prototype.writeInt16BE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,2,32767,-32768),he.TYPED_ARRAY_SUPPORT?(this[He]=nt>>>8,this[He+1]=255&nt):tt(this,nt,He,!1),He+2},he.prototype.writeInt32LE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,4,2147483647,-2147483648),he.TYPED_ARRAY_SUPPORT?(this[He]=255&nt,this[He+1]=nt>>>8,this[He+2]=nt>>>16,this[He+3]=nt>>>24):ut(this,nt,He,!0),He+4},he.prototype.writeInt32BE=function(nt,He,Ie){return nt=+nt,He|=0,Ie||lt(this,nt,He,4,2147483647,-2147483648),nt<0&&(nt=4294967295+nt+1),he.TYPED_ARRAY_SUPPORT?(this[He]=nt>>>24,this[He+1]=nt>>>16,this[He+2]=nt>>>8,this[He+3]=255&nt):ut(this,nt,He,!1),He+4},he.prototype.writeFloatLE=function(nt,He,Ie){return Pt(this,nt,He,!0,Ie)},he.prototype.writeFloatBE=function(nt,He,Ie){return Pt(this,nt,He,!1,Ie)},he.prototype.writeDoubleLE=function(nt,He,Ie){return gt(this,nt,He,!0,Ie)},he.prototype.writeDoubleBE=function(nt,He,Ie){return gt(this,nt,He,!1,Ie)},he.prototype.copy=function(nt,He,Ie,We){if(Ie||(Ie=0),We||We===0||(We=this.length),He>=nt.length&&(He=nt.length),He||(He=0),We>0&&We<Ie&&(We=Ie),We===Ie||nt.length===0||this.length===0)return 0;if(He<0)throw new RangeError("targetStart out of bounds");if(Ie<0||Ie>=this.length)throw new RangeError("sourceStart out of bounds");if(We<0)throw new RangeError("sourceEnd out of bounds");We>this.length&&(We=this.length),nt.length-He<We-Ie&&(We=nt.length-He+Ie);var Oe,be=We-Ie;if(this===nt&&Ie<He&&He<We)for(Oe=be-1;Oe>=0;--Oe)nt[Oe+He]=this[Oe+Ie];else if(be<1e3||!he.TYPED_ARRAY_SUPPORT)for(Oe=0;Oe<be;++Oe)nt[Oe+He]=this[Oe+Ie];else Uint8Array.prototype.set.call(nt,this.subarray(Ie,Ie+be),He);return be},he.prototype.fill=function(nt,He,Ie,We){if(typeof nt=="string"){if(typeof He=="string"?(We=He,He=0,Ie=this.length):typeof Ie=="string"&&(We=Ie,Ie=this.length),nt.length===1){var Oe=nt.charCodeAt(0);Oe<256&&(nt=Oe)}if(We!==void 0&&typeof We!="string")throw new TypeError("encoding must be a string");if(typeof We=="string"&&!he.isEncoding(We))throw new TypeError("Unknown encoding: "+We)}else typeof nt=="number"&&(nt&=255);if(He<0||this.length<He||this.length<Ie)throw new RangeError("Out of range index");if(Ie<=He)return this;He>>>=0,Ie=Ie===void 0?this.length:Ie>>>0,nt||(nt=0);var be;if(typeof nt=="number")for(be=He;be<Ie;++be)this[be]=nt;else{var Ne=he.isBuffer(nt)?nt:Qt(new he(nt,We).toString()),$e=Ne.length;for(be=0;be<Ie-He;++be)this[be+He]=Ne[be%$e]}return this};var vt=/[^+\/0-9A-Za-z-_]/g}).call(me,Be(20))},function(Me,me){var Be;Be=function(){return this}();try{Be=Be||Function("return this")()||(0,eval)("this")}catch(ke){typeof window=="object"&&(Be=window)}Me.exports=Be},function(Me,me,Be){"use strict";function ke(ee){var oe=ee.length;if(oe%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return ee[oe-2]==="="?2:ee[oe-1]==="="?1:0}function Ce(ee){return 3*ee.length/4-ke(ee)}function Le(ee){var oe,ie,se,ue,Se,we=ee.length;ue=ke(ee),Se=new ve(3*we/4-ue),ie=ue>0?we-4:we;var Pe=0;for(oe=0;oe<ie;oe+=4)se=le[ee.charCodeAt(oe)]<<18|le[ee.charCodeAt(oe+1)]<<12|le[ee.charCodeAt(oe+2)]<<6|le[ee.charCodeAt(oe+3)],Se[Pe++]=se>>16&255,Se[Pe++]=se>>8&255,Se[Pe++]=255&se;return ue===2?(se=le[ee.charCodeAt(oe)]<<2|le[ee.charCodeAt(oe+1)]>>4,Se[Pe++]=255&se):ue===1&&(se=le[ee.charCodeAt(oe)]<<10|le[ee.charCodeAt(oe+1)]<<4|le[ee.charCodeAt(oe+2)]>>2,Se[Pe++]=se>>8&255,Se[Pe++]=255&se),Se}function he(ee){return ge[ee>>18&63]+ge[ee>>12&63]+ge[ee>>6&63]+ge[63&ee]}function ye(ee,oe,ie){for(var se,ue=[],Se=oe;Se<ie;Se+=3)se=(ee[Se]<<16)+(ee[Se+1]<<8)+ee[Se+2],ue.push(he(se));return ue.join("")}function xe(ee){for(var oe,ie=ee.length,se=ie%3,ue="",Se=[],we=0,Pe=ie-se;we<Pe;we+=16383)Se.push(ye(ee,we,we+16383>Pe?Pe:we+16383));return se===1?(oe=ee[ie-1],ue+=ge[oe>>2],ue+=ge[oe<<4&63],ue+="=="):se===2&&(oe=(ee[ie-2]<<8)+ee[ie-1],ue+=ge[oe>>10],ue+=ge[oe>>4&63],ue+=ge[oe<<2&63],ue+="="),Se.push(ue),Se.join("")}me.byteLength=Ce,me.toByteArray=Le,me.fromByteArray=xe;for(var ge=[],le=[],ve=typeof Uint8Array!="undefined"?Uint8Array:Array,de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ce=0,z=de.length;ce<z;++ce)ge[ce]=de[ce],le[de.charCodeAt(ce)]=ce;le[45]=62,le[95]=63},function(Me,me){me.read=function(Be,ke,Ce,Le,he){var ye,xe,ge=8*he-Le-1,le=(1<<ge)-1,ve=le>>1,de=-7,ce=Ce?he-1:0,z=Ce?-1:1,ee=Be[ke+ce];for(ce+=z,ye=ee&(1<<-de)-1,ee>>=-de,de+=ge;de>0;ye=256*ye+Be[ke+ce],ce+=z,de-=8);for(xe=ye&(1<<-de)-1,ye>>=-de,de+=Le;de>0;xe=256*xe+Be[ke+ce],ce+=z,de-=8);if(ye===0)ye=1-ve;else{if(ye===le)return xe?NaN:1/0*(ee?-1:1);xe+=Math.pow(2,Le),ye-=ve}return(ee?-1:1)*xe*Math.pow(2,ye-Le)},me.write=function(Be,ke,Ce,Le,he,ye){var xe,ge,le,ve=8*ye-he-1,de=(1<<ve)-1,ce=de>>1,z=he===23?Math.pow(2,-24)-Math.pow(2,-77):0,ee=Le?0:ye-1,oe=Le?1:-1,ie=ke<0||ke===0&&1/ke<0?1:0;for(ke=Math.abs(ke),isNaN(ke)||ke===1/0?(ge=isNaN(ke)?1:0,xe=de):(xe=Math.floor(Math.log(ke)/Math.LN2),ke*(le=Math.pow(2,-xe))<1&&(xe--,le*=2),ke+=xe+ce>=1?z/le:z*Math.pow(2,1-ce),ke*le>=2&&(xe++,le/=2),xe+ce>=de?(ge=0,xe=de):xe+ce>=1?(ge=(ke*le-1)*Math.pow(2,he),xe+=ce):(ge=ke*Math.pow(2,ce-1)*Math.pow(2,he),xe=0));he>=8;Be[Ce+ee]=255&ge,ee+=oe,ge/=256,he-=8);for(xe=xe<<he|ge,ve+=he;ve>0;Be[Ce+ee]=255&xe,ee+=oe,xe/=256,ve-=8);Be[Ce+ee-oe]|=128*ie}},function(Me,me){var Be={}.toString;Me.exports=Array.isArray||function(ke){return Be.call(ke)=="[object Array]"}},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"set",value:function(ye,xe){try{window.localStorage&&localStorage.setItem(ye,xe)}catch(ge){window[ye+"_localStorage"]=xe}}},{key:"get",value:function(ye){try{if(window.localStorage)return localStorage.getItem(ye)}catch(xe){return window[ye+"_localStorage"]}return""}},{key:"remove",value:function(ye){try{window.localStorage&&localStorage.removeItem(ye)}catch(xe){delete window[ye+"_localStorage"]}}}]),he}();me.default=Le},function(Me,me,Be){"use strict";function ke(he,ye){if(!(he instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(ye,xe){for(var ge=0;ge<xe.length;ge++){var le=xe[ge];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ye,le.key,le)}}return function(ye,xe,ge){return xe&&he(ye.prototype,xe),ge&&he(ye,ge),ye}}(),Le=function(){function he(){ke(this,he)}return Ce(he,null,[{key:"get",value:function(ye){for(var xe=ye+"",ge=document.cookie.split(";"),le=0;le<ge.length;le++){var ve=ge[le].trim();if(ve.indexOf(xe)==0)return unescape(ve.substring(xe.length+1,ve.length))}return""}},{key:"set",value:function(ye,xe,ge){var le=new Date;le.setTime(le.getTime()+24*ge*60*60*1e3);var ve="expires="+le.toGMTString();document.cookie=ye+"="+escape(xe)+"; "+ve}}]),he}();me.default=Le},function(Me,me,Be){"use strict";function ke(ve){return ve&&ve.__esModule?ve:{default:ve}}function Ce(ve,de){if(!(ve instanceof de))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function ve(de,ce){for(var z=0;z<ce.length;z++){var ee=ce[z];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(de,ee.key,ee)}}return function(de,ce,z){return ce&&ve(de.prototype,ce),z&&ve(de,z),de}}(),he=Be(8),ye=ke(he),xe=Be(9),ge=ke(xe),le=function(){function ve(){Ce(this,ve)}return Le(ve,null,[{key:"refreshUploadAuth",value:function(de,ce,z){var ee=(ge.default.randomUUID(),ge.default.randomUUID()),oe={AccessKeyId:de.accessKeyId,SecurityToken:de.securityToken,Action:"RefreshUploadVideo",VideoId:de.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ee,RequestId:de.requestId},ie=ge.default.makeUTF8sort(oe,"=","&")+"&Signature="+ge.default.aliyunEncodeURI(ge.default.makeChangeSiga(oe,de.accessKeySecret)),se="https://vod."+de.region+".aliyuncs.com/?"+ie;ye.default.get(se,function(Se){var Se=JSON.parse(Se);ce&&ce(Se)},function(ue){if(z){var Se=JSON.parse(ue);z(Se)}})}},{key:"getUploadAuth",value:function(de,ce,z){var ee=(ge.default.randomUUID(),ge.default.randomUUID()),oe={AccessKeyId:de.accessKeyId,SecurityToken:de.securityToken,Action:"CreateUploadVideo",Title:de.title,FileName:de.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ee,RequestId:de.requestId};de.fileSize&&(oe.FileSize=de.fileSize),de.description&&(oe.Description=de.description),de.cateId&&(oe.CateId=de.cateId),de.tags&&(oe.Tags=de.tags),de.templateGroupId&&(oe.TemplateGroupId=de.templateGroupId),de.storageLocation&&(oe.StorageLocation=de.storageLocation),de.coverUrl&&(oe.CoverURL=de.coverUrl),de.transCodeMode&&(oe.TransCodeMode=de.transCodeMode),de.userData&&(oe.UserData=JSON.stringify(de.userData));var ie=ge.default.makeUTF8sort(oe,"=","&")+"&Signature="+ge.default.aliyunEncodeURI(ge.default.makeChangeSiga(oe,de.accessKeySecret)),se="https://vod."+de.region+".aliyuncs.com/?"+ie;ye.default.get(se,function(ue){try{ue=JSON.parse(ue)}catch(Se){if(z)return void z({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}ce&&ce(ue)},function(ue){if(z){var Se={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{Se=JSON.parse(ue)}catch(we){}z(Se)}})}},{key:"getImageUploadAuth",value:function(de,ce,z){var ee=(ge.default.randomUUID(),ge.default.randomUUID()),oe={AccessKeyId:de.accessKeyId,SecurityToken:de.securityToken,Action:"CreateUploadImage",ImageType:de.imageType?de.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ee,RequestId:de.requestId};de.title&&(oe.Title=de.title),de.imageExt&&(oe.ImageExt=de.imageExt),de.tags&&(oe.Tags=de.tags),de.storageLocation&&(oe.StorageLocation=de.storageLocation);var ie=ge.default.makeUTF8sort(oe,"=","&")+"&Signature="+ge.default.aliyunEncodeURI(ge.default.makeChangeSiga(oe,de.accessKeySecret)),se="https://vod."+de.region+".aliyuncs.com/?"+ie;ye.default.get(se,function(ue){ue=JSON.parse(ue),ce&&ce(ue)},function(ue){if(z){var Se=JSON.parse(ue);z(Se)}})}}]),ve}();me.default=le},function(Me,me,Be){(function(ke,Ce,Le){Me.exports=me=Ce(Be(0),Be(28),Be(29))})(0,function(ke){return ke.HmacSHA1})},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return function(){var Ce=ke,Le=Ce.lib,he=Le.WordArray,ye=Le.Hasher,xe=Ce.algo,ge=[],le=xe.SHA1=ye.extend({_doReset:function(){this._hash=new he.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(ve,de){for(var ce=this._hash.words,z=ce[0],ee=ce[1],oe=ce[2],ie=ce[3],se=ce[4],ue=0;ue<80;ue++){if(ue<16)ge[ue]=0|ve[de+ue];else{var Se=ge[ue-3]^ge[ue-8]^ge[ue-14]^ge[ue-16];ge[ue]=Se<<1|Se>>>31}var we=(z<<5|z>>>27)+se+ge[ue];we+=ue<20?1518500249+(ee&oe|~ee&ie):ue<40?1859775393+(ee^oe^ie):ue<60?(ee&oe|ee&ie|oe&ie)-1894007588:(ee^oe^ie)-899497514,se=ie,ie=oe,oe=ee<<30|ee>>>2,ee=z,z=we}ce[0]=ce[0]+z|0,ce[1]=ce[1]+ee|0,ce[2]=ce[2]+oe|0,ce[3]=ce[3]+ie|0,ce[4]=ce[4]+se|0},_doFinalize:function(){var ve=this._data,de=ve.words,ce=8*this._nDataBytes,z=8*ve.sigBytes;return de[z>>>5]|=128<<24-z%32,de[14+(z+64>>>9<<4)]=Math.floor(ce/4294967296),de[15+(z+64>>>9<<4)]=ce,ve.sigBytes=4*de.length,this._process(),this._hash},clone:function(){var ve=ye.clone.call(this);return ve._hash=this._hash.clone(),ve}});Ce.SHA1=ye._createHelper(le),Ce.HmacSHA1=ye._createHmacHelper(le)}(),ke.SHA1})},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){(function(){var Ce=ke,Le=Ce.lib,he=Le.Base,ye=Ce.enc,xe=ye.Utf8,ge=Ce.algo;ge.HMAC=he.extend({init:function(le,ve){le=this._hasher=new le.init,typeof ve=="string"&&(ve=xe.parse(ve));var de=le.blockSize,ce=4*de;ve.sigBytes>ce&&(ve=le.finalize(ve)),ve.clamp();for(var z=this._oKey=ve.clone(),ee=this._iKey=ve.clone(),oe=z.words,ie=ee.words,se=0;se<de;se++)oe[se]^=1549556828,ie[se]^=909522486;z.sigBytes=ee.sigBytes=ce,this.reset()},reset:function(){var le=this._hasher;le.reset(),le.update(this._iKey)},update:function(le){return this._hasher.update(le),this},finalize:function(le){var ve=this._hasher,de=ve.finalize(le);return ve.reset(),ve.finalize(this._oKey.clone().concat(de))}})})()})},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return function(){function Ce(ge,le,ve){for(var de=[],ce=0,z=0;z<le;z++)if(z%4){var ee=ve[ge.charCodeAt(z-1)]<<z%4*2,oe=ve[ge.charCodeAt(z)]>>>6-z%4*2;de[ce>>>2]|=(ee|oe)<<24-ce%4*8,ce++}return ye.create(de,ce)}var Le=ke,he=Le.lib,ye=he.WordArray,xe=Le.enc;xe.Base64={stringify:function(ge){var le=ge.words,ve=ge.sigBytes,de=this._map;ge.clamp();for(var ce=[],z=0;z<ve;z+=3)for(var ee=le[z>>>2]>>>24-z%4*8&255,oe=le[z+1>>>2]>>>24-(z+1)%4*8&255,ie=le[z+2>>>2]>>>24-(z+2)%4*8&255,se=ee<<16|oe<<8|ie,ue=0;ue<4&&z+.75*ue<ve;ue++)ce.push(de.charAt(se>>>6*(3-ue)&63));var Se=de.charAt(64);if(Se)for(;ce.length%4;)ce.push(Se);return ce.join("")},parse:function(ge){var le=ge.length,ve=this._map,de=this._reverseMap;if(!de){de=this._reverseMap=[];for(var ce=0;ce<ve.length;ce++)de[ve.charCodeAt(ce)]=ce}var z=ve.charAt(64);if(z){var ee=ge.indexOf(z);ee!==-1&&(le=ee)}return Ce(ge,le,de)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),ke.enc.Base64})},function(Me,me,Be){"use strict";function ke(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}function Ce(Pe,Ae){if(!(Pe instanceof Ae))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Le=function(){function Pe(Ae,De){for(var ze=0;ze<De.length;ze++){var Ze=De[ze];Ze.enumerable=Ze.enumerable||!1,Ze.configurable=!0,"value"in Ze&&(Ze.writable=!0),Object.defineProperty(Ae,Ze.key,Ze)}}return function(Ae,De,ze){return De&&Pe(Ae.prototype,De),ze&&Pe(Ae,ze),Ae}}(),he=Be(8),ye=ke(he),xe=Be(7),ge=ke(xe),le=Be(4),ve=ke(le),de=Be(6),ce=ke(de),z=Be(1),ee=ke(z),oe=Be(9),ie=ke(oe),se=Be(2),ue=Be(11),Se=Be(10),we=function(){function Pe(){Ce(this,Pe)}return Le(Pe,null,[{key:"getAuthInfo",value:function(Ae,De,ze){var Ze=Ae+"|f#Ylm&^1TppeRhLg|"+ze;return De&&(Ze=Ae+"|"+De+"|f#Ylm&^1TppeRhLg|"+ze),se(Se.parse(Ze)).toString(ue)}},{key:"upload",value:function(Ae,De,ze){var Ze=ee.default.ISODateString(new Date),Xe=Math.floor(new Date().valueOf()/1e3),Ge=ve.default.getClientId();Ge=ve.default.setClientId(Ge);var ft=Pe.getAuthInfo(Ae.userId,Ge,Xe),at=ie.default.randomUUID(),Ct={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ce.default.version,AuthTimestamp:Xe,Timestamp:Ze,AuthInfo:ft,FileName:Ae.file.name,FileSize:Ae.file.size,FileCreateTime:Ae.file.lastModified,FileHash:Ae.fileHash,UploadId:Ae.checkpoint.checkpoint.uploadId,PartSize:Ae.checkpoint.checkpoint.partSize,DonePartsCount:Ae.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(Ae.checkpoint),UploadRatio:Ae.checkpoint.loaded,UserId:Ae.userId,VideoId:Ae.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:at};Ge&&(Ct.ClientId=Ge);var et=ie.default.makeUTF8sort(Ct,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Ct,Ae.accessKeySecret)),yt="https://vod."+Ae.region+".aliyuncs.com/?"+et;ye.default.get(yt,function(st){De&&De()},function(st){st&&(ze(st),console.log(st))})}},{key:"get",value:function(Ae,De,ze){var Ze=ee.default.ISODateString(new Date),Xe=Math.floor(new Date().valueOf()/1e3),Ge=ve.default.getClientId(),ft=Pe.getAuthInfo(Ae.userId,Ge,Xe),at=ie.default.randomUUID(),Ct={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ce.default.version,AuthTimestamp:Xe,Timestamp:Ze,AuthInfo:ft,UserId:Ae.userId,UploadInfoList:JSON.stringify(Ae.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:at};Ge&&(Ct.ClientId=Ge);var et=ie.default.makeUTF8sort(Ct,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Ct,Ae.accessKeySecret)),yt="https://vod."+Ae.region+".aliyuncs.com/?"+et;ye.default.get(yt,function(st){var zt={},lt=Ge;st=st?JSON.parse(st):{},st.UploadProgress&&st.UploadProgress.UploadProgressList&&st.UploadProgress.UploadProgressList.length>0&&(zt=st.UploadProgress.UploadProgressList[0],lt=zt.ClientId),ve.default.setClientId(lt),De&&De(zt)},function(st){st&&(ze(st),console.log(st))})}}]),Pe}();me.default=we},function(Me,me,Be){"use strict";function ke(xe,ge){if(!(xe instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function xe(ge,le){for(var ve=0;ve<le.length;ve++){var de=le[ve];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ge,de.key,de)}}return function(ge,le,ve){return le&&xe(ge.prototype,le),ve&&xe(ge,ve),ge}}(),Le=Be(2),he=Be(33),ye=(Be(11),function(){function xe(){ke(this,xe)}return Ce(xe,null,[{key:"getMd5",value:function(ge,le,ve){var de=new FileReader;de.onload=function(ee){try{if(ee&&ee.target){var oe=Le(he.parse(ee.target.result)),ie=oe.toString();le(ie)}}catch(se){console.log(se)}},de.onerror=function(ee){console.log(ee),errorCallback(ee)};var ce=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,z=ce.call(ge,0,1024);de.readAsBinaryString(z)}}]),xe}());me.default=ye},function(Me,me,Be){(function(ke,Ce){Me.exports=me=Ce(Be(0))})(0,function(ke){return ke.enc.Latin1})}])},50371:function(_n,en){"use strict";function Ee(){const Me=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let me=1;me<arguments.length;me++){const Be=me<0||arguments.length<=me?void 0:arguments[me];Be&&Object.keys(Be).forEach(ke=>{const Ce=Be[ke];Ce!==void 0&&(Me[ke]=Ce)})}return Me}en.Z=Ee},13845:function(_n,en,Ee){"use strict";Ee.d(en,{F:function(){return Me},Z:function(){return me}});function Me(Be){return Be!=null&&Be===Be.window}function me(Be,ke){var Ce,Le;if(typeof window=="undefined")return 0;const he=ke?"scrollTop":"scrollLeft";let ye=0;return Me(Be)?ye=Be[ke?"pageYOffset":"pageXOffset"]:Be instanceof Document?ye=Be.documentElement[he]:(Be instanceof HTMLElement||Be)&&(ye=Be[he]),Be&&!Me(Be)&&typeof ye!="number"&&(ye=(Le=((Ce=Be.ownerDocument)!==null&&Ce!==void 0?Ce:Be).documentElement)===null||Le===void 0?void 0:Le[he]),ye}},56762:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return me}});var Me=Ee(59301);function me(){const[,Be]=Me.useReducer(ke=>ke+1,0);return Be}},68031:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ke}});var Me=Ee(16089);function me(Ce,Le,he,ye){const xe=he-Le;return Ce/=ye/2,Ce<1?xe/2*Ce*Ce*Ce+Le:xe/2*((Ce-=2)*Ce*Ce+2)+Le}var Be=Ee(13845);function ke(Ce){let Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:he=()=>window,callback:ye,duration:xe=450}=Le,ge=he(),le=(0,Be.Z)(ge,!0),ve=Date.now(),de=()=>{const z=Date.now()-ve,ee=me(z>xe?xe:z,le,Ce,xe);(0,Be.F)(ge)?ge.scrollTo(window.pageXOffset,ee):ge instanceof Document||ge.constructor.name==="HTMLDocument"?ge.documentElement.scrollTop=ee:ge.scrollTop=ee,z<xe?(0,Me.Z)(de):typeof ye=="function"&&ye()};(0,Me.Z)(de)}},24905:function(_n,en,Ee){"use strict";Ee.d(en,{default:function(){return Ae}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(5630),ke=Ee(59301),Ce=Ee(36355),Le=Ee(1684),he=Ee(32441),xe=ke.createContext(null),ge=Ee(98447),le=Ee(14088),ve=Ee(4572),de=function(De,ze){var Ze={};for(var Xe in De)Object.prototype.hasOwnProperty.call(De,Xe)&&ze.indexOf(Xe)<0&&(Ze[Xe]=De[Xe]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Xe=Object.getOwnPropertySymbols(De);Ge<Xe.length;Ge++)ze.indexOf(Xe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(De,Xe[Ge])&&(Ze[Xe[Ge]]=De[Xe[Ge]]);return Ze};const ce=(De,ze)=>{var Ze;const{prefixCls:Xe,className:Ge,rootClassName:ft,children:at,indeterminate:Ct=!1,style:et,onMouseEnter:yt,onMouseLeave:st,skipGroup:zt=!1,disabled:lt}=De,tt=de(De,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:ut,direction:mt,checkbox:Pt}=ke.useContext(Ce.E_),gt=ke.useContext(xe),{isFormItemInput:Ft}=ke.useContext(he.aM),Ht=ke.useContext(Le.Z),hn=(Ze=(gt==null?void 0:gt.disabled)||lt)!==null&&Ze!==void 0?Ze:Ht,Qt=ke.useRef(tt.value);ke.useEffect(()=>{gt==null||gt.registerValue(tt.value)},[]),ke.useEffect(()=>{if(!zt)return tt.value!==Qt.current&&(gt==null||gt.cancelValue(Qt.current),gt==null||gt.registerValue(tt.value),Qt.current=tt.value),()=>gt==null?void 0:gt.cancelValue(tt.value)},[tt.value]);const bn=ut("checkbox",Xe),[Wt,Kt]=(0,ge.ZP)(bn),Jt=Object.assign({},tt);gt&&!zt&&(Jt.onChange=function(){tt.onChange&&tt.onChange.apply(tt,arguments),gt.toggleOption&>.toggleOption({label:at,value:tt.value})},Jt.name=gt.name,Jt.checked=gt.value.includes(tt.value));const Yt=me()(`${bn}-wrapper`,{[`${bn}-rtl`]:mt==="rtl",[`${bn}-wrapper-checked`]:Jt.checked,[`${bn}-wrapper-disabled`]:hn,[`${bn}-wrapper-in-form-item`]:Ft},Pt==null?void 0:Pt.className,Ge,ft,Kt),kt=me()({[`${bn}-indeterminate`]:Ct},ve.A,Kt),pt=Ct?"mixed":void 0;return Wt(ke.createElement(le.Z,{component:"Checkbox",disabled:hn},ke.createElement("label",{className:Yt,style:Object.assign(Object.assign({},Pt==null?void 0:Pt.style),et),onMouseEnter:yt,onMouseLeave:st},ke.createElement(Be.Z,Object.assign({"aria-checked":pt},Jt,{prefixCls:bn,className:kt,disabled:hn,ref:ze})),at!==void 0&&ke.createElement("span",null,at))))};var ee=ke.forwardRef(ce),oe=Ee(80702),ie=Ee(2738),se=function(De,ze){var Ze={};for(var Xe in De)Object.prototype.hasOwnProperty.call(De,Xe)&&ze.indexOf(Xe)<0&&(Ze[Xe]=De[Xe]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Xe=Object.getOwnPropertySymbols(De);Ge<Xe.length;Ge++)ze.indexOf(Xe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(De,Xe[Ge])&&(Ze[Xe[Ge]]=De[Xe[Ge]]);return Ze};const ue=(De,ze)=>{const{defaultValue:Ze,children:Xe,options:Ge=[],prefixCls:ft,className:at,rootClassName:Ct,style:et,onChange:yt}=De,st=se(De,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:zt,direction:lt}=ke.useContext(Ce.E_),[tt,ut]=ke.useState(st.value||Ze||[]),[mt,Pt]=ke.useState([]);ke.useEffect(()=>{"value"in st&&ut(st.value||[])},[st.value]);const gt=ke.useMemo(()=>Ge.map(Bt=>typeof Bt=="string"||typeof Bt=="number"?{label:Bt,value:Bt}:Bt),[Ge]),Ft=Bt=>{Pt(xt=>xt.filter(vt=>vt!==Bt))},Ht=Bt=>{Pt(xt=>[].concat((0,oe.Z)(xt),[Bt]))},hn=Bt=>{const xt=tt.indexOf(Bt.value),vt=(0,oe.Z)(tt);xt===-1?vt.push(Bt.value):vt.splice(xt,1),"value"in st||ut(vt),yt==null||yt(vt.filter(nt=>mt.includes(nt)).sort((nt,He)=>{const Ie=gt.findIndex(Oe=>Oe.value===nt),We=gt.findIndex(Oe=>Oe.value===He);return Ie-We}))},Qt=zt("checkbox",ft),bn=`${Qt}-group`,[Wt,Kt]=(0,ge.ZP)(Qt),Jt=(0,ie.Z)(st,["value","disabled"]),Yt=Ge.length?gt.map(Bt=>ke.createElement(ee,{prefixCls:Qt,key:Bt.value.toString(),disabled:"disabled"in Bt?Bt.disabled:st.disabled,value:Bt.value,checked:tt.includes(Bt.value),onChange:Bt.onChange,className:`${bn}-item`,style:Bt.style,title:Bt.title},Bt.label)):Xe,kt={toggleOption:hn,value:tt,disabled:st.disabled,name:st.name,registerValue:Ht,cancelValue:Ft},pt=me()(bn,{[`${bn}-rtl`]:lt==="rtl"},at,Ct,Kt);return Wt(ke.createElement("div",Object.assign({className:pt,style:et},Jt,{ref:ze}),ke.createElement(xe.Provider,{value:kt},Yt)))},Se=ke.forwardRef(ue);var we=ke.memo(Se);const Pe=ee;Pe.Group=we,Pe.__ANT_CHECKBOX=!0;var Ae=Pe},98447:function(_n,en,Ee){"use strict";Ee.d(en,{C2:function(){return Ce}});var Me=Ee(17313),me=Ee(37613),Be=Ee(83116);const ke=Le=>{const{checkboxCls:he}=Le,ye=`${he}-wrapper`;return[{[`${he}-group`]:Object.assign(Object.assign({},(0,Me.Wf)(Le)),{display:"inline-flex",flexWrap:"wrap",columnGap:Le.marginXS,[`> ${Le.antCls}-row`]:{flex:1}}),[ye]:Object.assign(Object.assign({},(0,Me.Wf)(Le)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${ye}`]:{marginInlineStart:0},[`&${ye}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[he]:Object.assign(Object.assign({},(0,Me.Wf)(Le)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Le.borderRadiusSM,alignSelf:"center",[`${he}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${he}-inner`]:Object.assign({},(0,Me.oN)(Le))},[`${he}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Le.checkboxSize,height:Le.checkboxSize,direction:"ltr",backgroundColor:Le.colorBgContainer,border:`${Le.lineWidth}px ${Le.lineType} ${Le.colorBorder}`,borderRadius:Le.borderRadiusSM,borderCollapse:"separate",transition:`all ${Le.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Le.checkboxSize/14*5,height:Le.checkboxSize/14*8,border:`${Le.lineWidthBold}px solid ${Le.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Le.motionDurationFast} ${Le.motionEaseInBack}, opacity ${Le.motionDurationFast}`}},"& + span":{paddingInlineStart:Le.paddingXS,paddingInlineEnd:Le.paddingXS}})},{[`
|
|
|
${ye}:not(${ye}-disabled),
|
|
|
${he}:not(${he}-disabled)
|
|
|
`]:{[`&:hover ${he}-inner`]:{borderColor:Le.colorPrimary}},[`${ye}:not(${ye}-disabled)`]:{[`&:hover ${he}-checked:not(${he}-disabled) ${he}-inner`]:{backgroundColor:Le.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${he}-checked:not(${he}-disabled):after`]:{borderColor:Le.colorPrimaryHover}}},{[`${he}-checked`]:{[`${he}-inner`]:{backgroundColor:Le.colorPrimary,borderColor:Le.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Le.motionDurationMid} ${Le.motionEaseOutBack} ${Le.motionDurationFast}`}}},[`
|
|
|
${ye}-checked:not(${ye}-disabled),
|
|
|
${he}-checked:not(${he}-disabled)
|
|
|
`]:{[`&:hover ${he}-inner`]:{backgroundColor:Le.colorPrimaryHover,borderColor:"transparent"}}},{[he]:{"&-indeterminate":{[`${he}-inner`]:{backgroundColor:Le.colorBgContainer,borderColor:Le.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Le.fontSizeLG/2,height:Le.fontSizeLG/2,backgroundColor:Le.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${ye}-disabled`]:{cursor:"not-allowed"},[`${he}-disabled`]:{[`&, ${he}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${he}-inner`]:{background:Le.colorBgContainerDisabled,borderColor:Le.colorBorder,"&:after":{borderColor:Le.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Le.colorTextDisabled},[`&${he}-indeterminate ${he}-inner::after`]:{background:Le.colorTextDisabled}}}]};function Ce(Le,he){const ye=(0,me.TS)(he,{checkboxCls:`.${Le}`,checkboxSize:he.controlInteractiveSize});return[ke(ye)]}en.ZP=(0,Be.Z)("Checkbox",(Le,he)=>{let{prefixCls:ye}=he;return[Ce(ye,Le)]})},93891:function(_n,en,Ee){"use strict";var Me=Ee(59301),me=Ee(36355),Be=Ee(64165);const ke=Ce=>{const{componentName:Le}=Ce,{getPrefixCls:he}=(0,Me.useContext)(me.E_),ye=he("empty");switch(Le){case"Table":case"List":return Me.createElement(Be.Z,{image:Be.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Me.createElement(Be.Z,{image:Be.Z.PRESENTED_IMAGE_SIMPLE,className:`${ye}-small`});default:return Me.createElement(Be.Z,null)}};en.Z=ke},43428:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return Wt}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(77321),ke=Ee(52487),Ce=Ee(43403),Le=Ee(34280),he=Ee(59301),ye=he.createContext(null),xe=he.createContext({}),ge=ye,le=Ee(49618),ve=Ee(72308),de=Ee(77900),ce=Ee(10228),z=Ee(26112),ee=Ee(70425),oe=function(Jt){var Yt=Jt.prefixCls,kt=Jt.className,pt=Jt.style,Bt=Jt.children,xt=Jt.containerRef,vt=Jt.id,nt=Jt.onMouseEnter,He=Jt.onMouseOver,Ie=Jt.onMouseLeave,We=Jt.onClick,Oe=Jt.onKeyDown,be=Jt.onKeyUp,Ne={onMouseEnter:nt,onMouseOver:He,onMouseLeave:Ie,onClick:We,onKeyDown:Oe,onKeyUp:be},$e=he.useContext(xe),dt=$e.panel,Je=(0,ee.useComposeRef)(dt,xt);return he.createElement(he.Fragment,null,he.createElement("div",(0,ve.Z)({id:vt,className:me()("".concat(Yt,"-content"),kt),style:(0,Be.Z)({},pt),"aria-modal":"true",role:"dialog",ref:Je},Ne),Bt))},ie=oe,se=Ee(48736);function ue(Kt){return typeof Kt=="string"&&String(Number(Kt))===Kt?((0,se.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Kt)):Kt}function Se(Kt){warning(!("wrapperClassName"in Kt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Kt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var we={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Pe(Kt,Jt){var Yt,kt,pt,Bt,xt=Kt.prefixCls,vt=Kt.open,nt=Kt.placement,He=Kt.inline,Ie=Kt.push,We=Kt.forceRender,Oe=Kt.autoFocus,be=Kt.keyboard,Ne=Kt.rootClassName,$e=Kt.rootStyle,dt=Kt.zIndex,Je=Kt.className,At=Kt.id,tn=Kt.style,pn=Kt.motion,ln=Kt.width,gn=Kt.height,Hn=Kt.children,An=Kt.contentWrapperStyle,qn=Kt.mask,ai=Kt.maskClosable,Ti=Kt.maskMotion,Ci=Kt.maskClassName,$i=Kt.maskStyle,or=Kt.afterOpenChange,lr=Kt.onClose,qi=Kt.onMouseEnter,Fr=Kt.onMouseOver,Mr=Kt.onMouseLeave,yi=Kt.onClick,dr=Kt.onKeyDown,Zi=Kt.onKeyUp,rt=he.useRef(),Ir=he.useRef(),Ar=he.useRef();he.useImperativeHandle(Jt,function(){return rt.current});var $r=function(sn){var Nt=sn.keyCode,un=sn.shiftKey;switch(Nt){case ce.Z.TAB:{if(Nt===ce.Z.TAB){if(!un&&document.activeElement===Ar.current){var Ln;(Ln=Ir.current)===null||Ln===void 0||Ln.focus({preventScroll:!0})}else if(un&&document.activeElement===Ir.current){var Dn;(Dn=Ar.current)===null||Dn===void 0||Dn.focus({preventScroll:!0})}}break}case ce.Z.ESC:{lr&&be&&(sn.stopPropagation(),lr(sn));break}}};he.useEffect(function(){if(vt&&Oe){var mn;(mn=rt.current)===null||mn===void 0||mn.focus({preventScroll:!0})}},[vt]);var co=he.useState(!1),mo=(0,ke.Z)(co,2),no=mo[0],lo=mo[1],ri=he.useContext(ge),Ke;Ie===!1?Ke={distance:0}:Ie===!0?Ke={}:Ke=Ie||{};var qe=(Yt=(kt=(pt=Ke)===null||pt===void 0?void 0:pt.distance)!==null&&kt!==void 0?kt:ri==null?void 0:ri.pushDistance)!==null&&Yt!==void 0?Yt:180,Ye=he.useMemo(function(){return{pushDistance:qe,push:function(){lo(!0)},pull:function(){lo(!1)}}},[qe]);he.useEffect(function(){if(vt){var mn;ri==null||(mn=ri.push)===null||mn===void 0||mn.call(ri)}else{var sn;ri==null||(sn=ri.pull)===null||sn===void 0||sn.call(ri)}},[vt]),he.useEffect(function(){return function(){var mn;ri==null||(mn=ri.pull)===null||mn===void 0||mn.call(ri)}},[]);var St=qn&&he.createElement(de.default,(0,ve.Z)({key:"mask"},Ti,{visible:vt}),function(mn,sn){var Nt=mn.className,un=mn.style;return he.createElement("div",{className:me()("".concat(xt,"-mask"),Nt,Ci),style:(0,Be.Z)((0,Be.Z)({},un),$i),onClick:ai&&vt?lr:void 0,ref:sn})}),Ot=typeof pn=="function"?pn(nt):pn,Tt={};if(no&&qe)switch(nt){case"top":Tt.transform="translateY(".concat(qe,"px)");break;case"bottom":Tt.transform="translateY(".concat(-qe,"px)");break;case"left":Tt.transform="translateX(".concat(qe,"px)");break;default:Tt.transform="translateX(".concat(-qe,"px)");break}nt==="left"||nt==="right"?Tt.width=ue(ln):Tt.height=ue(gn);var _t={onMouseEnter:qi,onMouseOver:Fr,onMouseLeave:Mr,onClick:yi,onKeyDown:dr,onKeyUp:Zi},dn=he.createElement(de.default,(0,ve.Z)({key:"panel"},Ot,{visible:vt,forceRender:We,onVisibleChanged:function(sn){or==null||or(sn)},removeOnLeave:!1,leavedClassName:"".concat(xt,"-content-wrapper-hidden")}),function(mn,sn){var Nt=mn.className,un=mn.style;return he.createElement("div",(0,ve.Z)({className:me()("".concat(xt,"-content-wrapper"),Nt),style:(0,Be.Z)((0,Be.Z)((0,Be.Z)({},Tt),un),An)},(0,z.Z)(Kt,{data:!0})),he.createElement(ie,(0,ve.Z)({id:At,containerRef:sn,prefixCls:xt,className:Je,style:tn},_t),Hn))}),Pn=(0,Be.Z)({},$e);return dt&&(Pn.zIndex=dt),he.createElement(ge.Provider,{value:Ye},he.createElement("div",{className:me()(xt,"".concat(xt,"-").concat(nt),Ne,(Bt={},(0,le.Z)(Bt,"".concat(xt,"-open"),vt),(0,le.Z)(Bt,"".concat(xt,"-inline"),He),Bt)),style:Pn,tabIndex:-1,ref:rt,onKeyDown:$r},St,he.createElement("div",{tabIndex:0,ref:Ir,style:we,"aria-hidden":"true","data-sentinel":"start"}),dn,he.createElement("div",{tabIndex:0,ref:Ar,style:we,"aria-hidden":"true","data-sentinel":"end"})))}var Ae=he.forwardRef(Pe),De=Ae,ze=function(Jt){var Yt=Jt.open,kt=Yt===void 0?!1:Yt,pt=Jt.prefixCls,Bt=pt===void 0?"rc-drawer":pt,xt=Jt.placement,vt=xt===void 0?"right":xt,nt=Jt.autoFocus,He=nt===void 0?!0:nt,Ie=Jt.keyboard,We=Ie===void 0?!0:Ie,Oe=Jt.width,be=Oe===void 0?378:Oe,Ne=Jt.mask,$e=Ne===void 0?!0:Ne,dt=Jt.maskClosable,Je=dt===void 0?!0:dt,At=Jt.getContainer,tn=Jt.forceRender,pn=Jt.afterOpenChange,ln=Jt.destroyOnClose,gn=Jt.onMouseEnter,Hn=Jt.onMouseOver,An=Jt.onMouseLeave,qn=Jt.onClick,ai=Jt.onKeyDown,Ti=Jt.onKeyUp,Ci=Jt.panelRef,$i=he.useState(!1),or=(0,ke.Z)($i,2),lr=or[0],qi=or[1],Fr=he.useState(!1),Mr=(0,ke.Z)(Fr,2),yi=Mr[0],dr=Mr[1];(0,Le.Z)(function(){dr(!0)},[]);var Zi=yi?kt:!1,rt=he.useRef(),Ir=he.useRef();(0,Le.Z)(function(){Zi&&(Ir.current=document.activeElement)},[Zi]);var Ar=function(lo){var ri;if(qi(lo),pn==null||pn(lo),!lo&&Ir.current&&!((ri=rt.current)!==null&&ri!==void 0&&ri.contains(Ir.current))){var Ke;(Ke=Ir.current)===null||Ke===void 0||Ke.focus({preventScroll:!0})}},$r=he.useMemo(function(){return{panel:Ci}},[Ci]);if(!tn&&!lr&&!Zi&&ln)return null;var co={onMouseEnter:gn,onMouseOver:Hn,onMouseLeave:An,onClick:qn,onKeyDown:ai,onKeyUp:Ti},mo=(0,Be.Z)((0,Be.Z)({},Jt),{},{open:Zi,prefixCls:Bt,placement:vt,autoFocus:He,keyboard:We,width:be,mask:$e,maskClosable:Je,inline:At===!1,afterOpenChange:Ar,ref:rt},co);return he.createElement(xe.Provider,{value:$r},he.createElement(Ce.Z,{open:Zi||tn||lr,autoDestroy:!1,getContainer:At,autoLock:$e&&(Zi||lr)},he.createElement(De,mo)))},Ze=ze,Xe=Ze,Ge=Ee(62892),ft=Ee(36355),at=Ee(32441),Ct=Ee(47729),yt=Kt=>{const{prefixCls:Jt,title:Yt,footer:kt,extra:pt,closeIcon:Bt,closable:xt,onClose:vt,headerStyle:nt,drawerStyle:He,bodyStyle:Ie,footerStyle:We,children:Oe}=Kt,be=he.useCallback(At=>he.createElement("button",{type:"button",onClick:vt,"aria-label":"Close",className:`${Jt}-close`},At),[vt]),[Ne,$e]=(0,Ct.Z)(xt,Bt,be,void 0,!0),dt=he.useMemo(()=>!Yt&&!Ne?null:he.createElement("div",{style:nt,className:me()(`${Jt}-header`,{[`${Jt}-header-close-only`]:Ne&&!Yt&&!pt})},he.createElement("div",{className:`${Jt}-header-title`},$e,Yt&&he.createElement("div",{className:`${Jt}-title`},Yt)),pt&&he.createElement("div",{className:`${Jt}-extra`},pt)),[Ne,$e,pt,nt,Jt,Yt]),Je=he.useMemo(()=>{if(!kt)return null;const At=`${Jt}-footer`;return he.createElement("div",{className:At,style:We},kt)},[kt,We,Jt]);return he.createElement("div",{className:`${Jt}-wrapper-body`,style:He},dt,he.createElement("div",{className:`${Jt}-body`,style:Ie},Oe),Je)},st=Ee(33234),zt=Ee(83116),lt=Ee(37613),ut=Kt=>{const{componentCls:Jt,motionDurationSlow:Yt}=Kt,kt={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${Yt}`}}};return{[Jt]:{[`${Jt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${Yt}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Jt}-panel-motion`]:{"&-left":[kt,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[kt,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[kt,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[kt,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const mt=Kt=>{const{componentCls:Jt,zIndexPopup:Yt,colorBgMask:kt,colorBgElevated:pt,motionDurationSlow:Bt,motionDurationMid:xt,padding:vt,paddingLG:nt,fontSizeLG:He,lineHeightLG:Ie,lineWidth:We,lineType:Oe,colorSplit:be,marginSM:Ne,colorIcon:$e,colorIconHover:dt,colorText:Je,fontWeightStrong:At,footerPaddingBlock:tn,footerPaddingInline:pn}=Kt,ln=`${Jt}-content-wrapper`;return{[Jt]:{position:"fixed",inset:0,zIndex:Yt,pointerEvents:"none","&-pure":{position:"relative",background:pt,[`&${Jt}-left`]:{boxShadow:Kt.boxShadowDrawerLeft},[`&${Jt}-right`]:{boxShadow:Kt.boxShadowDrawerRight},[`&${Jt}-top`]:{boxShadow:Kt.boxShadowDrawerUp},[`&${Jt}-bottom`]:{boxShadow:Kt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Jt}-mask`]:{position:"absolute",inset:0,zIndex:Yt,background:kt,pointerEvents:"auto"},[ln]:{position:"absolute",zIndex:Yt,maxWidth:"100vw",transition:`all ${Bt}`,"&-hidden":{display:"none"}},[`&-left > ${ln}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Kt.boxShadowDrawerLeft},[`&-right > ${ln}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Kt.boxShadowDrawerRight},[`&-top > ${ln}`]:{top:0,insetInline:0,boxShadow:Kt.boxShadowDrawerUp},[`&-bottom > ${ln}`]:{bottom:0,insetInline:0,boxShadow:Kt.boxShadowDrawerDown},[`${Jt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:pt,pointerEvents:"auto"},[`${Jt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Jt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${vt}px ${nt}px`,fontSize:He,lineHeight:Ie,borderBottom:`${We}px ${Oe} ${be}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Jt}-extra`]:{flex:"none"},[`${Jt}-close`]:{display:"inline-block",marginInlineEnd:Ne,color:$e,fontWeight:At,fontSize:He,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${xt}`,textRendering:"auto","&:focus, &:hover":{color:dt,textDecoration:"none"}},[`${Jt}-title`]:{flex:1,margin:0,color:Je,fontWeight:Kt.fontWeightStrong,fontSize:He,lineHeight:Ie},[`${Jt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:nt,overflow:"auto"},[`${Jt}-footer`]:{flexShrink:0,padding:`${tn}px ${pn}px`,borderTop:`${We}px ${Oe} ${be}`},"&-rtl":{direction:"rtl"}}}};var Pt=(0,zt.Z)("Drawer",Kt=>{const Jt=(0,lt.TS)(Kt,{});return[mt(Jt),ut(Jt)]},Kt=>({zIndexPopup:Kt.zIndexPopupBase,footerPaddingBlock:Kt.paddingXS,footerPaddingInline:Kt.padding})),gt=Ee(11575),Ft=function(Kt,Jt){var Yt={};for(var kt in Kt)Object.prototype.hasOwnProperty.call(Kt,kt)&&Jt.indexOf(kt)<0&&(Yt[kt]=Kt[kt]);if(Kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pt=0,kt=Object.getOwnPropertySymbols(Kt);pt<kt.length;pt++)Jt.indexOf(kt[pt])<0&&Object.prototype.propertyIsEnumerable.call(Kt,kt[pt])&&(Yt[kt[pt]]=Kt[kt[pt]]);return Yt};const Ht=null,hn={distance:180},Qt=Kt=>{var Jt;const{rootClassName:Yt,width:kt,height:pt,size:Bt="default",mask:xt=!0,push:vt=hn,open:nt,afterOpenChange:He,onClose:Ie,prefixCls:We,getContainer:Oe,style:be,className:Ne,visible:$e,afterVisibleChange:dt}=Kt,Je=Ft(Kt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:At,getPrefixCls:tn,direction:pn,drawer:ln}=he.useContext(ft.E_),gn=tn("drawer",We),[Hn,An]=Pt(gn),qn=Oe===void 0&&At?()=>At(document.body):Oe,ai=me()({"no-mask":!xt,[`${gn}-rtl`]:pn==="rtl"},Yt,An),Ti=he.useMemo(()=>kt!=null?kt:Bt==="large"?736:378,[kt,Bt]),Ci=he.useMemo(()=>pt!=null?pt:Bt==="large"?736:378,[pt,Bt]),$i={motionName:(0,Ge.m)(gn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},or=qi=>({motionName:(0,Ge.m)(gn,`panel-motion-${qi}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),lr=(0,gt.H)();return Hn(he.createElement(st.BR,null,he.createElement(at.Ux,{status:!0,override:!0},he.createElement(Xe,Object.assign({prefixCls:gn,onClose:Ie,maskMotion:$i,motion:or},Je,{open:nt!=null?nt:$e,mask:xt,push:vt,width:Ti,height:Ci,style:Object.assign(Object.assign({},ln==null?void 0:ln.style),be),className:me()(ln==null?void 0:ln.className,Ne),rootClassName:ai,getContainer:qn,afterOpenChange:He!=null?He:dt,panelRef:lr}),he.createElement(yt,Object.assign({prefixCls:gn},Je,{onClose:Ie}))))))},bn=Kt=>{const{prefixCls:Jt,style:Yt,className:kt,placement:pt="right"}=Kt,Bt=Ft(Kt,["prefixCls","style","className","placement"]),{getPrefixCls:xt}=he.useContext(ft.E_),vt=xt("drawer",Jt),[nt,He]=Pt(vt),Ie=me()(vt,`${vt}-pure`,`${vt}-${pt}`,He,kt);return nt(he.createElement("div",{className:Ie,style:Yt},he.createElement(yt,Object.assign({prefixCls:vt},Bt))))};Qt._InternalPanelDoNotUseOrYouWillBeFired=bn;var Wt=Qt},91857:function(_n,en,Ee){"use strict";var Me=Ee(59301),me=Ee(38819),Be=Ee(92310),ke=Ee.n(Be),Ce=Ee(31561),Le=Ee(70425),he=Ee(18929),ye=Ee(2738),xe=Ee(79676),ge=Ee(53487),le=Ee(92343),ve=Ee(36355),de=Ee(20834),ce=Ee(40875),z=Ee(88088),ee=Ee(47211);const oe=null,ie=we=>{const{menu:Pe,arrow:Ae,prefixCls:De,children:ze,trigger:Ze,disabled:Xe,dropdownRender:Ge,getPopupContainer:ft,overlayClassName:at,rootClassName:Ct,open:et,onOpenChange:yt,visible:st,onVisibleChange:zt,mouseEnterDelay:lt=.15,mouseLeaveDelay:tt=.1,autoAdjustOverflow:ut=!0,placement:mt="",overlay:Pt,transitionName:gt}=we,{getPopupContainer:Ft,getPrefixCls:Ht,direction:hn}=Me.useContext(ve.E_),Qt=Me.useMemo(()=>{const Ne=Ht();return gt!==void 0?gt:mt.includes("top")?`${Ne}-slide-down`:`${Ne}-slide-up`},[Ht,mt,gt]),bn=Me.useMemo(()=>mt?mt.includes("Center")?mt.slice(0,mt.indexOf("Center")):mt:hn==="rtl"?"bottomRight":"bottomLeft",[mt,hn]),Wt=Ht("dropdown",De),[Kt,Jt]=(0,ee.Z)(Wt),[,Yt]=(0,z.Z)(),kt=Me.Children.only(ze),pt=(0,le.Tm)(kt,{className:ke()(`${Wt}-trigger`,{[`${Wt}-rtl`]:hn==="rtl"},kt.props.className),disabled:Xe}),Bt=Xe?[]:Ze;let xt;Bt&&Bt.includes("contextMenu")&&(xt=!0);const[vt,nt]=(0,he.Z)(!1,{value:et!=null?et:st}),He=(0,Le.useEvent)(Ne=>{yt==null||yt(Ne),zt==null||zt(Ne),nt(Ne)}),Ie=ke()(at,Ct,Jt,{[`${Wt}-rtl`]:hn==="rtl"}),We=(0,xe.Z)({arrowPointAtCenter:typeof Ae=="object"&&Ae.pointAtCenter,autoAdjustOverflow:ut,offset:Yt.marginXXS,arrowWidth:Ae?Yt.sizePopupArrow:0,borderRadius:Yt.borderRadius}),Oe=Me.useCallback(()=>{nt(!1)},[]),be=()=>{let Ne;return Pe!=null&&Pe.items?Ne=Me.createElement(de.default,Object.assign({},Pe)):typeof Pt=="function"?Ne=Pt():Ne=Pt,Ge&&(Ne=Ge(Ne)),Ne=Me.Children.only(typeof Ne=="string"?Me.createElement("span",null,Ne):Ne),Me.createElement(ce.J,{prefixCls:`${Wt}-menu`,expandIcon:Me.createElement("span",{className:`${Wt}-menu-submenu-arrow`},Me.createElement(me.Z,{className:`${Wt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Oe,validator:$e=>{let{mode:dt}=$e}},Ne)};return Kt(Me.createElement(Ce.Z,Object.assign({alignPoint:xt},(0,ye.Z)(we,["rootClassName"]),{mouseEnterDelay:lt,mouseLeaveDelay:tt,visible:vt,builtinPlacements:We,arrow:!!Ae,overlayClassName:Ie,prefixCls:Wt,getPopupContainer:ft||Ft,transitionName:Qt,trigger:Bt,overlay:be,placement:bn,onVisibleChange:He}),pt))};function se(we){return Object.assign(Object.assign({},we),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ue=(0,ge.Z)(ie,"dropdown",we=>we,se),Se=we=>Me.createElement(ue,Object.assign({},we),Me.createElement("span",null));ie._InternalPanelDoNotUseOrYouWillBeFired=Se,en.Z=ie},38854:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return z}});var Me=Ee(91857),me=Ee(92310),Be=Ee.n(me),ke=Ee(59301),Ce=Ee(18785),Le=Ee(3113),he=Ee(36355),ye=Ee(81327),xe=Ee(33234),ge=Ee(47211),le=function(ee,oe){var ie={};for(var se in ee)Object.prototype.hasOwnProperty.call(ee,se)&&oe.indexOf(se)<0&&(ie[se]=ee[se]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,se=Object.getOwnPropertySymbols(ee);ue<se.length;ue++)oe.indexOf(se[ue])<0&&Object.prototype.propertyIsEnumerable.call(ee,se[ue])&&(ie[se[ue]]=ee[se[ue]]);return ie};const ve=ee=>{const{getPopupContainer:oe,getPrefixCls:ie,direction:se}=ke.useContext(he.E_),{prefixCls:ue,type:Se="default",danger:we,disabled:Pe,loading:Ae,onClick:De,htmlType:ze,children:Ze,className:Xe,menu:Ge,arrow:ft,autoFocus:at,overlay:Ct,trigger:et,align:yt,open:st,onOpenChange:zt,placement:lt,getPopupContainer:tt,href:ut,icon:mt=ke.createElement(Ce.Z,null),title:Pt,buttonsRender:gt=be=>be,mouseEnterDelay:Ft,mouseLeaveDelay:Ht,overlayClassName:hn,overlayStyle:Qt,destroyPopupOnHide:bn,dropdownRender:Wt}=ee,Kt=le(ee,["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"]),Jt=ie("dropdown",ue),Yt=`${Jt}-button`,[kt,pt]=(0,ge.Z)(Jt),Bt={menu:Ge,arrow:ft,autoFocus:at,align:yt,disabled:Pe,trigger:Pe?[]:et,onOpenChange:zt,getPopupContainer:tt||oe,mouseEnterDelay:Ft,mouseLeaveDelay:Ht,overlayClassName:hn,overlayStyle:Qt,destroyPopupOnHide:bn,dropdownRender:Wt},{compactSize:xt,compactItemClassnames:vt}=(0,xe.ri)(Jt,se),nt=Be()(Yt,vt,Xe,pt);"overlay"in ee&&(Bt.overlay=Ct),"open"in ee&&(Bt.open=st),"placement"in ee?Bt.placement=lt:Bt.placement=se==="rtl"?"bottomLeft":"bottomRight";const He=ke.createElement(Le.ZP,{type:Se,danger:we,disabled:Pe,loading:Ae,onClick:De,htmlType:ze,href:ut,title:Pt},Ze),Ie=ke.createElement(Le.ZP,{type:Se,danger:we,icon:mt}),[We,Oe]=gt([He,Ie]);return kt(ke.createElement(ye.Z.Compact,Object.assign({className:nt,size:xt,block:!0},Kt),We,ke.createElement(Me.Z,Object.assign({},Bt),Oe)))};ve.__ANT_BUTTON=!0;var de=ve;const ce=Me.Z;ce.Button=de;var z=ce},47211:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return le}});var Me=Ee(17313),me=Ee(13826),Be=Ee(92899),ke=Ee(29878),Ce=Ee(19447),Le=Ee(83116),he=Ee(37613),xe=ve=>{const{componentCls:de,menuCls:ce,colorError:z,colorTextLightSolid:ee}=ve,oe=`${ce}-item`;return{[`${de}, ${de}-menu-submenu`]:{[`${ce} ${oe}`]:{[`&${oe}-danger:not(${oe}-disabled)`]:{color:z,"&:hover":{color:ee,backgroundColor:z}}}}}};const ge=ve=>{const{componentCls:de,menuCls:ce,zIndexPopup:z,dropdownArrowDistance:ee,sizePopupArrow:oe,antCls:ie,iconCls:se,motionDurationMid:ue,dropdownPaddingVertical:Se,fontSize:we,dropdownEdgeChildPadding:Pe,colorTextDisabled:Ae,fontSizeIcon:De,controlPaddingHorizontal:ze,colorBgElevated:Ze}=ve;return[{[de]:Object.assign(Object.assign({},(0,Me.Wf)(ve)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:z,display:"block","&::before":{position:"absolute",insetBlock:-ee+oe/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${ie}-btn`]:{[`& > ${se}-down, & > ${ie}-btn-icon > ${se}-down`]:{fontSize:De}},[`${de}-wrap`]:{position:"relative",[`${ie}-btn > ${se}-down`]:{fontSize:De},[`${se}-down::before`]:{transition:`transform ${ue}`}},[`${de}-wrap-open`]:{[`${se}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${ie}-slide-down-enter${ie}-slide-down-enter-active${de}-placement-bottomLeft,
|
|
|
&${ie}-slide-down-appear${ie}-slide-down-appear-active${de}-placement-bottomLeft,
|
|
|
&${ie}-slide-down-enter${ie}-slide-down-enter-active${de}-placement-bottom,
|
|
|
&${ie}-slide-down-appear${ie}-slide-down-appear-active${de}-placement-bottom,
|
|
|
&${ie}-slide-down-enter${ie}-slide-down-enter-active${de}-placement-bottomRight,
|
|
|
&${ie}-slide-down-appear${ie}-slide-down-appear-active${de}-placement-bottomRight`]:{animationName:me.fJ},[`&${ie}-slide-up-enter${ie}-slide-up-enter-active${de}-placement-topLeft,
|
|
|
&${ie}-slide-up-appear${ie}-slide-up-appear-active${de}-placement-topLeft,
|
|
|
&${ie}-slide-up-enter${ie}-slide-up-enter-active${de}-placement-top,
|
|
|
&${ie}-slide-up-appear${ie}-slide-up-appear-active${de}-placement-top,
|
|
|
&${ie}-slide-up-enter${ie}-slide-up-enter-active${de}-placement-topRight,
|
|
|
&${ie}-slide-up-appear${ie}-slide-up-appear-active${de}-placement-topRight`]:{animationName:me.Qt},[`&${ie}-slide-down-leave${ie}-slide-down-leave-active${de}-placement-bottomLeft,
|
|
|
&${ie}-slide-down-leave${ie}-slide-down-leave-active${de}-placement-bottom,
|
|
|
&${ie}-slide-down-leave${ie}-slide-down-leave-active${de}-placement-bottomRight`]:{animationName:me.Uw},[`&${ie}-slide-up-leave${ie}-slide-up-leave-active${de}-placement-topLeft,
|
|
|
&${ie}-slide-up-leave${ie}-slide-up-leave-active${de}-placement-top,
|
|
|
&${ie}-slide-up-leave${ie}-slide-up-leave-active${de}-placement-topRight`]:{animationName:me.ly}})},(0,Ce.ZP)(ve,{colorBg:Ze,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${de} ${ce}`]:{position:"relative",margin:0},[`${ce}-submenu-popup`]:{position:"absolute",zIndex:z,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${de}, ${de}-menu-submenu`]:{[ce]:Object.assign(Object.assign({padding:Pe,listStyleType:"none",backgroundColor:Ze,backgroundClip:"padding-box",borderRadius:ve.borderRadiusLG,outline:"none",boxShadow:ve.boxShadowSecondary},(0,Me.Qy)(ve)),{[`${ce}-item-group-title`]:{padding:`${Se}px ${ze}px`,color:ve.colorTextDescription,transition:`all ${ue}`},[`${ce}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ce}-item-icon`]:{minWidth:we,marginInlineEnd:ve.marginXS,fontSize:ve.fontSizeSM},[`${ce}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ue}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ce}-item, ${ce}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Se}px ${ze}px`,color:ve.colorText,fontWeight:"normal",fontSize:we,lineHeight:ve.lineHeight,cursor:"pointer",transition:`all ${ue}`,borderRadius:ve.borderRadiusSM,"&:hover, &-active":{backgroundColor:ve.controlItemBgHover}},(0,Me.Qy)(ve)),{"&-selected":{color:ve.colorPrimary,backgroundColor:ve.controlItemBgActive,"&:hover, &-active":{backgroundColor:ve.controlItemBgActiveHover}},"&-disabled":{color:Ae,cursor:"not-allowed","&:hover":{color:Ae,backgroundColor:Ze,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ve.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:ve.colorSplit},[`${de}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:ve.paddingXS,[`${de}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:ve.colorTextDescription,fontSize:De,fontStyle:"normal"}}}),[`${ce}-item-group-list`]:{margin:`0 ${ve.marginXS}px`,padding:0,listStyle:"none"},[`${ce}-submenu-title`]:{paddingInlineEnd:ze+ve.fontSizeSM},[`${ce}-submenu-vertical`]:{position:"relative"},[`${ce}-submenu${ce}-submenu-disabled ${de}-menu-submenu-title`]:{[`&, ${de}-menu-submenu-arrow-icon`]:{color:Ae,backgroundColor:Ze,cursor:"not-allowed"}},[`${ce}-submenu-selected ${de}-menu-submenu-title`]:{color:ve.colorPrimary}})}},[(0,me.oN)(ve,"slide-up"),(0,me.oN)(ve,"slide-down"),(0,Be.Fm)(ve,"move-up"),(0,Be.Fm)(ve,"move-down"),(0,ke._y)(ve,"zoom-big")]]};var le=(0,Le.Z)("Dropdown",(ve,de)=>{let{rootPrefixCls:ce}=de;const{marginXXS:z,sizePopupArrow:ee,controlHeight:oe,fontSize:ie,lineHeight:se,paddingXXS:ue,componentCls:Se,borderRadiusLG:we}=ve,Pe=(oe-ie*se)/2,{dropdownArrowOffset:Ae}=(0,Ce.fS)({contentRadius:we}),De=(0,he.TS)(ve,{menuCls:`${Se}-menu`,rootPrefixCls:ce,dropdownArrowDistance:ee/2+z,dropdownArrowOffset:Ae,dropdownPaddingVertical:Pe,dropdownEdgeChildPadding:ue});return[ge(De),xe(De)]},ve=>({zIndexPopup:ve.zIndexPopupBase+50}))},64165:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ue}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(59301),ke=Ee(36355),Ce=Ee(9763),Le=Ee(64993),he=Ee(88088),xe=()=>{const[,Se]=(0,he.Z)(),Pe=new Le.C(Se.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Be.createElement("svg",{style:Pe,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Be.createElement("g",{fill:"none",fillRule:"evenodd"},Be.createElement("g",{transform:"translate(24 31.67)"},Be.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Be.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),Be.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),Be.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),Be.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),Be.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),Be.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Be.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Be.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},le=()=>{const[,Se]=(0,he.Z)(),{colorFill:we,colorFillTertiary:Pe,colorFillQuaternary:Ae,colorBgContainer:De}=Se,{borderColor:ze,shadowColor:Ze,contentColor:Xe}=(0,Be.useMemo)(()=>({borderColor:new Le.C(we).onBackground(De).toHexShortString(),shadowColor:new Le.C(Pe).onBackground(De).toHexShortString(),contentColor:new Le.C(Ae).onBackground(De).toHexShortString()}),[we,Pe,Ae,De]);return Be.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Be.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Be.createElement("ellipse",{fill:Ze,cx:"32",cy:"33",rx:"32",ry:"7"}),Be.createElement("g",{fillRule:"nonzero",stroke:ze},Be.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),Be.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:Xe}))))},ve=Ee(83116),de=Ee(37613);const ce=Se=>{const{componentCls:we,margin:Pe,marginXS:Ae,marginXL:De,fontSize:ze,lineHeight:Ze}=Se;return{[we]:{marginInline:Ae,fontSize:ze,lineHeight:Ze,textAlign:"center",[`${we}-image`]:{height:Se.emptyImgHeight,marginBottom:Ae,opacity:Se.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${we}-description`]:{color:Se.colorText},[`${we}-footer`]:{marginTop:Pe},"&-normal":{marginBlock:De,color:Se.colorTextDisabled,[`${we}-description`]:{color:Se.colorTextDisabled},[`${we}-image`]:{height:Se.emptyImgHeightMD}},"&-small":{marginBlock:Ae,color:Se.colorTextDisabled,[`${we}-image`]:{height:Se.emptyImgHeightSM}}}}};var z=(0,ve.Z)("Empty",Se=>{const{componentCls:we,controlHeightLG:Pe}=Se,Ae=(0,de.TS)(Se,{emptyImgCls:`${we}-img`,emptyImgHeight:Pe*2.5,emptyImgHeightMD:Pe,emptyImgHeightSM:Pe*.875});return[ce(Ae)]}),ee=function(Se,we){var Pe={};for(var Ae in Se)Object.prototype.hasOwnProperty.call(Se,Ae)&&we.indexOf(Ae)<0&&(Pe[Ae]=Se[Ae]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,Ae=Object.getOwnPropertySymbols(Se);De<Ae.length;De++)we.indexOf(Ae[De])<0&&Object.prototype.propertyIsEnumerable.call(Se,Ae[De])&&(Pe[Ae[De]]=Se[Ae[De]]);return Pe};const oe=Be.createElement(xe,null),ie=Be.createElement(le,null),se=Se=>{var{className:we,rootClassName:Pe,prefixCls:Ae,image:De=oe,description:ze,children:Ze,imageStyle:Xe,style:Ge}=Se,ft=ee(Se,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:at,direction:Ct,empty:et}=Be.useContext(ke.E_),yt=at("empty",Ae),[st,zt]=z(yt),[lt]=(0,Ce.Z)("Empty"),tt=typeof ze!="undefined"?ze:lt==null?void 0:lt.description,ut=typeof tt=="string"?tt:"empty";let mt=null;return typeof De=="string"?mt=Be.createElement("img",{alt:ut,src:De}):mt=De,st(Be.createElement("div",Object.assign({className:me()(zt,yt,et==null?void 0:et.className,{[`${yt}-normal`]:De===ie,[`${yt}-rtl`]:Ct==="rtl"},we,Pe),style:Object.assign(Object.assign({},et==null?void 0:et.style),Ge)},ft),Be.createElement("div",{className:`${yt}-image`,style:Xe},mt),tt&&Be.createElement("div",{className:`${yt}-description`},tt),Ze&&Be.createElement("div",{className:`${yt}-footer`},Ze)))};se.PRESENTED_IMAGE_DEFAULT=oe,se.PRESENTED_IMAGE_SIMPLE=ie;var ue=se},78241:function(_n,en,Ee){"use strict";Ee.d(en,{default:function(){return qe}});var Me=Ee(80702),me=Ee(92310),Be=Ee.n(me),ke=Ee(77900),Ce=Ee(59301),Le=Ee(62892),he=Ee(32441);function ye(Ye){const[St,Ot]=Ce.useState(Ye);return Ce.useEffect(()=>{const Tt=setTimeout(()=>{Ot(Ye)},Ye.length?0:10);return()=>{clearTimeout(Tt)}},[Ye]),St}var xe=Ee(17313),ge=Ee(29878),le=Ee(8378),ve=Ee(37613),de=Ee(83116),z=Ye=>{const{componentCls:St}=Ye,Ot=`${St}-show-help`,Tt=`${St}-show-help-item`;return{[Ot]:{transition:`opacity ${Ye.motionDurationSlow} ${Ye.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Tt]:{overflow:"hidden",transition:`height ${Ye.motionDurationSlow} ${Ye.motionEaseInOut},
|
|
|
opacity ${Ye.motionDurationSlow} ${Ye.motionEaseInOut},
|
|
|
transform ${Ye.motionDurationSlow} ${Ye.motionEaseInOut} !important`,[`&${Tt}-appear, &${Tt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Tt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Ye=>({legend:{display:"block",width:"100%",marginBottom:Ye.marginLG,padding:0,color:Ye.colorTextDescription,fontSize:Ye.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Ye.lineWidth}px ${Ye.lineType} ${Ye.colorBorder}`},label:{fontSize:Ye.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 ${Ye.controlOutlineWidth}px ${Ye.controlOutline}`},output:{display:"block",paddingTop:15,color:Ye.colorText,fontSize:Ye.fontSize,lineHeight:Ye.lineHeight}}),oe=(Ye,St)=>{const{formItemCls:Ot}=Ye;return{[Ot]:{[`${Ot}-label > label`]:{height:St},[`${Ot}-control-input`]:{minHeight:St}}}},ie=Ye=>{const{componentCls:St}=Ye;return{[Ye.componentCls]:Object.assign(Object.assign(Object.assign({},(0,xe.Wf)(Ye)),ee(Ye)),{[`${St}-text`]:{display:"inline-block",paddingInlineEnd:Ye.paddingSM},"&-small":Object.assign({},oe(Ye,Ye.controlHeightSM)),"&-large":Object.assign({},oe(Ye,Ye.controlHeightLG))})}},se=Ye=>{const{formItemCls:St,iconCls:Ot,componentCls:Tt,rootPrefixCls:_t,labelRequiredMarkColor:dn,labelColor:Pn,labelFontSize:mn,labelHeight:sn,labelColonMarginInlineStart:Nt,labelColonMarginInlineEnd:un,itemMarginBottom:Ln}=Ye;return{[St]:Object.assign(Object.assign({},(0,xe.Wf)(Ye)),{marginBottom:Ln,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${_t}-row`]:{display:"none"},"&-has-warning":{[`${St}-split`]:{color:Ye.colorError}},"&-has-error":{[`${St}-split`]:{color:Ye.colorWarning}},[`${St}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Ye.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:sn,color:Pn,fontSize:mn,[`> ${Ot}`]:{fontSize:Ye.fontSize,verticalAlign:"top"},[`&${St}-required:not(${St}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Ye.marginXXS,color:dn,fontSize:Ye.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Tt}-hide-required-mark &`]:{display:"none"}},[`${St}-optional`]:{display:"inline-block",marginInlineStart:Ye.marginXXS,color:Ye.colorTextDescription,[`${Tt}-hide-required-mark &`]:{display:"none"}},[`${St}-tooltip`]:{color:Ye.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ye.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Nt,marginInlineEnd:un},[`&${St}-no-colon::after`]:{content:'"\\a0"'}}},[`${St}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${_t}-col-'"]):not([class*="' ${_t}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ye.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[St]:{"&-explain, &-extra":{clear:"both",color:Ye.colorTextDescription,fontSize:Ye.fontSize,lineHeight:Ye.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ye.controlHeightSM,transition:`color ${Ye.motionDurationMid} ${Ye.motionEaseOut}`},"&-explain":{"&-error":{color:Ye.colorError},"&-warning":{color:Ye.colorWarning}}},[`&-with-help ${St}-explain`]:{height:"auto",opacity:1},[`${St}-feedback-icon`]:{fontSize:Ye.fontSize,textAlign:"center",visibility:"visible",animationName:ge.kr,animationDuration:Ye.motionDurationMid,animationTimingFunction:Ye.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ye.colorSuccess},"&-error":{color:Ye.colorError},"&-warning":{color:Ye.colorWarning},"&-validating":{color:Ye.colorPrimary}}})}},ue=Ye=>{const{componentCls:St,formItemCls:Ot}=Ye;return{[`${St}-horizontal`]:{[`${Ot}-label`]:{flexGrow:0},[`${Ot}-control`]:{flex:"1 1 0",minWidth:0},[`${Ot}-label[class$='-24'], ${Ot}-label[class*='-24 ']`]:{[`& + ${Ot}-control`]:{minWidth:"unset"}}}}},Se=Ye=>{const{componentCls:St,formItemCls:Ot}=Ye;return{[`${St}-inline`]:{display:"flex",flexWrap:"wrap",[Ot]:{flex:"none",marginInlineEnd:Ye.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${Ot}-label,
|
|
|
> ${Ot}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Ot}-label`]:{flex:"none"},[`${St}-text`]:{display:"inline-block"},[`${Ot}-has-feedback`]:{display:"inline-block"}}}}},we=Ye=>({padding:Ye.verticalLabelPadding,margin:Ye.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Pe=Ye=>{const{componentCls:St,formItemCls:Ot,rootPrefixCls:Tt}=Ye;return{[`${Ot} ${Ot}-label`]:we(Ye),[St]:{[Ot]:{flexWrap:"wrap",[`${Ot}-label, ${Ot}-control`]:{[`&:not([class*=" ${Tt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ae=Ye=>{const{componentCls:St,formItemCls:Ot,rootPrefixCls:Tt}=Ye;return{[`${St}-vertical`]:{[Ot]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${St}-item-control`]:{width:"100%"}}},[`${St}-vertical ${Ot}-label,
|
|
|
.${Tt}-col-24${Ot}-label,
|
|
|
.${Tt}-col-xl-24${Ot}-label`]:we(Ye),[`@media (max-width: ${Ye.screenXSMax}px)`]:[Pe(Ye),{[St]:{[`.${Tt}-col-xs-24${Ot}-label`]:we(Ye)}}],[`@media (max-width: ${Ye.screenSMMax}px)`]:{[St]:{[`.${Tt}-col-sm-24${Ot}-label`]:we(Ye)}},[`@media (max-width: ${Ye.screenMDMax}px)`]:{[St]:{[`.${Tt}-col-md-24${Ot}-label`]:we(Ye)}},[`@media (max-width: ${Ye.screenLGMax}px)`]:{[St]:{[`.${Tt}-col-lg-24${Ot}-label`]:we(Ye)}}}},De=(Ye,St)=>(0,ve.TS)(Ye,{formItemCls:`${Ye.componentCls}-item`,rootPrefixCls:St});var ze=(0,de.Z)("Form",(Ye,St)=>{let{rootPrefixCls:Ot}=St;const Tt=De(Ye,Ot);return[ie(Tt),se(Tt),z(Tt),ue(Tt),Se(Tt),Ae(Tt),(0,le.Z)(Tt),ge.kr]},Ye=>({labelRequiredMarkColor:Ye.colorError,labelColor:Ye.colorTextHeading,labelFontSize:Ye.fontSize,labelHeight:Ye.controlHeight,labelColonMarginInlineStart:Ye.marginXXS/2,labelColonMarginInlineEnd:Ye.marginXS,itemMarginBottom:Ye.marginLG,verticalLabelPadding:`0 0 ${Ye.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ze=[];function Xe(Ye,St,Ot){let Tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ye=="string"?Ye:`${St}-${Tt}`,error:Ye,errorStatus:Ot}}var ft=Ye=>{let{help:St,helpStatus:Ot,errors:Tt=Ze,warnings:_t=Ze,className:dn,fieldId:Pn,onVisibleChanged:mn}=Ye;const{prefixCls:sn}=Ce.useContext(he.Rk),Nt=`${sn}-item-explain`,[,un]=ze(sn),Ln=(0,Ce.useMemo)(()=>(0,Le.Z)(sn),[sn]),Dn=ye(Tt),$t=ye(_t),rn=Ce.useMemo(()=>St!=null?[Xe(St,"help",Ot)]:[].concat((0,Me.Z)(Dn.map((On,ei)=>Xe(On,"error","error",ei))),(0,Me.Z)($t.map((On,ei)=>Xe(On,"warning","warning",ei)))),[St,Ot,Dn,$t]),jn={};return Pn&&(jn.id=`${Pn}_help`),Ce.createElement(ke.default,{motionDeadline:Ln.motionDeadline,motionName:`${sn}-show-help`,visible:!!rn.length,onVisibleChanged:mn},On=>{const{className:ei,style:Gn}=On;return Ce.createElement("div",Object.assign({},jn,{className:Be()(Nt,ei,dn,un),style:Gn,role:"alert"}),Ce.createElement(ke.CSSMotionList,Object.assign({keys:rn},(0,Le.Z)(sn),{motionName:`${sn}-show-help-item`,component:!1}),ti=>{const{key:Bn,error:li,errorStatus:Di,className:Ri,style:Mn}=ti;return Ce.createElement("div",{key:Bn,className:Be()(Ri,{[`${Nt}-${Di}`]:Di}),style:Mn},li)}))})},at=Ee(95013),Ct=Ee(36355),et=Ee(1684),yt=Ee(52946),st=Ee(19716),zt=Ee(16722);const lt=["parentNode"],tt="form_item";function ut(Ye){return Ye===void 0||Ye===!1?[]:Array.isArray(Ye)?Ye:[Ye]}function mt(Ye,St){if(!Ye.length)return;const Ot=Ye.join("_");return St?`${St}_${Ot}`:lt.includes(Ot)?`${tt}_${Ot}`:Ot}function Pt(Ye,St,Ot,Tt,_t,dn){let Pn=Tt;return dn!==void 0?Pn=dn:Ot.validating?Pn="validating":Ye.length?Pn="error":St.length?Pn="warning":(Ot.touched||_t&&Ot.validated)&&(Pn="success"),Pn}function gt(Ye){return ut(Ye).join("_")}function Ft(Ye){const[St]=(0,at.useForm)(),Ot=Ce.useRef({}),Tt=Ce.useMemo(()=>Ye!=null?Ye:Object.assign(Object.assign({},St),{__INTERNAL__:{itemRef:_t=>dn=>{const Pn=gt(_t);dn?Ot.current[Pn]=dn:delete Ot.current[Pn]}},scrollToField:function(_t){let dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Pn=ut(_t),mn=mt(Pn,Tt.__INTERNAL__.name),sn=mn?document.getElementById(mn):null;sn&&(0,zt.Z)(sn,Object.assign({scrollMode:"if-needed",block:"nearest"},dn))},getFieldInstance:_t=>{const dn=gt(_t);return Ot.current[dn]}}),[Ye,St]);return[Tt]}var Ht=Ee(28726),hn=function(Ye,St){var Ot={};for(var Tt in Ye)Object.prototype.hasOwnProperty.call(Ye,Tt)&&St.indexOf(Tt)<0&&(Ot[Tt]=Ye[Tt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Ye);_t<Tt.length;_t++)St.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Tt[_t])&&(Ot[Tt[_t]]=Ye[Tt[_t]]);return Ot};const Qt=(Ye,St)=>{const Ot=Ce.useContext(et.Z),{getPrefixCls:Tt,direction:_t,form:dn}=Ce.useContext(Ct.E_),{prefixCls:Pn,className:mn,rootClassName:sn,size:Nt,disabled:un=Ot,form:Ln,colon:Dn,labelAlign:$t,labelWrap:rn,labelCol:jn,wrapperCol:On,hideRequiredMark:ei,layout:Gn="horizontal",scrollToFirstError:ti,requiredMark:Bn,onFinishFailed:li,name:Di,style:Ri,feedbackIcons:Mn}=Ye,Xi=hn(Ye,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Nr=(0,st.Z)(Nt),zi=Ce.useContext(Ht.Z),En=(0,Ce.useMemo)(()=>Bn!==void 0?Bn:dn&&dn.requiredMark!==void 0?dn.requiredMark:!ei,[ei,Bn,dn]),Jn=Dn!=null?Dn:dn==null?void 0:dn.colon,fi=Tt("form",Pn),[Si,hi]=ze(fi),Oi=Be()(fi,`${fi}-${Gn}`,{[`${fi}-hide-required-mark`]:En===!1,[`${fi}-rtl`]:_t==="rtl",[`${fi}-${Nr}`]:Nr},hi,dn==null?void 0:dn.className,mn,sn),[tr]=Ft(Ln),{__INTERNAL__:Fi}=tr;Fi.name=Di;const Hi=(0,Ce.useMemo)(()=>({name:Di,labelAlign:$t,labelCol:jn,labelWrap:rn,wrapperCol:On,vertical:Gn==="vertical",colon:Jn,requiredMark:En,itemRef:Fi.itemRef,form:tr,feedbackIcons:Mn}),[Di,$t,jn,On,Gn,Jn,En,tr,Mn]);Ce.useImperativeHandle(St,()=>tr);const mr=(Br,Nn)=>{if(Br){let vr={block:"nearest"};typeof Br=="object"&&(vr=Br),tr.scrollToField(Nn,vr)}},Rn=Br=>{if(li==null||li(Br),Br.errorFields.length){const Nn=Br.errorFields[0].name;if(ti!==void 0){mr(ti,Nn);return}dn&&dn.scrollToFirstError!==void 0&&mr(dn.scrollToFirstError,Nn)}};return Si(Ce.createElement(et.n,{disabled:un},Ce.createElement(yt.q,{size:Nr},Ce.createElement(he.RV,Object.assign({},{validateMessages:zi}),Ce.createElement(he.q3.Provider,{value:Hi},Ce.createElement(at.default,Object.assign({id:Di},Xi,{name:Di,onFinishFailed:Rn,form:tr,style:Object.assign(Object.assign({},dn==null?void 0:dn.style),Ri),className:Oi})))))))};var Wt=Ce.forwardRef(Qt),Kt=Ee(41799),Jt=Ee(8654),Yt=Ee(92343),kt=Ee(11592);function pt(Ye){if(typeof Ye=="function")return Ye;const St=(0,kt.Z)(Ye);return St.length<=1?St[0]:St}const Bt=()=>{const{status:Ye,errors:St=[],warnings:Ot=[]}=(0,Ce.useContext)(he.aM);return{status:Ye,errors:St,warnings:Ot}};Bt.Context=he.aM;var xt=Bt,vt=Ee(16089);function nt(Ye){const[St,Ot]=Ce.useState(Ye),Tt=(0,Ce.useRef)(null),_t=(0,Ce.useRef)([]),dn=(0,Ce.useRef)(!1);Ce.useEffect(()=>(dn.current=!1,()=>{dn.current=!0,vt.Z.cancel(Tt.current),Tt.current=null}),[]);function Pn(mn){dn.current||(Tt.current===null&&(_t.current=[],Tt.current=(0,vt.Z)(()=>{Tt.current=null,Ot(sn=>{let Nt=sn;return _t.current.forEach(un=>{Nt=un(Nt)}),Nt})})),_t.current.push(mn))}return[St,Pn]}function He(){const{itemRef:Ye}=Ce.useContext(he.q3),St=Ce.useRef({});function Ot(Tt,_t){const dn=_t&&typeof _t=="object"&&_t.ref,Pn=Tt.join("_");return(St.current.name!==Pn||St.current.originRef!==dn)&&(St.current.name=Pn,St.current.originRef=dn,St.current.ref=(0,Jt.sQ)(Ye(Tt),dn)),St.current.ref}return Ot}var Ie=Ee(29194),We=Ee(34280),Oe=Ee(2738),be=Ee(27382),Ne=Ee(37028);const $e=Ye=>{const{formItemCls:St}=Ye;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${St}-control`]:{display:"flex"}}}};var dt=(0,de.b)(["Form","item-item"],(Ye,St)=>{let{rootPrefixCls:Ot}=St;const Tt=De(Ye,Ot);return[$e(Tt)]}),At=Ye=>{const{prefixCls:St,status:Ot,wrapperCol:Tt,children:_t,errors:dn,warnings:Pn,_internalItemRender:mn,extra:sn,help:Nt,fieldId:un,marginBottom:Ln,onErrorVisibleChanged:Dn}=Ye,$t=`${St}-item`,rn=Ce.useContext(he.q3),jn=Tt||rn.wrapperCol||{},On=Be()(`${$t}-control`,jn.className),ei=Ce.useMemo(()=>Object.assign({},rn),[rn]);delete ei.labelCol,delete ei.wrapperCol;const Gn=Ce.createElement("div",{className:`${$t}-control-input`},Ce.createElement("div",{className:`${$t}-control-input-content`},_t)),ti=Ce.useMemo(()=>({prefixCls:St,status:Ot}),[St,Ot]),Bn=Ln!==null||dn.length||Pn.length?Ce.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ce.createElement(he.Rk.Provider,{value:ti},Ce.createElement(ft,{fieldId:un,errors:dn,warnings:Pn,help:Nt,helpStatus:Ot,className:`${$t}-explain-connected`,onVisibleChanged:Dn})),!!Ln&&Ce.createElement("div",{style:{width:0,height:Ln}})):null,li={};un&&(li.id=`${un}_extra`);const Di=sn?Ce.createElement("div",Object.assign({},li,{className:`${$t}-extra`}),sn):null,Ri=mn&&mn.mark==="pro_table_render"&&mn.render?mn.render(Ye,{input:Gn,errorList:Bn,extra:Di}):Ce.createElement(Ce.Fragment,null,Gn,Bn,Di);return Ce.createElement(he.q3.Provider,{value:ei},Ce.createElement(Ne.Z,Object.assign({},jn,{className:On}),Ri),Ce.createElement(dt,{prefixCls:St}))},tn=Ee(61485),pn=Ee(31724),ln=Ee(9763),gn=Ee(6848),Hn=function(Ye,St){var Ot={};for(var Tt in Ye)Object.prototype.hasOwnProperty.call(Ye,Tt)&&St.indexOf(Tt)<0&&(Ot[Tt]=Ye[Tt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Ye);_t<Tt.length;_t++)St.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Tt[_t])&&(Ot[Tt[_t]]=Ye[Tt[_t]]);return Ot};function An(Ye){return Ye?typeof Ye=="object"&&!Ce.isValidElement(Ye)?Ye:{title:Ye}:null}var ai=Ye=>{let{prefixCls:St,label:Ot,htmlFor:Tt,labelCol:_t,labelAlign:dn,colon:Pn,required:mn,requiredMark:sn,tooltip:Nt}=Ye;var un;const[Ln]=(0,ln.Z)("Form"),{vertical:Dn,labelAlign:$t,labelCol:rn,labelWrap:jn,colon:On}=Ce.useContext(he.q3);if(!Ot)return null;const ei=_t||rn||{},Gn=dn||$t,ti=`${St}-item-label`,Bn=Be()(ti,Gn==="left"&&`${ti}-left`,ei.className,{[`${ti}-wrap`]:!!jn});let li=Ot;const Di=Pn===!0||On!==!1&&Pn!==!1;Di&&!Dn&&typeof Ot=="string"&&Ot.trim()!==""&&(li=Ot.replace(/[:|:]\s*$/,""));const Mn=An(Nt);if(Mn){const{icon:En=Ce.createElement(tn.Z,null)}=Mn,Jn=Hn(Mn,["icon"]),fi=Ce.createElement(gn.Z,Object.assign({},Jn),Ce.cloneElement(En,{className:`${St}-item-tooltip`,title:""}));li=Ce.createElement(Ce.Fragment,null,li,fi)}const Xi=sn==="optional",Nr=typeof sn=="function";Nr?li=sn(li,{required:!!mn}):Xi&&!mn&&(li=Ce.createElement(Ce.Fragment,null,li,Ce.createElement("span",{className:`${St}-item-optional`,title:""},(Ln==null?void 0:Ln.optional)||((un=pn.Z.Form)===null||un===void 0?void 0:un.optional))));const zi=Be()({[`${St}-item-required`]:mn,[`${St}-item-required-mark-optional`]:Xi||Nr,[`${St}-item-no-colon`]:!Di});return Ce.createElement(Ne.Z,Object.assign({},ei,{className:Bn}),Ce.createElement("label",{htmlFor:Tt,className:zi,title:typeof Ot=="string"?Ot:""},li))},Ti=Ee(29679),Ci=Ee(19248),$i=Ee(96512),or=Ee(58617);const lr={success:Ti.Z,warning:$i.Z,error:Ci.Z,validating:or.Z};function qi(Ye){let{children:St,errors:Ot,warnings:Tt,hasFeedback:_t,validateStatus:dn,prefixCls:Pn,meta:mn,noStyle:sn}=Ye;const Nt=`${Pn}-item`,{feedbackIcons:un}=Ce.useContext(he.q3),Ln=Pt(Ot,Tt,mn,null,!!_t,dn),{isFormItemInput:Dn,status:$t}=Ce.useContext(he.aM),rn=Ce.useMemo(()=>{var jn;let On;if(_t){const ti=_t!==!0&&_t.icons||un,Bn=Ln&&((jn=ti==null?void 0:ti({status:Ln,errors:Ot,warnings:Tt}))===null||jn===void 0?void 0:jn[Ln]),li=Ln&&lr[Ln];On=Bn!==!1&&li?Ce.createElement("span",{className:Be()(`${Nt}-feedback-icon`,`${Nt}-feedback-icon-${Ln}`)},Bn||Ce.createElement(li,null)):null}let ei=!0,Gn=Ln||"";return sn&&(ei=Dn,Gn=(Ln!=null?Ln:$t)||""),{status:Gn,errors:Ot,warnings:Tt,hasFeedback:!!_t,feedbackIcon:On,isFormItemInput:ei}},[Ln,_t,sn,Dn,$t]);return Ce.createElement(he.aM.Provider,{value:rn},St)}var Fr=function(Ye,St){var Ot={};for(var Tt in Ye)Object.prototype.hasOwnProperty.call(Ye,Tt)&&St.indexOf(Tt)<0&&(Ot[Tt]=Ye[Tt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Ye);_t<Tt.length;_t++)St.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Tt[_t])&&(Ot[Tt[_t]]=Ye[Tt[_t]]);return Ot};function Mr(Ye){const{prefixCls:St,className:Ot,rootClassName:Tt,style:_t,help:dn,errors:Pn,warnings:mn,validateStatus:sn,meta:Nt,hasFeedback:un,hidden:Ln,children:Dn,fieldId:$t,required:rn,isRequired:jn,onSubItemMetaChange:On}=Ye,ei=Fr(Ye,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Gn=`${St}-item`,{requiredMark:ti}=Ce.useContext(he.q3),Bn=Ce.useRef(null),li=ye(Pn),Di=ye(mn),Ri=dn!=null,Mn=!!(Ri||Pn.length||mn.length),Xi=!!Bn.current&&(0,Ie.Z)(Bn.current),[Nr,zi]=Ce.useState(null);(0,We.Z)(()=>{if(Mn&&Bn.current){const hi=getComputedStyle(Bn.current);zi(parseInt(hi.marginBottom,10))}},[Mn,Xi]);const En=hi=>{hi||zi(null)},fi=function(){let hi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Oi=hi?li:Nt.errors,tr=hi?Di:Nt.warnings;return Pt(Oi,tr,Nt,"",!!un,sn)}(),Si=Be()(Gn,Ot,Tt,{[`${Gn}-with-help`]:Ri||li.length||Di.length,[`${Gn}-has-feedback`]:fi&&un,[`${Gn}-has-success`]:fi==="success",[`${Gn}-has-warning`]:fi==="warning",[`${Gn}-has-error`]:fi==="error",[`${Gn}-is-validating`]:fi==="validating",[`${Gn}-hidden`]:Ln});return Ce.createElement("div",{className:Si,style:_t,ref:Bn},Ce.createElement(be.Z,Object.assign({className:`${Gn}-row`},(0,Oe.Z)(ei,["_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(ai,Object.assign({htmlFor:$t},Ye,{requiredMark:ti,required:rn!=null?rn:jn,prefixCls:St})),Ce.createElement(At,Object.assign({},Ye,Nt,{errors:li,warnings:Di,prefixCls:St,status:fi,help:dn,marginBottom:Nr,onErrorVisibleChanged:En}),Ce.createElement(he.qI.Provider,{value:On},Ce.createElement(qi,{prefixCls:St,meta:Nt,errors:Nt.errors,warnings:Nt.warnings,hasFeedback:un,validateStatus:fi},Dn)))),!!Nr&&Ce.createElement("div",{className:`${Gn}-margin-offset`,style:{marginBottom:-Nr}}))}const yi="__SPLIT__",dr=null,Zi=Ce.memo(Ye=>{let{children:St}=Ye;return St},(Ye,St)=>Ye.value===St.value&&Ye.update===St.update&&Ye.childProps.length===St.childProps.length&&Ye.childProps.every((Ot,Tt)=>Ot===St.childProps[Tt]));function rt(Ye){return Ye!=null}function Ir(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Ar(Ye){const{name:St,noStyle:Ot,className:Tt,dependencies:_t,prefixCls:dn,shouldUpdate:Pn,rules:mn,children:sn,required:Nt,label:un,messageVariables:Ln,trigger:Dn="onChange",validateTrigger:$t,hidden:rn,help:jn}=Ye,{getPrefixCls:On}=Ce.useContext(Ct.E_),{name:ei}=Ce.useContext(he.q3),Gn=pt(sn),ti=typeof Gn=="function",Bn=Ce.useContext(he.qI),{validateTrigger:li}=Ce.useContext(at.FieldContext),Di=$t!==void 0?$t:li,Ri=rt(St),Mn=On("form",dn),[Xi,Nr]=ze(Mn),zi=Ce.useContext(at.ListContext),En=Ce.useRef(),[Jn,fi]=nt({}),[Si,hi]=(0,Kt.Z)(()=>Ir()),Oi=Nn=>{const vr=zi==null?void 0:zi.getKey(Nn.name);if(hi(Nn.destroy?Ir():Nn,!0),Ot&&jn!==!1&&Bn){let So=Nn.name;if(Nn.destroy)So=En.current||So;else if(vr!==void 0){const[Dr,Co]=vr;So=[Dr].concat((0,Me.Z)(Co)),En.current=So}Bn(Nn,So)}},tr=(Nn,vr)=>{fi(So=>{const Dr=Object.assign({},So),ho=[].concat((0,Me.Z)(Nn.name.slice(0,-1)),(0,Me.Z)(vr)).join(yi);return Nn.destroy?delete Dr[ho]:Dr[ho]=Nn,Dr})},[Fi,Hi]=Ce.useMemo(()=>{const Nn=(0,Me.Z)(Si.errors),vr=(0,Me.Z)(Si.warnings);return Object.values(Jn).forEach(So=>{Nn.push.apply(Nn,(0,Me.Z)(So.errors||[])),vr.push.apply(vr,(0,Me.Z)(So.warnings||[]))}),[Nn,vr]},[Jn,Si.errors,Si.warnings]),mr=He();function Rn(Nn,vr,So){return Ot&&!rn?Ce.createElement(qi,{prefixCls:Mn,hasFeedback:Ye.hasFeedback,validateStatus:Ye.validateStatus,meta:Si,errors:Fi,warnings:Hi,noStyle:!0},Nn):Ce.createElement(Mr,Object.assign({key:"row"},Ye,{className:Be()(Tt,Nr),prefixCls:Mn,fieldId:vr,isRequired:So,errors:Fi,warnings:Hi,meta:Si,onSubItemMetaChange:tr}),Nn)}if(!Ri&&!ti&&!_t)return Xi(Rn(Gn));let Br={};return typeof un=="string"?Br.label=un:St&&(Br.label=String(St)),Ln&&(Br=Object.assign(Object.assign({},Br),Ln)),Xi(Ce.createElement(at.Field,Object.assign({},Ye,{messageVariables:Br,trigger:Dn,validateTrigger:Di,onMetaChange:Oi}),(Nn,vr,So)=>{const Dr=ut(St).length&&vr?vr.name:[],Co=mt(Dr,ei),ho=Nt!==void 0?Nt:!!(mn&&mn.some(hr=>{if(hr&&typeof hr=="object"&&hr.required&&!hr.warningOnly)return!0;if(typeof hr=="function"){const Pr=hr(So);return Pr&&Pr.required&&!Pr.warningOnly}return!1})),Yi=Object.assign({},Nn);let Ui=null;if(Array.isArray(Gn)&&Ri)Ui=Gn;else if(!(ti&&(!(Pn||_t)||Ri))){if(!(_t&&!ti&&!Ri))if((0,Yt.l$)(Gn)){const hr=Object.assign(Object.assign({},Gn.props),Yi);if(hr.id||(hr.id=Co),jn||Fi.length>0||Hi.length>0||Ye.extra){const Mt=[];(jn||Fi.length>0)&&Mt.push(`${Co}_help`),Ye.extra&&Mt.push(`${Co}_extra`),hr["aria-describedby"]=Mt.join(" ")}Fi.length>0&&(hr["aria-invalid"]="true"),ho&&(hr["aria-required"]="true"),(0,Jt.Yr)(Gn)&&(hr.ref=mr(Dr,Gn)),new Set([].concat((0,Me.Z)(ut(Dn)),(0,Me.Z)(ut(Di)))).forEach(Mt=>{hr[Mt]=function(){for(var Ur,Hr,ts,Ao,ss,_r=arguments.length,fr=new Array(_r),Kr=0;Kr<_r;Kr++)fr[Kr]=arguments[Kr];(ts=Yi[Mt])===null||ts===void 0||(Ur=ts).call.apply(Ur,[Yi].concat(fr)),(ss=(Ao=Gn.props)[Mt])===null||ss===void 0||(Hr=ss).call.apply(Hr,[Ao].concat(fr))}});const ci=[hr["aria-required"],hr["aria-invalid"],hr["aria-describedby"]];Ui=Ce.createElement(Zi,{value:Yi[Ye.valuePropName||"value"],update:Gn,childProps:ci},(0,Yt.Tm)(Gn,hr))}else ti&&(Pn||_t)&&!Ri?Ui=Gn(So):Ui=Gn}return Rn(Ui,Co,ho)}))}const $r=Ar;$r.useStatus=xt;var co=$r,mo=function(Ye,St){var Ot={};for(var Tt in Ye)Object.prototype.hasOwnProperty.call(Ye,Tt)&&St.indexOf(Tt)<0&&(Ot[Tt]=Ye[Tt]);if(Ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Tt=Object.getOwnPropertySymbols(Ye);_t<Tt.length;_t++)St.indexOf(Tt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ye,Tt[_t])&&(Ot[Tt[_t]]=Ye[Tt[_t]]);return Ot},lo=Ye=>{var{prefixCls:St,children:Ot}=Ye,Tt=mo(Ye,["prefixCls","children"]);const{getPrefixCls:_t}=Ce.useContext(Ct.E_),dn=_t("form",St),Pn=Ce.useMemo(()=>({prefixCls:dn,status:"error"}),[dn]);return Ce.createElement(at.List,Object.assign({},Tt),(mn,sn,Nt)=>Ce.createElement(he.Rk.Provider,{value:Pn},Ot(mn.map(un=>Object.assign(Object.assign({},un),{fieldKey:un.key})),sn,{errors:Nt.errors,warnings:Nt.warnings})))};function ri(){const{form:Ye}=(0,Ce.useContext)(he.q3);return Ye}const Ke=Wt;Ke.Item=co,Ke.List=lo,Ke.ErrorList=ft,Ke.useForm=Ft,Ke.useFormInstance=ri,Ke.useWatch=at.useWatch,Ke.Provider=he.RV,Ke.create=()=>{};var qe=Ke},8628:function(_n,en,Ee){"use strict";var Me=Ee(59301),me=Ee(34280),Be=Ee(56762),ke=Ee(69507);function Ce(){let Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const he=(0,Me.useRef)({}),ye=(0,Be.Z)(),xe=(0,ke.ZP)();return(0,me.Z)(()=>{const ge=xe.subscribe(le=>{he.current=le,Le&&ye()});return()=>xe.unsubscribe(ge)},[]),he.current}en.Z=Ce},11611:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return Pn}});var Me=Ee(59301),me=Ee(15277),Be=Ee(92310),ke=Ee.n(Be),Ce=Ee(72308),Le=Ee(77321),he=Ee(49618),ye=Ee(52487),xe=Ee(62853),ge=Ee(74416),le=Ee(55468),ve=Ee(18929),de=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],ce=Me.createContext(null),z=0;function ee(mn,sn){var Nt=Me.useState(function(){return z+=1,String(z)}),un=(0,ye.Z)(Nt,1),Ln=un[0],Dn=Me.useContext(ce),$t={data:sn,canPreview:mn};return Me.useEffect(function(){if(Dn)return Dn.register(Ln,$t)},[]),Me.useEffect(function(){Dn&&Dn.register(Ln,$t)},[mn,sn]),Ln}function oe(mn){return new Promise(function(sn){var Nt=document.createElement("img");Nt.onerror=function(){return sn(!1)},Nt.onload=function(){return sn(!0)},Nt.src=mn})}function ie(mn){var sn=mn.src,Nt=mn.isCustomPlaceholder,un=mn.fallback,Ln=(0,Me.useState)(Nt?"loading":"normal"),Dn=(0,ye.Z)(Ln,2),$t=Dn[0],rn=Dn[1],jn=(0,Me.useRef)(!1),On=$t==="error";(0,Me.useEffect)(function(){oe(sn).then(function(Bn){Bn||rn("error")})},[sn]),(0,Me.useEffect)(function(){Nt&&!jn.current?rn("loading"):On&&rn("normal")},[sn]);var ei=function(){rn("normal")},Gn=function(li){jn.current=!1,$t==="loading"&&li!=null&&li.complete&&(li.naturalWidth||li.naturalHeight)&&(jn.current=!0,ei())},ti=On&&un?{src:un}:{onLoad:ei,src:sn};return[Gn,ti,$t]}var se=Ee(86923),ue=Ee(8224),Se=Ee(10228),we=Ee(48736);function Pe(mn,sn,Nt,un){var Ln=sn+Nt,Dn=(Nt-un)/2;if(Nt>un){if(sn>0)return(0,he.Z)({},mn,Dn);if(sn<0&&Ln<un)return(0,he.Z)({},mn,-Dn)}else if(sn<0||Ln>un)return(0,he.Z)({},mn,sn<0?Dn:-Dn);return{}}function Ae(mn,sn,Nt,un){var Ln=(0,le.g1)(),Dn=Ln.width,$t=Ln.height,rn=null;return mn<=Dn&&sn<=$t?rn={x:0,y:0}:(mn>Dn||sn>$t)&&(rn=(0,Le.Z)((0,Le.Z)({},Pe("x",Nt,mn,Dn)),Pe("y",un,sn,$t))),rn}var De=Ee(13697),ze=Ee(16089),Ze={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Xe(mn,sn,Nt,un){var Ln=(0,Me.useRef)(null),Dn=(0,Me.useRef)([]),$t=(0,Me.useState)(Ze),rn=(0,ye.Z)($t,2),jn=rn[0],On=rn[1],ei=function(li){On(Ze),un&&!(0,De.Z)(Ze,jn)&&un({transform:Ze,action:li})},Gn=function(li,Di){Ln.current===null&&(Dn.current=[],Ln.current=(0,ze.Z)(function(){On(function(Ri){var Mn=Ri;return Dn.current.forEach(function(Xi){Mn=(0,Le.Z)((0,Le.Z)({},Mn),Xi)}),Ln.current=null,un==null||un({transform:Mn,action:Di}),Mn})})),Dn.current.push((0,Le.Z)((0,Le.Z)({},jn),li))},ti=function(li,Di,Ri,Mn){var Xi=mn.current,Nr=Xi.width,zi=Xi.height,En=Xi.offsetWidth,Jn=Xi.offsetHeight,fi=Xi.offsetLeft,Si=Xi.offsetTop,hi=li,Oi=jn.scale*li;Oi>Nt?(hi=Nt/jn.scale,Oi=Nt):Oi<sn&&(hi=sn/jn.scale,Oi=sn);var tr=Ri!=null?Ri:innerWidth/2,Fi=Mn!=null?Mn:innerHeight/2,Hi=hi-1,mr=Hi*Nr*.5,Rn=Hi*zi*.5,Br=Hi*(tr-jn.x-fi),Nn=Hi*(Fi-jn.y-Si),vr=jn.x-(Br-mr),So=jn.y-(Nn-Rn);if(li<1&&Oi===1){var Dr=En*Oi,Co=Jn*Oi,ho=(0,le.g1)(),Yi=ho.width,Ui=ho.height;Dr<=Yi&&Co<=Ui&&(vr=0,So=0)}Gn({x:vr,y:So,scale:Oi},Di)};return{transform:jn,resetTransform:ei,updateTransform:Gn,dispatchZoomChange:ti}}var Ge=Ee(43403),ft=Ee(77900),at=function(sn){var Nt=sn.visible,un=sn.maskTransitionName,Ln=sn.getContainer,Dn=sn.prefixCls,$t=sn.rootClassName,rn=sn.icons,jn=sn.countRender,On=sn.showSwitch,ei=sn.showProgress,Gn=sn.current,ti=sn.transform,Bn=sn.count,li=sn.scale,Di=sn.minScale,Ri=sn.maxScale,Mn=sn.closeIcon,Xi=sn.onSwitchLeft,Nr=sn.onSwitchRight,zi=sn.onClose,En=sn.onZoomIn,Jn=sn.onZoomOut,fi=sn.onRotateRight,Si=sn.onRotateLeft,hi=sn.onFlipX,Oi=sn.onFlipY,tr=sn.toolbarRender,Fi=(0,Me.useContext)(ce),Hi=rn.rotateLeft,mr=rn.rotateRight,Rn=rn.zoomIn,Br=rn.zoomOut,Nn=rn.close,vr=rn.left,So=rn.right,Dr=rn.flipX,Co=rn.flipY,ho="".concat(Dn,"-operations-operation");Me.useEffect(function(){var Pr=function(Mt){Mt.keyCode===Se.Z.ESC&&zi()};return Nt&&window.addEventListener("keydown",Pr),function(){window.removeEventListener("keydown",Pr)}},[Nt]);var Yi=[{icon:Co,onClick:Oi,type:"flipY"},{icon:Dr,onClick:hi,type:"flipX"},{icon:Hi,onClick:Si,type:"rotateLeft"},{icon:mr,onClick:fi,type:"rotateRight"},{icon:Br,onClick:Jn,type:"zoomOut",disabled:li===Di},{icon:Rn,onClick:En,type:"zoomIn",disabled:li===Ri}],Ui=Yi.map(function(Pr){var ci,Mt=Pr.icon,Ur=Pr.onClick,Hr=Pr.type,ts=Pr.disabled;return Me.createElement("div",{className:ke()(ho,(ci={},(0,he.Z)(ci,"".concat(Dn,"-operations-operation-").concat(Hr),!0),(0,he.Z)(ci,"".concat(Dn,"-operations-operation-disabled"),!!ts),ci)),onClick:Ur,key:Hr},Mt)}),hr=Me.createElement("div",{className:"".concat(Dn,"-operations")},Ui);return Me.createElement(ft.default,{visible:Nt,motionName:un},function(Pr){var ci=Pr.className,Mt=Pr.style;return Me.createElement(Ge.Z,{open:!0,getContainer:Ln!=null?Ln:document.body},Me.createElement("div",{className:ke()("".concat(Dn,"-operations-wrapper"),ci,$t),style:Mt},Mn===null?null:Me.createElement("button",{className:"".concat(Dn,"-close"),onClick:zi},Mn||Nn),On&&Me.createElement(Me.Fragment,null,Me.createElement("div",{className:ke()("".concat(Dn,"-switch-left"),(0,he.Z)({},"".concat(Dn,"-switch-left-disabled"),Gn===0)),onClick:Xi},vr),Me.createElement("div",{className:ke()("".concat(Dn,"-switch-right"),(0,he.Z)({},"".concat(Dn,"-switch-right-disabled"),Gn===Bn-1)),onClick:Nr},So)),Me.createElement("div",{className:"".concat(Dn,"-footer")},ei&&Me.createElement("div",{className:"".concat(Dn,"-progress")},jn?jn(Gn+1,Bn):"".concat(Gn+1," / ").concat(Bn)),tr?tr(hr,(0,Le.Z)({icons:{flipYIcon:Ui[0],flipXIcon:Ui[1],rotateLeftIcon:Ui[2],rotateRightIcon:Ui[3],zoomOutIcon:Ui[4],zoomInIcon:Ui[5]},actions:{onFlipY:Oi,onFlipX:hi,onRotateLeft:Si,onRotateRight:fi,onZoomOut:Jn,onZoomIn:En},transform:ti},Fi?{current:Gn,total:Bn}:{})):hr)))})},Ct=at,et=1,yt=1,st=["fallback","src","imgRef"],zt=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],lt=function(sn){var Nt=sn.fallback,un=sn.src,Ln=sn.imgRef,Dn=(0,ge.Z)(sn,st),$t=ie({src:un,fallback:Nt}),rn=(0,ye.Z)($t,2),jn=rn[0],On=rn[1];return Me.createElement("img",(0,Ce.Z)({ref:function(Gn){Ln.current=Gn,jn(Gn)}},Dn,On))},tt=function(sn){var Nt=sn.prefixCls,un=sn.src,Ln=sn.alt,Dn=sn.fallback,$t=sn.movable,rn=$t===void 0?!0:$t,jn=sn.onClose,On=sn.visible,ei=sn.icons,Gn=ei===void 0?{}:ei,ti=sn.rootClassName,Bn=sn.closeIcon,li=sn.getContainer,Di=sn.current,Ri=Di===void 0?0:Di,Mn=sn.count,Xi=Mn===void 0?1:Mn,Nr=sn.countRender,zi=sn.scaleStep,En=zi===void 0?.5:zi,Jn=sn.minScale,fi=Jn===void 0?1:Jn,Si=sn.maxScale,hi=Si===void 0?50:Si,Oi=sn.transitionName,tr=Oi===void 0?"zoom":Oi,Fi=sn.maskTransitionName,Hi=Fi===void 0?"fade":Fi,mr=sn.imageRender,Rn=sn.imgCommonProps,Br=sn.toolbarRender,Nn=sn.onTransform,vr=sn.onChange,So=(0,ge.Z)(sn,zt),Dr=(0,Me.useRef)(),Co=(0,Me.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),ho=(0,Me.useState)(!1),Yi=(0,ye.Z)(ho,2),Ui=Yi[0],hr=Yi[1],Pr=(0,Me.useContext)(ce),ci=Pr&&Xi>1,Mt=Pr&&Xi>=1,Ur=Xe(Dr,fi,hi,Nn),Hr=Ur.transform,ts=Ur.resetTransform,Ao=Ur.updateTransform,ss=Ur.dispatchZoomChange,_r=(0,Me.useState)(!0),fr=(0,ye.Z)(_r,2),Kr=fr[0],pr=fr[1],eo=Hr.rotate,Yo=Hr.scale,sr=Hr.x,Ki=Hr.y,Xn=ke()((0,he.Z)({},"".concat(Nt,"-moving"),Ui));(0,Me.useEffect)(function(){Kr||pr(!0)},[Kr]);var ar=function(){ts("close")},to=function(){ss(et+En,"zoomIn")},Ro=function(){ss(et/(et+En),"zoomOut")},Bo=function(){Ao({rotate:eo+90},"rotateRight")},Xo=function(){Ao({rotate:eo-90},"rotateLeft")},as=function(){Ao({flipX:!Hr.flipX},"flipX")},Ho=function(){Ao({flipY:!Hr.flipY},"flipY")},ia=function(_o){_o==null||_o.preventDefault(),_o==null||_o.stopPropagation(),Ri>0&&(pr(!1),ts("prev"),vr==null||vr(Ri-1,Ri))},_s=function(_o){_o==null||_o.preventDefault(),_o==null||_o.stopPropagation(),Ri<Xi-1&&(pr(!1),ts("next"),vr==null||vr(Ri+1,Ri))},la=function(){if(On&&Ui){hr(!1);var _o=Co.current,No=_o.transformX,Lo=_o.transformY,ua=sr!==No&&Ki!==Lo;if(!ua)return;var br=Dr.current.offsetWidth*Yo,uo=Dr.current.offsetHeight*Yo,Yr=Dr.current.getBoundingClientRect(),Li=Yr.left,Es=Yr.top,Ls=eo%180!==0,xa=Ae(Ls?uo:br,Ls?br:uo,Li,Es);xa&&Ao((0,Le.Z)({},xa),"dragRebound")}},kn=function(_o){!rn||_o.button!==0||(_o.preventDefault(),_o.stopPropagation(),Co.current={deltaX:_o.pageX-Hr.x,deltaY:_o.pageY-Hr.y,transformX:Hr.x,transformY:Hr.y},hr(!0))},Is=function(_o){On&&Ui&&Ao({x:_o.pageX-Co.current.deltaX,y:_o.pageY-Co.current.deltaY},"move")},Pu=function(_o){if(!(!On||_o.deltaY==0)){var No=Math.abs(_o.deltaY/100),Lo=Math.min(No,yt),ua=et+Lo*En;_o.deltaY>0&&(ua=et/ua),ss(ua,"wheel",_o.clientX,_o.clientY)}},Ua=function(_o){!On||!ci||(_o.keyCode===Se.Z.LEFT?ia():_o.keyCode===Se.Z.RIGHT&&_s())},Sa=function(_o){On&&(Yo!==1?Ao({x:0,y:0,scale:1},"doubleClick"):ss(et+En,"doubleClick",_o.clientX,_o.clientY))};(0,Me.useEffect)(function(){var Ws,_o,No,Lo;if(rn){No=(0,ue.Z)(window,"mouseup",la,!1),Lo=(0,ue.Z)(window,"mousemove",Is,!1);try{window.top!==window.self&&(Ws=(0,ue.Z)(window.top,"mouseup",la,!1),_o=(0,ue.Z)(window.top,"mousemove",Is,!1))}catch(ua){(0,we.Kp)(!1,"[rc-image] ".concat(ua))}}return function(){var ua,br,uo,Yr;(ua=No)===null||ua===void 0||ua.remove(),(br=Lo)===null||br===void 0||br.remove(),(uo=Ws)===null||uo===void 0||uo.remove(),(Yr=_o)===null||Yr===void 0||Yr.remove()}},[On,Ui,sr,Ki,eo,rn]),(0,Me.useEffect)(function(){var Ws=(0,ue.Z)(window,"keydown",Ua,!1);return function(){Ws.remove()}},[On,ci,Ri]);var us=Me.createElement(lt,(0,Ce.Z)({},Rn,{width:sn.width,height:sn.height,imgRef:Dr,className:"".concat(Nt,"-img"),alt:Ln,style:{transform:"translate3d(".concat(Hr.x,"px, ").concat(Hr.y,"px, 0) scale3d(").concat(Hr.flipX?"-":"").concat(Yo,", ").concat(Hr.flipY?"-":"").concat(Yo,", 1) rotate(").concat(eo,"deg)"),transitionDuration:!Kr&&"0s"},fallback:Dn,src:un,onWheel:Pu,onMouseDown:kn,onDoubleClick:Sa}));return Me.createElement(Me.Fragment,null,Me.createElement(se.Z,(0,Ce.Z)({transitionName:tr,maskTransitionName:Hi,closable:!1,keyboard:!0,prefixCls:Nt,onClose:jn,visible:On,wrapClassName:Xn,rootClassName:ti,getContainer:li},So,{afterClose:ar}),Me.createElement("div",{className:"".concat(Nt,"-img-wrapper")},mr?mr(us,(0,Le.Z)({transform:Hr},Pr?{current:Ri}:{})):us)),Me.createElement(Ct,{visible:On,transform:Hr,maskTransitionName:Hi,closeIcon:Bn,getContainer:li,prefixCls:Nt,rootClassName:ti,icons:Gn,countRender:Nr,showSwitch:ci,showProgress:Mt,current:Ri,count:Xi,scale:Yo,minScale:fi,maxScale:hi,toolbarRender:Br,onSwitchLeft:ia,onSwitchRight:_s,onZoomIn:to,onZoomOut:Ro,onRotateRight:Bo,onRotateLeft:Xo,onFlipX:as,onFlipY:Ho,onClose:jn}))},ut=tt,mt=Ee(80702);function Pt(mn){var sn=Me.useState({}),Nt=(0,ye.Z)(sn,2),un=Nt[0],Ln=Nt[1],Dn=Me.useCallback(function(rn,jn){return Ln(function(On){return(0,Le.Z)((0,Le.Z)({},On),{},(0,he.Z)({},rn,jn))}),function(){Ln(function(On){var ei=(0,Le.Z)({},On);return delete ei[rn],ei})}},[]),$t=Me.useMemo(function(){return mn?mn.map(function(rn){if(typeof rn=="string")return{data:{src:rn}};var jn={};return Object.keys(rn).forEach(function(On){["src"].concat((0,mt.Z)(de)).includes(On)&&(jn[On]=rn[On])}),{data:jn}}):Object.keys(un).reduce(function(rn,jn){var On=un[jn],ei=On.canPreview,Gn=On.data;return ei&&rn.push({data:Gn,id:jn}),rn},[])},[mn,un]);return[$t,Dn]}var gt=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Ft=["src"],Ht=function(sn){var Nt,un=sn.previewPrefixCls,Ln=un===void 0?"rc-image-preview":un,Dn=sn.children,$t=sn.icons,rn=$t===void 0?{}:$t,jn=sn.items,On=sn.preview,ei=sn.fallback,Gn=(0,xe.Z)(On)==="object"?On:{},ti=Gn.visible,Bn=Gn.onVisibleChange,li=Gn.getContainer,Di=Gn.current,Ri=Gn.movable,Mn=Gn.minScale,Xi=Gn.maxScale,Nr=Gn.countRender,zi=Gn.closeIcon,En=Gn.onChange,Jn=Gn.onTransform,fi=Gn.toolbarRender,Si=Gn.imageRender,hi=(0,ge.Z)(Gn,gt),Oi=Pt(jn),tr=(0,ye.Z)(Oi,2),Fi=tr[0],Hi=tr[1],mr=(0,ve.Z)(0,{value:Di}),Rn=(0,ye.Z)(mr,2),Br=Rn[0],Nn=Rn[1],vr=(0,Me.useState)(!1),So=(0,ye.Z)(vr,2),Dr=So[0],Co=So[1],ho=((Nt=Fi[Br])===null||Nt===void 0?void 0:Nt.data)||{},Yi=ho.src,Ui=(0,ge.Z)(ho,Ft),hr=(0,ve.Z)(!!ti,{value:ti,onChange:function(eo,Yo){Bn==null||Bn(eo,Yo,Br)}}),Pr=(0,ye.Z)(hr,2),ci=Pr[0],Mt=Pr[1],Ur=(0,Me.useState)(null),Hr=(0,ye.Z)(Ur,2),ts=Hr[0],Ao=Hr[1],ss=Me.useCallback(function(pr,eo,Yo){var sr=Fi.findIndex(function(Ki){return Ki.id===pr});Mt(!0),Ao({x:eo,y:Yo}),Nn(sr<0?0:sr),Co(!0)},[Fi]);Me.useEffect(function(){ci?Dr||Nn(0):Co(!1)},[ci]);var _r=function(eo,Yo){Nn(eo),En==null||En(eo,Yo)},fr=function(){Mt(!1),Ao(null)},Kr=Me.useMemo(function(){return{register:Hi,onPreview:ss}},[Hi,ss]);return Me.createElement(ce.Provider,{value:Kr},Dn,Me.createElement(ut,(0,Ce.Z)({"aria-hidden":!ci,movable:Ri,visible:ci,prefixCls:Ln,closeIcon:zi,onClose:fr,mousePosition:ts,imgCommonProps:Ui,src:Yi,fallback:ei,icons:rn,minScale:Mn,maxScale:Xi,getContainer:li,current:Br,count:Fi.length,countRender:Nr,onTransform:Jn,toolbarRender:fi,imageRender:Si,onChange:_r},hi)))},hn=Ht,Qt=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],bn=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Wt=function(sn){var Nt=sn.src,un=sn.alt,Ln=sn.onPreviewClose,Dn=sn.prefixCls,$t=Dn===void 0?"rc-image":Dn,rn=sn.previewPrefixCls,jn=rn===void 0?"".concat($t,"-preview"):rn,On=sn.placeholder,ei=sn.fallback,Gn=sn.width,ti=sn.height,Bn=sn.style,li=sn.preview,Di=li===void 0?!0:li,Ri=sn.className,Mn=sn.onClick,Xi=sn.onError,Nr=sn.wrapperClassName,zi=sn.wrapperStyle,En=sn.rootClassName,Jn=(0,ge.Z)(sn,Qt),fi=On&&On!==!0,Si=(0,xe.Z)(Di)==="object"?Di:{},hi=Si.src,Oi=Si.visible,tr=Oi===void 0?void 0:Oi,Fi=Si.onVisibleChange,Hi=Fi===void 0?Ln:Fi,mr=Si.getContainer,Rn=mr===void 0?void 0:mr,Br=Si.mask,Nn=Si.maskClassName,vr=Si.movable,So=Si.icons,Dr=Si.scaleStep,Co=Si.minScale,ho=Si.maxScale,Yi=Si.imageRender,Ui=Si.toolbarRender,hr=(0,ge.Z)(Si,bn),Pr=hi!=null?hi:Nt,ci=(0,ve.Z)(!!tr,{value:tr,onChange:Hi}),Mt=(0,ye.Z)(ci,2),Ur=Mt[0],Hr=Mt[1],ts=ie({src:Nt,isCustomPlaceholder:fi,fallback:ei}),Ao=(0,ye.Z)(ts,3),ss=Ao[0],_r=Ao[1],fr=Ao[2],Kr=(0,Me.useState)(null),pr=(0,ye.Z)(Kr,2),eo=pr[0],Yo=pr[1],sr=(0,Me.useContext)(ce),Ki=!!Di,Xn=function(){Hr(!1),Yo(null)},ar=ke()($t,Nr,En,(0,he.Z)({},"".concat($t,"-error"),fr==="error")),to=(0,Me.useMemo)(function(){var as={};return de.forEach(function(Ho){sn[Ho]!==void 0&&(as[Ho]=sn[Ho])}),as},de.map(function(as){return sn[as]})),Ro=(0,Me.useMemo)(function(){return(0,Le.Z)((0,Le.Z)({},to),{},{src:Pr})},[Pr,to]),Bo=ee(Ki,Ro),Xo=function(Ho){var ia=(0,le.os)(Ho.target),_s=ia.left,la=ia.top;sr?sr.onPreview(Bo,_s,la):(Yo({x:_s,y:la}),Hr(!0)),Mn==null||Mn(Ho)};return Me.createElement(Me.Fragment,null,Me.createElement("div",(0,Ce.Z)({},Jn,{className:ar,onClick:Ki?Xo:Mn,style:(0,Le.Z)({width:Gn,height:ti},zi)}),Me.createElement("img",(0,Ce.Z)({},to,{className:ke()("".concat($t,"-img"),(0,he.Z)({},"".concat($t,"-img-placeholder"),On===!0),Ri),style:(0,Le.Z)({height:ti},Bn),ref:ss},_r,{width:Gn,height:ti,onError:Xi})),fr==="loading"&&Me.createElement("div",{"aria-hidden":"true",className:"".concat($t,"-placeholder")},On),Br&&Ki&&Me.createElement("div",{className:ke()("".concat($t,"-mask"),Nn),style:{display:(Bn==null?void 0:Bn.display)==="none"?"none":void 0}},Br)),!sr&&Ki&&Me.createElement(ut,(0,Ce.Z)({"aria-hidden":!Ur,visible:Ur,prefixCls:jn,onClose:Xn,mousePosition:eo,src:Pr,alt:un,fallback:ei,getContainer:Rn,icons:So,movable:vr,scaleStep:Dr,minScale:Co,maxScale:ho,rootClassName:En,imageRender:Yi,imgCommonProps:to,toolbarRender:Ui},hr)))};Wt.PreviewGroup=hn,Wt.displayName="Image";var Kt=Wt,Jt=Kt,Yt=Ee(62892),kt=Ee(36355),pt=Ee(31724),Bt=Ee(99267),xt=Ee(33853),vt=Ee(38819),nt={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"},He=nt,Ie=Ee(7657),We=function(sn,Nt){return Me.createElement(Ie.Z,(0,Ce.Z)({},sn,{ref:Nt,icon:He}))},Oe=Me.forwardRef(We),be=Oe,Ne={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"},$e=Ne,dt=function(sn,Nt){return Me.createElement(Ie.Z,(0,Ce.Z)({},sn,{ref:Nt,icon:$e}))},Je=Me.forwardRef(dt),At=Je,tn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},pn=tn,ln=function(sn,Nt){return Me.createElement(Ie.Z,(0,Ce.Z)({},sn,{ref:Nt,icon:pn}))},gn=Me.forwardRef(ln),Hn=gn,An={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"},qn=An,ai=function(sn,Nt){return Me.createElement(Ie.Z,(0,Ce.Z)({},sn,{ref:Nt,icon:qn}))},Ti=Me.forwardRef(ai),Ci=Ti,$i={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"},or=$i,lr=function(sn,Nt){return Me.createElement(Ie.Z,(0,Ce.Z)({},sn,{ref:Nt,icon:or}))},qi=Me.forwardRef(lr),Fr=qi,Mr=Ee(64993),yi=Ee(73819),dr=Ee(17313),Zi=Ee(29878),rt=Ee(1950),Ir=Ee(83116),Ar=Ee(37613);const $r=mn=>({position:mn||"absolute",inset:0}),co=mn=>{const{iconCls:sn,motionDurationSlow:Nt,paddingXXS:un,marginXXS:Ln,prefixCls:Dn,colorTextLightSolid:$t}=mn;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:$t,background:new Mr.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${Nt}`,[`.${Dn}-mask-info`]:Object.assign(Object.assign({},dr.vS),{padding:`0 ${un}px`,[sn]:{marginInlineEnd:Ln,svg:{verticalAlign:"baseline"}}})}},mo=mn=>{const{previewCls:sn,modalMaskBg:Nt,paddingSM:un,marginXL:Ln,margin:Dn,paddingLG:$t,previewOperationColorDisabled:rn,previewOperationHoverColor:jn,motionDurationSlow:On,iconCls:ei,colorTextLightSolid:Gn}=mn,ti=new Mr.C(Nt).setAlpha(.1),Bn=ti.clone().setAlpha(.2);return{[`${sn}-footer`]:{position:"fixed",bottom:Ln,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:mn.previewOperationColor},[`${sn}-progress`]:{marginBottom:Dn},[`${sn}-close`]:{position:"fixed",top:Ln,right:{_skip_check_:!0,value:Ln},display:"flex",color:Gn,backgroundColor:ti.toRgbString(),borderRadius:"50%",padding:un,outline:0,border:0,cursor:"pointer",transition:`all ${On}`,"&:hover":{backgroundColor:Bn.toRgbString()},[`& > ${ei}`]:{fontSize:mn.previewOperationSize}},[`${sn}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${$t}px`,backgroundColor:ti.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:un,padding:un,cursor:"pointer",transition:`all ${On}`,userSelect:"none",[`&:not(${sn}-operations-operation-disabled):hover > ${ei}`]:{color:jn},"&-disabled":{color:rn,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${ei}`]:{fontSize:mn.previewOperationSize}}}}},no=mn=>{const{modalMaskBg:sn,iconCls:Nt,previewOperationColorDisabled:un,previewCls:Ln,zIndexPopup:Dn,motionDurationSlow:$t}=mn,rn=new Mr.C(sn).setAlpha(.1),jn=rn.clone().setAlpha(.2);return{[`${Ln}-switch-left, ${Ln}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:Dn+1,display:"flex",alignItems:"center",justifyContent:"center",width:mn.imagePreviewSwitchSize,height:mn.imagePreviewSwitchSize,marginTop:-mn.imagePreviewSwitchSize/2,color:mn.previewOperationColor,background:rn.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${$t}`,userSelect:"none","&:hover":{background:jn.toRgbString()},"&-disabled":{"&, &:hover":{color:un,background:"transparent",cursor:"not-allowed",[`> ${Nt}`]:{cursor:"not-allowed"}}},[`> ${Nt}`]:{fontSize:mn.previewOperationSize}},[`${Ln}-switch-left`]:{insetInlineStart:mn.marginSM},[`${Ln}-switch-right`]:{insetInlineEnd:mn.marginSM}}},lo=mn=>{const{motionEaseOut:sn,previewCls:Nt,motionDurationSlow:un,componentCls:Ln}=mn;return[{[`${Ln}-preview-root`]:{[Nt]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${Nt}-body`]:Object.assign(Object.assign({},$r()),{overflow:"hidden"}),[`${Nt}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${un} ${sn} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},$r()),{transition:`transform ${un} ${sn} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${Nt}-moving`]:{[`${Nt}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${Ln}-preview-root`]:{[`${Nt}-wrap`]:{zIndex:mn.zIndexPopup}}},{[`${Ln}-preview-operations-wrapper`]:{position:"fixed",zIndex:mn.zIndexPopup+1},"&":[mo(mn),no(mn)]}]},ri=mn=>{const{componentCls:sn}=mn;return{[sn]:{position:"relative",display:"inline-block",[`${sn}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${sn}-img-placeholder`]:{backgroundColor:mn.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${sn}-mask`]:Object.assign({},co(mn)),[`${sn}-mask:hover`]:{opacity:1},[`${sn}-placeholder`]:Object.assign({},$r())}}},Ke=mn=>{const{previewCls:sn}=mn;return{[`${sn}-root`]:(0,Zi._y)(mn,"zoom"),"&":(0,rt.J$)(mn,!0)}};var qe=(0,Ir.Z)("Image",mn=>{const sn=`${mn.componentCls}-preview`,Nt=(0,Ar.TS)(mn,{previewCls:sn,modalMaskBg:new Mr.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:mn.controlHeightLG});return[ri(Nt),lo(Nt),(0,yi.QA)((0,Ar.TS)(Nt,{componentCls:sn})),Ke(Nt)]},mn=>({zIndexPopup:mn.zIndexPopupBase+80,previewOperationColor:new Mr.C(mn.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new Mr.C(mn.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new Mr.C(mn.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:mn.fontSizeIcon*1.5})),Ye=function(mn,sn){var Nt={};for(var un in mn)Object.prototype.hasOwnProperty.call(mn,un)&&sn.indexOf(un)<0&&(Nt[un]=mn[un]);if(mn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ln=0,un=Object.getOwnPropertySymbols(mn);Ln<un.length;Ln++)sn.indexOf(un[Ln])<0&&Object.prototype.propertyIsEnumerable.call(mn,un[Ln])&&(Nt[un[Ln]]=mn[un[Ln]]);return Nt};const St={rotateLeft:Me.createElement(be,null),rotateRight:Me.createElement(At,null),zoomIn:Me.createElement(Ci,null),zoomOut:Me.createElement(Fr,null),close:Me.createElement(Bt.Z,null),left:Me.createElement(xt.Z,null),right:Me.createElement(vt.Z,null),flipX:Me.createElement(Hn,null),flipY:Me.createElement(Hn,{rotate:90})};var Tt=mn=>{var{previewPrefixCls:sn,preview:Nt}=mn,un=Ye(mn,["previewPrefixCls","preview"]);const{getPrefixCls:Ln}=Me.useContext(kt.E_),Dn=Ln("image",sn),$t=`${Dn}-preview`,rn=Ln(),[jn,On]=qe(Dn),ei=Me.useMemo(()=>{var Gn;if(Nt===!1)return Nt;const ti=typeof Nt=="object"?Nt:{},Bn=ke()(On,(Gn=ti.rootClassName)!==null&&Gn!==void 0?Gn:"");return Object.assign(Object.assign({},ti),{transitionName:(0,Yt.m)(rn,"zoom",ti.transitionName),maskTransitionName:(0,Yt.m)(rn,"fade",ti.maskTransitionName),rootClassName:Bn})},[Nt]);return jn(Me.createElement(Jt.PreviewGroup,Object.assign({preview:ei,previewPrefixCls:$t,icons:St},un)))},_t=function(mn,sn){var Nt={};for(var un in mn)Object.prototype.hasOwnProperty.call(mn,un)&&sn.indexOf(un)<0&&(Nt[un]=mn[un]);if(mn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ln=0,un=Object.getOwnPropertySymbols(mn);Ln<un.length;Ln++)sn.indexOf(un[Ln])<0&&Object.prototype.propertyIsEnumerable.call(mn,un[Ln])&&(Nt[un[Ln]]=mn[un[Ln]]);return Nt};const dn=mn=>{const{prefixCls:sn,preview:Nt,className:un,rootClassName:Ln,style:Dn}=mn,$t=_t(mn,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:rn,locale:jn=pt.Z,getPopupContainer:On,image:ei}=Me.useContext(kt.E_),Gn=rn("image",sn),ti=rn(),Bn=jn.Image||pt.Z.Image,[li,Di]=qe(Gn),Ri=ke()(Ln,Di),Mn=ke()(un,Di,ei==null?void 0:ei.className),Xi=Me.useMemo(()=>{if(Nt===!1)return Nt;const zi=typeof Nt=="object"?Nt:{},{getContainer:En}=zi,Jn=_t(zi,["getContainer"]);return Object.assign(Object.assign({mask:Me.createElement("div",{className:`${Gn}-mask-info`},Me.createElement(me.Z,null),Bn==null?void 0:Bn.preview),icons:St},Jn),{getContainer:En||On,transitionName:(0,Yt.m)(ti,"zoom",zi.transitionName),maskTransitionName:(0,Yt.m)(ti,"fade",zi.maskTransitionName)})},[Nt,Bn]),Nr=Object.assign(Object.assign({},ei==null?void 0:ei.style),Dn);return li(Me.createElement(Jt,Object.assign({prefixCls:Gn,preview:Xi,rootClassName:Ri,className:Mn,style:Nr},$t)))};dn.PreviewGroup=Tt;var Pn=dn},9432:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return se},n:function(){return oe}});var Me=Ee(19248),me=Ee(92310),Be=Ee.n(me),ke=Ee(93681),Ce=Ee(8654),Le=Ee(59301),he=Ee(19080),ye=Ee(36355),xe=Ee(1684),ge=Ee(19716),le=Ee(32441),ve=Ee(33234),de=Ee(59412),ce=Ee(9937);function z(ue){return!!(ue.prefix||ue.suffix||ue.allowClear)}var ee=function(ue,Se){var we={};for(var Pe in ue)Object.prototype.hasOwnProperty.call(ue,Pe)&&Se.indexOf(Pe)<0&&(we[Pe]=ue[Pe]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Pe=Object.getOwnPropertySymbols(ue);Ae<Pe.length;Ae++)Se.indexOf(Pe[Ae])<0&&Object.prototype.propertyIsEnumerable.call(ue,Pe[Ae])&&(we[Pe[Ae]]=ue[Pe[Ae]]);return we};function oe(ue,Se){if(!ue)return;ue.focus(Se);const{cursor:we}=Se||{};if(we){const Pe=ue.value.length;switch(we){case"start":ue.setSelectionRange(0,0);break;case"end":ue.setSelectionRange(Pe,Pe);break;default:ue.setSelectionRange(0,Pe);break}}}var se=(0,Le.forwardRef)((ue,Se)=>{var we;const{prefixCls:Pe,bordered:Ae=!0,status:De,size:ze,disabled:Ze,onBlur:Xe,onFocus:Ge,suffix:ft,allowClear:at,addonAfter:Ct,addonBefore:et,className:yt,style:st,styles:zt,rootClassName:lt,onChange:tt,classNames:ut}=ue,mt=ee(ue,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Pt,direction:gt,input:Ft}=Le.useContext(ye.E_),Ht=Pt("input",Pe),hn=(0,Le.useRef)(null),[Qt,bn]=(0,ce.ZP)(Ht),{compactSize:Wt,compactItemClassnames:Kt}=(0,ve.ri)(Ht,gt),Jt=(0,ge.Z)(dt=>{var Je;return(Je=ze!=null?ze:Wt)!==null&&Je!==void 0?Je:dt}),Yt=Le.useContext(xe.Z),kt=Ze!=null?Ze:Yt,{status:pt,hasFeedback:Bt,feedbackIcon:xt}=(0,Le.useContext)(le.aM),vt=(0,he.F)(pt,De),nt=z(ue)||!!Bt,He=(0,Le.useRef)(nt);(0,Le.useEffect)(()=>{var dt;nt&&He.current,He.current=nt},[nt]);const Ie=(0,de.Z)(hn,!0),We=dt=>{Ie(),Xe==null||Xe(dt)},Oe=dt=>{Ie(),Ge==null||Ge(dt)},be=dt=>{Ie(),tt==null||tt(dt)},Ne=(Bt||ft)&&Le.createElement(Le.Fragment,null,ft,Bt&&xt);let $e;return typeof at=="object"&&(at!=null&&at.clearIcon)?$e=at:at&&($e={clearIcon:Le.createElement(Me.Z,null)}),Qt(Le.createElement(ke.default,Object.assign({ref:(0,Ce.sQ)(Se,hn),prefixCls:Ht,autoComplete:Ft==null?void 0:Ft.autoComplete},mt,{disabled:kt,onBlur:We,onFocus:Oe,style:Object.assign(Object.assign({},Ft==null?void 0:Ft.style),st),styles:Object.assign(Object.assign({},Ft==null?void 0:Ft.styles),zt),suffix:Ne,allowClear:$e,className:Be()(yt,lt,Kt,Ft==null?void 0:Ft.className),onChange:be,addonAfter:Ct&&Le.createElement(ve.BR,null,Le.createElement(le.Ux,{override:!0,status:!0},Ct)),addonBefore:et&&Le.createElement(ve.BR,null,Le.createElement(le.Ux,{override:!0,status:!0},et)),classNames:Object.assign(Object.assign(Object.assign({},ut),Ft==null?void 0:Ft.classNames),{input:Be()({[`${Ht}-sm`]:Jt==="small",[`${Ht}-lg`]:Jt==="large",[`${Ht}-rtl`]:gt==="rtl",[`${Ht}-borderless`]:!Ae},!nt&&(0,he.Z)(Ht,vt),ut==null?void 0:ut.input,(we=Ft==null?void 0:Ft.classNames)===null||we===void 0?void 0:we.input,bn)}),classes:{affixWrapper:Be()({[`${Ht}-affix-wrapper-sm`]:Jt==="small",[`${Ht}-affix-wrapper-lg`]:Jt==="large",[`${Ht}-affix-wrapper-rtl`]:gt==="rtl",[`${Ht}-affix-wrapper-borderless`]:!Ae},(0,he.Z)(`${Ht}-affix-wrapper`,vt,Bt),bn),wrapper:Be()({[`${Ht}-group-rtl`]:gt==="rtl"},bn),group:Be()({[`${Ht}-group-wrapper-sm`]:Jt==="small",[`${Ht}-group-wrapper-lg`]:Jt==="large",[`${Ht}-group-wrapper-rtl`]:gt==="rtl",[`${Ht}-group-wrapper-disabled`]:kt},(0,he.Z)(`${Ht}-group-wrapper`,vt,Bt),bn)}})))})},1643:function(_n,en,Ee){"use strict";var Me=Ee(19248),me=Ee(92310),Be=Ee.n(me),ke=Ee(9296),Ce=Ee(59301),Le=Ee(19080),he=Ee(36355),ye=Ee(1684),xe=Ee(19716),ge=Ee(32441),le=Ee(9432),ve=Ee(9937),de=function(z,ee){var oe={};for(var ie in z)Object.prototype.hasOwnProperty.call(z,ie)&&ee.indexOf(ie)<0&&(oe[ie]=z[ie]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var se=0,ie=Object.getOwnPropertySymbols(z);se<ie.length;se++)ee.indexOf(ie[se])<0&&Object.prototype.propertyIsEnumerable.call(z,ie[se])&&(oe[ie[se]]=z[ie[se]]);return oe};const ce=(0,Ce.forwardRef)((z,ee)=>{const{prefixCls:oe,bordered:ie=!0,size:se,disabled:ue,status:Se,allowClear:we,showCount:Pe,classNames:Ae,rootClassName:De,className:ze}=z,Ze=de(z,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Xe,direction:Ge}=Ce.useContext(he.E_),ft=(0,xe.Z)(se),at=Ce.useContext(ye.Z),Ct=ue!=null?ue:at,{status:et,hasFeedback:yt,feedbackIcon:st}=Ce.useContext(ge.aM),zt=(0,Le.F)(et,Se),lt=Ce.useRef(null);Ce.useImperativeHandle(ee,()=>{var gt;return{resizableTextArea:(gt=lt.current)===null||gt===void 0?void 0:gt.resizableTextArea,focus:Ft=>{var Ht,hn;(0,le.n)((hn=(Ht=lt.current)===null||Ht===void 0?void 0:Ht.resizableTextArea)===null||hn===void 0?void 0:hn.textArea,Ft)},blur:()=>{var Ft;return(Ft=lt.current)===null||Ft===void 0?void 0:Ft.blur()}}});const tt=Xe("input",oe);let ut;typeof we=="object"&&(we!=null&&we.clearIcon)?ut=we:we&&(ut={clearIcon:Ce.createElement(Me.Z,null)});const[mt,Pt]=(0,ve.ZP)(tt);return mt(Ce.createElement(ke.default,Object.assign({},Ze,{disabled:Ct,allowClear:ut,className:Be()(ze,De),classes:{affixWrapper:Be()(`${tt}-textarea-affix-wrapper`,{[`${tt}-affix-wrapper-rtl`]:Ge==="rtl",[`${tt}-affix-wrapper-borderless`]:!ie,[`${tt}-affix-wrapper-sm`]:ft==="small",[`${tt}-affix-wrapper-lg`]:ft==="large",[`${tt}-textarea-show-count`]:Pe},(0,Le.Z)(`${tt}-affix-wrapper`,zt),Pt)},classNames:Object.assign(Object.assign({},Ae),{textarea:Be()({[`${tt}-borderless`]:!ie,[`${tt}-sm`]:ft==="small",[`${tt}-lg`]:ft==="large"},(0,Le.Z)(tt,zt),Pt,Ae==null?void 0:Ae.textarea)}),prefixCls:tt,suffix:yt&&Ce.createElement("span",{className:`${tt}-textarea-suffix`},st),showCount:Pe,ref:lt})))});en.Z=ce},59412:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return me}});var Me=Ee(59301);function me(Be,ke){const Ce=(0,Me.useRef)([]),Le=()=>{Ce.current.push(setTimeout(()=>{var he,ye,xe,ge;!((he=Be.current)===null||he===void 0)&&he.input&&((ye=Be.current)===null||ye===void 0?void 0:ye.input.getAttribute("type"))==="password"&&(!((xe=Be.current)===null||xe===void 0)&&xe.input.hasAttribute("value"))&&((ge=Be.current)===null||ge===void 0||ge.input.removeAttribute("value"))}))};return(0,Me.useEffect)(()=>(ke&&Le(),()=>Ce.current.forEach(he=>{he&&clearTimeout(he)})),[]),Le}},92832:function(_n,en,Ee){"use strict";Ee.d(en,{default:function(){return ft}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(59301),ke=Ee(36355),Ce=Ee(32441),Le=Ee(9937),ye=at=>{const{getPrefixCls:Ct,direction:et}=(0,Be.useContext)(ke.E_),{prefixCls:yt,className:st}=at,zt=Ct("input-group",yt),lt=Ct("input"),[tt,ut]=(0,Le.ZP)(lt),mt=me()(zt,{[`${zt}-lg`]:at.size==="large",[`${zt}-sm`]:at.size==="small",[`${zt}-compact`]:at.compact,[`${zt}-rtl`]:et==="rtl"},ut,st),Pt=(0,Be.useContext)(Ce.aM),gt=(0,Be.useMemo)(()=>Object.assign(Object.assign({},Pt),{isFormItemInput:!1}),[Pt]);return tt(Be.createElement("span",{className:mt,style:at.style,onMouseEnter:at.onMouseEnter,onMouseLeave:at.onMouseLeave,onFocus:at.onFocus,onBlur:at.onBlur},Be.createElement(Ce.aM.Provider,{value:gt},at.children)))},xe=Ee(9432),ge=Ee(73331),le=Ee(15277),ve=Ee(2738),de=Ee(8654),ce=Ee(59412),z=function(at,Ct){var et={};for(var yt in at)Object.prototype.hasOwnProperty.call(at,yt)&&Ct.indexOf(yt)<0&&(et[yt]=at[yt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,yt=Object.getOwnPropertySymbols(at);st<yt.length;st++)Ct.indexOf(yt[st])<0&&Object.prototype.propertyIsEnumerable.call(at,yt[st])&&(et[yt[st]]=at[yt[st]]);return et};const ee=at=>at?Be.createElement(le.Z,null):Be.createElement(ge.Z,null),oe={click:"onClick",hover:"onMouseOver"};var se=Be.forwardRef((at,Ct)=>{const{visibilityToggle:et=!0}=at,yt=typeof et=="object"&&et.visible!==void 0,[st,zt]=(0,Be.useState)(()=>yt?et.visible:!1),lt=(0,Be.useRef)(null);Be.useEffect(()=>{yt&&zt(et.visible)},[yt,et]);const tt=(0,ce.Z)(lt),ut=()=>{const{disabled:kt}=at;kt||(st&&tt(),zt(pt=>{var Bt;const xt=!pt;return typeof et=="object"&&((Bt=et.onVisibleChange)===null||Bt===void 0||Bt.call(et,xt)),xt}))},mt=kt=>{const{action:pt="click",iconRender:Bt=ee}=at,xt=oe[pt]||"",vt=Bt(st),nt={[xt]:ut,className:`${kt}-icon`,key:"passwordIcon",onMouseDown:He=>{He.preventDefault()},onMouseUp:He=>{He.preventDefault()}};return Be.cloneElement(Be.isValidElement(vt)?vt:Be.createElement("span",null,vt),nt)},{className:Pt,prefixCls:gt,inputPrefixCls:Ft,size:Ht}=at,hn=z(at,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Qt}=Be.useContext(ke.E_),bn=Qt("input",Ft),Wt=Qt("input-password",gt),Kt=et&&mt(Wt),Jt=me()(Wt,Pt,{[`${Wt}-${Ht}`]:!!Ht}),Yt=Object.assign(Object.assign({},(0,ve.Z)(hn,["suffix","iconRender","visibilityToggle"])),{type:st?"text":"password",className:Jt,prefixCls:bn,suffix:Kt});return Ht&&(Yt.size=Ht),Be.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(Ct,lt)},Yt))}),ue=Ee(47472),Se=Ee(92343),we=Ee(3113),Pe=Ee(19716),Ae=Ee(33234),De=function(at,Ct){var et={};for(var yt in at)Object.prototype.hasOwnProperty.call(at,yt)&&Ct.indexOf(yt)<0&&(et[yt]=at[yt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,yt=Object.getOwnPropertySymbols(at);st<yt.length;st++)Ct.indexOf(yt[st])<0&&Object.prototype.propertyIsEnumerable.call(at,yt[st])&&(et[yt[st]]=at[yt[st]]);return et},Ze=Be.forwardRef((at,Ct)=>{const{prefixCls:et,inputPrefixCls:yt,className:st,size:zt,suffix:lt,enterButton:tt=!1,addonAfter:ut,loading:mt,disabled:Pt,onSearch:gt,onChange:Ft,onCompositionStart:Ht,onCompositionEnd:hn}=at,Qt=De(at,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:bn,direction:Wt}=Be.useContext(ke.E_),Kt=Be.useRef(!1),Jt=bn("input-search",et),Yt=bn("input",yt),{compactSize:kt}=(0,Ae.ri)(Jt,Wt),pt=(0,Pe.Z)(At=>{var tn;return(tn=zt!=null?zt:kt)!==null&&tn!==void 0?tn:At}),Bt=Be.useRef(null),xt=At=>{At&&At.target&&At.type==="click"&>&>(At.target.value,At,{source:"clear"}),Ft&&Ft(At)},vt=At=>{var tn;document.activeElement===((tn=Bt.current)===null||tn===void 0?void 0:tn.input)&&At.preventDefault()},nt=At=>{var tn,pn;gt&>((pn=(tn=Bt.current)===null||tn===void 0?void 0:tn.input)===null||pn===void 0?void 0:pn.value,At,{source:"input"})},He=At=>{Kt.current||mt||nt(At)},Ie=typeof tt=="boolean"?Be.createElement(ue.Z,null):null,We=`${Jt}-button`;let Oe;const be=tt||{},Ne=be.type&&be.type.__ANT_BUTTON===!0;Ne||be.type==="button"?Oe=(0,Se.Tm)(be,Object.assign({onMouseDown:vt,onClick:At=>{var tn,pn;(pn=(tn=be==null?void 0:be.props)===null||tn===void 0?void 0:tn.onClick)===null||pn===void 0||pn.call(tn,At),nt(At)},key:"enterButton"},Ne?{className:We,size:pt}:{})):Oe=Be.createElement(we.ZP,{className:We,type:tt?"primary":void 0,size:pt,disabled:Pt,key:"enterButton",onMouseDown:vt,onClick:nt,loading:mt,icon:Ie},tt),ut&&(Oe=[Oe,(0,Se.Tm)(ut,{key:"addonAfter"})]);const $e=me()(Jt,{[`${Jt}-rtl`]:Wt==="rtl",[`${Jt}-${pt}`]:!!pt,[`${Jt}-with-button`]:!!tt},st),dt=At=>{Kt.current=!0,Ht==null||Ht(At)},Je=At=>{Kt.current=!1,hn==null||hn(At)};return Be.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(Bt,Ct),onPressEnter:He},Qt,{size:pt,onCompositionStart:dt,onCompositionEnd:Je,prefixCls:Yt,addonAfter:Oe,suffix:lt,onChange:xt,className:$e,disabled:Pt}))}),Xe=Ee(1643);const Ge=xe.Z;Ge.Group=ye,Ge.Search=Ze,Ge.TextArea=Xe.Z,Ge.Password=se;var ft=Ge},45818:function(_n,en,Ee){"use strict";Ee.d(en,{D:function(){return ue},Z:function(){return Pe}});var Me=Ee(72308),me=Ee(59301),Be={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},ke=Be,Ce=Ee(7657),Le=function(De,ze){return me.createElement(Ce.Z,(0,Me.Z)({},De,{ref:ze,icon:ke}))},he=me.forwardRef(Le),ye=he,xe=Ee(33853),ge=Ee(38819),le=Ee(92310),ve=Ee.n(le),de=Ee(2738),z=Ae=>!isNaN(parseFloat(Ae))&&isFinite(Ae),ee=Ee(36355),oe=Ee(84966),ie=function(Ae,De){var ze={};for(var Ze in Ae)Object.prototype.hasOwnProperty.call(Ae,Ze)&&De.indexOf(Ze)<0&&(ze[Ze]=Ae[Ze]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ze=Object.getOwnPropertySymbols(Ae);Xe<Ze.length;Xe++)De.indexOf(Ze[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Ze[Xe])&&(ze[Ze[Xe]]=Ae[Ze[Xe]]);return ze};const se={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ue=me.createContext({}),Se=(()=>{let Ae=0;return function(){let De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ae+=1,`${De}${Ae}`}})();var Pe=me.forwardRef((Ae,De)=>{const{prefixCls:ze,className:Ze,trigger:Xe,children:Ge,defaultCollapsed:ft=!1,theme:at="dark",style:Ct={},collapsible:et=!1,reverseArrow:yt=!1,width:st=200,collapsedWidth:zt=80,zeroWidthTriggerStyle:lt,breakpoint:tt,onCollapse:ut,onBreakpoint:mt}=Ae,Pt=ie(Ae,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:gt}=(0,me.useContext)(oe.Gs),[Ft,Ht]=(0,me.useState)("collapsed"in Ae?Ae.collapsed:ft),[hn,Qt]=(0,me.useState)(!1);(0,me.useEffect)(()=>{"collapsed"in Ae&&Ht(Ae.collapsed)},[Ae.collapsed]);const bn=(pt,Bt)=>{"collapsed"in Ae||Ht(pt),ut==null||ut(pt,Bt)},Wt=(0,me.useRef)();Wt.current=pt=>{Qt(pt.matches),mt==null||mt(pt.matches),Ft!==pt.matches&&bn(pt.matches,"responsive")},(0,me.useEffect)(()=>{function pt(xt){return Wt.current(xt)}let Bt;if(typeof window!="undefined"){const{matchMedia:xt}=window;if(xt&&tt&&tt in se){Bt=xt(`(max-width: ${se[tt]})`);try{Bt.addEventListener("change",pt)}catch(vt){Bt.addListener(pt)}pt(Bt)}}return()=>{try{Bt==null||Bt.removeEventListener("change",pt)}catch(xt){Bt==null||Bt.removeListener(pt)}}},[tt]),(0,me.useEffect)(()=>{const pt=Se("ant-sider-");return gt.addSider(pt),()=>gt.removeSider(pt)},[]);const Kt=()=>{bn(!Ft,"clickTrigger")},{getPrefixCls:Jt}=(0,me.useContext)(ee.E_),Yt=()=>{const pt=Jt("layout-sider",ze),Bt=(0,de.Z)(Pt,["collapsed"]),xt=Ft?zt:st,vt=z(xt)?`${xt}px`:String(xt),nt=parseFloat(String(zt||0))===0?me.createElement("span",{onClick:Kt,className:ve()(`${pt}-zero-width-trigger`,`${pt}-zero-width-trigger-${yt?"right":"left"}`),style:lt},Xe||me.createElement(ye,null)):null,We={expanded:yt?me.createElement(ge.Z,null):me.createElement(xe.Z,null),collapsed:yt?me.createElement(xe.Z,null):me.createElement(ge.Z,null)}[Ft?"collapsed":"expanded"],Oe=Xe!==null?nt||me.createElement("div",{className:`${pt}-trigger`,onClick:Kt,style:{width:vt}},Xe||We):null,be=Object.assign(Object.assign({},Ct),{flex:`0 0 ${vt}`,maxWidth:vt,minWidth:vt,width:vt}),Ne=ve()(pt,`${pt}-${at}`,{[`${pt}-collapsed`]:!!Ft,[`${pt}-has-trigger`]:et&&Xe!==null&&!nt,[`${pt}-below`]:!!hn,[`${pt}-zero-width`]:parseFloat(vt)===0},Ze);return me.createElement("aside",Object.assign({className:Ne},Bt,{style:be,ref:De}),me.createElement("div",{className:`${pt}-children`},Ge),et||hn&&nt?Oe:null)},kt=me.useMemo(()=>({siderCollapsed:Ft}),[Ft]);return me.createElement(ue.Provider,{value:kt},Yt())})},84966:function(_n,en,Ee){"use strict";Ee.d(en,{VY:function(){return ue},$_:function(){return se},h4:function(){return ie},Gs:function(){return de},ZP:function(){return Se}});var Me=Ee(80702),me=Ee(92310),Be=Ee.n(me),ke=Ee(2738),Ce=Ee(59301),Le=Ee(36355),he=Ee(83116),xe=we=>{const{componentCls:Pe,bodyBg:Ae,lightSiderBg:De,lightTriggerBg:ze,lightTriggerColor:Ze}=we;return{[`${Pe}-sider-light`]:{background:De,[`${Pe}-sider-trigger`]:{color:Ze,background:ze},[`${Pe}-sider-zero-width-trigger`]:{color:Ze,background:ze,border:`1px solid ${Ae}`,borderInlineStart:0}}}};const ge=we=>{const{antCls:Pe,componentCls:Ae,colorText:De,triggerColor:ze,footerBg:Ze,triggerBg:Xe,headerHeight:Ge,headerPadding:ft,headerColor:at,footerPadding:Ct,triggerHeight:et,zeroTriggerHeight:yt,zeroTriggerWidth:st,motionDurationMid:zt,motionDurationSlow:lt,fontSize:tt,borderRadius:ut,bodyBg:mt,headerBg:Pt,siderBg:gt}=we;return{[Ae]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:mt,"&, *":{boxSizing:"border-box"},[`&${Ae}-has-sider`]:{flexDirection:"row",[`> ${Ae}, > ${Ae}-content`]:{width:0}},[`${Ae}-header, &${Ae}-footer`]:{flex:"0 0 auto"},[`${Ae}-sider`]:{position:"relative",minWidth:0,background:gt,transition:`all ${zt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Pe}-menu${Pe}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:et},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:et,color:ze,lineHeight:`${et}px`,textAlign:"center",background:Xe,cursor:"pointer",transition:`all ${zt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ge,insetInlineEnd:-st,zIndex:1,width:st,height:yt,color:ze,fontSize:we.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:gt,borderStartStartRadius:0,borderStartEndRadius:ut,borderEndEndRadius:ut,borderEndStartRadius:0,cursor:"pointer",transition:`background ${lt} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${lt}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-st,borderStartStartRadius:ut,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:ut}}}}},xe(we)),{"&-rtl":{direction:"rtl"}}),[`${Ae}-header`]:{height:Ge,padding:ft,color:at,lineHeight:`${Ge}px`,background:Pt,[`${Pe}-menu`]:{lineHeight:"inherit"}},[`${Ae}-footer`]:{padding:Ct,color:De,fontSize:tt,background:Ze},[`${Ae}-content`]:{flex:"auto",minHeight:0}}};var le=(0,he.Z)("Layout",we=>[ge(we)],we=>{const{colorBgLayout:Pe,controlHeight:Ae,controlHeightLG:De,colorText:ze,controlHeightSM:Ze,marginXXS:Xe,colorTextLightSolid:Ge,colorBgContainer:ft}=we,at=De*1.25;return{colorBgHeader:"#001529",colorBgBody:Pe,colorBgTrigger:"#002140",bodyBg:Pe,headerBg:"#001529",headerHeight:Ae*2,headerPadding:`0 ${at}px`,headerColor:ze,footerPadding:`${Ze}px ${at}px`,footerBg:Pe,siderBg:"#001529",triggerHeight:De+Xe*2,triggerBg:"#002140",triggerColor:Ge,zeroTriggerWidth:De,zeroTriggerHeight:De,lightSiderBg:ft,lightTriggerBg:ft,lightTriggerColor:ze}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),ve=function(we,Pe){var Ae={};for(var De in we)Object.prototype.hasOwnProperty.call(we,De)&&Pe.indexOf(De)<0&&(Ae[De]=we[De]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,De=Object.getOwnPropertySymbols(we);ze<De.length;ze++)Pe.indexOf(De[ze])<0&&Object.prototype.propertyIsEnumerable.call(we,De[ze])&&(Ae[De[ze]]=we[De[ze]]);return Ae};const de=Ce.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ce(we){let{suffixCls:Pe,tagName:Ae,displayName:De}=we;return ze=>Ce.forwardRef((Xe,Ge)=>Ce.createElement(ze,Object.assign({ref:Ge,suffixCls:Pe,tagName:Ae},Xe)))}const z=Ce.forwardRef((we,Pe)=>{const{prefixCls:Ae,suffixCls:De,className:ze,tagName:Ze}=we,Xe=ve(we,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ge}=Ce.useContext(Le.E_),ft=Ge("layout",Ae),[at,Ct]=le(ft),et=De?`${ft}-${De}`:ft;return at(Ce.createElement(Ze,Object.assign({className:Be()(Ae||et,ze,Ct),ref:Pe},Xe)))}),ee=Ce.forwardRef((we,Pe)=>{const{direction:Ae}=Ce.useContext(Le.E_),[De,ze]=Ce.useState([]),{prefixCls:Ze,className:Xe,rootClassName:Ge,children:ft,hasSider:at,tagName:Ct,style:et}=we,yt=ve(we,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),st=(0,ke.Z)(yt,["suffixCls"]),{getPrefixCls:zt,layout:lt}=Ce.useContext(Le.E_),tt=zt("layout",Ze),[ut,mt]=le(tt),Pt=Be()(tt,{[`${tt}-has-sider`]:typeof at=="boolean"?at:De.length>0,[`${tt}-rtl`]:Ae==="rtl"},lt==null?void 0:lt.className,Xe,Ge,mt),gt=Ce.useMemo(()=>({siderHook:{addSider:Ft=>{ze(Ht=>[].concat((0,Me.Z)(Ht),[Ft]))},removeSider:Ft=>{ze(Ht=>Ht.filter(hn=>hn!==Ft))}}}),[]);return ut(Ce.createElement(de.Provider,{value:gt},Ce.createElement(Ct,Object.assign({ref:Pe,className:Pt,style:Object.assign(Object.assign({},lt==null?void 0:lt.style),et)},st),ft)))}),oe=ce({tagName:"div",displayName:"Layout"})(ee),ie=ce({suffixCls:"header",tagName:"header",displayName:"Header"})(z),se=ce({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(z),ue=ce({suffixCls:"content",tagName:"main",displayName:"Content"})(z);var Se=oe},40875:function(_n,en,Ee){"use strict";Ee.d(en,{J:function(){return Le}});var Me=Ee(59301),me=Ee(33234),Be=Ee(70425),ke=function(he,ye){var xe={};for(var ge in he)Object.prototype.hasOwnProperty.call(he,ge)&&ye.indexOf(ge)<0&&(xe[ge]=he[ge]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,ge=Object.getOwnPropertySymbols(he);le<ge.length;le++)ye.indexOf(ge[le])<0&&Object.prototype.propertyIsEnumerable.call(he,ge[le])&&(xe[ge[le]]=he[ge[le]]);return xe};const Ce=Me.createContext(null),Le=Me.forwardRef((he,ye)=>{const{children:xe}=he,ge=ke(he,["children"]),le=Me.useContext(Ce),ve=Me.useMemo(()=>Object.assign(Object.assign({},le),ge),[le,ge.prefixCls,ge.mode,ge.selectable]);return Me.createElement(Ce.Provider,{value:ve},Me.createElement(me.BR,null,(0,Be.supportNodeRef)(xe)?Me.cloneElement(xe,{ref:ye}):xe))});en.Z=Ce},20834:function(_n,en,Ee){"use strict";Ee.d(en,{default:function(){return kt}});var Me=Ee(15285),me=Ee(59301),Be=Ee(45818),ke=Ee(92310),Ce=Ee.n(ke),Le=Ee(36355),he=function(pt,Bt){var xt={};for(var vt in pt)Object.prototype.hasOwnProperty.call(pt,vt)&&Bt.indexOf(vt)<0&&(xt[vt]=pt[vt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,vt=Object.getOwnPropertySymbols(pt);nt<vt.length;nt++)Bt.indexOf(vt[nt])<0&&Object.prototype.propertyIsEnumerable.call(pt,vt[nt])&&(xt[vt[nt]]=pt[vt[nt]]);return xt},xe=pt=>{const{prefixCls:Bt,className:xt,dashed:vt}=pt,nt=he(pt,["prefixCls","className","dashed"]),{getPrefixCls:He}=me.useContext(Le.E_),Ie=He("menu",Bt),We=Ce()({[`${Ie}-item-divider-dashed`]:!!vt},xt);return me.createElement(Me.iz,Object.assign({className:We},nt))},ge=Ee(11592),le=Ee(2738),ve=Ee(6848),de=Ee(92343),z=(0,me.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),oe=pt=>{var Bt;const{className:xt,children:vt,icon:nt,title:He,danger:Ie}=pt,{prefixCls:We,firstLevel:Oe,direction:be,disableMenuItemTitleTooltip:Ne,inlineCollapsed:$e}=me.useContext(z),dt=gn=>{const Hn=me.createElement("span",{className:`${We}-title-content`},vt);return(!nt||(0,de.l$)(vt)&&vt.type==="span")&&vt&&gn&&Oe&&typeof vt=="string"?me.createElement("div",{className:`${We}-inline-collapsed-noicon`},vt.charAt(0)):Hn},{siderCollapsed:Je}=me.useContext(Be.D);let At=He;typeof He=="undefined"?At=Oe?vt:"":He===!1&&(At="");const tn={title:At};!Je&&!$e&&(tn.title=null,tn.open=!1);const pn=(0,ge.Z)(vt).length;let ln=me.createElement(Me.ck,Object.assign({},(0,le.Z)(pt,["title","icon","danger"]),{className:Ce()({[`${We}-item-danger`]:Ie,[`${We}-item-only-child`]:(nt?pn+1:pn)===1},xt),title:typeof He=="string"?He:void 0}),(0,de.Tm)(nt,{className:Ce()((0,de.l$)(nt)?(Bt=nt.props)===null||Bt===void 0?void 0:Bt.className:"",`${We}-item-icon`)}),dt($e));return Ne||(ln=me.createElement(ve.Z,Object.assign({},tn,{placement:be==="rtl"?"left":"right",overlayClassName:`${We}-inline-collapsed-tooltip`}),ln)),ln},se=pt=>{var Bt;const{popupClassName:xt,icon:vt,title:nt,theme:He}=pt,Ie=me.useContext(z),{prefixCls:We,inlineCollapsed:Oe,theme:be}=Ie,Ne=(0,Me.Xl)();let $e;if(!vt)$e=Oe&&!Ne.length&&nt&&typeof nt=="string"?me.createElement("div",{className:`${We}-inline-collapsed-noicon`},nt.charAt(0)):me.createElement("span",{className:`${We}-title-content`},nt);else{const Je=(0,de.l$)(nt)&&nt.type==="span";$e=me.createElement(me.Fragment,null,(0,de.Tm)(vt,{className:Ce()((0,de.l$)(vt)?(Bt=vt.props)===null||Bt===void 0?void 0:Bt.className:"",`${We}-item-icon`)}),Je?nt:me.createElement("span",{className:`${We}-title-content`},nt))}const dt=me.useMemo(()=>Object.assign(Object.assign({},Ie),{firstLevel:!1}),[Ie]);return me.createElement(z.Provider,{value:dt},me.createElement(Me.Wd,Object.assign({},(0,le.Z)(pt,["icon"]),{title:$e,popupClassName:Ce()(We,xt,`${We}-${He||be}`)})))},ue=Ee(18785),Se=Ee(70425),we=Ee(62892),Pe=Ee(40875),Ae=function(pt,Bt){var xt={};for(var vt in pt)Object.prototype.hasOwnProperty.call(pt,vt)&&Bt.indexOf(vt)<0&&(xt[vt]=pt[vt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,vt=Object.getOwnPropertySymbols(pt);nt<vt.length;nt++)Bt.indexOf(vt[nt])<0&&Object.prototype.propertyIsEnumerable.call(pt,vt[nt])&&(xt[vt[nt]]=pt[vt[nt]]);return xt};function De(pt){return(pt||[]).map((Bt,xt)=>{if(Bt&&typeof Bt=="object"){const vt=Bt,{label:nt,children:He,key:Ie,type:We}=vt,Oe=Ae(vt,["label","children","key","type"]),be=Ie!=null?Ie:`tmp-${xt}`;return He||We==="group"?We==="group"?me.createElement(Me.BW,Object.assign({key:be},Oe,{title:nt}),De(He)):me.createElement(se,Object.assign({key:be},Oe,{title:nt}),De(He)):We==="divider"?me.createElement(xe,Object.assign({key:be},Oe)):me.createElement(oe,Object.assign({key:be},Oe),nt)}return null}).filter(Bt=>Bt)}function ze(pt){return me.useMemo(()=>pt&&De(pt),[pt])}var Ze=Ee(64993),Xe=Ee(17313),Ge=Ee(8378),ft=Ee(13826),at=Ee(29878),Ct=Ee(83116),et=Ee(37613),st=pt=>{const{componentCls:Bt,motionDurationSlow:xt,horizontalLineHeight:vt,colorSplit:nt,lineWidth:He,lineType:Ie,itemPaddingInline:We}=pt;return{[`${Bt}-horizontal`]:{lineHeight:vt,border:0,borderBottom:`${He}px ${Ie} ${nt}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Bt}-item, ${Bt}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:We},[`> ${Bt}-item:hover,
|
|
|
> ${Bt}-item-active,
|
|
|
> ${Bt}-submenu ${Bt}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Bt}-item, ${Bt}-submenu-title`]:{transition:[`border-color ${xt}`,`background ${xt}`].join(",")},[`${Bt}-submenu-arrow`]:{display:"none"}}}},lt=pt=>{let{componentCls:Bt,menuArrowOffset:xt}=pt;return{[`${Bt}-rtl`]:{direction:"rtl"},[`${Bt}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Bt}-rtl${Bt}-vertical,
|
|
|
${Bt}-submenu-rtl ${Bt}-vertical`]:{[`${Bt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${xt})`},"&::after":{transform:`rotate(45deg) translateY(${xt})`}}}}};const tt=pt=>Object.assign({},(0,Xe.oN)(pt));var mt=(pt,Bt)=>{const{componentCls:xt,itemColor:vt,itemSelectedColor:nt,groupTitleColor:He,itemBg:Ie,subMenuItemBg:We,itemSelectedBg:Oe,activeBarHeight:be,activeBarWidth:Ne,activeBarBorderWidth:$e,motionDurationSlow:dt,motionEaseInOut:Je,motionEaseOut:At,itemPaddingInline:tn,motionDurationMid:pn,itemHoverColor:ln,lineType:gn,colorSplit:Hn,itemDisabledColor:An,dangerItemColor:qn,dangerItemHoverColor:ai,dangerItemSelectedColor:Ti,dangerItemActiveBg:Ci,dangerItemSelectedBg:$i,itemHoverBg:or,itemActiveBg:lr,menuSubMenuBg:qi,horizontalItemSelectedColor:Fr,horizontalItemSelectedBg:Mr,horizontalItemBorderRadius:yi,horizontalItemHoverBg:dr,popupBg:Zi}=pt;return{[`${xt}-${Bt}, ${xt}-${Bt} > ${xt}`]:{color:vt,background:Ie,[`&${xt}-root:focus-visible`]:Object.assign({},tt(pt)),[`${xt}-item-group-title`]:{color:He},[`${xt}-submenu-selected`]:{[`> ${xt}-submenu-title`]:{color:nt}},[`${xt}-item-disabled, ${xt}-submenu-disabled`]:{color:`${An} !important`},[`${xt}-item:not(${xt}-item-selected):not(${xt}-submenu-selected)`]:{[`&:hover, > ${xt}-submenu-title:hover`]:{color:ln}},[`&:not(${xt}-horizontal)`]:{[`${xt}-item:not(${xt}-item-selected)`]:{"&:hover":{backgroundColor:or},"&:active":{backgroundColor:lr}},[`${xt}-submenu-title`]:{"&:hover":{backgroundColor:or},"&:active":{backgroundColor:lr}}},[`${xt}-item-danger`]:{color:qn,[`&${xt}-item:hover`]:{[`&:not(${xt}-item-selected):not(${xt}-submenu-selected)`]:{color:ai}},[`&${xt}-item:active`]:{background:Ci}},[`${xt}-item a`]:{"&, &:hover":{color:"inherit"}},[`${xt}-item-selected`]:{color:nt,[`&${xt}-item-danger`]:{color:Ti},"a, a:hover":{color:"inherit"}},[`& ${xt}-item-selected`]:{backgroundColor:Oe,[`&${xt}-item-danger`]:{backgroundColor:$i}},[`${xt}-item, ${xt}-submenu-title`]:{[`&:not(${xt}-item-disabled):focus-visible`]:Object.assign({},tt(pt))},[`&${xt}-submenu > ${xt}`]:{backgroundColor:qi},[`&${xt}-popup > ${xt}`]:{backgroundColor:Zi},[`&${xt}-horizontal`]:Object.assign(Object.assign({},Bt==="dark"?{borderBottom:0}:{}),{[`> ${xt}-item, > ${xt}-submenu`]:{top:$e,marginTop:-$e,marginBottom:0,borderRadius:yi,"&::after":{position:"absolute",insetInline:tn,bottom:0,borderBottom:`${be}px solid transparent`,transition:`border-color ${dt} ${Je}`,content:'""'},"&:hover, &-active, &-open":{background:dr,"&::after":{borderBottomWidth:be,borderBottomColor:Fr}},"&-selected":{color:Fr,backgroundColor:Mr,"&:hover":{backgroundColor:Mr},"&::after":{borderBottomWidth:be,borderBottomColor:Fr}}}}),[`&${xt}-root`]:{[`&${xt}-inline, &${xt}-vertical`]:{borderInlineEnd:`${$e}px ${gn} ${Hn}`}},[`&${xt}-inline`]:{[`${xt}-sub${xt}-inline`]:{background:We},[`${xt}-item, ${xt}-submenu-title`]:$e&&Ne?{width:`calc(100% + ${$e}px)`}:{},[`${xt}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Ne}px solid ${nt}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${pn} ${At}`,`opacity ${pn} ${At}`].join(","),content:'""'},[`&${xt}-item-danger`]:{"&::after":{borderInlineEndColor:Ti}}},[`${xt}-selected, ${xt}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${pn} ${Je}`,`opacity ${pn} ${Je}`].join(",")}}}}}};const Pt=pt=>{const{componentCls:Bt,itemHeight:xt,itemMarginInline:vt,padding:nt,menuArrowSize:He,marginXS:Ie,itemMarginBlock:We}=pt,Oe=nt+He+Ie;return{[`${Bt}-item`]:{position:"relative",overflow:"hidden"},[`${Bt}-item, ${Bt}-submenu-title`]:{height:xt,lineHeight:`${xt}px`,paddingInline:nt,overflow:"hidden",textOverflow:"ellipsis",marginInline:vt,marginBlock:We,width:`calc(100% - ${vt*2}px)`},[`> ${Bt}-item,
|
|
|
> ${Bt}-submenu > ${Bt}-submenu-title`]:{height:xt,lineHeight:`${xt}px`},[`${Bt}-item-group-list ${Bt}-submenu-title,
|
|
|
${Bt}-submenu-title`]:{paddingInlineEnd:Oe}}};var Ft=pt=>{const{componentCls:Bt,iconCls:xt,itemHeight:vt,colorTextLightSolid:nt,dropdownWidth:He,controlHeightLG:Ie,motionDurationMid:We,motionEaseOut:Oe,paddingXL:be,itemMarginInline:Ne,fontSizeLG:$e,motionDurationSlow:dt,paddingXS:Je,boxShadowSecondary:At,collapsedWidth:tn,collapsedIconSize:pn}=pt,ln={height:vt,lineHeight:`${vt}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Bt]:{"&-inline, &-vertical":Object.assign({[`&${Bt}-root`]:{boxShadow:"none"}},Pt(pt))},[`${Bt}-submenu-popup`]:{[`${Bt}-vertical`]:Object.assign(Object.assign({},Pt(pt)),{boxShadow:At})}},{[`${Bt}-submenu-popup ${Bt}-vertical${Bt}-sub`]:{minWidth:He,maxHeight:`calc(100vh - ${Ie*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Bt}-inline`]:{width:"100%",[`&${Bt}-root`]:{[`${Bt}-item, ${Bt}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${dt}`,`background ${dt}`,`padding ${We} ${Oe}`].join(","),[`> ${Bt}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Bt}-sub${Bt}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Bt}-submenu > ${Bt}-submenu-title`]:ln,[`& ${Bt}-item-group-title`]:{paddingInlineStart:be}},[`${Bt}-item`]:ln}},{[`${Bt}-inline-collapsed`]:{width:tn,[`&${Bt}-root`]:{[`${Bt}-item, ${Bt}-submenu ${Bt}-submenu-title`]:{[`> ${Bt}-inline-collapsed-noicon`]:{fontSize:$e,textAlign:"center"}}},[`> ${Bt}-item,
|
|
|
> ${Bt}-item-group > ${Bt}-item-group-list > ${Bt}-item,
|
|
|
> ${Bt}-item-group > ${Bt}-item-group-list > ${Bt}-submenu > ${Bt}-submenu-title,
|
|
|
> ${Bt}-submenu > ${Bt}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${$e/2}px - ${Ne}px)`,textOverflow:"clip",[`
|
|
|
${Bt}-submenu-arrow,
|
|
|
${Bt}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Bt}-item-icon, ${xt}`]:{margin:0,fontSize:pn,lineHeight:`${vt}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Bt}-item-icon, ${xt}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Bt}-item-icon, ${xt}`]:{display:"none"},"a, a:hover":{color:nt}},[`${Bt}-item-group-title`]:Object.assign(Object.assign({},Xe.vS),{paddingInline:Je})}}]};const Ht=pt=>{const{componentCls:Bt,motionDurationSlow:xt,motionDurationMid:vt,motionEaseInOut:nt,motionEaseOut:He,iconCls:Ie,iconSize:We,iconMarginInlineEnd:Oe}=pt;return{[`${Bt}-item, ${Bt}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${xt}`,`background ${xt}`,`padding ${xt} ${nt}`].join(","),[`${Bt}-item-icon, ${Ie}`]:{minWidth:We,fontSize:We,transition:[`font-size ${vt} ${He}`,`margin ${xt} ${nt}`,`color ${xt}`].join(","),"+ span":{marginInlineStart:Oe,opacity:1,transition:[`opacity ${xt} ${nt}`,`margin ${xt}`,`color ${xt}`].join(",")}},[`${Bt}-item-icon`]:Object.assign({},(0,Xe.Ro)()),[`&${Bt}-item-only-child`]:{[`> ${Ie}, > ${Bt}-item-icon`]:{marginInlineEnd:0}}},[`${Bt}-item-disabled, ${Bt}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Bt}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},hn=pt=>{const{componentCls:Bt,motionDurationSlow:xt,motionEaseInOut:vt,borderRadius:nt,menuArrowSize:He,menuArrowOffset:Ie}=pt;return{[`${Bt}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:pt.margin,width:He,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${xt} ${vt}, opacity ${xt}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:He*.6,height:He*.15,backgroundColor:"currentcolor",borderRadius:nt,transition:[`background ${xt} ${vt}`,`transform ${xt} ${vt}`,`top ${xt} ${vt}`,`color ${xt} ${vt}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Ie})`},"&::after":{transform:`rotate(-45deg) translateY(${Ie})`}}}}},Qt=pt=>{const{antCls:Bt,componentCls:xt,fontSize:vt,motionDurationSlow:nt,motionDurationMid:He,motionEaseInOut:Ie,paddingXS:We,padding:Oe,colorSplit:be,lineWidth:Ne,zIndexPopup:$e,borderRadiusLG:dt,subMenuItemBorderRadius:Je,menuArrowSize:At,menuArrowOffset:tn,lineType:pn,menuPanelMaskInset:ln,groupTitleLineHeight:gn,groupTitleFontSize:Hn}=pt;return[{"":{[`${xt}`]:Object.assign(Object.assign({},(0,Xe.dF)()),{"&-hidden":{display:"none"}})},[`${xt}-submenu-hidden`]:{display:"none"}},{[xt]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Xe.Wf)(pt)),(0,Xe.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:vt,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${nt} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${xt}-item`]:{flex:"none"}},[`${xt}-item, ${xt}-submenu, ${xt}-submenu-title`]:{borderRadius:pt.itemBorderRadius},[`${xt}-item-group-title`]:{padding:`${We}px ${Oe}px`,fontSize:Hn,lineHeight:gn,transition:`all ${nt}`},[`&-horizontal ${xt}-submenu`]:{transition:[`border-color ${nt} ${Ie}`,`background ${nt} ${Ie}`].join(",")},[`${xt}-submenu, ${xt}-submenu-inline`]:{transition:[`border-color ${nt} ${Ie}`,`background ${nt} ${Ie}`,`padding ${He} ${Ie}`].join(",")},[`${xt}-submenu ${xt}-sub`]:{cursor:"initial",transition:[`background ${nt} ${Ie}`,`padding ${nt} ${Ie}`].join(",")},[`${xt}-title-content`]:{transition:`color ${nt}`},[`${xt}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${xt}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:be,borderStyle:pn,borderWidth:0,borderTopWidth:Ne,marginBlock:Ne,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Ht(pt)),{[`${xt}-item-group`]:{[`${xt}-item-group-list`]:{margin:0,padding:0,[`${xt}-item, ${xt}-submenu-title`]:{paddingInline:`${vt*2}px ${Oe}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:$e,borderRadius:dt,boxShadow:"none",transformOrigin:"0 0",[`&${xt}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${ln}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:ln},"\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:pt.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:pt.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:pt.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:pt.paddingXS},[`> ${xt}`]:Object.assign(Object.assign(Object.assign({borderRadius:dt},Ht(pt)),hn(pt)),{[`${xt}-item, ${xt}-submenu > ${xt}-submenu-title`]:{borderRadius:Je},[`${xt}-submenu-title::after`]:{transition:`transform ${nt} ${Ie}`}})}}),hn(pt)),{[`&-inline-collapsed ${xt}-submenu-arrow,
|
|
|
&-inline ${xt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${tn})`},"&::after":{transform:`rotate(45deg) translateX(-${tn})`}},[`${xt}-submenu-open${xt}-submenu-inline > ${xt}-submenu-title > ${xt}-submenu-arrow`]:{transform:`translateY(-${At*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${tn})`},"&::before":{transform:`rotate(45deg) translateX(${tn})`}}})},{[`${Bt}-layout-header`]:{[xt]:{lineHeight:"inherit"}}}]};var bn=(pt,Bt)=>(0,Ct.Z)("Menu",vt=>{if(Bt===!1)return[];const{colorBgElevated:nt,colorPrimary:He,colorTextLightSolid:Ie,controlHeightLG:We,fontSize:Oe,darkItemColor:be,darkDangerItemColor:Ne,darkItemBg:$e,darkSubMenuItemBg:dt,darkItemSelectedColor:Je,darkItemSelectedBg:At,darkDangerItemSelectedBg:tn,darkItemHoverBg:pn,darkGroupTitleColor:ln,darkItemHoverColor:gn,darkItemDisabledColor:Hn,darkDangerItemHoverColor:An,darkDangerItemSelectedColor:qn,darkDangerItemActiveBg:ai}=vt,Ti=Oe/7*5,Ci=(0,et.TS)(vt,{menuArrowSize:Ti,menuHorizontalHeight:We*1.15,menuArrowOffset:`${Ti*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:nt}),$i=(0,et.TS)(Ci,{itemColor:be,itemHoverColor:gn,groupTitleColor:ln,itemSelectedColor:Je,itemBg:$e,popupBg:$e,subMenuItemBg:dt,itemActiveBg:"transparent",itemSelectedBg:At,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:pn,itemDisabledColor:Hn,dangerItemColor:Ne,dangerItemHoverColor:An,dangerItemSelectedColor:qn,dangerItemActiveBg:ai,dangerItemSelectedBg:tn,menuSubMenuBg:dt,horizontalItemSelectedColor:Ie,horizontalItemSelectedBg:He});return[Qt(Ci),st(Ci),Ft(Ci),mt(Ci,"light"),mt($i,"dark"),lt(Ci),(0,Ge.Z)(Ci),(0,ft.oN)(Ci,"slide-up"),(0,ft.oN)(Ci,"slide-down"),(0,at._y)(Ci,"zoom-big")]},vt=>{const{colorPrimary:nt,colorError:He,colorTextDisabled:Ie,colorErrorBg:We,colorText:Oe,colorTextDescription:be,colorBgContainer:Ne,colorFillAlter:$e,colorFillContent:dt,lineWidth:Je,lineWidthBold:At,controlItemBgActive:tn,colorBgTextHover:pn,controlHeightLG:ln,lineHeight:gn,colorBgElevated:Hn,marginXXS:An,padding:qn,fontSize:ai,controlHeightSM:Ti,fontSizeLG:Ci,colorTextLightSolid:$i,colorErrorHover:or}=vt,lr=new Ze.C($i).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:vt.zIndexPopupBase+50,radiusItem:vt.borderRadiusLG,itemBorderRadius:vt.borderRadiusLG,radiusSubMenuItem:vt.borderRadiusSM,subMenuItemBorderRadius:vt.borderRadiusSM,colorItemText:Oe,itemColor:Oe,colorItemTextHover:Oe,itemHoverColor:Oe,colorItemTextHoverHorizontal:nt,horizontalItemHoverColor:nt,colorGroupTitle:be,groupTitleColor:be,colorItemTextSelected:nt,itemSelectedColor:nt,colorItemTextSelectedHorizontal:nt,horizontalItemSelectedColor:nt,colorItemBg:Ne,itemBg:Ne,colorItemBgHover:pn,itemHoverBg:pn,colorItemBgActive:dt,itemActiveBg:tn,colorSubItemBg:$e,subMenuItemBg:$e,colorItemBgSelected:tn,itemSelectedBg:tn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:At,activeBarHeight:At,colorActiveBarBorderSize:Je,activeBarBorderWidth:Je,colorItemTextDisabled:Ie,itemDisabledColor:Ie,colorDangerItemText:He,dangerItemColor:He,colorDangerItemTextHover:He,dangerItemHoverColor:He,colorDangerItemTextSelected:He,dangerItemSelectedColor:He,colorDangerItemBgActive:We,dangerItemActiveBg:We,colorDangerItemBgSelected:We,dangerItemSelectedBg:We,itemMarginInline:vt.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:ln,groupTitleLineHeight:gn,collapsedWidth:ln*2,popupBg:Hn,itemMarginBlock:An,itemPaddingInline:qn,horizontalLineHeight:`${ln*1.15}px`,iconSize:ai,iconMarginInlineEnd:Ti-ai,collapsedIconSize:Ci,groupTitleFontSize:ai,darkItemDisabledColor:new Ze.C($i).setAlpha(.25).toRgbString(),darkItemColor:lr,darkDangerItemColor:He,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:$i,darkItemSelectedBg:nt,darkDangerItemSelectedBg:He,darkItemHoverBg:"transparent",darkGroupTitleColor:lr,darkItemHoverColor:$i,darkDangerItemHoverColor:or,darkDangerItemSelectedColor:$i,darkDangerItemActiveBg:He}},{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"]]})(pt),Wt=function(pt,Bt){var xt={};for(var vt in pt)Object.prototype.hasOwnProperty.call(pt,vt)&&Bt.indexOf(vt)<0&&(xt[vt]=pt[vt]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,vt=Object.getOwnPropertySymbols(pt);nt<vt.length;nt++)Bt.indexOf(vt[nt])<0&&Object.prototype.propertyIsEnumerable.call(pt,vt[nt])&&(xt[vt[nt]]=pt[vt[nt]]);return xt},Jt=(0,me.forwardRef)((pt,Bt)=>{var xt,vt;const nt=me.useContext(Pe.Z),He=nt||{},{getPrefixCls:Ie,getPopupContainer:We,direction:Oe,menu:be}=me.useContext(Le.E_),Ne=Ie(),{prefixCls:$e,className:dt,style:Je,theme:At="light",expandIcon:tn,_internalDisableMenuItemTitleTooltip:pn,inlineCollapsed:ln,siderCollapsed:gn,items:Hn,children:An,rootClassName:qn,mode:ai,selectable:Ti,onClick:Ci,overflowedIndicatorPopupClassName:$i}=pt,or=Wt(pt,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),lr=(0,le.Z)(or,["collapsedWidth"]),qi=ze(Hn)||An;(xt=He.validator)===null||xt===void 0||xt.call(He,{mode:ai});const Fr=(0,Se.useEvent)(function(){var no;Ci==null||Ci.apply(void 0,arguments),(no=He.onClick)===null||no===void 0||no.call(He)}),Mr=He.mode||ai,yi=Ti!=null?Ti:He.selectable,dr=me.useMemo(()=>gn!==void 0?gn:ln,[ln,gn]),Zi={horizontal:{motionName:`${Ne}-slide-up`},inline:(0,we.Z)(Ne),other:{motionName:`${Ne}-zoom-big`}},rt=Ie("menu",$e||He.prefixCls),[Ir,Ar]=bn(rt,!nt),$r=Ce()(`${rt}-${At}`,be==null?void 0:be.className,dt);let co;if(typeof tn=="function")co=tn;else if(tn===null||tn===!1)co=null;else if(He.expandIcon===null||He.expandIcon===!1)co=null;else{const no=tn!=null?tn:He.expandIcon;co=(0,de.Tm)(no,{className:Ce()(`${rt}-submenu-expand-icon`,(0,de.l$)(no)?(vt=no.props)===null||vt===void 0?void 0:vt.className:"")})}const mo=me.useMemo(()=>({prefixCls:rt,inlineCollapsed:dr||!1,direction:Oe,firstLevel:!0,theme:At,mode:Mr,disableMenuItemTitleTooltip:pn}),[rt,dr,Oe,pn,At]);return Ir(me.createElement(Pe.Z.Provider,{value:null},me.createElement(z.Provider,{value:mo},me.createElement(Me.ZP,Object.assign({getPopupContainer:We,overflowedIndicator:me.createElement(ue.Z,null),overflowedIndicatorPopupClassName:Ce()(rt,`${rt}-${At}`,$i),mode:Mr,selectable:yi,onClick:Fr},lr,{inlineCollapsed:dr,style:Object.assign(Object.assign({},be==null?void 0:be.style),Je),className:$r,prefixCls:rt,direction:Oe,defaultMotions:Zi,expandIcon:co,ref:Bt,rootClassName:Ce()(qn,Ar)}),qi))))});const Yt=(0,me.forwardRef)((pt,Bt)=>{const xt=(0,me.useRef)(null),vt=me.useContext(Be.D);return(0,me.useImperativeHandle)(Bt,()=>({menu:xt.current,focus:nt=>{var He;(He=xt.current)===null||He===void 0||He.focus(nt)}})),me.createElement(Jt,Object.assign({ref:xt},pt,vt))});Yt.Item=oe,Yt.SubMenu=se,Yt.Divider=xe,Yt.ItemGroup=Me.BW;var kt=Yt},58421:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return He}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(We,Oe){return me.createElement(Ce.Z,(0,Me.Z)({},We,{ref:Oe,icon:ke}))},he=me.forwardRef(Le),ye=he,xe=Ee(49198),ge=Ee(33853),le=Ee(38819),ve=Ee(92310),de=Ee.n(ve),ce=Ee(49618),z=Ee(77321),ee=Ee(96949),oe=Ee(55090),ie=Ee(77205),se=Ee(38793),ue=Ee(26112),Se={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},we=Se,Pe=Ee(91735),Ae=function(Ie){(0,ie.Z)(Oe,Ie);var We=(0,se.Z)(Oe);function Oe(){var be;(0,ee.Z)(this,Oe);for(var Ne=arguments.length,$e=new Array(Ne),dt=0;dt<Ne;dt++)$e[dt]=arguments[dt];return be=We.call.apply(We,[this].concat($e)),be.state={goInputText:""},be.getValidValue=function(){var Je=be.state.goInputText;return!Je||Number.isNaN(Je)?void 0:Number(Je)},be.buildOptionText=function(Je){return"".concat(Je," ").concat(be.props.locale.items_per_page)},be.changeSize=function(Je){be.props.changeSize(Number(Je))},be.handleChange=function(Je){be.setState({goInputText:Je.target.value})},be.handleBlur=function(Je){var At=be.props,tn=At.goButton,pn=At.quickGo,ln=At.rootPrefixCls,gn=be.state.goInputText;tn||gn===""||(be.setState({goInputText:""}),!(Je.relatedTarget&&(Je.relatedTarget.className.indexOf("".concat(ln,"-item-link"))>=0||Je.relatedTarget.className.indexOf("".concat(ln,"-item"))>=0))&&pn(be.getValidValue()))},be.go=function(Je){var At=be.state.goInputText;At!==""&&(Je.keyCode===we.ENTER||Je.type==="click")&&(be.setState({goInputText:""}),be.props.quickGo(be.getValidValue()))},be}return(0,oe.Z)(Oe,[{key:"getPageSizeOptions",value:function(){var Ne=this.props,$e=Ne.pageSize,dt=Ne.pageSizeOptions;return dt.some(function(Je){return Je.toString()===$e.toString()})?dt:dt.concat([$e.toString()]).sort(function(Je,At){var tn=Number.isNaN(Number(Je))?0:Number(Je),pn=Number.isNaN(Number(At))?0:Number(At);return tn-pn})}},{key:"render",value:function(){var Ne=this,$e=this.props,dt=$e.pageSize,Je=$e.locale,At=$e.rootPrefixCls,tn=$e.changeSize,pn=$e.quickGo,ln=$e.goButton,gn=$e.selectComponentClass,Hn=$e.buildOptionText,An=$e.selectPrefixCls,qn=$e.disabled,ai=this.state.goInputText,Ti="".concat(At,"-options"),Ci=gn,$i=null,or=null,lr=null;if(!tn&&!pn)return null;var qi=this.getPageSizeOptions();if(tn&&Ci){var Fr=qi.map(function(Mr,yi){return me.createElement(Ci.Option,{key:yi,value:Mr.toString()},(Hn||Ne.buildOptionText)(Mr))});$i=me.createElement(Ci,{disabled:qn,prefixCls:An,showSearch:!1,className:"".concat(Ti,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(dt||qi[0]).toString(),onChange:this.changeSize,getPopupContainer:function(yi){return yi.parentNode},"aria-label":Je.page_size,defaultOpen:!1},Fr)}return pn&&(ln&&(lr=typeof ln=="boolean"?me.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:qn,className:"".concat(Ti,"-quick-jumper-button")},Je.jump_to_confirm):me.createElement("span",{onClick:this.go,onKeyUp:this.go},ln)),or=me.createElement("div",{className:"".concat(Ti,"-quick-jumper")},Je.jump_to,me.createElement("input",{disabled:qn,type:"text",value:ai,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Je.page}),Je.page,lr)),me.createElement("li",{className:"".concat(Ti)},$i,or)}}]),Oe}(me.Component);Ae.defaultProps={pageSizeOptions:["10","20","50","100"]};var De=Ae,ze=function(We){var Oe,be=We.rootPrefixCls,Ne=We.page,$e=We.active,dt=We.className,Je=We.showTitle,At=We.onClick,tn=We.onKeyPress,pn=We.itemRender,ln="".concat(be,"-item"),gn=de()(ln,"".concat(ln,"-").concat(Ne),(Oe={},(0,ce.Z)(Oe,"".concat(ln,"-active"),$e),(0,ce.Z)(Oe,"".concat(ln,"-disabled"),!Ne),(0,ce.Z)(Oe,We.className,dt),Oe)),Hn=function(){At(Ne)},An=function(Ti){tn(Ti,At,Ne)},qn=pn(Ne,"page",me.createElement("a",{rel:"nofollow"},Ne));return qn?me.createElement("li",{title:Je?Ne.toString():null,className:gn,onClick:Hn,onKeyPress:An,tabIndex:0},qn):null},Ze=ze;function Xe(){}function Ge(Ie){var We=Number(Ie);return typeof We=="number"&&!Number.isNaN(We)&&isFinite(We)&&Math.floor(We)===We}var ft=function(We,Oe,be){return be};function at(Ie,We,Oe){var be=typeof Ie=="undefined"?We.pageSize:Ie;return Math.floor((Oe.total-1)/be)+1}var Ct=function(Ie){(0,ie.Z)(Oe,Ie);var We=(0,se.Z)(Oe);function Oe(be){var Ne;(0,ee.Z)(this,Oe),Ne=We.call(this,be),Ne.paginationNode=me.createRef(),Ne.getJumpPrevPage=function(){return Math.max(1,Ne.state.current-(Ne.props.showLessItems?3:5))},Ne.getJumpNextPage=function(){return Math.min(at(void 0,Ne.state,Ne.props),Ne.state.current+(Ne.props.showLessItems?3:5))},Ne.getItemIcon=function(tn,pn){var ln=Ne.props.prefixCls,gn=tn||me.createElement("button",{type:"button","aria-label":pn,className:"".concat(ln,"-item-link")});return typeof tn=="function"&&(gn=me.createElement(tn,(0,z.Z)({},Ne.props))),gn},Ne.isValid=function(tn){var pn=Ne.props.total;return Ge(tn)&&tn!==Ne.state.current&&Ge(pn)&&pn>0},Ne.shouldDisplayQuickJumper=function(){var tn=Ne.props,pn=tn.showQuickJumper,ln=tn.total,gn=Ne.state.pageSize;return ln<=gn?!1:pn},Ne.handleKeyDown=function(tn){(tn.keyCode===we.ARROW_UP||tn.keyCode===we.ARROW_DOWN)&&tn.preventDefault()},Ne.handleKeyUp=function(tn){var pn=Ne.getValidValue(tn),ln=Ne.state.currentInputValue;pn!==ln&&Ne.setState({currentInputValue:pn}),tn.keyCode===we.ENTER?Ne.handleChange(pn):tn.keyCode===we.ARROW_UP?Ne.handleChange(pn-1):tn.keyCode===we.ARROW_DOWN&&Ne.handleChange(pn+1)},Ne.handleBlur=function(tn){var pn=Ne.getValidValue(tn);Ne.handleChange(pn)},Ne.changePageSize=function(tn){var pn=Ne.state.current,ln=at(tn,Ne.state,Ne.props);pn=pn>ln?ln:pn,ln===0&&(pn=Ne.state.current),typeof tn=="number"&&("pageSize"in Ne.props||Ne.setState({pageSize:tn}),"current"in Ne.props||Ne.setState({current:pn,currentInputValue:pn})),Ne.props.onShowSizeChange(pn,tn),"onChange"in Ne.props&&Ne.props.onChange&&Ne.props.onChange(pn,tn)},Ne.handleChange=function(tn){var pn=Ne.props,ln=pn.disabled,gn=pn.onChange,Hn=Ne.state,An=Hn.pageSize,qn=Hn.current,ai=Hn.currentInputValue;if(Ne.isValid(tn)&&!ln){var Ti=at(void 0,Ne.state,Ne.props),Ci=tn;return tn>Ti?Ci=Ti:tn<1&&(Ci=1),"current"in Ne.props||Ne.setState({current:Ci}),Ci!==ai&&Ne.setState({currentInputValue:Ci}),gn(Ci,An),Ci}return qn},Ne.prev=function(){Ne.hasPrev()&&Ne.handleChange(Ne.state.current-1)},Ne.next=function(){Ne.hasNext()&&Ne.handleChange(Ne.state.current+1)},Ne.jumpPrev=function(){Ne.handleChange(Ne.getJumpPrevPage())},Ne.jumpNext=function(){Ne.handleChange(Ne.getJumpNextPage())},Ne.hasPrev=function(){return Ne.state.current>1},Ne.hasNext=function(){return Ne.state.current<at(void 0,Ne.state,Ne.props)},Ne.runIfEnter=function(tn,pn){if(tn.key==="Enter"||tn.charCode===13){for(var ln=arguments.length,gn=new Array(ln>2?ln-2:0),Hn=2;Hn<ln;Hn++)gn[Hn-2]=arguments[Hn];pn.apply(void 0,gn)}},Ne.runIfEnterPrev=function(tn){Ne.runIfEnter(tn,Ne.prev)},Ne.runIfEnterNext=function(tn){Ne.runIfEnter(tn,Ne.next)},Ne.runIfEnterJumpPrev=function(tn){Ne.runIfEnter(tn,Ne.jumpPrev)},Ne.runIfEnterJumpNext=function(tn){Ne.runIfEnter(tn,Ne.jumpNext)},Ne.handleGoTO=function(tn){(tn.keyCode===we.ENTER||tn.type==="click")&&Ne.handleChange(Ne.state.currentInputValue)},Ne.renderPrev=function(tn){var pn=Ne.props,ln=pn.prevIcon,gn=pn.itemRender,Hn=gn(tn,"prev",Ne.getItemIcon(ln,"prev page")),An=!Ne.hasPrev();return(0,me.isValidElement)(Hn)?(0,me.cloneElement)(Hn,{disabled:An}):Hn},Ne.renderNext=function(tn){var pn=Ne.props,ln=pn.nextIcon,gn=pn.itemRender,Hn=gn(tn,"next",Ne.getItemIcon(ln,"next page")),An=!Ne.hasNext();return(0,me.isValidElement)(Hn)?(0,me.cloneElement)(Hn,{disabled:An}):Hn};var $e=be.onChange!==Xe,dt="current"in be;dt&&!$e&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Je=be.defaultCurrent;"current"in be&&(Je=be.current);var At=be.defaultPageSize;return"pageSize"in be&&(At=be.pageSize),Je=Math.min(Je,at(At,void 0,be)),Ne.state={current:Je,currentInputValue:Je,pageSize:At},Ne}return(0,oe.Z)(Oe,[{key:"componentDidUpdate",value:function(Ne,$e){var dt=this.props.prefixCls;if($e.current!==this.state.current&&this.paginationNode.current){var Je=this.paginationNode.current.querySelector(".".concat(dt,"-item-").concat($e.current));if(Je&&document.activeElement===Je){var At;Je==null||(At=Je.blur)===null||At===void 0||At.call(Je)}}}},{key:"getValidValue",value:function(Ne){var $e=Ne.target.value,dt=at(void 0,this.state,this.props),Je=this.state.currentInputValue,At;return $e===""?At=$e:Number.isNaN(Number($e))?At=Je:$e>=dt?At=dt:At=Number($e),At}},{key:"getShowSizeChanger",value:function(){var Ne=this.props,$e=Ne.showSizeChanger,dt=Ne.total,Je=Ne.totalBoundaryShowSizeChanger;return typeof $e!="undefined"?$e:dt>Je}},{key:"render",value:function(){var Ne=this.props,$e=Ne.prefixCls,dt=Ne.className,Je=Ne.style,At=Ne.disabled,tn=Ne.hideOnSinglePage,pn=Ne.total,ln=Ne.locale,gn=Ne.showQuickJumper,Hn=Ne.showLessItems,An=Ne.showTitle,qn=Ne.showTotal,ai=Ne.simple,Ti=Ne.itemRender,Ci=Ne.showPrevNextJumpers,$i=Ne.jumpPrevIcon,or=Ne.jumpNextIcon,lr=Ne.selectComponentClass,qi=Ne.selectPrefixCls,Fr=Ne.pageSizeOptions,Mr=this.state,yi=Mr.current,dr=Mr.pageSize,Zi=Mr.currentInputValue;if(tn===!0&&pn<=dr)return null;var rt=at(void 0,this.state,this.props),Ir=[],Ar=null,$r=null,co=null,mo=null,no=null,lo=gn&&gn.goButton,ri=Hn?1:2,Ke=yi-1>0?yi-1:0,qe=yi+1<rt?yi+1:rt,Ye=(0,ue.Z)(this.props,{aria:!0,data:!0}),St=qn&&me.createElement("li",{className:"".concat($e,"-total-text")},qn(pn,[pn===0?0:(yi-1)*dr+1,yi*dr>pn?pn:yi*dr]));if(ai){lo&&(typeof lo=="boolean"?no=me.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ln.jump_to_confirm):no=me.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},lo),no=me.createElement("li",{title:An?"".concat(ln.jump_to).concat(yi,"/").concat(rt):null,className:"".concat($e,"-simple-pager")},no));var Ot=this.renderPrev(Ke);return me.createElement("ul",(0,Me.Z)({className:de()($e,"".concat($e,"-simple"),(0,ce.Z)({},"".concat($e,"-disabled"),At),dt),style:Je,ref:this.paginationNode},Ye),St,Ot?me.createElement("li",{title:An?ln.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:de()("".concat($e,"-prev"),(0,ce.Z)({},"".concat($e,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},Ot):null,me.createElement("li",{title:An?"".concat(yi,"/").concat(rt):null,className:"".concat($e,"-simple-pager")},me.createElement("input",{type:"text",value:Zi,disabled:At,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),me.createElement("span",{className:"".concat($e,"-slash")},"/"),rt),me.createElement("li",{title:An?ln.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:de()("".concat($e,"-next"),(0,ce.Z)({},"".concat($e,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(qe)),no)}if(rt<=3+ri*2){var Tt={locale:ln,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:An,itemRender:Ti};rt||Ir.push(me.createElement(Ze,(0,Me.Z)({},Tt,{key:"noPager",page:1,className:"".concat($e,"-item-disabled")})));for(var _t=1;_t<=rt;_t+=1){var dn=yi===_t;Ir.push(me.createElement(Ze,(0,Me.Z)({},Tt,{key:_t,page:_t,active:dn})))}}else{var Pn=Hn?ln.prev_3:ln.prev_5,mn=Hn?ln.next_3:ln.next_5,sn=Ti(this.getJumpPrevPage(),"jump-prev",this.getItemIcon($i,"prev page")),Nt=Ti(this.getJumpNextPage(),"jump-next",this.getItemIcon(or,"next page"));Ci&&(Ar=sn?me.createElement("li",{title:An?Pn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:de()("".concat($e,"-jump-prev"),(0,ce.Z)({},"".concat($e,"-jump-prev-custom-icon"),!!$i))},sn):null,$r=Nt?me.createElement("li",{title:An?mn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:de()("".concat($e,"-jump-next"),(0,ce.Z)({},"".concat($e,"-jump-next-custom-icon"),!!or))},Nt):null),mo=me.createElement(Ze,{locale:ln,last:!0,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:rt,page:rt,active:!1,showTitle:An,itemRender:Ti}),co=me.createElement(Ze,{locale:ln,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:An,itemRender:Ti});var un=Math.max(1,yi-ri),Ln=Math.min(yi+ri,rt);yi-1<=ri&&(Ln=1+ri*2),rt-yi<=ri&&(un=rt-ri*2);for(var Dn=un;Dn<=Ln;Dn+=1){var $t=yi===Dn;Ir.push(me.createElement(Ze,{locale:ln,rootPrefixCls:$e,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Dn,page:Dn,active:$t,showTitle:An,itemRender:Ti}))}yi-1>=ri*2&&yi!==3&&(Ir[0]=(0,me.cloneElement)(Ir[0],{className:"".concat($e,"-item-after-jump-prev")}),Ir.unshift(Ar)),rt-yi>=ri*2&&yi!==rt-2&&(Ir[Ir.length-1]=(0,me.cloneElement)(Ir[Ir.length-1],{className:"".concat($e,"-item-before-jump-next")}),Ir.push($r)),un!==1&&Ir.unshift(co),Ln!==rt&&Ir.push(mo)}var rn=!this.hasPrev()||!rt,jn=!this.hasNext()||!rt,On=this.renderPrev(Ke),ei=this.renderNext(qe);return me.createElement("ul",(0,Me.Z)({className:de()($e,dt,(0,ce.Z)({},"".concat($e,"-disabled"),At)),style:Je,ref:this.paginationNode},Ye),St,On?me.createElement("li",{title:An?ln.prev_page:null,onClick:this.prev,tabIndex:rn?null:0,onKeyPress:this.runIfEnterPrev,className:de()("".concat($e,"-prev"),(0,ce.Z)({},"".concat($e,"-disabled"),rn)),"aria-disabled":rn},On):null,Ir,ei?me.createElement("li",{title:An?ln.next_page:null,onClick:this.next,tabIndex:jn?null:0,onKeyPress:this.runIfEnterNext,className:de()("".concat($e,"-next"),(0,ce.Z)({},"".concat($e,"-disabled"),jn)),"aria-disabled":jn},ei):null,me.createElement(De,{disabled:At,locale:ln,rootPrefixCls:$e,selectComponentClass:lr,selectPrefixCls:qi,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:yi,pageSize:dr,pageSizeOptions:Fr,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:lo}))}}],[{key:"getDerivedStateFromProps",value:function(Ne,$e){var dt={};if("current"in Ne&&(dt.current=Ne.current,Ne.current!==$e.current&&(dt.currentInputValue=dt.current)),"pageSize"in Ne&&Ne.pageSize!==$e.pageSize){var Je=$e.current,At=at(Ne.pageSize,$e,Ne);Je=Je>At?At:Je,"current"in Ne||(dt.current=Je,dt.currentInputValue=Je),dt.pageSize=Ne.pageSize}return dt}}]),Oe}(me.Component);Ct.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Xe,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Xe,locale:Pe.Z,style:{},itemRender:ft,totalBoundaryShowSizeChanger:50};var et=Ct,yt=Ee(22075),st=Ee(36355),zt=Ee(19716),lt=Ee(8628),tt=Ee(9763),ut=Ee(57809);const mt=Ie=>me.createElement(ut.default,Object.assign({},Ie,{showSearch:!0,size:"small"})),Pt=Ie=>me.createElement(ut.default,Object.assign({},Ie,{showSearch:!0,size:"middle"}));mt.Option=ut.default.Option,Pt.Option=ut.default.Option;var gt=Ee(9937),Ft=Ee(17313),Ht=Ee(83116),hn=Ee(37613);const Qt=Ie=>{const{componentCls:We}=Ie;return{[`${We}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${We}-item-link`]:{color:Ie.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${We}-item-link`]:{color:Ie.colorTextDisabled,cursor:"not-allowed"}}},[`&${We}-disabled`]:{cursor:"not-allowed",[`${We}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:Ie.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:Ie.colorBorder,backgroundColor:Ie.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:Ie.itemActiveBgDisabled},a:{color:Ie.itemActiveColorDisabled}}},[`${We}-item-link`]:{color:Ie.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${We}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${We}-simple-pager`]:{color:Ie.colorTextDisabled},[`${We}-jump-prev, ${We}-jump-next`]:{[`${We}-item-link-icon`]:{opacity:0},[`${We}-item-ellipsis`]:{opacity:1}}},[`&${We}-simple`]:{[`${We}-prev, ${We}-next`]:{[`&${We}-disabled ${We}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},bn=Ie=>{const{componentCls:We}=Ie;return{[`&${We}-mini ${We}-total-text, &${We}-mini ${We}-simple-pager`]:{height:Ie.itemSizeSM,lineHeight:`${Ie.itemSizeSM}px`},[`&${We}-mini ${We}-item`]:{minWidth:Ie.itemSizeSM,height:Ie.itemSizeSM,margin:0,lineHeight:`${Ie.itemSizeSM-2}px`},[`&${We}-mini:not(${We}-disabled) ${We}-item:not(${We}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Ie.colorBgTextHover},"&:active":{backgroundColor:Ie.colorBgTextActive}},[`&${We}-mini ${We}-prev, &${We}-mini ${We}-next`]:{minWidth:Ie.itemSizeSM,height:Ie.itemSizeSM,margin:0,lineHeight:`${Ie.itemSizeSM}px`},[`&${We}-mini:not(${We}-disabled)`]:{[`${We}-prev, ${We}-next`]:{[`&:hover ${We}-item-link`]:{backgroundColor:Ie.colorBgTextHover},[`&:active ${We}-item-link`]:{backgroundColor:Ie.colorBgTextActive},[`&${We}-disabled:hover ${We}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${We}-mini ${We}-prev ${We}-item-link,
|
|
|
&${We}-mini ${We}-next ${We}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Ie.itemSizeSM,lineHeight:`${Ie.itemSizeSM}px`}},[`&${We}-mini ${We}-jump-prev, &${We}-mini ${We}-jump-next`]:{height:Ie.itemSizeSM,marginInlineEnd:0,lineHeight:`${Ie.itemSizeSM}px`},[`&${We}-mini ${We}-options`]:{marginInlineStart:Ie.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Ie.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Ie.itemSizeSM,lineHeight:`${Ie.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,gt.x0)(Ie)),{width:Ie.paginationMiniQuickJumperInputWidth,height:Ie.controlHeightSM})}}}},Wt=Ie=>{const{componentCls:We}=Ie;return{[`
|
|
|
&${We}-simple ${We}-prev,
|
|
|
&${We}-simple ${We}-next
|
|
|
`]:{height:Ie.itemSizeSM,lineHeight:`${Ie.itemSizeSM}px`,verticalAlign:"top",[`${We}-item-link`]:{height:Ie.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:Ie.colorBgTextHover},"&:active":{backgroundColor:Ie.colorBgTextActive},"&::after":{height:Ie.itemSizeSM,lineHeight:`${Ie.itemSizeSM}px`}}},[`&${We}-simple ${We}-simple-pager`]:{display:"inline-block",height:Ie.itemSizeSM,marginInlineEnd:Ie.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:Ie.marginXS,padding:`0 ${Ie.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:Ie.itemInputBg,border:`${Ie.lineWidth}px ${Ie.lineType} ${Ie.colorBorder}`,borderRadius:Ie.borderRadius,outline:"none",transition:`border-color ${Ie.motionDurationMid}`,color:"inherit","&:hover":{borderColor:Ie.colorPrimary},"&:focus":{borderColor:Ie.colorPrimaryHover,boxShadow:`${Ie.inputOutlineOffset}px 0 ${Ie.controlOutlineWidth}px ${Ie.controlOutline}`},"&[disabled]":{color:Ie.colorTextDisabled,backgroundColor:Ie.colorBgContainerDisabled,borderColor:Ie.colorBorder,cursor:"not-allowed"}}}}},Kt=Ie=>{const{componentCls:We}=Ie;return{[`${We}-jump-prev, ${We}-jump-next`]:{outline:0,[`${We}-item-container`]:{position:"relative",[`${We}-item-link-icon`]:{color:Ie.colorPrimary,fontSize:Ie.fontSizeSM,opacity:0,transition:`all ${Ie.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${We}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:Ie.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:Ie.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:Ie.paginationEllipsisTextIndent,opacity:1,transition:`all ${Ie.motionDurationMid}`}},"&:hover":{[`${We}-item-link-icon`]:{opacity:1},[`${We}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${We}-prev,
|
|
|
${We}-jump-prev,
|
|
|
${We}-jump-next
|
|
|
`]:{marginInlineEnd:Ie.marginXS},[`
|
|
|
${We}-prev,
|
|
|
${We}-next,
|
|
|
${We}-jump-prev,
|
|
|
${We}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:Ie.itemSize,height:Ie.itemSize,color:Ie.colorText,fontFamily:Ie.fontFamily,lineHeight:`${Ie.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:Ie.borderRadius,cursor:"pointer",transition:`all ${Ie.motionDurationMid}`},[`${We}-prev, ${We}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Ie.colorText,cursor:"pointer",userSelect:"none"},[`${We}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:Ie.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${Ie.lineWidth}px ${Ie.lineType} transparent`,borderRadius:Ie.borderRadius,outline:"none",transition:`all ${Ie.motionDurationMid}`},[`&:hover ${We}-item-link`]:{backgroundColor:Ie.colorBgTextHover},[`&:active ${We}-item-link`]:{backgroundColor:Ie.colorBgTextActive},[`&${We}-disabled:hover`]:{[`${We}-item-link`]:{backgroundColor:"transparent"}}},[`${We}-slash`]:{marginInlineEnd:Ie.paginationSlashMarginInlineEnd,marginInlineStart:Ie.paginationSlashMarginInlineStart},[`${We}-options`]:{display:"inline-block",marginInlineStart:Ie.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:Ie.controlHeight,marginInlineStart:Ie.marginXS,lineHeight:`${Ie.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,gt.ik)(Ie)),{width:Ie.controlHeightLG*1.25,height:Ie.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Ie.marginXS,marginInlineEnd:Ie.marginXS})}}}},Jt=Ie=>{const{componentCls:We}=Ie;return{[`${We}-item`]:{display:"inline-block",minWidth:Ie.itemSize,height:Ie.itemSize,marginInlineEnd:Ie.marginXS,fontFamily:Ie.fontFamily,lineHeight:`${Ie.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${Ie.lineWidth}px ${Ie.lineType} transparent`,borderRadius:Ie.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${Ie.paginationItemPaddingInline}px`,color:Ie.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${We}-item-active)`]:{"&:hover":{transition:`all ${Ie.motionDurationMid}`,backgroundColor:Ie.colorBgTextHover},"&:active":{backgroundColor:Ie.colorBgTextActive}},"&-active":{fontWeight:Ie.fontWeightStrong,backgroundColor:Ie.itemActiveBg,borderColor:Ie.colorPrimary,a:{color:Ie.colorPrimary},"&:hover":{borderColor:Ie.colorPrimaryHover},"&:hover a":{color:Ie.colorPrimaryHover}}}}},Yt=Ie=>{const{componentCls:We}=Ie;return{[We]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ft.Wf)(Ie)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${We}-total-text`]:{display:"inline-block",height:Ie.itemSize,marginInlineEnd:Ie.marginXS,lineHeight:`${Ie.itemSize-2}px`,verticalAlign:"middle"}}),Jt(Ie)),Kt(Ie)),Wt(Ie)),bn(Ie)),Qt(Ie)),{[`@media only screen and (max-width: ${Ie.screenLG}px)`]:{[`${We}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Ie.screenSM}px)`]:{[`${We}-options`]:{display:"none"}}}),[`&${Ie.componentCls}-rtl`]:{direction:"rtl"}}},kt=Ie=>{const{componentCls:We}=Ie;return{[`${We}${We}-disabled:not(${We}-mini)`]:{"&, &:hover":{[`${We}-item-link`]:{borderColor:Ie.colorBorder}},"&:focus-visible":{[`${We}-item-link`]:{borderColor:Ie.colorBorder}},[`${We}-item, ${We}-item-link`]:{backgroundColor:Ie.colorBgContainerDisabled,borderColor:Ie.colorBorder,[`&:hover:not(${We}-item-active)`]:{backgroundColor:Ie.colorBgContainerDisabled,borderColor:Ie.colorBorder,a:{color:Ie.colorTextDisabled}},[`&${We}-item-active`]:{backgroundColor:Ie.itemActiveBgDisabled}},[`${We}-prev, ${We}-next`]:{"&:hover button":{backgroundColor:Ie.colorBgContainerDisabled,borderColor:Ie.colorBorder,color:Ie.colorTextDisabled},[`${We}-item-link`]:{backgroundColor:Ie.colorBgContainerDisabled,borderColor:Ie.colorBorder}}},[`${We}:not(${We}-mini)`]:{[`${We}-prev, ${We}-next`]:{"&:hover button":{borderColor:Ie.colorPrimaryHover,backgroundColor:Ie.itemBg},[`${We}-item-link`]:{backgroundColor:Ie.itemLinkBg,borderColor:Ie.colorBorder},[`&:hover ${We}-item-link`]:{borderColor:Ie.colorPrimary,backgroundColor:Ie.itemBg,color:Ie.colorPrimary},[`&${We}-disabled`]:{[`${We}-item-link`]:{borderColor:Ie.colorBorder,color:Ie.colorTextDisabled}}},[`${We}-item`]:{backgroundColor:Ie.itemBg,border:`${Ie.lineWidth}px ${Ie.lineType} ${Ie.colorBorder}`,[`&:hover:not(${We}-item-active)`]:{borderColor:Ie.colorPrimary,backgroundColor:Ie.itemBg,a:{color:Ie.colorPrimary}},"&-active":{borderColor:Ie.colorPrimary}}}}},pt=Ie=>{const{componentCls:We}=Ie;return{[`${We}:not(${We}-disabled)`]:{[`${We}-item`]:Object.assign({},(0,Ft.Qy)(Ie)),[`${We}-jump-prev, ${We}-jump-next`]:{"&:focus-visible":Object.assign({[`${We}-item-link-icon`]:{opacity:1},[`${We}-item-ellipsis`]:{opacity:0}},(0,Ft.oN)(Ie))},[`${We}-prev, ${We}-next`]:{[`&:focus-visible ${We}-item-link`]:Object.assign({},(0,Ft.oN)(Ie))}}}};var Bt=(0,Ht.Z)("Pagination",Ie=>{const We=(0,hn.TS)(Ie,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:Ie.marginXXS/2,paginationMiniQuickJumperInputWidth:Ie.controlHeightLG*1.1,paginationItemPaddingInline:Ie.marginXXS*1.5,paginationEllipsisLetterSpacing:Ie.marginXXS/2,paginationSlashMarginInlineStart:Ie.marginXXS,paginationSlashMarginInlineEnd:Ie.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,gt.e5)(Ie),(0,gt.TM)(Ie));return[Yt(We),pt(We),Ie.wireframe&&kt(We)]},Ie=>({itemBg:Ie.colorBgContainer,itemSize:Ie.controlHeight,itemSizeSM:Ie.controlHeightSM,itemActiveBg:Ie.colorBgContainer,itemLinkBg:Ie.colorBgContainer,itemActiveColorDisabled:Ie.colorTextDisabled,itemActiveBgDisabled:Ie.controlItemBgActiveDisabled,itemInputBg:Ie.colorBgContainer,miniOptionsSizeChangerTop:0})),xt=function(Ie,We){var Oe={};for(var be in Ie)Object.prototype.hasOwnProperty.call(Ie,be)&&We.indexOf(be)<0&&(Oe[be]=Ie[be]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,be=Object.getOwnPropertySymbols(Ie);Ne<be.length;Ne++)We.indexOf(be[Ne])<0&&Object.prototype.propertyIsEnumerable.call(Ie,be[Ne])&&(Oe[be[Ne]]=Ie[be[Ne]]);return Oe},nt=Ie=>{const{prefixCls:We,selectPrefixCls:Oe,className:be,rootClassName:Ne,style:$e,size:dt,locale:Je,selectComponentClass:At,responsive:tn,showSizeChanger:pn}=Ie,ln=xt(Ie,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:gn}=(0,lt.Z)(tn),{getPrefixCls:Hn,direction:An,pagination:qn={}}=me.useContext(st.E_),ai=Hn("pagination",We),[Ti,Ci]=Bt(ai),$i=pn!=null?pn:qn.showSizeChanger,or=me.useMemo(()=>{const rt=me.createElement("span",{className:`${ai}-item-ellipsis`},"\u2022\u2022\u2022"),Ir=me.createElement("button",{className:`${ai}-item-link`,type:"button",tabIndex:-1},An==="rtl"?me.createElement(le.Z,null):me.createElement(ge.Z,null)),Ar=me.createElement("button",{className:`${ai}-item-link`,type:"button",tabIndex:-1},An==="rtl"?me.createElement(ge.Z,null):me.createElement(le.Z,null)),$r=me.createElement("a",{className:`${ai}-item-link`},me.createElement("div",{className:`${ai}-item-container`},An==="rtl"?me.createElement(xe.Z,{className:`${ai}-item-link-icon`}):me.createElement(ye,{className:`${ai}-item-link-icon`}),rt)),co=me.createElement("a",{className:`${ai}-item-link`},me.createElement("div",{className:`${ai}-item-container`},An==="rtl"?me.createElement(ye,{className:`${ai}-item-link-icon`}):me.createElement(xe.Z,{className:`${ai}-item-link-icon`}),rt));return{prevIcon:Ir,nextIcon:Ar,jumpPrevIcon:$r,jumpNextIcon:co}},[An,ai]),[lr]=(0,tt.Z)("Pagination",yt.Z),qi=Object.assign(Object.assign({},lr),Je),Fr=(0,zt.Z)(dt),Mr=Fr==="small"||!!(gn&&!Fr&&tn),yi=Hn("select",Oe),dr=de()({[`${ai}-mini`]:Mr,[`${ai}-rtl`]:An==="rtl"},qn==null?void 0:qn.className,be,Ne,Ci),Zi=Object.assign(Object.assign({},qn==null?void 0:qn.style),$e);return Ti(me.createElement(et,Object.assign({},or,ln,{style:Zi,prefixCls:ai,selectPrefixCls:yi,className:dr,selectComponentClass:At||(Mr?mt:Pt),locale:qi,showSizeChanger:$i})))},He=nt},57809:function(_n,en,Ee){"use strict";var Me=Ee(92310),me=Ee.n(Me),Be=Ee(77861),ke=Ee(2738),Ce=Ee(59301),Le=Ee(53487),he=Ee(62892),ye=Ee(19080),xe=Ee(36355),ge=Ee(1684),le=Ee(93891),ve=Ee(19716),de=Ee(32441),ce=Ee(33234),z=Ee(14154),ee=Ee(58582),oe=Ee(84443),ie=Ee(66339),se=function(Ae,De){var ze={};for(var Ze in Ae)Object.prototype.hasOwnProperty.call(Ae,Ze)&&De.indexOf(Ze)<0&&(ze[Ze]=Ae[Ze]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ze=Object.getOwnPropertySymbols(Ae);Xe<Ze.length;Xe++)De.indexOf(Ze[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Ze[Xe])&&(ze[Ze[Xe]]=Ae[Ze[Xe]]);return ze};const ue="SECRET_COMBOBOX_MODE_DO_NOT_USE",Se=(Ae,De)=>{var ze,{prefixCls:Ze,bordered:Xe=!0,className:Ge,rootClassName:ft,getPopupContainer:at,popupClassName:Ct,dropdownClassName:et,listHeight:yt=256,placement:st,listItemHeight:zt=24,size:lt,disabled:tt,notFoundContent:ut,status:mt,builtinPlacements:Pt,dropdownMatchSelectWidth:gt,popupMatchSelectWidth:Ft,direction:Ht,style:hn,allowClear:Qt}=Ae,bn=se(Ae,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Wt,getPrefixCls:Kt,renderEmpty:Jt,direction:Yt,virtual:kt,popupMatchSelectWidth:pt,popupOverflow:Bt,select:xt}=Ce.useContext(xe.E_),vt=Kt("select",Ze),nt=Kt(),He=Ht!=null?Ht:Yt,{compactSize:Ie,compactItemClassnames:We}=(0,ce.ri)(vt,He),[Oe,be]=(0,z.Z)(vt),Ne=Ce.useMemo(()=>{const{mode:Zi}=bn;if(Zi!=="combobox")return Zi===ue?"combobox":Zi},[bn.mode]),$e=Ne==="multiple"||Ne==="tags",dt=(0,oe.Z)(bn.suffixIcon,bn.showArrow),Je=(ze=Ft!=null?Ft:gt)!==null&&ze!==void 0?ze:pt,{status:At,hasFeedback:tn,isFormItemInput:pn,feedbackIcon:ln}=Ce.useContext(de.aM),gn=(0,ye.F)(At,mt);let Hn;ut!==void 0?Hn=ut:Ne==="combobox"?Hn=null:Hn=(Jt==null?void 0:Jt("Select"))||Ce.createElement(le.Z,{componentName:"Select"});const{suffixIcon:An,itemIcon:qn,removeIcon:ai,clearIcon:Ti}=(0,ie.Z)(Object.assign(Object.assign({},bn),{multiple:$e,hasFeedback:tn,feedbackIcon:ln,showSuffixIcon:dt,prefixCls:vt,showArrow:bn.showArrow,componentName:"Select"})),Ci=Qt===!0?{clearIcon:Ti}:Qt,$i=(0,ke.Z)(bn,["suffixIcon","itemIcon"]),or=me()(Ct||et,{[`${vt}-dropdown-${He}`]:He==="rtl"},ft,be),lr=(0,ve.Z)(Zi=>{var rt;return(rt=lt!=null?lt:Ie)!==null&&rt!==void 0?rt:Zi}),qi=Ce.useContext(ge.Z),Fr=tt!=null?tt:qi,Mr=me()({[`${vt}-lg`]:lr==="large",[`${vt}-sm`]:lr==="small",[`${vt}-rtl`]:He==="rtl",[`${vt}-borderless`]:!Xe,[`${vt}-in-form-item`]:pn},(0,ye.Z)(vt,gn,tn),We,xt==null?void 0:xt.className,Ge,ft,be),yi=Ce.useMemo(()=>st!==void 0?st:He==="rtl"?"bottomRight":"bottomLeft",[st,He]),dr=(0,ee.Z)(Pt,Bt);return Oe(Ce.createElement(Be.ZP,Object.assign({ref:De,virtual:kt,showSearch:xt==null?void 0:xt.showSearch},$i,{style:Object.assign(Object.assign({},xt==null?void 0:xt.style),hn),dropdownMatchSelectWidth:Je,builtinPlacements:dr,transitionName:(0,he.m)(nt,"slide-up",bn.transitionName),listHeight:yt,listItemHeight:zt,mode:Ne,prefixCls:vt,placement:yi,direction:He,suffixIcon:An,menuItemSelectedIcon:qn,removeIcon:ai,allowClear:Ci,notFoundContent:Hn,className:Mr,getPopupContainer:at||Wt,dropdownClassName:or,disabled:Fr})))},we=Ce.forwardRef(Se),Pe=(0,Le.Z)(we);we.SECRET_COMBOBOX_MODE_DO_NOT_USE=ue,we.Option=Be.Wx,we.OptGroup=Be.Xo,we._InternalPanelDoNotUseOrYouWillBeFired=Pe,en.default=we},14154:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return we}});var Me=Ee(17313),me=Ee(74207),Be=Ee(37613),ke=Ee(83116),Ce=Ee(13826),Le=Ee(92899);const he=Pe=>{const{optionHeight:Ae,optionFontSize:De,optionLineHeight:ze,optionPadding:Ze}=Pe;return{position:"relative",display:"block",minHeight:Ae,padding:Ze,color:Pe.colorText,fontWeight:"normal",fontSize:De,lineHeight:ze,boxSizing:"border-box"}};var xe=Pe=>{const{antCls:Ae,componentCls:De}=Pe,ze=`${De}-item`,Ze=`&${Ae}-slide-up-enter${Ae}-slide-up-enter-active`,Xe=`&${Ae}-slide-up-appear${Ae}-slide-up-appear-active`,Ge=`&${Ae}-slide-up-leave${Ae}-slide-up-leave-active`,ft=`${De}-dropdown-placement-`;return[{[`${De}-dropdown`]:Object.assign(Object.assign({},(0,Me.Wf)(Pe)),{position:"absolute",top:-9999,zIndex:Pe.zIndexPopup,boxSizing:"border-box",padding:Pe.paddingXXS,overflow:"hidden",fontSize:Pe.fontSize,fontVariant:"initial",backgroundColor:Pe.colorBgElevated,borderRadius:Pe.borderRadiusLG,outline:"none",boxShadow:Pe.boxShadowSecondary,[`
|
|
|
${Ze}${ft}bottomLeft,
|
|
|
${Xe}${ft}bottomLeft
|
|
|
`]:{animationName:Ce.fJ},[`
|
|
|
${Ze}${ft}topLeft,
|
|
|
${Xe}${ft}topLeft,
|
|
|
${Ze}${ft}topRight,
|
|
|
${Xe}${ft}topRight
|
|
|
`]:{animationName:Ce.Qt},[`${Ge}${ft}bottomLeft`]:{animationName:Ce.Uw},[`
|
|
|
${Ge}${ft}topLeft,
|
|
|
${Ge}${ft}topRight
|
|
|
`]:{animationName:Ce.ly},"&-hidden":{display:"none"},[`${ze}`]:Object.assign(Object.assign({},he(Pe)),{cursor:"pointer",transition:`background ${Pe.motionDurationSlow} ease`,borderRadius:Pe.borderRadiusSM,"&-group":{color:Pe.colorTextDescription,fontSize:Pe.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Me.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${ze}-option-disabled)`]:{backgroundColor:Pe.optionActiveBg},[`&-selected:not(${ze}-option-disabled)`]:{color:Pe.optionSelectedColor,fontWeight:Pe.optionSelectedFontWeight,backgroundColor:Pe.optionSelectedBg,[`${ze}-option-state`]:{color:Pe.colorPrimary}},"&-disabled":{[`&${ze}-option-selected`]:{backgroundColor:Pe.colorBgContainerDisabled},color:Pe.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Pe.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ce.oN)(Pe,"slide-up"),(0,Ce.oN)(Pe,"slide-down"),(0,Le.Fm)(Pe,"move-up"),(0,Le.Fm)(Pe,"move-down")]};const ge=2,le=Pe=>{let{controlHeightSM:Ae,controlHeight:De,lineWidth:ze}=Pe;const Ze=(De-Ae)/2-ze,Xe=Math.ceil(Ze/2);return[Ze,Xe]};function ve(Pe,Ae){const{componentCls:De,iconCls:ze}=Pe,Ze=`${De}-selection-overflow`,Xe=Pe.multipleSelectItemHeight,[Ge]=le(Pe),ft=Ae?`${De}-${Ae}`:"";return{[`${De}-multiple${ft}`]:{fontSize:Pe.fontSize,[Ze]:{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:`${Ge-ge}px ${ge*2}px`,borderRadius:Pe.borderRadius,[`${De}-show-search&`]:{cursor:"text"},[`${De}-disabled&`]:{background:Pe.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ge}px 0`,lineHeight:`${Xe}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${De}-show-arrow ${De}-selector,
|
|
|
&${De}-allow-clear ${De}-selector
|
|
|
`]:{paddingInlineEnd:Pe.fontSizeIcon+Pe.controlPaddingHorizontal},[`${De}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Xe,marginTop:ge,marginBottom:ge,lineHeight:`${Xe-Pe.lineWidth*2}px`,background:Pe.multipleItemBg,border:`${Pe.lineWidth}px ${Pe.lineType} ${Pe.multipleItemBorderColor}`,borderRadius:Pe.borderRadiusSM,cursor:"default",transition:`font-size ${Pe.motionDurationSlow}, line-height ${Pe.motionDurationSlow}, height ${Pe.motionDurationSlow}`,userSelect:"none",marginInlineEnd:ge*2,paddingInlineStart:Pe.paddingXS,paddingInlineEnd:Pe.paddingXS/2,[`${De}-disabled&`]:{color:Pe.multipleItemColorDisabled,borderColor:Pe.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Pe.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,Me.Ro)()),{display:"inline-flex",alignItems:"center",color:Pe.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${ze}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Pe.colorIconHover}})},[`${Ze}-item + ${Ze}-item`]:{[`${De}-selection-search`]:{marginInlineStart:0}},[`${De}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Pe.inputPaddingHorizontalBase-Ge,"\n &-input,\n &-mirror\n ":{height:Xe,fontFamily:Pe.fontFamily,lineHeight:`${Xe}px`,transition:`all ${Pe.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:Pe.inputPaddingHorizontalBase,insetInlineEnd:Pe.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Pe.motionDurationSlow}`}}}}var ce=Pe=>{const{componentCls:Ae}=Pe,De=(0,Be.TS)(Pe,{controlHeight:Pe.controlHeightSM,multipleSelectItemHeight:Pe.controlHeightXS,borderRadius:Pe.borderRadiusSM,borderRadiusSM:Pe.borderRadiusXS}),ze=(0,Be.TS)(Pe,{fontSize:Pe.fontSizeLG,controlHeight:Pe.controlHeightLG,multipleSelectItemHeight:Pe.multipleItemHeightLG,borderRadius:Pe.borderRadiusLG,borderRadiusSM:Pe.borderRadius}),[,Ze]=le(Pe);return[ve(Pe),ve(De,"sm"),{[`${Ae}-multiple${Ae}-sm`]:{[`${Ae}-selection-placeholder`]:{insetInline:Pe.controlPaddingHorizontalSM-Pe.lineWidth},[`${Ae}-selection-search`]:{marginInlineStart:Ze}}},ve(ze,"lg")]};function z(Pe,Ae){const{componentCls:De,inputPaddingHorizontalBase:ze,borderRadius:Ze}=Pe,Xe=Pe.controlHeight-Pe.lineWidth*2,Ge=Math.ceil(Pe.fontSize*1.25),ft=Ae?`${De}-${Ae}`:"";return{[`${De}-single${ft}`]:{fontSize:Pe.fontSize,[`${De}-selector`]:Object.assign(Object.assign({},(0,Me.Wf)(Pe)),{display:"flex",borderRadius:Ze,[`${De}-selection-search`]:{position:"absolute",top:0,insetInlineStart:ze,insetInlineEnd:ze,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${De}-selection-item,
|
|
|
${De}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${Xe}px`,transition:`all ${Pe.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Xe}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:Ge},[`&${De}-open ${De}-selection-item`]:{color:Pe.colorTextPlaceholder},[`&:not(${De}-customize-input)`]:{[`${De}-selector`]:{width:"100%",height:Pe.controlHeight,padding:`0 ${ze}px`,[`${De}-selection-search-input`]:{height:Xe},"&:after":{lineHeight:`${Xe}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 ${ze}px`,"&:after":{display:"none"}}}}}}}function ee(Pe){const{componentCls:Ae}=Pe,De=Pe.controlPaddingHorizontalSM-Pe.lineWidth;return[z(Pe),z((0,Be.TS)(Pe,{controlHeight:Pe.controlHeightSM,borderRadius:Pe.borderRadiusSM}),"sm"),{[`${Ae}-single${Ae}-sm`]:{[`&:not(${Ae}-customize-input)`]:{[`${Ae}-selection-search`]:{insetInlineStart:De,insetInlineEnd:De},[`${Ae}-selector`]:{padding:`0 ${De}px`},[`&${Ae}-show-arrow ${Ae}-selection-search`]:{insetInlineEnd:De+Pe.fontSize*1.5},[`
|
|
|
&${Ae}-show-arrow ${Ae}-selection-item,
|
|
|
&${Ae}-show-arrow ${Ae}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Pe.fontSize*1.5}}}},z((0,Be.TS)(Pe,{controlHeight:Pe.singleItemHeightLG,fontSize:Pe.fontSizeLG,borderRadius:Pe.borderRadiusLG}),"lg")]}const oe=Pe=>{const{componentCls:Ae,selectorBg:De}=Pe;return{position:"relative",backgroundColor:De,border:`${Pe.lineWidth}px ${Pe.lineType} ${Pe.colorBorder}`,transition:`all ${Pe.motionDurationMid} ${Pe.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ae}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ae}-disabled&`]:{color:Pe.colorTextDisabled,background:Pe.colorBgContainerDisabled,cursor:"not-allowed",[`${Ae}-multiple&`]:{background:Pe.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},ie=function(Pe,Ae){let De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:ze,borderHoverColor:Ze,outlineColor:Xe,antCls:Ge}=Ae,ft=De?{[`${ze}-selector`]:{borderColor:Ze}}:{};return{[Pe]:{[`&:not(${ze}-disabled):not(${ze}-customize-input):not(${Ge}-pagination-size-changer)`]:Object.assign(Object.assign({},ft),{[`${ze}-focused& ${ze}-selector`]:{borderColor:Ze,boxShadow:`0 0 0 ${Ae.controlOutlineWidth}px ${Xe}`,outline:0},[`&:hover ${ze}-selector`]:{borderColor:Ze}})}}},se=Pe=>{const{componentCls:Ae}=Pe;return{[`${Ae}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ue=Pe=>{const{componentCls:Ae,inputPaddingHorizontalBase:De,iconCls:ze}=Pe;return{[Ae]:Object.assign(Object.assign({},(0,Me.Wf)(Pe)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ae}-customize-input) ${Ae}-selector`]:Object.assign(Object.assign({},oe(Pe)),se(Pe)),[`${Ae}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},Me.vS),[`${Ae}-selection-placeholder`]:Object.assign(Object.assign({},Me.vS),{flex:1,color:Pe.colorTextPlaceholder,pointerEvents:"none"}),[`${Ae}-arrow`]:Object.assign(Object.assign({},(0,Me.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:De,height:Pe.fontSizeIcon,marginTop:-Pe.fontSizeIcon/2,color:Pe.colorTextQuaternary,fontSize:Pe.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[ze]:{verticalAlign:"top",transition:`transform ${Pe.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ae}-suffix)`]:{pointerEvents:"auto"}},[`${Ae}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ae}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:De,zIndex:1,display:"inline-block",width:Pe.fontSizeIcon,height:Pe.fontSizeIcon,marginTop:-Pe.fontSizeIcon/2,color:Pe.colorTextQuaternary,fontSize:Pe.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Pe.clearBg,cursor:"pointer",opacity:0,transition:`color ${Pe.motionDurationMid} ease, opacity ${Pe.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Pe.colorTextTertiary}},"&:hover":{[`${Ae}-clear`]:{opacity:1}}}),[`${Ae}-has-feedback`]:{[`${Ae}-clear`]:{insetInlineEnd:De+Pe.fontSize+Pe.paddingXS}}}},Se=Pe=>{const{componentCls:Ae}=Pe;return[{[Ae]:{[`&-borderless ${Ae}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ae}-in-form-item`]:{width:"100%"}}},ue(Pe),ee(Pe),ce(Pe),xe(Pe),{[`${Ae}-rtl`]:{direction:"rtl"}},ie(Ae,(0,Be.TS)(Pe,{borderHoverColor:Pe.colorPrimaryHover,outlineColor:Pe.controlOutline})),ie(`${Ae}-status-error`,(0,Be.TS)(Pe,{borderHoverColor:Pe.colorErrorHover,outlineColor:Pe.colorErrorOutline}),!0),ie(`${Ae}-status-warning`,(0,Be.TS)(Pe,{borderHoverColor:Pe.colorWarningHover,outlineColor:Pe.colorWarningOutline}),!0),(0,me.c)(Pe,{borderElCls:`${Ae}-selector`,focusElCls:`${Ae}-focused`})]};var we=(0,ke.Z)("Select",(Pe,Ae)=>{let{rootPrefixCls:De}=Ae;const ze=(0,Be.TS)(Pe,{rootPrefixCls:De,inputPaddingHorizontalBase:Pe.paddingSM-1,multipleSelectItemHeight:Pe.multipleItemHeight});return[Se(ze)]},Pe=>{const{fontSize:Ae,lineHeight:De,controlHeight:ze,controlPaddingHorizontal:Ze,zIndexPopupBase:Xe,colorText:Ge,fontWeightStrong:ft,controlItemBgActive:at,controlItemBgHover:Ct,colorBgContainer:et,colorFillSecondary:yt,controlHeightLG:st,controlHeightSM:zt,colorBgContainerDisabled:lt,colorTextDisabled:tt}=Pe;return{zIndexPopup:Xe+50,optionSelectedColor:Ge,optionSelectedFontWeight:ft,optionSelectedBg:at,optionActiveBg:Ct,optionPadding:`${(ze-Ae*De)/2}px ${Ze}px`,optionFontSize:Ae,optionLineHeight:De,optionHeight:ze,selectorBg:et,clearBg:et,singleItemHeightLG:st,multipleItemBg:yt,multipleItemBorderColor:"transparent",multipleItemHeight:zt,multipleItemHeightLG:ze,multipleSelectorBgDisabled:lt,multipleItemColorDisabled:tt,multipleItemBorderColorDisabled:"transparent"}})},58582:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return me}});const Me=Be=>{const Ce={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Be==="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 me(Be,ke){return Be||Me(ke)}},84443:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return Me}});function Me(me,Be){return Be!==void 0?Be:me!==null}},66339:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});var Me=Ee(40001),me=Ee(19248),Be=Ee(99267),ke=Ee(84105),Ce=Ee(58617),Le=Ee(47472),he=Ee(59301);function ye(xe){let{suffixIcon:ge,clearIcon:le,menuItemSelectedIcon:ve,removeIcon:de,loading:ce,multiple:z,hasFeedback:ee,prefixCls:oe,showSuffixIcon:ie,feedbackIcon:se,showArrow:ue,componentName:Se}=xe;const we=le!=null?le:he.createElement(me.Z,null),Pe=Ze=>ge===null&&!ee&&!ue?null:he.createElement(he.Fragment,null,ie!==!1&&Ze,ee&&se);let Ae=null;if(ge!==void 0)Ae=Pe(ge);else if(ce)Ae=Pe(he.createElement(Ce.Z,{spin:!0}));else{const Ze=`${oe}-suffix`;Ae=Xe=>{let{open:Ge,showSearch:ft}=Xe;return Pe(Ge&&ft?he.createElement(Le.Z,{className:Ze}):he.createElement(ke.Z,{className:Ze}))}}let De=null;ve!==void 0?De=ve:z?De=he.createElement(Me.Z,null):De=null;let ze=null;return de!==void 0?ze=de:ze=he.createElement(Be.Z,null),{clearIcon:we,suffixIcon:Ae,itemIcon:De,removeIcon:ze}}},61621:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return Bt}});var Me=Ee(92310),me=Ee.n(Me),Be=Ee(59301),ke=Ee(36355),Ce=Ee(2738),he=xt=>{const{prefixCls:vt,className:nt,style:He,size:Ie,shape:We}=xt,Oe=me()({[`${vt}-lg`]:Ie==="large",[`${vt}-sm`]:Ie==="small"}),be=me()({[`${vt}-circle`]:We==="circle",[`${vt}-square`]:We==="square",[`${vt}-round`]:We==="round"}),Ne=Be.useMemo(()=>typeof Ie=="number"?{width:Ie,height:Ie,lineHeight:`${Ie}px`}:{},[Ie]);return Be.createElement("span",{className:me()(vt,Oe,be,nt),style:Object.assign(Object.assign({},Ne),He)})},ye=Ee(93083),xe=Ee(83116),ge=Ee(37613);const le=new ye.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),ve=xt=>({height:xt,lineHeight:`${xt}px`}),de=xt=>Object.assign({width:xt},ve(xt)),ce=xt=>({background:xt.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:le,animationDuration:xt.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),z=xt=>Object.assign({width:xt*5,minWidth:xt*5},ve(xt)),ee=xt=>{const{skeletonAvatarCls:vt,gradientFromColor:nt,controlHeight:He,controlHeightLG:Ie,controlHeightSM:We}=xt;return{[`${vt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:nt},de(He)),[`${vt}${vt}-circle`]:{borderRadius:"50%"},[`${vt}${vt}-lg`]:Object.assign({},de(Ie)),[`${vt}${vt}-sm`]:Object.assign({},de(We))}},oe=xt=>{const{controlHeight:vt,borderRadiusSM:nt,skeletonInputCls:He,controlHeightLG:Ie,controlHeightSM:We,gradientFromColor:Oe}=xt;return{[`${He}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Oe,borderRadius:nt},z(vt)),[`${He}-lg`]:Object.assign({},z(Ie)),[`${He}-sm`]:Object.assign({},z(We))}},ie=xt=>Object.assign({width:xt},ve(xt)),se=xt=>{const{skeletonImageCls:vt,imageSizeBase:nt,gradientFromColor:He,borderRadiusSM:Ie}=xt;return{[`${vt}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:He,borderRadius:Ie},ie(nt*2)),{[`${vt}-path`]:{fill:"#bfbfbf"},[`${vt}-svg`]:Object.assign(Object.assign({},ie(nt)),{maxWidth:nt*4,maxHeight:nt*4}),[`${vt}-svg${vt}-svg-circle`]:{borderRadius:"50%"}}),[`${vt}${vt}-circle`]:{borderRadius:"50%"}}},ue=(xt,vt,nt)=>{const{skeletonButtonCls:He}=xt;return{[`${nt}${He}-circle`]:{width:vt,minWidth:vt,borderRadius:"50%"},[`${nt}${He}-round`]:{borderRadius:vt}}},Se=xt=>Object.assign({width:xt*2,minWidth:xt*2},ve(xt)),we=xt=>{const{borderRadiusSM:vt,skeletonButtonCls:nt,controlHeight:He,controlHeightLG:Ie,controlHeightSM:We,gradientFromColor:Oe}=xt;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${nt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Oe,borderRadius:vt,width:He*2,minWidth:He*2},Se(He))},ue(xt,He,nt)),{[`${nt}-lg`]:Object.assign({},Se(Ie))}),ue(xt,Ie,`${nt}-lg`)),{[`${nt}-sm`]:Object.assign({},Se(We))}),ue(xt,We,`${nt}-sm`))},Pe=xt=>{const{componentCls:vt,skeletonAvatarCls:nt,skeletonTitleCls:He,skeletonParagraphCls:Ie,skeletonButtonCls:We,skeletonInputCls:Oe,skeletonImageCls:be,controlHeight:Ne,controlHeightLG:$e,controlHeightSM:dt,gradientFromColor:Je,padding:At,marginSM:tn,borderRadius:pn,titleHeight:ln,blockRadius:gn,paragraphLiHeight:Hn,controlHeightXS:An,paragraphMarginTop:qn}=xt;return{[`${vt}`]:{display:"table",width:"100%",[`${vt}-header`]:{display:"table-cell",paddingInlineEnd:At,verticalAlign:"top",[`${nt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Je},de(Ne)),[`${nt}-circle`]:{borderRadius:"50%"},[`${nt}-lg`]:Object.assign({},de($e)),[`${nt}-sm`]:Object.assign({},de(dt))},[`${vt}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${He}`]:{width:"100%",height:ln,background:Je,borderRadius:gn,[`+ ${Ie}`]:{marginBlockStart:dt}},[`${Ie}`]:{padding:0,"> li":{width:"100%",height:Hn,listStyle:"none",background:Je,borderRadius:gn,"+ li":{marginBlockStart:An}}},[`${Ie}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${vt}-content`]:{[`${He}, ${Ie} > li`]:{borderRadius:pn}}},[`${vt}-with-avatar ${vt}-content`]:{[`${He}`]:{marginBlockStart:tn,[`+ ${Ie}`]:{marginBlockStart:qn}}},[`${vt}${vt}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},we(xt)),ee(xt)),oe(xt)),se(xt)),[`${vt}${vt}-block`]:{width:"100%",[`${We}`]:{width:"100%"},[`${Oe}`]:{width:"100%"}},[`${vt}${vt}-active`]:{[`
|
|
|
${He},
|
|
|
${Ie} > li,
|
|
|
${nt},
|
|
|
${We},
|
|
|
${Oe},
|
|
|
${be}
|
|
|
`]:Object.assign({},ce(xt))}}};var Ae=(0,xe.Z)("Skeleton",xt=>{const{componentCls:vt}=xt,nt=(0,ge.TS)(xt,{skeletonAvatarCls:`${vt}-avatar`,skeletonTitleCls:`${vt}-title`,skeletonParagraphCls:`${vt}-paragraph`,skeletonButtonCls:`${vt}-button`,skeletonInputCls:`${vt}-input`,skeletonImageCls:`${vt}-image`,imageSizeBase:xt.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${xt.gradientFromColor} 25%, ${xt.gradientToColor} 37%, ${xt.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Pe(nt)]},xt=>{const{colorFillContent:vt,colorFill:nt}=xt,He=vt,Ie=nt;return{color:He,colorGradientEnd:Ie,gradientFromColor:He,gradientToColor:Ie,titleHeight:xt.controlHeight/2,blockRadius:xt.borderRadiusSM,paragraphMarginTop:xt.marginLG+xt.marginXXS,paragraphLiHeight:xt.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),ze=xt=>{const{prefixCls:vt,className:nt,rootClassName:He,active:Ie,shape:We="circle",size:Oe="default"}=xt,{getPrefixCls:be}=Be.useContext(ke.E_),Ne=be("skeleton",vt),[$e,dt]=Ae(Ne),Je=(0,Ce.Z)(xt,["prefixCls","className"]),At=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:Ie},nt,He,dt);return $e(Be.createElement("div",{className:At},Be.createElement(he,Object.assign({prefixCls:`${Ne}-avatar`,shape:We,size:Oe},Je))))},Xe=xt=>{const{prefixCls:vt,className:nt,rootClassName:He,active:Ie,block:We=!1,size:Oe="default"}=xt,{getPrefixCls:be}=Be.useContext(ke.E_),Ne=be("skeleton",vt),[$e,dt]=Ae(Ne),Je=(0,Ce.Z)(xt,["prefixCls"]),At=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:Ie,[`${Ne}-block`]:We},nt,He,dt);return $e(Be.createElement("div",{className:At},Be.createElement(he,Object.assign({prefixCls:`${Ne}-button`,size:Oe},Je))))};const Ge="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 at=xt=>{const{prefixCls:vt,className:nt,rootClassName:He,style:Ie,active:We}=xt,{getPrefixCls:Oe}=Be.useContext(ke.E_),be=Oe("skeleton",vt),[Ne,$e]=Ae(be),dt=me()(be,`${be}-element`,{[`${be}-active`]:We},nt,He,$e);return Ne(Be.createElement("div",{className:dt},Be.createElement("div",{className:me()(`${be}-image`,nt),style:Ie},Be.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${be}-image-svg`},Be.createElement("path",{d:Ge,className:`${be}-image-path`})))))},et=xt=>{const{prefixCls:vt,className:nt,rootClassName:He,active:Ie,block:We,size:Oe="default"}=xt,{getPrefixCls:be}=Be.useContext(ke.E_),Ne=be("skeleton",vt),[$e,dt]=Ae(Ne),Je=(0,Ce.Z)(xt,["prefixCls"]),At=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:Ie,[`${Ne}-block`]:We},nt,He,dt);return $e(Be.createElement("div",{className:At},Be.createElement(he,Object.assign({prefixCls:`${Ne}-input`,size:Oe},Je))))},yt=Ee(72308),st={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"},zt=st,lt=Ee(7657),tt=function(vt,nt){return Be.createElement(lt.Z,(0,yt.Z)({},vt,{ref:nt,icon:zt}))},ut=Be.forwardRef(tt),mt=ut,gt=xt=>{const{prefixCls:vt,className:nt,rootClassName:He,style:Ie,active:We,children:Oe}=xt,{getPrefixCls:be}=Be.useContext(ke.E_),Ne=be("skeleton",vt),[$e,dt]=Ae(Ne),Je=me()(Ne,`${Ne}-element`,{[`${Ne}-active`]:We},dt,nt,He),At=Oe!=null?Oe:Be.createElement(mt,null);return $e(Be.createElement("div",{className:Je},Be.createElement("div",{className:me()(`${Ne}-image`,nt),style:Ie},At)))},Ft=Ee(80702),hn=xt=>{const vt=be=>{const{width:Ne,rows:$e=2}=xt;if(Array.isArray(Ne))return Ne[be];if($e-1===be)return Ne},{prefixCls:nt,className:He,style:Ie,rows:We}=xt,Oe=(0,Ft.Z)(Array(We)).map((be,Ne)=>Be.createElement("li",{key:Ne,style:{width:vt(Ne)}}));return Be.createElement("ul",{className:me()(nt,He),style:Ie},Oe)},bn=xt=>{let{prefixCls:vt,className:nt,width:He,style:Ie}=xt;return Be.createElement("h3",{className:me()(vt,nt),style:Object.assign({width:He},Ie)})};function Wt(xt){return xt&&typeof xt=="object"?xt:{}}function Kt(xt,vt){return xt&&!vt?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Jt(xt,vt){return!xt&&vt?{width:"38%"}:xt&&vt?{width:"50%"}:{}}function Yt(xt,vt){const nt={};return(!xt||!vt)&&(nt.width="61%"),!xt&&vt?nt.rows=3:nt.rows=2,nt}const kt=xt=>{const{prefixCls:vt,loading:nt,className:He,rootClassName:Ie,style:We,children:Oe,avatar:be=!1,title:Ne=!0,paragraph:$e=!0,active:dt,round:Je}=xt,{getPrefixCls:At,direction:tn,skeleton:pn}=Be.useContext(ke.E_),ln=At("skeleton",vt),[gn,Hn]=Ae(ln);if(nt||!("loading"in xt)){const An=!!be,qn=!!Ne,ai=!!$e;let Ti;if(An){const or=Object.assign(Object.assign({prefixCls:`${ln}-avatar`},Kt(qn,ai)),Wt(be));Ti=Be.createElement("div",{className:`${ln}-header`},Be.createElement(he,Object.assign({},or)))}let Ci;if(qn||ai){let or;if(qn){const qi=Object.assign(Object.assign({prefixCls:`${ln}-title`},Jt(An,ai)),Wt(Ne));or=Be.createElement(bn,Object.assign({},qi))}let lr;if(ai){const qi=Object.assign(Object.assign({prefixCls:`${ln}-paragraph`},Yt(An,qn)),Wt($e));lr=Be.createElement(hn,Object.assign({},qi))}Ci=Be.createElement("div",{className:`${ln}-content`},or,lr)}const $i=me()(ln,{[`${ln}-with-avatar`]:An,[`${ln}-active`]:dt,[`${ln}-rtl`]:tn==="rtl",[`${ln}-round`]:Je},pn==null?void 0:pn.className,He,Ie,Hn);return gn(Be.createElement("div",{className:$i,style:Object.assign(Object.assign({},pn==null?void 0:pn.style),We)},Ti,Ci))}return typeof Oe!="undefined"?Oe:null};kt.Button=Xe,kt.Avatar=ze,kt.Input=et,kt.Image=at,kt.Node=gt;var pt=kt,Bt=pt},81327:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return oe}});var Me=Ee(59301),me=Ee(92310),Be=Ee.n(me),ke=Ee(11592),Ce=Ee(36355),Le=Ee(33234);const he=Me.createContext({latestIndex:0}),ye=he.Provider;var ge=ie=>{let{className:se,index:ue,children:Se,split:we,style:Pe}=ie;const{latestIndex:Ae}=Me.useContext(he);return Se==null?null:Me.createElement(Me.Fragment,null,Me.createElement("div",{className:se,style:Pe},Se),ue<Ae&&we&&Me.createElement("span",{className:`${se}-split`},we))},le=Ee(2856);function ve(ie){return["small","middle","large"].includes(ie)}function de(ie){return ie?typeof ie=="number"&&!Number.isNaN(ie):!1}var ce=function(ie,se){var ue={};for(var Se in ie)Object.prototype.hasOwnProperty.call(ie,Se)&&se.indexOf(Se)<0&&(ue[Se]=ie[Se]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,Se=Object.getOwnPropertySymbols(ie);we<Se.length;we++)se.indexOf(Se[we])<0&&Object.prototype.propertyIsEnumerable.call(ie,Se[we])&&(ue[Se[we]]=ie[Se[we]]);return ue};const ee=Me.forwardRef((ie,se)=>{var ue,Se;const{getPrefixCls:we,space:Pe,direction:Ae}=Me.useContext(Ce.E_),{size:De=(Pe==null?void 0:Pe.size)||"small",align:ze,className:Ze,rootClassName:Xe,children:Ge,direction:ft="horizontal",prefixCls:at,split:Ct,style:et,wrap:yt=!1,classNames:st,styles:zt}=ie,lt=ce(ie,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[tt,ut]=Array.isArray(De)?De:[De,De],mt=ve(ut),Pt=ve(tt),gt=de(ut),Ft=de(tt),Ht=(0,ke.Z)(Ge,{keepEmpty:!0}),hn=ze===void 0&&ft==="horizontal"?"center":ze,Qt=we("space",at),[bn,Wt]=(0,le.Z)(Qt),Kt=Be()(Qt,Pe==null?void 0:Pe.className,Wt,`${Qt}-${ft}`,{[`${Qt}-rtl`]:Ae==="rtl",[`${Qt}-align-${hn}`]:hn,[`${Qt}-gap-row-${ut}`]:mt,[`${Qt}-gap-col-${tt}`]:Pt},Ze,Xe),Jt=Be()(`${Qt}-item`,(ue=st==null?void 0:st.item)!==null&&ue!==void 0?ue:(Se=Pe==null?void 0:Pe.classNames)===null||Se===void 0?void 0:Se.item);let Yt=0;const kt=Ht.map((xt,vt)=>{var nt,He;xt!=null&&(Yt=vt);const Ie=xt&&xt.key||`${Jt}-${vt}`;return Me.createElement(ge,{className:Jt,key:Ie,index:vt,split:Ct,style:(nt=zt==null?void 0:zt.item)!==null&&nt!==void 0?nt:(He=Pe==null?void 0:Pe.styles)===null||He===void 0?void 0:He.item},xt)}),pt=Me.useMemo(()=>({latestIndex:Yt}),[Yt]);if(Ht.length===0)return null;const Bt={};return yt&&(Bt.flexWrap="wrap"),!Pt&&Ft&&(Bt.columnGap=tt),!mt&>&&(Bt.rowGap=ut),bn(Me.createElement("div",Object.assign({ref:se,className:Kt,style:Object.assign(Object.assign(Object.assign({},Bt),Pe==null?void 0:Pe.style),et)},lt),Me.createElement(ye,{value:pt},kt)))});ee.Compact=Le.ZP;var oe=ee},31797:function(_n,en,Ee){"use strict";Ee.d(en,{default:function(){return Ae}});var Me=Ee(59301),me=Ee(56762),Be=Ee(92343),ke=Ee(92310),Ce=Ee.n(ke),Le=Ee(36355),he=Ee(61621),xe=De=>{const{value:ze,formatter:Ze,precision:Xe,decimalSeparator:Ge,groupSeparator:ft="",prefixCls:at}=De;let Ct;if(typeof Ze=="function")Ct=Ze(ze);else{const et=String(ze),yt=et.match(/^(-?)(\d*)(\.(\d+))?$/);if(!yt||et==="-")Ct=et;else{const st=yt[1];let zt=yt[2]||"0",lt=yt[4]||"";zt=zt.replace(/\B(?=(\d{3})+(?!\d))/g,ft),typeof Xe=="number"&&(lt=lt.padEnd(Xe,"0").slice(0,Xe>0?Xe:0)),lt&&(lt=`${Ge}${lt}`),Ct=[Me.createElement("span",{key:"int",className:`${at}-content-value-int`},st,zt),lt&&Me.createElement("span",{key:"decimal",className:`${at}-content-value-decimal`},lt)]}}return Me.createElement("span",{className:`${at}-content-value`},Ct)},ge=Ee(17313),le=Ee(83116),ve=Ee(37613);const de=De=>{const{componentCls:ze,marginXXS:Ze,padding:Xe,colorTextDescription:Ge,titleFontSize:ft,colorTextHeading:at,contentFontSize:Ct,fontFamily:et}=De;return{[`${ze}`]:Object.assign(Object.assign({},(0,ge.Wf)(De)),{[`${ze}-title`]:{marginBottom:Ze,color:Ge,fontSize:ft},[`${ze}-skeleton`]:{paddingTop:Xe},[`${ze}-content`]:{color:at,fontSize:Ct,fontFamily:et,[`${ze}-content-value`]:{display:"inline-block",direction:"ltr"},[`${ze}-content-prefix, ${ze}-content-suffix`]:{display:"inline-block"},[`${ze}-content-prefix`]:{marginInlineEnd:Ze},[`${ze}-content-suffix`]:{marginInlineStart:Ze}}})}};var ce=(0,le.Z)("Statistic",De=>{const ze=(0,ve.TS)(De,{});return[de(ze)]},De=>{const{fontSizeHeading3:ze,fontSize:Ze}=De;return{titleFontSize:Ze,contentFontSize:ze}}),ee=De=>{const{prefixCls:ze,className:Ze,rootClassName:Xe,style:Ge,valueStyle:ft,value:at=0,title:Ct,valueRender:et,prefix:yt,suffix:st,loading:zt=!1,onMouseEnter:lt,onMouseLeave:tt,decimalSeparator:ut=".",groupSeparator:mt=","}=De,{getPrefixCls:Pt,direction:gt,statistic:Ft}=Me.useContext(Le.E_),Ht=Pt("statistic",ze),[hn,Qt]=ce(Ht),bn=Me.createElement(xe,Object.assign({decimalSeparator:ut,groupSeparator:mt,prefixCls:Ht},De,{value:at})),Wt=Ce()(Ht,{[`${Ht}-rtl`]:gt==="rtl"},Ft==null?void 0:Ft.className,Ze,Xe,Qt);return hn(Me.createElement("div",{className:Wt,style:Object.assign(Object.assign({},Ft==null?void 0:Ft.style),Ge),onMouseEnter:lt,onMouseLeave:tt},Ct&&Me.createElement("div",{className:`${Ht}-title`},Ct),Me.createElement(he.Z,{paragraph:!1,loading:zt,className:`${Ht}-skeleton`},Me.createElement("div",{style:ft,className:`${Ht}-content`},yt&&Me.createElement("span",{className:`${Ht}-content-prefix`},yt),et?et(bn):bn,st&&Me.createElement("span",{className:`${Ht}-content-suffix`},st)))))};const oe=[["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 ie(De,ze){let Ze=De;const Xe=/\[[^\]]*]/g,Ge=(ze.match(Xe)||[]).map(et=>et.slice(1,-1)),ft=ze.replace(Xe,"[]"),at=oe.reduce((et,yt)=>{let[st,zt]=yt;if(et.includes(st)){const lt=Math.floor(Ze/zt);return Ze-=lt*zt,et.replace(new RegExp(`${st}+`,"g"),tt=>{const ut=tt.length;return lt.toString().padStart(ut,"0")})}return et},ft);let Ct=0;return at.replace(Xe,()=>{const et=Ge[Ct];return Ct+=1,et})}function se(De,ze){const{format:Ze=""}=ze,Xe=new Date(De).getTime(),Ge=Date.now(),ft=Math.max(Xe-Ge,0);return ie(ft,Ze)}const ue=1e3/30;function Se(De){return new Date(De).getTime()}const we=De=>{const{value:ze,format:Ze="HH:mm:ss",onChange:Xe,onFinish:Ge}=De,ft=(0,me.Z)(),at=Me.useRef(null),Ct=()=>{Ge==null||Ge(),at.current&&(clearInterval(at.current),at.current=null)},et=()=>{const zt=Se(ze);zt>=Date.now()&&(at.current=setInterval(()=>{ft(),Xe==null||Xe(zt-Date.now()),zt<Date.now()&&Ct()},ue))};Me.useEffect(()=>(et(),()=>{at.current&&(clearInterval(at.current),at.current=null)}),[ze]);const yt=(zt,lt)=>se(zt,Object.assign(Object.assign({},lt),{format:Ze})),st=zt=>(0,Be.Tm)(zt,{title:void 0});return Me.createElement(ee,Object.assign({},De,{valueRender:st,formatter:yt}))};var Pe=Me.memo(we);ee.Countdown=Pe;var Ae=ee},15969:function(_n,en,Ee){"use strict";Ee.d(en,{N:function(){return Me}});const Me=me=>({color:me.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${me.motionDurationSlow}`,"&:focus, &:hover":{color:me.colorLinkHover},"&:active":{color:me.colorLinkActive}})},78673:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ft}});var Me=Ee(58617),me=Ee(92310),Be=Ee.n(me),ke=Ee(72308),Ce=Ee(49618),Le=Ee(52487),he=Ee(74416),ye=Ee(59301),xe=Ee(18929),ge=Ee(10228),le=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ve=ye.forwardRef(function(at,Ct){var et,yt=at.prefixCls,st=yt===void 0?"rc-switch":yt,zt=at.className,lt=at.checked,tt=at.defaultChecked,ut=at.disabled,mt=at.loadingIcon,Pt=at.checkedChildren,gt=at.unCheckedChildren,Ft=at.onClick,Ht=at.onChange,hn=at.onKeyDown,Qt=(0,he.Z)(at,le),bn=(0,xe.Z)(!1,{value:lt,defaultValue:tt}),Wt=(0,Le.Z)(bn,2),Kt=Wt[0],Jt=Wt[1];function Yt(xt,vt){var nt=Kt;return ut||(nt=xt,Jt(nt),Ht==null||Ht(nt,vt)),nt}function kt(xt){xt.which===ge.Z.LEFT?Yt(!1,xt):xt.which===ge.Z.RIGHT&&Yt(!0,xt),hn==null||hn(xt)}function pt(xt){var vt=Yt(!Kt,xt);Ft==null||Ft(vt,xt)}var Bt=Be()(st,zt,(et={},(0,Ce.Z)(et,"".concat(st,"-checked"),Kt),(0,Ce.Z)(et,"".concat(st,"-disabled"),ut),et));return ye.createElement("button",(0,ke.Z)({},Qt,{type:"button",role:"switch","aria-checked":Kt,disabled:ut,className:Bt,ref:Ct,onKeyDown:kt,onClick:pt}),mt,ye.createElement("span",{className:"".concat(st,"-inner")},ye.createElement("span",{className:"".concat(st,"-inner-checked")},Pt),ye.createElement("span",{className:"".concat(st,"-inner-unchecked")},gt)))});ve.displayName="Switch";var de=ve,ce=Ee(14088),z=Ee(36355),ee=Ee(1684),oe=Ee(19716),ie=Ee(64993),se=Ee(17313),ue=Ee(83116),Se=Ee(37613);const we=at=>{const{componentCls:Ct,trackHeightSM:et,trackPadding:yt,trackMinWidthSM:st,innerMinMarginSM:zt,innerMaxMarginSM:lt,handleSizeSM:tt}=at,ut=`${Ct}-inner`;return{[Ct]:{[`&${Ct}-small`]:{minWidth:st,height:et,lineHeight:`${et}px`,[`${Ct}-inner`]:{paddingInlineStart:lt,paddingInlineEnd:zt,[`${ut}-checked`]:{marginInlineStart:`calc(-100% + ${tt+yt*2}px - ${lt*2}px)`,marginInlineEnd:`calc(100% - ${tt+yt*2}px + ${lt*2}px)`},[`${ut}-unchecked`]:{marginTop:-et,marginInlineStart:0,marginInlineEnd:0}},[`${Ct}-handle`]:{width:tt,height:tt},[`${Ct}-loading-icon`]:{top:(tt-at.switchLoadingIconSize)/2,fontSize:at.switchLoadingIconSize},[`&${Ct}-checked`]:{[`${Ct}-inner`]:{paddingInlineStart:zt,paddingInlineEnd:lt,[`${ut}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${ut}-unchecked`]:{marginInlineStart:`calc(100% - ${tt+yt*2}px + ${lt*2}px)`,marginInlineEnd:`calc(-100% + ${tt+yt*2}px - ${lt*2}px)`}},[`${Ct}-handle`]:{insetInlineStart:`calc(100% - ${tt+yt}px)`}},[`&:not(${Ct}-disabled):active`]:{[`&:not(${Ct}-checked) ${ut}`]:{[`${ut}-unchecked`]:{marginInlineStart:at.marginXXS/2,marginInlineEnd:-at.marginXXS/2}},[`&${Ct}-checked ${ut}`]:{[`${ut}-checked`]:{marginInlineStart:-at.marginXXS/2,marginInlineEnd:at.marginXXS/2}}}}}}},Pe=at=>{const{componentCls:Ct,handleSize:et}=at;return{[Ct]:{[`${Ct}-loading-icon${at.iconCls}`]:{position:"relative",top:(et-at.fontSize)/2,color:at.switchLoadingIconColor,verticalAlign:"top"},[`&${Ct}-checked ${Ct}-loading-icon`]:{color:at.switchColor}}}},Ae=at=>{const{componentCls:Ct,motion:et,trackPadding:yt,handleBg:st,handleShadow:zt,handleSize:lt}=at,tt=`${Ct}-handle`;return{[Ct]:{[tt]:{position:"absolute",top:yt,insetInlineStart:yt,width:lt,height:lt,transition:`all ${at.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:st,borderRadius:lt/2,boxShadow:zt,transition:`all ${at.switchDuration} ease-in-out`,content:'""'}},[`&${Ct}-checked ${tt}`]:{insetInlineStart:`calc(100% - ${lt+yt}px)`},[`&:not(${Ct}-disabled):active`]:et?{[`${tt}::before`]:{insetInlineEnd:at.switchHandleActiveInset,insetInlineStart:0},[`&${Ct}-checked ${tt}::before`]:{insetInlineEnd:0,insetInlineStart:at.switchHandleActiveInset}}:{}}}},De=at=>{const{componentCls:Ct,trackHeight:et,trackPadding:yt,innerMinMargin:st,innerMaxMargin:zt,handleSize:lt}=at,tt=`${Ct}-inner`;return{[Ct]:{[tt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:zt,paddingInlineEnd:st,transition:`padding-inline-start ${at.switchDuration} ease-in-out, padding-inline-end ${at.switchDuration} ease-in-out`,[`${tt}-checked, ${tt}-unchecked`]:{display:"block",color:at.colorTextLightSolid,fontSize:at.fontSizeSM,transition:`margin-inline-start ${at.switchDuration} ease-in-out, margin-inline-end ${at.switchDuration} ease-in-out`,pointerEvents:"none"},[`${tt}-checked`]:{marginInlineStart:`calc(-100% + ${lt+yt*2}px - ${zt*2}px)`,marginInlineEnd:`calc(100% - ${lt+yt*2}px + ${zt*2}px)`},[`${tt}-unchecked`]:{marginTop:-et,marginInlineStart:0,marginInlineEnd:0}},[`&${Ct}-checked ${tt}`]:{paddingInlineStart:st,paddingInlineEnd:zt,[`${tt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${tt}-unchecked`]:{marginInlineStart:`calc(100% - ${lt+yt*2}px + ${zt*2}px)`,marginInlineEnd:`calc(-100% + ${lt+yt*2}px - ${zt*2}px)`}},[`&:not(${Ct}-disabled):active`]:{[`&:not(${Ct}-checked) ${tt}`]:{[`${tt}-unchecked`]:{marginInlineStart:yt*2,marginInlineEnd:-yt*2}},[`&${Ct}-checked ${tt}`]:{[`${tt}-checked`]:{marginInlineStart:-yt*2,marginInlineEnd:yt*2}}}}}},ze=at=>{const{componentCls:Ct,trackHeight:et,trackMinWidth:yt}=at;return{[Ct]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,se.Wf)(at)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:yt,height:et,lineHeight:`${et}px`,verticalAlign:"middle",background:at.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${at.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ct}-disabled)`]:{background:at.colorTextTertiary}}),(0,se.Qy)(at)),{[`&${Ct}-checked`]:{background:at.switchColor,[`&:hover:not(${Ct}-disabled)`]:{background:at.colorPrimaryHover}},[`&${Ct}-loading, &${Ct}-disabled`]:{cursor:"not-allowed",opacity:at.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ct}-rtl`]:{direction:"rtl"}})}};var Ze=(0,ue.Z)("Switch",at=>{const Ct=(0,Se.TS)(at,{switchDuration:at.motionDurationMid,switchColor:at.colorPrimary,switchDisabledOpacity:at.opacityLoading,switchLoadingIconSize:at.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${at.opacityLoading})`,switchHandleActiveInset:"-30%"});return[ze(Ct),De(Ct),Ae(Ct),Pe(Ct),we(Ct)]},at=>{const{fontSize:Ct,lineHeight:et,controlHeight:yt,colorWhite:st}=at,zt=Ct*et,lt=yt/2,tt=2,ut=zt-tt*2,mt=lt-tt*2;return{trackHeight:zt,trackHeightSM:lt,trackMinWidth:ut*2+tt*4,trackMinWidthSM:mt*2+tt*2,trackPadding:tt,handleBg:st,handleSize:ut,handleSizeSM:mt,handleShadow:`0 2px 4px 0 ${new ie.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:ut/2,innerMaxMargin:ut+tt+tt*2,innerMinMarginSM:mt/2,innerMaxMarginSM:mt+tt+tt*2}}),Xe=function(at,Ct){var et={};for(var yt in at)Object.prototype.hasOwnProperty.call(at,yt)&&Ct.indexOf(yt)<0&&(et[yt]=at[yt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,yt=Object.getOwnPropertySymbols(at);st<yt.length;st++)Ct.indexOf(yt[st])<0&&Object.prototype.propertyIsEnumerable.call(at,yt[st])&&(et[yt[st]]=at[yt[st]]);return et};const Ge=ye.forwardRef((at,Ct)=>{const{prefixCls:et,size:yt,disabled:st,loading:zt,className:lt,rootClassName:tt,style:ut}=at,mt=Xe(at,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Pt,direction:gt,switch:Ft}=ye.useContext(z.E_),Ht=ye.useContext(ee.Z),hn=(st!=null?st:Ht)||zt,Qt=Pt("switch",et),bn=ye.createElement("div",{className:`${Qt}-handle`},zt&&ye.createElement(Me.Z,{className:`${Qt}-loading-icon`})),[Wt,Kt]=Ze(Qt),Jt=(0,oe.Z)(yt),Yt=Be()(Ft==null?void 0:Ft.className,{[`${Qt}-small`]:Jt==="small",[`${Qt}-loading`]:zt,[`${Qt}-rtl`]:gt==="rtl"},lt,tt,Kt),kt=Object.assign(Object.assign({},Ft==null?void 0:Ft.style),ut);return Wt(ye.createElement(ce.Z,{component:"Switch"},ye.createElement(de,Object.assign({},mt,{prefixCls:Qt,className:Yt,style:kt,disabled:hn,ref:Ct,loadingIcon:bn}))))});Ge.__ANT_SWITCH=!0;var ft=Ge},1710:function(_n,en,Ee){"use strict";Ee.d(en,{default:function(){return gf}});var Me={},me="rc-table-internal-hook",Be=Ee(52487),ke=Ee(6089),Ce=Ee(34280),Le=Ee(13697),he=Ee(59301),ye=Ee(4676);function xe(jt){var Ut=he.createContext(void 0),cn=function(bt){var Et=bt.value,wn=bt.children,fn=he.useRef(Et);fn.current=Et;var an=he.useState(function(){return{getValue:function(){return fn.current},listeners:new Set}}),Sn=(0,Be.Z)(an,1),xn=Sn[0];return(0,Ce.Z)(function(){(0,ye.unstable_batchedUpdates)(function(){xn.listeners.forEach(function(Cn){Cn(Et)})})},[Et]),he.createElement(Ut.Provider,{value:xn},wn)};return{Context:Ut,Provider:cn,defaultValue:jt}}function ge(jt,Ut){var cn=(0,ke.Z)(typeof Ut=="function"?Ut:function(Cn){if(Ut===void 0)return Cn;if(!Array.isArray(Ut))return Cn[Ut];var zn={};return Ut.forEach(function(ni){zn[ni]=Cn[ni]}),zn}),ht=he.useContext(jt==null?void 0:jt.Context),bt=ht||{},Et=bt.listeners,wn=bt.getValue,fn=he.useRef();fn.current=cn(ht?wn():jt==null?void 0:jt.defaultValue);var an=he.useState({}),Sn=(0,Be.Z)(an,2),xn=Sn[1];return(0,Ce.Z)(function(){if(!ht)return;function Cn(zn){var ni=cn(zn);(0,Le.Z)(fn.current,ni,!0)||xn({})}return Et.add(Cn),function(){Et.delete(Cn)}},[ht]),fn.current}var le=Ee(72308),ve=Ee(8654);function de(){var jt=he.createContext(null);function Ut(){return he.useContext(jt)}function cn(bt,Et){var wn=(0,ve.Yr)(bt),fn=function(Sn,xn){var Cn=wn?{ref:xn}:{},zn=he.useRef(0),ni=he.useRef(Sn),Zn=Ut();return Zn!==null?he.createElement(bt,(0,le.Z)({},Sn,Cn)):((!Et||Et(ni.current,Sn))&&(zn.current+=1),ni.current=Sn,he.createElement(jt.Provider,{value:zn.current},he.createElement(bt,(0,le.Z)({},Sn,Cn))))};return wn?he.forwardRef(fn):fn}function ht(bt,Et){var wn=(0,ve.Yr)(bt),fn=function(Sn,xn){var Cn=wn?{ref:xn}:{};return Ut(),he.createElement(bt,(0,le.Z)({},Sn,Cn))};return wn?he.memo(he.forwardRef(fn),Et):he.memo(fn,Et)}return{makeImmutable:cn,responseImmutable:ht,useImmutableMark:Ut}}var ce=de(),z=ce.makeImmutable,ee=ce.responseImmutable,oe=ce.useImmutableMark,ie=de(),se=ie.makeImmutable,ue=ie.responseImmutable,Se=ie.useImmutableMark,we=xe(),Pe=we;function Ae(jt,Ut){var cn=he.useRef(0);cn.current+=1;var ht=he.useRef(jt),bt=[];Object.keys(jt||{}).map(function(wn){var fn;(jt==null?void 0:jt[wn])!==((fn=ht.current)===null||fn===void 0?void 0:fn[wn])&&bt.push(wn)}),ht.current=jt;var Et=he.useRef([]);return bt.length&&(Et.current=bt),he.useDebugValue(cn.current),he.useDebugValue(Et.current.join(", ")),Ut&&console.log("".concat(Ut,":"),cn.current,Et.current),cn.current}var De=null,ze=he.memo(function(){var jt=Ae();return he.createElement("h1",null,"Render Times: ",jt)});ze.displayName="RenderBlock";var Ze=Ee(62853),Xe=Ee(77321),Ge=Ee(49618),ft=Ee(92310),at=Ee.n(ft),Ct=Ee(80547),et=Ee(97938),yt=Ee(48736),st=he.createContext({renderWithProps:!1}),zt=st,lt="RC_TABLE_KEY";function tt(jt){return jt==null?[]:Array.isArray(jt)?jt:[jt]}function ut(jt){var Ut=[],cn={};return jt.forEach(function(ht){for(var bt=ht||{},Et=bt.key,wn=bt.dataIndex,fn=Et||tt(wn).join("-")||lt;cn[fn];)fn="".concat(fn,"_next");cn[fn]=!0,Ut.push(fn)}),Ut}function mt(jt){return jt!=null}function Pt(jt){return jt&&(0,Ze.Z)(jt)==="object"&&!Array.isArray(jt)&&!he.isValidElement(jt)}function gt(jt,Ut,cn,ht,bt,Et){var wn=he.useContext(zt),fn=Se(),an=(0,Ct.Z)(function(){if(mt(ht))return[ht];var Sn=Ut==null||Ut===""?[]:Array.isArray(Ut)?Ut:[Ut],xn=(0,et.Z)(jt,Sn),Cn=xn,zn=void 0;if(bt){var ni=bt(xn,jt,cn);Pt(ni)?(Cn=ni.children,zn=ni.props,wn.renderWithProps=!0):Cn=ni}return[Cn,zn]},[fn,jt,ht,Ut,bt,cn],function(Sn,xn){if(Et){var Cn=(0,Be.Z)(Sn,2),zn=Cn[1],ni=(0,Be.Z)(xn,2),Zn=ni[1];return Et(Zn,zn)}return wn.renderWithProps?!0:!(0,Le.Z)(Sn,xn,!0)});return an}function Ft(jt,Ut,cn,ht){var bt=jt+Ut-1;return jt<=ht&&bt>=cn}function Ht(jt,Ut){return ge(Pe,function(cn){var ht=Ft(jt,Ut||1,cn.hoverStartRow,cn.hoverEndRow);return[ht,cn.onHover]})}var hn=function(Ut){var cn=Ut.ellipsis,ht=Ut.rowType,bt=Ut.children,Et,wn=cn===!0?{showTitle:!0}:cn;return wn&&(wn.showTitle||ht==="header")&&(typeof bt=="string"||typeof bt=="number"?Et=bt.toString():he.isValidElement(bt)&&typeof bt.props.children=="string"&&(Et=bt.props.children)),Et};function Qt(jt){var Ut,cn,ht,bt,Et,wn,fn,an,Sn=jt.component,xn=jt.children,Cn=jt.ellipsis,zn=jt.scope,ni=jt.prefixCls,Zn=jt.className,wi=jt.align,Kn=jt.record,gi=jt.render,si=jt.dataIndex,Ii=jt.renderIndex,Ni=jt.shouldCellUpdate,Gi=jt.index,ki=jt.rowType,Ai=jt.colSpan,ur=jt.rowSpan,Qn=jt.fixLeft,ji=jt.fixRight,Ei=jt.firstFixLeft,bi=jt.lastFixLeft,Ji=jt.firstFixRight,pi=jt.lastFixRight,cr=jt.appendNode,Qi=jt.additionalProps,Pi=Qi===void 0?{}:Qi,Wi=jt.isSticky,Sr="".concat(ni,"-cell"),nr=ge(Pe,["supportSticky","allColumnsFixedLeft"]),xo=nr.supportSticky,Po=nr.allColumnsFixedLeft,is=gt(Kn,si,Ii,xn,gi,Ni),so=(0,Be.Z)(is,2),Tr=so[0],Oo=so[1],Or={},Xr=typeof Qn=="number"&&xo,rs=typeof ji=="number"&&xo;Xr&&(Or.position="sticky",Or.left=Qn),rs&&(Or.position="sticky",Or.right=ji);var Wr=(Ut=(cn=(ht=Oo==null?void 0:Oo.colSpan)!==null&&ht!==void 0?ht:Pi.colSpan)!==null&&cn!==void 0?cn:Ai)!==null&&Ut!==void 0?Ut:1,Er=(bt=(Et=(wn=Oo==null?void 0:Oo.rowSpan)!==null&&wn!==void 0?wn:Pi.rowSpan)!==null&&Et!==void 0?Et:ur)!==null&&bt!==void 0?bt:1,Jr=Ht(Gi,Er),Cr=(0,Be.Z)(Jr,2),ao=Cr[0],Lr=Cr[1],fo=function(Ss){var Js;Kn&&Lr(Gi,Gi+Er-1),Pi==null||(Js=Pi.onMouseEnter)===null||Js===void 0||Js.call(Pi,Ss)},Zo=function(Ss){var Js;Kn&&Lr(-1,-1),Pi==null||(Js=Pi.onMouseLeave)===null||Js===void 0||Js.call(Pi,Ss)};if(Wr===0||Er===0)return null;var Ko=(fn=Pi.title)!==null&&fn!==void 0?fn:hn({rowType:ki,ellipsis:Cn,children:Tr}),Qr=at()(Sr,Zn,(an={},(0,Ge.Z)(an,"".concat(Sr,"-fix-left"),Xr&&xo),(0,Ge.Z)(an,"".concat(Sr,"-fix-left-first"),Ei&&xo),(0,Ge.Z)(an,"".concat(Sr,"-fix-left-last"),bi&&xo),(0,Ge.Z)(an,"".concat(Sr,"-fix-left-all"),bi&&Po&&xo),(0,Ge.Z)(an,"".concat(Sr,"-fix-right"),rs&&xo),(0,Ge.Z)(an,"".concat(Sr,"-fix-right-first"),Ji&&xo),(0,Ge.Z)(an,"".concat(Sr,"-fix-right-last"),pi&&xo),(0,Ge.Z)(an,"".concat(Sr,"-ellipsis"),Cn),(0,Ge.Z)(an,"".concat(Sr,"-with-append"),cr),(0,Ge.Z)(an,"".concat(Sr,"-fix-sticky"),(Xr||rs)&&Wi&&xo),(0,Ge.Z)(an,"".concat(Sr,"-row-hover"),!Oo&&ao),an),Pi.className,Oo==null?void 0:Oo.className),Do={};wi&&(Do.textAlign=wi);var Cs=(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},Or),Pi.style),Do),Oo==null?void 0:Oo.style),Mo=Tr;return(0,Ze.Z)(Mo)==="object"&&!Array.isArray(Mo)&&!he.isValidElement(Mo)&&(Mo=null),Cn&&(bi||Ji)&&(Mo=he.createElement("span",{className:"".concat(Sr,"-content")},Mo)),he.createElement(Sn,(0,le.Z)({},Oo,Pi,{className:Qr,style:Cs,title:Ko,scope:zn,onMouseEnter:fo,onMouseLeave:Zo,colSpan:Wr!==1?Wr:null,rowSpan:Er!==1?Er:null}),cr,Mo)}var bn=he.memo(Qt);function Wt(jt,Ut,cn,ht,bt,Et){var wn=cn[jt]||{},fn=cn[Ut]||{},an,Sn;wn.fixed==="left"?an=ht.left[bt==="rtl"?Ut:jt]:fn.fixed==="right"&&(Sn=ht.right[bt==="rtl"?jt:Ut]);var xn=!1,Cn=!1,zn=!1,ni=!1,Zn=cn[Ut+1],wi=cn[jt-1],Kn=!(Et!=null&&Et.children);if(bt==="rtl"){if(an!==void 0){var gi=wi&&wi.fixed==="left";ni=!gi&&Kn}else if(Sn!==void 0){var si=Zn&&Zn.fixed==="right";zn=!si&&Kn}}else if(an!==void 0){var Ii=Zn&&Zn.fixed==="left";xn=!Ii&&Kn}else if(Sn!==void 0){var Ni=wi&&wi.fixed==="right";Cn=!Ni&&Kn}return{fixLeft:an,fixRight:Sn,lastFixLeft:xn,firstFixRight:Cn,lastFixRight:zn,firstFixLeft:ni,isSticky:ht.isSticky}}var Kt=he.createContext({}),Jt=Kt;function Yt(jt){var Ut=jt.className,cn=jt.index,ht=jt.children,bt=jt.colSpan,Et=bt===void 0?1:bt,wn=jt.rowSpan,fn=jt.align,an=ge(Pe,["prefixCls","direction"]),Sn=an.prefixCls,xn=an.direction,Cn=he.useContext(Jt),zn=Cn.scrollColumnIndex,ni=Cn.stickyOffsets,Zn=Cn.flattenColumns,wi=Cn.columns,Kn=cn+Et-1,gi=Kn+1===zn?Et+1:Et,si=Wt(cn,cn+gi-1,Zn,ni,xn,wi==null?void 0:wi[cn]);return he.createElement(bn,(0,le.Z)({className:Ut,index:cn,component:"td",prefixCls:Sn,record:null,dataIndex:null,align:fn,colSpan:gi,rowSpan:wn,render:function(){return ht}},si))}var kt=Ee(74416),pt=["children"];function Bt(jt){var Ut=jt.children,cn=(0,kt.Z)(jt,pt);return he.createElement("tr",cn,Ut)}function xt(jt){var Ut=jt.children;return Ut}xt.Row=Bt,xt.Cell=Yt;var vt=xt;function nt(jt){var Ut=jt.children,cn=jt.stickyOffsets,ht=jt.flattenColumns,bt=jt.columns,Et=ge(Pe,"prefixCls"),wn=ht.length-1,fn=ht[wn],an=he.useMemo(function(){return{stickyOffsets:cn,flattenColumns:ht,scrollColumnIndex:fn!=null&&fn.scrollbar?wn:null,columns:bt}},[fn,ht,wn,cn,bt]);return he.createElement(Jt.Provider,{value:an},he.createElement("tfoot",{className:"".concat(Et,"-summary")},Ut))}var He=ue(nt),Ie=vt,We=Ee(70425),Oe=Ee(29301),be=Ee(29194),Ne=Ee(24514),$e=Ee(75152),dt=Ee(26112);function Je(jt,Ut,cn,ht,bt,Et,wn){jt.push({record:Ut,indent:cn,index:wn});var fn=Et(Ut),an=bt==null?void 0:bt.has(fn);if(Ut&&Array.isArray(Ut[ht])&&an)for(var Sn=0;Sn<Ut[ht].length;Sn+=1)Je(jt,Ut[ht][Sn],cn+1,ht,bt,Et,Sn)}function At(jt,Ut,cn,ht){var bt=he.useMemo(function(){if(cn!=null&&cn.size){for(var Et=[],wn=0;wn<(jt==null?void 0:jt.length);wn+=1){var fn=jt[wn];Je(Et,fn,0,Ut,cn,ht,wn)}return Et}return jt==null?void 0:jt.map(function(an,Sn){return{record:an,indent:0,index:Sn}})},[jt,Ut,cn,ht]);return bt}function tn(jt){var Ut=jt.prefixCls,cn=jt.children,ht=jt.component,bt=jt.cellComponent,Et=jt.className,wn=jt.expanded,fn=jt.colSpan,an=jt.isEmpty,Sn=ge(Pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),xn=Sn.scrollbarSize,Cn=Sn.fixHeader,zn=Sn.fixColumn,ni=Sn.componentWidth,Zn=Sn.horizonScroll,wi=cn;return(an?Zn&&ni:zn)&&(wi=he.createElement("div",{style:{width:ni-(Cn?xn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ut,"-expanded-row-fixed")},wi)),he.createElement(ht,{className:Et,style:{display:wn?null:"none"}},he.createElement(bn,{component:bt,prefixCls:Ut,colSpan:fn},wi))}var pn=tn;function ln(jt,Ut,cn,ht){var bt=ge(Pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Et=bt.flattenColumns,wn=bt.expandableType,fn=bt.expandedKeys,an=bt.childrenColumnName,Sn=bt.onTriggerExpand,xn=bt.rowExpandable,Cn=bt.onRow,zn=bt.expandRowByClick,ni=bt.rowClassName,Zn=wn==="nest",wi=wn==="row"&&(!xn||xn(jt)),Kn=wi||Zn,gi=fn&&fn.has(Ut),si=an&&jt&&jt[an],Ii=(0,We.useEvent)(Sn),Ni=Cn==null?void 0:Cn(jt,cn),Gi=Ni==null?void 0:Ni.onClick,ki=function(ji){zn&&Kn&&Sn(jt,ji);for(var Ei=arguments.length,bi=new Array(Ei>1?Ei-1:0),Ji=1;Ji<Ei;Ji++)bi[Ji-1]=arguments[Ji];Gi==null||Gi.apply(void 0,[ji].concat(bi))},Ai;typeof ni=="string"?Ai=ni:typeof ni=="function"&&(Ai=ni(jt,cn,ht));var ur=ut(Et);return(0,Xe.Z)((0,Xe.Z)({},bt),{},{columnsKey:ur,nestExpandable:Zn,expanded:gi,hasNestChildren:si,record:jt,onTriggerExpand:Ii,rowSupportExpand:wi,expandable:Kn,rowProps:(0,Xe.Z)((0,Xe.Z)({},Ni),{},{className:at()(Ai,Ni==null?void 0:Ni.className),onClick:ki})})}function gn(jt,Ut,cn,ht,bt){var Et=jt.record,wn=jt.prefixCls,fn=jt.columnsKey,an=jt.fixedInfoList,Sn=jt.expandIconColumnIndex,xn=jt.nestExpandable,Cn=jt.indentSize,zn=jt.expandIcon,ni=jt.expanded,Zn=jt.hasNestChildren,wi=jt.onTriggerExpand,Kn=fn[cn],gi=an[cn],si;cn===(Sn||0)&&xn&&(si=he.createElement(he.Fragment,null,he.createElement("span",{style:{paddingLeft:"".concat(Cn*ht,"px")},className:"".concat(wn,"-row-indent indent-level-").concat(ht)}),zn({prefixCls:wn,expanded:ni,expandable:Zn,record:Et,onExpand:wi})));var Ii;return Ut.onCell&&(Ii=Ut.onCell(Et,bt)),{key:Kn,fixedInfo:gi,appendCellNode:si,additionalCellProps:Ii||{}}}function Hn(jt){var Ut=jt.className,cn=jt.style,ht=jt.record,bt=jt.index,Et=jt.renderIndex,wn=jt.rowKey,fn=jt.indent,an=fn===void 0?0:fn,Sn=jt.rowComponent,xn=jt.cellComponent,Cn=jt.scopeCellComponent,zn=ln(ht,wn,bt,an),ni=zn.prefixCls,Zn=zn.flattenColumns,wi=zn.expandedRowClassName,Kn=zn.expandedRowRender,gi=zn.rowProps,si=zn.expanded,Ii=zn.rowSupportExpand,Ni=he.useState(!1),Gi=(0,Be.Z)(Ni,2),ki=Gi[0],Ai=Gi[1];he.useEffect(function(){si&&Ai(!0)},[si]);var ur=he.createElement(Sn,(0,le.Z)({},gi,{"data-row-key":wn,className:at()(Ut,"".concat(ni,"-row"),"".concat(ni,"-row-level-").concat(an),gi==null?void 0:gi.className),style:(0,Xe.Z)((0,Xe.Z)({},cn),gi==null?void 0:gi.style)}),Zn.map(function(bi,Ji){var pi=bi.render,cr=bi.dataIndex,Qi=bi.className,Pi=gn(zn,bi,Ji,an,bt),Wi=Pi.key,Sr=Pi.fixedInfo,nr=Pi.appendCellNode,xo=Pi.additionalCellProps;return he.createElement(bn,(0,le.Z)({className:Qi,ellipsis:bi.ellipsis,align:bi.align,scope:bi.rowScope,component:bi.rowScope?Cn:xn,prefixCls:ni,key:Wi,record:ht,index:bt,renderIndex:Et,dataIndex:cr,render:pi,shouldCellUpdate:bi.shouldCellUpdate},Sr,{appendNode:nr,additionalProps:xo}))})),Qn;if(Ii&&(ki||si)){var ji=Kn(ht,bt,an+1,si),Ei=wi&&wi(ht,bt,an);Qn=he.createElement(pn,{expanded:si,className:at()("".concat(ni,"-expanded-row"),"".concat(ni,"-expanded-row-level-").concat(an+1),Ei),prefixCls:ni,component:Sn,cellComponent:xn,colSpan:Zn.length,isEmpty:!1},ji)}return he.createElement(he.Fragment,null,ur,Qn)}Hn.displayName="BodyRow";var An=ue(Hn);function qn(jt){var Ut=jt.columnKey,cn=jt.onColumnResize,ht=he.useRef();return he.useEffect(function(){ht.current&&cn(Ut,ht.current.offsetWidth)},[]),he.createElement(Oe.Z,{data:Ut},he.createElement("td",{ref:ht,style:{padding:0,border:0,height:0}},he.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ai(jt){var Ut=jt.prefixCls,cn=jt.columnsKey,ht=jt.onColumnResize;return he.createElement("tr",{"aria-hidden":"true",className:"".concat(Ut,"-measure-row"),style:{height:0,fontSize:0}},he.createElement(Oe.Z.Collection,{onBatchResize:function(Et){Et.forEach(function(wn){var fn=wn.data,an=wn.size;ht(fn,an.offsetWidth)})}},cn.map(function(bt){return he.createElement(qn,{key:bt,columnKey:bt,onColumnResize:ht})})))}function Ti(jt){var Ut=jt.data,cn=jt.measureColumnWidth,ht=ge(Pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),bt=ht.prefixCls,Et=ht.getComponent,wn=ht.onColumnResize,fn=ht.flattenColumns,an=ht.getRowKey,Sn=ht.expandedKeys,xn=ht.childrenColumnName,Cn=ht.emptyNode,zn=At(Ut,xn,Sn,an),ni=he.useRef({renderWithProps:!1}),Zn=Et(["body","wrapper"],"tbody"),wi=Et(["body","row"],"tr"),Kn=Et(["body","cell"],"td"),gi=Et(["body","cell"],"th"),si;Ut.length?si=zn.map(function(Ni,Gi){var ki=Ni.record,Ai=Ni.indent,ur=Ni.index,Qn=an(ki,Gi);return he.createElement(An,{key:Qn,rowKey:Qn,record:ki,index:Gi,renderIndex:ur,rowComponent:wi,cellComponent:Kn,scopeCellComponent:gi,getRowKey:an,indent:Ai})}):si=he.createElement(pn,{expanded:!0,className:"".concat(bt,"-placeholder"),prefixCls:bt,component:wi,cellComponent:Kn,colSpan:fn.length,isEmpty:!0},Cn);var Ii=ut(fn);return he.createElement(zt.Provider,{value:ni.current},he.createElement(Zn,{className:"".concat(bt,"-tbody")},cn&&he.createElement(ai,{prefixCls:bt,columnsKey:Ii,onColumnResize:wn}),si))}Ti.displayName="Body";var Ci=ue(Ti),$i=["expandable"],or="RC_TABLE_INTERNAL_COL_DEFINE";function lr(jt){var Ut=jt.expandable,cn=(0,kt.Z)(jt,$i),ht;return"expandable"in jt?ht=(0,Xe.Z)((0,Xe.Z)({},cn),Ut):ht=cn,ht.showExpandColumn===!1&&(ht.expandIconColumnIndex=-1),ht}var qi=["columnType"];function Fr(jt){for(var Ut=jt.colWidths,cn=jt.columns,ht=jt.columCount,bt=[],Et=ht||cn.length,wn=!1,fn=Et-1;fn>=0;fn-=1){var an=Ut[fn],Sn=cn&&cn[fn],xn=Sn&&Sn[or];if(an||xn||wn){var Cn=xn||{},zn=Cn.columnType,ni=(0,kt.Z)(Cn,qi);bt.unshift(he.createElement("col",(0,le.Z)({key:fn,style:{width:an}},ni))),wn=!0}}return he.createElement("colgroup",null,bt)}var Mr=Fr,yi=Ee(80702),dr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Zi(jt,Ut){return(0,he.useMemo)(function(){for(var cn=[],ht=0;ht<Ut;ht+=1){var bt=jt[ht];if(bt!==void 0)cn[ht]=bt;else return null}return cn},[jt.join("_"),Ut])}var rt=he.forwardRef(function(jt,Ut){var cn=jt.className,ht=jt.noData,bt=jt.columns,Et=jt.flattenColumns,wn=jt.colWidths,fn=jt.columCount,an=jt.stickyOffsets,Sn=jt.direction,xn=jt.fixHeader,Cn=jt.stickyTopOffset,zn=jt.stickyBottomOffset,ni=jt.stickyClassName,Zn=jt.onScroll,wi=jt.maxContentScroll,Kn=jt.children,gi=(0,kt.Z)(jt,dr),si=ge(Pe,["prefixCls","scrollbarSize","isSticky"]),Ii=si.prefixCls,Ni=si.scrollbarSize,Gi=si.isSticky,ki=Gi&&!xn?0:Ni,Ai=he.useRef(null),ur=he.useCallback(function(Qi){(0,ve.mH)(Ut,Qi),(0,ve.mH)(Ai,Qi)},[]);he.useEffect(function(){var Qi;function Pi(Wi){var Sr=Wi,nr=Sr.currentTarget,xo=Sr.deltaX;xo&&(Zn({currentTarget:nr,scrollLeft:nr.scrollLeft+xo}),Wi.preventDefault())}return(Qi=Ai.current)===null||Qi===void 0||Qi.addEventListener("wheel",Pi),function(){var Wi;(Wi=Ai.current)===null||Wi===void 0||Wi.removeEventListener("wheel",Pi)}},[]);var Qn=he.useMemo(function(){return Et.every(function(Qi){return Qi.width})},[Et]),ji=Et[Et.length-1],Ei={fixed:ji?ji.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ii,"-cell-scrollbar")}}},bi=(0,he.useMemo)(function(){return ki?[].concat((0,yi.Z)(bt),[Ei]):bt},[ki,bt]),Ji=(0,he.useMemo)(function(){return ki?[].concat((0,yi.Z)(Et),[Ei]):Et},[ki,Et]),pi=(0,he.useMemo)(function(){var Qi=an.right,Pi=an.left;return(0,Xe.Z)((0,Xe.Z)({},an),{},{left:Sn==="rtl"?[].concat((0,yi.Z)(Pi.map(function(Wi){return Wi+ki})),[0]):Pi,right:Sn==="rtl"?Qi:[].concat((0,yi.Z)(Qi.map(function(Wi){return Wi+ki})),[0]),isSticky:Gi})},[ki,an,Gi]),cr=Zi(wn,fn);return he.createElement("div",{style:(0,Xe.Z)({overflow:"hidden"},Gi?{top:Cn,bottom:zn}:{}),ref:ur,className:at()(cn,(0,Ge.Z)({},ni,!!ni))},he.createElement("table",{style:{tableLayout:"fixed",visibility:ht||cr?null:"hidden"}},(!ht||!wi||Qn)&&he.createElement(Mr,{colWidths:cr?[].concat((0,yi.Z)(cr),[ki]):[],columCount:fn+1,columns:Ji}),Kn((0,Xe.Z)((0,Xe.Z)({},gi),{},{stickyOffsets:pi,columns:bi,flattenColumns:Ji}))))});rt.displayName="FixedHolder";var Ir=he.memo(rt);function Ar(jt){var Ut=jt.cells,cn=jt.stickyOffsets,ht=jt.flattenColumns,bt=jt.rowComponent,Et=jt.cellComponent,wn=jt.tdCellComponent,fn=jt.onHeaderRow,an=jt.index,Sn=ge(Pe,["prefixCls","direction"]),xn=Sn.prefixCls,Cn=Sn.direction,zn;fn&&(zn=fn(Ut.map(function(Zn){return Zn.column}),an));var ni=ut(Ut.map(function(Zn){return Zn.column}));return he.createElement(bt,zn,Ut.map(function(Zn,wi){var Kn=Zn.column,gi=Wt(Zn.colStart,Zn.colEnd,ht,cn,Cn,Kn),si;return Kn&&Kn.onHeaderCell&&(si=Zn.column.onHeaderCell(Kn)),he.createElement(bn,(0,le.Z)({},Zn,{scope:Kn.title?Zn.colSpan>1?"colgroup":"col":null,ellipsis:Kn.ellipsis,align:Kn.align,component:Kn.title?Et:wn,prefixCls:xn,key:ni[wi]},gi,{additionalProps:si,rowType:"header"}))}))}Ar.displayName="HeaderRow";var $r=Ar;function co(jt){var Ut=[];function cn(wn,fn){var an=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ut[an]=Ut[an]||[];var Sn=fn,xn=wn.filter(Boolean).map(function(Cn){var zn={key:Cn.key,className:Cn.className||"",children:Cn.title,column:Cn,colStart:Sn},ni=1,Zn=Cn.children;return Zn&&Zn.length>0&&(ni=cn(Zn,Sn,an+1).reduce(function(wi,Kn){return wi+Kn},0),zn.hasSubColumns=!0),"colSpan"in Cn&&(ni=Cn.colSpan),"rowSpan"in Cn&&(zn.rowSpan=Cn.rowSpan),zn.colSpan=ni,zn.colEnd=zn.colStart+ni-1,Ut[an].push(zn),Sn+=ni,ni});return xn}cn(jt,0);for(var ht=Ut.length,bt=function(fn){Ut[fn].forEach(function(an){!("rowSpan"in an)&&!an.hasSubColumns&&(an.rowSpan=ht-fn)})},Et=0;Et<ht;Et+=1)bt(Et);return Ut}function mo(jt){var Ut=jt.stickyOffsets,cn=jt.columns,ht=jt.flattenColumns,bt=jt.onHeaderRow,Et=ge(Pe,["prefixCls","getComponent"]),wn=Et.prefixCls,fn=Et.getComponent,an=he.useMemo(function(){return co(cn)},[cn]),Sn=fn(["header","wrapper"],"thead"),xn=fn(["header","row"],"tr"),Cn=fn(["header","cell"],"th"),zn=fn(["header","cell"],"td");return he.createElement(Sn,{className:"".concat(wn,"-thead")},an.map(function(ni,Zn){var wi=he.createElement($r,{key:Zn,flattenColumns:ht,cells:ni,stickyOffsets:Ut,rowComponent:xn,cellComponent:Cn,tdCellComponent:zn,onHeaderRow:bt,index:Zn});return wi}))}var no=ue(mo),lo=Ee(11592);function ri(jt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ut=="number"?Ut:Ut.endsWith("%")?jt*parseFloat(Ut)/100:null}function Ke(jt,Ut){return he.useMemo(function(){if(Ut&&Ut>0){var cn=0,ht=0;jt.forEach(function(Sn){var xn=ri(Ut,Sn.width);xn?cn+=xn:ht+=1});var bt=Ut-cn,Et=ht,wn=bt/ht,fn=0,an=jt.map(function(Sn){var xn=(0,Xe.Z)({},Sn),Cn=ri(Ut,xn.width);if(Cn)xn.width=Cn;else{var zn=Math.floor(wn);xn.width=Et===1?bt:zn,bt-=zn,Et-=1}return fn+=xn.width,xn});return[an,fn]}return[jt,Ut]},[jt,Ut])}var qe=["children"],Ye=["fixed"];function St(jt){return(0,lo.Z)(jt).filter(function(Ut){return he.isValidElement(Ut)}).map(function(Ut){var cn=Ut.key,ht=Ut.props,bt=ht.children,Et=(0,kt.Z)(ht,qe),wn=(0,Xe.Z)({key:cn},Et);return bt&&(wn.children=St(bt)),wn})}function Ot(jt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return jt.filter(function(cn){return cn&&(0,Ze.Z)(cn)==="object"}).reduce(function(cn,ht,bt){var Et=ht.fixed,wn=Et===!0?"left":Et,fn="".concat(Ut,"-").concat(bt),an=ht.children;return an&&an.length>0?[].concat((0,yi.Z)(cn),(0,yi.Z)(Ot(an,fn).map(function(Sn){return(0,Xe.Z)({fixed:wn},Sn)}))):[].concat((0,yi.Z)(cn),[(0,Xe.Z)((0,Xe.Z)({key:fn},ht),{},{fixed:wn})])},[])}function Tt(jt){for(var Ut=!0,cn=0;cn<jt.length;cn+=1){var ht=jt[cn];if(Ut&&ht.fixed!=="left")Ut=!1;else if(!Ut&&ht.fixed==="left"){warning(!1,"Index ".concat(cn-1," of `columns` missing `fixed='left'` prop."));break}}for(var bt=!0,Et=jt.length-1;Et>=0;Et-=1){var wn=jt[Et];if(bt&&wn.fixed!=="right")bt=!1;else if(!bt&&wn.fixed==="right"){warning(!1,"Index ".concat(Et+1," of `columns` missing `fixed='right'` prop."));break}}}function _t(jt){return jt.map(function(Ut){var cn=Ut.fixed,ht=(0,kt.Z)(Ut,Ye),bt=cn;return cn==="left"?bt="right":cn==="right"&&(bt="left"),(0,Xe.Z)({fixed:bt},ht)})}function dn(jt,Ut){var cn=jt.prefixCls,ht=jt.columns,bt=jt.children,Et=jt.expandable,wn=jt.expandedKeys,fn=jt.columnTitle,an=jt.getRowKey,Sn=jt.onTriggerExpand,xn=jt.expandIcon,Cn=jt.rowExpandable,zn=jt.expandIconColumnIndex,ni=jt.direction,Zn=jt.expandRowByClick,wi=jt.columnWidth,Kn=jt.fixed,gi=jt.scrollWidth,si=he.useMemo(function(){return ht||St(bt)},[ht,bt]),Ii=he.useMemo(function(){if(Et){var ji,Ei=si.slice();if(!Ei.includes(Me)){var bi=zn||0;bi>=0&&Ei.splice(bi,0,Me)}var Ji=Ei.indexOf(Me);Ei=Ei.filter(function(Pi,Wi){return Pi!==Me||Wi===Ji});var pi=si[Ji],cr;(Kn==="left"||Kn)&&!zn?cr="left":(Kn==="right"||Kn)&&zn===si.length?cr="right":cr=pi?pi.fixed:null;var Qi=(ji={},(0,Ge.Z)(ji,or,{className:"".concat(cn,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Ge.Z)(ji,"title",fn),(0,Ge.Z)(ji,"fixed",cr),(0,Ge.Z)(ji,"className","".concat(cn,"-row-expand-icon-cell")),(0,Ge.Z)(ji,"width",wi),(0,Ge.Z)(ji,"render",function(Wi,Sr,nr){var xo=an(Sr,nr),Po=wn.has(xo),is=Cn?Cn(Sr):!0,so=xn({prefixCls:cn,expanded:Po,expandable:is,record:Sr,onExpand:Sn});return Zn?he.createElement("span",{onClick:function(Oo){return Oo.stopPropagation()}},so):so}),ji);return Ei.map(function(Pi){return Pi===Me?Qi:Pi})}return si.filter(function(Pi){return Pi!==Me})},[Et,si,an,wn,xn,ni]),Ni=he.useMemo(function(){var ji=Ii;return Ut&&(ji=Ut(ji)),ji.length||(ji=[{render:function(){return null}}]),ji},[Ut,Ii,ni]),Gi=he.useMemo(function(){return ni==="rtl"?_t(Ot(Ni)):Ot(Ni)},[Ni,ni,gi]),ki=Ke(Gi,gi),Ai=(0,Be.Z)(ki,2),ur=Ai[0],Qn=Ai[1];return[Ni,ur,Qn]}var Pn=dn;function mn(jt){var Ut,cn=jt.prefixCls,ht=jt.record,bt=jt.onExpand,Et=jt.expanded,wn=jt.expandable,fn="".concat(cn,"-row-expand-icon");if(!wn)return he.createElement("span",{className:at()(fn,"".concat(cn,"-row-spaced"))});var an=function(xn){bt(ht,xn),xn.stopPropagation()};return he.createElement("span",{className:at()(fn,(Ut={},(0,Ge.Z)(Ut,"".concat(cn,"-row-expanded"),Et),(0,Ge.Z)(Ut,"".concat(cn,"-row-collapsed"),!Et),Ut)),onClick:an})}function sn(jt,Ut,cn){var ht=[];function bt(Et){(Et||[]).forEach(function(wn,fn){ht.push(Ut(wn,fn)),bt(wn[cn])})}return bt(jt),ht}function Nt(jt,Ut,cn){var ht=lr(jt),bt=ht.expandIcon,Et=ht.expandedRowKeys,wn=ht.defaultExpandedRowKeys,fn=ht.defaultExpandAllRows,an=ht.expandedRowRender,Sn=ht.onExpand,xn=ht.onExpandedRowsChange,Cn=ht.childrenColumnName,zn=bt||mn,ni=Cn||"children",Zn=he.useMemo(function(){return an?"row":jt.expandable&&jt.internalHooks===me&&jt.expandable.__PARENT_RENDER_ICON__||Ut.some(function(Gi){return Gi&&(0,Ze.Z)(Gi)==="object"&&Gi[ni]})?"nest":!1},[!!an,Ut]),wi=he.useState(function(){return wn||(fn?sn(Ut,cn,ni):[])}),Kn=(0,Be.Z)(wi,2),gi=Kn[0],si=Kn[1],Ii=he.useMemo(function(){return new Set(Et||gi||[])},[Et,gi]),Ni=he.useCallback(function(Gi){var ki=cn(Gi,Ut.indexOf(Gi)),Ai,ur=Ii.has(ki);ur?(Ii.delete(ki),Ai=(0,yi.Z)(Ii)):Ai=[].concat((0,yi.Z)(Ii),[ki]),si(Ai),Sn&&Sn(!ur,Gi),xn&&xn(Ai)},[cn,Ii,Ut,Sn,xn]);return[ht,Zn,Ii,zn,ni,Ni]}function un(jt,Ut,cn,ht){var bt=jt.map(function(Et,wn){return Wt(wn,wn,jt,Ut,cn,ht==null?void 0:ht[wn])});return(0,Ct.Z)(function(){return bt},[bt],function(Et,wn){return!(0,Le.Z)(Et,wn)})}function Ln(jt){var Ut=(0,he.useRef)(jt),cn=(0,he.useState)({}),ht=(0,Be.Z)(cn,2),bt=ht[1],Et=(0,he.useRef)(null),wn=(0,he.useRef)([]);function fn(an){wn.current.push(an);var Sn=Promise.resolve();Et.current=Sn,Sn.then(function(){if(Et.current===Sn){var xn=wn.current,Cn=Ut.current;wn.current=[],xn.forEach(function(zn){Ut.current=zn(Ut.current)}),Et.current=null,Cn!==Ut.current&&bt({})}})}return(0,he.useEffect)(function(){return function(){Et.current=null}},[]),[Ut.current,fn]}function Dn(jt){var Ut=(0,he.useRef)(jt||null),cn=(0,he.useRef)();function ht(){window.clearTimeout(cn.current)}function bt(wn){Ut.current=wn,ht(),cn.current=window.setTimeout(function(){Ut.current=null,cn.current=void 0},100)}function Et(){return Ut.current}return(0,he.useEffect)(function(){return ht},[]),[bt,Et]}function $t(){var jt=he.useState(-1),Ut=(0,Be.Z)(jt,2),cn=Ut[0],ht=Ut[1],bt=he.useState(-1),Et=(0,Be.Z)(bt,2),wn=Et[0],fn=Et[1],an=he.useCallback(function(Sn,xn){ht(Sn),fn(xn)},[]);return[cn,wn,an]}var rn=Ee(47273),jn=(0,rn.Z)()?window:null;function On(jt,Ut){var cn=(0,Ze.Z)(jt)==="object"?jt:{},ht=cn.offsetHeader,bt=ht===void 0?0:ht,Et=cn.offsetSummary,wn=Et===void 0?0:Et,fn=cn.offsetScroll,an=fn===void 0?0:fn,Sn=cn.getContainer,xn=Sn===void 0?function(){return jn}:Sn,Cn=xn()||jn;return he.useMemo(function(){var zn=!!jt;return{isSticky:zn,stickyClassName:zn?"".concat(Ut,"-sticky-holder"):"",offsetHeader:bt,offsetSummary:wn,offsetScroll:an,container:Cn}},[an,bt,wn,Ut,Cn])}function ei(jt,Ut,cn){var ht=(0,he.useMemo)(function(){for(var bt=[],Et=[],wn=0,fn=0,an=0;an<Ut;an+=1)if(cn==="rtl"){Et[an]=fn,fn+=jt[an]||0;var Sn=Ut-an-1;bt[Sn]=wn,wn+=jt[Sn]||0}else{bt[an]=wn,wn+=jt[an]||0;var xn=Ut-an-1;Et[xn]=fn,fn+=jt[xn]||0}return{left:bt,right:Et}},[jt,Ut,cn]);return ht}var Gn=ei;function ti(jt){var Ut=jt.className,cn=jt.children;return he.createElement("div",{className:Ut},cn)}var Bn=ti,li=Ee(8224),Di=Ee(55468),Ri=function(Ut,cn){var ht,bt,Et=Ut.scrollBodyRef,wn=Ut.onScroll,fn=Ut.offsetScroll,an=Ut.container,Sn=ge(Pe,"prefixCls"),xn=((ht=Et.current)===null||ht===void 0?void 0:ht.scrollWidth)||0,Cn=((bt=Et.current)===null||bt===void 0?void 0:bt.clientWidth)||0,zn=xn&&Cn*(Cn/xn),ni=he.useRef(),Zn=Ln({scrollLeft:0,isHiddenScrollBar:!1}),wi=(0,Be.Z)(Zn,2),Kn=wi[0],gi=wi[1],si=he.useRef({delta:0,x:0}),Ii=he.useState(!1),Ni=(0,Be.Z)(Ii,2),Gi=Ni[0],ki=Ni[1],Ai=function(){ki(!1)},ur=function(Ji){Ji.persist(),si.current.delta=Ji.pageX-Kn.scrollLeft,si.current.x=0,ki(!0),Ji.preventDefault()},Qn=function(Ji){var pi,cr=Ji||((pi=window)===null||pi===void 0?void 0:pi.event),Qi=cr.buttons;if(!Gi||Qi===0){Gi&&ki(!1);return}var Pi=si.current.x+Ji.pageX-si.current.x-si.current.delta;Pi<=0&&(Pi=0),Pi+zn>=Cn&&(Pi=Cn-zn),wn({scrollLeft:Pi/Cn*(xn+2)}),si.current.x=Ji.pageX},ji=function(){if(Et.current){var Ji=(0,Di.os)(Et.current).top,pi=Ji+Et.current.offsetHeight,cr=an===window?document.documentElement.scrollTop+window.innerHeight:(0,Di.os)(an).top+an.clientHeight;pi-(0,$e.Z)()<=cr||Ji>=cr-fn?gi(function(Qi){return(0,Xe.Z)((0,Xe.Z)({},Qi),{},{isHiddenScrollBar:!0})}):gi(function(Qi){return(0,Xe.Z)((0,Xe.Z)({},Qi),{},{isHiddenScrollBar:!1})})}},Ei=function(Ji){gi(function(pi){return(0,Xe.Z)((0,Xe.Z)({},pi),{},{scrollLeft:Ji/xn*Cn||0})})};return he.useImperativeHandle(cn,function(){return{setScrollLeft:Ei}}),he.useEffect(function(){var bi=(0,li.Z)(document.body,"mouseup",Ai,!1),Ji=(0,li.Z)(document.body,"mousemove",Qn,!1);return ji(),function(){bi.remove(),Ji.remove()}},[zn,Gi]),he.useEffect(function(){var bi=(0,li.Z)(an,"scroll",ji,!1),Ji=(0,li.Z)(window,"resize",ji,!1);return function(){bi.remove(),Ji.remove()}},[an]),he.useEffect(function(){Kn.isHiddenScrollBar||gi(function(bi){var Ji=Et.current;return Ji?(0,Xe.Z)((0,Xe.Z)({},bi),{},{scrollLeft:Ji.scrollLeft/Ji.scrollWidth*Ji.clientWidth}):bi})},[Kn.isHiddenScrollBar]),xn<=Cn||!zn||Kn.isHiddenScrollBar?null:he.createElement("div",{style:{height:(0,$e.Z)(),width:Cn,bottom:fn},className:"".concat(Sn,"-sticky-scroll")},he.createElement("div",{onMouseDown:ur,ref:ni,className:at()("".concat(Sn,"-sticky-scroll-bar"),(0,Ge.Z)({},"".concat(Sn,"-sticky-scroll-bar-active"),Gi)),style:{width:"".concat(zn,"px"),transform:"translate3d(".concat(Kn.scrollLeft,"px, 0, 0)")}}))},Mn=he.forwardRef(Ri);function Xi(jt){return null}var Nr=Xi;function zi(jt){return null}var En=zi,Jn="rc-table",fi=[],Si={};function hi(){return"No Data"}function Oi(jt){var Ut,cn=(0,Xe.Z)({rowKey:"key",prefixCls:Jn,emptyText:hi},jt),ht=cn.prefixCls,bt=cn.className,Et=cn.rowClassName,wn=cn.style,fn=cn.data,an=cn.rowKey,Sn=cn.scroll,xn=cn.tableLayout,Cn=cn.direction,zn=cn.title,ni=cn.footer,Zn=cn.summary,wi=cn.caption,Kn=cn.id,gi=cn.showHeader,si=cn.components,Ii=cn.emptyText,Ni=cn.onRow,Gi=cn.onHeaderRow,ki=cn.internalHooks,Ai=cn.transformColumns,ur=cn.internalRefs,Qn=cn.tailor,ji=cn.sticky,Ei=fn||fi,bi=!!Ei.length,Ji=ki===me,pi=he.useCallback(function(fs,Ys){return(0,et.Z)(si,fs)||Ys},[si]),cr=he.useMemo(function(){return typeof an=="function"?an:function(fs){var Ys=fs&&fs[an];return Ys}},[an]),Qi=pi(["body"]),Pi=$t(),Wi=(0,Be.Z)(Pi,3),Sr=Wi[0],nr=Wi[1],xo=Wi[2],Po=Nt(cn,Ei,cr),is=(0,Be.Z)(Po,6),so=is[0],Tr=is[1],Oo=is[2],Or=is[3],Xr=is[4],rs=is[5],Wr=Sn==null?void 0:Sn.x,Er=he.useState(0),Jr=(0,Be.Z)(Er,2),Cr=Jr[0],ao=Jr[1],Lr=Pn((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},cn),so),{},{expandable:!!so.expandedRowRender,columnTitle:so.columnTitle,expandedKeys:Oo,getRowKey:cr,onTriggerExpand:rs,expandIcon:Or,expandIconColumnIndex:so.expandIconColumnIndex,direction:Cn,scrollWidth:Ji&&Qn&&typeof Wr=="number"?Wr:null}),Ji?Ai:null),fo=(0,Be.Z)(Lr,3),Zo=fo[0],Ko=fo[1],Qr=fo[2],Do=Qr!=null?Qr:Wr,Cs=he.useMemo(function(){return{columns:Zo,flattenColumns:Ko}},[Zo,Ko]),Mo=he.useRef(),Jo=he.useRef(),Ss=he.useRef(),Js=he.useRef(),Pl=he.useRef(),Qo=he.useState(!1),qo=(0,Be.Z)(Qo,2),xs=qo[0],Ts=qo[1],ma=he.useState(!1),jo=(0,Be.Z)(ma,2),As=jo[0],La=jo[1],_l=Ln(new Map),Xl=(0,Be.Z)(_l,2),jl=Xl[0],cu=Xl[1],hu=ut(Ko),Jl=hu.map(function(fs){return jl.get(fs)}),gs=he.useMemo(function(){return Jl},[Jl.join("_")]),Ra=Gn(gs,Ko.length,Cn),oa=Sn&&mt(Sn.y),Ns=Sn&&mt(Do)||!!so.fixed,Ql=Ns&&Ko.some(function(fs){var Ys=fs.fixed;return Ys}),_c=he.useRef(),du=On(ji,ht),Zu=du.isSticky,sc=du.offsetHeader,zl=du.offsetSummary,ls=du.offsetScroll,js=du.stickyClassName,wa=du.container,zs=he.useMemo(function(){return Zn==null?void 0:Zn(Ei)},[Zn,Ei]),os=(oa||Zu)&&he.isValidElement(zs)&&zs.type===vt&&zs.props.fixed,Ma,El,Nu;oa&&(El={overflowY:"scroll",maxHeight:Sn.y}),Ns&&(Ma={overflowX:"auto"},oa||(El={overflowY:"hidden"}),Nu={width:Do===!0?"auto":Do,minWidth:"100%"});var mf=he.useCallback(function(fs,Ys){(0,be.Z)(Mo.current)&&cu(function(Va){if(Va.get(fs)!==Ys){var fu=new Map(Va);return fu.set(fs,Ys),fu}return Va})},[]),vn=Dn(null),Bc=(0,Be.Z)(vn,2),ac=Bc[0],vf=Bc[1];function Ph(fs,Ys){Ys&&(typeof Ys=="function"?Ys(fs):Ys.scrollLeft!==fs&&(Ys.scrollLeft=fs,Ys.scrollLeft!==fs&&setTimeout(function(){Ys.scrollLeft=fs},0)))}var oh=(0,ke.Z)(function(fs){var Ys=fs.currentTarget,Va=fs.scrollLeft,fu=Cn==="rtl",pu=typeof Va=="number"?Va:Ys.scrollLeft,Wd=Ys||Si;if(!vf()||vf()===Wd){var zc;ac(Wd),Ph(pu,Jo.current),Ph(pu,Ss.current),Ph(pu,Pl.current),Ph(pu,(zc=_c.current)===null||zc===void 0?void 0:zc.setScrollLeft)}var rd=Ys||Jo.current;if(rd){var Ou=rd.scrollWidth,Ec=rd.clientWidth;if(Ou===Ec){Ts(!1),La(!1);return}fu?(Ts(-pu<Ou-Ec),La(-pu>0)):(Ts(pu>0),La(pu<Ou-Ec))}}),Rd=function(){Ns&&Ss.current?oh({currentTarget:Ss.current}):(Ts(!1),La(!1))},Kp=function(Ys){var Va=Ys.width;Va!==Cr&&(Rd(),ao(Mo.current?Mo.current.offsetWidth:Va))},Ba=he.useRef(!1);he.useEffect(function(){Ba.current&&Rd()},[Ns,fn,Zo.length]),he.useEffect(function(){Ba.current=!0},[]);var nd=he.useState(0),Bd=(0,Be.Z)(nd,2),id=Bd[0],yf=Bd[1],Yf=he.useState(!0),Sf=(0,Be.Z)(Yf,2),Fd=Sf[0],ql=Sf[1];he.useEffect(function(){(!Qn||!Ji)&&(Ss.current instanceof Element?yf((0,$e.o)(Ss.current).width):yf((0,$e.o)(Js.current).width)),ql((0,Ne.G)("position","sticky"))},[]),he.useEffect(function(){Ji&&ur&&(ur.body.current=Ss.current)});var _h=he.useCallback(function(fs){return he.createElement(he.Fragment,null,he.createElement(no,fs),os==="top"&&he.createElement(He,fs,zs))},[os,zs]),xf=he.useCallback(function(fs){return he.createElement(He,fs,zs)},[zs]),Ku=pi(["table"],"table"),Fc=he.useMemo(function(){return xn||(Ql?Do==="max-content"?"auto":"fixed":oa||Zu||Ko.some(function(fs){var Ys=fs.ellipsis;return Ys})?"fixed":"auto")},[oa,Ql,Ko,xn,Zu]),Eh,sh={colWidths:gs,columCount:Ko.length,stickyOffsets:Ra,onHeaderRow:Gi,fixHeader:oa,scroll:Sn},Ll=he.useMemo(function(){return bi?null:typeof Ii=="function"?Ii():Ii},[bi,Ii]),jd=he.createElement(Ci,{data:Ei,measureColumnWidth:oa||Ns||Zu}),zd=he.createElement(Mr,{colWidths:Ko.map(function(fs){var Ys=fs.width;return Ys}),columns:Ko}),eu=wi!=null?he.createElement("caption",{className:"".concat(ht,"-caption")},wi):void 0,Lh=(0,dt.Z)(cn,{data:!0}),Hd=(0,dt.Z)(cn,{aria:!0});if(oa||Zu){var Ud;typeof Qi=="function"?(Ud=Qi(Ei,{scrollbarSize:id,ref:Ss,onScroll:oh}),sh.colWidths=Ko.map(function(fs,Ys){var Va=fs.width,fu=Ys===Ko.length-1?Va-id:Va;return typeof fu=="number"&&!Number.isNaN(fu)?fu:0})):Ud=he.createElement("div",{style:(0,Xe.Z)((0,Xe.Z)({},Ma),El),onScroll:oh,ref:Ss,className:at()("".concat(ht,"-body"))},he.createElement(Ku,(0,le.Z)({style:(0,Xe.Z)((0,Xe.Z)({},Nu),{},{tableLayout:Fc})},Hd),eu,zd,jd,!os&&zs&&he.createElement(He,{stickyOffsets:Ra,flattenColumns:Ko,columns:Zo},zs)));var jc=(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({noData:!Ei.length,maxContentScroll:Ns&&Do==="max-content"},sh),Cs),{},{direction:Cn,stickyClassName:js,onScroll:oh});Eh=he.createElement(he.Fragment,null,gi!==!1&&he.createElement(Ir,(0,le.Z)({},jc,{stickyTopOffset:sc,className:"".concat(ht,"-header"),ref:Jo}),_h),Ud,os&&os!=="top"&&he.createElement(Ir,(0,le.Z)({},jc,{stickyBottomOffset:zl,className:"".concat(ht,"-summary"),ref:Pl}),xf),Zu&&he.createElement(Mn,{ref:_c,offsetScroll:ls,scrollBodyRef:Ss,onScroll:oh,container:wa}))}else Eh=he.createElement("div",{style:(0,Xe.Z)((0,Xe.Z)({},Ma),El),className:at()("".concat(ht,"-content")),onScroll:oh,ref:Ss},he.createElement(Ku,(0,le.Z)({style:(0,Xe.Z)((0,Xe.Z)({},Nu),{},{tableLayout:Fc})},Hd),eu,zd,gi!==!1&&he.createElement(no,(0,le.Z)({},sh,Cs)),jd,zs&&he.createElement(He,{stickyOffsets:Ra,flattenColumns:Ko,columns:Zo},zs)));var fl=he.createElement("div",(0,le.Z)({className:at()(ht,bt,(Ut={},(0,Ge.Z)(Ut,"".concat(ht,"-rtl"),Cn==="rtl"),(0,Ge.Z)(Ut,"".concat(ht,"-ping-left"),xs),(0,Ge.Z)(Ut,"".concat(ht,"-ping-right"),As),(0,Ge.Z)(Ut,"".concat(ht,"-layout-fixed"),xn==="fixed"),(0,Ge.Z)(Ut,"".concat(ht,"-fixed-header"),oa),(0,Ge.Z)(Ut,"".concat(ht,"-fixed-column"),Ql),(0,Ge.Z)(Ut,"".concat(ht,"-scroll-horizontal"),Ns),(0,Ge.Z)(Ut,"".concat(ht,"-has-fix-left"),Ko[0]&&Ko[0].fixed),(0,Ge.Z)(Ut,"".concat(ht,"-has-fix-right"),Ko[Ko.length-1]&&Ko[Ko.length-1].fixed==="right"),Ut)),style:wn,id:Kn,ref:Mo},Lh),zn&&he.createElement(Bn,{className:"".concat(ht,"-title")},zn(Ei)),he.createElement("div",{ref:Js,className:"".concat(ht,"-container")},Eh),ni&&he.createElement(Bn,{className:"".concat(ht,"-footer")},ni(Ei)));Ns&&(fl=he.createElement(Oe.Z,{onResize:Kp},fl));var Gd=un(Ko,Ra,Cn,Zo),ba=he.useMemo(function(){return{scrollX:Do,prefixCls:ht,getComponent:pi,scrollbarSize:id,direction:Cn,fixedInfoList:Gd,isSticky:Zu,supportSticky:Fd,componentWidth:Cr,fixHeader:oa,fixColumn:Ql,horizonScroll:Ns,tableLayout:Fc,rowClassName:Et,expandedRowClassName:so.expandedRowClassName,expandIcon:Or,expandableType:Tr,expandRowByClick:so.expandRowByClick,expandedRowRender:so.expandedRowRender,onTriggerExpand:rs,expandIconColumnIndex:so.expandIconColumnIndex,indentSize:so.indentSize,allColumnsFixedLeft:Ko.every(function(fs){return fs.fixed==="left"}),emptyNode:Ll,columns:Zo,flattenColumns:Ko,onColumnResize:mf,hoverStartRow:Sr,hoverEndRow:nr,onHover:xo,rowExpandable:so.rowExpandable,onRow:Ni,getRowKey:cr,expandedKeys:Oo,childrenColumnName:Xr}},[Do,ht,pi,id,Cn,Gd,Zu,Fd,Cr,oa,Ql,Ns,Fc,Et,so.expandedRowClassName,Or,Tr,so.expandRowByClick,so.expandedRowRender,rs,so.expandIconColumnIndex,so.indentSize,Ll,Zo,Ko,mf,Sr,nr,xo,so.rowExpandable,Ni,cr,Oo,Xr]);return he.createElement(Pe.Provider,{value:ba},fl)}function tr(jt){return se(Oi,jt)}var Fi=tr();Fi.EXPAND_COLUMN=Me,Fi.INTERNAL_HOOKS=me,Fi.Column=Nr,Fi.ColumnGroup=En,Fi.Summary=Ie;var Hi=Fi,mr=Ee(45680),Rn=xe(null),Br=xe(null);function Nn(jt,Ut,cn){var ht=Ut||1;return cn[jt+ht]-(cn[jt]||0)}function vr(jt){var Ut=jt.rowInfo,cn=jt.column,ht=jt.colIndex,bt=jt.indent,Et=jt.index,wn=jt.renderIndex,fn=jt.record,an=jt.style,Sn=jt.className,xn=jt.inverse,Cn=jt.getHeight,zn=cn.render,ni=cn.dataIndex,Zn=cn.className,wi=cn.width,Kn=ge(Br,["columnsOffset"]),gi=Kn.columnsOffset,si=gn(Ut,cn,ht,bt,Et),Ii=si.key,Ni=si.fixedInfo,Gi=si.appendCellNode,ki=si.additionalCellProps,Ai=ki.style,ur=ki.colSpan,Qn=ur===void 0?1:ur,ji=ki.rowSpan,Ei=ji===void 0?1:ji,bi=ht-1,Ji=Nn(bi,Qn,gi),pi=Qn>1?wi-Ji:0,cr=(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},Ai),an),{},{flex:"0 0 ".concat(Ji,"px"),width:"".concat(Ji,"px"),marginRight:pi,pointerEvents:"auto"}),Qi=he.useMemo(function(){return xn?Ei<=1:Qn===0||Ei===0||Ei>1},[Ei,Qn,xn]);Qi?cr.visibility="hidden":xn&&(cr.height=Cn==null?void 0:Cn(Ei));var Pi=Qi?function(){return null}:zn,Wi={};return(Ei===0||Qn===0)&&(Wi.rowSpan=1,Wi.colSpan=1),he.createElement(bn,(0,le.Z)({className:at()(Zn,Sn),ellipsis:cn.ellipsis,align:cn.align,scope:cn.rowScope,component:"div",prefixCls:Ut.prefixCls,key:Ii,record:fn,index:Et,renderIndex:wn,dataIndex:ni,render:Pi,shouldCellUpdate:cn.shouldCellUpdate},Ni,{appendNode:Gi,additionalProps:(0,Xe.Z)((0,Xe.Z)({},ki),{},{style:cr},Wi)}))}var So=vr,Dr=["data","index","className","rowKey","style","extra","getHeight"],Co=he.forwardRef(function(jt,Ut){var cn=jt.data,ht=jt.index,bt=jt.className,Et=jt.rowKey,wn=jt.style,fn=jt.extra,an=jt.getHeight,Sn=(0,kt.Z)(jt,Dr),xn=cn.record,Cn=cn.indent,zn=cn.index,ni=ge(Pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Zn=ni.scrollX,wi=ni.flattenColumns,Kn=ni.prefixCls,gi=ni.fixColumn,si=ni.componentWidth,Ii=ln(xn,Et,ht,Cn),Ni=Ii.rowSupportExpand,Gi=Ii.expanded,ki=Ii.rowProps,Ai=Ii.expandedRowRender,ur=Ii.expandedRowClassName,Qn;if(Ni&&Gi){var ji=Ai(xn,ht,Cn+1,Gi),Ei=ur==null?void 0:ur(xn,ht,Cn),bi={};gi&&(bi={style:(0,Ge.Z)({},"--virtual-width","".concat(si,"px"))});var Ji="".concat(Kn,"-expanded-row-cell");Qn=he.createElement("div",{className:at()("".concat(Kn,"-expanded-row"),"".concat(Kn,"-expanded-row-level-").concat(Cn+1),Ei)},he.createElement(bn,{component:"div",prefixCls:Kn,className:at()(Ji,(0,Ge.Z)({},"".concat(Ji,"-fixed"),gi)),additionalProps:bi},ji))}var pi=(0,Xe.Z)((0,Xe.Z)({},wn),{},{width:Zn});fn&&(pi.position="absolute",pi.pointerEvents="none");var cr=he.createElement("div",(0,le.Z)({},ki,Sn,{ref:Ni?null:Ut,className:at()(bt,"".concat(Kn,"-row"),ki==null?void 0:ki.className,(0,Ge.Z)({},"".concat(Kn,"-row-extra"),fn)),style:(0,Xe.Z)((0,Xe.Z)({},pi),ki==null?void 0:ki.style)}),wi.map(function(Qi,Pi){return he.createElement(So,{key:Pi,rowInfo:Ii,column:Qi,colIndex:Pi,indent:Cn,index:ht,renderIndex:zn,record:xn,inverse:fn,getHeight:an})}));return Ni?he.createElement("div",{ref:Ut},cr,Qn):cr}),ho=ue(Co),Yi=ho,Ui=he.forwardRef(function(jt,Ut){var cn=jt.data,ht=jt.onScroll,bt=ge(Pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Et=bt.flattenColumns,wn=bt.onColumnResize,fn=bt.getRowKey,an=bt.expandedKeys,Sn=bt.prefixCls,xn=bt.childrenColumnName,Cn=bt.emptyNode,zn=bt.scrollX,ni=ge(Rn),Zn=ni.scrollY,wi=ni.listItemHeight,Kn=he.useRef(),gi=At(cn,xn,an,fn),si=he.useMemo(function(){var Qn=0;return Et.map(function(ji){var Ei=ji.width,bi=ji.key;return Qn+=Ei,[bi,Ei,Qn]})},[Et]),Ii=he.useMemo(function(){return si.map(function(Qn){return Qn[2]})},[si]);he.useEffect(function(){si.forEach(function(Qn){var ji=(0,Be.Z)(Qn,2),Ei=ji[0],bi=ji[1];wn(Ei,bi)})},[si]),he.useImperativeHandle(Ut,function(){var Qn={};return Object.defineProperty(Qn,"scrollLeft",{get:function(){var Ei;return((Ei=Kn.current)===null||Ei===void 0?void 0:Ei.getScrollInfo().x)||0},set:function(Ei){var bi;(bi=Kn.current)===null||bi===void 0||bi.scrollTo({left:Ei})}}),Qn});var Ni=function(ji,Ei){var bi,Ji=(bi=gi[Ei])===null||bi===void 0?void 0:bi.record,pi=ji.onCell;if(pi){var cr,Qi=pi(Ji,Ei);return(cr=Qi==null?void 0:Qi.rowSpan)!==null&&cr!==void 0?cr:1}return 1},Gi=function(ji){var Ei=ji.start,bi=ji.end,Ji=ji.getSize,pi=ji.offsetY;if(bi<0)return null;for(var cr=Et.filter(function(Wr){return Ni(Wr,Ei)===0}),Qi=Ei,Pi=function(Er){if(cr=cr.filter(function(Jr){return Ni(Jr,Er)===0}),!cr.length)return Qi=Er,"break"},Wi=Ei;Wi>=0;Wi-=1){var Sr=Pi(Wi);if(Sr==="break")break}for(var nr=Et.filter(function(Wr){return Ni(Wr,bi)!==1}),xo=bi,Po=function(Er){if(nr=nr.filter(function(Jr){return Ni(Jr,Er)!==1}),!nr.length)return xo=Math.max(Er-1,bi),"break"},is=bi;is<gi.length;is+=1){var so=Po(is);if(so==="break")break}for(var Tr=[],Oo=function(Er){var Jr=gi[Er];if(!Jr)return"continue";Et.some(function(Cr){return Ni(Cr,Er)>1})&&Tr.push(Er)},Or=Qi;Or<=xo;Or+=1)var Xr=Oo(Or);var rs=Tr.map(function(Wr){var Er=gi[Wr],Jr=fn(Er.record,Wr),Cr=function(fo){var Zo=Wr+fo-1,Ko=fn(gi[Zo].record,Zo),Qr=Ji(Jr,Ko);return Qr.bottom-Qr.top},ao=Ji(Jr);return he.createElement(Yi,{key:Wr,data:Er,rowKey:Jr,index:Wr,style:{top:-pi+ao.top},extra:!0,getHeight:Cr})});return rs},ki=he.useMemo(function(){return{columnsOffset:Ii}},[Ii]),Ai="".concat(Sn,"-tbody"),ur;return gi.length?ur=he.createElement(mr.Z,{fullHeight:!1,ref:Kn,className:at()(Ai,"".concat(Ai,"-virtual")),height:Zn,itemHeight:wi||24,data:gi,itemKey:function(ji){return fn(ji.record)},scrollWidth:zn,onVirtualScroll:function(ji){var Ei=ji.x;ht({scrollLeft:Ei})},extraRender:Gi},function(Qn,ji,Ei){var bi=fn(Qn.record,ji);return he.createElement(Yi,(0,le.Z)({data:Qn,rowKey:bi,index:ji},Ei))}):ur=he.createElement("div",{className:at()("".concat(Sn,"-placeholder"))},he.createElement(bn,{component:"div",prefixCls:Sn},Cn)),he.createElement(Br.Provider,{value:ki},ur)}),hr=ue(Ui),Pr=hr,ci=function(Ut,cn){var ht=cn.ref,bt=cn.onScroll;return he.createElement(Pr,{ref:ht,data:Ut,onScroll:bt})},Mt=100;function Ur(jt){var Ut=jt.columns,cn=jt.scroll,ht=jt.prefixCls,bt=ht===void 0?Jn:ht,Et=jt.className,wn=jt.listItemHeight,fn=cn||{},an=fn.x,Sn=fn.y;typeof an!="number"&&(an=((Ut||[]).length+1)*Mt),typeof Sn!="number"&&(Sn=500);var xn=he.useMemo(function(){return{scrollY:Sn,listItemHeight:wn}},[Sn,wn]);return he.createElement(Rn.Provider,{value:xn},he.createElement(Hi,(0,le.Z)({},jt,{className:at()(Et,"".concat(bt,"-virtual")),scroll:(0,Xe.Z)((0,Xe.Z)({},cn),{},{x:an}),components:{body:ci},columns:Ut,internalHooks:me,tailor:!0})))}function Hr(jt){return se(Ur,jt)}var ts=Hr(),Ao=null;function ss(jt){return null}var _r=ss;function fr(jt){return null}var Kr=fr,pr=Ee(2738),eo=Ee(68031),Yo=Ee(36355),sr=Ee(93891),Ki=Ee(19716),Xn=Ee(8628),ar=Ee(31724),to=Ee(58421),Ro=Ee(71418),Bo=Ee(88088);function Xo(jt){return function(cn){let{prefixCls:ht,onExpand:bt,record:Et,expanded:wn,expandable:fn}=cn;const an=`${ht}-row-expand-icon`;return he.createElement("button",{type:"button",onClick:Sn=>{bt(Et,Sn),Sn.stopPropagation()},className:at()(an,{[`${an}-spaced`]:!fn,[`${an}-expanded`]:fn&&wn,[`${an}-collapsed`]:fn&&!wn}),"aria-label":wn?jt.collapse:jt.expand,"aria-expanded":wn})}}var as=Xo;function Ho(jt,Ut){return"key"in jt&&jt.key!==void 0&&jt.key!==null?jt.key:jt.dataIndex?Array.isArray(jt.dataIndex)?jt.dataIndex.join("."):jt.dataIndex:Ut}function ia(jt,Ut){return Ut?`${Ut}-${jt}`:`${jt}`}function _s(jt,Ut){return typeof jt=="function"?jt(Ut):jt}function la(jt,Ut){const cn=_s(jt,Ut);return Object.prototype.toString.call(cn)==="[object Object]"?"":cn}var kn={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"},Is=kn,Pu=Ee(7657),Ua=function(Ut,cn){return he.createElement(Pu.Z,(0,le.Z)({},Ut,{ref:cn,icon:Is}))},Sa=he.forwardRef(Ua),us=Sa,Ws=Ee(56762);function _o(jt){const Ut=he.useRef(jt),cn=(0,Ws.Z)();return[()=>Ut.current,ht=>{Ut.current=ht,cn()}]}var No=Ee(3113),Lo=Ee(24905),ua=Ee(38854),br=Ee(64165),uo=Ee(20834),Yr=Ee(40875),Li=Ee(5112),Es=Ee(17574),Ls=Ee(47472),xa=Ee(92832);function xl(jt){let{value:Ut,onChange:cn,filterSearch:ht,tablePrefixCls:bt,locale:Et}=jt;return ht?he.createElement("div",{className:`${bt}-filter-dropdown-search`},he.createElement(xa.default,{prefix:he.createElement(Ls.Z,null),placeholder:Et.filterSearchPlaceholder,onChange:cn,value:Ut,htmlSize:1,className:`${bt}-filter-dropdown-search-input`})):null}var Il=xl,vi=Ee(10228);const ms=jt=>{const{keyCode:Ut}=jt;Ut===vi.Z.ENTER&&jt.stopPropagation()};var qa=he.forwardRef((jt,Ut)=>he.createElement("div",{className:jt.className,onClick:cn=>cn.stopPropagation(),onKeyDown:ms,ref:Ut},jt.children));function wl(jt){let Ut=[];return(jt||[]).forEach(cn=>{let{value:ht,children:bt}=cn;Ut.push(ht),bt&&(Ut=[].concat((0,yi.Z)(Ut),(0,yi.Z)(wl(bt))))}),Ut}function Dl(jt){return jt.some(Ut=>{let{children:cn}=Ut;return cn})}function jr(jt,Ut){return typeof Ut=="string"||typeof Ut=="number"?Ut==null?void 0:Ut.toString().toLowerCase().includes(jt.trim().toLowerCase()):!1}function nc(jt){let{filters:Ut,prefixCls:cn,filteredKeys:ht,filterMultiple:bt,searchValue:Et,filterSearch:wn}=jt;return Ut.map((fn,an)=>{const Sn=String(fn.value);if(fn.children)return{key:Sn||an,label:fn.text,popupClassName:`${cn}-dropdown-submenu`,children:nc({filters:fn.children,prefixCls:cn,filteredKeys:ht,filterMultiple:bt,searchValue:Et,filterSearch:wn})};const xn=bt?Lo.default:Li.ZP,Cn={key:fn.value!==void 0?Sn:an,label:he.createElement(he.Fragment,null,he.createElement(xn,{checked:ht.includes(Sn)}),he.createElement("span",null,fn.text))};return Et.trim()?typeof wn=="function"?wn(Et,fn)?Cn:null:jr(Et,fn.text)?Cn:null:Cn})}function Ia(jt){var Ut,cn;const{tablePrefixCls:ht,prefixCls:bt,column:Et,dropdownPrefixCls:wn,columnKey:fn,filterMultiple:an,filterMode:Sn="menu",filterSearch:xn=!1,filterState:Cn,triggerFilter:zn,locale:ni,children:Zn,getPopupContainer:wi}=jt,{filterDropdownOpen:Kn,onFilterDropdownOpenChange:gi,filterResetToDefaultFilteredValue:si,defaultFilteredValue:Ii,filterDropdownVisible:Ni,onFilterDropdownVisibleChange:Gi}=Et,[ki,Ai]=he.useState(!1),ur=!!(Cn&&(!((Ut=Cn.filteredKeys)===null||Ut===void 0)&&Ut.length||Cn.forceFiltered)),Qn=Lr=>{Ai(Lr),gi==null||gi(Lr),Gi==null||Gi(Lr)},ji=(cn=Kn!=null?Kn:Ni)!==null&&cn!==void 0?cn:ki,Ei=Cn==null?void 0:Cn.filteredKeys,[bi,Ji]=_o(Ei||[]),pi=Lr=>{let{selectedKeys:fo}=Lr;Ji(fo)},cr=(Lr,fo)=>{let{node:Zo,checked:Ko}=fo;pi(an?{selectedKeys:Lr}:{selectedKeys:Ko&&Zo.key?[Zo.key]:[]})};he.useEffect(()=>{ki&&pi({selectedKeys:Ei||[]})},[Ei]);const[Qi,Pi]=he.useState([]),Wi=Lr=>{Pi(Lr)},[Sr,nr]=he.useState(""),xo=Lr=>{const{value:fo}=Lr.target;nr(fo)};he.useEffect(()=>{ki||nr("")},[ki]);const Po=Lr=>{const fo=Lr&&Lr.length?Lr:null;if(fo===null&&(!Cn||!Cn.filteredKeys)||(0,Le.Z)(fo,Cn==null?void 0:Cn.filteredKeys,!0))return null;zn({column:Et,key:fn,filteredKeys:fo})},is=()=>{Qn(!1),Po(bi())},so=function(){let{confirm:Lr,closeDropdown:fo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Lr&&Po([]),fo&&Qn(!1),nr(""),Ji(si?(Ii||[]).map(Zo=>String(Zo)):[])},Tr=function(){let{closeDropdown:Lr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Lr&&Qn(!1),Po(bi())},Oo=Lr=>{Lr&&Ei!==void 0&&Ji(Ei||[]),Qn(Lr),!Lr&&!Et.filterDropdown&&is()},Or=at()({[`${wn}-menu-without-submenu`]:!Dl(Et.filters||[])}),Xr=Lr=>{if(Lr.target.checked){const fo=wl(Et==null?void 0:Et.filters).map(Zo=>String(Zo));Ji(fo)}else Ji([])},rs=Lr=>{let{filters:fo}=Lr;return(fo||[]).map((Zo,Ko)=>{const Qr=String(Zo.value),Do={title:Zo.text,key:Zo.value!==void 0?Qr:Ko};return Zo.children&&(Do.children=rs({filters:Zo.children})),Do})},Wr=Lr=>{var fo;return Object.assign(Object.assign({},Lr),{text:Lr.title,value:Lr.key,children:((fo=Lr.children)===null||fo===void 0?void 0:fo.map(Zo=>Wr(Zo)))||[]})};let Er;if(typeof Et.filterDropdown=="function")Er=Et.filterDropdown({prefixCls:`${wn}-custom`,setSelectedKeys:Lr=>pi({selectedKeys:Lr}),selectedKeys:bi(),confirm:Tr,clearFilters:so,filters:Et.filters,visible:ji,close:()=>{Qn(!1)}});else if(Et.filterDropdown)Er=Et.filterDropdown;else{const Lr=bi()||[],fo=()=>(Et.filters||[]).length===0?he.createElement(br.Z,{image:br.Z.PRESENTED_IMAGE_SIMPLE,description:ni.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Sn==="tree"?he.createElement(he.Fragment,null,he.createElement(Il,{filterSearch:xn,value:Sr,onChange:xo,tablePrefixCls:ht,locale:ni}),he.createElement("div",{className:`${ht}-filter-dropdown-tree`},an?he.createElement(Lo.default,{checked:Lr.length===wl(Et.filters).length,indeterminate:Lr.length>0&&Lr.length<wl(Et.filters).length,className:`${ht}-filter-dropdown-checkall`,onChange:Xr},ni.filterCheckall):null,he.createElement(Es.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:an,checkStrictly:!an,className:`${wn}-menu`,onCheck:cr,checkedKeys:Lr,selectedKeys:Lr,showIcon:!1,treeData:rs({filters:Et.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Sr.trim()?Ko=>typeof xn=="function"?xn(Sr,Wr(Ko)):jr(Sr,Ko.title):void 0}))):he.createElement(he.Fragment,null,he.createElement(Il,{filterSearch:xn,value:Sr,onChange:xo,tablePrefixCls:ht,locale:ni}),he.createElement(uo.default,{selectable:!0,multiple:an,prefixCls:`${wn}-menu`,className:Or,onSelect:pi,onDeselect:pi,selectedKeys:Lr,getPopupContainer:wi,openKeys:Qi,onOpenChange:Wi,items:nc({filters:Et.filters||[],filterSearch:xn,prefixCls:bt,filteredKeys:bi(),filterMultiple:an,searchValue:Sr})})),Zo=()=>si?(0,Le.Z)((Ii||[]).map(Ko=>String(Ko)),Lr,!0):Lr.length===0;Er=he.createElement(he.Fragment,null,fo(),he.createElement("div",{className:`${bt}-dropdown-btns`},he.createElement(No.ZP,{type:"link",size:"small",disabled:Zo(),onClick:()=>so()},ni.filterReset),he.createElement(No.ZP,{type:"primary",size:"small",onClick:is},ni.filterConfirm)))}Et.filterDropdown&&(Er=he.createElement(Yr.J,{selectable:void 0},Er));const Jr=()=>he.createElement(qa,{className:`${bt}-dropdown`},Er);let Cr;typeof Et.filterIcon=="function"?Cr=Et.filterIcon(ur):Et.filterIcon?Cr=Et.filterIcon:Cr=he.createElement(us,null);const{direction:ao}=he.useContext(Yo.E_);return he.createElement("div",{className:`${bt}-column`},he.createElement("span",{className:`${ht}-column-title`},Zn),he.createElement(ua.Z,{dropdownRender:Jr,trigger:["click"],open:ji,onOpenChange:Oo,getPopupContainer:wi,placement:ao==="rtl"?"bottomLeft":"bottomRight"},he.createElement("span",{role:"button",tabIndex:-1,className:at()(`${bt}-trigger`,{active:ur}),onClick:Lr=>{Lr.stopPropagation()}},Cr)))}var Ga=Ia;function Na(jt,Ut,cn){let ht=[];return(jt||[]).forEach((bt,Et)=>{var wn;const fn=ia(Et,cn);if(bt.filters||"filterDropdown"in bt||"onFilter"in bt)if("filteredValue"in bt){let an=bt.filteredValue;"filterDropdown"in bt||(an=(wn=an==null?void 0:an.map(String))!==null&&wn!==void 0?wn:an),ht.push({column:bt,key:Ho(bt,fn),filteredKeys:an,forceFiltered:bt.filtered})}else ht.push({column:bt,key:Ho(bt,fn),filteredKeys:Ut&&bt.defaultFilteredValue?bt.defaultFilteredValue:void 0,forceFiltered:bt.filtered});"children"in bt&&(ht=[].concat((0,yi.Z)(ht),(0,yi.Z)(Na(bt.children,Ut,fn))))}),ht}function $l(jt,Ut,cn,ht,bt,Et,wn,fn){return cn.map((an,Sn)=>{const xn=ia(Sn,fn),{filterMultiple:Cn=!0,filterMode:zn,filterSearch:ni}=an;let Zn=an;if(Zn.filters||Zn.filterDropdown){const wi=Ho(Zn,xn),Kn=ht.find(gi=>{let{key:si}=gi;return wi===si});Zn=Object.assign(Object.assign({},Zn),{title:gi=>he.createElement(Ga,{tablePrefixCls:jt,prefixCls:`${jt}-filter`,dropdownPrefixCls:Ut,column:Zn,columnKey:wi,filterState:Kn,filterMultiple:Cn,filterMode:zn,filterSearch:ni,triggerFilter:Et,locale:bt,getPopupContainer:wn},_s(an.title,gi))})}return"children"in Zn&&(Zn=Object.assign(Object.assign({},Zn),{children:$l(jt,Ut,Zn.children,ht,bt,Et,wn,xn)})),Zn})}function _u(jt){const Ut={};return jt.forEach(cn=>{let{key:ht,filteredKeys:bt,column:Et}=cn;const{filters:wn,filterDropdown:fn}=Et;if(fn)Ut[ht]=bt||null;else if(Array.isArray(bt)){const an=wl(wn);Ut[ht]=an.filter(Sn=>bt.includes(String(Sn)))}else Ut[ht]=null}),Ut}function Wa(jt,Ut){return Ut.reduce((cn,ht)=>{const{column:{onFilter:bt,filters:Et},filteredKeys:wn}=ht;return bt&&wn&&wn.length?cn.filter(fn=>wn.some(an=>{const Sn=wl(Et),xn=Sn.findIndex(zn=>String(zn)===String(an)),Cn=xn!==-1?Sn[xn]:an;return bt(Cn,fn)})):cn},jt)}const Za=jt=>jt.flatMap(Ut=>"children"in Ut?[Ut].concat((0,yi.Z)(Za(Ut.children||[]))):[Ut]);function Uu(jt){let{prefixCls:Ut,dropdownPrefixCls:cn,mergedColumns:ht,onFilterChange:bt,getPopupContainer:Et,locale:wn}=jt;const fn=he.useMemo(()=>Za(ht||[]),[ht]),[an,Sn]=he.useState(()=>Na(fn,!0)),xn=he.useMemo(()=>{const Zn=Na(fn,!1);if(Zn.length===0)return Zn;let wi=!0,Kn=!0;if(Zn.forEach(gi=>{let{filteredKeys:si}=gi;si!==void 0?wi=!1:Kn=!1}),wi){const gi=(fn||[]).map((si,Ii)=>Ho(si,ia(Ii)));return an.filter(si=>{let{key:Ii}=si;return gi.includes(Ii)}).map(si=>{const Ii=fn[gi.findIndex(Ni=>Ni===si.key)];return Object.assign(Object.assign({},si),{column:Object.assign(Object.assign({},si.column),Ii),forceFiltered:Ii.filtered})})}return Zn},[fn,an]),Cn=he.useMemo(()=>_u(xn),[xn]),zn=Zn=>{const wi=xn.filter(Kn=>{let{key:gi}=Kn;return gi!==Zn.key});wi.push(Zn),Sn(wi),bt(_u(wi),wi)};return[Zn=>$l(Ut,cn,Zn,xn,wn,zn,Et),xn,Cn]}var yc=Uu;function Eu(jt,Ut,cn){const ht=he.useRef({});function bt(Et){if(!ht.current||ht.current.data!==jt||ht.current.childrenColumnName!==Ut||ht.current.getRowKey!==cn){let fn=function(an){an.forEach((Sn,xn)=>{const Cn=cn(Sn,xn);wn.set(Cn,Sn),Sn&&typeof Sn=="object"&&Ut in Sn&&fn(Sn[Ut]||[])})};const wn=new Map;fn(jt),ht.current={data:jt,childrenColumnName:Ut,kvMap:wn,getRowKey:cn}}return ht.current.kvMap.get(Et)}return[bt]}var Rl=Ee(50371),Sc=function(jt,Ut){var cn={};for(var ht in jt)Object.prototype.hasOwnProperty.call(jt,ht)&&Ut.indexOf(ht)<0&&(cn[ht]=jt[ht]);if(jt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,ht=Object.getOwnPropertySymbols(jt);bt<ht.length;bt++)Ut.indexOf(ht[bt])<0&&Object.prototype.propertyIsEnumerable.call(jt,ht[bt])&&(cn[ht[bt]]=jt[ht[bt]]);return cn};const Gu=10;function Lu(jt,Ut){const cn={current:jt.current,pageSize:jt.pageSize};return Object.keys(Ut&&typeof Ut=="object"?Ut:{}).forEach(bt=>{const Et=jt[bt];typeof Et!="function"&&(cn[bt]=Et)}),cn}function bl(jt,Ut,cn){const ht=cn&&typeof cn=="object"?cn:{},{total:bt=0}=ht,Et=Sc(ht,["total"]),[wn,fn]=(0,he.useState)(()=>({current:"defaultCurrent"in Et?Et.defaultCurrent:1,pageSize:"defaultPageSize"in Et?Et.defaultPageSize:Gu})),an=(0,Rl.Z)(wn,Et,{total:bt>0?bt:jt}),Sn=Math.ceil((bt||jt)/an.pageSize);an.current>Sn&&(an.current=Sn||1);const xn=(zn,ni)=>{fn({current:zn!=null?zn:1,pageSize:ni||an.pageSize})},Cn=(zn,ni)=>{var Zn;cn&&((Zn=cn.onChange)===null||Zn===void 0||Zn.call(cn,zn,ni)),xn(zn,ni),Ut(zn,ni||(an==null?void 0:an.pageSize))};return cn===!1?[{},()=>{}]:[Object.assign(Object.assign({},an),{onChange:Cn}),xn]}var th=bl,xc=Ee(84105),lu=Ee(35654),oo=Ee(90782),Uo=Ee(71430),ka=Ee(18929);const ra={},Ds="SELECT_ALL",bs="SELECT_INVERT",ks="SELECT_NONE",Zs=[],Ks=(jt,Ut)=>{let cn=[];return(Ut||[]).forEach(ht=>{cn.push(ht),ht&&typeof ht=="object"&&jt in ht&&(cn=[].concat((0,yi.Z)(cn),(0,yi.Z)(Ks(jt,ht[jt]))))}),cn};var Bl=(jt,Ut)=>{const{preserveSelectedRowKeys:cn,selectedRowKeys:ht,defaultSelectedRowKeys:bt,getCheckboxProps:Et,onChange:wn,onSelect:fn,onSelectAll:an,onSelectInvert:Sn,onSelectNone:xn,onSelectMultiple:Cn,columnWidth:zn,type:ni,selections:Zn,fixed:wi,renderCell:Kn,hideSelectAll:gi,checkStrictly:si=!0}=Ut||{},{prefixCls:Ii,data:Ni,pageData:Gi,getRecordByKey:ki,getRowKey:Ai,expandType:ur,childrenColumnName:Qn,locale:ji,getPopupContainer:Ei}=jt,[bi,Ji]=(0,ka.Z)(ht||bt||Zs,{value:ht}),pi=he.useRef(new Map),cr=(0,he.useCallback)(Wr=>{if(cn){const Er=new Map;Wr.forEach(Jr=>{let Cr=ki(Jr);!Cr&&pi.current.has(Jr)&&(Cr=pi.current.get(Jr)),Er.set(Jr,Cr)}),pi.current=Er}},[ki,cn]);he.useEffect(()=>{cr(bi)},[bi]);const{keyEntities:Qi}=(0,he.useMemo)(()=>{if(si)return{keyEntities:null};let Wr=Ni;if(cn){const Er=new Set(Ni.map((Cr,ao)=>Ai(Cr,ao))),Jr=Array.from(pi.current).reduce((Cr,ao)=>{let[Lr,fo]=ao;return Er.has(Lr)?Cr:Cr.concat(fo)},[]);Wr=[].concat((0,yi.Z)(Wr),(0,yi.Z)(Jr))}return(0,Uo.I8)(Wr,{externalGetKey:Ai,childrenPropName:Qn})},[Ni,Ai,si,Qn,cn]),Pi=(0,he.useMemo)(()=>Ks(Qn,Gi),[Qn,Gi]),Wi=(0,he.useMemo)(()=>{const Wr=new Map;return Pi.forEach((Er,Jr)=>{const Cr=Ai(Er,Jr),ao=(Et?Et(Er):null)||{};Wr.set(Cr,ao)}),Wr},[Pi,Ai,Et]),Sr=(0,he.useCallback)(Wr=>{var Er;return!!(!((Er=Wi.get(Ai(Wr)))===null||Er===void 0)&&Er.disabled)},[Wi,Ai]),[nr,xo]=(0,he.useMemo)(()=>{if(si)return[bi||[],[]];const{checkedKeys:Wr,halfCheckedKeys:Er}=(0,oo.S)(bi,!0,Qi,Sr);return[Wr||[],Er]},[bi,si,Qi,Sr]),Po=(0,he.useMemo)(()=>{const Wr=ni==="radio"?nr.slice(0,1):nr;return new Set(Wr)},[nr,ni]),is=(0,he.useMemo)(()=>ni==="radio"?new Set:new Set(xo),[xo,ni]),[so,Tr]=(0,he.useState)(null);he.useEffect(()=>{Ut||Ji(Zs)},[!!Ut]);const Oo=(0,he.useCallback)((Wr,Er)=>{let Jr,Cr;cr(Wr),cn?(Jr=Wr,Cr=Wr.map(ao=>pi.current.get(ao))):(Jr=[],Cr=[],Wr.forEach(ao=>{const Lr=ki(ao);Lr!==void 0&&(Jr.push(ao),Cr.push(Lr))})),Ji(Jr),wn==null||wn(Jr,Cr,{type:Er})},[Ji,ki,wn,cn]),Or=(0,he.useCallback)((Wr,Er,Jr,Cr)=>{if(fn){const ao=Jr.map(Lr=>ki(Lr));fn(ki(Wr),Er,ao,Cr)}Oo(Jr,"single")},[fn,ki,Oo]),Xr=(0,he.useMemo)(()=>!Zn||gi?null:(Zn===!0?[Ds,bs,ks]:Zn).map(Er=>Er===Ds?{key:"all",text:ji.selectionAll,onSelect(){Oo(Ni.map((Jr,Cr)=>Ai(Jr,Cr)).filter(Jr=>{const Cr=Wi.get(Jr);return!(Cr!=null&&Cr.disabled)||Po.has(Jr)}),"all")}}:Er===bs?{key:"invert",text:ji.selectInvert,onSelect(){const Jr=new Set(Po);Gi.forEach((ao,Lr)=>{const fo=Ai(ao,Lr),Zo=Wi.get(fo);Zo!=null&&Zo.disabled||(Jr.has(fo)?Jr.delete(fo):Jr.add(fo))});const Cr=Array.from(Jr);Sn&&Sn(Cr),Oo(Cr,"invert")}}:Er===ks?{key:"none",text:ji.selectNone,onSelect(){xn==null||xn(),Oo(Array.from(Po).filter(Jr=>{const Cr=Wi.get(Jr);return Cr==null?void 0:Cr.disabled}),"none")}}:Er).map(Er=>Object.assign(Object.assign({},Er),{onSelect:function(){for(var Jr,Cr,ao=arguments.length,Lr=new Array(ao),fo=0;fo<ao;fo++)Lr[fo]=arguments[fo];(Cr=Er.onSelect)===null||Cr===void 0||(Jr=Cr).call.apply(Jr,[Er].concat(Lr)),Tr(null)}})),[Zn,Po,Gi,Ai,Sn,Oo]);return[(0,he.useCallback)(Wr=>{var Er;if(!Ut)return Wr.filter(Qo=>Qo!==ra);let Jr=(0,yi.Z)(Wr);const Cr=new Set(Po),ao=Pi.map(Ai).filter(Qo=>!Wi.get(Qo).disabled),Lr=ao.every(Qo=>Cr.has(Qo)),fo=ao.some(Qo=>Cr.has(Qo)),Zo=()=>{const Qo=[];Lr?ao.forEach(xs=>{Cr.delete(xs),Qo.push(xs)}):ao.forEach(xs=>{Cr.has(xs)||(Cr.add(xs),Qo.push(xs))});const qo=Array.from(Cr);an==null||an(!Lr,qo.map(xs=>ki(xs)),Qo.map(xs=>ki(xs))),Oo(qo,"all"),Tr(null)};let Ko;if(ni!=="radio"){let Qo;if(Xr){const jo={getPopupContainer:Ei,items:Xr.map((As,La)=>{const{key:_l,text:Xl,onSelect:jl}=As;return{key:_l!=null?_l:La,onClick:()=>{jl==null||jl(ao)},label:Xl}})};Qo=he.createElement("div",{className:`${Ii}-selection-extra`},he.createElement(ua.Z,{menu:jo,getPopupContainer:Ei},he.createElement("span",null,he.createElement(xc.Z,null))))}const qo=Pi.map((jo,As)=>{const La=Ai(jo,As),_l=Wi.get(La)||{};return Object.assign({checked:Cr.has(La)},_l)}).filter(jo=>{let{disabled:As}=jo;return As}),xs=!!qo.length&&qo.length===Pi.length,Ts=xs&&qo.every(jo=>{let{checked:As}=jo;return As}),ma=xs&&qo.some(jo=>{let{checked:As}=jo;return As});Ko=!gi&&he.createElement("div",{className:`${Ii}-selection`},he.createElement(Lo.default,{checked:xs?Ts:!!Pi.length&&Lr,indeterminate:xs?!Ts&&ma:!Lr&&fo,onChange:Zo,disabled:Pi.length===0||xs,"aria-label":Qo?"Custom selection":"Select all",skipGroup:!0}),Qo)}let Qr;ni==="radio"?Qr=(Qo,qo,xs)=>{const Ts=Ai(qo,xs),ma=Cr.has(Ts);return{node:he.createElement(Li.ZP,Object.assign({},Wi.get(Ts),{checked:ma,onClick:jo=>jo.stopPropagation(),onChange:jo=>{Cr.has(Ts)||Or(Ts,!0,[Ts],jo.nativeEvent)}})),checked:ma}}:Qr=(Qo,qo,xs)=>{var Ts;const ma=Ai(qo,xs),jo=Cr.has(ma),As=is.has(ma),La=Wi.get(ma);let _l;return ur==="nest"?_l=As:_l=(Ts=La==null?void 0:La.indeterminate)!==null&&Ts!==void 0?Ts:As,{node:he.createElement(Lo.default,Object.assign({},La,{indeterminate:_l,checked:jo,skipGroup:!0,onClick:Xl=>Xl.stopPropagation(),onChange:Xl=>{let{nativeEvent:jl}=Xl;const{shiftKey:cu}=jl;let hu=-1,Jl=-1;if(cu&&si){const gs=new Set([so,ma]);ao.some((Ra,oa)=>{if(gs.has(Ra))if(hu===-1)hu=oa;else return Jl=oa,!0;return!1})}if(Jl!==-1&&hu!==Jl&&si){const gs=ao.slice(hu,Jl+1),Ra=[];jo?gs.forEach(Ns=>{Cr.has(Ns)&&(Ra.push(Ns),Cr.delete(Ns))}):gs.forEach(Ns=>{Cr.has(Ns)||(Ra.push(Ns),Cr.add(Ns))});const oa=Array.from(Cr);Cn==null||Cn(!jo,oa.map(Ns=>ki(Ns)),Ra.map(Ns=>ki(Ns))),Oo(oa,"multiple")}else{const gs=nr;if(si){const Ra=jo?(0,lu._5)(gs,ma):(0,lu.L0)(gs,ma);Or(ma,!jo,Ra,jl)}else{const Ra=(0,oo.S)([].concat((0,yi.Z)(gs),[ma]),!0,Qi,Sr),{checkedKeys:oa,halfCheckedKeys:Ns}=Ra;let Ql=oa;if(jo){const _c=new Set(oa);_c.delete(ma),Ql=(0,oo.S)(Array.from(_c),{checked:!1,halfCheckedKeys:Ns},Qi,Sr).checkedKeys}Or(ma,!jo,Ql,jl)}}Tr(jo?null:ma)}})),checked:jo}};const Do=(Qo,qo,xs)=>{const{node:Ts,checked:ma}=Qr(Qo,qo,xs);return Kn?Kn(ma,qo,xs,Ts):Ts};if(!Jr.includes(ra))if(Jr.findIndex(Qo=>{var qo;return((qo=Qo[or])===null||qo===void 0?void 0:qo.columnType)==="EXPAND_COLUMN"})===0){const[Qo,...qo]=Jr;Jr=[Qo,ra].concat((0,yi.Z)(qo))}else Jr=[ra].concat((0,yi.Z)(Jr));const Cs=Jr.indexOf(ra);Jr=Jr.filter((Qo,qo)=>Qo!==ra||qo===Cs);const Mo=Jr[Cs-1],Jo=Jr[Cs+1];let Ss=wi;Ss===void 0&&((Jo==null?void 0:Jo.fixed)!==void 0?Ss=Jo.fixed:(Mo==null?void 0:Mo.fixed)!==void 0&&(Ss=Mo.fixed)),Ss&&Mo&&((Er=Mo[or])===null||Er===void 0?void 0:Er.columnType)==="EXPAND_COLUMN"&&Mo.fixed===void 0&&(Mo.fixed=Ss);const Js=at()(`${Ii}-selection-col`,{[`${Ii}-selection-col-with-dropdown`]:Zn&&ni==="checkbox"}),Pl={fixed:Ss,width:zn,className:`${Ii}-selection-column`,title:Ut.columnTitle||Ko,render:Do,onCell:Ut.onCell,[or]:{className:Js}};return Jr.map(Qo=>Qo===ra?Pl:Qo)},[Ai,Pi,Ut,nr,Po,is,zn,Xr,ur,so,Wi,Cn,Or,Sr]),Po]},Rs=Ee(89489),xh=Ee(59477),nh=Ee(6848);const wc="ascend",yr="descend";function bc(jt){return typeof jt.sorter=="object"&&typeof jt.sorter.multiple=="number"?jt.sorter.multiple:!1}function on(jt){return typeof jt=="function"?jt:jt&&typeof jt=="object"&&jt.compare?jt.compare:!1}function Yn(jt,Ut){return Ut?jt[jt.indexOf(Ut)+1]:jt[0]}function wh(jt,Ut,cn){let ht=[];function bt(Et,wn){ht.push({column:Et,key:Ho(Et,wn),multiplePriority:bc(Et),sortOrder:Et.sortOrder})}return(jt||[]).forEach((Et,wn)=>{const fn=ia(wn,cn);Et.children?("sortOrder"in Et&&bt(Et,fn),ht=[].concat((0,yi.Z)(ht),(0,yi.Z)(wh(Et.children,Ut,fn)))):Et.sorter&&("sortOrder"in Et?bt(Et,fn):Ut&&Et.defaultSortOrder&&ht.push({column:Et,key:Ho(Et,fn),multiplePriority:bc(Et),sortOrder:Et.defaultSortOrder}))}),ht}function Qh(jt,Ut,cn,ht,bt,Et,wn,fn){return(Ut||[]).map((an,Sn)=>{const xn=ia(Sn,fn);let Cn=an;if(Cn.sorter){const zn=Cn.sortDirections||bt,ni=Cn.showSorterTooltip===void 0?wn:Cn.showSorterTooltip,Zn=Ho(Cn,xn),wi=cn.find(ur=>{let{key:Qn}=ur;return Qn===Zn}),Kn=wi?wi.sortOrder:null,gi=Yn(zn,Kn);let si;if(an.sortIcon)si=an.sortIcon({sortOrder:Kn});else{const ur=zn.includes(wc)&&he.createElement(xh.Z,{className:at()(`${jt}-column-sorter-up`,{active:Kn===wc})}),Qn=zn.includes(yr)&&he.createElement(Rs.Z,{className:at()(`${jt}-column-sorter-down`,{active:Kn===yr})});si=he.createElement("span",{className:at()(`${jt}-column-sorter`,{[`${jt}-column-sorter-full`]:!!(ur&&Qn)})},he.createElement("span",{className:`${jt}-column-sorter-inner`,"aria-hidden":"true"},ur,Qn))}const{cancelSort:Ii,triggerAsc:Ni,triggerDesc:Gi}=Et||{};let ki=Ii;gi===yr?ki=Gi:gi===wc&&(ki=Ni);const Ai=typeof ni=="object"?ni:{title:ki};Cn=Object.assign(Object.assign({},Cn),{className:at()(Cn.className,{[`${jt}-column-sort`]:Kn}),title:ur=>{const Qn=he.createElement("div",{className:`${jt}-column-sorters`},he.createElement("span",{className:`${jt}-column-title`},_s(an.title,ur)),si);return ni?he.createElement(nh.Z,Object.assign({},Ai),Qn):Qn},onHeaderCell:ur=>{const Qn=an.onHeaderCell&&an.onHeaderCell(ur)||{},ji=Qn.onClick,Ei=Qn.onKeyDown;Qn.onClick=pi=>{ht({column:an,key:Zn,sortOrder:gi,multiplePriority:bc(an)}),ji==null||ji(pi)},Qn.onKeyDown=pi=>{pi.keyCode===vi.Z.ENTER&&(ht({column:an,key:Zn,sortOrder:gi,multiplePriority:bc(an)}),Ei==null||Ei(pi))};const bi=la(an.title,{}),Ji=bi==null?void 0:bi.toString();return Kn?Qn["aria-sort"]=Kn==="ascend"?"ascending":"descending":Qn["aria-label"]=Ji||"",Qn.className=at()(Qn.className,`${jt}-column-has-sorters`),Qn.tabIndex=0,an.ellipsis&&(Qn.title=(bi!=null?bi:"").toString()),Qn}})}return"children"in Cn&&(Cn=Object.assign(Object.assign({},Cn),{children:Qh(jt,Cn.children,cn,ht,bt,Et,wn,xn)})),Cn})}function Mu(jt){const{column:Ut,sortOrder:cn}=jt;return{column:Ut,order:cn,field:Ut.dataIndex,columnKey:Ut.key}}function Tu(jt){const Ut=jt.filter(cn=>{let{sortOrder:ht}=cn;return ht}).map(Mu);return Ut.length===0&&jt.length?Object.assign(Object.assign({},Mu(jt[jt.length-1])),{column:void 0}):Ut.length<=1?Ut[0]||{}:Ut}function Wu(jt,Ut,cn){const ht=Ut.slice().sort((wn,fn)=>fn.multiplePriority-wn.multiplePriority),bt=jt.slice(),Et=ht.filter(wn=>{let{column:{sorter:fn},sortOrder:an}=wn;return on(fn)&&an});return Et.length?bt.sort((wn,fn)=>{for(let an=0;an<Et.length;an+=1){const Sn=Et[an],{column:{sorter:xn},sortOrder:Cn}=Sn,zn=on(xn);if(zn&&Cn){const ni=zn(wn,fn,Cn);if(ni!==0)return Cn===wc?ni:-ni}}return 0}).map(wn=>{const fn=wn[cn];return fn?Object.assign(Object.assign({},wn),{[cn]:Wu(fn,Ut,cn)}):wn}):bt}function bh(jt){let{prefixCls:Ut,mergedColumns:cn,onSorterChange:ht,sortDirections:bt,tableLocale:Et,showSorterTooltip:wn}=jt;const[fn,an]=he.useState(wh(cn,!0)),Sn=he.useMemo(()=>{let Zn=!0;const wi=wh(cn,!1);if(!wi.length)return fn;const Kn=[];function gi(Ii){Zn?Kn.push(Ii):Kn.push(Object.assign(Object.assign({},Ii),{sortOrder:null}))}let si=null;return wi.forEach(Ii=>{si===null?(gi(Ii),Ii.sortOrder&&(Ii.multiplePriority===!1?Zn=!1:si=!0)):(si&&Ii.multiplePriority!==!1||(Zn=!1),gi(Ii))}),Kn},[cn,fn]),xn=he.useMemo(()=>{const Zn=Sn.map(wi=>{let{column:Kn,sortOrder:gi}=wi;return{column:Kn,order:gi}});return{sortColumns:Zn,sortColumn:Zn[0]&&Zn[0].column,sortOrder:Zn[0]&&Zn[0].order}},[Sn]);function Cn(Zn){let wi;Zn.multiplePriority===!1||!Sn.length||Sn[0].multiplePriority===!1?wi=[Zn]:wi=[].concat((0,yi.Z)(Sn.filter(Kn=>{let{key:gi}=Kn;return gi!==Zn.key})),[Zn]),an(wi),ht(Tu(wi),wi)}return[Zn=>Qh(Ut,Zn,Sn,Cn,bt,Et,wn),Sn,xn,()=>Tu(Sn)]}function Cc(jt,Ut){return jt.map(cn=>{const ht=Object.assign({},cn);return ht.title=_s(cn.title,Ut),"children"in ht&&(ht.children=Cc(ht.children,Ut)),ht})}function Vs(jt){return[he.useCallback(cn=>Cc(cn,jt),[jt])]}var Vr=tr((jt,Ut)=>{const{_renderTimes:cn}=jt,{_renderTimes:ht}=Ut;return cn!==ht}),Da=Hr((jt,Ut)=>{const{_renderTimes:cn}=jt,{_renderTimes:ht}=Ut;return cn!==ht}),$s=Ee(64993),Ms=Ee(17313),wo=Ee(83116),ga=Ee(37613),cs=jt=>{const{componentCls:Ut}=jt,cn=`${jt.lineWidth}px ${jt.lineType} ${jt.tableBorderColor}`,ht=(bt,Et,wn)=>({[`&${Ut}-${bt}`]:{[`> ${Ut}-container`]:{[`> ${Ut}-content, > ${Ut}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${Ut}-expanded-row-fixed`]:{margin:`-${Et}px -${wn+jt.lineWidth}px`}}}}}});return{[`${Ut}-wrapper`]:{[`${Ut}${Ut}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${Ut}-title`]:{border:cn,borderBottom:0},[`> ${Ut}-container`]:{borderInlineStart:cn,borderTop:cn,[`
|
|
|
> ${Ut}-content,
|
|
|
> ${Ut}-header,
|
|
|
> ${Ut}-body,
|
|
|
> ${Ut}-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:cn},"> thead":{"> tr:not(:last-child) > th":{borderBottom:cn},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${Ut}-cell-fix-right-first::after`]:{borderInlineEnd:cn}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${Ut}-expanded-row-fixed`]:{margin:`-${jt.tablePaddingVertical}px -${jt.tablePaddingHorizontal+jt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:jt.lineWidth,bottom:0,borderInlineEnd:cn,content:'""'}}}}}},[`&${Ut}-scroll-horizontal`]:{[`> ${Ut}-container > ${Ut}-body`]:{"> table > tbody":{[`
|
|
|
> tr${Ut}-expanded-row,
|
|
|
> tr${Ut}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},ht("middle",jt.tablePaddingVerticalMiddle,jt.tablePaddingHorizontalMiddle)),ht("small",jt.tablePaddingVerticalSmall,jt.tablePaddingHorizontalSmall)),{[`> ${Ut}-footer`]:{border:cn,borderTop:0}}),[`${Ut}-cell`]:{[`${Ut}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${jt.lineWidth}px 0 ${jt.lineWidth}px ${jt.tableHeaderBg}`}},[`${Ut}-bordered ${Ut}-cell-scrollbar`]:{borderInlineEnd:cn}}}},Ea=jt=>{const{componentCls:Ut}=jt;return{[`${Ut}-wrapper`]:{[`${Ut}-cell-ellipsis`]:Object.assign(Object.assign({},Ms.vS),{wordBreak:"keep-all",[`
|
|
|
&${Ut}-cell-fix-left-last,
|
|
|
&${Ut}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${Ut}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${Ut}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Go=jt=>{const{componentCls:Ut}=jt;return{[`${Ut}-wrapper`]:{[`${Ut}-tbody > tr${Ut}-placeholder`]:{textAlign:"center",color:jt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:jt.colorBgContainer}}}}},Ka=Ee(15969),vs=jt=>{const{componentCls:Ut,antCls:cn,controlInteractiveSize:ht,motionDurationSlow:bt,lineWidth:Et,paddingXS:wn,lineType:fn,tableBorderColor:an,tableExpandIconBg:Sn,tableExpandColumnWidth:xn,borderRadius:Cn,fontSize:zn,fontSizeSM:ni,lineHeight:Zn,tablePaddingVertical:wi,tablePaddingHorizontal:Kn,tableExpandedRowBg:gi,paddingXXS:si}=jt,Ii=ht/2-Et,Ni=Ii*2+Et*3,Gi=`${Et}px ${fn} ${an}`,ki=si-Et;return{[`${Ut}-wrapper`]:{[`${Ut}-expand-icon-col`]:{width:xn},[`${Ut}-row-expand-icon-cell`]:{textAlign:"center",[`${Ut}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${Ut}-row-indent`]:{height:1,float:"left"},[`${Ut}-row-expand-icon`]:Object.assign(Object.assign({},(0,Ka.N)(jt)),{position:"relative",float:"left",boxSizing:"border-box",width:Ni,height:Ni,padding:0,color:"inherit",lineHeight:`${Ni}px`,background:Sn,border:Gi,borderRadius:Cn,transform:`scale(${ht/Ni})`,transition:`all ${bt}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${bt} ease-out`,content:'""'},"&::before":{top:Ii,insetInlineEnd:ki,insetInlineStart:ki,height:Et},"&::after":{top:ki,bottom:ki,insetInlineStart:Ii,width:Et,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"}}),[`${Ut}-row-indent + ${Ut}-row-expand-icon`]:{marginTop:(zn*Zn-Et*3)/2-Math.ceil((ni*1.4-Et*3)/2),marginInlineEnd:wn},[`tr${Ut}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:gi}},[`${cn}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Ut}-expanded-row-fixed`]:{position:"relative",margin:`-${wi}px -${Kn}px`,padding:`${wi}px ${Kn}px`}}}},Bs=jt=>{const{componentCls:Ut,antCls:cn,iconCls:ht,tableFilterDropdownWidth:bt,tableFilterDropdownSearchWidth:Et,paddingXXS:wn,paddingXS:fn,colorText:an,lineWidth:Sn,lineType:xn,tableBorderColor:Cn,tableHeaderIconColor:zn,fontSizeSM:ni,tablePaddingHorizontal:Zn,borderRadius:wi,motionDurationSlow:Kn,colorTextDescription:gi,colorPrimary:si,tableHeaderFilterActiveBg:Ii,colorTextDisabled:Ni,tableFilterDropdownBg:Gi,tableFilterDropdownHeight:ki,controlItemBgHover:Ai,controlItemBgActive:ur,boxShadowSecondary:Qn,filterDropdownMenuBg:ji}=jt,Ei=`${cn}-dropdown`,bi=`${Ut}-filter-dropdown`,Ji=`${cn}-tree`,pi=`${Sn}px ${xn} ${Cn}`;return[{[`${Ut}-wrapper`]:{[`${Ut}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${Ut}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-wn,marginInline:`${wn}px ${-Zn/2}px`,padding:`0 ${wn}px`,color:zn,fontSize:ni,borderRadius:wi,cursor:"pointer",transition:`all ${Kn}`,"&:hover":{color:gi,background:Ii},"&.active":{color:si}}}},{[`${cn}-dropdown`]:{[bi]:Object.assign(Object.assign({},(0,Ms.Wf)(jt)),{minWidth:bt,backgroundColor:Gi,borderRadius:wi,boxShadow:Qn,overflow:"hidden",[`${Ei}-menu`]:{maxHeight:ki,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:ji,"&:empty::after":{display:"block",padding:`${fn}px 0`,color:Ni,fontSize:ni,textAlign:"center",content:'"Not Found"'}},[`${bi}-tree`]:{paddingBlock:`${fn}px 0`,paddingInline:fn,[Ji]:{padding:0},[`${Ji}-treenode ${Ji}-node-content-wrapper:hover`]:{backgroundColor:Ai},[`${Ji}-treenode-checkbox-checked ${Ji}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:ur}}},[`${bi}-search`]:{padding:fn,borderBottom:pi,"&-input":{input:{minWidth:Et},[ht]:{color:Ni}}},[`${bi}-checkall`]:{width:"100%",marginBottom:wn,marginInlineStart:wn},[`${bi}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${fn-Sn}px ${fn}px`,overflow:"hidden",borderTop:pi}})}},{[`${cn}-dropdown ${bi}, ${bi}-submenu`]:{[`${cn}-checkbox-wrapper + span`]:{paddingInlineStart:fn,color:an},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Rc=jt=>{const{componentCls:Ut,lineWidth:cn,colorSplit:ht,motionDurationSlow:bt,zIndexTableFixed:Et,tableBg:wn,zIndexTableSticky:fn}=jt,an=ht;return{[`${Ut}-wrapper`]:{[`
|
|
|
${Ut}-cell-fix-left,
|
|
|
${Ut}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Et,background:wn},[`
|
|
|
${Ut}-cell-fix-left-first::after,
|
|
|
${Ut}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-cn,width:30,transform:"translateX(100%)",transition:`box-shadow ${bt}`,content:'""',pointerEvents:"none"},[`${Ut}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${Ut}-cell-fix-right-first::after,
|
|
|
${Ut}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-cn,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${bt}`,content:'""',pointerEvents:"none"},[`${Ut}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:fn+1,width:30,transition:`box-shadow ${bt}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${Ut}-ping-left`]:{[`&:not(${Ut}-has-fix-left) ${Ut}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${an}`}},[`
|
|
|
${Ut}-cell-fix-left-first::after,
|
|
|
${Ut}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${an}`},[`${Ut}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${Ut}-ping-right`]:{[`&:not(${Ut}-has-fix-right) ${Ut}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${an}`}},[`
|
|
|
${Ut}-cell-fix-right-first::after,
|
|
|
${Ut}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${an}`}}}}},Ad=jt=>{const{componentCls:Ut,antCls:cn}=jt;return{[`${Ut}-wrapper`]:{[`${Ut}-pagination${cn}-pagination`]:{margin:`${jt.margin}px 0`},[`${Ut}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:jt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Nd=jt=>{const{componentCls:Ut,tableRadius:cn}=jt;return{[`${Ut}-wrapper`]:{[Ut]:{[`${Ut}-title, ${Ut}-header`]:{borderRadius:`${cn}px ${cn}px 0 0`},[`${Ut}-title + ${Ut}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${Ut}-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:cn,borderStartEndRadius:cn,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:cn},"> *:last-child":{borderStartEndRadius:cn}}},"&-footer":{borderRadius:`0 0 ${cn}px ${cn}px`}}}}},rh=jt=>{const{componentCls:Ut}=jt;return{[`${Ut}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${Ut}-pagination-left`]:{justifyContent:"flex-end"},[`${Ut}-pagination-right`]:{justifyContent:"flex-start"},[`${Ut}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${Ut}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${Ut}-row-indent`]:{float:"right"}}}}},Ch=jt=>{const{componentCls:Ut,antCls:cn,iconCls:ht,fontSizeIcon:bt,padding:Et,paddingXS:wn,tableHeaderIconColor:fn,tableHeaderIconColorHover:an,tableSelectionColumnWidth:Sn}=jt;return{[`${Ut}-wrapper`]:{[`${Ut}-selection-col`]:{width:Sn,[`&${Ut}-selection-col-with-dropdown`]:{width:Sn+bt+Et/4}},[`${Ut}-bordered ${Ut}-selection-col`]:{width:Sn+wn*2,[`&${Ut}-selection-col-with-dropdown`]:{width:Sn+bt+Et/4+wn*2}},[`
|
|
|
table tr th${Ut}-selection-column,
|
|
|
table tr td${Ut}-selection-column
|
|
|
`]:{paddingInlineEnd:jt.paddingXS,paddingInlineStart:jt.paddingXS,textAlign:"center",[`${cn}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${Ut}-selection-column${Ut}-cell-fix-left`]:{zIndex:jt.zIndexTableFixed+1},[`table tr th${Ut}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${Ut}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${Ut}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${jt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${jt.tablePaddingHorizontal/4}px`,[ht]:{color:fn,fontSize:bt,verticalAlign:"baseline","&:hover":{color:an}}}}}},ro=jt=>{const{componentCls:Ut}=jt,cn=(ht,bt,Et,wn)=>({[`${Ut}${Ut}-${ht}`]:{fontSize:wn,[`
|
|
|
${Ut}-title,
|
|
|
${Ut}-footer,
|
|
|
${Ut}-cell,
|
|
|
${Ut}-thead > tr > th,
|
|
|
${Ut}-tbody > tr > th,
|
|
|
${Ut}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${bt}px ${Et}px`},[`${Ut}-filter-trigger`]:{marginInlineEnd:`-${Et/2}px`},[`${Ut}-expanded-row-fixed`]:{margin:`-${bt}px -${Et}px`},[`${Ut}-tbody`]:{[`${Ut}-wrapper:only-child ${Ut}`]:{marginBlock:`-${bt}px`,marginInline:`${jt.tableExpandColumnWidth-Et}px -${Et}px`}},[`${Ut}-selection-column`]:{paddingInlineStart:`${Et/4}px`}}});return{[`${Ut}-wrapper`]:Object.assign(Object.assign({},cn("middle",jt.tablePaddingVerticalMiddle,jt.tablePaddingHorizontalMiddle,jt.tableFontSizeMiddle)),cn("small",jt.tablePaddingVerticalSmall,jt.tablePaddingHorizontalSmall,jt.tableFontSizeSmall))}},ku=jt=>{const{componentCls:Ut,marginXXS:cn,fontSizeIcon:ht,tableHeaderIconColor:bt,tableHeaderIconColorHover:Et}=jt;return{[`${Ut}-wrapper`]:{[`${Ut}-thead th${Ut}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${jt.motionDurationSlow}`,"&:hover":{background:jt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:jt.colorPrimary},[`
|
|
|
&${Ut}-cell-fix-left:hover,
|
|
|
&${Ut}-cell-fix-right:hover
|
|
|
`]:{background:jt.tableFixedHeaderSortActiveBg}},[`${Ut}-thead th${Ut}-column-sort`]:{background:jt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${Ut}-column-sort`]:{background:jt.tableBodySortBg},[`${Ut}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${Ut}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${Ut}-column-sorter`]:{marginInlineStart:cn,color:bt,fontSize:0,transition:`color ${jt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:ht,"&.active":{color:jt.colorPrimary}},[`${Ut}-column-sorter-up + ${Ut}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Ut}-column-sorters:hover ${Ut}-column-sorter`]:{color:Et}}}},Au=jt=>{const{componentCls:Ut,opacityLoading:cn,tableScrollThumbBg:ht,tableScrollThumbBgHover:bt,tableScrollThumbSize:Et,tableScrollBg:wn,zIndexTableSticky:fn,stickyScrollBarBorderRadius:an}=jt,Sn=`${jt.lineWidth}px ${jt.lineType} ${jt.tableBorderColor}`;return{[`${Ut}-wrapper`]:{[`${Ut}-sticky`]:{"&-holder":{position:"sticky",zIndex:fn,background:jt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Et}px !important`,zIndex:fn,display:"flex",alignItems:"center",background:wn,borderTop:Sn,opacity:cn,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Et,backgroundColor:ht,borderRadius:an,transition:`all ${jt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:bt}}}}}}},uu=jt=>{const{componentCls:Ut,lineWidth:cn,tableBorderColor:ht}=jt,bt=`${cn}px ${jt.lineType} ${ht}`;return{[`${Ut}-wrapper`]:{[`${Ut}-summary`]:{position:"relative",zIndex:jt.zIndexTableFixed,background:jt.tableBg,"> tr":{"> th, > td":{borderBottom:bt}}},[`div${Ut}-summary`]:{boxShadow:`0 -${cn}px 0 ${ht}`}}}},ps=jt=>{const{componentCls:Ut}=jt,cn=`${jt.lineWidth}px ${jt.lineType} ${jt.tableBorderColor}`,ht=`${Ut}-expanded-row-cell`;return{[`${Ut}-wrapper`]:{[`${Ut}-tbody-virtual`]:{[`${Ut}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${Ut}-cell`]:{borderBottom:cn},[`${Ut}-expanded-row`]:{[`${ht}${ht}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${jt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${Ut}-bordered`]:{[`${Ut}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:cn,position:"absolute"},[`${Ut}-cell`]:{borderInlineEnd:cn,[`&${Ut}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-jt.lineWidth,borderInlineStart:cn}}}}}}};const Fs=jt=>{const{componentCls:Ut,fontWeightStrong:cn,tablePaddingVertical:ht,tablePaddingHorizontal:bt,lineWidth:Et,lineType:wn,tableBorderColor:fn,tableFontSize:an,tableBg:Sn,tableRadius:xn,tableHeaderTextColor:Cn,motionDurationMid:zn,tableHeaderBg:ni,tableHeaderCellSplitColor:Zn,tableRowHoverBg:wi,tableSelectedRowBg:Kn,tableSelectedRowHoverBg:gi,tableFooterTextColor:si,tableFooterBg:Ii,paddingContentVerticalLG:Ni}=jt,Gi=`${Et}px ${wn} ${fn}`;return{[`${Ut}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ms.dF)()),{[Ut]:Object.assign(Object.assign({},(0,Ms.Wf)(jt)),{fontSize:an,background:Sn,borderRadius:`${xn}px ${xn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${xn}px ${xn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${Ut}-cell,
|
|
|
${Ut}-thead > tr > th,
|
|
|
${Ut}-tbody > tr > th,
|
|
|
${Ut}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${Ni}px ${bt}px`,overflowWrap:"break-word"},[`${Ut}-title`]:{padding:`${ht}px ${bt}px`},[`${Ut}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Cn,fontWeight:cn,textAlign:"start",background:ni,borderBottom:Gi,transition:`background ${zn} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${Ut}-selection-column):not(${Ut}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Zn,transform:"translateY(-50%)",transition:`background-color ${zn}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Ut}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${zn}, border-color ${zn}`,borderBottom:Gi,[`
|
|
|
> ${Ut}-wrapper:only-child,
|
|
|
> ${Ut}-expanded-row-fixed > ${Ut}-wrapper:only-child
|
|
|
`]:{[Ut]:{marginBlock:`-${ht}px`,marginInline:`${jt.tableExpandColumnWidth-bt}px -${bt}px`,[`${Ut}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Cn,fontWeight:cn,textAlign:"start",background:ni,borderBottom:Gi,transition:`background ${zn} ease`},[`
|
|
|
&${Ut}-row:hover > th,
|
|
|
&${Ut}-row:hover > td,
|
|
|
> th${Ut}-cell-row-hover,
|
|
|
> td${Ut}-cell-row-hover
|
|
|
`]:{background:wi},[`&${Ut}-row-selected`]:{"> th, > td":{background:Kn},"&:hover > th, &:hover > td":{background:gi}}}},[`${Ut}-footer`]:{padding:`${ht}px ${bt}px`,color:si,background:Ii}})}};var rc=(0,wo.Z)("Table",jt=>{const{colorTextHeading:Ut,colorSplit:cn,colorIcon:ht,colorIconHover:bt,opacityLoading:Et,colorBgContainer:wn,controlInteractiveSize:fn,headerBg:an,headerColor:Sn,headerSortActiveBg:xn,headerSortHoverBg:Cn,bodySortBg:zn,rowHoverBg:ni,rowSelectedBg:Zn,rowSelectedHoverBg:wi,rowExpandedBg:Kn,cellPaddingBlock:gi,cellPaddingInline:si,cellPaddingBlockMD:Ii,cellPaddingInlineMD:Ni,cellPaddingBlockSM:Gi,cellPaddingInlineSM:ki,borderColor:Ai,footerBg:ur,footerColor:Qn,headerBorderRadius:ji,cellFontSize:Ei,cellFontSizeMD:bi,cellFontSizeSM:Ji,headerSplitColor:pi,fixedHeaderSortActiveBg:cr,headerFilterHoverBg:Qi,filterDropdownBg:Pi,expandIconBg:Wi,selectionColumnWidth:Sr,stickyScrollBarBg:nr}=jt,xo=new $s.C(ht),Po=new $s.C(bt),is=2,so=(0,ga.TS)(jt,{tableFontSize:Ei,tableBg:wn,tableRadius:ji,tablePaddingVertical:gi,tablePaddingHorizontal:si,tablePaddingVerticalMiddle:Ii,tablePaddingHorizontalMiddle:Ni,tablePaddingVerticalSmall:Gi,tablePaddingHorizontalSmall:ki,tableBorderColor:Ai,tableHeaderTextColor:Sn,tableHeaderBg:an,tableFooterTextColor:Qn,tableFooterBg:ur,tableHeaderCellSplitColor:pi,tableHeaderSortBg:xn,tableHeaderSortHoverBg:Cn,tableHeaderIconColor:xo.clone().setAlpha(xo.getAlpha()*Et).toRgbString(),tableHeaderIconColorHover:Po.clone().setAlpha(Po.getAlpha()*Et).toRgbString(),tableBodySortBg:zn,tableFixedHeaderSortActiveBg:cr,tableHeaderFilterActiveBg:Qi,tableFilterDropdownBg:Pi,tableRowHoverBg:ni,tableSelectedRowBg:Zn,tableSelectedRowHoverBg:wi,zIndexTableFixed:is,zIndexTableSticky:is+1,tableFontSizeMiddle:bi,tableFontSizeSmall:Ji,tableSelectionColumnWidth:Sr,tableExpandIconBg:Wi,tableExpandColumnWidth:fn+2*jt.padding,tableExpandedRowBg:Kn,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:nr,tableScrollThumbBgHover:Ut,tableScrollBg:cn});return[Fs(so),Ad(so),uu(so),ku(so),Bs(so),cs(so),Nd(so),vs(so),uu(so),Go(so),Ch(so),Rc(so),Au(so),Ea(so),ro(so),rh(so),ps(so)]},jt=>{const{colorFillAlter:Ut,colorBgContainer:cn,colorTextHeading:ht,colorFillSecondary:bt,colorFillContent:Et,controlItemBgActive:wn,controlItemBgActiveHover:fn,padding:an,paddingSM:Sn,paddingXS:xn,colorBorderSecondary:Cn,borderRadiusLG:zn,fontSize:ni,controlHeight:Zn,colorTextPlaceholder:wi}=jt,Kn=new $s.C(bt).onBackground(cn).toHexShortString(),gi=new $s.C(Et).onBackground(cn).toHexShortString(),si=new $s.C(Ut).onBackground(cn).toHexShortString();return{headerBg:si,headerColor:ht,headerSortActiveBg:Kn,headerSortHoverBg:gi,bodySortBg:si,rowHoverBg:si,rowSelectedBg:wn,rowSelectedHoverBg:fn,rowExpandedBg:Ut,cellPaddingBlock:an,cellPaddingInline:an,cellPaddingBlockMD:Sn,cellPaddingInlineMD:xn,cellPaddingBlockSM:xn,cellPaddingInlineSM:xn,borderColor:Cn,headerBorderRadius:zn,footerBg:si,footerColor:ht,cellFontSize:ni,cellFontSizeMD:ni,cellFontSizeSM:ni,headerSplitColor:Cn,fixedHeaderSortActiveBg:Kn,headerFilterHoverBg:Et,filterDropdownMenuBg:cn,filterDropdownBg:cn,expandIconBg:cn,selectionColumnWidth:Zn,stickyScrollBarBg:wi,stickyScrollBarBorderRadius:100}});const el=[],Id=(jt,Ut)=>{const{prefixCls:cn,className:ht,rootClassName:bt,style:Et,size:wn,bordered:fn,dropdownPrefixCls:an,dataSource:Sn,pagination:xn,rowSelection:Cn,rowKey:zn="key",rowClassName:ni,columns:Zn,children:wi,childrenColumnName:Kn,onChange:gi,getPopupContainer:si,loading:Ii,expandIcon:Ni,expandable:Gi,expandedRowRender:ki,expandIconColumnIndex:Ai,indentSize:ur,scroll:Qn,sortDirections:ji,locale:Ei,showSorterTooltip:bi=!0,virtual:Ji}=jt,pi=he.useMemo(()=>Zn||St(wi),[Zn,wi]),cr=he.useMemo(()=>pi.some(ls=>ls.responsive),[pi]),Qi=(0,Xn.Z)(cr),Pi=he.useMemo(()=>{const ls=new Set(Object.keys(Qi).filter(js=>Qi[js]));return pi.filter(js=>!js.responsive||js.responsive.some(wa=>ls.has(wa)))},[pi,Qi]),Wi=(0,pr.Z)(jt,["className","style","columns"]),{locale:Sr=ar.Z,direction:nr,table:xo,renderEmpty:Po,getPrefixCls:is,getPopupContainer:so}=he.useContext(Yo.E_),Tr=(0,Ki.Z)(wn),Oo=Object.assign(Object.assign({},Sr.Table),Ei),Or=Sn||el,Xr=is("table",cn),rs=is("dropdown",an),Wr=Object.assign({childrenColumnName:Kn,expandIconColumnIndex:Ai},Gi),{childrenColumnName:Er="children"}=Wr,Jr=he.useMemo(()=>Or.some(ls=>ls==null?void 0:ls[Er])?"nest":ki||Gi&&Gi.expandedRowRender?"row":null,[Or]),Cr={body:he.useRef()},ao=he.useMemo(()=>typeof zn=="function"?zn:ls=>ls==null?void 0:ls[zn],[zn]),[Lr]=Eu(Or,Er,ao),fo={},Zo=function(ls,js){let wa=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var zs,os,Ma;const El=Object.assign(Object.assign({},fo),ls);wa&&((zs=fo.resetPagination)===null||zs===void 0||zs.call(fo),!((os=El.pagination)===null||os===void 0)&&os.current&&(El.pagination.current=1),xn&&xn.onChange&&xn.onChange(1,(Ma=El.pagination)===null||Ma===void 0?void 0:Ma.pageSize)),Qn&&Qn.scrollToFirstRowOnChange!==!1&&Cr.body.current&&(0,eo.Z)(0,{getContainer:()=>Cr.body.current}),gi==null||gi(El.pagination,El.filters,El.sorter,{currentDataSource:Wa(Wu(Or,El.sorterStates,Er),El.filterStates),action:js})},Ko=(ls,js)=>{Zo({sorter:ls,sorterStates:js},"sort",!1)},[Qr,Do,Cs,Mo]=bh({prefixCls:Xr,mergedColumns:Pi,onSorterChange:Ko,sortDirections:ji||["ascend","descend"],tableLocale:Oo,showSorterTooltip:bi}),Jo=he.useMemo(()=>Wu(Or,Do,Er),[Or,Do]);fo.sorter=Mo(),fo.sorterStates=Do;const Ss=(ls,js)=>{Zo({filters:ls,filterStates:js},"filter",!0)},[Js,Pl,Qo]=yc({prefixCls:Xr,locale:Oo,dropdownPrefixCls:rs,mergedColumns:Pi,onFilterChange:Ss,getPopupContainer:si||so}),qo=Wa(Jo,Pl);fo.filters=Qo,fo.filterStates=Pl;const xs=he.useMemo(()=>{const ls={};return Object.keys(Qo).forEach(js=>{Qo[js]!==null&&(ls[js]=Qo[js])}),Object.assign(Object.assign({},Cs),{filters:ls})},[Cs,Qo]),[Ts]=Vs(xs),ma=(ls,js)=>{Zo({pagination:Object.assign(Object.assign({},fo.pagination),{current:ls,pageSize:js})},"paginate")},[jo,As]=th(qo.length,ma,xn);fo.pagination=xn===!1?{}:Lu(jo,xn),fo.resetPagination=As;const La=he.useMemo(()=>{if(xn===!1||!jo.pageSize)return qo;const{current:ls=1,total:js,pageSize:wa=Gu}=jo;return qo.length<js?qo.length>wa?qo.slice((ls-1)*wa,ls*wa):qo:qo.slice((ls-1)*wa,ls*wa)},[!!xn,qo,jo&&jo.current,jo&&jo.pageSize,jo&&jo.total]),[_l,Xl]=Bl({prefixCls:Xr,data:qo,pageData:La,getRowKey:ao,getRecordByKey:Lr,expandType:Jr,childrenColumnName:Er,locale:Oo,getPopupContainer:si||so},Cn),jl=(ls,js,wa)=>{let zs;return typeof ni=="function"?zs=at()(ni(ls,js,wa)):zs=at()(ni),at()({[`${Xr}-row-selected`]:Xl.has(ao(ls,js))},zs)};Wr.__PARENT_RENDER_ICON__=Wr.expandIcon,Wr.expandIcon=Wr.expandIcon||Ni||as(Oo),Jr==="nest"&&Wr.expandIconColumnIndex===void 0?Wr.expandIconColumnIndex=Cn?1:0:Wr.expandIconColumnIndex>0&&Cn&&(Wr.expandIconColumnIndex-=1),typeof Wr.indentSize!="number"&&(Wr.indentSize=typeof ur=="number"?ur:15);const cu=he.useCallback(ls=>Ts(_l(Js(Qr(ls)))),[Qr,Js,_l]);let hu,Jl;if(xn!==!1&&(jo!=null&&jo.total)){let ls;jo.size?ls=jo.size:ls=Tr==="small"||Tr==="middle"?"small":void 0;const js=os=>he.createElement(to.Z,Object.assign({},jo,{className:at()(`${Xr}-pagination ${Xr}-pagination-${os}`,jo.className),size:ls})),wa=nr==="rtl"?"left":"right",{position:zs}=jo;if(zs!==null&&Array.isArray(zs)){const os=zs.find(Nu=>Nu.includes("top")),Ma=zs.find(Nu=>Nu.includes("bottom")),El=zs.every(Nu=>`${Nu}`=="none");!os&&!Ma&&!El&&(Jl=js(wa)),os&&(hu=js(os.toLowerCase().replace("top",""))),Ma&&(Jl=js(Ma.toLowerCase().replace("bottom","")))}else Jl=js(wa)}let gs;typeof Ii=="boolean"?gs={spinning:Ii}:typeof Ii=="object"&&(gs=Object.assign({spinning:!0},Ii));const[Ra,oa]=rc(Xr),[,Ns]=(0,Bo.Z)(),Ql=at()(`${Xr}-wrapper`,xo==null?void 0:xo.className,{[`${Xr}-wrapper-rtl`]:nr==="rtl"},ht,bt,oa),_c=Object.assign(Object.assign({},xo==null?void 0:xo.style),Et),du=Ei&&Ei.emptyText||(Po==null?void 0:Po("Table"))||he.createElement(sr.Z,{componentName:"Table"}),Zu=Ji?Da:Vr,sc={},zl=he.useMemo(()=>{const{fontSize:ls,lineHeight:js,padding:wa,paddingXS:zs,paddingSM:os}=Ns,Ma=Math.floor(ls*js);switch(Tr){case"large":return wa*2+Ma;case"small":return zs*2+Ma;default:return os*2+Ma}},[Ns,Tr]);return Ji&&(sc.listItemHeight=zl),Ra(he.createElement("div",{ref:Ut,className:Ql,style:_c},he.createElement(Ro.Z,Object.assign({spinning:!1},gs),hu,he.createElement(Zu,Object.assign({},sc,Wi,{columns:Pi,direction:nr,expandable:Wr,prefixCls:Xr,className:at()({[`${Xr}-middle`]:Tr==="middle",[`${Xr}-small`]:Tr==="small",[`${Xr}-bordered`]:fn,[`${Xr}-empty`]:Or.length===0}),data:La,rowKey:ao,rowClassName:jl,emptyText:du,internalHooks:me,internalRefs:Cr,transformColumns:cu})),Jl)))};var td=he.forwardRef(Id);const Dd=(jt,Ut)=>{const cn=he.useRef(0);return cn.current+=1,he.createElement(td,Object.assign({},jt,{ref:Ut,_renderTimes:cn.current}))},Oa=he.forwardRef(Dd);Oa.SELECTION_COLUMN=ra,Oa.EXPAND_COLUMN=Me,Oa.SELECTION_ALL=Ds,Oa.SELECTION_INVERT=bs,Oa.SELECTION_NONE=ks,Oa.Column=_r,Oa.ColumnGroup=Kr,Oa.Summary=Ie;var oc=Oa,gf=oc},12563:function(_n,en,Ee){"use strict";Ee.d(en,{default:function(){return Xe}});var Me=Ee(59301),me=Ee(99267),Be=Ee(92310),ke=Ee.n(Be),Ce=Ee(36785),Le=Ee(47729),he=Ee(14088),ye=Ee(36355),xe=Ee(17313),ge=Ee(37613),le=Ee(83116);const ve=Ge=>{const{paddingXXS:ft,lineWidth:at,tagPaddingHorizontal:Ct,componentCls:et}=Ge,yt=Ct-at,st=ft-at;return{[et]:Object.assign(Object.assign({},(0,xe.Wf)(Ge)),{display:"inline-block",height:"auto",marginInlineEnd:Ge.marginXS,paddingInline:yt,fontSize:Ge.tagFontSize,lineHeight:Ge.tagLineHeight,whiteSpace:"nowrap",background:Ge.defaultBg,border:`${Ge.lineWidth}px ${Ge.lineType} ${Ge.colorBorder}`,borderRadius:Ge.borderRadiusSM,opacity:1,transition:`all ${Ge.motionDurationMid}`,textAlign:"start",position:"relative",[`&${et}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ge.defaultColor},[`${et}-close-icon`]:{marginInlineStart:st,color:Ge.colorTextDescription,fontSize:Ge.tagIconSize,cursor:"pointer",transition:`all ${Ge.motionDurationMid}`,"&:hover":{color:Ge.colorTextHeading}},[`&${et}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${Ge.iconCls}-close, ${Ge.iconCls}-close:hover`]:{color:Ge.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${et}-checkable-checked):hover`]:{color:Ge.colorPrimary,backgroundColor:Ge.colorFillSecondary},"&:active, &-checked":{color:Ge.colorTextLightSolid},"&-checked":{backgroundColor:Ge.colorPrimary,"&:hover":{backgroundColor:Ge.colorPrimaryHover}},"&:active":{backgroundColor:Ge.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${Ge.iconCls} + span, > span + ${Ge.iconCls}`]:{marginInlineStart:yt}}),[`${et}-borderless`]:{borderColor:"transparent",background:Ge.tagBorderlessBg}}},de=Ge=>{const{lineWidth:ft,fontSizeIcon:at}=Ge,Ct=Ge.fontSizeSM,et=`${Ge.lineHeightSM*Ct}px`;return(0,ge.TS)(Ge,{tagFontSize:Ct,tagLineHeight:et,tagIconSize:at-2*ft,tagPaddingHorizontal:8,tagBorderlessBg:Ge.colorFillTertiary})},ce=Ge=>({defaultBg:Ge.colorFillQuaternary,defaultColor:Ge.colorText});var z=(0,le.Z)("Tag",Ge=>{const ft=de(Ge);return ve(ft)},ce),ee=function(Ge,ft){var at={};for(var Ct in Ge)Object.prototype.hasOwnProperty.call(Ge,Ct)&&ft.indexOf(Ct)<0&&(at[Ct]=Ge[Ct]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Ct=Object.getOwnPropertySymbols(Ge);et<Ct.length;et++)ft.indexOf(Ct[et])<0&&Object.prototype.propertyIsEnumerable.call(Ge,Ct[et])&&(at[Ct[et]]=Ge[Ct[et]]);return at},ie=Ge=>{const{prefixCls:ft,style:at,className:Ct,checked:et,onChange:yt,onClick:st}=Ge,zt=ee(Ge,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:lt,tag:tt}=Me.useContext(ye.E_),ut=Ht=>{yt==null||yt(!et),st==null||st(Ht)},mt=lt("tag",ft),[Pt,gt]=z(mt),Ft=ke()(mt,`${mt}-checkable`,{[`${mt}-checkable-checked`]:et},tt==null?void 0:tt.className,Ct,gt);return Pt(Me.createElement("span",Object.assign({},zt,{style:Object.assign(Object.assign({},at),tt==null?void 0:tt.style),className:Ft,onClick:ut})))},se=Ee(45157);const ue=Ge=>(0,se.Z)(Ge,(ft,at)=>{let{textColor:Ct,lightBorderColor:et,lightColor:yt,darkColor:st}=at;return{[`${Ge.componentCls}-${ft}`]:{color:Ct,background:yt,borderColor:et,"&-inverse":{color:Ge.colorTextLightSolid,background:st,borderColor:st},[`&${Ge.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Se=(0,le.b)(["Tag","preset"],Ge=>{const ft=de(Ge);return ue(ft)},ce);function we(Ge){return typeof Ge!="string"?Ge:Ge.charAt(0).toUpperCase()+Ge.slice(1)}const Pe=(Ge,ft,at)=>{const Ct=we(at);return{[`${Ge.componentCls}-${ft}`]:{color:Ge[`color${at}`],background:Ge[`color${Ct}Bg`],borderColor:Ge[`color${Ct}Border`],[`&${Ge.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Ae=(0,le.b)(["Tag","status"],Ge=>{const ft=de(Ge);return[Pe(ft,"success","Success"),Pe(ft,"processing","Info"),Pe(ft,"error","Error"),Pe(ft,"warning","Warning")]},ce),De=function(Ge,ft){var at={};for(var Ct in Ge)Object.prototype.hasOwnProperty.call(Ge,Ct)&&ft.indexOf(Ct)<0&&(at[Ct]=Ge[Ct]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Ct=Object.getOwnPropertySymbols(Ge);et<Ct.length;et++)ft.indexOf(Ct[et])<0&&Object.prototype.propertyIsEnumerable.call(Ge,Ct[et])&&(at[Ct[et]]=Ge[Ct[et]]);return at};const ze=(Ge,ft)=>{const{prefixCls:at,className:Ct,rootClassName:et,style:yt,children:st,icon:zt,color:lt,onClose:tt,closeIcon:ut,closable:mt,bordered:Pt=!0}=Ge,gt=De(Ge,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Ft,direction:Ht,tag:hn}=Me.useContext(ye.E_),[Qt,bn]=Me.useState(!0);Me.useEffect(()=>{"visible"in gt&&bn(gt.visible)},[gt.visible]);const Wt=(0,Ce.o2)(lt),Kt=(0,Ce.yT)(lt),Jt=Wt||Kt,Yt=Object.assign(Object.assign({backgroundColor:lt&&!Jt?lt:void 0},hn==null?void 0:hn.style),yt),kt=Ft("tag",at),[pt,Bt]=z(kt),xt=ke()(kt,hn==null?void 0:hn.className,{[`${kt}-${lt}`]:Jt,[`${kt}-has-color`]:lt&&!Jt,[`${kt}-hidden`]:!Qt,[`${kt}-rtl`]:Ht==="rtl",[`${kt}-borderless`]:!Pt},Ct,et,Bt),vt=be=>{be.stopPropagation(),tt==null||tt(be),!be.defaultPrevented&&bn(!1)},[,nt]=(0,Le.Z)(mt,ut,be=>be===null?Me.createElement(me.Z,{className:`${kt}-close-icon`,onClick:vt}):Me.createElement("span",{className:`${kt}-close-icon`,onClick:vt},be),null,!1),He=typeof gt.onClick=="function"||st&&st.type==="a",Ie=zt||null,We=Ie?Me.createElement(Me.Fragment,null,Ie,st&&Me.createElement("span",null,st)):st,Oe=Me.createElement("span",Object.assign({},gt,{ref:ft,className:xt,style:Yt}),We,nt,Wt&&Me.createElement(Se,{key:"preset",prefixCls:kt}),Kt&&Me.createElement(Ae,{key:"status",prefixCls:kt}));return pt(He?Me.createElement(he.Z,{component:"Tag"},Oe):Oe)},Ze=Me.forwardRef(ze);Ze.CheckableTag=ie;var Xe=Ze},17574:function(_n,en,Ee){"use strict";Ee.d(en,{default:function(){return lt}});var Me=Ee(54844),me=Ee(80702),Be=Ee(52671),ke=Ee(8657),Ce=Ee(72308),Le=Ee(59301),he={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"},ye=he,xe=Ee(7657),ge=function(ut,mt){return Le.createElement(xe.Z,(0,Ce.Z)({},ut,{ref:mt,icon:ye}))},le=Le.forwardRef(ge),ve=le,de=Ee(92310),ce=Ee.n(de),z=Ee(35654),ee=Ee(71430),oe=Ee(36355),ie=Ee(56082),se=Ee(62892),ue=Ee(20648);const Se=4;function we(tt){const{dropPosition:ut,dropLevelOffset:mt,prefixCls:Pt,indent:gt,direction:Ft="ltr"}=tt,Ht=Ft==="ltr"?"left":"right",hn=Ft==="ltr"?"right":"left",Qt={[Ht]:-mt*gt+Se,[hn]:0};switch(ut){case-1:Qt.top=-3;break;case 1:Qt.bottom=-3;break;default:Qt.bottom=-3,Qt[Ht]=gt+Se;break}return Le.createElement("div",{style:Qt,className:`${Pt}-drop-indicator`})}var Pe=Ee(71997),De=Le.forwardRef((tt,ut)=>{const{getPrefixCls:mt,direction:Pt,virtual:gt,tree:Ft}=Le.useContext(oe.E_),{prefixCls:Ht,className:hn,showIcon:Qt=!1,showLine:bn,switcherIcon:Wt,blockNode:Kt=!1,children:Jt,checkable:Yt=!1,selectable:kt=!0,draggable:pt,motion:Bt,style:xt}=tt,vt=mt("tree",Ht),nt=mt(),He=Bt!=null?Bt:Object.assign(Object.assign({},(0,se.Z)(nt)),{motionAppear:!1}),Ie=Object.assign(Object.assign({},tt),{checkable:Yt,selectable:kt,showIcon:Qt,motion:He,blockNode:Kt,showLine:!!bn,dropIndicatorRender:we}),[We,Oe]=(0,ue.ZP)(vt),be=Le.useMemo(()=>{if(!pt)return!1;let $e={};switch(typeof pt){case"function":$e.nodeDraggable=pt;break;case"object":$e=Object.assign({},pt);break;default:break}return $e.icon!==!1&&($e.icon=$e.icon||Le.createElement(ie.Z,null)),$e},[pt]),Ne=$e=>Le.createElement(Pe.Z,{prefixCls:vt,switcherIcon:Wt,treeNodeProps:$e,showLine:bn});return We(Le.createElement(Me.Z,Object.assign({itemHeight:20,ref:ut,virtual:gt},Ie,{style:Object.assign(Object.assign({},Ft==null?void 0:Ft.style),xt),prefixCls:vt,className:ce()({[`${vt}-icon-hide`]:!Qt,[`${vt}-block-node`]:Kt,[`${vt}-unselectable`]:!kt,[`${vt}-rtl`]:Pt==="rtl"},Ft==null?void 0:Ft.className,hn,Oe),direction:Pt,checkable:Yt&&Le.createElement("span",{className:`${vt}-checkbox-inner`}),selectable:kt,switcherIcon:Ne,draggable:be}),Jt))}),ze;(function(tt){tt[tt.None=0]="None",tt[tt.Start=1]="Start",tt[tt.End=2]="End"})(ze||(ze={}));function Ze(tt,ut){function mt(Pt){const{key:gt,children:Ft}=Pt;ut(gt,Pt)!==!1&&Ze(Ft||[],ut)}tt.forEach(mt)}function Xe(tt){let{treeData:ut,expandedKeys:mt,startKey:Pt,endKey:gt}=tt;const Ft=[];let Ht=ze.None;if(Pt&&Pt===gt)return[Pt];if(!Pt||!gt)return[];function hn(Qt){return Qt===Pt||Qt===gt}return Ze(ut,Qt=>{if(Ht===ze.End)return!1;if(hn(Qt)){if(Ft.push(Qt),Ht===ze.None)Ht=ze.Start;else if(Ht===ze.Start)return Ht=ze.End,!1}else Ht===ze.Start&&Ft.push(Qt);return mt.includes(Qt)}),Ft}function Ge(tt,ut){const mt=(0,me.Z)(ut),Pt=[];return Ze(tt,(gt,Ft)=>{const Ht=mt.indexOf(gt);return Ht!==-1&&(Pt.push(Ft),mt.splice(Ht,1)),!!mt.length}),Pt}var ft=function(tt,ut){var mt={};for(var Pt in tt)Object.prototype.hasOwnProperty.call(tt,Pt)&&ut.indexOf(Pt)<0&&(mt[Pt]=tt[Pt]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var gt=0,Pt=Object.getOwnPropertySymbols(tt);gt<Pt.length;gt++)ut.indexOf(Pt[gt])<0&&Object.prototype.propertyIsEnumerable.call(tt,Pt[gt])&&(mt[Pt[gt]]=tt[Pt[gt]]);return mt};function at(tt){const{isLeaf:ut,expanded:mt}=tt;return ut?Le.createElement(Be.Z,null):mt?Le.createElement(ke.Z,null):Le.createElement(ve,null)}function Ct(tt){let{treeData:ut,children:mt}=tt;return ut||(0,ee.zn)(mt)}const et=(tt,ut)=>{var{defaultExpandAll:mt,defaultExpandParent:Pt,defaultExpandedKeys:gt}=tt,Ft=ft(tt,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const Ht=Le.useRef(),hn=Le.useRef(),Qt=()=>{const{keyEntities:be}=(0,ee.I8)(Ct(Ft));let Ne;return mt?Ne=Object.keys(be):Pt?Ne=(0,z.r7)(Ft.expandedKeys||gt||[],be):Ne=Ft.expandedKeys||gt,Ne},[bn,Wt]=Le.useState(Ft.selectedKeys||Ft.defaultSelectedKeys||[]),[Kt,Jt]=Le.useState(()=>Qt());Le.useEffect(()=>{"selectedKeys"in Ft&&Wt(Ft.selectedKeys)},[Ft.selectedKeys]),Le.useEffect(()=>{"expandedKeys"in Ft&&Jt(Ft.expandedKeys)},[Ft.expandedKeys]);const Yt=(be,Ne)=>{var $e;return"expandedKeys"in Ft||Jt(be),($e=Ft.onExpand)===null||$e===void 0?void 0:$e.call(Ft,be,Ne)},kt=(be,Ne)=>{var $e;const{multiple:dt}=Ft,{node:Je,nativeEvent:At}=Ne,{key:tn=""}=Je,pn=Ct(Ft),ln=Object.assign(Object.assign({},Ne),{selected:!0}),gn=(At==null?void 0:At.ctrlKey)||(At==null?void 0:At.metaKey),Hn=At==null?void 0:At.shiftKey;let An;dt&&gn?(An=be,Ht.current=tn,hn.current=An,ln.selectedNodes=Ge(pn,An)):dt&&Hn?(An=Array.from(new Set([].concat((0,me.Z)(hn.current||[]),(0,me.Z)(Xe({treeData:pn,expandedKeys:Kt,startKey:tn,endKey:Ht.current}))))),ln.selectedNodes=Ge(pn,An)):(An=[tn],Ht.current=tn,hn.current=An,ln.selectedNodes=Ge(pn,An)),($e=Ft.onSelect)===null||$e===void 0||$e.call(Ft,An,ln),"selectedKeys"in Ft||Wt(An)},{getPrefixCls:pt,direction:Bt}=Le.useContext(oe.E_),{prefixCls:xt,className:vt,showIcon:nt=!0,expandAction:He="click"}=Ft,Ie=ft(Ft,["prefixCls","className","showIcon","expandAction"]),We=pt("tree",xt),Oe=ce()(`${We}-directory`,{[`${We}-directory-rtl`]:Bt==="rtl"},vt);return Le.createElement(De,Object.assign({icon:at,ref:ut,blockNode:!0},Ie,{showIcon:nt,expandAction:He,prefixCls:We,className:Oe,expandedKeys:Kt,selectedKeys:bn,onSelect:kt,onExpand:Yt}))};var st=Le.forwardRef(et);const zt=De;zt.DirectoryTree=st,zt.TreeNode=Me.O;var lt=zt},20648:function(_n,en,Ee){"use strict";Ee.d(en,{TM:function(){return de},Yk:function(){return ve}});var Me=Ee(93083),me=Ee(98447),Be=Ee(17313),ke=Ee(8378),Ce=Ee(37613),Le=Ee(83116);const he=new Me.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),ye=(ce,z)=>({[`.${ce}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${z.motionDurationSlow}`}}}),xe=(ce,z)=>({[`.${ce}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:z.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${z.lineWidthBold}px solid ${z.colorPrimary}`,borderRadius:"50%",content:'""'}}}),ge=(ce,z)=>{const{treeCls:ee,treeNodeCls:oe,treeNodePadding:ie,titleHeight:se,nodeSelectedBg:ue,nodeHoverBg:Se}=z,we=z.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,Be.Wf)(z)),{background:z.colorBgContainer,borderRadius:z.borderRadius,transition:`background-color ${z.motionDurationSlow}`,[`&${ee}-rtl`]:{[`${ee}-switcher`]:{"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${ee}-active-focused)`]:Object.assign({},(0,Be.oN)(z)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${oe}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:ie,insetInlineStart:0,border:`1px solid ${z.colorPrimary}`,opacity:0,animationName:he,animationDuration:z.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${oe}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${ie}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:z.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,Be.oN)(z)),[`&:not(${oe}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:se,lineHeight:`${se}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${z.motionDurationSlow}`,[`${oe}:hover &`]:{opacity:.45}},[`&${oe}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:se}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},ye(ce,z)),{position:"relative",flex:"none",alignSelf:"stretch",width:se,margin:0,lineHeight:`${se}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:z.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:se/2,bottom:-ie,marginInlineStart:-1,borderInlineEnd:`1px solid ${z.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:se/2*.8,height:se/2,borderBottom:`1px solid ${z.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:we},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:se,margin:0,padding:`0 ${z.paddingXS/2}px`,color:"inherit",lineHeight:`${se}px`,background:"transparent",borderRadius:z.borderRadius,cursor:"pointer",transition:`all ${z.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:Se},[`&${ee}-node-selected`]:{backgroundColor:ue},[`${ee}-iconEle`]:{display:"inline-block",width:se,height:se,lineHeight:`${se}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${se}px`,userSelect:"none"},xe(ce,z)),[`${oe}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${z.colorPrimary}`}},"&-show-line":{[`${ee}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:se/2,bottom:-ie,borderInlineEnd:`1px solid ${z.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${oe}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${se/2}px !important`}}}}})}},le=ce=>{const{treeCls:z,treeNodeCls:ee,treeNodePadding:oe,directoryNodeSelectedBg:ie,directoryNodeSelectedColor:se}=ce;return{[`${z}${z}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:oe,insetInlineStart:0,transition:`background-color ${ce.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:ce.controlItemBgHover}},"> *":{zIndex:1},[`${z}-switcher`]:{transition:`color ${ce.motionDurationMid}`},[`${z}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${z}-node-selected`]:{color:se,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:ie},[`${z}-switcher`]:{color:se},[`${z}-node-content-wrapper`]:{color:se,background:"transparent"}}}}}},ve=(ce,z)=>{const ee=`.${ce}`,oe=`${ee}-treenode`,ie=z.paddingXS/2,se=(0,Ce.TS)(z,{treeCls:ee,treeNodeCls:oe,treeNodePadding:ie});return[ge(ce,se),le(se)]},de=ce=>{const{controlHeightSM:z}=ce;return{titleHeight:z,nodeHoverBg:ce.controlItemBgHover,nodeSelectedBg:ce.controlItemBgActive}};en.ZP=(0,Le.Z)("Tree",(ce,z)=>{let{prefixCls:ee}=z;return[{[ce.componentCls]:(0,me.C2)(`${ee}-checkbox`,ce)},ve(ee,ce),(0,ke.Z)(ce)]},ce=>{const{colorTextLightSolid:z,colorPrimary:ee}=ce;return Object.assign(Object.assign({},de(ce)),{directoryNodeSelectedColor:z,directoryNodeSelectedBg:ee})})},71997:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return oe}});var Me=Ee(72308),me=Ee(59301),Be={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"},ke=Be,Ce=Ee(7657),Le=function(se,ue){return me.createElement(Ce.Z,(0,Me.Z)({},se,{ref:ue,icon:ke}))},he=me.forwardRef(Le),ye=he,xe=Ee(52671),ge=Ee(58617),le=Ee(15075),ve=Ee(43531),de=Ee(92310),ce=Ee.n(de),z=Ee(92343),oe=ie=>{const{prefixCls:se,switcherIcon:ue,treeNodeProps:Se,showLine:we}=ie,{isLeaf:Pe,expanded:Ae,loading:De}=Se;if(De)return me.createElement(ge.Z,{className:`${se}-switcher-loading-icon`});let ze;if(we&&typeof we=="object"&&(ze=we.showLeafIcon),Pe){if(!we)return null;if(typeof ze!="boolean"&&ze){const Ge=typeof ze=="function"?ze(Se):ze,ft=`${se}-switcher-line-custom-icon`;return(0,z.l$)(Ge)?(0,z.Tm)(Ge,{className:ce()(Ge.props.className||"",ft)}):Ge}return ze?me.createElement(xe.Z,{className:`${se}-switcher-line-icon`}):me.createElement("span",{className:`${se}-switcher-leaf-line`})}const Ze=`${se}-switcher-icon`,Xe=typeof ue=="function"?ue(Se):ue;return(0,z.l$)(Xe)?(0,z.Tm)(Xe,{className:ce()(Xe.props.className||"",Ze)}):Xe!==void 0?Xe:we?Ae?me.createElement(le.Z,{className:`${se}-switcher-line-icon`}):me.createElement(ve.Z,{className:`${se}-switcher-line-icon`}):me.createElement(ye,{className:Ze})}},99498:function(_n,en,Ee){(function(Me){Me(Ee(89780))})(function(Me){Me.defineOption("placeholder","",function(ye,xe,ge){var le=ge&&ge!=Me.Init;if(xe&&!le)ye.on("blur",Ce),ye.on("change",Le),ye.on("swapDoc",Le),Me.on(ye.getInputField(),"compositionupdate",ye.state.placeholderCompose=function(){ke(ye)}),Le(ye);else if(!xe&&le){ye.off("blur",Ce),ye.off("change",Le),ye.off("swapDoc",Le),Me.off(ye.getInputField(),"compositionupdate",ye.state.placeholderCompose),me(ye);var ve=ye.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}xe&&!ye.hasFocus()&&Ce(ye)});function me(ye){ye.state.placeholder&&(ye.state.placeholder.parentNode.removeChild(ye.state.placeholder),ye.state.placeholder=null)}function Be(ye){me(ye);var xe=ye.state.placeholder=document.createElement("pre");xe.style.cssText="height: 0; overflow: visible",xe.style.direction=ye.getOption("direction"),xe.className="CodeMirror-placeholder CodeMirror-line-like";var ge=ye.getOption("placeholder");typeof ge=="string"&&(ge=document.createTextNode(ge)),xe.appendChild(ge),ye.display.lineSpace.insertBefore(xe,ye.display.lineSpace.firstChild)}function ke(ye){setTimeout(function(){var xe=!1,ge=ye.getInputField();ge.nodeName=="TEXTAREA"?xe=!ge.value:ye.lineCount()==1&&(xe=!/[^\u200b]/.test(ge.querySelector(".CodeMirror-line").textContent)),xe?Be(ye):me(ye)},20)}function Ce(ye){he(ye)&&Be(ye)}function Le(ye){var xe=ye.getWrapperElement(),ge=he(ye);xe.className=xe.className.replace(" CodeMirror-empty","")+(ge?" CodeMirror-empty":""),ge?Be(ye):me(ye)}function he(ye){return ye.lineCount()===1&&ye.getLine(0)===""}})},25717:function(_n,en,Ee){(function(Me){Me(Ee(89780))})(function(Me){var me={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Be=Me.Pos;Me.defineOption("autoCloseBrackets",!1,function(z,ee,oe){oe&&oe!=Me.Init&&(z.removeKeyMap(Ce),z.state.closeBrackets=null),ee&&(Le(ke(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(Ce))});function ke(z,ee){return ee=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[ee]!=null?z[ee]:me[ee]}var Ce={Backspace:xe,Enter:ge};function Le(z){for(var ee=0;ee<z.length;ee++){var oe=z.charAt(ee),ie="'"+oe+"'";Ce[ie]||(Ce[ie]=he(oe))}}Le(me.pairs+"`");function he(z){return function(ee){return ve(ee,z)}}function ye(z){var ee=z.state.closeBrackets;if(!ee||ee.override)return ee;var oe=z.getModeAt(z.getCursor());return oe.closeBrackets||ee}function xe(z){var ee=ye(z);if(!ee||z.getOption("disableInput"))return Me.Pass;for(var oe=ke(ee,"pairs"),ie=z.listSelections(),se=0;se<ie.length;se++){if(!ie[se].empty())return Me.Pass;var ue=de(z,ie[se].head);if(!ue||oe.indexOf(ue)%2!=0)return Me.Pass}for(var se=ie.length-1;se>=0;se--){var Se=ie[se].head;z.replaceRange("",Be(Se.line,Se.ch-1),Be(Se.line,Se.ch+1),"+delete")}}function ge(z){var ee=ye(z),oe=ee&&ke(ee,"explode");if(!oe||z.getOption("disableInput"))return Me.Pass;for(var ie=z.listSelections(),se=0;se<ie.length;se++){if(!ie[se].empty())return Me.Pass;var ue=de(z,ie[se].head);if(!ue||oe.indexOf(ue)%2!=0)return Me.Pass}z.operation(function(){var Se=z.lineSeparator()||`
|
|
|
`;z.replaceSelection(Se+Se,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var we=0;we<ie.length;we++){var Pe=ie[we].head.line;z.indentLine(Pe,null,!0),z.indentLine(Pe+1,null,!0)}})}function le(z){var ee=Me.cmpPos(z.anchor,z.head)>0;return{anchor:new Be(z.anchor.line,z.anchor.ch+(ee?-1:1)),head:new Be(z.head.line,z.head.ch+(ee?1:-1))}}function ve(z,ee){var oe=ye(z);if(!oe||z.getOption("disableInput"))return Me.Pass;var ie=ke(oe,"pairs"),se=ie.indexOf(ee);if(se==-1)return Me.Pass;for(var ue=ke(oe,"closeBefore"),Se=ke(oe,"triples"),we=ie.charAt(se+1)==ee,Pe=z.listSelections(),Ae=se%2==0,De,ze=0;ze<Pe.length;ze++){var Ze=Pe[ze],Xe=Ze.head,Ge,ft=z.getRange(Xe,Be(Xe.line,Xe.ch+1));if(Ae&&!Ze.empty())Ge="surround";else if((we||!Ae)&&ft==ee)we&&ce(z,Xe)?Ge="both":Se.indexOf(ee)>=0&&z.getRange(Xe,Be(Xe.line,Xe.ch+3))==ee+ee+ee?Ge="skipThree":Ge="skip";else if(we&&Xe.ch>1&&Se.indexOf(ee)>=0&&z.getRange(Be(Xe.line,Xe.ch-2),Xe)==ee+ee){if(Xe.ch>2&&/\bstring/.test(z.getTokenTypeAt(Be(Xe.line,Xe.ch-2))))return Me.Pass;Ge="addFour"}else if(we){var at=Xe.ch==0?" ":z.getRange(Be(Xe.line,Xe.ch-1),Xe);if(!Me.isWordChar(ft)&&at!=ee&&!Me.isWordChar(at))Ge="both";else return Me.Pass}else if(Ae&&(ft.length===0||/\s/.test(ft)||ue.indexOf(ft)>-1))Ge="both";else return Me.Pass;if(!De)De=Ge;else if(De!=Ge)return Me.Pass}var Ct=se%2?ie.charAt(se-1):ee,et=se%2?ee:ie.charAt(se+1);z.operation(function(){if(De=="skip")z.execCommand("goCharRight");else if(De=="skipThree")for(var yt=0;yt<3;yt++)z.execCommand("goCharRight");else if(De=="surround"){for(var st=z.getSelections(),yt=0;yt<st.length;yt++)st[yt]=Ct+st[yt]+et;z.replaceSelections(st,"around"),st=z.listSelections().slice();for(var yt=0;yt<st.length;yt++)st[yt]=le(st[yt]);z.setSelections(st)}else De=="both"?(z.replaceSelection(Ct+et,null),z.triggerElectric(Ct+et),z.execCommand("goCharLeft")):De=="addFour"&&(z.replaceSelection(Ct+Ct+Ct+Ct,"before"),z.execCommand("goCharRight"))})}function de(z,ee){var oe=z.getRange(Be(ee.line,ee.ch-1),Be(ee.line,ee.ch+1));return oe.length==2?oe:null}function ce(z,ee){var oe=z.getTokenAt(Be(ee.line,ee.ch+1));return/\bstring/.test(oe.type)&&oe.start==ee.ch&&(ee.ch==0||!/\bstring/.test(z.getTokenTypeAt(ee)))}})},6313:function(_n,en,Ee){(function(Me){Me(Ee(89780),Ee(32855))})(function(Me){Me.defineOption("autoCloseTags",!1,function(xe,ge,le){if(le!=Me.Init&&le&&xe.removeKeyMap("autoCloseTags"),!!ge){var ve={name:"autoCloseTags"};(typeof ge!="object"||ge.whenClosing!==!1)&&(ve["'/'"]=function(de){return Le(de)}),(typeof ge!="object"||ge.whenOpening!==!1)&&(ve["'>'"]=function(de){return ke(de)}),xe.addKeyMap(ve)}});var me=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Be=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function ke(xe){if(xe.getOption("disableInput"))return Me.Pass;for(var ge=xe.listSelections(),le=[],ve=xe.getOption("autoCloseTags"),de=0;de<ge.length;de++){if(!ge[de].empty())return Me.Pass;var ce=ge[de].head,z=xe.getTokenAt(ce),ee=Me.innerMode(xe.getMode(),z.state),oe=ee.state,ie=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(oe),se=ie&&ie.name;if(!se)return Me.Pass;var ue=ee.mode.configuration=="html",Se=typeof ve=="object"&&ve.dontCloseTags||ue&&me,we=typeof ve=="object"&&ve.indentTags||ue&&Be;z.end>ce.ch&&(se=se.slice(0,se.length-z.end+ce.ch));var Pe=se.toLowerCase();if(!se||z.type=="string"&&(z.end!=ce.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==ce.ch-z.start-1||Se&&he(Se,Pe)>-1||ye(xe,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(oe)||[],se,ce,!0))return Me.Pass;var Ae=typeof ve=="object"&&ve.emptyTags;if(Ae&&he(Ae,se)>-1){le[de]={text:"/>",newPos:Me.Pos(ce.line,ce.ch+2)};continue}var De=we&&he(we,Pe)>-1;le[de]={indent:De,text:">"+(De?`
|
|
|
|
|
|
`:"")+"</"+se+">",newPos:De?Me.Pos(ce.line+1,0):Me.Pos(ce.line,ce.ch+1)}}for(var ze=typeof ve=="object"&&ve.dontIndentOnAutoClose,de=ge.length-1;de>=0;de--){var Ze=le[de];xe.replaceRange(Ze.text,ge[de].head,ge[de].anchor,"+insert");var Xe=xe.listSelections().slice(0);Xe[de]={head:Ze.newPos,anchor:Ze.newPos},xe.setSelections(Xe),!ze&&Ze.indent&&(xe.indentLine(Ze.newPos.line,null,!0),xe.indentLine(Ze.newPos.line+1,null,!0))}}function Ce(xe,ge){for(var le=xe.listSelections(),ve=[],de=ge?"/":"</",ce=xe.getOption("autoCloseTags"),z=typeof ce=="object"&&ce.dontIndentOnSlash,ee=0;ee<le.length;ee++){if(!le[ee].empty())return Me.Pass;var oe=le[ee].head,ie=xe.getTokenAt(oe),se=Me.innerMode(xe.getMode(),ie.state),ue=se.state;if(ge&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=oe.ch-1))return Me.Pass;var Se,we=se.mode.name!="xml"&&xe.getMode().name=="htmlmixed";if(we&&se.mode.name=="javascript")Se=de+"script";else if(we&&se.mode.name=="css")Se=de+"style";else{var Pe=se.mode.xmlCurrentContext&&se.mode.xmlCurrentContext(ue);if(!Pe||Pe.length&&ye(xe,Pe,Pe[Pe.length-1],oe))return Me.Pass;Se=de+Pe[Pe.length-1]}xe.getLine(oe.line).charAt(ie.end)!=">"&&(Se+=">"),ve[ee]=Se}if(xe.replaceSelections(ve),le=xe.listSelections(),!z)for(var ee=0;ee<le.length;ee++)(ee==le.length-1||le[ee].head.line<le[ee+1].head.line)&&xe.indentLine(le[ee].head.line)}function Le(xe){return xe.getOption("disableInput")?Me.Pass:Ce(xe,!0)}Me.commands.closeTag=function(xe){return Ce(xe)};function he(xe,ge){if(xe.indexOf)return xe.indexOf(ge);for(var le=0,ve=xe.length;le<ve;++le)if(xe[le]==ge)return le;return-1}function ye(xe,ge,le,ve,de){if(!Me.scanForClosingTag)return!1;var ce=Math.min(xe.lastLine()+1,ve.line+500),z=Me.scanForClosingTag(xe,ve,null,ce);if(!z||z.tag!=le)return!1;for(var ee=de?1:0,oe=ge.length-1;oe>=0&&ge[oe]==le;oe--)++ee;ve=z.to;for(var oe=1;oe<ee;oe++){var ie=Me.scanForClosingTag(xe,ve,null,ce);if(!ie||ie.tag!=le)return!1;ve=ie.to}return!0}})},32855:function(_n,en,Ee){(function(Me){Me(Ee(89780))})(function(Me){"use strict";var me=Me.Pos;function Be(oe,ie){return oe.line-ie.line||oe.ch-ie.ch}var ke="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=ke+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Le=new RegExp("<(/?)(["+ke+"]["+Ce+"]*)","g");function he(oe,ie,se,ue){this.line=ie,this.ch=se,this.cm=oe,this.text=oe.getLine(ie),this.min=ue?Math.max(ue.from,oe.firstLine()):oe.firstLine(),this.max=ue?Math.min(ue.to-1,oe.lastLine()):oe.lastLine()}function ye(oe,ie){var se=oe.cm.getTokenTypeAt(me(oe.line,ie));return se&&/\btag\b/.test(se)}function xe(oe){if(!(oe.line>=oe.max))return oe.ch=0,oe.text=oe.cm.getLine(++oe.line),!0}function ge(oe){if(!(oe.line<=oe.min))return oe.text=oe.cm.getLine(--oe.line),oe.ch=oe.text.length,!0}function le(oe){for(;;){var ie=oe.text.indexOf(">",oe.ch);if(ie==-1){if(xe(oe))continue;return}if(!ye(oe,ie+1)){oe.ch=ie+1;continue}var se=oe.text.lastIndexOf("/",ie),ue=se>-1&&!/\S/.test(oe.text.slice(se+1,ie));return oe.ch=ie+1,ue?"selfClose":"regular"}}function ve(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf("<",oe.ch-1):-1;if(ie==-1){if(ge(oe))continue;return}if(!ye(oe,ie+1)){oe.ch=ie;continue}Le.lastIndex=ie,oe.ch=ie;var se=Le.exec(oe.text);if(se&&se.index==ie)return se}}function de(oe){for(;;){Le.lastIndex=oe.ch;var ie=Le.exec(oe.text);if(!ie){if(xe(oe))continue;return}if(!ye(oe,ie.index+1)){oe.ch=ie.index+1;continue}return oe.ch=ie.index+ie[0].length,ie}}function ce(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf(">",oe.ch-1):-1;if(ie==-1){if(ge(oe))continue;return}if(!ye(oe,ie+1)){oe.ch=ie;continue}var se=oe.text.lastIndexOf("/",ie),ue=se>-1&&!/\S/.test(oe.text.slice(se+1,ie));return oe.ch=ie+1,ue?"selfClose":"regular"}}function z(oe,ie){for(var se=[];;){var ue=de(oe),Se,we=oe.line,Pe=oe.ch-(ue?ue[0].length:0);if(!ue||!(Se=le(oe)))return;if(Se!="selfClose")if(ue[1]){for(var Ae=se.length-1;Ae>=0;--Ae)if(se[Ae]==ue[2]){se.length=Ae;break}if(Ae<0&&(!ie||ie==ue[2]))return{tag:ue[2],from:me(we,Pe),to:me(oe.line,oe.ch)}}else se.push(ue[2])}}function ee(oe,ie){for(var se=[];;){var ue=ce(oe);if(!ue)return;if(ue=="selfClose"){ve(oe);continue}var Se=oe.line,we=oe.ch,Pe=ve(oe);if(!Pe)return;if(Pe[1])se.push(Pe[2]);else{for(var Ae=se.length-1;Ae>=0;--Ae)if(se[Ae]==Pe[2]){se.length=Ae;break}if(Ae<0&&(!ie||ie==Pe[2]))return{tag:Pe[2],from:me(oe.line,oe.ch),to:me(Se,we)}}}}Me.registerHelper("fold","xml",function(oe,ie){for(var se=new he(oe,ie.line,0);;){var ue=de(se);if(!ue||se.line!=ie.line)return;var Se=le(se);if(!Se)return;if(!ue[1]&&Se!="selfClose"){var we=me(se.line,se.ch),Pe=z(se,ue[2]);return Pe&&Be(Pe.from,we)>0?{from:we,to:Pe.from}:null}}}),Me.findMatchingTag=function(oe,ie,se){var ue=new he(oe,ie.line,ie.ch,se);if(!(ue.text.indexOf(">")==-1&&ue.text.indexOf("<")==-1)){var Se=le(ue),we=Se&&me(ue.line,ue.ch),Pe=Se&&ve(ue);if(!(!Se||!Pe||Be(ue,ie)>0)){var Ae={from:me(ue.line,ue.ch),to:we,tag:Pe[2]};return Se=="selfClose"?{open:Ae,close:null,at:"open"}:Pe[1]?{open:ee(ue,Pe[2]),close:Ae,at:"close"}:(ue=new he(oe,we.line,we.ch,se),{open:Ae,close:z(ue,Pe[2]),at:"open"})}}},Me.findEnclosingTag=function(oe,ie,se,ue){for(var Se=new he(oe,ie.line,ie.ch,se);;){var we=ee(Se,ue);if(!we)break;var Pe=new he(oe,ie.line,ie.ch,se),Ae=z(Pe,we.tag);if(Ae)return{open:we,close:Ae}}},Me.scanForClosingTag=function(oe,ie,se,ue){var Se=new he(oe,ie.line,ie.ch,ue?{from:0,to:ue}:null);return z(Se,se)}})},89780:function(_n){(function(en,Ee){_n.exports=Ee()})(this,function(){"use strict";var en=navigator.userAgent,Ee=navigator.platform,Me=/gecko\/\d/i.test(en),me=/MSIE \d/.test(en),Be=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(en),ke=/Edge\/(\d+)/.exec(en),Ce=me||Be||ke,Le=Ce&&(me?document.documentMode||6:+(ke||Be)[1]),he=!ke&&/WebKit\//.test(en),ye=he&&/Qt\/\d+\.\d+/.test(en),xe=!ke&&/Chrome\//.test(en),ge=/Opera\//.test(en),le=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(en),de=/PhantomJS/.test(en),ce=!ke&&/AppleWebKit/.test(en)&&/Mobile\/\w+/.test(en),z=/Android/.test(en),ee=ce||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(en),oe=ce||/Mac/.test(Ee),ie=/\bCrOS\b/.test(en),se=/win/i.test(Ee),ue=ge&&en.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(ge=!1,he=!0);var Se=oe&&(ye||ge&&(ue==null||ue<12.11)),we=Me||Ce&&Le>=9;function Pe(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var Ae=function(re,pe){var Fe=re.className,Re=Pe(pe).exec(Fe);if(Re){var Ue=Fe.slice(Re.index+Re[0].length);re.className=Fe.slice(0,Re.index)+(Ue?Re[1]+Ue:"")}};function De(re){for(var pe=re.childNodes.length;pe>0;--pe)re.removeChild(re.firstChild);return re}function ze(re,pe){return De(re).appendChild(pe)}function Ze(re,pe,Fe,Re){var Ue=document.createElement(re);if(Fe&&(Ue.className=Fe),Re&&(Ue.style.cssText=Re),typeof pe=="string")Ue.appendChild(document.createTextNode(pe));else if(pe)for(var ot=0;ot<pe.length;++ot)Ue.appendChild(pe[ot]);return Ue}function Xe(re,pe,Fe,Re){var Ue=Ze(re,pe,Fe,Re);return Ue.setAttribute("role","presentation"),Ue}var Ge;document.createRange?Ge=function(re,pe,Fe,Re){var Ue=document.createRange();return Ue.setEnd(Re||re,Fe),Ue.setStart(re,pe),Ue}:Ge=function(re,pe,Fe){var Re=document.body.createTextRange();try{Re.moveToElementText(re.parentNode)}catch(Ue){return Re}return Re.collapse(!0),Re.moveEnd("character",Fe),Re.moveStart("character",pe),Re};function ft(re,pe){if(pe.nodeType==3&&(pe=pe.parentNode),re.contains)return re.contains(pe);do if(pe.nodeType==11&&(pe=pe.host),pe==re)return!0;while(pe=pe.parentNode)}function at(){var re;try{re=document.activeElement}catch(pe){re=document.body||null}for(;re&&re.shadowRoot&&re.shadowRoot.activeElement;)re=re.shadowRoot.activeElement;return re}function Ct(re,pe){var Fe=re.className;Pe(pe).test(Fe)||(re.className+=(Fe?" ":"")+pe)}function et(re,pe){for(var Fe=re.split(" "),Re=0;Re<Fe.length;Re++)Fe[Re]&&!Pe(Fe[Re]).test(pe)&&(pe+=" "+Fe[Re]);return pe}var yt=function(re){re.select()};ce?yt=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:Ce&&(yt=function(re){try{re.select()}catch(pe){}});function st(re){var pe=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,pe)}}function zt(re,pe,Fe){pe||(pe={});for(var Re in re)re.hasOwnProperty(Re)&&(Fe!==!1||!pe.hasOwnProperty(Re))&&(pe[Re]=re[Re]);return pe}function lt(re,pe,Fe,Re,Ue){pe==null&&(pe=re.search(/[^\s\u00a0]/),pe==-1&&(pe=re.length));for(var ot=Re||0,wt=Ue||0;;){var Rt=re.indexOf(" ",ot);if(Rt<0||Rt>=pe)return wt+(pe-ot);wt+=Rt-ot,wt+=Fe-wt%Fe,ot=Rt+1}}var tt=function(){this.id=null,this.f=null,this.time=0,this.handler=st(this.onTimeout,this)};tt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},tt.prototype.set=function(re,pe){this.f=pe;var Fe=+new Date+re;(!this.id||Fe<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=Fe)};function ut(re,pe){for(var Fe=0;Fe<re.length;++Fe)if(re[Fe]==pe)return Fe;return-1}var mt=50,Pt={toString:function(){return"CodeMirror.Pass"}},gt={scroll:!1},Ft={origin:"*mouse"},Ht={origin:"+move"};function hn(re,pe,Fe){for(var Re=0,Ue=0;;){var ot=re.indexOf(" ",Re);ot==-1&&(ot=re.length);var wt=ot-Re;if(ot==re.length||Ue+wt>=pe)return Re+Math.min(wt,pe-Ue);if(Ue+=ot-Re,Ue+=Fe-Ue%Fe,Re=ot+1,Ue>=pe)return Re}}var Qt=[""];function bn(re){for(;Qt.length<=re;)Qt.push(Wt(Qt)+" ");return Qt[re]}function Wt(re){return re[re.length-1]}function Kt(re,pe){for(var Fe=[],Re=0;Re<re.length;Re++)Fe[Re]=pe(re[Re],Re);return Fe}function Jt(re,pe,Fe){for(var Re=0,Ue=Fe(pe);Re<re.length&&Fe(re[Re])<=Ue;)Re++;re.splice(Re,0,pe)}function Yt(){}function kt(re,pe){var Fe;return Object.create?Fe=Object.create(re):(Yt.prototype=re,Fe=new Yt),pe&&zt(pe,Fe),Fe}var pt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Bt(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||pt.test(re))}function xt(re,pe){return pe?pe.source.indexOf("\\w")>-1&&Bt(re)?!0:pe.test(re):Bt(re)}function vt(re){for(var pe in re)if(re.hasOwnProperty(pe)&&re[pe])return!1;return!0}var nt=/[\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 He(re){return re.charCodeAt(0)>=768&&nt.test(re)}function Ie(re,pe,Fe){for(;(Fe<0?pe>0:pe<re.length)&&He(re.charAt(pe));)pe+=Fe;return pe}function We(re,pe,Fe){for(var Re=pe>Fe?-1:1;;){if(pe==Fe)return pe;var Ue=(pe+Fe)/2,ot=Re<0?Math.ceil(Ue):Math.floor(Ue);if(ot==pe)return re(ot)?pe:Fe;re(ot)?Fe=ot:pe=ot+Re}}function Oe(re,pe,Fe,Re){if(!re)return Re(pe,Fe,"ltr",0);for(var Ue=!1,ot=0;ot<re.length;++ot){var wt=re[ot];(wt.from<Fe&&wt.to>pe||pe==Fe&&wt.to==pe)&&(Re(Math.max(wt.from,pe),Math.min(wt.to,Fe),wt.level==1?"rtl":"ltr",ot),Ue=!0)}Ue||Re(pe,Fe,"ltr")}var be=null;function Ne(re,pe,Fe){var Re;be=null;for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue];if(ot.from<pe&&ot.to>pe)return Ue;ot.to==pe&&(ot.from!=ot.to&&Fe=="before"?Re=Ue:be=Ue),ot.from==pe&&(ot.from!=ot.to&&Fe!="before"?Re=Ue:be=Ue)}return Re!=null?Re:be}var $e=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",pe="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Fe(Xt){return Xt<=247?re.charAt(Xt):1424<=Xt&&Xt<=1524?"R":1536<=Xt&&Xt<=1785?pe.charAt(Xt-1536):1774<=Xt&&Xt<=2220?"r":8192<=Xt&&Xt<=8203?"w":Xt==8204?"b":"L"}var Re=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Ue=/[stwN]/,ot=/[LRr]/,wt=/[Lb1n]/,Rt=/[1n]/;function It(Xt,Tn,nn){this.level=Xt,this.from=Tn,this.to=nn}return function(Xt,Tn){var nn=Tn=="ltr"?"L":"R";if(Xt.length==0||Tn=="ltr"&&!Re.test(Xt))return!1;for(var Un=Xt.length,Fn=[],mi=0;mi<Un;++mi)Fn.push(Fe(Xt.charCodeAt(mi)));for(var _i=0,Bi=nn;_i<Un;++_i){var rr=Fn[_i];rr=="m"?Fn[_i]=Bi:Bi=rr}for(var Rr=0,wr=nn;Rr<Un;++Rr){var Zr=Fn[Rr];Zr=="1"&&wr=="r"?Fn[Rr]="n":ot.test(Zr)&&(wr=Zr,Zr=="r"&&(Fn[Rr]="R"))}for(var bo=1,xr=Fn[0];bo<Un-1;++bo){var zo=Fn[bo];zo=="+"&&xr=="1"&&Fn[bo+1]=="1"?Fn[bo]="1":zo==","&&xr==Fn[bo+1]&&(xr=="1"||xr=="n")&&(Fn[bo]=xr),xr=zo}for(var ca=0;ca<Un;++ca){var Ya=Fn[ca];if(Ya==",")Fn[ca]="N";else if(Ya=="%"){var va=void 0;for(va=ca+1;va<Un&&Fn[va]=="%";++va);for(var nu=ca&&Fn[ca-1]=="!"||va<Un&&Fn[va]=="1"?"1":"N",Ml=ca;Ml<va;++Ml)Fn[Ml]=nu;ca=va-1}}for(var ja=0,gu=nn;ja<Un;++ja){var pl=Fn[ja];gu=="L"&&pl=="1"?Fn[ja]="L":ot.test(pl)&&(gu=pl)}for(var za=0;za<Un;++za)if(Ue.test(Fn[za])){var ws=void 0;for(ws=za+1;ws<Un&&Ue.test(Fn[ws]);++ws);for(var Ca=(za?Fn[za-1]:nn)=="L",tl=(ws<Un?Fn[ws]:nn)=="L",gl=Ca==tl?Ca?"L":"R":nn,lc=za;lc<ws;++lc)Fn[lc]=gl;za=ws-1}for(var ya=[],Vu,Ta=0;Ta<Un;)if(wt.test(Fn[Ta])){var Ef=Ta;for(++Ta;Ta<Un&&wt.test(Fn[Ta]);++Ta);ya.push(new It(0,Ef,Ta))}else{var Iu=Ta,mu=ya.length,iu=Tn=="rtl"?1:0;for(++Ta;Ta<Un&&Fn[Ta]!="L";++Ta);for(var ea=Iu;ea<Ta;)if(Rt.test(Fn[ea])){Iu<ea&&(ya.splice(mu,0,new It(1,Iu,ea)),mu+=iu);var nl=ea;for(++ea;ea<Ta&&Rt.test(Fn[ea]);++ea);ya.splice(mu,0,new It(2,nl,ea)),mu+=iu,Iu=ea}else++ea;Iu<Ta&&ya.splice(mu,0,new It(1,Iu,Ta))}return Tn=="ltr"&&(ya[0].level==1&&(Vu=Xt.match(/^\s+/))&&(ya[0].from=Vu[0].length,ya.unshift(new It(0,0,Vu[0].length))),Wt(ya).level==1&&(Vu=Xt.match(/\s+$/))&&(Wt(ya).to-=Vu[0].length,ya.push(new It(0,Un-Vu[0].length,Un)))),Tn=="rtl"?ya.reverse():ya}}();function dt(re,pe){var Fe=re.order;return Fe==null&&(Fe=re.order=$e(re.text,pe)),Fe}var Je=[],At=function(re,pe,Fe){if(re.addEventListener)re.addEventListener(pe,Fe,!1);else if(re.attachEvent)re.attachEvent("on"+pe,Fe);else{var Re=re._handlers||(re._handlers={});Re[pe]=(Re[pe]||Je).concat(Fe)}};function tn(re,pe){return re._handlers&&re._handlers[pe]||Je}function pn(re,pe,Fe){if(re.removeEventListener)re.removeEventListener(pe,Fe,!1);else if(re.detachEvent)re.detachEvent("on"+pe,Fe);else{var Re=re._handlers,Ue=Re&&Re[pe];if(Ue){var ot=ut(Ue,Fe);ot>-1&&(Re[pe]=Ue.slice(0,ot).concat(Ue.slice(ot+1)))}}}function ln(re,pe){var Fe=tn(re,pe);if(Fe.length)for(var Re=Array.prototype.slice.call(arguments,2),Ue=0;Ue<Fe.length;++Ue)Fe[Ue].apply(null,Re)}function gn(re,pe,Fe){return typeof pe=="string"&&(pe={type:pe,preventDefault:function(){this.defaultPrevented=!0}}),ln(re,Fe||pe.type,re,pe),Ci(pe)||pe.codemirrorIgnore}function Hn(re){var pe=re._handlers&&re._handlers.cursorActivity;if(pe)for(var Fe=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),Re=0;Re<pe.length;++Re)ut(Fe,pe[Re])==-1&&Fe.push(pe[Re])}function An(re,pe){return tn(re,pe).length>0}function qn(re){re.prototype.on=function(pe,Fe){At(this,pe,Fe)},re.prototype.off=function(pe,Fe){pn(this,pe,Fe)}}function ai(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Ti(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function Ci(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function $i(re){ai(re),Ti(re)}function or(re){return re.target||re.srcElement}function lr(re){var pe=re.which;return pe==null&&(re.button&1?pe=1:re.button&2?pe=3:re.button&4&&(pe=2)),oe&&re.ctrlKey&&pe==1&&(pe=3),pe}var qi=function(){if(Ce&&Le<9)return!1;var re=Ze("div");return"draggable"in re||"dragDrop"in re}(),Fr;function Mr(re){if(Fr==null){var pe=Ze("span","\u200B");ze(re,Ze("span",[pe,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(Fr=pe.offsetWidth<=1&&pe.offsetHeight>2&&!(Ce&&Le<8))}var Fe=Fr?Ze("span","\u200B"):Ze("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Fe.setAttribute("cm-text",""),Fe}var yi;function dr(re){if(yi!=null)return yi;var pe=ze(re,document.createTextNode("A\u062EA")),Fe=Ge(pe,0,1).getBoundingClientRect(),Re=Ge(pe,1,2).getBoundingClientRect();return De(re),!Fe||Fe.left==Fe.right?!1:yi=Re.right-Fe.right<3}var Zi=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(re){for(var pe=0,Fe=[],Re=re.length;pe<=Re;){var Ue=re.indexOf(`
|
|
|
`,pe);Ue==-1&&(Ue=re.length);var ot=re.slice(pe,re.charAt(Ue-1)=="\r"?Ue-1:Ue),wt=ot.indexOf("\r");wt!=-1?(Fe.push(ot.slice(0,wt)),pe+=wt+1):(Fe.push(ot),pe=Ue+1)}return Fe}:function(re){return re.split(/\r\n?|\n/)},rt=window.getSelection?function(re){try{return re.selectionStart!=re.selectionEnd}catch(pe){return!1}}:function(re){var pe;try{pe=re.ownerDocument.selection.createRange()}catch(Fe){}return!pe||pe.parentElement()!=re?!1:pe.compareEndPoints("StartToEnd",pe)!=0},Ir=function(){var re=Ze("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),Ar=null;function $r(re){if(Ar!=null)return Ar;var pe=ze(re,Ze("span","x")),Fe=pe.getBoundingClientRect(),Re=Ge(pe,0,1).getBoundingClientRect();return Ar=Math.abs(Fe.left-Re.left)>1}var co={},mo={};function no(re,pe){arguments.length>2&&(pe.dependencies=Array.prototype.slice.call(arguments,2)),co[re]=pe}function lo(re,pe){mo[re]=pe}function ri(re){if(typeof re=="string"&&mo.hasOwnProperty(re))re=mo[re];else if(re&&typeof re.name=="string"&&mo.hasOwnProperty(re.name)){var pe=mo[re.name];typeof pe=="string"&&(pe={name:pe}),re=kt(pe,re),re.name=pe.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return ri("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return ri("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function Ke(re,pe){pe=ri(pe);var Fe=co[pe.name];if(!Fe)return Ke(re,"text/plain");var Re=Fe(re,pe);if(qe.hasOwnProperty(pe.name)){var Ue=qe[pe.name];for(var ot in Ue)Ue.hasOwnProperty(ot)&&(Re.hasOwnProperty(ot)&&(Re["_"+ot]=Re[ot]),Re[ot]=Ue[ot])}if(Re.name=pe.name,pe.helperType&&(Re.helperType=pe.helperType),pe.modeProps)for(var wt in pe.modeProps)Re[wt]=pe.modeProps[wt];return Re}var qe={};function Ye(re,pe){var Fe=qe.hasOwnProperty(re)?qe[re]:qe[re]={};zt(pe,Fe)}function St(re,pe){if(pe===!0)return pe;if(re.copyState)return re.copyState(pe);var Fe={};for(var Re in pe){var Ue=pe[Re];Ue instanceof Array&&(Ue=Ue.concat([])),Fe[Re]=Ue}return Fe}function Ot(re,pe){for(var Fe;re.innerMode&&(Fe=re.innerMode(pe),!(!Fe||Fe.mode==re));)pe=Fe.state,re=Fe.mode;return Fe||{mode:re,state:pe}}function Tt(re,pe,Fe){return re.startState?re.startState(pe,Fe):!0}var _t=function(re,pe,Fe){this.pos=this.start=0,this.string=re,this.tabSize=pe||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Fe};_t.prototype.eol=function(){return this.pos>=this.string.length},_t.prototype.sol=function(){return this.pos==this.lineStart},_t.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},_t.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},_t.prototype.eat=function(re){var pe=this.string.charAt(this.pos),Fe;if(typeof re=="string"?Fe=pe==re:Fe=pe&&(re.test?re.test(pe):re(pe)),Fe)return++this.pos,pe},_t.prototype.eatWhile=function(re){for(var pe=this.pos;this.eat(re););return this.pos>pe},_t.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},_t.prototype.skipToEnd=function(){this.pos=this.string.length},_t.prototype.skipTo=function(re){var pe=this.string.indexOf(re,this.pos);if(pe>-1)return this.pos=pe,!0},_t.prototype.backUp=function(re){this.pos-=re},_t.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=lt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},_t.prototype.indentation=function(){return lt(this.string,null,this.tabSize)-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},_t.prototype.match=function(re,pe,Fe){if(typeof re=="string"){var Re=function(wt){return Fe?wt.toLowerCase():wt},Ue=this.string.substr(this.pos,re.length);if(Re(Ue)==Re(re))return pe!==!1&&(this.pos+=re.length),!0}else{var ot=this.string.slice(this.pos).match(re);return ot&&ot.index>0?null:(ot&&pe!==!1&&(this.pos+=ot[0].length),ot)}},_t.prototype.current=function(){return this.string.slice(this.start,this.pos)},_t.prototype.hideFirstChars=function(re,pe){this.lineStart+=re;try{return pe()}finally{this.lineStart-=re}},_t.prototype.lookAhead=function(re){var pe=this.lineOracle;return pe&&pe.lookAhead(re)},_t.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function dn(re,pe){if(pe-=re.first,pe<0||pe>=re.size)throw new Error("There is no line "+(pe+re.first)+" in the document.");for(var Fe=re;!Fe.lines;)for(var Re=0;;++Re){var Ue=Fe.children[Re],ot=Ue.chunkSize();if(pe<ot){Fe=Ue;break}pe-=ot}return Fe.lines[pe]}function Pn(re,pe,Fe){var Re=[],Ue=pe.line;return re.iter(pe.line,Fe.line+1,function(ot){var wt=ot.text;Ue==Fe.line&&(wt=wt.slice(0,Fe.ch)),Ue==pe.line&&(wt=wt.slice(pe.ch)),Re.push(wt),++Ue}),Re}function mn(re,pe,Fe){var Re=[];return re.iter(pe,Fe,function(Ue){Re.push(Ue.text)}),Re}function sn(re,pe){var Fe=pe-re.height;if(Fe)for(var Re=re;Re;Re=Re.parent)Re.height+=Fe}function Nt(re){if(re.parent==null)return null;for(var pe=re.parent,Fe=ut(pe.lines,re),Re=pe.parent;Re;pe=Re,Re=Re.parent)for(var Ue=0;Re.children[Ue]!=pe;++Ue)Fe+=Re.children[Ue].chunkSize();return Fe+pe.first}function un(re,pe){var Fe=re.first;e:do{for(var Re=0;Re<re.children.length;++Re){var Ue=re.children[Re],ot=Ue.height;if(pe<ot){re=Ue;continue e}pe-=ot,Fe+=Ue.chunkSize()}return Fe}while(!re.lines);for(var wt=0;wt<re.lines.length;++wt){var Rt=re.lines[wt],It=Rt.height;if(pe<It)break;pe-=It}return Fe+wt}function Ln(re,pe){return pe>=re.first&&pe<re.first+re.size}function Dn(re,pe){return String(re.lineNumberFormatter(pe+re.firstLineNumber))}function $t(re,pe,Fe){if(Fe===void 0&&(Fe=null),!(this instanceof $t))return new $t(re,pe,Fe);this.line=re,this.ch=pe,this.sticky=Fe}function rn(re,pe){return re.line-pe.line||re.ch-pe.ch}function jn(re,pe){return re.sticky==pe.sticky&&rn(re,pe)==0}function On(re){return $t(re.line,re.ch)}function ei(re,pe){return rn(re,pe)<0?pe:re}function Gn(re,pe){return rn(re,pe)<0?re:pe}function ti(re,pe){return Math.max(re.first,Math.min(pe,re.first+re.size-1))}function Bn(re,pe){if(pe.line<re.first)return $t(re.first,0);var Fe=re.first+re.size-1;return pe.line>Fe?$t(Fe,dn(re,Fe).text.length):li(pe,dn(re,pe.line).text.length)}function li(re,pe){var Fe=re.ch;return Fe==null||Fe>pe?$t(re.line,pe):Fe<0?$t(re.line,0):re}function Di(re,pe){for(var Fe=[],Re=0;Re<pe.length;Re++)Fe[Re]=Bn(re,pe[Re]);return Fe}var Ri=function(re,pe){this.state=re,this.lookAhead=pe},Mn=function(re,pe,Fe,Re){this.state=pe,this.doc=re,this.line=Fe,this.maxLookAhead=Re||0,this.baseTokens=null,this.baseTokenPos=1};Mn.prototype.lookAhead=function(re){var pe=this.doc.getLine(this.line+re);return pe!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),pe},Mn.prototype.baseToken=function(re){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=re;)this.baseTokenPos+=2;var pe=this.baseTokens[this.baseTokenPos+1];return{type:pe&&pe.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-re}},Mn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Mn.fromSaved=function(re,pe,Fe){return pe instanceof Ri?new Mn(re,St(re.mode,pe.state),Fe,pe.lookAhead):new Mn(re,St(re.mode,pe),Fe)},Mn.prototype.save=function(re){var pe=re!==!1?St(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ri(pe,this.maxLookAhead):pe};function Xi(re,pe,Fe,Re){var Ue=[re.state.modeGen],ot={};tr(re,pe.text,re.doc.mode,Fe,function(Xt,Tn){return Ue.push(Xt,Tn)},ot,Re);for(var wt=Fe.state,Rt=function(Xt){Fe.baseTokens=Ue;var Tn=re.state.overlays[Xt],nn=1,Un=0;Fe.state=!0,tr(re,pe.text,Tn.mode,Fe,function(Fn,mi){for(var _i=nn;Un<Fn;){var Bi=Ue[nn];Bi>Fn&&Ue.splice(nn,1,Fn,Ue[nn+1],Bi),nn+=2,Un=Math.min(Fn,Bi)}if(mi)if(Tn.opaque)Ue.splice(_i,nn-_i,Fn,"overlay "+mi),nn=_i+2;else for(;_i<nn;_i+=2){var rr=Ue[_i+1];Ue[_i+1]=(rr?rr+" ":"")+"overlay "+mi}},ot),Fe.state=wt,Fe.baseTokens=null,Fe.baseTokenPos=1},It=0;It<re.state.overlays.length;++It)Rt(It);return{styles:Ue,classes:ot.bgClass||ot.textClass?ot:null}}function Nr(re,pe,Fe){if(!pe.styles||pe.styles[0]!=re.state.modeGen){var Re=zi(re,Nt(pe)),Ue=pe.text.length>re.options.maxHighlightLength&&St(re.doc.mode,Re.state),ot=Xi(re,pe,Re);Ue&&(Re.state=Ue),pe.stateAfter=Re.save(!Ue),pe.styles=ot.styles,ot.classes?pe.styleClasses=ot.classes:pe.styleClasses&&(pe.styleClasses=null),Fe===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return pe.styles}function zi(re,pe,Fe){var Re=re.doc,Ue=re.display;if(!Re.mode.startState)return new Mn(Re,!0,pe);var ot=Fi(re,pe,Fe),wt=ot>Re.first&&dn(Re,ot-1).stateAfter,Rt=wt?Mn.fromSaved(Re,wt,ot):new Mn(Re,Tt(Re.mode),ot);return Re.iter(ot,pe,function(It){En(re,It.text,Rt);var Xt=Rt.line;It.stateAfter=Xt==pe-1||Xt%5==0||Xt>=Ue.viewFrom&&Xt<Ue.viewTo?Rt.save():null,Rt.nextLine()}),Fe&&(Re.modeFrontier=Rt.line),Rt}function En(re,pe,Fe,Re){var Ue=re.doc.mode,ot=new _t(pe,re.options.tabSize,Fe);for(ot.start=ot.pos=Re||0,pe==""&&Jn(Ue,Fe.state);!ot.eol();)fi(Ue,ot,Fe.state),ot.start=ot.pos}function Jn(re,pe){if(re.blankLine)return re.blankLine(pe);if(re.innerMode){var Fe=Ot(re,pe);if(Fe.mode.blankLine)return Fe.mode.blankLine(Fe.state)}}function fi(re,pe,Fe,Re){for(var Ue=0;Ue<10;Ue++){Re&&(Re[0]=Ot(re,Fe).mode);var ot=re.token(pe,Fe);if(pe.pos>pe.start)return ot}throw new Error("Mode "+re.name+" failed to advance stream.")}var Si=function(re,pe,Fe){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=pe||null,this.state=Fe};function hi(re,pe,Fe,Re){var Ue=re.doc,ot=Ue.mode,wt;pe=Bn(Ue,pe);var Rt=dn(Ue,pe.line),It=zi(re,pe.line,Fe),Xt=new _t(Rt.text,re.options.tabSize,It),Tn;for(Re&&(Tn=[]);(Re||Xt.pos<pe.ch)&&!Xt.eol();)Xt.start=Xt.pos,wt=fi(ot,Xt,It.state),Re&&Tn.push(new Si(Xt,wt,St(Ue.mode,It.state)));return Re?Tn:new Si(Xt,wt,It.state)}function Oi(re,pe){if(re)for(;;){var Fe=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Fe)break;re=re.slice(0,Fe.index)+re.slice(Fe.index+Fe[0].length);var Re=Fe[1]?"bgClass":"textClass";pe[Re]==null?pe[Re]=Fe[2]:new RegExp("(?:^|\\s)"+Fe[2]+"(?:$|\\s)").test(pe[Re])||(pe[Re]+=" "+Fe[2])}return re}function tr(re,pe,Fe,Re,Ue,ot,wt){var Rt=Fe.flattenSpans;Rt==null&&(Rt=re.options.flattenSpans);var It=0,Xt=null,Tn=new _t(pe,re.options.tabSize,Re),nn,Un=re.options.addModeClass&&[null];for(pe==""&&Oi(Jn(Fe,Re.state),ot);!Tn.eol();){if(Tn.pos>re.options.maxHighlightLength?(Rt=!1,wt&&En(re,pe,Re,Tn.pos),Tn.pos=pe.length,nn=null):nn=Oi(fi(Fe,Tn,Re.state,Un),ot),Un){var Fn=Un[0].name;Fn&&(nn="m-"+(nn?Fn+" "+nn:Fn))}if(!Rt||Xt!=nn){for(;It<Tn.start;)It=Math.min(Tn.start,It+5e3),Ue(It,Xt);Xt=nn}Tn.start=Tn.pos}for(;It<Tn.pos;){var mi=Math.min(Tn.pos,It+5e3);Ue(mi,Xt),It=mi}}function Fi(re,pe,Fe){for(var Re,Ue,ot=re.doc,wt=Fe?-1:pe-(re.doc.mode.innerMode?1e3:100),Rt=pe;Rt>wt;--Rt){if(Rt<=ot.first)return ot.first;var It=dn(ot,Rt-1),Xt=It.stateAfter;if(Xt&&(!Fe||Rt+(Xt instanceof Ri?Xt.lookAhead:0)<=ot.modeFrontier))return Rt;var Tn=lt(It.text,null,re.options.tabSize);(Ue==null||Re>Tn)&&(Ue=Rt-1,Re=Tn)}return Ue}function Hi(re,pe){if(re.modeFrontier=Math.min(re.modeFrontier,pe),!(re.highlightFrontier<pe-10)){for(var Fe=re.first,Re=pe-1;Re>Fe;Re--){var Ue=dn(re,Re).stateAfter;if(Ue&&(!(Ue instanceof Ri)||Re+Ue.lookAhead<pe)){Fe=Re+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Fe)}}var mr=!1,Rn=!1;function Br(){mr=!0}function Nn(){Rn=!0}function vr(re,pe,Fe){this.marker=re,this.from=pe,this.to=Fe}function So(re,pe){if(re)for(var Fe=0;Fe<re.length;++Fe){var Re=re[Fe];if(Re.marker==pe)return Re}}function Dr(re,pe){for(var Fe,Re=0;Re<re.length;++Re)re[Re]!=pe&&(Fe||(Fe=[])).push(re[Re]);return Fe}function Co(re,pe){re.markedSpans=re.markedSpans?re.markedSpans.concat([pe]):[pe],pe.marker.attachLine(re)}function ho(re,pe,Fe){var Re;if(re)for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue],wt=ot.marker,Rt=ot.from==null||(wt.inclusiveLeft?ot.from<=pe:ot.from<pe);if(Rt||ot.from==pe&&wt.type=="bookmark"&&(!Fe||!ot.marker.insertLeft)){var It=ot.to==null||(wt.inclusiveRight?ot.to>=pe:ot.to>pe);(Re||(Re=[])).push(new vr(wt,ot.from,It?null:ot.to))}}return Re}function Yi(re,pe,Fe){var Re;if(re)for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue],wt=ot.marker,Rt=ot.to==null||(wt.inclusiveRight?ot.to>=pe:ot.to>pe);if(Rt||ot.from==pe&&wt.type=="bookmark"&&(!Fe||ot.marker.insertLeft)){var It=ot.from==null||(wt.inclusiveLeft?ot.from<=pe:ot.from<pe);(Re||(Re=[])).push(new vr(wt,It?null:ot.from-pe,ot.to==null?null:ot.to-pe))}}return Re}function Ui(re,pe){if(pe.full)return null;var Fe=Ln(re,pe.from.line)&&dn(re,pe.from.line).markedSpans,Re=Ln(re,pe.to.line)&&dn(re,pe.to.line).markedSpans;if(!Fe&&!Re)return null;var Ue=pe.from.ch,ot=pe.to.ch,wt=rn(pe.from,pe.to)==0,Rt=ho(Fe,Ue,wt),It=Yi(Re,ot,wt),Xt=pe.text.length==1,Tn=Wt(pe.text).length+(Xt?Ue:0);if(Rt)for(var nn=0;nn<Rt.length;++nn){var Un=Rt[nn];if(Un.to==null){var Fn=So(It,Un.marker);Fn?Xt&&(Un.to=Fn.to==null?null:Fn.to+Tn):Un.to=Ue}}if(It)for(var mi=0;mi<It.length;++mi){var _i=It[mi];if(_i.to!=null&&(_i.to+=Tn),_i.from==null){var Bi=So(Rt,_i.marker);Bi||(_i.from=Tn,Xt&&(Rt||(Rt=[])).push(_i))}else _i.from+=Tn,Xt&&(Rt||(Rt=[])).push(_i)}Rt&&(Rt=hr(Rt)),It&&It!=Rt&&(It=hr(It));var rr=[Rt];if(!Xt){var Rr=pe.text.length-2,wr;if(Rr>0&&Rt)for(var Zr=0;Zr<Rt.length;++Zr)Rt[Zr].to==null&&(wr||(wr=[])).push(new vr(Rt[Zr].marker,null,null));for(var bo=0;bo<Rr;++bo)rr.push(wr);rr.push(It)}return rr}function hr(re){for(var pe=0;pe<re.length;++pe){var Fe=re[pe];Fe.from!=null&&Fe.from==Fe.to&&Fe.marker.clearWhenEmpty!==!1&&re.splice(pe--,1)}return re.length?re:null}function Pr(re,pe,Fe){var Re=null;if(re.iter(pe.line,Fe.line+1,function(Fn){if(Fn.markedSpans)for(var mi=0;mi<Fn.markedSpans.length;++mi){var _i=Fn.markedSpans[mi].marker;_i.readOnly&&(!Re||ut(Re,_i)==-1)&&(Re||(Re=[])).push(_i)}}),!Re)return null;for(var Ue=[{from:pe,to:Fe}],ot=0;ot<Re.length;++ot)for(var wt=Re[ot],Rt=wt.find(0),It=0;It<Ue.length;++It){var Xt=Ue[It];if(!(rn(Xt.to,Rt.from)<0||rn(Xt.from,Rt.to)>0)){var Tn=[It,1],nn=rn(Xt.from,Rt.from),Un=rn(Xt.to,Rt.to);(nn<0||!wt.inclusiveLeft&&!nn)&&Tn.push({from:Xt.from,to:Rt.from}),(Un>0||!wt.inclusiveRight&&!Un)&&Tn.push({from:Rt.to,to:Xt.to}),Ue.splice.apply(Ue,Tn),It+=Tn.length-3}}return Ue}function ci(re){var pe=re.markedSpans;if(pe){for(var Fe=0;Fe<pe.length;++Fe)pe[Fe].marker.detachLine(re);re.markedSpans=null}}function Mt(re,pe){if(pe){for(var Fe=0;Fe<pe.length;++Fe)pe[Fe].marker.attachLine(re);re.markedSpans=pe}}function Ur(re){return re.inclusiveLeft?-1:0}function Hr(re){return re.inclusiveRight?1:0}function ts(re,pe){var Fe=re.lines.length-pe.lines.length;if(Fe!=0)return Fe;var Re=re.find(),Ue=pe.find(),ot=rn(Re.from,Ue.from)||Ur(re)-Ur(pe);if(ot)return-ot;var wt=rn(Re.to,Ue.to)||Hr(re)-Hr(pe);return wt||pe.id-re.id}function Ao(re,pe){var Fe=Rn&&re.markedSpans,Re;if(Fe)for(var Ue=void 0,ot=0;ot<Fe.length;++ot)Ue=Fe[ot],Ue.marker.collapsed&&(pe?Ue.from:Ue.to)==null&&(!Re||ts(Re,Ue.marker)<0)&&(Re=Ue.marker);return Re}function ss(re){return Ao(re,!0)}function _r(re){return Ao(re,!1)}function fr(re,pe){var Fe=Rn&&re.markedSpans,Re;if(Fe)for(var Ue=0;Ue<Fe.length;++Ue){var ot=Fe[Ue];ot.marker.collapsed&&(ot.from==null||ot.from<pe)&&(ot.to==null||ot.to>pe)&&(!Re||ts(Re,ot.marker)<0)&&(Re=ot.marker)}return Re}function Kr(re,pe,Fe,Re,Ue){var ot=dn(re,pe),wt=Rn&&ot.markedSpans;if(wt)for(var Rt=0;Rt<wt.length;++Rt){var It=wt[Rt];if(It.marker.collapsed){var Xt=It.marker.find(0),Tn=rn(Xt.from,Fe)||Ur(It.marker)-Ur(Ue),nn=rn(Xt.to,Re)||Hr(It.marker)-Hr(Ue);if(!(Tn>=0&&nn<=0||Tn<=0&&nn>=0)&&(Tn<=0&&(It.marker.inclusiveRight&&Ue.inclusiveLeft?rn(Xt.to,Fe)>=0:rn(Xt.to,Fe)>0)||Tn>=0&&(It.marker.inclusiveRight&&Ue.inclusiveLeft?rn(Xt.from,Re)<=0:rn(Xt.from,Re)<0)))return!0}}}function pr(re){for(var pe;pe=ss(re);)re=pe.find(-1,!0).line;return re}function eo(re){for(var pe;pe=_r(re);)re=pe.find(1,!0).line;return re}function Yo(re){for(var pe,Fe;pe=_r(re);)re=pe.find(1,!0).line,(Fe||(Fe=[])).push(re);return Fe}function sr(re,pe){var Fe=dn(re,pe),Re=pr(Fe);return Fe==Re?pe:Nt(Re)}function Ki(re,pe){if(pe>re.lastLine())return pe;var Fe=dn(re,pe),Re;if(!Xn(re,Fe))return pe;for(;Re=_r(Fe);)Fe=Re.find(1,!0).line;return Nt(Fe)+1}function Xn(re,pe){var Fe=Rn&&pe.markedSpans;if(Fe){for(var Re=void 0,Ue=0;Ue<Fe.length;++Ue)if(Re=Fe[Ue],!!Re.marker.collapsed){if(Re.from==null)return!0;if(!Re.marker.widgetNode&&Re.from==0&&Re.marker.inclusiveLeft&&ar(re,pe,Re))return!0}}}function ar(re,pe,Fe){if(Fe.to==null){var Re=Fe.marker.find(1,!0);return ar(re,Re.line,So(Re.line.markedSpans,Fe.marker))}if(Fe.marker.inclusiveRight&&Fe.to==pe.text.length)return!0;for(var Ue=void 0,ot=0;ot<pe.markedSpans.length;++ot)if(Ue=pe.markedSpans[ot],Ue.marker.collapsed&&!Ue.marker.widgetNode&&Ue.from==Fe.to&&(Ue.to==null||Ue.to!=Fe.from)&&(Ue.marker.inclusiveLeft||Fe.marker.inclusiveRight)&&ar(re,pe,Ue))return!0}function to(re){re=pr(re);for(var pe=0,Fe=re.parent,Re=0;Re<Fe.lines.length;++Re){var Ue=Fe.lines[Re];if(Ue==re)break;pe+=Ue.height}for(var ot=Fe.parent;ot;Fe=ot,ot=Fe.parent)for(var wt=0;wt<ot.children.length;++wt){var Rt=ot.children[wt];if(Rt==Fe)break;pe+=Rt.height}return pe}function Ro(re){if(re.height==0)return 0;for(var pe=re.text.length,Fe,Re=re;Fe=ss(Re);){var Ue=Fe.find(0,!0);Re=Ue.from.line,pe+=Ue.from.ch-Ue.to.ch}for(Re=re;Fe=_r(Re);){var ot=Fe.find(0,!0);pe-=Re.text.length-ot.from.ch,Re=ot.to.line,pe+=Re.text.length-ot.to.ch}return pe}function Bo(re){var pe=re.display,Fe=re.doc;pe.maxLine=dn(Fe,Fe.first),pe.maxLineLength=Ro(pe.maxLine),pe.maxLineChanged=!0,Fe.iter(function(Re){var Ue=Ro(Re);Ue>pe.maxLineLength&&(pe.maxLineLength=Ue,pe.maxLine=Re)})}var Xo=function(re,pe,Fe){this.text=re,Mt(this,pe),this.height=Fe?Fe(this):1};Xo.prototype.lineNo=function(){return Nt(this)},qn(Xo);function as(re,pe,Fe,Re){re.text=pe,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),ci(re),Mt(re,Fe);var Ue=Re?Re(re):1;Ue!=re.height&&sn(re,Ue)}function Ho(re){re.parent=null,ci(re)}var ia={},_s={};function la(re,pe){if(!re||/^\s*$/.test(re))return null;var Fe=pe.addModeClass?_s:ia;return Fe[re]||(Fe[re]=re.replace(/\S+/g,"cm-$&"))}function kn(re,pe){var Fe=Xe("span",null,null,he?"padding-right: .1px":null),Re={pre:Xe("pre",[Fe],"CodeMirror-line"),content:Fe,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};pe.measure={};for(var Ue=0;Ue<=(pe.rest?pe.rest.length:0);Ue++){var ot=Ue?pe.rest[Ue-1]:pe.line,wt=void 0;Re.pos=0,Re.addToken=Pu,dr(re.display.measure)&&(wt=dt(ot,re.doc.direction))&&(Re.addToken=Sa(Re.addToken,wt)),Re.map=[];var Rt=pe!=re.display.externalMeasured&&Nt(ot);Ws(ot,Re,Nr(re,ot,Rt)),ot.styleClasses&&(ot.styleClasses.bgClass&&(Re.bgClass=et(ot.styleClasses.bgClass,Re.bgClass||"")),ot.styleClasses.textClass&&(Re.textClass=et(ot.styleClasses.textClass,Re.textClass||""))),Re.map.length==0&&Re.map.push(0,0,Re.content.appendChild(Mr(re.display.measure))),Ue==0?(pe.measure.map=Re.map,pe.measure.cache={}):((pe.measure.maps||(pe.measure.maps=[])).push(Re.map),(pe.measure.caches||(pe.measure.caches=[])).push({}))}if(he){var It=Re.content.lastChild;(/\bcm-tab\b/.test(It.className)||It.querySelector&&It.querySelector(".cm-tab"))&&(Re.content.className="cm-tab-wrap-hack")}return ln(re,"renderLine",re,pe.line,Re.pre),Re.pre.className&&(Re.textClass=et(Re.pre.className,Re.textClass||"")),Re}function Is(re){var pe=Ze("span","\u2022","cm-invalidchar");return pe.title="\\u"+re.charCodeAt(0).toString(16),pe.setAttribute("aria-label",pe.title),pe}function Pu(re,pe,Fe,Re,Ue,ot,wt){if(pe){var Rt=re.splitSpaces?Ua(pe,re.trailingSpace):pe,It=re.cm.state.specialChars,Xt=!1,Tn;if(!It.test(pe))re.col+=pe.length,Tn=document.createTextNode(Rt),re.map.push(re.pos,re.pos+pe.length,Tn),Ce&&Le<9&&(Xt=!0),re.pos+=pe.length;else{Tn=document.createDocumentFragment();for(var nn=0;;){It.lastIndex=nn;var Un=It.exec(pe),Fn=Un?Un.index-nn:pe.length-nn;if(Fn){var mi=document.createTextNode(Rt.slice(nn,nn+Fn));Ce&&Le<9?Tn.appendChild(Ze("span",[mi])):Tn.appendChild(mi),re.map.push(re.pos,re.pos+Fn,mi),re.col+=Fn,re.pos+=Fn}if(!Un)break;nn+=Fn+1;var _i=void 0;if(Un[0]==" "){var Bi=re.cm.options.tabSize,rr=Bi-re.col%Bi;_i=Tn.appendChild(Ze("span",bn(rr),"cm-tab")),_i.setAttribute("role","presentation"),_i.setAttribute("cm-text"," "),re.col+=rr}else Un[0]=="\r"||Un[0]==`
|
|
|
`?(_i=Tn.appendChild(Ze("span",Un[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),_i.setAttribute("cm-text",Un[0]),re.col+=1):(_i=re.cm.options.specialCharPlaceholder(Un[0]),_i.setAttribute("cm-text",Un[0]),Ce&&Le<9?Tn.appendChild(Ze("span",[_i])):Tn.appendChild(_i),re.col+=1);re.map.push(re.pos,re.pos+1,_i),re.pos++}}if(re.trailingSpace=Rt.charCodeAt(pe.length-1)==32,Fe||Re||Ue||Xt||ot||wt){var Rr=Fe||"";Re&&(Rr+=Re),Ue&&(Rr+=Ue);var wr=Ze("span",[Tn],Rr,ot);if(wt)for(var Zr in wt)wt.hasOwnProperty(Zr)&&Zr!="style"&&Zr!="class"&&wr.setAttribute(Zr,wt[Zr]);return re.content.appendChild(wr)}re.content.appendChild(Tn)}}function Ua(re,pe){if(re.length>1&&!/ /.test(re))return re;for(var Fe=pe,Re="",Ue=0;Ue<re.length;Ue++){var ot=re.charAt(Ue);ot==" "&&Fe&&(Ue==re.length-1||re.charCodeAt(Ue+1)==32)&&(ot="\xA0"),Re+=ot,Fe=ot==" "}return Re}function Sa(re,pe){return function(Fe,Re,Ue,ot,wt,Rt,It){Ue=Ue?Ue+" cm-force-border":"cm-force-border";for(var Xt=Fe.pos,Tn=Xt+Re.length;;){for(var nn=void 0,Un=0;Un<pe.length&&(nn=pe[Un],!(nn.to>Xt&&nn.from<=Xt));Un++);if(nn.to>=Tn)return re(Fe,Re,Ue,ot,wt,Rt,It);re(Fe,Re.slice(0,nn.to-Xt),Ue,ot,null,Rt,It),ot=null,Re=Re.slice(nn.to-Xt),Xt=nn.to}}}function us(re,pe,Fe,Re){var Ue=!Re&&Fe.widgetNode;Ue&&re.map.push(re.pos,re.pos+pe,Ue),!Re&&re.cm.display.input.needsContentAttribute&&(Ue||(Ue=re.content.appendChild(document.createElement("span"))),Ue.setAttribute("cm-marker",Fe.id)),Ue&&(re.cm.display.input.setUneditable(Ue),re.content.appendChild(Ue)),re.pos+=pe,re.trailingSpace=!1}function Ws(re,pe,Fe){var Re=re.markedSpans,Ue=re.text,ot=0;if(!Re){for(var wt=1;wt<Fe.length;wt+=2)pe.addToken(pe,Ue.slice(ot,ot=Fe[wt]),la(Fe[wt+1],pe.cm.options));return}for(var Rt=Ue.length,It=0,Xt=1,Tn="",nn,Un,Fn=0,mi,_i,Bi,rr,Rr;;){if(Fn==It){mi=_i=Bi=Un="",Rr=null,rr=null,Fn=1/0;for(var wr=[],Zr=void 0,bo=0;bo<Re.length;++bo){var xr=Re[bo],zo=xr.marker;if(zo.type=="bookmark"&&xr.from==It&&zo.widgetNode)wr.push(zo);else if(xr.from<=It&&(xr.to==null||xr.to>It||zo.collapsed&&xr.to==It&&xr.from==It)){if(xr.to!=null&&xr.to!=It&&Fn>xr.to&&(Fn=xr.to,_i=""),zo.className&&(mi+=" "+zo.className),zo.css&&(Un=(Un?Un+";":"")+zo.css),zo.startStyle&&xr.from==It&&(Bi+=" "+zo.startStyle),zo.endStyle&&xr.to==Fn&&(Zr||(Zr=[])).push(zo.endStyle,xr.to),zo.title&&((Rr||(Rr={})).title=zo.title),zo.attributes)for(var ca in zo.attributes)(Rr||(Rr={}))[ca]=zo.attributes[ca];zo.collapsed&&(!rr||ts(rr.marker,zo)<0)&&(rr=xr)}else xr.from>It&&Fn>xr.from&&(Fn=xr.from)}if(Zr)for(var Ya=0;Ya<Zr.length;Ya+=2)Zr[Ya+1]==Fn&&(_i+=" "+Zr[Ya]);if(!rr||rr.from==It)for(var va=0;va<wr.length;++va)us(pe,0,wr[va]);if(rr&&(rr.from||0)==It){if(us(pe,(rr.to==null?Rt+1:rr.to)-It,rr.marker,rr.from==null),rr.to==null)return;rr.to==It&&(rr=!1)}}if(It>=Rt)break;for(var nu=Math.min(Rt,Fn);;){if(Tn){var Ml=It+Tn.length;if(!rr){var ja=Ml>nu?Tn.slice(0,nu-It):Tn;pe.addToken(pe,ja,nn?nn+mi:mi,Bi,It+ja.length==Fn?_i:"",Un,Rr)}if(Ml>=nu){Tn=Tn.slice(nu-It),It=nu;break}It=Ml,Bi=""}Tn=Ue.slice(ot,ot=Fe[Xt++]),nn=la(Fe[Xt++],pe.cm.options)}}}function _o(re,pe,Fe){this.line=pe,this.rest=Yo(pe),this.size=this.rest?Nt(Wt(this.rest))-Fe+1:1,this.node=this.text=null,this.hidden=Xn(re,pe)}function No(re,pe,Fe){for(var Re=[],Ue,ot=pe;ot<Fe;ot=Ue){var wt=new _o(re.doc,dn(re.doc,ot),ot);Ue=ot+wt.size,Re.push(wt)}return Re}var Lo=null;function ua(re){Lo?Lo.ops.push(re):re.ownsGroup=Lo={ops:[re],delayedCallbacks:[]}}function br(re){var pe=re.delayedCallbacks,Fe=0;do{for(;Fe<pe.length;Fe++)pe[Fe].call(null);for(var Re=0;Re<re.ops.length;Re++){var Ue=re.ops[Re];if(Ue.cursorActivityHandlers)for(;Ue.cursorActivityCalled<Ue.cursorActivityHandlers.length;)Ue.cursorActivityHandlers[Ue.cursorActivityCalled++].call(null,Ue.cm)}}while(Fe<pe.length)}function uo(re,pe){var Fe=re.ownsGroup;if(Fe)try{br(Fe)}finally{Lo=null,pe(Fe)}}var Yr=null;function Li(re,pe){var Fe=tn(re,pe);if(Fe.length){var Re=Array.prototype.slice.call(arguments,2),Ue;Lo?Ue=Lo.delayedCallbacks:Yr?Ue=Yr:(Ue=Yr=[],setTimeout(Es,0));for(var ot=function(Rt){Ue.push(function(){return Fe[Rt].apply(null,Re)})},wt=0;wt<Fe.length;++wt)ot(wt)}}function Es(){var re=Yr;Yr=null;for(var pe=0;pe<re.length;++pe)re[pe]()}function Ls(re,pe,Fe,Re){for(var Ue=0;Ue<pe.changes.length;Ue++){var ot=pe.changes[Ue];ot=="text"?vi(re,pe):ot=="gutter"?Xs(re,pe,Fe,Re):ot=="class"?ms(re,pe):ot=="widget"&&qa(re,pe,Re)}pe.changes=null}function xa(re){return re.node==re.text&&(re.node=Ze("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),Ce&&Le<8&&(re.node.style.zIndex=2)),re.node}function xl(re,pe){var Fe=pe.bgClass?pe.bgClass+" "+(pe.line.bgClass||""):pe.line.bgClass;if(Fe&&(Fe+=" CodeMirror-linebackground"),pe.background)Fe?pe.background.className=Fe:(pe.background.parentNode.removeChild(pe.background),pe.background=null);else if(Fe){var Re=xa(pe);pe.background=Re.insertBefore(Ze("div",null,Fe),Re.firstChild),re.display.input.setUneditable(pe.background)}}function Il(re,pe){var Fe=re.display.externalMeasured;return Fe&&Fe.line==pe.line?(re.display.externalMeasured=null,pe.measure=Fe.measure,Fe.built):kn(re,pe)}function vi(re,pe){var Fe=pe.text.className,Re=Il(re,pe);pe.text==pe.node&&(pe.node=Re.pre),pe.text.parentNode.replaceChild(Re.pre,pe.text),pe.text=Re.pre,Re.bgClass!=pe.bgClass||Re.textClass!=pe.textClass?(pe.bgClass=Re.bgClass,pe.textClass=Re.textClass,ms(re,pe)):Fe&&(pe.text.className=Fe)}function ms(re,pe){xl(re,pe),pe.line.wrapClass?xa(pe).className=pe.line.wrapClass:pe.node!=pe.text&&(pe.node.className="");var Fe=pe.textClass?pe.textClass+" "+(pe.line.textClass||""):pe.line.textClass;pe.text.className=Fe||""}function Xs(re,pe,Fe,Re){if(pe.gutter&&(pe.node.removeChild(pe.gutter),pe.gutter=null),pe.gutterBackground&&(pe.node.removeChild(pe.gutterBackground),pe.gutterBackground=null),pe.line.gutterClass){var Ue=xa(pe);pe.gutterBackground=Ze("div",null,"CodeMirror-gutter-background "+pe.line.gutterClass,"left: "+(re.options.fixedGutter?Re.fixedPos:-Re.gutterTotalWidth)+"px; width: "+Re.gutterTotalWidth+"px"),re.display.input.setUneditable(pe.gutterBackground),Ue.insertBefore(pe.gutterBackground,pe.text)}var ot=pe.line.gutterMarkers;if(re.options.lineNumbers||ot){var wt=xa(pe),Rt=pe.gutter=Ze("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?Re.fixedPos:-Re.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Rt),wt.insertBefore(Rt,pe.text),pe.line.gutterClass&&(Rt.className+=" "+pe.line.gutterClass),re.options.lineNumbers&&(!ot||!ot["CodeMirror-linenumbers"])&&(pe.lineNumber=Rt.appendChild(Ze("div",Dn(re.options,Fe),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Re.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),ot)for(var It=0;It<re.display.gutterSpecs.length;++It){var Xt=re.display.gutterSpecs[It].className,Tn=ot.hasOwnProperty(Xt)&&ot[Xt];Tn&&Rt.appendChild(Ze("div",[Tn],"CodeMirror-gutter-elt","left: "+Re.gutterLeft[Xt]+"px; width: "+Re.gutterWidth[Xt]+"px"))}}}function qa(re,pe,Fe){pe.alignable&&(pe.alignable=null);for(var Re=Pe("CodeMirror-linewidget"),Ue=pe.node.firstChild,ot=void 0;Ue;Ue=ot)ot=Ue.nextSibling,Re.test(Ue.className)&&pe.node.removeChild(Ue);Dl(re,pe,Fe)}function wl(re,pe,Fe,Re){var Ue=Il(re,pe);return pe.text=pe.node=Ue.pre,Ue.bgClass&&(pe.bgClass=Ue.bgClass),Ue.textClass&&(pe.textClass=Ue.textClass),ms(re,pe),Xs(re,pe,Fe,Re),Dl(re,pe,Re),pe.node}function Dl(re,pe,Fe){if(jr(re,pe.line,pe,Fe,!0),pe.rest)for(var Re=0;Re<pe.rest.length;Re++)jr(re,pe.rest[Re],pe,Fe,!1)}function jr(re,pe,Fe,Re,Ue){if(pe.widgets)for(var ot=xa(Fe),wt=0,Rt=pe.widgets;wt<Rt.length;++wt){var It=Rt[wt],Xt=Ze("div",[It.node],"CodeMirror-linewidget"+(It.className?" "+It.className:""));It.handleMouseEvents||Xt.setAttribute("cm-ignore-events","true"),nc(It,Xt,Fe,Re),re.display.input.setUneditable(Xt),Ue&&It.above?ot.insertBefore(Xt,Fe.gutter||Fe.text):ot.appendChild(Xt),Li(It,"redraw")}}function nc(re,pe,Fe,Re){if(re.noHScroll){(Fe.alignable||(Fe.alignable=[])).push(pe);var Ue=Re.wrapperWidth;pe.style.left=Re.fixedPos+"px",re.coverGutter||(Ue-=Re.gutterTotalWidth,pe.style.paddingLeft=Re.gutterTotalWidth+"px"),pe.style.width=Ue+"px"}re.coverGutter&&(pe.style.zIndex=5,pe.style.position="relative",re.noHScroll||(pe.style.marginLeft=-Re.gutterTotalWidth+"px"))}function Ia(re){if(re.height!=null)return re.height;var pe=re.doc.cm;if(!pe)return 0;if(!ft(document.body,re.node)){var Fe="position: relative;";re.coverGutter&&(Fe+="margin-left: -"+pe.display.gutters.offsetWidth+"px;"),re.noHScroll&&(Fe+="width: "+pe.display.wrapper.clientWidth+"px;"),ze(pe.display.measure,Ze("div",[re.node],null,Fe))}return re.height=re.node.parentNode.offsetHeight}function Ga(re,pe){for(var Fe=or(pe);Fe!=re.wrapper;Fe=Fe.parentNode)if(!Fe||Fe.nodeType==1&&Fe.getAttribute("cm-ignore-events")=="true"||Fe.parentNode==re.sizer&&Fe!=re.mover)return!0}function Na(re){return re.lineSpace.offsetTop}function $l(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function _u(re){if(re.cachedPaddingH)return re.cachedPaddingH;var pe=ze(re.measure,Ze("pre","x","CodeMirror-line-like")),Fe=window.getComputedStyle?window.getComputedStyle(pe):pe.currentStyle,Re={left:parseInt(Fe.paddingLeft),right:parseInt(Fe.paddingRight)};return!isNaN(Re.left)&&!isNaN(Re.right)&&(re.cachedPaddingH=Re),Re}function Wa(re){return mt-re.display.nativeBarWidth}function Za(re){return re.display.scroller.clientWidth-Wa(re)-re.display.barWidth}function Uu(re){return re.display.scroller.clientHeight-Wa(re)-re.display.barHeight}function yc(re,pe,Fe){var Re=re.options.lineWrapping,Ue=Re&&Za(re);if(!pe.measure.heights||Re&&pe.measure.width!=Ue){var ot=pe.measure.heights=[];if(Re){pe.measure.width=Ue;for(var wt=pe.text.firstChild.getClientRects(),Rt=0;Rt<wt.length-1;Rt++){var It=wt[Rt],Xt=wt[Rt+1];Math.abs(It.bottom-Xt.bottom)>2&&ot.push((It.bottom+Xt.top)/2-Fe.top)}}ot.push(Fe.bottom-Fe.top)}}function Eu(re,pe,Fe){if(re.line==pe)return{map:re.measure.map,cache:re.measure.cache};for(var Re=0;Re<re.rest.length;Re++)if(re.rest[Re]==pe)return{map:re.measure.maps[Re],cache:re.measure.caches[Re]};for(var Ue=0;Ue<re.rest.length;Ue++)if(Nt(re.rest[Ue])>Fe)return{map:re.measure.maps[Ue],cache:re.measure.caches[Ue],before:!0}}function Rl(re,pe){pe=pr(pe);var Fe=Nt(pe),Re=re.display.externalMeasured=new _o(re.doc,pe,Fe);Re.lineN=Fe;var Ue=Re.built=kn(re,Re);return Re.text=Ue.pre,ze(re.display.lineMeasure,Ue.pre),Re}function Sc(re,pe,Fe,Re){return bl(re,Lu(re,pe),Fe,Re)}function Gu(re,pe){if(pe>=re.display.viewFrom&&pe<re.display.viewTo)return re.display.view[$s(re,pe)];var Fe=re.display.externalMeasured;if(Fe&&pe>=Fe.lineN&&pe<Fe.lineN+Fe.size)return Fe}function Lu(re,pe){var Fe=Nt(pe),Re=Gu(re,Fe);Re&&!Re.text?Re=null:Re&&Re.changes&&(Ls(re,Re,Fe,bh(re)),re.curOp.forceUpdate=!0),Re||(Re=Rl(re,pe));var Ue=Eu(Re,pe,Fe);return{line:pe,view:Re,rect:null,map:Ue.map,cache:Ue.cache,before:Ue.before,hasHeights:!1}}function bl(re,pe,Fe,Re,Ue){pe.before&&(Fe=-1);var ot=Fe+(Re||""),wt;return pe.cache.hasOwnProperty(ot)?wt=pe.cache[ot]:(pe.rect||(pe.rect=pe.view.text.getBoundingClientRect()),pe.hasHeights||(yc(re,pe.view,pe.rect),pe.hasHeights=!0),wt=oo(re,pe,Fe,Re),wt.bogus||(pe.cache[ot]=wt)),{left:wt.left,right:wt.right,top:Ue?wt.rtop:wt.top,bottom:Ue?wt.rbottom:wt.bottom}}var th={left:0,right:0,top:0,bottom:0};function xc(re,pe,Fe){for(var Re,Ue,ot,wt,Rt,It,Xt=0;Xt<re.length;Xt+=3)if(Rt=re[Xt],It=re[Xt+1],pe<Rt?(Ue=0,ot=1,wt="left"):pe<It?(Ue=pe-Rt,ot=Ue+1):(Xt==re.length-3||pe==It&&re[Xt+3]>pe)&&(ot=It-Rt,Ue=ot-1,pe>=It&&(wt="right")),Ue!=null){if(Re=re[Xt+2],Rt==It&&Fe==(Re.insertLeft?"left":"right")&&(wt=Fe),Fe=="left"&&Ue==0)for(;Xt&&re[Xt-2]==re[Xt-3]&&re[Xt-1].insertLeft;)Re=re[(Xt-=3)+2],wt="left";if(Fe=="right"&&Ue==It-Rt)for(;Xt<re.length-3&&re[Xt+3]==re[Xt+4]&&!re[Xt+5].insertLeft;)Re=re[(Xt+=3)+2],wt="right";break}return{node:Re,start:Ue,end:ot,collapse:wt,coverStart:Rt,coverEnd:It}}function lu(re,pe){var Fe=th;if(pe=="left")for(var Re=0;Re<re.length&&(Fe=re[Re]).left==Fe.right;Re++);else for(var Ue=re.length-1;Ue>=0&&(Fe=re[Ue]).left==Fe.right;Ue--);return Fe}function oo(re,pe,Fe,Re){var Ue=xc(pe.map,Fe,Re),ot=Ue.node,wt=Ue.start,Rt=Ue.end,It=Ue.collapse,Xt;if(ot.nodeType==3){for(var Tn=0;Tn<4;Tn++){for(;wt&&He(pe.line.text.charAt(Ue.coverStart+wt));)--wt;for(;Ue.coverStart+Rt<Ue.coverEnd&&He(pe.line.text.charAt(Ue.coverStart+Rt));)++Rt;if(Ce&&Le<9&&wt==0&&Rt==Ue.coverEnd-Ue.coverStart?Xt=ot.parentNode.getBoundingClientRect():Xt=lu(Ge(ot,wt,Rt).getClientRects(),Re),Xt.left||Xt.right||wt==0)break;Rt=wt,wt=wt-1,It="right"}Ce&&Le<11&&(Xt=Uo(re.display.measure,Xt))}else{wt>0&&(It=Re="right");var nn;re.options.lineWrapping&&(nn=ot.getClientRects()).length>1?Xt=nn[Re=="right"?nn.length-1:0]:Xt=ot.getBoundingClientRect()}if(Ce&&Le<9&&!wt&&(!Xt||!Xt.left&&!Xt.right)){var Un=ot.parentNode.getClientRects()[0];Un?Xt={left:Un.left,right:Un.left+Wu(re.display),top:Un.top,bottom:Un.bottom}:Xt=th}for(var Fn=Xt.top-pe.rect.top,mi=Xt.bottom-pe.rect.top,_i=(Fn+mi)/2,Bi=pe.view.measure.heights,rr=0;rr<Bi.length-1&&!(_i<Bi[rr]);rr++);var Rr=rr?Bi[rr-1]:0,wr=Bi[rr],Zr={left:(It=="right"?Xt.right:Xt.left)-pe.rect.left,right:(It=="left"?Xt.left:Xt.right)-pe.rect.left,top:Rr,bottom:wr};return!Xt.left&&!Xt.right&&(Zr.bogus=!0),re.options.singleCursorHeightPerLine||(Zr.rtop=Fn,Zr.rbottom=mi),Zr}function Uo(re,pe){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!$r(re))return pe;var Fe=screen.logicalXDPI/screen.deviceXDPI,Re=screen.logicalYDPI/screen.deviceYDPI;return{left:pe.left*Fe,right:pe.right*Fe,top:pe.top*Re,bottom:pe.bottom*Re}}function ka(re){if(re.measure&&(re.measure.cache={},re.measure.heights=null,re.rest))for(var pe=0;pe<re.rest.length;pe++)re.measure.caches[pe]={}}function ra(re){re.display.externalMeasure=null,De(re.display.lineMeasure);for(var pe=0;pe<re.display.view.length;pe++)ka(re.display.view[pe])}function Ds(re){ra(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function bs(){return xe&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ks(){return xe&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Zs(re){var pe=0;if(re.widgets)for(var Fe=0;Fe<re.widgets.length;++Fe)re.widgets[Fe].above&&(pe+=Ia(re.widgets[Fe]));return pe}function Ks(re,pe,Fe,Re,Ue){if(!Ue){var ot=Zs(pe);Fe.top+=ot,Fe.bottom+=ot}if(Re=="line")return Fe;Re||(Re="local");var wt=to(pe);if(Re=="local"?wt+=Na(re.display):wt-=re.display.viewOffset,Re=="page"||Re=="window"){var Rt=re.display.lineSpace.getBoundingClientRect();wt+=Rt.top+(Re=="window"?0:ks());var It=Rt.left+(Re=="window"?0:bs());Fe.left+=It,Fe.right+=It}return Fe.top+=wt,Fe.bottom+=wt,Fe}function Yl(re,pe,Fe){if(Fe=="div")return pe;var Re=pe.left,Ue=pe.top;if(Fe=="page")Re-=bs(),Ue-=ks();else if(Fe=="local"||!Fe){var ot=re.display.sizer.getBoundingClientRect();Re+=ot.left,Ue+=ot.top}var wt=re.display.lineSpace.getBoundingClientRect();return{left:Re-wt.left,top:Ue-wt.top}}function Bl(re,pe,Fe,Re,Ue){return Re||(Re=dn(re.doc,pe.line)),Ks(re,Re,Sc(re,Re,pe.ch,Ue),Fe)}function Rs(re,pe,Fe,Re,Ue,ot){Re=Re||dn(re.doc,pe.line),Ue||(Ue=Lu(re,Re));function wt(mi,_i){var Bi=bl(re,Ue,mi,_i?"right":"left",ot);return _i?Bi.left=Bi.right:Bi.right=Bi.left,Ks(re,Re,Bi,Fe)}var Rt=dt(Re,re.doc.direction),It=pe.ch,Xt=pe.sticky;if(It>=Re.text.length?(It=Re.text.length,Xt="before"):It<=0&&(It=0,Xt="after"),!Rt)return wt(Xt=="before"?It-1:It,Xt=="before");function Tn(mi,_i,Bi){var rr=Rt[_i],Rr=rr.level==1;return wt(Bi?mi-1:mi,Rr!=Bi)}var nn=Ne(Rt,It,Xt),Un=be,Fn=Tn(It,nn,Xt=="before");return Un!=null&&(Fn.other=Tn(It,Un,Xt!="before")),Fn}function xh(re,pe){var Fe=0;pe=Bn(re.doc,pe),re.options.lineWrapping||(Fe=Wu(re.display)*pe.ch);var Re=dn(re.doc,pe.line),Ue=to(Re)+Na(re.display);return{left:Fe,right:Fe,top:Ue,bottom:Ue+Re.height}}function nh(re,pe,Fe,Re,Ue){var ot=$t(re,pe,Fe);return ot.xRel=Ue,Re&&(ot.outside=Re),ot}function wc(re,pe,Fe){var Re=re.doc;if(Fe+=re.display.viewOffset,Fe<0)return nh(Re.first,0,null,-1,-1);var Ue=un(Re,Fe),ot=Re.first+Re.size-1;if(Ue>ot)return nh(Re.first+Re.size-1,dn(Re,ot).text.length,null,1,1);pe<0&&(pe=0);for(var wt=dn(Re,Ue);;){var Rt=Yn(re,wt,Ue,pe,Fe),It=fr(wt,Rt.ch+(Rt.xRel>0||Rt.outside>0?1:0));if(!It)return Rt;var Xt=It.find(1);if(Xt.line==Ue)return Xt;wt=dn(Re,Ue=Xt.line)}}function yr(re,pe,Fe,Re){Re-=Zs(pe);var Ue=pe.text.length,ot=We(function(wt){return bl(re,Fe,wt-1).bottom<=Re},Ue,0);return Ue=We(function(wt){return bl(re,Fe,wt).top>Re},ot,Ue),{begin:ot,end:Ue}}function bc(re,pe,Fe,Re){Fe||(Fe=Lu(re,pe));var Ue=Ks(re,pe,bl(re,Fe,Re),"line").top;return yr(re,pe,Fe,Ue)}function on(re,pe,Fe,Re){return re.bottom<=Fe?!1:re.top>Fe?!0:(Re?re.left:re.right)>pe}function Yn(re,pe,Fe,Re,Ue){Ue-=to(pe);var ot=Lu(re,pe),wt=Zs(pe),Rt=0,It=pe.text.length,Xt=!0,Tn=dt(pe,re.doc.direction);if(Tn){var nn=(re.options.lineWrapping?Qh:wh)(re,pe,Fe,ot,Tn,Re,Ue);Xt=nn.level!=1,Rt=Xt?nn.from:nn.to-1,It=Xt?nn.to:nn.from-1}var Un=null,Fn=null,mi=We(function(bo){var xr=bl(re,ot,bo);return xr.top+=wt,xr.bottom+=wt,on(xr,Re,Ue,!1)?(xr.top<=Ue&&xr.left<=Re&&(Un=bo,Fn=xr),!0):!1},Rt,It),_i,Bi,rr=!1;if(Fn){var Rr=Re-Fn.left<Fn.right-Re,wr=Rr==Xt;mi=Un+(wr?0:1),Bi=wr?"after":"before",_i=Rr?Fn.left:Fn.right}else{!Xt&&(mi==It||mi==Rt)&&mi++,Bi=mi==0?"after":mi==pe.text.length?"before":bl(re,ot,mi-(Xt?1:0)).bottom+wt<=Ue==Xt?"after":"before";var Zr=Rs(re,$t(Fe,mi,Bi),"line",pe,ot);_i=Zr.left,rr=Ue<Zr.top?-1:Ue>=Zr.bottom?1:0}return mi=Ie(pe.text,mi,1),nh(Fe,mi,Bi,rr,Re-_i)}function wh(re,pe,Fe,Re,Ue,ot,wt){var Rt=We(function(nn){var Un=Ue[nn],Fn=Un.level!=1;return on(Rs(re,$t(Fe,Fn?Un.to:Un.from,Fn?"before":"after"),"line",pe,Re),ot,wt,!0)},0,Ue.length-1),It=Ue[Rt];if(Rt>0){var Xt=It.level!=1,Tn=Rs(re,$t(Fe,Xt?It.from:It.to,Xt?"after":"before"),"line",pe,Re);on(Tn,ot,wt,!0)&&Tn.top>wt&&(It=Ue[Rt-1])}return It}function Qh(re,pe,Fe,Re,Ue,ot,wt){var Rt=yr(re,pe,Re,wt),It=Rt.begin,Xt=Rt.end;/\s/.test(pe.text.charAt(Xt-1))&&Xt--;for(var Tn=null,nn=null,Un=0;Un<Ue.length;Un++){var Fn=Ue[Un];if(!(Fn.from>=Xt||Fn.to<=It)){var mi=Fn.level!=1,_i=bl(re,Re,mi?Math.min(Xt,Fn.to)-1:Math.max(It,Fn.from)).right,Bi=_i<ot?ot-_i+1e9:_i-ot;(!Tn||nn>Bi)&&(Tn=Fn,nn=Bi)}}return Tn||(Tn=Ue[Ue.length-1]),Tn.from<It&&(Tn={from:It,to:Tn.to,level:Tn.level}),Tn.to>Xt&&(Tn={from:Tn.from,to:Xt,level:Tn.level}),Tn}var Mu;function Tu(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(Mu==null){Mu=Ze("pre",null,"CodeMirror-line-like");for(var pe=0;pe<49;++pe)Mu.appendChild(document.createTextNode("x")),Mu.appendChild(Ze("br"));Mu.appendChild(document.createTextNode("x"))}ze(re.measure,Mu);var Fe=Mu.offsetHeight/50;return Fe>3&&(re.cachedTextHeight=Fe),De(re.measure),Fe||1}function Wu(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var pe=Ze("span","xxxxxxxxxx"),Fe=Ze("pre",[pe],"CodeMirror-line-like");ze(re.measure,Fe);var Re=pe.getBoundingClientRect(),Ue=(Re.right-Re.left)/10;return Ue>2&&(re.cachedCharWidth=Ue),Ue||10}function bh(re){for(var pe=re.display,Fe={},Re={},Ue=pe.gutters.clientLeft,ot=pe.gutters.firstChild,wt=0;ot;ot=ot.nextSibling,++wt){var Rt=re.display.gutterSpecs[wt].className;Fe[Rt]=ot.offsetLeft+ot.clientLeft+Ue,Re[Rt]=ot.clientWidth}return{fixedPos:Cc(pe),gutterTotalWidth:pe.gutters.offsetWidth,gutterLeft:Fe,gutterWidth:Re,wrapperWidth:pe.wrapper.clientWidth}}function Cc(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Vs(re){var pe=Tu(re.display),Fe=re.options.lineWrapping,Re=Fe&&Math.max(5,re.display.scroller.clientWidth/Wu(re.display)-3);return function(Ue){if(Xn(re.doc,Ue))return 0;var ot=0;if(Ue.widgets)for(var wt=0;wt<Ue.widgets.length;wt++)Ue.widgets[wt].height&&(ot+=Ue.widgets[wt].height);return Fe?ot+(Math.ceil(Ue.text.length/Re)||1)*pe:ot+pe}}function Vr(re){var pe=re.doc,Fe=Vs(re);pe.iter(function(Re){var Ue=Fe(Re);Ue!=Re.height&&sn(Re,Ue)})}function Da(re,pe,Fe,Re){var Ue=re.display;if(!Fe&&or(pe).getAttribute("cm-not-content")=="true")return null;var ot,wt,Rt=Ue.lineSpace.getBoundingClientRect();try{ot=pe.clientX-Rt.left,wt=pe.clientY-Rt.top}catch(nn){return null}var It=wc(re,ot,wt),Xt;if(Re&&It.xRel>0&&(Xt=dn(re.doc,It.line).text).length==It.ch){var Tn=lt(Xt,Xt.length,re.options.tabSize)-Xt.length;It=$t(It.line,Math.max(0,Math.round((ot-_u(re.display).left)/Wu(re.display))-Tn))}return It}function $s(re,pe){if(pe>=re.display.viewTo||(pe-=re.display.viewFrom,pe<0))return null;for(var Fe=re.display.view,Re=0;Re<Fe.length;Re++)if(pe-=Fe[Re].size,pe<0)return Re}function Ms(re,pe,Fe,Re){pe==null&&(pe=re.doc.first),Fe==null&&(Fe=re.doc.first+re.doc.size),Re||(Re=0);var Ue=re.display;if(Re&&Fe<Ue.viewTo&&(Ue.updateLineNumbers==null||Ue.updateLineNumbers>pe)&&(Ue.updateLineNumbers=pe),re.curOp.viewChanged=!0,pe>=Ue.viewTo)Rn&&sr(re.doc,pe)<Ue.viewTo&&ga(re);else if(Fe<=Ue.viewFrom)Rn&&Ki(re.doc,Fe+Re)>Ue.viewFrom?ga(re):(Ue.viewFrom+=Re,Ue.viewTo+=Re);else if(pe<=Ue.viewFrom&&Fe>=Ue.viewTo)ga(re);else if(pe<=Ue.viewFrom){var ot=dl(re,Fe,Fe+Re,1);ot?(Ue.view=Ue.view.slice(ot.index),Ue.viewFrom=ot.lineN,Ue.viewTo+=Re):ga(re)}else if(Fe>=Ue.viewTo){var wt=dl(re,pe,pe,-1);wt?(Ue.view=Ue.view.slice(0,wt.index),Ue.viewTo=wt.lineN):ga(re)}else{var Rt=dl(re,pe,pe,-1),It=dl(re,Fe,Fe+Re,1);Rt&&It?(Ue.view=Ue.view.slice(0,Rt.index).concat(No(re,Rt.lineN,It.lineN)).concat(Ue.view.slice(It.index)),Ue.viewTo+=Re):ga(re)}var Xt=Ue.externalMeasured;Xt&&(Fe<Xt.lineN?Xt.lineN+=Re:pe<Xt.lineN+Xt.size&&(Ue.externalMeasured=null))}function wo(re,pe,Fe){re.curOp.viewChanged=!0;var Re=re.display,Ue=re.display.externalMeasured;if(Ue&&pe>=Ue.lineN&&pe<Ue.lineN+Ue.size&&(Re.externalMeasured=null),!(pe<Re.viewFrom||pe>=Re.viewTo)){var ot=Re.view[$s(re,pe)];if(ot.node!=null){var wt=ot.changes||(ot.changes=[]);ut(wt,Fe)==-1&&wt.push(Fe)}}}function ga(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function dl(re,pe,Fe,Re){var Ue=$s(re,pe),ot,wt=re.display.view;if(!Rn||Fe==re.doc.first+re.doc.size)return{index:Ue,lineN:Fe};for(var Rt=re.display.viewFrom,It=0;It<Ue;It++)Rt+=wt[It].size;if(Rt!=pe){if(Re>0){if(Ue==wt.length-1)return null;ot=Rt+wt[Ue].size-pe,Ue++}else ot=Rt-pe;pe+=ot,Fe+=ot}for(;sr(re.doc,Fe)!=Fe;){if(Ue==(Re<0?0:wt.length-1))return null;Fe+=Re*wt[Ue-(Re<0?1:0)].size,Ue+=Re}return{index:Ue,lineN:Fe}}function cs(re,pe,Fe){var Re=re.display,Ue=Re.view;Ue.length==0||pe>=Re.viewTo||Fe<=Re.viewFrom?(Re.view=No(re,pe,Fe),Re.viewFrom=pe):(Re.viewFrom>pe?Re.view=No(re,pe,Re.viewFrom).concat(Re.view):Re.viewFrom<pe&&(Re.view=Re.view.slice($s(re,pe))),Re.viewFrom=pe,Re.viewTo<Fe?Re.view=Re.view.concat(No(re,Re.viewTo,Fe)):Re.viewTo>Fe&&(Re.view=Re.view.slice(0,$s(re,Fe)))),Re.viewTo=Fe}function Cl(re){for(var pe=re.display.view,Fe=0,Re=0;Re<pe.length;Re++){var Ue=pe[Re];!Ue.hidden&&(!Ue.node||Ue.changes)&&++Fe}return Fe}function Ea(re){re.display.input.showSelection(re.display.input.prepareSelection())}function Pc(re,pe){pe===void 0&&(pe=!0);for(var Fe=re.doc,Re={},Ue=Re.cursors=document.createDocumentFragment(),ot=Re.selection=document.createDocumentFragment(),wt=0;wt<Fe.sel.ranges.length;wt++)if(!(!pe&&wt==Fe.sel.primIndex)){var Rt=Fe.sel.ranges[wt];if(!(Rt.from().line>=re.display.viewTo||Rt.to().line<re.display.viewFrom)){var It=Rt.empty();(It||re.options.showCursorWhenSelecting)&&Go(re,Rt.head,Ue),It||Vo(re,Rt,ot)}}return Re}function Go(re,pe,Fe){var Re=Rs(re,pe,"div",null,null,!re.options.singleCursorHeightPerLine),Ue=Fe.appendChild(Ze("div","\xA0","CodeMirror-cursor"));if(Ue.style.left=Re.left+"px",Ue.style.top=Re.top+"px",Ue.style.height=Math.max(0,Re.bottom-Re.top)*re.options.cursorHeight+"px",Re.other){var ot=Fe.appendChild(Ze("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ot.style.display="",ot.style.left=Re.other.left+"px",ot.style.top=Re.other.top+"px",ot.style.height=(Re.other.bottom-Re.other.top)*.85+"px"}}function Ka(re,pe){return re.top-pe.top||re.left-pe.left}function Vo(re,pe,Fe){var Re=re.display,Ue=re.doc,ot=document.createDocumentFragment(),wt=_u(re.display),Rt=wt.left,It=Math.max(Re.sizerWidth,Za(re)-Re.sizer.offsetLeft)-wt.right,Xt=Ue.direction=="ltr";function Tn(wr,Zr,bo,xr){Zr<0&&(Zr=0),Zr=Math.round(Zr),xr=Math.round(xr),ot.appendChild(Ze("div",null,"CodeMirror-selected","position: absolute; left: "+wr+`px;
|
|
|
top: `+Zr+"px; width: "+(bo==null?It-wr:bo)+`px;
|
|
|
height: `+(xr-Zr)+"px"))}function nn(wr,Zr,bo){var xr=dn(Ue,wr),zo=xr.text.length,ca,Ya;function va(ja,gu){return Bl(re,$t(wr,ja),"div",xr,gu)}function nu(ja,gu,pl){var za=bc(re,xr,null,ja),ws=gu=="ltr"==(pl=="after")?"left":"right",Ca=pl=="after"?za.begin:za.end-(/\s/.test(xr.text.charAt(za.end-1))?2:1);return va(Ca,ws)[ws]}var Ml=dt(xr,Ue.direction);return Oe(Ml,Zr||0,bo==null?zo:bo,function(ja,gu,pl,za){var ws=pl=="ltr",Ca=va(ja,ws?"left":"right"),tl=va(gu-1,ws?"right":"left"),gl=Zr==null&&ja==0,lc=bo==null&&gu==zo,ya=za==0,Vu=!Ml||za==Ml.length-1;if(tl.top-Ca.top<=3){var Ta=(Xt?gl:lc)&&ya,Ef=(Xt?lc:gl)&&Vu,Iu=Ta?Rt:(ws?Ca:tl).left,mu=Ef?It:(ws?tl:Ca).right;Tn(Iu,Ca.top,mu-Iu,Ca.bottom)}else{var iu,ea,nl,Hc;ws?(iu=Xt&&gl&&ya?Rt:Ca.left,ea=Xt?It:nu(ja,pl,"before"),nl=Xt?Rt:nu(gu,pl,"after"),Hc=Xt&&lc&&Vu?It:tl.right):(iu=Xt?nu(ja,pl,"before"):Rt,ea=!Xt&&gl&&ya?It:Ca.right,nl=!Xt&&lc&&Vu?Rt:tl.left,Hc=Xt?nu(gu,pl,"after"):It),Tn(iu,Ca.top,ea-iu,Ca.bottom),Ca.bottom<tl.top&&Tn(Rt,Ca.bottom,null,tl.top),Tn(nl,tl.top,Hc-nl,tl.bottom)}(!ca||Ka(Ca,ca)<0)&&(ca=Ca),Ka(tl,ca)<0&&(ca=tl),(!Ya||Ka(Ca,Ya)<0)&&(Ya=Ca),Ka(tl,Ya)<0&&(Ya=tl)}),{start:ca,end:Ya}}var Un=pe.from(),Fn=pe.to();if(Un.line==Fn.line)nn(Un.line,Un.ch,Fn.ch);else{var mi=dn(Ue,Un.line),_i=dn(Ue,Fn.line),Bi=pr(mi)==pr(_i),rr=nn(Un.line,Un.ch,Bi?mi.text.length+1:null).end,Rr=nn(Fn.line,Bi?0:null,Fn.ch).start;Bi&&(rr.top<Rr.top-2?(Tn(rr.right,rr.top,null,rr.bottom),Tn(Rt,Rr.top,Rr.left,Rr.bottom)):Tn(rr.right,rr.top,Rr.left-rr.right,rr.bottom)),rr.bottom<Rr.top&&Tn(Rt,rr.bottom,null,Rr.top)}Fe.appendChild(ot)}function vs(re){if(re.state.focused){var pe=re.display;clearInterval(pe.blinker);var Fe=!0;pe.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?pe.blinker=setInterval(function(){re.hasFocus()||Rc(re),pe.cursorDiv.style.visibility=(Fe=!Fe)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(pe.cursorDiv.style.visibility="hidden")}}function ds(re){re.state.focused||(re.display.input.focus(),Fo(re))}function Bs(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Rc(re))},100)}function Fo(re,pe){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(ln(re,"focus",re,pe),re.state.focused=!0,Ct(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),he&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),vs(re))}function Rc(re,pe){re.state.delayingBlurEvent||(re.state.focused&&(ln(re,"blur",re,pe),re.state.focused=!1,Ae(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function Gr(re){for(var pe=re.display,Fe=pe.lineDiv.offsetTop,Re=0;Re<pe.view.length;Re++){var Ue=pe.view[Re],ot=re.options.lineWrapping,wt=void 0,Rt=0;if(!Ue.hidden){if(Ce&&Le<8){var It=Ue.node.offsetTop+Ue.node.offsetHeight;wt=It-Fe,Fe=It}else{var Xt=Ue.node.getBoundingClientRect();wt=Xt.bottom-Xt.top,!ot&&Ue.text.firstChild&&(Rt=Ue.text.firstChild.getBoundingClientRect().right-Xt.left-1)}var Tn=Ue.line.height-wt;if((Tn>.005||Tn<-.005)&&(sn(Ue.line,wt),Ad(Ue.line),Ue.rest))for(var nn=0;nn<Ue.rest.length;nn++)Ad(Ue.rest[nn]);if(Rt>re.display.sizerWidth){var Un=Math.ceil(Rt/Wu(re.display));Un>re.display.maxLineLength&&(re.display.maxLineLength=Un,re.display.maxLine=Ue.line,re.display.maxLineChanged=!0)}}}}function Ad(re){if(re.widgets)for(var pe=0;pe<re.widgets.length;++pe){var Fe=re.widgets[pe],Re=Fe.node.parentNode;Re&&(Fe.height=Re.offsetHeight)}}function Wo(re,pe,Fe){var Re=Fe&&Fe.top!=null?Math.max(0,Fe.top):re.scroller.scrollTop;Re=Math.floor(Re-Na(re));var Ue=Fe&&Fe.bottom!=null?Fe.bottom:Re+re.wrapper.clientHeight,ot=un(pe,Re),wt=un(pe,Ue);if(Fe&&Fe.ensure){var Rt=Fe.ensure.from.line,It=Fe.ensure.to.line;Rt<ot?(ot=Rt,wt=un(pe,to(dn(pe,Rt))+re.wrapper.clientHeight)):Math.min(It,pe.lastLine())>=wt&&(ot=un(pe,to(dn(pe,It))-re.wrapper.clientHeight),wt=It)}return{from:ot,to:Math.max(wt,ot+1)}}function Nd(re,pe){if(!gn(re,"scrollCursorIntoView")){var Fe=re.display,Re=Fe.sizer.getBoundingClientRect(),Ue=null;if(pe.top+Re.top<0?Ue=!0:pe.bottom+Re.top>(window.innerHeight||document.documentElement.clientHeight)&&(Ue=!1),Ue!=null&&!de){var ot=Ze("div","\u200B",null,`position: absolute;
|
|
|
top: `+(pe.top-Fe.viewOffset-Na(re.display))+`px;
|
|
|
height: `+(pe.bottom-pe.top+Wa(re)+Fe.barHeight)+`px;
|
|
|
left: `+pe.left+"px; width: "+Math.max(2,pe.right-pe.left)+"px;");re.display.lineSpace.appendChild(ot),ot.scrollIntoView(Ue),re.display.lineSpace.removeChild(ot)}}}function ih(re,pe,Fe,Re){Re==null&&(Re=0);var Ue;!re.options.lineWrapping&&pe==Fe&&(pe=pe.ch?$t(pe.line,pe.sticky=="before"?pe.ch-1:pe.ch,"after"):pe,Fe=pe.sticky=="before"?$t(pe.line,pe.ch+1,"before"):pe);for(var ot=0;ot<5;ot++){var wt=!1,Rt=Rs(re,pe),It=!Fe||Fe==pe?Rt:Rs(re,Fe);Ue={left:Math.min(Rt.left,It.left),top:Math.min(Rt.top,It.top)-Re,right:Math.max(Rt.left,It.left),bottom:Math.max(Rt.bottom,It.bottom)+Re};var Xt=Od(re,Ue),Tn=re.doc.scrollTop,nn=re.doc.scrollLeft;if(Xt.scrollTop!=null&&(Au(re,Xt.scrollTop),Math.abs(re.doc.scrollTop-Tn)>1&&(wt=!0)),Xt.scrollLeft!=null&&(uu(re,Xt.scrollLeft),Math.abs(re.doc.scrollLeft-nn)>1&&(wt=!0)),!wt)break}return Ue}function rh(re,pe){var Fe=Od(re,pe);Fe.scrollTop!=null&&Au(re,Fe.scrollTop),Fe.scrollLeft!=null&&uu(re,Fe.scrollLeft)}function Od(re,pe){var Fe=re.display,Re=Tu(re.display);pe.top<0&&(pe.top=0);var Ue=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:Fe.scroller.scrollTop,ot=Uu(re),wt={};pe.bottom-pe.top>ot&&(pe.bottom=pe.top+ot);var Rt=re.doc.height+$l(Fe),It=pe.top<Re,Xt=pe.bottom>Rt-Re;if(pe.top<Ue)wt.scrollTop=It?0:pe.top;else if(pe.bottom>Ue+ot){var Tn=Math.min(pe.top,(Xt?Rt:pe.bottom)-ot);Tn!=Ue&&(wt.scrollTop=Tn)}var nn=re.options.fixedGutter?0:Fe.gutters.offsetWidth,Un=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Fe.scroller.scrollLeft-nn,Fn=Za(re)-Fe.gutters.offsetWidth,mi=pe.right-pe.left>Fn;return mi&&(pe.right=pe.left+Fn),pe.left<10?wt.scrollLeft=0:pe.left<Un?wt.scrollLeft=Math.max(0,pe.left+nn-(mi?0:10)):pe.right>Fn+Un-3&&(wt.scrollLeft=pe.right+(mi?0:10)-Fn),wt}function Ch(re,pe){pe!=null&&(ku(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+pe)}function ic(re){ku(re);var pe=re.getCursor();re.curOp.scrollToPos={from:pe,to:pe,margin:re.options.cursorScrollMargin}}function ro(re,pe,Fe){(pe!=null||Fe!=null)&&ku(re),pe!=null&&(re.curOp.scrollLeft=pe),Fe!=null&&(re.curOp.scrollTop=Fe)}function ns(re,pe){ku(re),re.curOp.scrollToPos=pe}function ku(re){var pe=re.curOp.scrollToPos;if(pe){re.curOp.scrollToPos=null;var Fe=xh(re,pe.from),Re=xh(re,pe.to);qh(re,Fe,Re,pe.margin)}}function qh(re,pe,Fe,Re){var Ue=Od(re,{left:Math.min(pe.left,Fe.left),top:Math.min(pe.top,Fe.top)-Re,right:Math.max(pe.right,Fe.right),bottom:Math.max(pe.bottom,Fe.bottom)+Re});ro(re,Ue.scrollLeft,Ue.scrollTop)}function Au(re,pe){Math.abs(re.doc.scrollTop-pe)<2||(Me||gi(re,{top:pe}),ed(re,pe,!0),Me&&gi(re),Sn(re,100))}function ed(re,pe,Fe){pe=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,pe)),!(re.display.scroller.scrollTop==pe&&!Fe)&&(re.doc.scrollTop=pe,re.display.scrollbars.setScrollTop(pe),re.display.scroller.scrollTop!=pe&&(re.display.scroller.scrollTop=pe))}function uu(re,pe,Fe,Re){pe=Math.max(0,Math.min(pe,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((Fe?pe==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-pe)<2)&&!Re)&&(re.doc.scrollLeft=pe,Gi(re),re.display.scroller.scrollLeft!=pe&&(re.display.scroller.scrollLeft=pe),re.display.scrollbars.setScrollLeft(pe))}function Fl(re){var pe=re.display,Fe=pe.gutters.offsetWidth,Re=Math.round(re.doc.height+$l(re.display));return{clientHeight:pe.scroller.clientHeight,viewHeight:pe.wrapper.clientHeight,scrollWidth:pe.scroller.scrollWidth,clientWidth:pe.scroller.clientWidth,viewWidth:pe.wrapper.clientWidth,barLeft:re.options.fixedGutter?Fe:0,docHeight:Re,scrollHeight:Re+Wa(re)+pe.barHeight,nativeBarWidth:pe.nativeBarWidth,gutterWidth:Fe}}var ps=function(re,pe,Fe){this.cm=Fe;var Re=this.vert=Ze("div",[Ze("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Ue=this.horiz=Ze("div",[Ze("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Re.tabIndex=Ue.tabIndex=-1,re(Re),re(Ue),At(Re,"scroll",function(){Re.clientHeight&&pe(Re.scrollTop,"vertical")}),At(Ue,"scroll",function(){Ue.clientWidth&&pe(Ue.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ce&&Le<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ps.prototype.update=function(re){var pe=re.scrollWidth>re.clientWidth+1,Fe=re.scrollHeight>re.clientHeight+1,Re=re.nativeBarWidth;if(Fe){this.vert.style.display="block",this.vert.style.bottom=pe?Re+"px":"0";var Ue=re.viewHeight-(pe?Re:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+Ue)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(pe){this.horiz.style.display="block",this.horiz.style.right=Fe?Re+"px":"0",this.horiz.style.left=re.barLeft+"px";var ot=re.viewWidth-re.barLeft-(Fe?Re:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+ot)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(Re==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Fe?Re:0,bottom:pe?Re:0}},ps.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ps.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ps.prototype.zeroWidthHack=function(){var re=oe&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new tt,this.disableVert=new tt},ps.prototype.enableZeroWidthBar=function(re,pe,Fe){re.style.pointerEvents="auto";function Re(){var Ue=re.getBoundingClientRect(),ot=Fe=="vert"?document.elementFromPoint(Ue.right-1,(Ue.top+Ue.bottom)/2):document.elementFromPoint((Ue.right+Ue.left)/2,Ue.bottom-1);ot!=re?re.style.pointerEvents="none":pe.set(1e3,Re)}pe.set(1e3,Re)},ps.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Fs=function(){};Fs.prototype.update=function(){return{bottom:0,right:0}},Fs.prototype.setScrollLeft=function(){},Fs.prototype.setScrollTop=function(){},Fs.prototype.clear=function(){};function rc(re,pe){pe||(pe=Fl(re));var Fe=re.display.barWidth,Re=re.display.barHeight;el(re,pe);for(var Ue=0;Ue<4&&Fe!=re.display.barWidth||Re!=re.display.barHeight;Ue++)Fe!=re.display.barWidth&&re.options.lineWrapping&&Gr(re),el(re,Fl(re)),Fe=re.display.barWidth,Re=re.display.barHeight}function el(re,pe){var Fe=re.display,Re=Fe.scrollbars.update(pe);Fe.sizer.style.paddingRight=(Fe.barWidth=Re.right)+"px",Fe.sizer.style.paddingBottom=(Fe.barHeight=Re.bottom)+"px",Fe.heightForcer.style.borderBottom=Re.bottom+"px solid transparent",Re.right&&Re.bottom?(Fe.scrollbarFiller.style.display="block",Fe.scrollbarFiller.style.height=Re.bottom+"px",Fe.scrollbarFiller.style.width=Re.right+"px"):Fe.scrollbarFiller.style.display="",Re.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(Fe.gutterFiller.style.display="block",Fe.gutterFiller.style.height=Re.bottom+"px",Fe.gutterFiller.style.width=pe.gutterWidth+"px"):Fe.gutterFiller.style.display=""}var Id={native:ps,null:Fs};function td(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&Ae(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new Id[re.options.scrollbarStyle](function(pe){re.display.wrapper.insertBefore(pe,re.display.scrollbarFiller),At(pe,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),pe.setAttribute("cm-not-content","true")},function(pe,Fe){Fe=="horizontal"?uu(re,pe):Au(re,pe)},re),re.display.scrollbars.addClass&&Ct(re.display.wrapper,re.display.scrollbars.addClass)}var Dd=0;function Oa(re){re.curOp={cm:re,viewChanged:!1,startHeight:re.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:++Dd},ua(re.curOp)}function oc(re){var pe=re.curOp;pe&&uo(pe,function(Fe){for(var Re=0;Re<Fe.ops.length;Re++)Fe.ops[Re].cm.curOp=null;gf(Fe)})}function gf(re){for(var pe=re.ops,Fe=0;Fe<pe.length;Fe++)jt(pe[Fe]);for(var Re=0;Re<pe.length;Re++)Ut(pe[Re]);for(var Ue=0;Ue<pe.length;Ue++)cn(pe[Ue]);for(var ot=0;ot<pe.length;ot++)ht(pe[ot]);for(var wt=0;wt<pe.length;wt++)bt(pe[wt])}function jt(re){var pe=re.cm,Fe=pe.display;zn(pe),re.updateMaxLine&&Bo(pe),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<Fe.viewFrom||re.scrollToPos.to.line>=Fe.viewTo)||Fe.maxLineChanged&&pe.options.lineWrapping,re.update=re.mustUpdate&&new Cn(pe,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function Ut(re){re.updatedDisplay=re.mustUpdate&&wi(re.cm,re.update)}function cn(re){var pe=re.cm,Fe=pe.display;re.updatedDisplay&&Gr(pe),re.barMeasure=Fl(pe),Fe.maxLineChanged&&!pe.options.lineWrapping&&(re.adjustWidthTo=Sc(pe,Fe.maxLine,Fe.maxLine.text.length).left+3,pe.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(Fe.scroller.clientWidth,Fe.sizer.offsetLeft+re.adjustWidthTo+Wa(pe)+pe.display.barWidth),re.maxScrollLeft=Math.max(0,Fe.sizer.offsetLeft+re.adjustWidthTo-Za(pe))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=Fe.input.prepareSelection())}function ht(re){var pe=re.cm;re.adjustWidthTo!=null&&(pe.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<pe.doc.scrollLeft&&uu(pe,Math.min(pe.display.scroller.scrollLeft,re.maxScrollLeft),!0),pe.display.maxLineChanged=!1);var Fe=re.focus&&re.focus==at();re.preparedSelection&&pe.display.input.showSelection(re.preparedSelection,Fe),(re.updatedDisplay||re.startHeight!=pe.doc.height)&&rc(pe,re.barMeasure),re.updatedDisplay&&Ni(pe,re.barMeasure),re.selectionChanged&&vs(pe),pe.state.focused&&re.updateInput&&pe.display.input.reset(re.typing),Fe&&ds(re.cm)}function bt(re){var pe=re.cm,Fe=pe.display,Re=pe.doc;if(re.updatedDisplay&&Kn(pe,re.update),Fe.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(Fe.wheelStartX=Fe.wheelStartY=null),re.scrollTop!=null&&ed(pe,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&uu(pe,re.scrollLeft,!0,!0),re.scrollToPos){var Ue=ih(pe,Bn(Re,re.scrollToPos.from),Bn(Re,re.scrollToPos.to),re.scrollToPos.margin);Nd(pe,Ue)}var ot=re.maybeHiddenMarkers,wt=re.maybeUnhiddenMarkers;if(ot)for(var Rt=0;Rt<ot.length;++Rt)ot[Rt].lines.length||ln(ot[Rt],"hide");if(wt)for(var It=0;It<wt.length;++It)wt[It].lines.length&&ln(wt[It],"unhide");Fe.wrapper.offsetHeight&&(Re.scrollTop=pe.display.scroller.scrollTop),re.changeObjs&&ln(pe,"changes",pe,re.changeObjs),re.update&&re.update.finish()}function Et(re,pe){if(re.curOp)return pe();Oa(re);try{return pe()}finally{oc(re)}}function wn(re,pe){return function(){if(re.curOp)return pe.apply(re,arguments);Oa(re);try{return pe.apply(re,arguments)}finally{oc(re)}}}function fn(re){return function(){if(this.curOp)return re.apply(this,arguments);Oa(this);try{return re.apply(this,arguments)}finally{oc(this)}}}function an(re){return function(){var pe=this.cm;if(!pe||pe.curOp)return re.apply(this,arguments);Oa(pe);try{return re.apply(this,arguments)}finally{oc(pe)}}}function Sn(re,pe){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(pe,st(xn,re))}function xn(re){var pe=re.doc;if(!(pe.highlightFrontier>=re.display.viewTo)){var Fe=+new Date+re.options.workTime,Re=zi(re,pe.highlightFrontier),Ue=[];pe.iter(Re.line,Math.min(pe.first+pe.size,re.display.viewTo+500),function(ot){if(Re.line>=re.display.viewFrom){var wt=ot.styles,Rt=ot.text.length>re.options.maxHighlightLength?St(pe.mode,Re.state):null,It=Xi(re,ot,Re,!0);Rt&&(Re.state=Rt),ot.styles=It.styles;var Xt=ot.styleClasses,Tn=It.classes;Tn?ot.styleClasses=Tn:Xt&&(ot.styleClasses=null);for(var nn=!wt||wt.length!=ot.styles.length||Xt!=Tn&&(!Xt||!Tn||Xt.bgClass!=Tn.bgClass||Xt.textClass!=Tn.textClass),Un=0;!nn&&Un<wt.length;++Un)nn=wt[Un]!=ot.styles[Un];nn&&Ue.push(Re.line),ot.stateAfter=Re.save(),Re.nextLine()}else ot.text.length<=re.options.maxHighlightLength&&En(re,ot.text,Re),ot.stateAfter=Re.line%5==0?Re.save():null,Re.nextLine();if(+new Date>Fe)return Sn(re,re.options.workDelay),!0}),pe.highlightFrontier=Re.line,pe.modeFrontier=Math.max(pe.modeFrontier,Re.line),Ue.length&&Et(re,function(){for(var ot=0;ot<Ue.length;ot++)wo(re,Ue[ot],"text")})}}var Cn=function(re,pe,Fe){var Re=re.display;this.viewport=pe,this.visible=Wo(Re,re.doc,pe),this.editorIsHidden=!Re.wrapper.offsetWidth,this.wrapperHeight=Re.wrapper.clientHeight,this.wrapperWidth=Re.wrapper.clientWidth,this.oldDisplayWidth=Za(re),this.force=Fe,this.dims=bh(re),this.events=[]};Cn.prototype.signal=function(re,pe){An(re,pe)&&this.events.push(arguments)},Cn.prototype.finish=function(){for(var re=0;re<this.events.length;re++)ln.apply(null,this.events[re])};function zn(re){var pe=re.display;!pe.scrollbarsClipped&&pe.scroller.offsetWidth&&(pe.nativeBarWidth=pe.scroller.offsetWidth-pe.scroller.clientWidth,pe.heightForcer.style.height=Wa(re)+"px",pe.sizer.style.marginBottom=-pe.nativeBarWidth+"px",pe.sizer.style.borderRightWidth=Wa(re)+"px",pe.scrollbarsClipped=!0)}function ni(re){if(re.hasFocus())return null;var pe=at();if(!pe||!ft(re.display.lineDiv,pe))return null;var Fe={activeElt:pe};if(window.getSelection){var Re=window.getSelection();Re.anchorNode&&Re.extend&&ft(re.display.lineDiv,Re.anchorNode)&&(Fe.anchorNode=Re.anchorNode,Fe.anchorOffset=Re.anchorOffset,Fe.focusNode=Re.focusNode,Fe.focusOffset=Re.focusOffset)}return Fe}function Zn(re){if(!(!re||!re.activeElt||re.activeElt==at())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&&ft(document.body,re.anchorNode)&&ft(document.body,re.focusNode))){var pe=window.getSelection(),Fe=document.createRange();Fe.setEnd(re.anchorNode,re.anchorOffset),Fe.collapse(!1),pe.removeAllRanges(),pe.addRange(Fe),pe.extend(re.focusNode,re.focusOffset)}}function wi(re,pe){var Fe=re.display,Re=re.doc;if(pe.editorIsHidden)return ga(re),!1;if(!pe.force&&pe.visible.from>=Fe.viewFrom&&pe.visible.to<=Fe.viewTo&&(Fe.updateLineNumbers==null||Fe.updateLineNumbers>=Fe.viewTo)&&Fe.renderedView==Fe.view&&Cl(re)==0)return!1;ki(re)&&(ga(re),pe.dims=bh(re));var Ue=Re.first+Re.size,ot=Math.max(pe.visible.from-re.options.viewportMargin,Re.first),wt=Math.min(Ue,pe.visible.to+re.options.viewportMargin);Fe.viewFrom<ot&&ot-Fe.viewFrom<20&&(ot=Math.max(Re.first,Fe.viewFrom)),Fe.viewTo>wt&&Fe.viewTo-wt<20&&(wt=Math.min(Ue,Fe.viewTo)),Rn&&(ot=sr(re.doc,ot),wt=Ki(re.doc,wt));var Rt=ot!=Fe.viewFrom||wt!=Fe.viewTo||Fe.lastWrapHeight!=pe.wrapperHeight||Fe.lastWrapWidth!=pe.wrapperWidth;cs(re,ot,wt),Fe.viewOffset=to(dn(re.doc,Fe.viewFrom)),re.display.mover.style.top=Fe.viewOffset+"px";var It=Cl(re);if(!Rt&&It==0&&!pe.force&&Fe.renderedView==Fe.view&&(Fe.updateLineNumbers==null||Fe.updateLineNumbers>=Fe.viewTo))return!1;var Xt=ni(re);return It>4&&(Fe.lineDiv.style.display="none"),si(re,Fe.updateLineNumbers,pe.dims),It>4&&(Fe.lineDiv.style.display=""),Fe.renderedView=Fe.view,Zn(Xt),De(Fe.cursorDiv),De(Fe.selectionDiv),Fe.gutters.style.height=Fe.sizer.style.minHeight=0,Rt&&(Fe.lastWrapHeight=pe.wrapperHeight,Fe.lastWrapWidth=pe.wrapperWidth,Sn(re,400)),Fe.updateLineNumbers=null,!0}function Kn(re,pe){for(var Fe=pe.viewport,Re=!0;;Re=!1){if(!Re||!re.options.lineWrapping||pe.oldDisplayWidth==Za(re)){if(Fe&&Fe.top!=null&&(Fe={top:Math.min(re.doc.height+$l(re.display)-Uu(re),Fe.top)}),pe.visible=Wo(re.display,re.doc,Fe),pe.visible.from>=re.display.viewFrom&&pe.visible.to<=re.display.viewTo)break}else Re&&(pe.visible=Wo(re.display,re.doc,Fe));if(!wi(re,pe))break;Gr(re);var Ue=Fl(re);Ea(re),rc(re,Ue),Ni(re,Ue),pe.force=!1}pe.signal(re,"update",re),(re.display.viewFrom!=re.display.reportedViewFrom||re.display.viewTo!=re.display.reportedViewTo)&&(pe.signal(re,"viewportChange",re,re.display.viewFrom,re.display.viewTo),re.display.reportedViewFrom=re.display.viewFrom,re.display.reportedViewTo=re.display.viewTo)}function gi(re,pe){var Fe=new Cn(re,pe);if(wi(re,Fe)){Gr(re),Kn(re,Fe);var Re=Fl(re);Ea(re),rc(re,Re),Ni(re,Re),Fe.finish()}}function si(re,pe,Fe){var Re=re.display,Ue=re.options.lineNumbers,ot=Re.lineDiv,wt=ot.firstChild;function Rt(mi){var _i=mi.nextSibling;return he&&oe&&re.display.currentWheelTarget==mi?mi.style.display="none":mi.parentNode.removeChild(mi),_i}for(var It=Re.view,Xt=Re.viewFrom,Tn=0;Tn<It.length;Tn++){var nn=It[Tn];if(!nn.hidden)if(!nn.node||nn.node.parentNode!=ot){var Un=wl(re,nn,Xt,Fe);ot.insertBefore(Un,wt)}else{for(;wt!=nn.node;)wt=Rt(wt);var Fn=Ue&&pe!=null&&pe<=Xt&&nn.lineNumber;nn.changes&&(ut(nn.changes,"gutter")>-1&&(Fn=!1),Ls(re,nn,Xt,Fe)),Fn&&(De(nn.lineNumber),nn.lineNumber.appendChild(document.createTextNode(Dn(re.options,Xt)))),wt=nn.node.nextSibling}Xt+=nn.size}for(;wt;)wt=Rt(wt)}function Ii(re){var pe=re.gutters.offsetWidth;re.sizer.style.marginLeft=pe+"px"}function Ni(re,pe){re.display.sizer.style.minHeight=pe.docHeight+"px",re.display.heightForcer.style.top=pe.docHeight+"px",re.display.gutters.style.height=pe.docHeight+re.display.barHeight+Wa(re)+"px"}function Gi(re){var pe=re.display,Fe=pe.view;if(!(!pe.alignWidgets&&(!pe.gutters.firstChild||!re.options.fixedGutter))){for(var Re=Cc(pe)-pe.scroller.scrollLeft+re.doc.scrollLeft,Ue=pe.gutters.offsetWidth,ot=Re+"px",wt=0;wt<Fe.length;wt++)if(!Fe[wt].hidden){re.options.fixedGutter&&(Fe[wt].gutter&&(Fe[wt].gutter.style.left=ot),Fe[wt].gutterBackground&&(Fe[wt].gutterBackground.style.left=ot));var Rt=Fe[wt].alignable;if(Rt)for(var It=0;It<Rt.length;It++)Rt[It].style.left=ot}re.options.fixedGutter&&(pe.gutters.style.left=Re+Ue+"px")}}function ki(re){if(!re.options.lineNumbers)return!1;var pe=re.doc,Fe=Dn(re.options,pe.first+pe.size-1),Re=re.display;if(Fe.length!=Re.lineNumChars){var Ue=Re.measure.appendChild(Ze("div",[Ze("div",Fe)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ot=Ue.firstChild.offsetWidth,wt=Ue.offsetWidth-ot;return Re.lineGutter.style.width="",Re.lineNumInnerWidth=Math.max(ot,Re.lineGutter.offsetWidth-wt)+1,Re.lineNumWidth=Re.lineNumInnerWidth+wt,Re.lineNumChars=Re.lineNumInnerWidth?Fe.length:-1,Re.lineGutter.style.width=Re.lineNumWidth+"px",Ii(re.display),!0}return!1}function Ai(re,pe){for(var Fe=[],Re=!1,Ue=0;Ue<re.length;Ue++){var ot=re[Ue],wt=null;if(typeof ot!="string"&&(wt=ot.style,ot=ot.className),ot=="CodeMirror-linenumbers")if(pe)Re=!0;else continue;Fe.push({className:ot,style:wt})}return pe&&!Re&&Fe.push({className:"CodeMirror-linenumbers",style:null}),Fe}function ur(re){var pe=re.gutters,Fe=re.gutterSpecs;De(pe),re.lineGutter=null;for(var Re=0;Re<Fe.length;++Re){var Ue=Fe[Re],ot=Ue.className,wt=Ue.style,Rt=pe.appendChild(Ze("div",null,"CodeMirror-gutter "+ot));wt&&(Rt.style.cssText=wt),ot=="CodeMirror-linenumbers"&&(re.lineGutter=Rt,Rt.style.width=(re.lineNumWidth||1)+"px")}pe.style.display=Fe.length?"":"none",Ii(re)}function Qn(re){ur(re.display),Ms(re),Gi(re)}function ji(re,pe,Fe,Re){var Ue=this;this.input=Fe,Ue.scrollbarFiller=Ze("div",null,"CodeMirror-scrollbar-filler"),Ue.scrollbarFiller.setAttribute("cm-not-content","true"),Ue.gutterFiller=Ze("div",null,"CodeMirror-gutter-filler"),Ue.gutterFiller.setAttribute("cm-not-content","true"),Ue.lineDiv=Xe("div",null,"CodeMirror-code"),Ue.selectionDiv=Ze("div",null,null,"position: relative; z-index: 1"),Ue.cursorDiv=Ze("div",null,"CodeMirror-cursors"),Ue.measure=Ze("div",null,"CodeMirror-measure"),Ue.lineMeasure=Ze("div",null,"CodeMirror-measure"),Ue.lineSpace=Xe("div",[Ue.measure,Ue.lineMeasure,Ue.selectionDiv,Ue.cursorDiv,Ue.lineDiv],null,"position: relative; outline: none");var ot=Xe("div",[Ue.lineSpace],"CodeMirror-lines");Ue.mover=Ze("div",[ot],null,"position: relative"),Ue.sizer=Ze("div",[Ue.mover],"CodeMirror-sizer"),Ue.sizerWidth=null,Ue.heightForcer=Ze("div",null,null,"position: absolute; height: "+mt+"px; width: 1px;"),Ue.gutters=Ze("div",null,"CodeMirror-gutters"),Ue.lineGutter=null,Ue.scroller=Ze("div",[Ue.sizer,Ue.heightForcer,Ue.gutters],"CodeMirror-scroll"),Ue.scroller.setAttribute("tabIndex","-1"),Ue.wrapper=Ze("div",[Ue.scrollbarFiller,Ue.gutterFiller,Ue.scroller],"CodeMirror"),Ce&&Le<8&&(Ue.gutters.style.zIndex=-1,Ue.scroller.style.paddingRight=0),!he&&!(Me&&ee)&&(Ue.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(Ue.wrapper):re(Ue.wrapper)),Ue.viewFrom=Ue.viewTo=pe.first,Ue.reportedViewFrom=Ue.reportedViewTo=pe.first,Ue.view=[],Ue.renderedView=null,Ue.externalMeasured=null,Ue.viewOffset=0,Ue.lastWrapHeight=Ue.lastWrapWidth=0,Ue.updateLineNumbers=null,Ue.nativeBarWidth=Ue.barHeight=Ue.barWidth=0,Ue.scrollbarsClipped=!1,Ue.lineNumWidth=Ue.lineNumInnerWidth=Ue.lineNumChars=null,Ue.alignWidgets=!1,Ue.cachedCharWidth=Ue.cachedTextHeight=Ue.cachedPaddingH=null,Ue.maxLine=null,Ue.maxLineLength=0,Ue.maxLineChanged=!1,Ue.wheelDX=Ue.wheelDY=Ue.wheelStartX=Ue.wheelStartY=null,Ue.shift=!1,Ue.selForContextMenu=null,Ue.activeTouch=null,Ue.gutterSpecs=Ai(Re.gutters,Re.lineNumbers),ur(Ue),Fe.init(Ue)}var Ei=0,bi=null;Ce?bi=-.53:Me?bi=15:xe?bi=-.7:le&&(bi=-1/3);function Ji(re){var pe=re.wheelDeltaX,Fe=re.wheelDeltaY;return pe==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(pe=re.detail),Fe==null&&re.detail&&re.axis==re.VERTICAL_AXIS?Fe=re.detail:Fe==null&&(Fe=re.wheelDelta),{x:pe,y:Fe}}function pi(re){var pe=Ji(re);return pe.x*=bi,pe.y*=bi,pe}function cr(re,pe){var Fe=Ji(pe),Re=Fe.x,Ue=Fe.y,ot=re.display,wt=ot.scroller,Rt=wt.scrollWidth>wt.clientWidth,It=wt.scrollHeight>wt.clientHeight;if(Re&&Rt||Ue&&It){if(Ue&&oe&&he){e:for(var Xt=pe.target,Tn=ot.view;Xt!=wt;Xt=Xt.parentNode)for(var nn=0;nn<Tn.length;nn++)if(Tn[nn].node==Xt){re.display.currentWheelTarget=Xt;break e}}if(Re&&!Me&&!ge&&bi!=null){Ue&&It&&Au(re,Math.max(0,wt.scrollTop+Ue*bi)),uu(re,Math.max(0,wt.scrollLeft+Re*bi)),(!Ue||Ue&&It)&&ai(pe),ot.wheelStartX=null;return}if(Ue&&bi!=null){var Un=Ue*bi,Fn=re.doc.scrollTop,mi=Fn+ot.wrapper.clientHeight;Un<0?Fn=Math.max(0,Fn+Un-50):mi=Math.min(re.doc.height,mi+Un+50),gi(re,{top:Fn,bottom:mi})}Ei<20&&(ot.wheelStartX==null?(ot.wheelStartX=wt.scrollLeft,ot.wheelStartY=wt.scrollTop,ot.wheelDX=Re,ot.wheelDY=Ue,setTimeout(function(){if(ot.wheelStartX!=null){var _i=wt.scrollLeft-ot.wheelStartX,Bi=wt.scrollTop-ot.wheelStartY,rr=Bi&&ot.wheelDY&&Bi/ot.wheelDY||_i&&ot.wheelDX&&_i/ot.wheelDX;ot.wheelStartX=ot.wheelStartY=null,rr&&(bi=(bi*Ei+rr)/(Ei+1),++Ei)}},200)):(ot.wheelDX+=Re,ot.wheelDY+=Ue))}}var Qi=function(re,pe){this.ranges=re,this.primIndex=pe};Qi.prototype.primary=function(){return this.ranges[this.primIndex]},Qi.prototype.equals=function(re){if(re==this)return!0;if(re.primIndex!=this.primIndex||re.ranges.length!=this.ranges.length)return!1;for(var pe=0;pe<this.ranges.length;pe++){var Fe=this.ranges[pe],Re=re.ranges[pe];if(!jn(Fe.anchor,Re.anchor)||!jn(Fe.head,Re.head))return!1}return!0},Qi.prototype.deepCopy=function(){for(var re=[],pe=0;pe<this.ranges.length;pe++)re[pe]=new Pi(On(this.ranges[pe].anchor),On(this.ranges[pe].head));return new Qi(re,this.primIndex)},Qi.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},Qi.prototype.contains=function(re,pe){pe||(pe=re);for(var Fe=0;Fe<this.ranges.length;Fe++){var Re=this.ranges[Fe];if(rn(pe,Re.from())>=0&&rn(re,Re.to())<=0)return Fe}return-1};var Pi=function(re,pe){this.anchor=re,this.head=pe};Pi.prototype.from=function(){return Gn(this.anchor,this.head)},Pi.prototype.to=function(){return ei(this.anchor,this.head)},Pi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Wi(re,pe,Fe){var Re=re&&re.options.selectionsMayTouch,Ue=pe[Fe];pe.sort(function(Un,Fn){return rn(Un.from(),Fn.from())}),Fe=ut(pe,Ue);for(var ot=1;ot<pe.length;ot++){var wt=pe[ot],Rt=pe[ot-1],It=rn(Rt.to(),wt.from());if(Re&&!wt.empty()?It>0:It>=0){var Xt=Gn(Rt.from(),wt.from()),Tn=ei(Rt.to(),wt.to()),nn=Rt.empty()?wt.from()==wt.head:Rt.from()==Rt.head;ot<=Fe&&--Fe,pe.splice(--ot,2,new Pi(nn?Tn:Xt,nn?Xt:Tn))}}return new Qi(pe,Fe)}function Sr(re,pe){return new Qi([new Pi(re,pe||re)],0)}function nr(re){return re.text?$t(re.from.line+re.text.length-1,Wt(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function xo(re,pe){if(rn(re,pe.from)<0)return re;if(rn(re,pe.to)<=0)return nr(pe);var Fe=re.line+pe.text.length-(pe.to.line-pe.from.line)-1,Re=re.ch;return re.line==pe.to.line&&(Re+=nr(pe).ch-pe.to.ch),$t(Fe,Re)}function Po(re,pe){for(var Fe=[],Re=0;Re<re.sel.ranges.length;Re++){var Ue=re.sel.ranges[Re];Fe.push(new Pi(xo(Ue.anchor,pe),xo(Ue.head,pe)))}return Wi(re.cm,Fe,re.sel.primIndex)}function is(re,pe,Fe){return re.line==pe.line?$t(Fe.line,re.ch-pe.ch+Fe.ch):$t(Fe.line+(re.line-pe.line),re.ch)}function so(re,pe,Fe){for(var Re=[],Ue=$t(re.first,0),ot=Ue,wt=0;wt<pe.length;wt++){var Rt=pe[wt],It=is(Rt.from,Ue,ot),Xt=is(nr(Rt),Ue,ot);if(Ue=Rt.to,ot=Xt,Fe=="around"){var Tn=re.sel.ranges[wt],nn=rn(Tn.head,Tn.anchor)<0;Re[wt]=new Pi(nn?Xt:It,nn?It:Xt)}else Re[wt]=new Pi(It,It)}return new Qi(Re,re.sel.primIndex)}function Tr(re){re.doc.mode=Ke(re.options,re.doc.modeOption),Oo(re)}function Oo(re){re.doc.iter(function(pe){pe.stateAfter&&(pe.stateAfter=null),pe.styles&&(pe.styles=null)}),re.doc.modeFrontier=re.doc.highlightFrontier=re.doc.first,Sn(re,100),re.state.modeGen++,re.curOp&&Ms(re)}function Or(re,pe){return pe.from.ch==0&&pe.to.ch==0&&Wt(pe.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function Xr(re,pe,Fe,Re){function Ue(Rr){return Fe?Fe[Rr]:null}function ot(Rr,wr,Zr){as(Rr,wr,Zr,Re),Li(Rr,"change",Rr,pe)}function wt(Rr,wr){for(var Zr=[],bo=Rr;bo<wr;++bo)Zr.push(new Xo(Xt[bo],Ue(bo),Re));return Zr}var Rt=pe.from,It=pe.to,Xt=pe.text,Tn=dn(re,Rt.line),nn=dn(re,It.line),Un=Wt(Xt),Fn=Ue(Xt.length-1),mi=It.line-Rt.line;if(pe.full)re.insert(0,wt(0,Xt.length)),re.remove(Xt.length,re.size-Xt.length);else if(Or(re,pe)){var _i=wt(0,Xt.length-1);ot(nn,nn.text,Fn),mi&&re.remove(Rt.line,mi),_i.length&&re.insert(Rt.line,_i)}else if(Tn==nn)if(Xt.length==1)ot(Tn,Tn.text.slice(0,Rt.ch)+Un+Tn.text.slice(It.ch),Fn);else{var Bi=wt(1,Xt.length-1);Bi.push(new Xo(Un+Tn.text.slice(It.ch),Fn,Re)),ot(Tn,Tn.text.slice(0,Rt.ch)+Xt[0],Ue(0)),re.insert(Rt.line+1,Bi)}else if(Xt.length==1)ot(Tn,Tn.text.slice(0,Rt.ch)+Xt[0]+nn.text.slice(It.ch),Ue(0)),re.remove(Rt.line+1,mi);else{ot(Tn,Tn.text.slice(0,Rt.ch)+Xt[0],Ue(0)),ot(nn,Un+nn.text.slice(It.ch),Fn);var rr=wt(1,Xt.length-1);mi>1&&re.remove(Rt.line+1,mi-1),re.insert(Rt.line+1,rr)}Li(re,"change",re,pe)}function rs(re,pe,Fe){function Re(Ue,ot,wt){if(Ue.linked)for(var Rt=0;Rt<Ue.linked.length;++Rt){var It=Ue.linked[Rt];if(It.doc!=ot){var Xt=wt&&It.sharedHist;Fe&&!Xt||(pe(It.doc,Xt),Re(It.doc,Ue,Xt))}}}Re(re,null,!0)}function Wr(re,pe){if(pe.cm)throw new Error("This document is already in use.");re.doc=pe,pe.cm=re,Vr(re),Tr(re),Er(re),re.options.lineWrapping||Bo(re),re.options.mode=pe.modeOption,Ms(re)}function Er(re){(re.doc.direction=="rtl"?Ct:Ae)(re.display.lineDiv,"CodeMirror-rtl")}function Jr(re){Et(re,function(){Er(re),Ms(re)})}function Cr(re){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=re||1}function ao(re,pe){var Fe={from:On(pe.from),to:nr(pe),text:Pn(re,pe.from,pe.to)};return Cs(re,Fe,pe.from.line,pe.to.line+1),rs(re,function(Re){return Cs(Re,Fe,pe.from.line,pe.to.line+1)},!0),Fe}function Lr(re){for(;re.length;){var pe=Wt(re);if(pe.ranges)re.pop();else break}}function fo(re,pe){if(pe)return Lr(re.done),Wt(re.done);if(re.done.length&&!Wt(re.done).ranges)return Wt(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),Wt(re.done)}function Zo(re,pe,Fe,Re){var Ue=re.history;Ue.undone.length=0;var ot=+new Date,wt,Rt;if((Ue.lastOp==Re||Ue.lastOrigin==pe.origin&&pe.origin&&(pe.origin.charAt(0)=="+"&&Ue.lastModTime>ot-(re.cm?re.cm.options.historyEventDelay:500)||pe.origin.charAt(0)=="*"))&&(wt=fo(Ue,Ue.lastOp==Re)))Rt=Wt(wt.changes),rn(pe.from,pe.to)==0&&rn(pe.from,Rt.to)==0?Rt.to=nr(pe):wt.changes.push(ao(re,pe));else{var It=Wt(Ue.done);for((!It||!It.ranges)&&Do(re.sel,Ue.done),wt={changes:[ao(re,pe)],generation:Ue.generation},Ue.done.push(wt);Ue.done.length>Ue.undoDepth;)Ue.done.shift(),Ue.done[0].ranges||Ue.done.shift()}Ue.done.push(Fe),Ue.generation=++Ue.maxGeneration,Ue.lastModTime=Ue.lastSelTime=ot,Ue.lastOp=Ue.lastSelOp=Re,Ue.lastOrigin=Ue.lastSelOrigin=pe.origin,Rt||ln(re,"historyAdded")}function Ko(re,pe,Fe,Re){var Ue=pe.charAt(0);return Ue=="*"||Ue=="+"&&Fe.ranges.length==Re.ranges.length&&Fe.somethingSelected()==Re.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function Qr(re,pe,Fe,Re){var Ue=re.history,ot=Re&&Re.origin;Fe==Ue.lastSelOp||ot&&Ue.lastSelOrigin==ot&&(Ue.lastModTime==Ue.lastSelTime&&Ue.lastOrigin==ot||Ko(re,ot,Wt(Ue.done),pe))?Ue.done[Ue.done.length-1]=pe:Do(pe,Ue.done),Ue.lastSelTime=+new Date,Ue.lastSelOrigin=ot,Ue.lastSelOp=Fe,Re&&Re.clearRedo!==!1&&Lr(Ue.undone)}function Do(re,pe){var Fe=Wt(pe);Fe&&Fe.ranges&&Fe.equals(re)||pe.push(re)}function Cs(re,pe,Fe,Re){var Ue=pe["spans_"+re.id],ot=0;re.iter(Math.max(re.first,Fe),Math.min(re.first+re.size,Re),function(wt){wt.markedSpans&&((Ue||(Ue=pe["spans_"+re.id]={}))[ot]=wt.markedSpans),++ot})}function Mo(re){if(!re)return null;for(var pe,Fe=0;Fe<re.length;++Fe)re[Fe].marker.explicitlyCleared?pe||(pe=re.slice(0,Fe)):pe&&pe.push(re[Fe]);return pe?pe.length?pe:null:re}function Jo(re,pe){var Fe=pe["spans_"+re.id];if(!Fe)return null;for(var Re=[],Ue=0;Ue<pe.text.length;++Ue)Re.push(Mo(Fe[Ue]));return Re}function Ss(re,pe){var Fe=Jo(re,pe),Re=Ui(re,pe);if(!Fe)return Re;if(!Re)return Fe;for(var Ue=0;Ue<Fe.length;++Ue){var ot=Fe[Ue],wt=Re[Ue];if(ot&&wt)e:for(var Rt=0;Rt<wt.length;++Rt){for(var It=wt[Rt],Xt=0;Xt<ot.length;++Xt)if(ot[Xt].marker==It.marker)continue e;ot.push(It)}else wt&&(Fe[Ue]=wt)}return Fe}function Js(re,pe,Fe){for(var Re=[],Ue=0;Ue<re.length;++Ue){var ot=re[Ue];if(ot.ranges){Re.push(Fe?Qi.prototype.deepCopy.call(ot):ot);continue}var wt=ot.changes,Rt=[];Re.push({changes:Rt});for(var It=0;It<wt.length;++It){var Xt=wt[It],Tn=void 0;if(Rt.push({from:Xt.from,to:Xt.to,text:Xt.text}),pe)for(var nn in Xt)(Tn=nn.match(/^spans_(\d+)$/))&&ut(pe,Number(Tn[1]))>-1&&(Wt(Rt)[nn]=Xt[nn],delete Xt[nn])}}return Re}function Pl(re,pe,Fe,Re){if(Re){var Ue=re.anchor;if(Fe){var ot=rn(pe,Ue)<0;ot!=rn(Fe,Ue)<0?(Ue=pe,pe=Fe):ot!=rn(pe,Fe)<0&&(pe=Fe)}return new Pi(Ue,pe)}else return new Pi(Fe||pe,pe)}function Qo(re,pe,Fe,Re,Ue){Ue==null&&(Ue=re.cm&&(re.cm.display.shift||re.extend)),As(re,new Qi([Pl(re.sel.primary(),pe,Fe,Ue)],0),Re)}function qo(re,pe,Fe){for(var Re=[],Ue=re.cm&&(re.cm.display.shift||re.extend),ot=0;ot<re.sel.ranges.length;ot++)Re[ot]=Pl(re.sel.ranges[ot],pe[ot],null,Ue);var wt=Wi(re.cm,Re,re.sel.primIndex);As(re,wt,Fe)}function xs(re,pe,Fe,Re){var Ue=re.sel.ranges.slice(0);Ue[pe]=Fe,As(re,Wi(re.cm,Ue,re.sel.primIndex),Re)}function Ts(re,pe,Fe,Re){As(re,Sr(pe,Fe),Re)}function ma(re,pe,Fe){var Re={ranges:pe.ranges,update:function(Ue){this.ranges=[];for(var ot=0;ot<Ue.length;ot++)this.ranges[ot]=new Pi(Bn(re,Ue[ot].anchor),Bn(re,Ue[ot].head))},origin:Fe&&Fe.origin};return ln(re,"beforeSelectionChange",re,Re),re.cm&&ln(re.cm,"beforeSelectionChange",re.cm,Re),Re.ranges!=pe.ranges?Wi(re.cm,Re.ranges,Re.ranges.length-1):pe}function jo(re,pe,Fe){var Re=re.history.done,Ue=Wt(Re);Ue&&Ue.ranges?(Re[Re.length-1]=pe,La(re,pe,Fe)):As(re,pe,Fe)}function As(re,pe,Fe){La(re,pe,Fe),Qr(re,re.sel,re.cm?re.cm.curOp.id:NaN,Fe)}function La(re,pe,Fe){(An(re,"beforeSelectionChange")||re.cm&&An(re.cm,"beforeSelectionChange"))&&(pe=ma(re,pe,Fe));var Re=Fe&&Fe.bias||(rn(pe.primary().head,re.sel.primary().head)<0?-1:1);_l(re,jl(re,pe,Re,!0)),!(Fe&&Fe.scroll===!1)&&re.cm&&ic(re.cm)}function _l(re,pe){pe.equals(re.sel)||(re.sel=pe,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,Hn(re.cm)),Li(re,"cursorActivity",re))}function Xl(re){_l(re,jl(re,re.sel,null,!1))}function jl(re,pe,Fe,Re){for(var Ue,ot=0;ot<pe.ranges.length;ot++){var wt=pe.ranges[ot],Rt=pe.ranges.length==re.sel.ranges.length&&re.sel.ranges[ot],It=hu(re,wt.anchor,Rt&&Rt.anchor,Fe,Re),Xt=hu(re,wt.head,Rt&&Rt.head,Fe,Re);(Ue||It!=wt.anchor||Xt!=wt.head)&&(Ue||(Ue=pe.ranges.slice(0,ot)),Ue[ot]=new Pi(It,Xt))}return Ue?Wi(re.cm,Ue,pe.primIndex):pe}function cu(re,pe,Fe,Re,Ue){var ot=dn(re,pe.line);if(ot.markedSpans)for(var wt=0;wt<ot.markedSpans.length;++wt){var Rt=ot.markedSpans[wt],It=Rt.marker,Xt="selectLeft"in It?!It.selectLeft:It.inclusiveLeft,Tn="selectRight"in It?!It.selectRight:It.inclusiveRight;if((Rt.from==null||(Xt?Rt.from<=pe.ch:Rt.from<pe.ch))&&(Rt.to==null||(Tn?Rt.to>=pe.ch:Rt.to>pe.ch))){if(Ue&&(ln(It,"beforeCursorEnter"),It.explicitlyCleared))if(ot.markedSpans){--wt;continue}else break;if(!It.atomic)continue;if(Fe){var nn=It.find(Re<0?1:-1),Un=void 0;if((Re<0?Tn:Xt)&&(nn=Jl(re,nn,-Re,nn&&nn.line==pe.line?ot:null)),nn&&nn.line==pe.line&&(Un=rn(nn,Fe))&&(Re<0?Un<0:Un>0))return cu(re,nn,pe,Re,Ue)}var Fn=It.find(Re<0?-1:1);return(Re<0?Xt:Tn)&&(Fn=Jl(re,Fn,Re,Fn.line==pe.line?ot:null)),Fn?cu(re,Fn,pe,Re,Ue):null}}return pe}function hu(re,pe,Fe,Re,Ue){var ot=Re||1,wt=cu(re,pe,Fe,ot,Ue)||!Ue&&cu(re,pe,Fe,ot,!0)||cu(re,pe,Fe,-ot,Ue)||!Ue&&cu(re,pe,Fe,-ot,!0);return wt||(re.cantEdit=!0,$t(re.first,0))}function Jl(re,pe,Fe,Re){return Fe<0&&pe.ch==0?pe.line>re.first?Bn(re,$t(pe.line-1)):null:Fe>0&&pe.ch==(Re||dn(re,pe.line)).text.length?pe.line<re.first+re.size-1?$t(pe.line+1,0):null:new $t(pe.line,pe.ch+Fe)}function gs(re){re.setSelection($t(re.firstLine(),0),$t(re.lastLine()),gt)}function Ra(re,pe,Fe){var Re={canceled:!1,from:pe.from,to:pe.to,text:pe.text,origin:pe.origin,cancel:function(){return Re.canceled=!0}};return Fe&&(Re.update=function(Ue,ot,wt,Rt){Ue&&(Re.from=Bn(re,Ue)),ot&&(Re.to=Bn(re,ot)),wt&&(Re.text=wt),Rt!==void 0&&(Re.origin=Rt)}),ln(re,"beforeChange",re,Re),re.cm&&ln(re.cm,"beforeChange",re.cm,Re),Re.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:Re.from,to:Re.to,text:Re.text,origin:Re.origin}}function oa(re,pe,Fe){if(re.cm){if(!re.cm.curOp)return wn(re.cm,oa)(re,pe,Fe);if(re.cm.state.suppressEdits)return}if(!((An(re,"beforeChange")||re.cm&&An(re.cm,"beforeChange"))&&(pe=Ra(re,pe,!0),!pe))){var Re=mr&&!Fe&&Pr(re,pe.from,pe.to);if(Re)for(var Ue=Re.length-1;Ue>=0;--Ue)Ns(re,{from:Re[Ue].from,to:Re[Ue].to,text:Ue?[""]:pe.text,origin:pe.origin});else Ns(re,pe)}}function Ns(re,pe){if(!(pe.text.length==1&&pe.text[0]==""&&rn(pe.from,pe.to)==0)){var Fe=Po(re,pe);Zo(re,pe,Fe,re.cm?re.cm.curOp.id:NaN),du(re,pe,Fe,Ui(re,pe));var Re=[];rs(re,function(Ue,ot){!ot&&ut(Re,Ue.history)==-1&&(js(Ue.history,pe),Re.push(Ue.history)),du(Ue,pe,null,Ui(Ue,pe))})}}function Ql(re,pe,Fe){var Re=re.cm&&re.cm.state.suppressEdits;if(!(Re&&!Fe)){for(var Ue=re.history,ot,wt=re.sel,Rt=pe=="undo"?Ue.done:Ue.undone,It=pe=="undo"?Ue.undone:Ue.done,Xt=0;Xt<Rt.length&&(ot=Rt[Xt],!(Fe?ot.ranges&&!ot.equals(re.sel):!ot.ranges));Xt++);if(Xt!=Rt.length){for(Ue.lastOrigin=Ue.lastSelOrigin=null;;)if(ot=Rt.pop(),ot.ranges){if(Do(ot,It),Fe&&!ot.equals(re.sel)){As(re,ot,{clearRedo:!1});return}wt=ot}else if(Re){Rt.push(ot);return}else break;var Tn=[];Do(wt,It),It.push({changes:Tn,generation:Ue.generation}),Ue.generation=ot.generation||++Ue.maxGeneration;for(var nn=An(re,"beforeChange")||re.cm&&An(re.cm,"beforeChange"),Un=function(_i){var Bi=ot.changes[_i];if(Bi.origin=pe,nn&&!Ra(re,Bi,!1))return Rt.length=0,{};Tn.push(ao(re,Bi));var rr=_i?Po(re,Bi):Wt(Rt);du(re,Bi,rr,Ss(re,Bi)),!_i&&re.cm&&re.cm.scrollIntoView({from:Bi.from,to:nr(Bi)});var Rr=[];rs(re,function(wr,Zr){!Zr&&ut(Rr,wr.history)==-1&&(js(wr.history,Bi),Rr.push(wr.history)),du(wr,Bi,null,Ss(wr,Bi))})},Fn=ot.changes.length-1;Fn>=0;--Fn){var mi=Un(Fn);if(mi)return mi.v}}}}function _c(re,pe){if(pe!=0&&(re.first+=pe,re.sel=new Qi(Kt(re.sel.ranges,function(Ue){return new Pi($t(Ue.anchor.line+pe,Ue.anchor.ch),$t(Ue.head.line+pe,Ue.head.ch))}),re.sel.primIndex),re.cm)){Ms(re.cm,re.first,re.first-pe,pe);for(var Fe=re.cm.display,Re=Fe.viewFrom;Re<Fe.viewTo;Re++)wo(re.cm,Re,"gutter")}}function du(re,pe,Fe,Re){if(re.cm&&!re.cm.curOp)return wn(re.cm,du)(re,pe,Fe,Re);if(pe.to.line<re.first){_c(re,pe.text.length-1-(pe.to.line-pe.from.line));return}if(!(pe.from.line>re.lastLine())){if(pe.from.line<re.first){var Ue=pe.text.length-1-(re.first-pe.from.line);_c(re,Ue),pe={from:$t(re.first,0),to:$t(pe.to.line+Ue,pe.to.ch),text:[Wt(pe.text)],origin:pe.origin}}var ot=re.lastLine();pe.to.line>ot&&(pe={from:pe.from,to:$t(ot,dn(re,ot).text.length),text:[pe.text[0]],origin:pe.origin}),pe.removed=Pn(re,pe.from,pe.to),Fe||(Fe=Po(re,pe)),re.cm?Zu(re.cm,pe,Re):Xr(re,pe,Re),La(re,Fe,gt),re.cantEdit&&hu(re,$t(re.firstLine(),0))&&(re.cantEdit=!1)}}function Zu(re,pe,Fe){var Re=re.doc,Ue=re.display,ot=pe.from,wt=pe.to,Rt=!1,It=ot.line;re.options.lineWrapping||(It=Nt(pr(dn(Re,ot.line))),Re.iter(It,wt.line+1,function(Fn){if(Fn==Ue.maxLine)return Rt=!0,!0})),Re.sel.contains(pe.from,pe.to)>-1&&Hn(re),Xr(Re,pe,Fe,Vs(re)),re.options.lineWrapping||(Re.iter(It,ot.line+pe.text.length,function(Fn){var mi=Ro(Fn);mi>Ue.maxLineLength&&(Ue.maxLine=Fn,Ue.maxLineLength=mi,Ue.maxLineChanged=!0,Rt=!1)}),Rt&&(re.curOp.updateMaxLine=!0)),Hi(Re,ot.line),Sn(re,400);var Xt=pe.text.length-(wt.line-ot.line)-1;pe.full?Ms(re):ot.line==wt.line&&pe.text.length==1&&!Or(re.doc,pe)?wo(re,ot.line,"text"):Ms(re,ot.line,wt.line+1,Xt);var Tn=An(re,"changes"),nn=An(re,"change");if(nn||Tn){var Un={from:ot,to:wt,text:pe.text,removed:pe.removed,origin:pe.origin};nn&&Li(re,"change",re,Un),Tn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(Un)}re.display.selForContextMenu=null}function sc(re,pe,Fe,Re,Ue){var ot;Re||(Re=Fe),rn(Re,Fe)<0&&(ot=[Re,Fe],Fe=ot[0],Re=ot[1]),typeof pe=="string"&&(pe=re.splitLines(pe)),oa(re,{from:Fe,to:Re,text:pe,origin:Ue})}function zl(re,pe,Fe,Re){Fe<re.line?re.line+=Re:pe<re.line&&(re.line=pe,re.ch=0)}function ls(re,pe,Fe,Re){for(var Ue=0;Ue<re.length;++Ue){var ot=re[Ue],wt=!0;if(ot.ranges){ot.copied||(ot=re[Ue]=ot.deepCopy(),ot.copied=!0);for(var Rt=0;Rt<ot.ranges.length;Rt++)zl(ot.ranges[Rt].anchor,pe,Fe,Re),zl(ot.ranges[Rt].head,pe,Fe,Re);continue}for(var It=0;It<ot.changes.length;++It){var Xt=ot.changes[It];if(Fe<Xt.from.line)Xt.from=$t(Xt.from.line+Re,Xt.from.ch),Xt.to=$t(Xt.to.line+Re,Xt.to.ch);else if(pe<=Xt.to.line){wt=!1;break}}wt||(re.splice(0,Ue+1),Ue=0)}}function js(re,pe){var Fe=pe.from.line,Re=pe.to.line,Ue=pe.text.length-(Re-Fe)-1;ls(re.done,Fe,Re,Ue),ls(re.undone,Fe,Re,Ue)}function wa(re,pe,Fe,Re){var Ue=pe,ot=pe;return typeof pe=="number"?ot=dn(re,ti(re,pe)):Ue=Nt(pe),Ue==null?null:(Re(ot,Ue)&&re.cm&&wo(re.cm,Ue,Fe),ot)}function zs(re){this.lines=re,this.parent=null;for(var pe=0,Fe=0;Fe<re.length;++Fe)re[Fe].parent=this,pe+=re[Fe].height;this.height=pe}zs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,pe){for(var Fe=re,Re=re+pe;Fe<Re;++Fe){var Ue=this.lines[Fe];this.height-=Ue.height,Ho(Ue),Li(Ue,"delete")}this.lines.splice(re,pe)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,pe,Fe){this.height+=Fe,this.lines=this.lines.slice(0,re).concat(pe).concat(this.lines.slice(re));for(var Re=0;Re<pe.length;++Re)pe[Re].parent=this},iterN:function(re,pe,Fe){for(var Re=re+pe;re<Re;++re)if(Fe(this.lines[re]))return!0}};function os(re){this.children=re;for(var pe=0,Fe=0,Re=0;Re<re.length;++Re){var Ue=re[Re];pe+=Ue.chunkSize(),Fe+=Ue.height,Ue.parent=this}this.size=pe,this.height=Fe,this.parent=null}os.prototype={chunkSize:function(){return this.size},removeInner:function(re,pe){this.size-=pe;for(var Fe=0;Fe<this.children.length;++Fe){var Re=this.children[Fe],Ue=Re.chunkSize();if(re<Ue){var ot=Math.min(pe,Ue-re),wt=Re.height;if(Re.removeInner(re,ot),this.height-=wt-Re.height,Ue==ot&&(this.children.splice(Fe--,1),Re.parent=null),(pe-=ot)==0)break;re=0}else re-=Ue}if(this.size-pe<25&&(this.children.length>1||!(this.children[0]instanceof zs))){var Rt=[];this.collapse(Rt),this.children=[new zs(Rt)],this.children[0].parent=this}},collapse:function(re){for(var pe=0;pe<this.children.length;++pe)this.children[pe].collapse(re)},insertInner:function(re,pe,Fe){this.size+=pe.length,this.height+=Fe;for(var Re=0;Re<this.children.length;++Re){var Ue=this.children[Re],ot=Ue.chunkSize();if(re<=ot){if(Ue.insertInner(re,pe,Fe),Ue.lines&&Ue.lines.length>50){for(var wt=Ue.lines.length%25+25,Rt=wt;Rt<Ue.lines.length;){var It=new zs(Ue.lines.slice(Rt,Rt+=25));Ue.height-=It.height,this.children.splice(++Re,0,It),It.parent=this}Ue.lines=Ue.lines.slice(0,wt),this.maybeSpill()}break}re-=ot}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var pe=re.children.splice(re.children.length-5,5),Fe=new os(pe);if(re.parent){re.size-=Fe.size,re.height-=Fe.height;var Ue=ut(re.parent.children,re);re.parent.children.splice(Ue+1,0,Fe)}else{var Re=new os(re.children);Re.parent=re,re.children=[Re,Fe],re=Re}Fe.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,pe,Fe){for(var Re=0;Re<this.children.length;++Re){var Ue=this.children[Re],ot=Ue.chunkSize();if(re<ot){var wt=Math.min(pe,ot-re);if(Ue.iterN(re,wt,Fe))return!0;if((pe-=wt)==0)break;re=0}else re-=ot}}};var Ma=function(re,pe,Fe){if(Fe)for(var Re in Fe)Fe.hasOwnProperty(Re)&&(this[Re]=Fe[Re]);this.doc=re,this.node=pe};Ma.prototype.clear=function(){var re=this.doc.cm,pe=this.line.widgets,Fe=this.line,Re=Nt(Fe);if(!(Re==null||!pe)){for(var Ue=0;Ue<pe.length;++Ue)pe[Ue]==this&&pe.splice(Ue--,1);pe.length||(Fe.widgets=null);var ot=Ia(this);sn(Fe,Math.max(0,Fe.height-ot)),re&&(Et(re,function(){El(re,Fe,-ot),wo(re,Re,"widget")}),Li(re,"lineWidgetCleared",re,this,Re))}},Ma.prototype.changed=function(){var re=this,pe=this.height,Fe=this.doc.cm,Re=this.line;this.height=null;var Ue=Ia(this)-pe;Ue&&(Xn(this.doc,Re)||sn(Re,Re.height+Ue),Fe&&Et(Fe,function(){Fe.curOp.forceUpdate=!0,El(Fe,Re,Ue),Li(Fe,"lineWidgetChanged",Fe,re,Nt(Re))}))},qn(Ma);function El(re,pe,Fe){to(pe)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&Ch(re,Fe)}function Nu(re,pe,Fe,Re){var Ue=new Ma(re,Fe,Re),ot=re.cm;return ot&&Ue.noHScroll&&(ot.display.alignWidgets=!0),wa(re,pe,"widget",function(wt){var Rt=wt.widgets||(wt.widgets=[]);if(Ue.insertAt==null?Rt.push(Ue):Rt.splice(Math.min(Rt.length-1,Math.max(0,Ue.insertAt)),0,Ue),Ue.line=wt,ot&&!Xn(re,wt)){var It=to(wt)<re.scrollTop;sn(wt,wt.height+Ia(Ue)),It&&Ch(ot,Ue.height),ot.curOp.forceUpdate=!0}return!0}),ot&&Li(ot,"lineWidgetAdded",ot,Ue,typeof pe=="number"?pe:Nt(pe)),Ue}var mf=0,vn=function(re,pe){this.lines=[],this.type=pe,this.doc=re,this.id=++mf};vn.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,pe=re&&!re.curOp;if(pe&&Oa(re),An(this,"clear")){var Fe=this.find();Fe&&Li(this,"clear",Fe.from,Fe.to)}for(var Re=null,Ue=null,ot=0;ot<this.lines.length;++ot){var wt=this.lines[ot],Rt=So(wt.markedSpans,this);re&&!this.collapsed?wo(re,Nt(wt),"text"):re&&(Rt.to!=null&&(Ue=Nt(wt)),Rt.from!=null&&(Re=Nt(wt))),wt.markedSpans=Dr(wt.markedSpans,Rt),Rt.from==null&&this.collapsed&&!Xn(this.doc,wt)&&re&&sn(wt,Tu(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var It=0;It<this.lines.length;++It){var Xt=pr(this.lines[It]),Tn=Ro(Xt);Tn>re.display.maxLineLength&&(re.display.maxLine=Xt,re.display.maxLineLength=Tn,re.display.maxLineChanged=!0)}Re!=null&&re&&this.collapsed&&Ms(re,Re,Ue+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&Xl(re.doc)),re&&Li(re,"markerCleared",re,this,Re,Ue),pe&&oc(re),this.parent&&this.parent.clear()}},vn.prototype.find=function(re,pe){re==null&&this.type=="bookmark"&&(re=1);for(var Fe,Re,Ue=0;Ue<this.lines.length;++Ue){var ot=this.lines[Ue],wt=So(ot.markedSpans,this);if(wt.from!=null&&(Fe=$t(pe?ot:Nt(ot),wt.from),re==-1))return Fe;if(wt.to!=null&&(Re=$t(pe?ot:Nt(ot),wt.to),re==1))return Re}return Fe&&{from:Fe,to:Re}},vn.prototype.changed=function(){var re=this,pe=this.find(-1,!0),Fe=this,Re=this.doc.cm;!pe||!Re||Et(Re,function(){var Ue=pe.line,ot=Nt(pe.line),wt=Gu(Re,ot);if(wt&&(ka(wt),Re.curOp.selectionChanged=Re.curOp.forceUpdate=!0),Re.curOp.updateMaxLine=!0,!Xn(Fe.doc,Ue)&&Fe.height!=null){var Rt=Fe.height;Fe.height=null;var It=Ia(Fe)-Rt;It&&sn(Ue,Ue.height+It)}Li(Re,"markerChanged",Re,re)})},vn.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var pe=this.doc.cm.curOp;(!pe.maybeHiddenMarkers||ut(pe.maybeHiddenMarkers,this)==-1)&&(pe.maybeUnhiddenMarkers||(pe.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},vn.prototype.detachLine=function(re){if(this.lines.splice(ut(this.lines,re),1),!this.lines.length&&this.doc.cm){var pe=this.doc.cm.curOp;(pe.maybeHiddenMarkers||(pe.maybeHiddenMarkers=[])).push(this)}},qn(vn);function Bc(re,pe,Fe,Re,Ue){if(Re&&Re.shared)return vf(re,pe,Fe,Re,Ue);if(re.cm&&!re.cm.curOp)return wn(re.cm,Bc)(re,pe,Fe,Re,Ue);var ot=new vn(re,Ue),wt=rn(pe,Fe);if(Re&&zt(Re,ot,!1),wt>0||wt==0&&ot.clearWhenEmpty!==!1)return ot;if(ot.replacedWith&&(ot.collapsed=!0,ot.widgetNode=Xe("span",[ot.replacedWith],"CodeMirror-widget"),Re.handleMouseEvents||ot.widgetNode.setAttribute("cm-ignore-events","true"),Re.insertLeft&&(ot.widgetNode.insertLeft=!0)),ot.collapsed){if(Kr(re,pe.line,pe,Fe,ot)||pe.line!=Fe.line&&Kr(re,Fe.line,pe,Fe,ot))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nn()}ot.addToHistory&&Zo(re,{from:pe,to:Fe,origin:"markText"},re.sel,NaN);var Rt=pe.line,It=re.cm,Xt;if(re.iter(Rt,Fe.line+1,function(nn){It&&ot.collapsed&&!It.options.lineWrapping&&pr(nn)==It.display.maxLine&&(Xt=!0),ot.collapsed&&Rt!=pe.line&&sn(nn,0),Co(nn,new vr(ot,Rt==pe.line?pe.ch:null,Rt==Fe.line?Fe.ch:null)),++Rt}),ot.collapsed&&re.iter(pe.line,Fe.line+1,function(nn){Xn(re,nn)&&sn(nn,0)}),ot.clearOnEnter&&At(ot,"beforeCursorEnter",function(){return ot.clear()}),ot.readOnly&&(Br(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),ot.collapsed&&(ot.id=++mf,ot.atomic=!0),It){if(Xt&&(It.curOp.updateMaxLine=!0),ot.collapsed)Ms(It,pe.line,Fe.line+1);else if(ot.className||ot.startStyle||ot.endStyle||ot.css||ot.attributes||ot.title)for(var Tn=pe.line;Tn<=Fe.line;Tn++)wo(It,Tn,"text");ot.atomic&&Xl(It.doc),Li(It,"markerAdded",It,ot)}return ot}var ac=function(re,pe){this.markers=re,this.primary=pe;for(var Fe=0;Fe<re.length;++Fe)re[Fe].parent=this};ac.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();Li(this,"clear")}},ac.prototype.find=function(re,pe){return this.primary.find(re,pe)},qn(ac);function vf(re,pe,Fe,Re,Ue){Re=zt(Re),Re.shared=!1;var ot=[Bc(re,pe,Fe,Re,Ue)],wt=ot[0],Rt=Re.widgetNode;return rs(re,function(It){Rt&&(Re.widgetNode=Rt.cloneNode(!0)),ot.push(Bc(It,Bn(It,pe),Bn(It,Fe),Re,Ue));for(var Xt=0;Xt<It.linked.length;++Xt)if(It.linked[Xt].isParent)return;wt=Wt(ot)}),new ac(ot,wt)}function Ph(re){return re.findMarks($t(re.first,0),re.clipPos($t(re.lastLine())),function(pe){return pe.parent})}function oh(re,pe){for(var Fe=0;Fe<pe.length;Fe++){var Re=pe[Fe],Ue=Re.find(),ot=re.clipPos(Ue.from),wt=re.clipPos(Ue.to);if(rn(ot,wt)){var Rt=Bc(re,ot,wt,Re.primary,Re.primary.type);Re.markers.push(Rt),Rt.parent=Re}}}function Rd(re){for(var pe=function(Re){var Ue=re[Re],ot=[Ue.primary.doc];rs(Ue.primary.doc,function(It){return ot.push(It)});for(var wt=0;wt<Ue.markers.length;wt++){var Rt=Ue.markers[wt];ut(ot,Rt.doc)==-1&&(Rt.parent=null,Ue.markers.splice(wt--,1))}},Fe=0;Fe<re.length;Fe++)pe(Fe)}var Kp=0,Ba=function(re,pe,Fe,Re,Ue){if(!(this instanceof Ba))return new Ba(re,pe,Fe,Re,Ue);Fe==null&&(Fe=0),os.call(this,[new zs([new Xo("",null)])]),this.first=Fe,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Fe;var ot=$t(Fe,0);this.sel=Sr(ot),this.history=new Cr(null),this.id=++Kp,this.modeOption=pe,this.lineSep=Re,this.direction=Ue=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),Xr(this,{from:ot,to:ot,text:re}),As(this,Sr(ot),gt)};Ba.prototype=kt(os.prototype,{constructor:Ba,iter:function(re,pe,Fe){Fe?this.iterN(re-this.first,pe-re,Fe):this.iterN(this.first,this.first+this.size,re)},insert:function(re,pe){for(var Fe=0,Re=0;Re<pe.length;++Re)Fe+=pe[Re].height;this.insertInner(re-this.first,pe,Fe)},remove:function(re,pe){this.removeInner(re-this.first,pe)},getValue:function(re){var pe=mn(this,this.first,this.first+this.size);return re===!1?pe:pe.join(re||this.lineSeparator())},setValue:an(function(re){var pe=$t(this.first,0),Fe=this.first+this.size-1;oa(this,{from:pe,to:$t(Fe,dn(this,Fe).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&ro(this.cm,0,0),As(this,Sr(pe),gt)}),replaceRange:function(re,pe,Fe,Re){pe=Bn(this,pe),Fe=Fe?Bn(this,Fe):pe,sc(this,re,pe,Fe,Re)},getRange:function(re,pe,Fe){var Re=Pn(this,Bn(this,re),Bn(this,pe));return Fe===!1?Re:Re.join(Fe||this.lineSeparator())},getLine:function(re){var pe=this.getLineHandle(re);return pe&&pe.text},getLineHandle:function(re){if(Ln(this,re))return dn(this,re)},getLineNumber:function(re){return Nt(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=dn(this,re)),pr(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return Bn(this,re)},getCursor:function(re){var pe=this.sel.primary(),Fe;return re==null||re=="head"?Fe=pe.head:re=="anchor"?Fe=pe.anchor:re=="end"||re=="to"||re===!1?Fe=pe.to():Fe=pe.from(),Fe},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:an(function(re,pe,Fe){Ts(this,Bn(this,typeof re=="number"?$t(re,pe||0):re),null,Fe)}),setSelection:an(function(re,pe,Fe){Ts(this,Bn(this,re),Bn(this,pe||re),Fe)}),extendSelection:an(function(re,pe,Fe){Qo(this,Bn(this,re),pe&&Bn(this,pe),Fe)}),extendSelections:an(function(re,pe){qo(this,Di(this,re),pe)}),extendSelectionsBy:an(function(re,pe){var Fe=Kt(this.sel.ranges,re);qo(this,Di(this,Fe),pe)}),setSelections:an(function(re,pe,Fe){if(re.length){for(var Re=[],Ue=0;Ue<re.length;Ue++)Re[Ue]=new Pi(Bn(this,re[Ue].anchor),Bn(this,re[Ue].head));pe==null&&(pe=Math.min(re.length-1,this.sel.primIndex)),As(this,Wi(this.cm,Re,pe),Fe)}}),addSelection:an(function(re,pe,Fe){var Re=this.sel.ranges.slice(0);Re.push(new Pi(Bn(this,re),Bn(this,pe||re))),As(this,Wi(this.cm,Re,Re.length-1),Fe)}),getSelection:function(re){for(var pe=this.sel.ranges,Fe,Re=0;Re<pe.length;Re++){var Ue=Pn(this,pe[Re].from(),pe[Re].to());Fe=Fe?Fe.concat(Ue):Ue}return re===!1?Fe:Fe.join(re||this.lineSeparator())},getSelections:function(re){for(var pe=[],Fe=this.sel.ranges,Re=0;Re<Fe.length;Re++){var Ue=Pn(this,Fe[Re].from(),Fe[Re].to());re!==!1&&(Ue=Ue.join(re||this.lineSeparator())),pe[Re]=Ue}return pe},replaceSelection:function(re,pe,Fe){for(var Re=[],Ue=0;Ue<this.sel.ranges.length;Ue++)Re[Ue]=re;this.replaceSelections(Re,pe,Fe||"+input")},replaceSelections:an(function(re,pe,Fe){for(var Re=[],Ue=this.sel,ot=0;ot<Ue.ranges.length;ot++){var wt=Ue.ranges[ot];Re[ot]={from:wt.from(),to:wt.to(),text:this.splitLines(re[ot]),origin:Fe}}for(var Rt=pe&&pe!="end"&&so(this,Re,pe),It=Re.length-1;It>=0;It--)oa(this,Re[It]);Rt?jo(this,Rt):this.cm&&ic(this.cm)}),undo:an(function(){Ql(this,"undo")}),redo:an(function(){Ql(this,"redo")}),undoSelection:an(function(){Ql(this,"undo",!0)}),redoSelection:an(function(){Ql(this,"redo",!0)}),setExtending:function(re){this.extend=re},getExtending:function(){return this.extend},historySize:function(){for(var re=this.history,pe=0,Fe=0,Re=0;Re<re.done.length;Re++)re.done[Re].ranges||++pe;for(var Ue=0;Ue<re.undone.length;Ue++)re.undone[Ue].ranges||++Fe;return{undo:pe,redo:Fe}},clearHistory:function(){var re=this;this.history=new Cr(this.history.maxGeneration),rs(this,function(pe){return pe.history=re.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(re){return re&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(re){return this.history.generation==(re||this.cleanGeneration)},getHistory:function(){return{done:Js(this.history.done),undone:Js(this.history.undone)}},setHistory:function(re){var pe=this.history=new Cr(this.history.maxGeneration);pe.done=Js(re.done.slice(0),null,!0),pe.undone=Js(re.undone.slice(0),null,!0)},setGutterMarker:an(function(re,pe,Fe){return wa(this,re,"gutter",function(Re){var Ue=Re.gutterMarkers||(Re.gutterMarkers={});return Ue[pe]=Fe,!Fe&&vt(Ue)&&(Re.gutterMarkers=null),!0})}),clearGutter:an(function(re){var pe=this;this.iter(function(Fe){Fe.gutterMarkers&&Fe.gutterMarkers[re]&&wa(pe,Fe,"gutter",function(){return Fe.gutterMarkers[re]=null,vt(Fe.gutterMarkers)&&(Fe.gutterMarkers=null),!0})})}),lineInfo:function(re){var pe;if(typeof re=="number"){if(!Ln(this,re)||(pe=re,re=dn(this,re),!re))return null}else if(pe=Nt(re),pe==null)return null;return{line:pe,handle:re,text:re.text,gutterMarkers:re.gutterMarkers,textClass:re.textClass,bgClass:re.bgClass,wrapClass:re.wrapClass,widgets:re.widgets}},addLineClass:an(function(re,pe,Fe){return wa(this,re,pe=="gutter"?"gutter":"class",function(Re){var Ue=pe=="text"?"textClass":pe=="background"?"bgClass":pe=="gutter"?"gutterClass":"wrapClass";if(!Re[Ue])Re[Ue]=Fe;else{if(Pe(Fe).test(Re[Ue]))return!1;Re[Ue]+=" "+Fe}return!0})}),removeLineClass:an(function(re,pe,Fe){return wa(this,re,pe=="gutter"?"gutter":"class",function(Re){var Ue=pe=="text"?"textClass":pe=="background"?"bgClass":pe=="gutter"?"gutterClass":"wrapClass",ot=Re[Ue];if(ot)if(Fe==null)Re[Ue]=null;else{var wt=ot.match(Pe(Fe));if(!wt)return!1;var Rt=wt.index+wt[0].length;Re[Ue]=ot.slice(0,wt.index)+(!wt.index||Rt==ot.length?"":" ")+ot.slice(Rt)||null}else return!1;return!0})}),addLineWidget:an(function(re,pe,Fe){return Nu(this,re,pe,Fe)}),removeLineWidget:function(re){re.clear()},markText:function(re,pe,Fe){return Bc(this,Bn(this,re),Bn(this,pe),Fe,Fe&&Fe.type||"range")},setBookmark:function(re,pe){var Fe={replacedWith:pe&&(pe.nodeType==null?pe.widget:pe),insertLeft:pe&&pe.insertLeft,clearWhenEmpty:!1,shared:pe&&pe.shared,handleMouseEvents:pe&&pe.handleMouseEvents};return re=Bn(this,re),Bc(this,re,re,Fe,"bookmark")},findMarksAt:function(re){re=Bn(this,re);var pe=[],Fe=dn(this,re.line).markedSpans;if(Fe)for(var Re=0;Re<Fe.length;++Re){var Ue=Fe[Re];(Ue.from==null||Ue.from<=re.ch)&&(Ue.to==null||Ue.to>=re.ch)&&pe.push(Ue.marker.parent||Ue.marker)}return pe},findMarks:function(re,pe,Fe){re=Bn(this,re),pe=Bn(this,pe);var Re=[],Ue=re.line;return this.iter(re.line,pe.line+1,function(ot){var wt=ot.markedSpans;if(wt)for(var Rt=0;Rt<wt.length;Rt++){var It=wt[Rt];!(It.to!=null&&Ue==re.line&&re.ch>=It.to||It.from==null&&Ue!=re.line||It.from!=null&&Ue==pe.line&&It.from>=pe.ch)&&(!Fe||Fe(It.marker))&&Re.push(It.marker.parent||It.marker)}++Ue}),Re},getAllMarks:function(){var re=[];return this.iter(function(pe){var Fe=pe.markedSpans;if(Fe)for(var Re=0;Re<Fe.length;++Re)Fe[Re].from!=null&&re.push(Fe[Re].marker)}),re},posFromIndex:function(re){var pe,Fe=this.first,Re=this.lineSeparator().length;return this.iter(function(Ue){var ot=Ue.text.length+Re;if(ot>re)return pe=re,!0;re-=ot,++Fe}),Bn(this,$t(Fe,pe))},indexFromPos:function(re){re=Bn(this,re);var pe=re.ch;if(re.line<this.first||re.ch<0)return 0;var Fe=this.lineSeparator().length;return this.iter(this.first,re.line,function(Re){pe+=Re.text.length+Fe}),pe},copy:function(re){var pe=new Ba(mn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return pe.scrollTop=this.scrollTop,pe.scrollLeft=this.scrollLeft,pe.sel=this.sel,pe.extend=!1,re&&(pe.history.undoDepth=this.history.undoDepth,pe.setHistory(this.getHistory())),pe},linkedDoc:function(re){re||(re={});var pe=this.first,Fe=this.first+this.size;re.from!=null&&re.from>pe&&(pe=re.from),re.to!=null&&re.to<Fe&&(Fe=re.to);var Re=new Ba(mn(this,pe,Fe),re.mode||this.modeOption,pe,this.lineSep,this.direction);return re.sharedHist&&(Re.history=this.history),(this.linked||(this.linked=[])).push({doc:Re,sharedHist:re.sharedHist}),Re.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],oh(Re,Ph(this)),Re},unlinkDoc:function(re){if(re instanceof ys&&(re=re.doc),this.linked)for(var pe=0;pe<this.linked.length;++pe){var Fe=this.linked[pe];if(Fe.doc==re){this.linked.splice(pe,1),re.unlinkDoc(this),Rd(Ph(this));break}}if(re.history==this.history){var Re=[re.id];rs(re,function(Ue){return Re.push(Ue.id)},!0),re.history=new Cr(null),re.history.done=Js(this.history.done,Re),re.history.undone=Js(this.history.undone,Re)}},iterLinkedDocs:function(re){rs(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):Zi(re)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:an(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(pe){return pe.order=null}),this.cm&&Jr(this.cm))})}),Ba.prototype.eachLine=Ba.prototype.iter;var nd=0;function Bd(re){var pe=this;if(Yf(pe),!(gn(pe,re)||Ga(pe.display,re))){ai(re),Ce&&(nd=+new Date);var Fe=Da(pe,re,!0),Re=re.dataTransfer.files;if(!(!Fe||pe.isReadOnly()))if(Re&&Re.length&&window.FileReader&&window.File)for(var Ue=Re.length,ot=Array(Ue),wt=0,Rt=function(){++wt==Ue&&wn(pe,function(){Fe=Bn(pe.doc,Fe);var Fn={from:Fe,to:Fe,text:pe.doc.splitLines(ot.filter(function(mi){return mi!=null}).join(pe.doc.lineSeparator())),origin:"paste"};oa(pe.doc,Fn),jo(pe.doc,Sr(Bn(pe.doc,Fe),Bn(pe.doc,nr(Fn))))})()},It=function(Fn,mi){if(pe.options.allowDropFileTypes&&ut(pe.options.allowDropFileTypes,Fn.type)==-1){Rt();return}var _i=new FileReader;_i.onerror=function(){return Rt()},_i.onload=function(){var Bi=_i.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Bi)){Rt();return}ot[mi]=Bi,Rt()},_i.readAsText(Fn)},Xt=0;Xt<Re.length;Xt++)It(Re[Xt],Xt);else{if(pe.state.draggingText&&pe.doc.sel.contains(Fe)>-1){pe.state.draggingText(re),setTimeout(function(){return pe.display.input.focus()},20);return}try{var Tn=re.dataTransfer.getData("Text");if(Tn){var nn;if(pe.state.draggingText&&!pe.state.draggingText.copy&&(nn=pe.listSelections()),La(pe.doc,Sr(Fe,Fe)),nn)for(var Un=0;Un<nn.length;++Un)sc(pe.doc,"",nn[Un].anchor,nn[Un].head,"drag");pe.replaceSelection(Tn,"around","paste"),pe.display.input.focus()}}catch(Fn){}}}}function id(re,pe){if(Ce&&(!re.state.draggingText||+new Date-nd<100)){$i(pe);return}if(!(gn(re,pe)||Ga(re.display,pe))&&(pe.dataTransfer.setData("Text",re.getSelection()),pe.dataTransfer.effectAllowed="copyMove",pe.dataTransfer.setDragImage&&!le)){var Fe=Ze("img",null,null,"position: fixed; left: 0; top: 0;");Fe.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ge&&(Fe.width=Fe.height=1,re.display.wrapper.appendChild(Fe),Fe._top=Fe.offsetTop),pe.dataTransfer.setDragImage(Fe,0,0),ge&&Fe.parentNode.removeChild(Fe)}}function yf(re,pe){var Fe=Da(re,pe);if(Fe){var Re=document.createDocumentFragment();Go(re,Fe,Re),re.display.dragCursor||(re.display.dragCursor=Ze("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),ze(re.display.dragCursor,Re)}}function Yf(re){re.display.dragCursor&&(re.display.lineSpace.removeChild(re.display.dragCursor),re.display.dragCursor=null)}function Sf(re){if(document.getElementsByClassName){for(var pe=document.getElementsByClassName("CodeMirror"),Fe=[],Re=0;Re<pe.length;Re++){var Ue=pe[Re].CodeMirror;Ue&&Fe.push(Ue)}Fe.length&&Fe[0].operation(function(){for(var ot=0;ot<Fe.length;ot++)re(Fe[ot])})}}var Fd=!1;function ql(){Fd||(_h(),Fd=!0)}function _h(){var re;At(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,Sf(xf)},100))}),At(window,"blur",function(){return Sf(Rc)})}function xf(re){var pe=re.display;pe.cachedCharWidth=pe.cachedTextHeight=pe.cachedPaddingH=null,pe.scrollbarsClipped=!1,re.setSize()}for(var Ku={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"},Fc=0;Fc<10;Fc++)Ku[Fc+48]=Ku[Fc+96]=String(Fc);for(var Eh=65;Eh<=90;Eh++)Ku[Eh]=String.fromCharCode(Eh);for(var sh=1;sh<=12;sh++)Ku[sh+111]=Ku[sh+63235]="F"+sh;var Ll={};Ll.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"},Ll.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"},Ll.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"},Ll.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"]},Ll.default=oe?Ll.macDefault:Ll.pcDefault;function jd(re){var pe=re.split(/-(?!$)/);re=pe[pe.length-1];for(var Fe,Re,Ue,ot,wt=0;wt<pe.length-1;wt++){var Rt=pe[wt];if(/^(cmd|meta|m)$/i.test(Rt))ot=!0;else if(/^a(lt)?$/i.test(Rt))Fe=!0;else if(/^(c|ctrl|control)$/i.test(Rt))Re=!0;else if(/^s(hift)?$/i.test(Rt))Ue=!0;else throw new Error("Unrecognized modifier name: "+Rt)}return Fe&&(re="Alt-"+re),Re&&(re="Ctrl-"+re),ot&&(re="Cmd-"+re),Ue&&(re="Shift-"+re),re}function zd(re){var pe={};for(var Fe in re)if(re.hasOwnProperty(Fe)){var Re=re[Fe];if(/^(name|fallthrough|(de|at)tach)$/.test(Fe))continue;if(Re=="..."){delete re[Fe];continue}for(var Ue=Kt(Fe.split(" "),jd),ot=0;ot<Ue.length;ot++){var wt=void 0,Rt=void 0;ot==Ue.length-1?(Rt=Ue.join(" "),wt=Re):(Rt=Ue.slice(0,ot+1).join(" "),wt="...");var It=pe[Rt];if(!It)pe[Rt]=wt;else if(It!=wt)throw new Error("Inconsistent bindings for "+Rt)}delete re[Fe]}for(var Xt in pe)re[Xt]=pe[Xt];return re}function eu(re,pe,Fe,Re){pe=jc(pe);var Ue=pe.call?pe.call(re,Re):pe[re];if(Ue===!1)return"nothing";if(Ue==="...")return"multi";if(Ue!=null&&Fe(Ue))return"handled";if(pe.fallthrough){if(Object.prototype.toString.call(pe.fallthrough)!="[object Array]")return eu(re,pe.fallthrough,Fe,Re);for(var ot=0;ot<pe.fallthrough.length;ot++){var wt=eu(re,pe.fallthrough[ot],Fe,Re);if(wt)return wt}}}function Lh(re){var pe=typeof re=="string"?re:Ku[re.keyCode];return pe=="Ctrl"||pe=="Alt"||pe=="Shift"||pe=="Mod"}function Hd(re,pe,Fe){var Re=re;return pe.altKey&&Re!="Alt"&&(re="Alt-"+re),(Se?pe.metaKey:pe.ctrlKey)&&Re!="Ctrl"&&(re="Ctrl-"+re),(Se?pe.ctrlKey:pe.metaKey)&&Re!="Mod"&&(re="Cmd-"+re),!Fe&&pe.shiftKey&&Re!="Shift"&&(re="Shift-"+re),re}function Ud(re,pe){if(ge&&re.keyCode==34&&re.char)return!1;var Fe=Ku[re.keyCode];return Fe==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(Fe=re.code),Hd(Fe,re,pe))}function jc(re){return typeof re=="string"?Ll[re]:re}function fl(re,pe){for(var Fe=re.doc.sel.ranges,Re=[],Ue=0;Ue<Fe.length;Ue++){for(var ot=pe(Fe[Ue]);Re.length&&rn(ot.from,Wt(Re).to)<=0;){var wt=Re.pop();if(rn(wt.from,ot.from)<0){ot.from=wt.from;break}}Re.push(ot)}Et(re,function(){for(var Rt=Re.length-1;Rt>=0;Rt--)sc(re.doc,"",Re[Rt].from,Re[Rt].to,"+delete");ic(re)})}function Gd(re,pe,Fe){var Re=Ie(re.text,pe+Fe,Fe);return Re<0||Re>re.text.length?null:Re}function ba(re,pe,Fe){var Re=Gd(re,pe.ch,Fe);return Re==null?null:new $t(pe.line,Re,Fe<0?"after":"before")}function fs(re,pe,Fe,Re,Ue){if(re){pe.doc.direction=="rtl"&&(Ue=-Ue);var ot=dt(Fe,pe.doc.direction);if(ot){var wt=Ue<0?Wt(ot):ot[0],Rt=Ue<0==(wt.level==1),It=Rt?"after":"before",Xt;if(wt.level>0||pe.doc.direction=="rtl"){var Tn=Lu(pe,Fe);Xt=Ue<0?Fe.text.length-1:0;var nn=bl(pe,Tn,Xt).top;Xt=We(function(Un){return bl(pe,Tn,Un).top==nn},Ue<0==(wt.level==1)?wt.from:wt.to-1,Xt),It=="before"&&(Xt=Gd(Fe,Xt,1))}else Xt=Ue<0?wt.to:wt.from;return new $t(Re,Xt,It)}}return new $t(Re,Ue<0?Fe.text.length:0,Ue<0?"before":"after")}function Ys(re,pe,Fe,Re){var Ue=dt(pe,re.doc.direction);if(!Ue)return ba(pe,Fe,Re);Fe.ch>=pe.text.length?(Fe.ch=pe.text.length,Fe.sticky="before"):Fe.ch<=0&&(Fe.ch=0,Fe.sticky="after");var ot=Ne(Ue,Fe.ch,Fe.sticky),wt=Ue[ot];if(re.doc.direction=="ltr"&&wt.level%2==0&&(Re>0?wt.to>Fe.ch:wt.from<Fe.ch))return ba(pe,Fe,Re);var Rt=function(rr,Rr){return Gd(pe,rr instanceof $t?rr.ch:rr,Rr)},It,Xt=function(rr){return re.options.lineWrapping?(It=It||Lu(re,pe),bc(re,pe,It,rr)):{begin:0,end:pe.text.length}},Tn=Xt(Fe.sticky=="before"?Rt(Fe,-1):Fe.ch);if(re.doc.direction=="rtl"||wt.level==1){var nn=wt.level==1==Re<0,Un=Rt(Fe,nn?1:-1);if(Un!=null&&(nn?Un<=wt.to&&Un<=Tn.end:Un>=wt.from&&Un>=Tn.begin)){var Fn=nn?"before":"after";return new $t(Fe.line,Un,Fn)}}var mi=function(rr,Rr,wr){for(var Zr=function(ca,Ya){return Ya?new $t(Fe.line,Rt(ca,1),"before"):new $t(Fe.line,ca,"after")};rr>=0&&rr<Ue.length;rr+=Rr){var bo=Ue[rr],xr=Rr>0==(bo.level!=1),zo=xr?wr.begin:Rt(wr.end,-1);if(bo.from<=zo&&zo<bo.to||(zo=xr?bo.from:Rt(bo.to,-1),wr.begin<=zo&&zo<wr.end))return Zr(zo,xr)}},_i=mi(ot+Re,Re,Tn);if(_i)return _i;var Bi=Re>0?Tn.end:Rt(Tn.begin,-1);return Bi!=null&&!(Re>0&&Bi==pe.text.length)&&(_i=mi(Re>0?0:Ue.length-1,Re,Xt(Bi)),_i)?_i:null}var Va={selectAll:gs,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),gt)},killLine:function(re){return fl(re,function(pe){if(pe.empty()){var Fe=dn(re.doc,pe.head.line).text.length;return pe.head.ch==Fe&&pe.head.line<re.lastLine()?{from:pe.head,to:$t(pe.head.line+1,0)}:{from:pe.head,to:$t(pe.head.line,Fe)}}else return{from:pe.from(),to:pe.to()}})},deleteLine:function(re){return fl(re,function(pe){return{from:$t(pe.from().line,0),to:Bn(re.doc,$t(pe.to().line+1,0))}})},delLineLeft:function(re){return fl(re,function(pe){return{from:$t(pe.from().line,0),to:pe.from()}})},delWrappedLineLeft:function(re){return fl(re,function(pe){var Fe=re.charCoords(pe.head,"div").top+5,Re=re.coordsChar({left:0,top:Fe},"div");return{from:Re,to:pe.from()}})},delWrappedLineRight:function(re){return fl(re,function(pe){var Fe=re.charCoords(pe.head,"div").top+5,Re=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Fe},"div");return{from:pe.from(),to:Re}})},undo:function(re){return re.undo()},redo:function(re){return re.redo()},undoSelection:function(re){return re.undoSelection()},redoSelection:function(re){return re.redoSelection()},goDocStart:function(re){return re.extendSelection($t(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection($t(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(pe){return fu(re,pe.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(pe){return Wd(re,pe.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(pe){return pu(re,pe.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(pe){var Fe=re.cursorCoords(pe.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Fe},"div")},Ht)},goLineLeft:function(re){return re.extendSelectionsBy(function(pe){var Fe=re.cursorCoords(pe.head,"div").top+5;return re.coordsChar({left:0,top:Fe},"div")},Ht)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(pe){var Fe=re.cursorCoords(pe.head,"div").top+5,Re=re.coordsChar({left:0,top:Fe},"div");return Re.ch<re.getLine(Re.line).search(/\S/)?Wd(re,pe.head):Re},Ht)},goLineUp:function(re){return re.moveV(-1,"line")},goLineDown:function(re){return re.moveV(1,"line")},goPageUp:function(re){return re.moveV(-1,"page")},goPageDown:function(re){return re.moveV(1,"page")},goCharLeft:function(re){return re.moveH(-1,"char")},goCharRight:function(re){return re.moveH(1,"char")},goColumnLeft:function(re){return re.moveH(-1,"column")},goColumnRight:function(re){return re.moveH(1,"column")},goWordLeft:function(re){return re.moveH(-1,"word")},goGroupRight:function(re){return re.moveH(1,"group")},goGroupLeft:function(re){return re.moveH(-1,"group")},goWordRight:function(re){return re.moveH(1,"word")},delCharBefore:function(re){return re.deleteH(-1,"codepoint")},delCharAfter:function(re){return re.deleteH(1,"char")},delWordBefore:function(re){return re.deleteH(-1,"word")},delWordAfter:function(re){return re.deleteH(1,"word")},delGroupBefore:function(re){return re.deleteH(-1,"group")},delGroupAfter:function(re){return re.deleteH(1,"group")},indentAuto:function(re){return re.indentSelection("smart")},indentMore:function(re){return re.indentSelection("add")},indentLess:function(re){return re.indentSelection("subtract")},insertTab:function(re){return re.replaceSelection(" ")},insertSoftTab:function(re){for(var pe=[],Fe=re.listSelections(),Re=re.options.tabSize,Ue=0;Ue<Fe.length;Ue++){var ot=Fe[Ue].from(),wt=lt(re.getLine(ot.line),ot.ch,Re);pe.push(bn(Re-wt%Re))}re.replaceSelections(pe)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return Et(re,function(){for(var pe=re.listSelections(),Fe=[],Re=0;Re<pe.length;Re++)if(pe[Re].empty()){var Ue=pe[Re].head,ot=dn(re.doc,Ue.line).text;if(ot){if(Ue.ch==ot.length&&(Ue=new $t(Ue.line,Ue.ch-1)),Ue.ch>0)Ue=new $t(Ue.line,Ue.ch+1),re.replaceRange(ot.charAt(Ue.ch-1)+ot.charAt(Ue.ch-2),$t(Ue.line,Ue.ch-2),Ue,"+transpose");else if(Ue.line>re.doc.first){var wt=dn(re.doc,Ue.line-1).text;wt&&(Ue=new $t(Ue.line,1),re.replaceRange(ot.charAt(0)+re.doc.lineSeparator()+wt.charAt(wt.length-1),$t(Ue.line-1,wt.length-1),Ue,"+transpose"))}}Fe.push(new Pi(Ue,Ue))}re.setSelections(Fe)})},newlineAndIndent:function(re){return Et(re,function(){for(var pe=re.listSelections(),Fe=pe.length-1;Fe>=0;Fe--)re.replaceRange(re.doc.lineSeparator(),pe[Fe].anchor,pe[Fe].head,"+input");pe=re.listSelections();for(var Re=0;Re<pe.length;Re++)re.indentLine(pe[Re].from().line,null,!0);ic(re)})},openLine:function(re){return re.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function fu(re,pe){var Fe=dn(re.doc,pe),Re=pr(Fe);return Re!=Fe&&(pe=Nt(Re)),fs(!0,re,Re,pe,1)}function pu(re,pe){var Fe=dn(re.doc,pe),Re=eo(Fe);return Re!=Fe&&(pe=Nt(Re)),fs(!0,re,Fe,pe,-1)}function Wd(re,pe){var Fe=fu(re,pe.line),Re=dn(re.doc,Fe.line),Ue=dt(Re,re.doc.direction);if(!Ue||Ue[0].level==0){var ot=Math.max(Fe.ch,Re.text.search(/\S/)),wt=pe.line==Fe.line&&pe.ch<=ot&&pe.ch;return $t(Fe.line,wt?0:ot,Fe.sticky)}return Fe}function zc(re,pe,Fe){if(typeof pe=="string"&&(pe=Va[pe],!pe))return!1;re.display.input.ensurePolled();var Re=re.display.shift,Ue=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Fe&&(re.display.shift=!1),Ue=pe(re)!=Pt}finally{re.display.shift=Re,re.state.suppressEdits=!1}return Ue}function rd(re,pe,Fe){for(var Re=0;Re<re.state.keyMaps.length;Re++){var Ue=eu(pe,re.state.keyMaps[Re],Fe,re);if(Ue)return Ue}return re.options.extraKeys&&eu(pe,re.options.extraKeys,Fe,re)||eu(pe,re.options.keyMap,Fe,re)}var Ou=new tt;function Ec(re,pe,Fe,Re){var Ue=re.state.keySeq;if(Ue){if(Lh(pe))return"handled";if(/\'$/.test(pe)?re.state.keySeq=null:Ou.set(50,function(){re.state.keySeq==Ue&&(re.state.keySeq=null,re.display.input.reset())}),Xf(re,Ue+" "+pe,Fe,Re))return!0}return Xf(re,pe,Fe,Re)}function Xf(re,pe,Fe,Re){var Ue=rd(re,pe,Re);return Ue=="multi"&&(re.state.keySeq=pe),Ue=="handled"&&Li(re,"keyHandled",re,pe,Fe),(Ue=="handled"||Ue=="multi")&&(ai(Fe),vs(re)),!!Ue}function Jf(re,pe){var Fe=Ud(pe,!0);return Fe?pe.shiftKey&&!re.state.keySeq?Ec(re,"Shift-"+Fe,pe,function(Re){return zc(re,Re,!0)})||Ec(re,Fe,pe,function(Re){if(typeof Re=="string"?/^go[A-Z]/.test(Re):Re.motion)return zc(re,Re)}):Ec(re,Fe,pe,function(Re){return zc(re,Re)}):!1}function Qf(re,pe,Fe){return Ec(re,"'"+Fe+"'",pe,function(Re){return zc(re,Re,!0)})}var od=null;function Vp(re){var pe=this;if(!(re.target&&re.target!=pe.display.input.getField())&&(pe.curOp.focus=at(),!gn(pe,re))){Ce&&Le<11&&re.keyCode==27&&(re.returnValue=!1);var Fe=re.keyCode;pe.display.shift=Fe==16||re.shiftKey;var Re=Jf(pe,re);ge&&(od=Re?Fe:null,!Re&&Fe==88&&!Ir&&(oe?re.metaKey:re.ctrlKey)&&pe.replaceSelection("",null,"cut")),Me&&!oe&&!Re&&Fe==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),Fe==18&&!/\bCodeMirror-crosshair\b/.test(pe.display.lineDiv.className)&&$p(pe)}}function $p(re){var pe=re.display.lineDiv;Ct(pe,"CodeMirror-crosshair");function Fe(Re){(Re.keyCode==18||!Re.altKey)&&(Ae(pe,"CodeMirror-crosshair"),pn(document,"keyup",Fe),pn(document,"mouseover",Fe))}At(document,"keyup",Fe),At(document,"mouseover",Fe)}function Yp(re){re.keyCode==16&&(this.doc.sel.shift=!1),gn(this,re)}function Lc(re){var pe=this;if(!(re.target&&re.target!=pe.display.input.getField())&&!(Ga(pe.display,re)||gn(pe,re)||re.ctrlKey&&!re.altKey||oe&&re.metaKey)){var Fe=re.keyCode,Re=re.charCode;if(ge&&Fe==od){od=null,ai(re);return}if(!(ge&&(!re.which||re.which<10)&&Jf(pe,re))){var Ue=String.fromCharCode(Re==null?Fe:Re);Ue!="\b"&&(Qf(pe,re,Ue)||pe.display.input.onKeyPress(re))}}}var om=400,Xp=function(re,pe,Fe){this.time=re,this.pos=pe,this.button=Fe};Xp.prototype.compare=function(re,pe,Fe){return this.time+om>re&&rn(pe,this.pos)==0&&Fe==this.button};var Zd,sd;function Jp(re,pe){var Fe=+new Date;return sd&&sd.compare(Fe,re,pe)?(Zd=sd=null,"triple"):Zd&&Zd.compare(Fe,re,pe)?(sd=new Xp(Fe,re,pe),Zd=null,"double"):(Zd=new Xp(Fe,re,pe),sd=null,"single")}function Mc(re){var pe=this,Fe=pe.display;if(!(gn(pe,re)||Fe.activeTouch&&Fe.input.supportsTouch())){if(Fe.input.ensurePolled(),Fe.shift=re.shiftKey,Ga(Fe,re)){he||(Fe.scroller.draggable=!1,setTimeout(function(){return Fe.scroller.draggable=!0},100));return}if(!tp(pe,re)){var Re=Da(pe,re),Ue=lr(re),ot=Re?Jp(Re,Ue):"single";window.focus(),Ue==1&&pe.state.selectingText&&pe.state.selectingText(re),!(Re&&Qp(pe,Ue,Re,ot,re))&&(Ue==1?Re?sm(pe,Re,ot,re):or(re)==Fe.scroller&&ai(re):Ue==2?(Re&&Qo(pe.doc,Re),setTimeout(function(){return Fe.input.focus()},20)):Ue==3&&(we?pe.display.input.onContextMenu(re):Bs(pe)))}}}function Qp(re,pe,Fe,Re,Ue){var ot="Click";return Re=="double"?ot="Double"+ot:Re=="triple"&&(ot="Triple"+ot),ot=(pe==1?"Left":pe==2?"Middle":"Right")+ot,Ec(re,Hd(ot,Ue),Ue,function(wt){if(typeof wt=="string"&&(wt=Va[wt]),!wt)return!1;var Rt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Rt=wt(re,Fe)!=Pt}finally{re.state.suppressEdits=!1}return Rt})}function qf(re,pe,Fe){var Re=re.getOption("configureMouse"),Ue=Re?Re(re,pe,Fe):{};if(Ue.unit==null){var ot=ie?Fe.shiftKey&&Fe.metaKey:Fe.altKey;Ue.unit=ot?"rectangle":pe=="single"?"char":pe=="double"?"word":"line"}return(Ue.extend==null||re.doc.extend)&&(Ue.extend=re.doc.extend||Fe.shiftKey),Ue.addNew==null&&(Ue.addNew=oe?Fe.metaKey:Fe.ctrlKey),Ue.moveOnDrag==null&&(Ue.moveOnDrag=!(oe?Fe.altKey:Fe.ctrlKey)),Ue}function sm(re,pe,Fe,Re){Ce?setTimeout(st(ds,re),0):re.curOp.focus=at();var Ue=qf(re,Fe,Re),ot=re.doc.sel,wt;re.options.dragDrop&&qi&&!re.isReadOnly()&&Fe=="single"&&(wt=ot.contains(pe))>-1&&(rn((wt=ot.ranges[wt]).from(),pe)<0||pe.xRel>0)&&(rn(wt.to(),pe)>0||pe.xRel<0)?qp(re,Re,pe,Ue):nv(re,Re,pe,Ue)}function qp(re,pe,Fe,Re){var Ue=re.display,ot=!1,wt=wn(re,function(Xt){he&&(Ue.scroller.draggable=!1),re.state.draggingText=!1,pn(Ue.wrapper.ownerDocument,"mouseup",wt),pn(Ue.wrapper.ownerDocument,"mousemove",Rt),pn(Ue.scroller,"dragstart",It),pn(Ue.scroller,"drop",wt),ot||(ai(Xt),Re.addNew||Qo(re.doc,Fe,null,null,Re.extend),he&&!le||Ce&&Le==9?setTimeout(function(){Ue.wrapper.ownerDocument.body.focus({preventScroll:!0}),Ue.input.focus()},20):Ue.input.focus())}),Rt=function(Xt){ot=ot||Math.abs(pe.clientX-Xt.clientX)+Math.abs(pe.clientY-Xt.clientY)>=10},It=function(){return ot=!0};he&&(Ue.scroller.draggable=!0),re.state.draggingText=wt,wt.copy=!Re.moveOnDrag,Ue.scroller.dragDrop&&Ue.scroller.dragDrop(),At(Ue.wrapper.ownerDocument,"mouseup",wt),At(Ue.wrapper.ownerDocument,"mousemove",Rt),At(Ue.scroller,"dragstart",It),At(Ue.scroller,"drop",wt),Bs(re),setTimeout(function(){return Ue.input.focus()},20)}function eg(re,pe,Fe){if(Fe=="char")return new Pi(pe,pe);if(Fe=="word")return re.findWordAt(pe);if(Fe=="line")return new Pi($t(pe.line,0),Bn(re.doc,$t(pe.line+1,0)));var Re=Fe(re,pe);return new Pi(Re.from,Re.to)}function nv(re,pe,Fe,Re){var Ue=re.display,ot=re.doc;ai(pe);var wt,Rt,It=ot.sel,Xt=It.ranges;if(Re.addNew&&!Re.extend?(Rt=ot.sel.contains(Fe),Rt>-1?wt=Xt[Rt]:wt=new Pi(Fe,Fe)):(wt=ot.sel.primary(),Rt=ot.sel.primIndex),Re.unit=="rectangle")Re.addNew||(wt=new Pi(Fe,Fe)),Fe=Da(re,pe,!0,!0),Rt=-1;else{var Tn=eg(re,Fe,Re.unit);Re.extend?wt=Pl(wt,Tn.anchor,Tn.head,Re.extend):wt=Tn}Re.addNew?Rt==-1?(Rt=Xt.length,As(ot,Wi(re,Xt.concat([wt]),Rt),{scroll:!1,origin:"*mouse"})):Xt.length>1&&Xt[Rt].empty()&&Re.unit=="char"&&!Re.extend?(As(ot,Wi(re,Xt.slice(0,Rt).concat(Xt.slice(Rt+1)),0),{scroll:!1,origin:"*mouse"}),It=ot.sel):xs(ot,Rt,wt,Ft):(Rt=0,As(ot,new Qi([wt],0),Ft),It=ot.sel);var nn=Fe;function Un(wr){if(rn(nn,wr)!=0)if(nn=wr,Re.unit=="rectangle"){for(var Zr=[],bo=re.options.tabSize,xr=lt(dn(ot,Fe.line).text,Fe.ch,bo),zo=lt(dn(ot,wr.line).text,wr.ch,bo),ca=Math.min(xr,zo),Ya=Math.max(xr,zo),va=Math.min(Fe.line,wr.line),nu=Math.min(re.lastLine(),Math.max(Fe.line,wr.line));va<=nu;va++){var Ml=dn(ot,va).text,ja=hn(Ml,ca,bo);ca==Ya?Zr.push(new Pi($t(va,ja),$t(va,ja))):Ml.length>ja&&Zr.push(new Pi($t(va,ja),$t(va,hn(Ml,Ya,bo))))}Zr.length||Zr.push(new Pi(Fe,Fe)),As(ot,Wi(re,It.ranges.slice(0,Rt).concat(Zr),Rt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(wr)}else{var gu=wt,pl=eg(re,wr,Re.unit),za=gu.anchor,ws;rn(pl.anchor,za)>0?(ws=pl.head,za=Gn(gu.from(),pl.anchor)):(ws=pl.anchor,za=ei(gu.to(),pl.head));var Ca=It.ranges.slice(0);Ca[Rt]=am(re,new Pi(Bn(ot,za),ws)),As(ot,Wi(re,Ca,Rt),Ft)}}var Fn=Ue.wrapper.getBoundingClientRect(),mi=0;function _i(wr){var Zr=++mi,bo=Da(re,wr,!0,Re.unit=="rectangle");if(bo)if(rn(bo,nn)!=0){re.curOp.focus=at(),Un(bo);var xr=Wo(Ue,ot);(bo.line>=xr.to||bo.line<xr.from)&&setTimeout(wn(re,function(){mi==Zr&&_i(wr)}),150)}else{var zo=wr.clientY<Fn.top?-20:wr.clientY>Fn.bottom?20:0;zo&&setTimeout(wn(re,function(){mi==Zr&&(Ue.scroller.scrollTop+=zo,_i(wr))}),50)}}function Bi(wr){re.state.selectingText=!1,mi=1/0,wr&&(ai(wr),Ue.input.focus()),pn(Ue.wrapper.ownerDocument,"mousemove",rr),pn(Ue.wrapper.ownerDocument,"mouseup",Rr),ot.history.lastSelOrigin=null}var rr=wn(re,function(wr){wr.buttons===0||!lr(wr)?Bi(wr):_i(wr)}),Rr=wn(re,Bi);re.state.selectingText=Rr,At(Ue.wrapper.ownerDocument,"mousemove",rr),At(Ue.wrapper.ownerDocument,"mouseup",Rr)}function am(re,pe){var Fe=pe.anchor,Re=pe.head,Ue=dn(re.doc,Fe.line);if(rn(Fe,Re)==0&&Fe.sticky==Re.sticky)return pe;var ot=dt(Ue);if(!ot)return pe;var wt=Ne(ot,Fe.ch,Fe.sticky),Rt=ot[wt];if(Rt.from!=Fe.ch&&Rt.to!=Fe.ch)return pe;var It=wt+(Rt.from==Fe.ch==(Rt.level!=1)?0:1);if(It==0||It==ot.length)return pe;var Xt;if(Re.line!=Fe.line)Xt=(Re.line-Fe.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var Tn=Ne(ot,Re.ch,Re.sticky),nn=Tn-wt||(Re.ch-Fe.ch)*(Rt.level==1?-1:1);Tn==It-1||Tn==It?Xt=nn<0:Xt=nn>0}var Un=ot[It+(Xt?-1:0)],Fn=Xt==(Un.level==1),mi=Fn?Un.from:Un.to,_i=Fn?"after":"before";return Fe.ch==mi&&Fe.sticky==_i?pe:new Pi(new $t(Fe.line,mi,_i),Re)}function ep(re,pe,Fe,Re){var Ue,ot;if(pe.touches)Ue=pe.touches[0].clientX,ot=pe.touches[0].clientY;else try{Ue=pe.clientX,ot=pe.clientY}catch(Un){return!1}if(Ue>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;Re&&ai(pe);var wt=re.display,Rt=wt.lineDiv.getBoundingClientRect();if(ot>Rt.bottom||!An(re,Fe))return Ci(pe);ot-=Rt.top-wt.viewOffset;for(var It=0;It<re.display.gutterSpecs.length;++It){var Xt=wt.gutters.childNodes[It];if(Xt&&Xt.getBoundingClientRect().right>=Ue){var Tn=un(re.doc,ot),nn=re.display.gutterSpecs[It];return ln(re,Fe,re,Tn,nn.className,pe),Ci(pe)}}}function tp(re,pe){return ep(re,pe,"gutterClick",!0)}function np(re,pe){Ga(re.display,pe)||lm(re,pe)||gn(re,pe,"contextmenu")||we||re.display.input.onContextMenu(pe)}function lm(re,pe){return An(re,"gutterContextMenu")?ep(re,pe,"gutterContextMenu",!1):!1}function ip(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ds(re)}var Mh={toString:function(){return"CodeMirror.Init"}},tg={},wf={};function um(re){var pe=re.optionHandlers;function Fe(Re,Ue,ot,wt){re.defaults[Re]=Ue,ot&&(pe[Re]=wt?function(Rt,It,Xt){Xt!=Mh&&ot(Rt,It,Xt)}:ot)}re.defineOption=Fe,re.Init=Mh,Fe("value","",function(Re,Ue){return Re.setValue(Ue)},!0),Fe("mode",null,function(Re,Ue){Re.doc.modeOption=Ue,Tr(Re)},!0),Fe("indentUnit",2,Tr,!0),Fe("indentWithTabs",!1),Fe("smartIndent",!0),Fe("tabSize",4,function(Re){Oo(Re),Ds(Re),Ms(Re)},!0),Fe("lineSeparator",null,function(Re,Ue){if(Re.doc.lineSep=Ue,!!Ue){var ot=[],wt=Re.doc.first;Re.doc.iter(function(It){for(var Xt=0;;){var Tn=It.text.indexOf(Ue,Xt);if(Tn==-1)break;Xt=Tn+Ue.length,ot.push($t(wt,Tn))}wt++});for(var Rt=ot.length-1;Rt>=0;Rt--)sc(Re.doc,Ue,ot[Rt],$t(ot[Rt].line,ot[Rt].ch+Ue.length))}}),Fe("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Re,Ue,ot){Re.state.specialChars=new RegExp(Ue.source+(Ue.test(" ")?"":"| "),"g"),ot!=Mh&&Re.refresh()}),Fe("specialCharPlaceholder",Is,function(Re){return Re.refresh()},!0),Fe("electricChars",!0),Fe("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Fe("spellcheck",!1,function(Re,Ue){return Re.getInputField().spellcheck=Ue},!0),Fe("autocorrect",!1,function(Re,Ue){return Re.getInputField().autocorrect=Ue},!0),Fe("autocapitalize",!1,function(Re,Ue){return Re.getInputField().autocapitalize=Ue},!0),Fe("rtlMoveVisually",!se),Fe("wholeLineUpdateBefore",!0),Fe("theme","default",function(Re){ip(Re),Qn(Re)},!0),Fe("keyMap","default",function(Re,Ue,ot){var wt=jc(Ue),Rt=ot!=Mh&&jc(ot);Rt&&Rt.detach&&Rt.detach(Re,wt),wt.attach&&wt.attach(Re,Rt||null)}),Fe("extraKeys",null),Fe("configureMouse",null),Fe("lineWrapping",!1,cm,!0),Fe("gutters",[],function(Re,Ue){Re.display.gutterSpecs=Ai(Ue,Re.options.lineNumbers),Qn(Re)},!0),Fe("fixedGutter",!0,function(Re,Ue){Re.display.gutters.style.left=Ue?Cc(Re.display)+"px":"0",Re.refresh()},!0),Fe("coverGutterNextToScrollbar",!1,function(Re){return rc(Re)},!0),Fe("scrollbarStyle","native",function(Re){td(Re),rc(Re),Re.display.scrollbars.setScrollTop(Re.doc.scrollTop),Re.display.scrollbars.setScrollLeft(Re.doc.scrollLeft)},!0),Fe("lineNumbers",!1,function(Re,Ue){Re.display.gutterSpecs=Ai(Re.options.gutters,Ue),Qn(Re)},!0),Fe("firstLineNumber",1,Qn,!0),Fe("lineNumberFormatter",function(Re){return Re},Qn,!0),Fe("showCursorWhenSelecting",!1,Ea,!0),Fe("resetSelectionOnContextMenu",!0),Fe("lineWiseCopyCut",!0),Fe("pasteLinesPerSelection",!0),Fe("selectionsMayTouch",!1),Fe("readOnly",!1,function(Re,Ue){Ue=="nocursor"&&(Rc(Re),Re.display.input.blur()),Re.display.input.readOnlyChanged(Ue)}),Fe("screenReaderLabel",null,function(Re,Ue){Ue=Ue===""?null:Ue,Re.display.input.screenReaderLabelChanged(Ue)}),Fe("disableInput",!1,function(Re,Ue){Ue||Re.display.input.reset()},!0),Fe("dragDrop",!0,rp),Fe("allowDropFileTypes",null),Fe("cursorBlinkRate",530),Fe("cursorScrollMargin",0),Fe("cursorHeight",1,Ea,!0),Fe("singleCursorHeightPerLine",!0,Ea,!0),Fe("workTime",100),Fe("workDelay",100),Fe("flattenSpans",!0,Oo,!0),Fe("addModeClass",!1,Oo,!0),Fe("pollInterval",100),Fe("undoDepth",200,function(Re,Ue){return Re.doc.history.undoDepth=Ue}),Fe("historyEventDelay",1250),Fe("viewportMargin",10,function(Re){return Re.refresh()},!0),Fe("maxHighlightLength",1e4,Oo,!0),Fe("moveInputWithCursor",!0,function(Re,Ue){Ue||Re.display.input.resetPosition()}),Fe("tabindex",null,function(Re,Ue){return Re.display.input.getField().tabIndex=Ue||""}),Fe("autofocus",null),Fe("direction","ltr",function(Re,Ue){return Re.doc.setDirection(Ue)},!0),Fe("phrases",null)}function rp(re,pe,Fe){var Re=Fe&&Fe!=Mh;if(!pe!=!Re){var Ue=re.display.dragFunctions,ot=pe?At:pn;ot(re.display.scroller,"dragstart",Ue.start),ot(re.display.scroller,"dragenter",Ue.enter),ot(re.display.scroller,"dragover",Ue.over),ot(re.display.scroller,"dragleave",Ue.leave),ot(re.display.scroller,"drop",Ue.drop)}}function cm(re){re.options.lineWrapping?(Ct(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(Ae(re.display.wrapper,"CodeMirror-wrap"),Bo(re)),Vr(re),Ms(re),Ds(re),setTimeout(function(){return rc(re)},100)}function ys(re,pe){var Fe=this;if(!(this instanceof ys))return new ys(re,pe);this.options=pe=pe?zt(pe):{},zt(tg,pe,!1);var Re=pe.value;typeof Re=="string"?Re=new Ba(Re,pe.mode,null,pe.lineSeparator,pe.direction):pe.mode&&(Re.modeOption=pe.mode),this.doc=Re;var Ue=new ys.inputStyles[pe.inputStyle](this),ot=this.display=new ji(re,Re,Ue,pe);ot.wrapper.CodeMirror=this,ip(this),pe.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),td(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 tt,keySeq:null,specialChars:null},pe.autofocus&&!ee&&ot.input.focus(),Ce&&Le<11&&setTimeout(function(){return Fe.display.input.reset(!0)},20),Kd(this),ql(),Oa(this),this.curOp.forceUpdate=!0,Wr(this,Re),pe.autofocus&&!ee||this.hasFocus()?setTimeout(function(){Fe.hasFocus()&&!Fe.state.focused&&Fo(Fe)},20):Rc(this);for(var wt in wf)wf.hasOwnProperty(wt)&&wf[wt](this,pe[wt],Mh);ki(this),pe.finishInit&&pe.finishInit(this);for(var Rt=0;Rt<ad.length;++Rt)ad[Rt](this);oc(this),he&&pe.lineWrapping&&getComputedStyle(ot.lineDiv).textRendering=="optimizelegibility"&&(ot.lineDiv.style.textRendering="auto")}ys.defaults=tg,ys.optionHandlers=wf;function Kd(re){var pe=re.display;At(pe.scroller,"mousedown",wn(re,Mc)),Ce&&Le<11?At(pe.scroller,"dblclick",wn(re,function(It){if(!gn(re,It)){var Xt=Da(re,It);if(!(!Xt||tp(re,It)||Ga(re.display,It))){ai(It);var Tn=re.findWordAt(Xt);Qo(re.doc,Tn.anchor,Tn.head)}}})):At(pe.scroller,"dblclick",function(It){return gn(re,It)||ai(It)}),At(pe.scroller,"contextmenu",function(It){return np(re,It)}),At(pe.input.getField(),"contextmenu",function(It){pe.scroller.contains(It.target)||np(re,It)});var Fe,Re={end:0};function Ue(){pe.activeTouch&&(Fe=setTimeout(function(){return pe.activeTouch=null},1e3),Re=pe.activeTouch,Re.end=+new Date)}function ot(It){if(It.touches.length!=1)return!1;var Xt=It.touches[0];return Xt.radiusX<=1&&Xt.radiusY<=1}function wt(It,Xt){if(Xt.left==null)return!0;var Tn=Xt.left-It.left,nn=Xt.top-It.top;return Tn*Tn+nn*nn>20*20}At(pe.scroller,"touchstart",function(It){if(!gn(re,It)&&!ot(It)&&!tp(re,It)){pe.input.ensurePolled(),clearTimeout(Fe);var Xt=+new Date;pe.activeTouch={start:Xt,moved:!1,prev:Xt-Re.end<=300?Re:null},It.touches.length==1&&(pe.activeTouch.left=It.touches[0].pageX,pe.activeTouch.top=It.touches[0].pageY)}}),At(pe.scroller,"touchmove",function(){pe.activeTouch&&(pe.activeTouch.moved=!0)}),At(pe.scroller,"touchend",function(It){var Xt=pe.activeTouch;if(Xt&&!Ga(pe,It)&&Xt.left!=null&&!Xt.moved&&new Date-Xt.start<300){var Tn=re.coordsChar(pe.activeTouch,"page"),nn;!Xt.prev||wt(Xt,Xt.prev)?nn=new Pi(Tn,Tn):!Xt.prev.prev||wt(Xt,Xt.prev.prev)?nn=re.findWordAt(Tn):nn=new Pi($t(Tn.line,0),Bn(re.doc,$t(Tn.line+1,0))),re.setSelection(nn.anchor,nn.head),re.focus(),ai(It)}Ue()}),At(pe.scroller,"touchcancel",Ue),At(pe.scroller,"scroll",function(){pe.scroller.clientHeight&&(Au(re,pe.scroller.scrollTop),uu(re,pe.scroller.scrollLeft,!0),ln(re,"scroll",re))}),At(pe.scroller,"mousewheel",function(It){return cr(re,It)}),At(pe.scroller,"DOMMouseScroll",function(It){return cr(re,It)}),At(pe.wrapper,"scroll",function(){return pe.wrapper.scrollTop=pe.wrapper.scrollLeft=0}),pe.dragFunctions={enter:function(It){gn(re,It)||$i(It)},over:function(It){gn(re,It)||(yf(re,It),$i(It))},start:function(It){return id(re,It)},drop:wn(re,Bd),leave:function(It){gn(re,It)||Yf(re)}};var Rt=pe.input.getField();At(Rt,"keyup",function(It){return Yp.call(re,It)}),At(Rt,"keydown",wn(re,Vp)),At(Rt,"keypress",wn(re,Lc)),At(Rt,"focus",function(It){return Fo(re,It)}),At(Rt,"blur",function(It){return Rc(re,It)})}var ad=[];ys.defineInitHook=function(re){return ad.push(re)};function $a(re,pe,Fe,Re){var Ue=re.doc,ot;Fe==null&&(Fe="add"),Fe=="smart"&&(Ue.mode.indent?ot=zi(re,pe).state:Fe="prev");var wt=re.options.tabSize,Rt=dn(Ue,pe),It=lt(Rt.text,null,wt);Rt.stateAfter&&(Rt.stateAfter=null);var Xt=Rt.text.match(/^\s*/)[0],Tn;if(!Re&&!/\S/.test(Rt.text))Tn=0,Fe="not";else if(Fe=="smart"&&(Tn=Ue.mode.indent(ot,Rt.text.slice(Xt.length),Rt.text),Tn==Pt||Tn>150)){if(!Re)return;Fe="prev"}Fe=="prev"?pe>Ue.first?Tn=lt(dn(Ue,pe-1).text,null,wt):Tn=0:Fe=="add"?Tn=It+re.options.indentUnit:Fe=="subtract"?Tn=It-re.options.indentUnit:typeof Fe=="number"&&(Tn=It+Fe),Tn=Math.max(0,Tn);var nn="",Un=0;if(re.options.indentWithTabs)for(var Fn=Math.floor(Tn/wt);Fn;--Fn)Un+=wt,nn+=" ";if(Un<Tn&&(nn+=bn(Tn-Un)),nn!=Xt)return sc(Ue,nn,$t(pe,0),$t(pe,Xt.length),"+input"),Rt.stateAfter=null,!0;for(var mi=0;mi<Ue.sel.ranges.length;mi++){var _i=Ue.sel.ranges[mi];if(_i.head.line==pe&&_i.head.ch<Xt.length){var Bi=$t(pe,Xt.length);xs(Ue,mi,new Pi(Bi,Bi));break}}}var tu=null;function ld(re){tu=re}function bf(re,pe,Fe,Re,Ue){var ot=re.doc;re.display.shift=!1,Re||(Re=ot.sel);var wt=+new Date-200,Rt=Ue=="paste"||re.state.pasteIncoming>wt,It=Zi(pe),Xt=null;if(Rt&&Re.ranges.length>1)if(tu&&tu.text.join(`
|
|
|
`)==pe){if(Re.ranges.length%tu.text.length==0){Xt=[];for(var Tn=0;Tn<tu.text.length;Tn++)Xt.push(ot.splitLines(tu.text[Tn]))}}else It.length==Re.ranges.length&&re.options.pasteLinesPerSelection&&(Xt=Kt(It,function(rr){return[rr]}));for(var nn=re.curOp.updateInput,Un=Re.ranges.length-1;Un>=0;Un--){var Fn=Re.ranges[Un],mi=Fn.from(),_i=Fn.to();Fn.empty()&&(Fe&&Fe>0?mi=$t(mi.line,mi.ch-Fe):re.state.overwrite&&!Rt?_i=$t(_i.line,Math.min(dn(ot,_i.line).text.length,_i.ch+Wt(It).length)):Rt&&tu&&tu.lineWise&&tu.text.join(`
|
|
|
`)==It.join(`
|
|
|
`)&&(mi=_i=$t(mi.line,0)));var Bi={from:mi,to:_i,text:Xt?Xt[Un%Xt.length]:It,origin:Ue||(Rt?"paste":re.state.cutIncoming>wt?"cut":"+input")};oa(re.doc,Bi),Li(re,"inputRead",re,Bi)}pe&&!Rt&&ig(re,pe),ic(re),re.curOp.updateInput<2&&(re.curOp.updateInput=nn),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function ng(re,pe){var Fe=re.clipboardData&&re.clipboardData.getData("Text");if(Fe)return re.preventDefault(),!pe.isReadOnly()&&!pe.options.disableInput&&Et(pe,function(){return bf(pe,Fe,0,null,"paste")}),!0}function ig(re,pe){if(!(!re.options.electricChars||!re.options.smartIndent))for(var Fe=re.doc.sel,Re=Fe.ranges.length-1;Re>=0;Re--){var Ue=Fe.ranges[Re];if(!(Ue.head.ch>100||Re&&Fe.ranges[Re-1].head.line==Ue.head.line)){var ot=re.getModeAt(Ue.head),wt=!1;if(ot.electricChars){for(var Rt=0;Rt<ot.electricChars.length;Rt++)if(pe.indexOf(ot.electricChars.charAt(Rt))>-1){wt=$a(re,Ue.head.line,"smart");break}}else ot.electricInput&&ot.electricInput.test(dn(re.doc,Ue.head.line).text.slice(0,Ue.head.ch))&&(wt=$a(re,Ue.head.line,"smart"));wt&&Li(re,"electricInput",re,Ue.head.line)}}}function rg(re){for(var pe=[],Fe=[],Re=0;Re<re.doc.sel.ranges.length;Re++){var Ue=re.doc.sel.ranges[Re].head.line,ot={anchor:$t(Ue,0),head:$t(Ue+1,0)};Fe.push(ot),pe.push(re.getRange(ot.anchor,ot.head))}return{text:pe,ranges:Fe}}function og(re,pe,Fe,Re){re.setAttribute("autocorrect",Fe?"":"off"),re.setAttribute("autocapitalize",Re?"":"off"),re.setAttribute("spellcheck",!!pe)}function sg(){var re=Ze("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),pe=Ze("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return he?re.style.width="1000px":re.setAttribute("wrap","off"),ce&&(re.style.border="1px solid black"),og(re),pe}function Th(re){var pe=re.optionHandlers,Fe=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Re,Ue){var ot=this.options,wt=ot[Re];ot[Re]==Ue&&Re!="mode"||(ot[Re]=Ue,pe.hasOwnProperty(Re)&&wn(this,pe[Re])(this,Ue,wt),ln(this,"optionChange",this,Re))},getOption:function(Re){return this.options[Re]},getDoc:function(){return this.doc},addKeyMap:function(Re,Ue){this.state.keyMaps[Ue?"push":"unshift"](jc(Re))},removeKeyMap:function(Re){for(var Ue=this.state.keyMaps,ot=0;ot<Ue.length;++ot)if(Ue[ot]==Re||Ue[ot].name==Re)return Ue.splice(ot,1),!0},addOverlay:fn(function(Re,Ue){var ot=Re.token?Re:re.getMode(this.options,Re);if(ot.startState)throw new Error("Overlays may not be stateful.");Jt(this.state.overlays,{mode:ot,modeSpec:Re,opaque:Ue&&Ue.opaque,priority:Ue&&Ue.priority||0},function(wt){return wt.priority}),this.state.modeGen++,Ms(this)}),removeOverlay:fn(function(Re){for(var Ue=this.state.overlays,ot=0;ot<Ue.length;++ot){var wt=Ue[ot].modeSpec;if(wt==Re||typeof Re=="string"&&wt.name==Re){Ue.splice(ot,1),this.state.modeGen++,Ms(this);return}}}),indentLine:fn(function(Re,Ue,ot){typeof Ue!="string"&&typeof Ue!="number"&&(Ue==null?Ue=this.options.smartIndent?"smart":"prev":Ue=Ue?"add":"subtract"),Ln(this.doc,Re)&&$a(this,Re,Ue,ot)}),indentSelection:fn(function(Re){for(var Ue=this.doc.sel.ranges,ot=-1,wt=0;wt<Ue.length;wt++){var Rt=Ue[wt];if(Rt.empty())Rt.head.line>ot&&($a(this,Rt.head.line,Re,!0),ot=Rt.head.line,wt==this.doc.sel.primIndex&&ic(this));else{var It=Rt.from(),Xt=Rt.to(),Tn=Math.max(ot,It.line);ot=Math.min(this.lastLine(),Xt.line-(Xt.ch?0:1))+1;for(var nn=Tn;nn<ot;++nn)$a(this,nn,Re);var Un=this.doc.sel.ranges;It.ch==0&&Ue.length==Un.length&&Un[wt].from().ch>0&&xs(this.doc,wt,new Pi(It,Un[wt].to()),gt)}}}),getTokenAt:function(Re,Ue){return hi(this,Re,Ue)},getLineTokens:function(Re,Ue){return hi(this,$t(Re),Ue,!0)},getTokenTypeAt:function(Re){Re=Bn(this.doc,Re);var Ue=Nr(this,dn(this.doc,Re.line)),ot=0,wt=(Ue.length-1)/2,Rt=Re.ch,It;if(Rt==0)It=Ue[2];else for(;;){var Xt=ot+wt>>1;if((Xt?Ue[Xt*2-1]:0)>=Rt)wt=Xt;else if(Ue[Xt*2+1]<Rt)ot=Xt+1;else{It=Ue[Xt*2+2];break}}var Tn=It?It.indexOf("overlay "):-1;return Tn<0?It:Tn==0?null:It.slice(0,Tn-1)},getModeAt:function(Re){var Ue=this.doc.mode;return Ue.innerMode?re.innerMode(Ue,this.getTokenAt(Re).state).mode:Ue},getHelper:function(Re,Ue){return this.getHelpers(Re,Ue)[0]},getHelpers:function(Re,Ue){var ot=[];if(!Fe.hasOwnProperty(Ue))return ot;var wt=Fe[Ue],Rt=this.getModeAt(Re);if(typeof Rt[Ue]=="string")wt[Rt[Ue]]&&ot.push(wt[Rt[Ue]]);else if(Rt[Ue])for(var It=0;It<Rt[Ue].length;It++){var Xt=wt[Rt[Ue][It]];Xt&&ot.push(Xt)}else Rt.helperType&&wt[Rt.helperType]?ot.push(wt[Rt.helperType]):wt[Rt.name]&&ot.push(wt[Rt.name]);for(var Tn=0;Tn<wt._global.length;Tn++){var nn=wt._global[Tn];nn.pred(Rt,this)&&ut(ot,nn.val)==-1&&ot.push(nn.val)}return ot},getStateAfter:function(Re,Ue){var ot=this.doc;return Re=ti(ot,Re==null?ot.first+ot.size-1:Re),zi(this,Re+1,Ue).state},cursorCoords:function(Re,Ue){var ot,wt=this.doc.sel.primary();return Re==null?ot=wt.head:typeof Re=="object"?ot=Bn(this.doc,Re):ot=Re?wt.from():wt.to(),Rs(this,ot,Ue||"page")},charCoords:function(Re,Ue){return Bl(this,Bn(this.doc,Re),Ue||"page")},coordsChar:function(Re,Ue){return Re=Yl(this,Re,Ue||"page"),wc(this,Re.left,Re.top)},lineAtHeight:function(Re,Ue){return Re=Yl(this,{top:Re,left:0},Ue||"page").top,un(this.doc,Re+this.display.viewOffset)},heightAtLine:function(Re,Ue,ot){var wt=!1,Rt;if(typeof Re=="number"){var It=this.doc.first+this.doc.size-1;Re<this.doc.first?Re=this.doc.first:Re>It&&(Re=It,wt=!0),Rt=dn(this.doc,Re)}else Rt=Re;return Ks(this,Rt,{top:0,left:0},Ue||"page",ot||wt).top+(wt?this.doc.height-to(Rt):0)},defaultTextHeight:function(){return Tu(this.display)},defaultCharWidth:function(){return Wu(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(Re,Ue,ot,wt,Rt){var It=this.display;Re=Rs(this,Bn(this.doc,Re));var Xt=Re.bottom,Tn=Re.left;if(Ue.style.position="absolute",Ue.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Ue),It.sizer.appendChild(Ue),wt=="over")Xt=Re.top;else if(wt=="above"||wt=="near"){var nn=Math.max(It.wrapper.clientHeight,this.doc.height),Un=Math.max(It.sizer.clientWidth,It.lineSpace.clientWidth);(wt=="above"||Re.bottom+Ue.offsetHeight>nn)&&Re.top>Ue.offsetHeight?Xt=Re.top-Ue.offsetHeight:Re.bottom+Ue.offsetHeight<=nn&&(Xt=Re.bottom),Tn+Ue.offsetWidth>Un&&(Tn=Un-Ue.offsetWidth)}Ue.style.top=Xt+"px",Ue.style.left=Ue.style.right="",Rt=="right"?(Tn=It.sizer.clientWidth-Ue.offsetWidth,Ue.style.right="0px"):(Rt=="left"?Tn=0:Rt=="middle"&&(Tn=(It.sizer.clientWidth-Ue.offsetWidth)/2),Ue.style.left=Tn+"px"),ot&&rh(this,{left:Tn,top:Xt,right:Tn+Ue.offsetWidth,bottom:Xt+Ue.offsetHeight})},triggerOnKeyDown:fn(Vp),triggerOnKeyPress:fn(Lc),triggerOnKeyUp:Yp,triggerOnMouseDown:fn(Mc),execCommand:function(Re){if(Va.hasOwnProperty(Re))return Va[Re].call(null,this)},triggerElectric:fn(function(Re){ig(this,Re)}),findPosH:function(Re,Ue,ot,wt){var Rt=1;Ue<0&&(Rt=-1,Ue=-Ue);for(var It=Bn(this.doc,Re),Xt=0;Xt<Ue&&(It=Cf(this.doc,It,Rt,ot,wt),!It.hitSide);++Xt);return It},moveH:fn(function(Re,Ue){var ot=this;this.extendSelectionsBy(function(wt){return ot.display.shift||ot.doc.extend||wt.empty()?Cf(ot.doc,wt.head,Re,Ue,ot.options.rtlMoveVisually):Re<0?wt.from():wt.to()},Ht)}),deleteH:fn(function(Re,Ue){var ot=this.doc.sel,wt=this.doc;ot.somethingSelected()?wt.replaceSelection("",null,"+delete"):fl(this,function(Rt){var It=Cf(wt,Rt.head,Re,Ue,!1);return Re<0?{from:It,to:Rt.head}:{from:Rt.head,to:It}})}),findPosV:function(Re,Ue,ot,wt){var Rt=1,It=wt;Ue<0&&(Rt=-1,Ue=-Ue);for(var Xt=Bn(this.doc,Re),Tn=0;Tn<Ue;++Tn){var nn=Rs(this,Xt,"div");if(It==null?It=nn.left:nn.left=It,Xt=kh(this,nn,Rt,ot),Xt.hitSide)break}return Xt},moveV:fn(function(Re,Ue){var ot=this,wt=this.doc,Rt=[],It=!this.display.shift&&!wt.extend&&wt.sel.somethingSelected();if(wt.extendSelectionsBy(function(Tn){if(It)return Re<0?Tn.from():Tn.to();var nn=Rs(ot,Tn.head,"div");Tn.goalColumn!=null&&(nn.left=Tn.goalColumn),Rt.push(nn.left);var Un=kh(ot,nn,Re,Ue);return Ue=="page"&&Tn==wt.sel.primary()&&Ch(ot,Bl(ot,Un,"div").top-nn.top),Un},Ht),Rt.length)for(var Xt=0;Xt<wt.sel.ranges.length;Xt++)wt.sel.ranges[Xt].goalColumn=Rt[Xt]}),findWordAt:function(Re){var Ue=this.doc,ot=dn(Ue,Re.line).text,wt=Re.ch,Rt=Re.ch;if(ot){var It=this.getHelper(Re,"wordChars");(Re.sticky=="before"||Rt==ot.length)&&wt?--wt:++Rt;for(var Xt=ot.charAt(wt),Tn=xt(Xt,It)?function(nn){return xt(nn,It)}:/\s/.test(Xt)?function(nn){return/\s/.test(nn)}:function(nn){return!/\s/.test(nn)&&!xt(nn)};wt>0&&Tn(ot.charAt(wt-1));)--wt;for(;Rt<ot.length&&Tn(ot.charAt(Rt));)++Rt}return new Pi($t(Re.line,wt),$t(Re.line,Rt))},toggleOverwrite:function(Re){Re!=null&&Re==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ct(this.display.cursorDiv,"CodeMirror-overwrite"):Ae(this.display.cursorDiv,"CodeMirror-overwrite"),ln(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==at()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:fn(function(Re,Ue){ro(this,Re,Ue)}),getScrollInfo:function(){var Re=this.display.scroller;return{left:Re.scrollLeft,top:Re.scrollTop,height:Re.scrollHeight-Wa(this)-this.display.barHeight,width:Re.scrollWidth-Wa(this)-this.display.barWidth,clientHeight:Uu(this),clientWidth:Za(this)}},scrollIntoView:fn(function(Re,Ue){Re==null?(Re={from:this.doc.sel.primary().head,to:null},Ue==null&&(Ue=this.options.cursorScrollMargin)):typeof Re=="number"?Re={from:$t(Re,0),to:null}:Re.from==null&&(Re={from:Re,to:null}),Re.to||(Re.to=Re.from),Re.margin=Ue||0,Re.from.line!=null?ns(this,Re):qh(this,Re.from,Re.to,Re.margin)}),setSize:fn(function(Re,Ue){var ot=this,wt=function(It){return typeof It=="number"||/^\d+$/.test(String(It))?It+"px":It};Re!=null&&(this.display.wrapper.style.width=wt(Re)),Ue!=null&&(this.display.wrapper.style.height=wt(Ue)),this.options.lineWrapping&&ra(this);var Rt=this.display.viewFrom;this.doc.iter(Rt,this.display.viewTo,function(It){if(It.widgets){for(var Xt=0;Xt<It.widgets.length;Xt++)if(It.widgets[Xt].noHScroll){wo(ot,Rt,"widget");break}}++Rt}),this.curOp.forceUpdate=!0,ln(this,"refresh",this)}),operation:function(Re){return Et(this,Re)},startOperation:function(){return Oa(this)},endOperation:function(){return oc(this)},refresh:fn(function(){var Re=this.display.cachedTextHeight;Ms(this),this.curOp.forceUpdate=!0,Ds(this),ro(this,this.doc.scrollLeft,this.doc.scrollTop),Ii(this.display),(Re==null||Math.abs(Re-Tu(this.display))>.5||this.options.lineWrapping)&&Vr(this),ln(this,"refresh",this)}),swapDoc:fn(function(Re){var Ue=this.doc;return Ue.cm=null,this.state.selectingText&&this.state.selectingText(),Wr(this,Re),Ds(this),this.display.input.reset(),ro(this,Re.scrollLeft,Re.scrollTop),this.curOp.forceScroll=!0,Li(this,"swapDoc",this,Ue),Ue}),phrase:function(Re){var Ue=this.options.phrases;return Ue&&Object.prototype.hasOwnProperty.call(Ue,Re)?Ue[Re]:Re},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}},qn(re),re.registerHelper=function(Re,Ue,ot){Fe.hasOwnProperty(Re)||(Fe[Re]=re[Re]={_global:[]}),Fe[Re][Ue]=ot},re.registerGlobalHelper=function(Re,Ue,ot,wt){re.registerHelper(Re,Ue,wt),Fe[Re]._global.push({pred:ot,val:wt})}}function Cf(re,pe,Fe,Re,Ue){var ot=pe,wt=Fe,Rt=dn(re,pe.line),It=Ue&&re.direction=="rtl"?-Fe:Fe;function Xt(){var Rr=pe.line+It;return Rr<re.first||Rr>=re.first+re.size?!1:(pe=new $t(Rr,pe.ch,pe.sticky),Rt=dn(re,Rr))}function Tn(Rr){var wr;if(Re=="codepoint"){var Zr=Rt.text.charCodeAt(pe.ch+(Re>0?0:-1));isNaN(Zr)?wr=null:wr=new $t(pe.line,Math.max(0,Math.min(Rt.text.length,pe.ch+Fe*(Zr>=55296&&Zr<56320?2:1))),-Fe)}else Ue?wr=Ys(re.cm,Rt,pe,Fe):wr=ba(Rt,pe,Fe);if(wr==null)if(!Rr&&Xt())pe=fs(Ue,re.cm,Rt,pe.line,It);else return!1;else pe=wr;return!0}if(Re=="char"||Re=="codepoint")Tn();else if(Re=="column")Tn(!0);else if(Re=="word"||Re=="group")for(var nn=null,Un=Re=="group",Fn=re.cm&&re.cm.getHelper(pe,"wordChars"),mi=!0;!(Fe<0&&!Tn(!mi));mi=!1){var _i=Rt.text.charAt(pe.ch)||`
|
|
|
`,Bi=xt(_i,Fn)?"w":Un&&_i==`
|
|
|
`?"n":!Un||/\s/.test(_i)?null:"p";if(Un&&!mi&&!Bi&&(Bi="s"),nn&&nn!=Bi){Fe<0&&(Fe=1,Tn(),pe.sticky="after");break}if(Bi&&(nn=Bi),Fe>0&&!Tn(!mi))break}var rr=hu(re,pe,ot,wt,!0);return jn(ot,rr)&&(rr.hitSide=!0),rr}function kh(re,pe,Fe,Re){var Ue=re.doc,ot=pe.left,wt;if(Re=="page"){var Rt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),It=Math.max(Rt-.5*Tu(re.display),3);wt=(Fe>0?pe.bottom:pe.top)+Fe*It}else Re=="line"&&(wt=Fe>0?pe.bottom+3:pe.top-3);for(var Xt;Xt=wc(re,ot,wt),!!Xt.outside;){if(Fe<0?wt<=0:wt>=Ue.height){Xt.hitSide=!0;break}wt+=Fe*5}return Xt}var Qs=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new tt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qs.prototype.init=function(re){var pe=this,Fe=this,Re=Fe.cm,Ue=Fe.div=re.lineDiv;og(Ue,Re.options.spellcheck,Re.options.autocorrect,Re.options.autocapitalize);function ot(Rt){for(var It=Rt.target;It;It=It.parentNode){if(It==Ue)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(It.className))break}return!1}At(Ue,"paste",function(Rt){!ot(Rt)||gn(Re,Rt)||ng(Rt,Re)||Le<=11&&setTimeout(wn(Re,function(){return pe.updateFromDOM()}),20)}),At(Ue,"compositionstart",function(Rt){pe.composing={data:Rt.data,done:!1}}),At(Ue,"compositionupdate",function(Rt){pe.composing||(pe.composing={data:Rt.data,done:!1})}),At(Ue,"compositionend",function(Rt){pe.composing&&(Rt.data!=pe.composing.data&&pe.readFromDOMSoon(),pe.composing.done=!0)}),At(Ue,"touchstart",function(){return Fe.forceCompositionEnd()}),At(Ue,"input",function(){pe.composing||pe.readFromDOMSoon()});function wt(Rt){if(!(!ot(Rt)||gn(Re,Rt))){if(Re.somethingSelected())ld({lineWise:!1,text:Re.getSelections()}),Rt.type=="cut"&&Re.replaceSelection("",null,"cut");else if(Re.options.lineWiseCopyCut){var It=rg(Re);ld({lineWise:!0,text:It.text}),Rt.type=="cut"&&Re.operation(function(){Re.setSelections(It.ranges,0,gt),Re.replaceSelection("",null,"cut")})}else return;if(Rt.clipboardData){Rt.clipboardData.clearData();var Xt=tu.text.join(`
|
|
|
`);if(Rt.clipboardData.setData("Text",Xt),Rt.clipboardData.getData("Text")==Xt){Rt.preventDefault();return}}var Tn=sg(),nn=Tn.firstChild;Re.display.lineSpace.insertBefore(Tn,Re.display.lineSpace.firstChild),nn.value=tu.text.join(`
|
|
|
`);var Un=document.activeElement;yt(nn),setTimeout(function(){Re.display.lineSpace.removeChild(Tn),Un.focus(),Un==Ue&&Fe.showPrimarySelection()},50)}}At(Ue,"copy",wt),At(Ue,"cut",wt)},Qs.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Qs.prototype.prepareSelection=function(){var re=Pc(this.cm,!1);return re.focus=document.activeElement==this.div,re},Qs.prototype.showSelection=function(re,pe){!re||!this.cm.display.view.length||((re.focus||pe)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Qs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qs.prototype.showPrimarySelection=function(){var re=this.getSelection(),pe=this.cm,Fe=pe.doc.sel.primary(),Re=Fe.from(),Ue=Fe.to();if(pe.display.viewTo==pe.display.viewFrom||Re.line>=pe.display.viewTo||Ue.line<pe.display.viewFrom){re.removeAllRanges();return}var ot=Pf(pe,re.anchorNode,re.anchorOffset),wt=Pf(pe,re.focusNode,re.focusOffset);if(!(ot&&!ot.bad&&wt&&!wt.bad&&rn(Gn(ot,wt),Re)==0&&rn(ei(ot,wt),Ue)==0)){var Rt=pe.display.view,It=Re.line>=pe.display.viewFrom&&op(pe,Re)||{node:Rt[0].measure.map[2],offset:0},Xt=Ue.line<pe.display.viewTo&&op(pe,Ue);if(!Xt){var Tn=Rt[Rt.length-1].measure,nn=Tn.maps?Tn.maps[Tn.maps.length-1]:Tn.map;Xt={node:nn[nn.length-1],offset:nn[nn.length-2]-nn[nn.length-3]}}if(!It||!Xt){re.removeAllRanges();return}var Un=re.rangeCount&&re.getRangeAt(0),Fn;try{Fn=Ge(It.node,It.offset,Xt.offset,Xt.node)}catch(mi){}Fn&&(!Me&&pe.state.focused?(re.collapse(It.node,It.offset),Fn.collapsed||(re.removeAllRanges(),re.addRange(Fn))):(re.removeAllRanges(),re.addRange(Fn)),Un&&re.anchorNode==null?re.addRange(Un):Me&&this.startGracePeriod()),this.rememberSelection()}},Qs.prototype.startGracePeriod=function(){var re=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){re.gracePeriod=!1,re.selectionChanged()&&re.cm.operation(function(){return re.cm.curOp.selectionChanged=!0})},20)},Qs.prototype.showMultipleSelections=function(re){ze(this.cm.display.cursorDiv,re.cursors),ze(this.cm.display.selectionDiv,re.selection)},Qs.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Qs.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var pe=re.getRangeAt(0).commonAncestorContainer;return ft(this.div,pe)},Qs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qs.prototype.blur=function(){this.div.blur()},Qs.prototype.getField=function(){return this.div},Qs.prototype.supportsTouch=function(){return!0},Qs.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():Et(this.cm,function(){return re.cm.curOp.selectionChanged=!0});function pe(){re.cm.state.focused&&(re.pollSelection(),re.polling.set(re.cm.options.pollInterval,pe))}this.polling.set(this.cm.options.pollInterval,pe)},Qs.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Qs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),pe=this.cm;if(z&&xe&&this.cm.display.gutterSpecs.length&&ag(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Fe=Pf(pe,re.anchorNode,re.anchorOffset),Re=Pf(pe,re.focusNode,re.focusOffset);Fe&&Re&&Et(pe,function(){As(pe.doc,Sr(Fe,Re),gt),(Fe.bad||Re.bad)&&(pe.curOp.selectionChanged=!0)})}}},Qs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,pe=re.display,Fe=re.doc.sel.primary(),Re=Fe.from(),Ue=Fe.to();if(Re.ch==0&&Re.line>re.firstLine()&&(Re=$t(Re.line-1,dn(re.doc,Re.line-1).length)),Ue.ch==dn(re.doc,Ue.line).text.length&&Ue.line<re.lastLine()&&(Ue=$t(Ue.line+1,0)),Re.line<pe.viewFrom||Ue.line>pe.viewTo-1)return!1;var ot,wt,Rt;Re.line==pe.viewFrom||(ot=$s(re,Re.line))==0?(wt=Nt(pe.view[0].line),Rt=pe.view[0].node):(wt=Nt(pe.view[ot].line),Rt=pe.view[ot-1].node.nextSibling);var It=$s(re,Ue.line),Xt,Tn;if(It==pe.view.length-1?(Xt=pe.viewTo-1,Tn=pe.lineDiv.lastChild):(Xt=Nt(pe.view[It+1].line)-1,Tn=pe.view[It+1].node.previousSibling),!Rt)return!1;for(var nn=re.doc.splitLines($d(re,Rt,Tn,wt,Xt)),Un=Pn(re.doc,$t(wt,0),$t(Xt,dn(re.doc,Xt).text.length));nn.length>1&&Un.length>1;)if(Wt(nn)==Wt(Un))nn.pop(),Un.pop(),Xt--;else if(nn[0]==Un[0])nn.shift(),Un.shift(),wt++;else break;for(var Fn=0,mi=0,_i=nn[0],Bi=Un[0],rr=Math.min(_i.length,Bi.length);Fn<rr&&_i.charCodeAt(Fn)==Bi.charCodeAt(Fn);)++Fn;for(var Rr=Wt(nn),wr=Wt(Un),Zr=Math.min(Rr.length-(nn.length==1?Fn:0),wr.length-(Un.length==1?Fn:0));mi<Zr&&Rr.charCodeAt(Rr.length-mi-1)==wr.charCodeAt(wr.length-mi-1);)++mi;if(nn.length==1&&Un.length==1&&wt==Re.line)for(;Fn&&Fn>Re.ch&&Rr.charCodeAt(Rr.length-mi-1)==wr.charCodeAt(wr.length-mi-1);)Fn--,mi++;nn[nn.length-1]=Rr.slice(0,Rr.length-mi).replace(/^\u200b+/,""),nn[0]=nn[0].slice(Fn).replace(/\u200b+$/,"");var bo=$t(wt,Fn),xr=$t(Xt,Un.length?Wt(Un).length-mi:0);if(nn.length>1||nn[0]||rn(bo,xr))return sc(re.doc,nn,bo,xr,"+input"),!0},Qs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qs.prototype.reset=function(){this.forceCompositionEnd()},Qs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qs.prototype.readFromDOMSoon=function(){var re=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(re.readDOMTimeout=null,re.composing)if(re.composing.done)re.composing=null;else return;re.updateFromDOM()},80))},Qs.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&Et(this.cm,function(){return Ms(re.cm)})},Qs.prototype.setUneditable=function(re){re.contentEditable="false"},Qs.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||wn(this.cm,bf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Qs.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Qs.prototype.onContextMenu=function(){},Qs.prototype.resetPosition=function(){},Qs.prototype.needsContentAttribute=!0;function op(re,pe){var Fe=Gu(re,pe.line);if(!Fe||Fe.hidden)return null;var Re=dn(re.doc,pe.line),Ue=Eu(Fe,Re,pe.line),ot=dt(Re,re.doc.direction),wt="left";if(ot){var Rt=Ne(ot,pe.ch);wt=Rt%2?"right":"left"}var It=xc(Ue.map,pe.ch,wt);return It.offset=It.collapse=="right"?It.end:It.start,It}function ag(re){for(var pe=re;pe;pe=pe.parentNode)if(/CodeMirror-gutter-wrapper/.test(pe.className))return!0;return!1}function Vd(re,pe){return pe&&(re.bad=!0),re}function $d(re,pe,Fe,Re,Ue){var ot="",wt=!1,Rt=re.doc.lineSeparator(),It=!1;function Xt(Fn){return function(mi){return mi.id==Fn}}function Tn(){wt&&(ot+=Rt,It&&(ot+=Rt),wt=It=!1)}function nn(Fn){Fn&&(Tn(),ot+=Fn)}function Un(Fn){if(Fn.nodeType==1){var mi=Fn.getAttribute("cm-text");if(mi){nn(mi);return}var _i=Fn.getAttribute("cm-marker"),Bi;if(_i){var rr=re.findMarks($t(Re,0),$t(Ue+1,0),Xt(+_i));rr.length&&(Bi=rr[0].find(0))&&nn(Pn(re.doc,Bi.from,Bi.to).join(Rt));return}if(Fn.getAttribute("contenteditable")=="false")return;var Rr=/^(pre|div|p|li|table|br)$/i.test(Fn.nodeName);if(!/^br$/i.test(Fn.nodeName)&&Fn.textContent.length==0)return;Rr&&Tn();for(var wr=0;wr<Fn.childNodes.length;wr++)Un(Fn.childNodes[wr]);/^(pre|p)$/i.test(Fn.nodeName)&&(It=!0),Rr&&(wt=!0)}else Fn.nodeType==3&&nn(Fn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Un(pe),pe!=Fe;)pe=pe.nextSibling,It=!1;return ot}function Pf(re,pe,Fe){var Re;if(pe==re.display.lineDiv){if(Re=re.display.lineDiv.childNodes[Fe],!Re)return Vd(re.clipPos($t(re.display.viewTo-1)),!0);pe=null,Fe=0}else for(Re=pe;;Re=Re.parentNode){if(!Re||Re==re.display.lineDiv)return null;if(Re.parentNode&&Re.parentNode==re.display.lineDiv)break}for(var Ue=0;Ue<re.display.view.length;Ue++){var ot=re.display.view[Ue];if(ot.node==Re)return hm(ot,pe,Fe)}}function hm(re,pe,Fe){var Re=re.text.firstChild,Ue=!1;if(!pe||!ft(Re,pe))return Vd($t(Nt(re.line),0),!0);if(pe==Re&&(Ue=!0,pe=Re.childNodes[Fe],Fe=0,!pe)){var ot=re.rest?Wt(re.rest):re.line;return Vd($t(Nt(ot),ot.text.length),Ue)}var wt=pe.nodeType==3?pe:null,Rt=pe;for(!wt&&pe.childNodes.length==1&&pe.firstChild.nodeType==3&&(wt=pe.firstChild,Fe&&(Fe=wt.nodeValue.length));Rt.parentNode!=Re;)Rt=Rt.parentNode;var It=re.measure,Xt=It.maps;function Tn(Bi,rr,Rr){for(var wr=-1;wr<(Xt?Xt.length:0);wr++)for(var Zr=wr<0?It.map:Xt[wr],bo=0;bo<Zr.length;bo+=3){var xr=Zr[bo+2];if(xr==Bi||xr==rr){var zo=Nt(wr<0?re.line:re.rest[wr]),ca=Zr[bo]+Rr;return(Rr<0||xr!=Bi)&&(ca=Zr[bo+(Rr?1:0)]),$t(zo,ca)}}}var nn=Tn(wt,Rt,Fe);if(nn)return Vd(nn,Ue);for(var Un=Rt.nextSibling,Fn=wt?wt.nodeValue.length-Fe:0;Un;Un=Un.nextSibling){if(nn=Tn(Un,Un.firstChild,0),nn)return Vd($t(nn.line,nn.ch-Fn),Ue);Fn+=Un.textContent.length}for(var mi=Rt.previousSibling,_i=Fe;mi;mi=mi.previousSibling){if(nn=Tn(mi,mi.firstChild,-1),nn)return Vd($t(nn.line,nn.ch+_i),Ue);_i+=mi.textContent.length}}var Fa=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new tt,this.hasSelection=!1,this.composing=null};Fa.prototype.init=function(re){var pe=this,Fe=this,Re=this.cm;this.createField(re);var Ue=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),ce&&(Ue.style.width="0px"),At(Ue,"input",function(){Ce&&Le>=9&&pe.hasSelection&&(pe.hasSelection=null),Fe.poll()}),At(Ue,"paste",function(wt){gn(Re,wt)||ng(wt,Re)||(Re.state.pasteIncoming=+new Date,Fe.fastPoll())});function ot(wt){if(!gn(Re,wt)){if(Re.somethingSelected())ld({lineWise:!1,text:Re.getSelections()});else if(Re.options.lineWiseCopyCut){var Rt=rg(Re);ld({lineWise:!0,text:Rt.text}),wt.type=="cut"?Re.setSelections(Rt.ranges,null,gt):(Fe.prevInput="",Ue.value=Rt.text.join(`
|
|
|
`),yt(Ue))}else return;wt.type=="cut"&&(Re.state.cutIncoming=+new Date)}}At(Ue,"cut",ot),At(Ue,"copy",ot),At(re.scroller,"paste",function(wt){if(!(Ga(re,wt)||gn(Re,wt))){if(!Ue.dispatchEvent){Re.state.pasteIncoming=+new Date,Fe.focus();return}var Rt=new Event("paste");Rt.clipboardData=wt.clipboardData,Ue.dispatchEvent(Rt)}}),At(re.lineSpace,"selectstart",function(wt){Ga(re,wt)||ai(wt)}),At(Ue,"compositionstart",function(){var wt=Re.getCursor("from");Fe.composing&&Fe.composing.range.clear(),Fe.composing={start:wt,range:Re.markText(wt,Re.getCursor("to"),{className:"CodeMirror-composing"})}}),At(Ue,"compositionend",function(){Fe.composing&&(Fe.poll(),Fe.composing.range.clear(),Fe.composing=null)})},Fa.prototype.createField=function(re){this.wrapper=sg(),this.textarea=this.wrapper.firstChild},Fa.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Fa.prototype.prepareSelection=function(){var re=this.cm,pe=re.display,Fe=re.doc,Re=Pc(re);if(re.options.moveInputWithCursor){var Ue=Rs(re,Fe.sel.primary().head,"div"),ot=pe.wrapper.getBoundingClientRect(),wt=pe.lineDiv.getBoundingClientRect();Re.teTop=Math.max(0,Math.min(pe.wrapper.clientHeight-10,Ue.top+wt.top-ot.top)),Re.teLeft=Math.max(0,Math.min(pe.wrapper.clientWidth-10,Ue.left+wt.left-ot.left))}return Re},Fa.prototype.showSelection=function(re){var pe=this.cm,Fe=pe.display;ze(Fe.cursorDiv,re.cursors),ze(Fe.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Fa.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var pe=this.cm;if(pe.somethingSelected()){this.prevInput="";var Fe=pe.getSelection();this.textarea.value=Fe,pe.state.focused&&yt(this.textarea),Ce&&Le>=9&&(this.hasSelection=Fe)}else re||(this.prevInput=this.textarea.value="",Ce&&Le>=9&&(this.hasSelection=null))}},Fa.prototype.getField=function(){return this.textarea},Fa.prototype.supportsTouch=function(){return!1},Fa.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||at()!=this.textarea))try{this.textarea.focus()}catch(re){}},Fa.prototype.blur=function(){this.textarea.blur()},Fa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Fa.prototype.receivedFocus=function(){this.slowPoll()},Fa.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Fa.prototype.fastPoll=function(){var re=!1,pe=this;pe.pollingFast=!0;function Fe(){var Re=pe.poll();!Re&&!re?(re=!0,pe.polling.set(60,Fe)):(pe.pollingFast=!1,pe.slowPoll())}pe.polling.set(20,Fe)},Fa.prototype.poll=function(){var re=this,pe=this.cm,Fe=this.textarea,Re=this.prevInput;if(this.contextMenuPending||!pe.state.focused||rt(Fe)&&!Re&&!this.composing||pe.isReadOnly()||pe.options.disableInput||pe.state.keySeq)return!1;var Ue=Fe.value;if(Ue==Re&&!pe.somethingSelected())return!1;if(Ce&&Le>=9&&this.hasSelection===Ue||oe&&/[\uf700-\uf7ff]/.test(Ue))return pe.display.input.reset(),!1;if(pe.doc.sel==pe.display.selForContextMenu){var ot=Ue.charCodeAt(0);if(ot==8203&&!Re&&(Re="\u200B"),ot==8666)return this.reset(),this.cm.execCommand("undo")}for(var wt=0,Rt=Math.min(Re.length,Ue.length);wt<Rt&&Re.charCodeAt(wt)==Ue.charCodeAt(wt);)++wt;return Et(pe,function(){bf(pe,Ue.slice(wt),Re.length-wt,null,re.composing?"*compose":null),Ue.length>1e3||Ue.indexOf(`
|
|
|
`)>-1?Fe.value=re.prevInput="":re.prevInput=Ue,re.composing&&(re.composing.range.clear(),re.composing.range=pe.markText(re.composing.start,pe.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Fa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Fa.prototype.onKeyPress=function(){Ce&&Le>=9&&(this.hasSelection=null),this.fastPoll()},Fa.prototype.onContextMenu=function(re){var pe=this,Fe=pe.cm,Re=Fe.display,Ue=pe.textarea;pe.contextMenuPending&&pe.contextMenuPending();var ot=Da(Fe,re),wt=Re.scroller.scrollTop;if(!ot||ge)return;var Rt=Fe.options.resetSelectionOnContextMenu;Rt&&Fe.doc.sel.contains(ot)==-1&&wn(Fe,As)(Fe.doc,Sr(ot),gt);var It=Ue.style.cssText,Xt=pe.wrapper.style.cssText,Tn=pe.wrapper.offsetParent.getBoundingClientRect();pe.wrapper.style.cssText="position: static",Ue.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(re.clientY-Tn.top-5)+"px; left: "+(re.clientX-Tn.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 nn;he&&(nn=window.scrollY),Re.input.focus(),he&&window.scrollTo(null,nn),Re.input.reset(),Fe.somethingSelected()||(Ue.value=pe.prevInput=" "),pe.contextMenuPending=Fn,Re.selForContextMenu=Fe.doc.sel,clearTimeout(Re.detectingSelectAll);function Un(){if(Ue.selectionStart!=null){var _i=Fe.somethingSelected(),Bi="\u200B"+(_i?Ue.value:"");Ue.value="\u21DA",Ue.value=Bi,pe.prevInput=_i?"":"\u200B",Ue.selectionStart=1,Ue.selectionEnd=Bi.length,Re.selForContextMenu=Fe.doc.sel}}function Fn(){if(pe.contextMenuPending==Fn&&(pe.contextMenuPending=!1,pe.wrapper.style.cssText=Xt,Ue.style.cssText=It,Ce&&Le<9&&Re.scrollbars.setScrollTop(Re.scroller.scrollTop=wt),Ue.selectionStart!=null)){(!Ce||Ce&&Le<9)&&Un();var _i=0,Bi=function(){Re.selForContextMenu==Fe.doc.sel&&Ue.selectionStart==0&&Ue.selectionEnd>0&&pe.prevInput=="\u200B"?wn(Fe,gs)(Fe):_i++<10?Re.detectingSelectAll=setTimeout(Bi,500):(Re.selForContextMenu=null,Re.input.reset())};Re.detectingSelectAll=setTimeout(Bi,200)}}if(Ce&&Le>=9&&Un(),we){$i(re);var mi=function(){pn(window,"mouseup",mi),setTimeout(Fn,20)};At(window,"mouseup",mi)}else setTimeout(Fn,50)},Fa.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Fa.prototype.setUneditable=function(){},Fa.prototype.needsContentAttribute=!1;function dm(re,pe){if(pe=pe?zt(pe):{},pe.value=re.value,!pe.tabindex&&re.tabIndex&&(pe.tabindex=re.tabIndex),!pe.placeholder&&re.placeholder&&(pe.placeholder=re.placeholder),pe.autofocus==null){var Fe=at();pe.autofocus=Fe==re||re.getAttribute("autofocus")!=null&&Fe==document.body}function Re(){re.value=Rt.getValue()}var Ue;if(re.form&&(At(re.form,"submit",Re),!pe.leaveSubmitMethodAlone)){var ot=re.form;Ue=ot.submit;try{var wt=ot.submit=function(){Re(),ot.submit=Ue,ot.submit(),ot.submit=wt}}catch(It){}}pe.finishInit=function(It){It.save=Re,It.getTextArea=function(){return re},It.toTextArea=function(){It.toTextArea=isNaN,Re(),re.parentNode.removeChild(It.getWrapperElement()),re.style.display="",re.form&&(pn(re.form,"submit",Re),!pe.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Ue))}},re.style.display="none";var Rt=ys(function(It){return re.parentNode.insertBefore(It,re.nextSibling)},pe);return Rt}function Yd(re){re.off=pn,re.on=At,re.wheelEventPixels=pi,re.Doc=Ba,re.splitLines=Zi,re.countColumn=lt,re.findColumn=hn,re.isWordChar=Bt,re.Pass=Pt,re.signal=ln,re.Line=Xo,re.changeEnd=nr,re.scrollbarModel=Id,re.Pos=$t,re.cmpPos=rn,re.modes=co,re.mimeModes=mo,re.resolveMode=ri,re.getMode=Ke,re.modeExtensions=qe,re.extendMode=Ye,re.copyState=St,re.startState=Tt,re.innerMode=Ot,re.commands=Va,re.keyMap=Ll,re.keyName=Ud,re.isModifierKey=Lh,re.lookupKey=eu,re.normalizeKeyMap=zd,re.StringStream=_t,re.SharedTextMarker=ac,re.TextMarker=vn,re.LineWidget=Ma,re.e_preventDefault=ai,re.e_stopPropagation=Ti,re.e_stop=$i,re.addClass=Ct,re.contains=ft,re.rmClass=Ae,re.keyNames=Ku}um(ys),Th(ys);var ah="iter insert remove copy getEditor constructor".split(" ");for(var _f in Ba.prototype)Ba.prototype.hasOwnProperty(_f)&&ut(ah,_f)<0&&(ys.prototype[_f]=function(re){return function(){return re.apply(this.doc,arguments)}}(Ba.prototype[_f]));return qn(Ba),ys.inputStyles={textarea:Fa,contenteditable:Qs},ys.defineMode=function(re){!ys.defaults.mode&&re!="null"&&(ys.defaults.mode=re),no.apply(this,arguments)},ys.defineMIME=lo,ys.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),ys.defineMIME("text/plain","null"),ys.defineExtension=function(re,pe){ys.prototype[re]=pe},ys.defineDocExtension=function(re,pe){Ba.prototype[re]=pe},ys.fromTextArea=dm,Yd(ys),ys.version="5.58.2",ys})},25419:function(_n,en,Ee){(function(Me){Me(Ee(89780),Ee(15525),Ee(98101))})(function(Me){"use strict";Me.defineMode("markdown",function(me,Be){var ke=Me.getMode(me,"text/html"),Ce=ke.name=="null";function Le(lt){if(Me.findModeByName){var tt=Me.findModeByName(lt);tt&&(lt=tt.mime||tt.mimes[0])}var ut=Me.getMode(me,lt);return ut.name=="null"?null:ut}Be.highlightFormatting===void 0&&(Be.highlightFormatting=!1),Be.maxBlockquoteDepth===void 0&&(Be.maxBlockquoteDepth=0),Be.taskLists===void 0&&(Be.taskLists=!1),Be.strikethrough===void 0&&(Be.strikethrough=!1),Be.emoji===void 0&&(Be.emoji=!1),Be.fencedCodeBlockHighlighting===void 0&&(Be.fencedCodeBlockHighlighting=!0),Be.fencedCodeBlockDefaultMode===void 0&&(Be.fencedCodeBlockDefaultMode="text/plain"),Be.xml===void 0&&(Be.xml=!0),Be.tokenTypeOverrides===void 0&&(Be.tokenTypeOverrides={});var he={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var ye in he)he.hasOwnProperty(ye)&&Be.tokenTypeOverrides[ye]&&(he[ye]=Be.tokenTypeOverrides[ye]);var xe=/^([*\-_])(?:\s*\1){2,}\s*$/,ge=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,le=/^\[(x| )\](?=\s)/i,ve=Be.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,de=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ce=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,oe=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ie=" ";function se(lt,tt,ut){return tt.f=tt.inline=ut,ut(lt,tt)}function ue(lt,tt,ut){return tt.f=tt.block=ut,ut(lt,tt)}function Se(lt){return!lt||!/\S/.test(lt.string)}function we(lt){if(lt.linkTitle=!1,lt.linkHref=!1,lt.linkText=!1,lt.em=!1,lt.strong=!1,lt.strikethrough=!1,lt.quote=0,lt.indentedCode=!1,lt.f==Ae){var tt=Ce;if(!tt){var ut=Me.innerMode(ke,lt.htmlState);tt=ut.mode.name=="xml"&&ut.state.tagStart===null&&!ut.state.context&&ut.state.tokenize.isInText}tt&&(lt.f=Xe,lt.block=Pe,lt.htmlState=null)}return lt.trailingSpace=0,lt.trailingSpaceNewLine=!1,lt.prevLine=lt.thisLine,lt.thisLine={stream:null},null}function Pe(lt,tt){var ut=lt.column()===tt.indentation,mt=Se(tt.prevLine.stream),Pt=tt.indentedCode,gt=tt.prevLine.hr,Ft=tt.list!==!1,Ht=(tt.listStack[tt.listStack.length-1]||0)+3;tt.indentedCode=!1;var hn=tt.indentation;if(tt.indentationDiff===null&&(tt.indentationDiff=tt.indentation,Ft)){for(tt.list=null;hn<tt.listStack[tt.listStack.length-1];)tt.listStack.pop(),tt.listStack.length?tt.indentation=tt.listStack[tt.listStack.length-1]:tt.list=!1;tt.list!==!1&&(tt.indentationDiff=hn-tt.listStack[tt.listStack.length-1])}var Qt=!mt&&!gt&&!tt.prevLine.header&&(!Ft||!Pt)&&!tt.prevLine.fencedCodeEnd,bn=(tt.list===!1||gt||mt)&&tt.indentation<=Ht&<.match(xe),Wt=null;if(tt.indentationDiff>=4&&(Pt||tt.prevLine.fencedCodeEnd||tt.prevLine.header||mt))return lt.skipToEnd(),tt.indentedCode=!0,he.code;if(lt.eatSpace())return null;if(ut&&tt.indentation<=Ht&&(Wt=lt.match(ve))&&Wt[1].length<=6)return tt.quote=0,tt.header=Wt[1].length,tt.thisLine.header=!0,Be.highlightFormatting&&(tt.formatting="header"),tt.f=tt.inline,ze(tt);if(tt.indentation<=Ht&<.eat(">"))return tt.quote=ut?1:tt.quote+1,Be.highlightFormatting&&(tt.formatting="quote"),lt.eatSpace(),ze(tt);if(!bn&&!tt.setext&&ut&&tt.indentation<=Ht&&(Wt=lt.match(ge))){var Kt=Wt[1]?"ol":"ul";return tt.indentation=hn+lt.current().length,tt.list=!0,tt.quote=0,tt.listStack.push(tt.indentation),tt.em=!1,tt.strong=!1,tt.code=!1,tt.strikethrough=!1,Be.taskLists&<.match(le,!1)&&(tt.taskList=!0),tt.f=tt.inline,Be.highlightFormatting&&(tt.formatting=["list","list-"+Kt]),ze(tt)}else{if(ut&&tt.indentation<=Ht&&(Wt=lt.match(z,!0)))return tt.quote=0,tt.fencedEndRE=new RegExp(Wt[1]+"+ *$"),tt.localMode=Be.fencedCodeBlockHighlighting&&Le(Wt[2]||Be.fencedCodeBlockDefaultMode),tt.localMode&&(tt.localState=Me.startState(tt.localMode)),tt.f=tt.block=De,Be.highlightFormatting&&(tt.formatting="code-block"),tt.code=-1,ze(tt);if(tt.setext||(!Qt||!Ft)&&!tt.quote&&tt.list===!1&&!tt.code&&!bn&&!ee.test(lt.string)&&(Wt=lt.lookAhead(1))&&(Wt=Wt.match(de)))return tt.setext?(tt.header=tt.setext,tt.setext=0,lt.skipToEnd(),Be.highlightFormatting&&(tt.formatting="header")):(tt.header=Wt[0].charAt(0)=="="?1:2,tt.setext=tt.header),tt.thisLine.header=!0,tt.f=tt.inline,ze(tt);if(bn)return lt.skipToEnd(),tt.hr=!0,tt.thisLine.hr=!0,he.hr;if(lt.peek()==="[")return se(lt,tt,et)}return se(lt,tt,tt.inline)}function Ae(lt,tt){var ut=ke.token(lt,tt.htmlState);if(!Ce){var mt=Me.innerMode(ke,tt.htmlState);(mt.mode.name=="xml"&&mt.state.tagStart===null&&!mt.state.context&&mt.state.tokenize.isInText||tt.md_inside&<.current().indexOf(">")>-1)&&(tt.f=Xe,tt.block=Pe,tt.htmlState=null)}return ut}function De(lt,tt){var ut=tt.listStack[tt.listStack.length-1]||0,mt=tt.indentation<ut,Pt=ut+3;if(tt.fencedEndRE&&tt.indentation<=Pt&&(mt||lt.match(tt.fencedEndRE))){Be.highlightFormatting&&(tt.formatting="code-block");var gt;return mt||(gt=ze(tt)),tt.localMode=tt.localState=null,tt.block=Pe,tt.f=Xe,tt.fencedEndRE=null,tt.code=0,tt.thisLine.fencedCodeEnd=!0,mt?ue(lt,tt,tt.block):gt}else return tt.localMode?tt.localMode.token(lt,tt.localState):(lt.skipToEnd(),he.code)}function ze(lt){var tt=[];if(lt.formatting){tt.push(he.formatting),typeof lt.formatting=="string"&&(lt.formatting=[lt.formatting]);for(var ut=0;ut<lt.formatting.length;ut++)tt.push(he.formatting+"-"+lt.formatting[ut]),lt.formatting[ut]==="header"&&tt.push(he.formatting+"-"+lt.formatting[ut]+"-"+lt.header),lt.formatting[ut]==="quote"&&(!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=lt.quote?tt.push(he.formatting+"-"+lt.formatting[ut]+"-"+lt.quote):tt.push("error"))}if(lt.taskOpen)return tt.push("meta"),tt.length?tt.join(" "):null;if(lt.taskClosed)return tt.push("property"),tt.length?tt.join(" "):null;if(lt.linkHref?tt.push(he.linkHref,"url"):(lt.strong&&tt.push(he.strong),lt.em&&tt.push(he.em),lt.strikethrough&&tt.push(he.strikethrough),lt.emoji&&tt.push(he.emoji),lt.linkText&&tt.push(he.linkText),lt.code&&tt.push(he.code),lt.image&&tt.push(he.image),lt.imageAltText&&tt.push(he.imageAltText,"link"),lt.imageMarker&&tt.push(he.imageMarker)),lt.header&&tt.push(he.header,he.header+"-"+lt.header),lt.quote&&(tt.push(he.quote),!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=lt.quote?tt.push(he.quote+"-"+lt.quote):tt.push(he.quote+"-"+Be.maxBlockquoteDepth)),lt.list!==!1){var mt=(lt.listStack.length-1)%3;mt?mt===1?tt.push(he.list2):tt.push(he.list3):tt.push(he.list1)}return lt.trailingSpaceNewLine?tt.push("trailing-space-new-line"):lt.trailingSpace&&tt.push("trailing-space-"+(lt.trailingSpace%2?"a":"b")),tt.length?tt.join(" "):null}function Ze(lt,tt){if(lt.match(ce,!0))return ze(tt)}function Xe(lt,tt){var ut=tt.text(lt,tt);if(typeof ut!="undefined")return ut;if(tt.list)return tt.list=null,ze(tt);if(tt.taskList){var mt=lt.match(le,!0)[1]===" ";return mt?tt.taskOpen=!0:tt.taskClosed=!0,Be.highlightFormatting&&(tt.formatting="task"),tt.taskList=!1,ze(tt)}if(tt.taskOpen=!1,tt.taskClosed=!1,tt.header&<.match(/^#+$/,!0))return Be.highlightFormatting&&(tt.formatting="header"),ze(tt);var Pt=lt.next();if(tt.linkTitle){tt.linkTitle=!1;var gt=Pt;Pt==="("&&(gt=")"),gt=(gt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ft="^\\s*(?:[^"+gt+"\\\\]+|\\\\\\\\|\\\\.)"+gt;if(lt.match(new RegExp(Ft),!0))return he.linkHref}if(Pt==="`"){var Ht=tt.formatting;Be.highlightFormatting&&(tt.formatting="code"),lt.eatWhile("`");var hn=lt.current().length;if(tt.code==0&&(!tt.quote||hn==1))return tt.code=hn,ze(tt);if(hn==tt.code){var Qt=ze(tt);return tt.code=0,Qt}else return tt.formatting=Ht,ze(tt)}else if(tt.code)return ze(tt);if(Pt==="\\"&&(lt.next(),Be.highlightFormatting)){var bn=ze(tt),Wt=he.formatting+"-escape";return bn?bn+" "+Wt:Wt}if(Pt==="!"&<.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return tt.imageMarker=!0,tt.image=!0,Be.highlightFormatting&&(tt.formatting="image"),ze(tt);if(Pt==="["&&tt.imageMarker&<.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return tt.imageMarker=!1,tt.imageAltText=!0,Be.highlightFormatting&&(tt.formatting="image"),ze(tt);if(Pt==="]"&&tt.imageAltText){Be.highlightFormatting&&(tt.formatting="image");var bn=ze(tt);return tt.imageAltText=!1,tt.image=!1,tt.inline=tt.f=ft,bn}if(Pt==="["&&!tt.image)return tt.linkText&<.match(/^.*?\]/)||(tt.linkText=!0,Be.highlightFormatting&&(tt.formatting="link")),ze(tt);if(Pt==="]"&&tt.linkText){Be.highlightFormatting&&(tt.formatting="link");var bn=ze(tt);return tt.linkText=!1,tt.inline=tt.f=lt.match(/\(.*?\)| ?\[.*?\]/,!1)?ft:Xe,bn}if(Pt==="<"&<.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){tt.f=tt.inline=Ge,Be.highlightFormatting&&(tt.formatting="link");var bn=ze(tt);return bn?bn+=" ":bn="",bn+he.linkInline}if(Pt==="<"&<.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){tt.f=tt.inline=Ge,Be.highlightFormatting&&(tt.formatting="link");var bn=ze(tt);return bn?bn+=" ":bn="",bn+he.linkEmail}if(Be.xml&&Pt==="<"&<.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Kt=lt.string.indexOf(">",lt.pos);if(Kt!=-1){var Jt=lt.string.substring(lt.start,Kt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Jt)&&(tt.md_inside=!0)}return lt.backUp(1),tt.htmlState=Me.startState(ke),ue(lt,tt,Ae)}if(Be.xml&&Pt==="<"&<.match(/^\/\w*?>/))return tt.md_inside=!1,"tag";if(Pt==="*"||Pt==="_"){for(var Yt=1,kt=lt.pos==1?" ":lt.string.charAt(lt.pos-2);Yt<3&<.eat(Pt);)Yt++;var pt=lt.peek()||" ",Bt=!/\s/.test(pt)&&(!oe.test(pt)||/\s/.test(kt)||oe.test(kt)),xt=!/\s/.test(kt)&&(!oe.test(kt)||/\s/.test(pt)||oe.test(pt)),vt=null,nt=null;if(Yt%2&&(!tt.em&&Bt&&(Pt==="*"||!xt||oe.test(kt))?vt=!0:tt.em==Pt&&xt&&(Pt==="*"||!Bt||oe.test(pt))&&(vt=!1)),Yt>1&&(!tt.strong&&Bt&&(Pt==="*"||!xt||oe.test(kt))?nt=!0:tt.strong==Pt&&xt&&(Pt==="*"||!Bt||oe.test(pt))&&(nt=!1)),nt!=null||vt!=null){Be.highlightFormatting&&(tt.formatting=vt==null?"strong":nt==null?"em":"strong em"),vt===!0&&(tt.em=Pt),nt===!0&&(tt.strong=Pt);var Qt=ze(tt);return vt===!1&&(tt.em=!1),nt===!1&&(tt.strong=!1),Qt}}else if(Pt===" "&&(lt.eat("*")||lt.eat("_"))){if(lt.peek()===" ")return ze(tt);lt.backUp(1)}if(Be.strikethrough){if(Pt==="~"&<.eatWhile(Pt)){if(tt.strikethrough){Be.highlightFormatting&&(tt.formatting="strikethrough");var Qt=ze(tt);return tt.strikethrough=!1,Qt}else if(lt.match(/^[^\s]/,!1))return tt.strikethrough=!0,Be.highlightFormatting&&(tt.formatting="strikethrough"),ze(tt)}else if(Pt===" "&<.match(/^~~/,!0)){if(lt.peek()===" ")return ze(tt);lt.backUp(2)}}if(Be.emoji&&Pt===":"&<.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){tt.emoji=!0,Be.highlightFormatting&&(tt.formatting="emoji");var He=ze(tt);return tt.emoji=!1,He}return Pt===" "&&(lt.match(/^ +$/,!1)?tt.trailingSpace++:tt.trailingSpace&&(tt.trailingSpaceNewLine=!0)),ze(tt)}function Ge(lt,tt){var ut=lt.next();if(ut===">"){tt.f=tt.inline=Xe,Be.highlightFormatting&&(tt.formatting="link");var mt=ze(tt);return mt?mt+=" ":mt="",mt+he.linkInline}return lt.match(/^[^>]+/,!0),he.linkInline}function ft(lt,tt){if(lt.eatSpace())return null;var ut=lt.next();return ut==="("||ut==="["?(tt.f=tt.inline=Ct(ut==="("?")":"]"),Be.highlightFormatting&&(tt.formatting="link-string"),tt.linkHref=!0,ze(tt)):"error"}var at={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ct(lt){return function(tt,ut){var mt=tt.next();if(mt===lt){ut.f=ut.inline=Xe,Be.highlightFormatting&&(ut.formatting="link-string");var Pt=ze(ut);return ut.linkHref=!1,Pt}return tt.match(at[lt]),ut.linkHref=!0,ze(ut)}}function et(lt,tt){return lt.match(/^([^\]\\]|\\.)*\]:/,!1)?(tt.f=yt,lt.next(),Be.highlightFormatting&&(tt.formatting="link"),tt.linkText=!0,ze(tt)):se(lt,tt,Xe)}function yt(lt,tt){if(lt.match(/^\]:/,!0)){tt.f=tt.inline=st,Be.highlightFormatting&&(tt.formatting="link");var ut=ze(tt);return tt.linkText=!1,ut}return lt.match(/^([^\]\\]|\\.)+/,!0),he.linkText}function st(lt,tt){return lt.eatSpace()?null:(lt.match(/^[^\s]+/,!0),lt.peek()===void 0?tt.linkTitle=!0:lt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),tt.f=tt.inline=Xe,he.linkHref+" url")}var zt={startState:function(){return{f:Pe,prevLine:{stream:null},thisLine:{stream:null},block:Pe,htmlState:null,indentation:0,inline:Xe,text:Ze,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(lt){return{f:lt.f,prevLine:lt.prevLine,thisLine:lt.thisLine,block:lt.block,htmlState:lt.htmlState&&Me.copyState(ke,lt.htmlState),indentation:lt.indentation,localMode:lt.localMode,localState:lt.localMode?Me.copyState(lt.localMode,lt.localState):null,inline:lt.inline,text:lt.text,formatting:!1,linkText:lt.linkText,linkTitle:lt.linkTitle,linkHref:lt.linkHref,code:lt.code,em:lt.em,strong:lt.strong,strikethrough:lt.strikethrough,emoji:lt.emoji,header:lt.header,setext:lt.setext,hr:lt.hr,taskList:lt.taskList,list:lt.list,listStack:lt.listStack.slice(0),quote:lt.quote,indentedCode:lt.indentedCode,trailingSpace:lt.trailingSpace,trailingSpaceNewLine:lt.trailingSpaceNewLine,md_inside:lt.md_inside,fencedEndRE:lt.fencedEndRE}},token:function(lt,tt){if(tt.formatting=!1,lt!=tt.thisLine.stream){if(tt.header=0,tt.hr=!1,lt.match(/^\s*$/,!0))return we(tt),null;if(tt.prevLine=tt.thisLine,tt.thisLine={stream:lt},tt.taskList=!1,tt.trailingSpace=0,tt.trailingSpaceNewLine=!1,!tt.localState&&(tt.f=tt.block,tt.f!=Ae)){var ut=lt.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(tt.indentation=ut,tt.indentationDiff=null,ut>0)return null}}return tt.f(lt,tt)},innerMode:function(lt){return lt.block==Ae?{state:lt.htmlState,mode:ke}:lt.localState?{state:lt.localState,mode:lt.localMode}:{state:lt,mode:zt}},indent:function(lt,tt,ut){return lt.block==Ae&&ke.indent?ke.indent(lt.htmlState,tt,ut):lt.localState&<.localMode.indent?lt.localMode.indent(lt.localState,tt,ut):Me.Pass},blankLine:we,getType:ze,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return zt},"xml"),Me.defineMIME("text/markdown","markdown"),Me.defineMIME("text/x-markdown","markdown")})},98101:function(_n,en,Ee){(function(Me){Me(Ee(89780))})(function(Me){"use strict";Me.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 me=0;me<Me.modeInfo.length;me++){var Be=Me.modeInfo[me];Be.mimes&&(Be.mime=Be.mimes[0])}Me.findModeByMIME=function(ke){ke=ke.toLowerCase();for(var Ce=0;Ce<Me.modeInfo.length;Ce++){var Le=Me.modeInfo[Ce];if(Le.mime==ke)return Le;if(Le.mimes){for(var he=0;he<Le.mimes.length;he++)if(Le.mimes[he]==ke)return Le}}if(/\+xml$/.test(ke))return Me.findModeByMIME("application/xml");if(/\+json$/.test(ke))return Me.findModeByMIME("application/json")},Me.findModeByExtension=function(ke){ke=ke.toLowerCase();for(var Ce=0;Ce<Me.modeInfo.length;Ce++){var Le=Me.modeInfo[Ce];if(Le.ext){for(var he=0;he<Le.ext.length;he++)if(Le.ext[he]==ke)return Le}}},Me.findModeByFileName=function(ke){for(var Ce=0;Ce<Me.modeInfo.length;Ce++){var Le=Me.modeInfo[Ce];if(Le.file&&Le.file.test(ke))return Le}var he=ke.lastIndexOf("."),ye=he>-1&&ke.substring(he+1,ke.length);if(ye)return Me.findModeByExtension(ye)},Me.findModeByName=function(ke){ke=ke.toLowerCase();for(var Ce=0;Ce<Me.modeInfo.length;Ce++){var Le=Me.modeInfo[Ce];if(Le.name.toLowerCase()==ke)return Le;if(Le.alias){for(var he=0;he<Le.alias.length;he++)if(Le.alias[he].toLowerCase()==ke)return Le}}}})},67549:function(_n,en,Ee){(function(Me){Me(Ee(89780))})(function(Me){"use strict";Me.defineMode("stex",function(me,Be){"use strict";function ke(ce,z){ce.cmdState.push(z)}function Ce(ce){return ce.cmdState.length>0?ce.cmdState[ce.cmdState.length-1]:null}function Le(ce){var z=ce.cmdState.pop();z&&z.closeBracket()}function he(ce){for(var z=ce.cmdState,ee=z.length-1;ee>=0;ee--){var oe=z[ee];if(oe.name!="DEFAULT")return oe}return{styleIdentifier:function(){return null}}}function ye(ce,z,ee){return function(){this.name=ce,this.bracketNo=0,this.style=z,this.styles=ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var xe={};xe.importmodule=ye("importmodule","tag",["string","builtin"]),xe.documentclass=ye("documentclass","tag",["","atom"]),xe.usepackage=ye("usepackage","tag",["atom"]),xe.begin=ye("begin","tag",["atom"]),xe.end=ye("end","tag",["atom"]),xe.label=ye("label","tag",["atom"]),xe.ref=ye("ref","tag",["atom"]),xe.eqref=ye("eqref","tag",["atom"]),xe.cite=ye("cite","tag",["atom"]),xe.bibitem=ye("bibitem","tag",["atom"]),xe.Bibitem=ye("Bibitem","tag",["atom"]),xe.RBibitem=ye("RBibitem","tag",["atom"]),xe.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ge(ce,z){ce.f=z}function le(ce,z){var ee;if(ce.match(/^\\[a-zA-Z@]+/)){var oe=ce.current().slice(1);return ee=xe.hasOwnProperty(oe)?xe[oe]:xe.DEFAULT,ee=new ee,ke(z,ee),ge(z,de),ee.style}if(ce.match(/^\\[$&%#{}_]/)||ce.match(/^\\[,;!\/\\]/))return"tag";if(ce.match("\\["))return ge(z,function(se,ue){return ve(se,ue,"\\]")}),"keyword";if(ce.match("\\("))return ge(z,function(se,ue){return ve(se,ue,"\\)")}),"keyword";if(ce.match("$$"))return ge(z,function(se,ue){return ve(se,ue,"$$")}),"keyword";if(ce.match("$"))return ge(z,function(se,ue){return ve(se,ue,"$")}),"keyword";var ie=ce.next();if(ie=="%")return ce.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(ee=Ce(z),ee)ee.closeBracket(ie),ge(z,de);else return"error";return"bracket"}else return ie=="{"||ie=="["?(ee=xe.DEFAULT,ee=new ee,ke(z,ee),"bracket"):/\d/.test(ie)?(ce.eatWhile(/[\w.%]/),"atom"):(ce.eatWhile(/[\w\-_]/),ee=he(z),ee.name=="begin"&&(ee.argument=ce.current()),ee.styleIdentifier())}function ve(ce,z,ee){if(ce.eatSpace())return null;if(ee&&ce.match(ee))return ge(z,le),"keyword";if(ce.match(/^\\[a-zA-Z@]+/))return"tag";if(ce.match(/^[a-zA-Z]+/))return"variable-2";if(ce.match(/^\\[$&%#{}_]/)||ce.match(/^\\[,;!\/]/)||ce.match(/^[\^_&]/))return"tag";if(ce.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ce.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var oe=ce.next();return oe=="{"||oe=="}"||oe=="["||oe=="]"||oe=="("||oe==")"?"bracket":oe=="%"?(ce.skipToEnd(),"comment"):"error"}function de(ce,z){var ee=ce.peek(),oe;return ee=="{"||ee=="["?(oe=Ce(z),oe.openBracket(ee),ce.eat(ee),ge(z,le),"bracket"):/[ \t\r]/.test(ee)?(ce.eat(ee),null):(ge(z,le),Le(z),le(ce,z))}return{startState:function(){var ce=Be.inMathMode?function(z,ee){return ve(z,ee)}:le;return{cmdState:[],f:ce}},copyState:function(ce){return{cmdState:ce.cmdState.slice(),f:ce.f}},token:function(ce,z){return z.f(ce,z)},blankLine:function(ce){ce.f=le,ce.cmdState.length=0},lineComment:"%"}}),Me.defineMIME("text/x-stex","stex"),Me.defineMIME("text/x-latex","stex")})},15525:function(_n,en,Ee){(function(Me){Me(Ee(89780))})(function(Me){"use strict";var me={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Be={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Me.defineMode("xml",function(ke,Ce){var Le=ke.indentUnit,he={},ye=Ce.htmlMode?me:Be;for(var xe in ye)he[xe]=ye[xe];for(var xe in Ce)he[xe]=Ce[xe];var ge,le;function ve(Ge,ft){function at(yt){return ft.tokenize=yt,yt(Ge,ft)}var Ct=Ge.next();if(Ct=="<")return Ge.eat("!")?Ge.eat("[")?Ge.match("CDATA[")?at(z("atom","]]>")):null:Ge.match("--")?at(z("comment","-->")):Ge.match("DOCTYPE",!0,!0)?(Ge.eatWhile(/[\w\._\-]/),at(ee(1))):null:Ge.eat("?")?(Ge.eatWhile(/[\w\._\-]/),ft.tokenize=z("meta","?>"),"meta"):(ge=Ge.eat("/")?"closeTag":"openTag",ft.tokenize=de,"tag bracket");if(Ct=="&"){var et;return Ge.eat("#")?Ge.eat("x")?et=Ge.eatWhile(/[a-fA-F\d]/)&&Ge.eat(";"):et=Ge.eatWhile(/[\d]/)&&Ge.eat(";"):et=Ge.eatWhile(/[\w\.\-:]/)&&Ge.eat(";"),et?"atom":"error"}else return Ge.eatWhile(/[^&<]/),null}ve.isInText=!0;function de(Ge,ft){var at=Ge.next();if(at==">"||at=="/"&&Ge.eat(">"))return ft.tokenize=ve,ge=at==">"?"endTag":"selfcloseTag","tag bracket";if(at=="=")return ge="equals",null;if(at=="<"){ft.tokenize=ve,ft.state=ue,ft.tagName=ft.tagStart=null;var Ct=ft.tokenize(Ge,ft);return Ct?Ct+" tag error":"tag error"}else return/[\'\"]/.test(at)?(ft.tokenize=ce(at),ft.stringStartCol=Ge.column(),ft.tokenize(Ge,ft)):(Ge.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ce(Ge){var ft=function(at,Ct){for(;!at.eol();)if(at.next()==Ge){Ct.tokenize=de;break}return"string"};return ft.isInAttribute=!0,ft}function z(Ge,ft){return function(at,Ct){for(;!at.eol();){if(at.match(ft)){Ct.tokenize=ve;break}at.next()}return Ge}}function ee(Ge){return function(ft,at){for(var Ct;(Ct=ft.next())!=null;){if(Ct=="<")return at.tokenize=ee(Ge+1),at.tokenize(ft,at);if(Ct==">")if(Ge==1){at.tokenize=ve;break}else return at.tokenize=ee(Ge-1),at.tokenize(ft,at)}return"meta"}}function oe(Ge,ft,at){this.prev=Ge.context,this.tagName=ft,this.indent=Ge.indented,this.startOfLine=at,(he.doNotIndent.hasOwnProperty(ft)||Ge.context&&Ge.context.noIndent)&&(this.noIndent=!0)}function ie(Ge){Ge.context&&(Ge.context=Ge.context.prev)}function se(Ge,ft){for(var at;;){if(!Ge.context||(at=Ge.context.tagName,!he.contextGrabbers.hasOwnProperty(at)||!he.contextGrabbers[at].hasOwnProperty(ft)))return;ie(Ge)}}function ue(Ge,ft,at){return Ge=="openTag"?(at.tagStart=ft.column(),Se):Ge=="closeTag"?we:ue}function Se(Ge,ft,at){return Ge=="word"?(at.tagName=ft.current(),le="tag",De):he.allowMissingTagName&&Ge=="endTag"?(le="tag bracket",De(Ge,ft,at)):(le="error",Se)}function we(Ge,ft,at){if(Ge=="word"){var Ct=ft.current();return at.context&&at.context.tagName!=Ct&&he.implicitlyClosed.hasOwnProperty(at.context.tagName)&&ie(at),at.context&&at.context.tagName==Ct||he.matchClosing===!1?(le="tag",Pe):(le="tag error",Ae)}else return he.allowMissingTagName&&Ge=="endTag"?(le="tag bracket",Pe(Ge,ft,at)):(le="error",Ae)}function Pe(Ge,ft,at){return Ge!="endTag"?(le="error",Pe):(ie(at),ue)}function Ae(Ge,ft,at){return le="error",Pe(Ge,ft,at)}function De(Ge,ft,at){if(Ge=="word")return le="attribute",ze;if(Ge=="endTag"||Ge=="selfcloseTag"){var Ct=at.tagName,et=at.tagStart;return at.tagName=at.tagStart=null,Ge=="selfcloseTag"||he.autoSelfClosers.hasOwnProperty(Ct)?se(at,Ct):(se(at,Ct),at.context=new oe(at,Ct,et==at.indented)),ue}return le="error",De}function ze(Ge,ft,at){return Ge=="equals"?Ze:(he.allowMissing||(le="error"),De(Ge,ft,at))}function Ze(Ge,ft,at){return Ge=="string"?Xe:Ge=="word"&&he.allowUnquoted?(le="string",De):(le="error",De(Ge,ft,at))}function Xe(Ge,ft,at){return Ge=="string"?Xe:De(Ge,ft,at)}return{startState:function(Ge){var ft={tokenize:ve,state:ue,indented:Ge||0,tagName:null,tagStart:null,context:null};return Ge!=null&&(ft.baseIndent=Ge),ft},token:function(Ge,ft){if(!ft.tagName&&Ge.sol()&&(ft.indented=Ge.indentation()),Ge.eatSpace())return null;ge=null;var at=ft.tokenize(Ge,ft);return(at||ge)&&at!="comment"&&(le=null,ft.state=ft.state(ge||at,Ge,ft),le&&(at=le=="error"?at+" error":le)),at},indent:function(Ge,ft,at){var Ct=Ge.context;if(Ge.tokenize.isInAttribute)return Ge.tagStart==Ge.indented?Ge.stringStartCol+1:Ge.indented+Le;if(Ct&&Ct.noIndent)return Me.Pass;if(Ge.tokenize!=de&&Ge.tokenize!=ve)return at?at.match(/^(\s*)/)[0].length:0;if(Ge.tagName)return he.multilineTagIndentPastTag!==!1?Ge.tagStart+Ge.tagName.length+2:Ge.tagStart+Le*(he.multilineTagIndentFactor||1);if(he.alignCDATA&&/<!\[CDATA\[/.test(ft))return 0;var et=ft&&/^<(\/)?([\w_:\.-]*)/.exec(ft);if(et&&et[1])for(;Ct;)if(Ct.tagName==et[2]){Ct=Ct.prev;break}else if(he.implicitlyClosed.hasOwnProperty(Ct.tagName))Ct=Ct.prev;else break;else if(et)for(;Ct;){var yt=he.contextGrabbers[Ct.tagName];if(yt&&yt.hasOwnProperty(et[2]))Ct=Ct.prev;else break}for(;Ct&&Ct.prev&&!Ct.startOfLine;)Ct=Ct.prev;return Ct?Ct.indent+Le:Ge.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:he.htmlMode?"html":"xml",helperType:he.htmlMode?"html":"xml",skipAttribute:function(Ge){Ge.state==Ze&&(Ge.state=De)},xmlCurrentTag:function(Ge){return Ge.tagName?{name:Ge.tagName,close:Ge.type=="closeTag"}:null},xmlCurrentContext:function(Ge){for(var ft=[],at=Ge.context;at;at=at.prev)at.tagName&&ft.push(at.tagName);return ft.reverse()}}}),Me.defineMIME("text/xml","xml"),Me.defineMIME("application/xml","xml"),Me.mimeModes.hasOwnProperty("text/html")||Me.defineMIME("text/html",{name:"xml",htmlMode:!0})})},3867:function(_n,en,Ee){var Me=Ee(97671);(function(me,Be){_n.exports=Be()})(this,function(){"use strict";function me(Ie){var We=typeof Ie;return Ie!==null&&(We==="object"||We==="function")}function Be(Ie){return typeof Ie=="function"}var ke=void 0;Array.isArray?ke=Array.isArray:ke=function(Ie){return Object.prototype.toString.call(Ie)==="[object Array]"};var Ce=ke,Le=0,he=void 0,ye=void 0,xe=function(We,Oe){we[Le]=We,we[Le+1]=Oe,Le+=2,Le===2&&(ye?ye(Pe):De())};function ge(Ie){ye=Ie}function le(Ie){xe=Ie}var ve=typeof window!="undefined"?window:void 0,de=ve||{},ce=de.MutationObserver||de.WebKitMutationObserver,z=typeof self=="undefined"&&typeof Me!="undefined"&&{}.toString.call(Me)==="[object process]",ee=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function oe(){return function(){return Me.nextTick(Pe)}}function ie(){return typeof he!="undefined"?function(){he(Pe)}:Se()}function se(){var Ie=0,We=new ce(Pe),Oe=document.createTextNode("");return We.observe(Oe,{characterData:!0}),function(){Oe.data=Ie=++Ie%2}}function ue(){var Ie=new MessageChannel;return Ie.port1.onmessage=Pe,function(){return Ie.port2.postMessage(0)}}function Se(){var Ie=setTimeout;return function(){return Ie(Pe,1)}}var we=new Array(1e3);function Pe(){for(var Ie=0;Ie<Le;Ie+=2){var We=we[Ie],Oe=we[Ie+1];We(Oe),we[Ie]=void 0,we[Ie+1]=void 0}Le=0}function Ae(){try{var Ie=Function("return this")().require("vertx");return he=Ie.runOnLoop||Ie.runOnContext,ie()}catch(We){return Se()}}var De=void 0;z?De=oe():ce?De=se():ee?De=ue():ve===void 0?De=Ae():De=Se();function ze(Ie,We){var Oe=this,be=new this.constructor(Ge);be[Xe]===void 0&&Kt(be);var Ne=Oe._state;if(Ne){var $e=arguments[Ne-1];xe(function(){return hn(Ne,be,$e,Oe._result)})}else Ft(Oe,be,Ie,We);return be}function Ze(Ie){var We=this;if(Ie&&typeof Ie=="object"&&Ie.constructor===We)return Ie;var Oe=new We(Ge);return ut(Oe,Ie),Oe}var Xe=Math.random().toString(36).substring(2);function Ge(){}var ft=void 0,at=1,Ct=2;function et(){return new TypeError("You cannot resolve a promise with itself")}function yt(){return new TypeError("A promises callback cannot return that same promise.")}function st(Ie,We,Oe,be){try{Ie.call(We,Oe,be)}catch(Ne){return Ne}}function zt(Ie,We,Oe){xe(function(be){var Ne=!1,$e=st(Oe,We,function(dt){Ne||(Ne=!0,We!==dt?ut(be,dt):Pt(be,dt))},function(dt){Ne||(Ne=!0,gt(be,dt))},"Settle: "+(be._label||" unknown promise"));!Ne&&$e&&(Ne=!0,gt(be,$e))},Ie)}function lt(Ie,We){We._state===at?Pt(Ie,We._result):We._state===Ct?gt(Ie,We._result):Ft(We,void 0,function(Oe){return ut(Ie,Oe)},function(Oe){return gt(Ie,Oe)})}function tt(Ie,We,Oe){We.constructor===Ie.constructor&&Oe===ze&&We.constructor.resolve===Ze?lt(Ie,We):Oe===void 0?Pt(Ie,We):Be(Oe)?zt(Ie,We,Oe):Pt(Ie,We)}function ut(Ie,We){if(Ie===We)gt(Ie,et());else if(me(We)){var Oe=void 0;try{Oe=We.then}catch(be){gt(Ie,be);return}tt(Ie,We,Oe)}else Pt(Ie,We)}function mt(Ie){Ie._onerror&&Ie._onerror(Ie._result),Ht(Ie)}function Pt(Ie,We){Ie._state===ft&&(Ie._result=We,Ie._state=at,Ie._subscribers.length!==0&&xe(Ht,Ie))}function gt(Ie,We){Ie._state===ft&&(Ie._state=Ct,Ie._result=We,xe(mt,Ie))}function Ft(Ie,We,Oe,be){var Ne=Ie._subscribers,$e=Ne.length;Ie._onerror=null,Ne[$e]=We,Ne[$e+at]=Oe,Ne[$e+Ct]=be,$e===0&&Ie._state&&xe(Ht,Ie)}function Ht(Ie){var We=Ie._subscribers,Oe=Ie._state;if(We.length!==0){for(var be=void 0,Ne=void 0,$e=Ie._result,dt=0;dt<We.length;dt+=3)be=We[dt],Ne=We[dt+Oe],be?hn(Oe,be,Ne,$e):Ne($e);Ie._subscribers.length=0}}function hn(Ie,We,Oe,be){var Ne=Be(Oe),$e=void 0,dt=void 0,Je=!0;if(Ne){try{$e=Oe(be)}catch(At){Je=!1,dt=At}if(We===$e){gt(We,yt());return}}else $e=be;We._state!==ft||(Ne&&Je?ut(We,$e):Je===!1?gt(We,dt):Ie===at?Pt(We,$e):Ie===Ct&>(We,$e))}function Qt(Ie,We){try{We(function(be){ut(Ie,be)},function(be){gt(Ie,be)})}catch(Oe){gt(Ie,Oe)}}var bn=0;function Wt(){return bn++}function Kt(Ie){Ie[Xe]=bn++,Ie._state=void 0,Ie._result=void 0,Ie._subscribers=[]}function Jt(){return new Error("Array Methods must be provided an Array")}var Yt=function(){function Ie(We,Oe){this._instanceConstructor=We,this.promise=new We(Ge),this.promise[Xe]||Kt(this.promise),Ce(Oe)?(this.length=Oe.length,this._remaining=Oe.length,this._result=new Array(this.length),this.length===0?Pt(this.promise,this._result):(this.length=this.length||0,this._enumerate(Oe),this._remaining===0&&Pt(this.promise,this._result))):gt(this.promise,Jt())}return Ie.prototype._enumerate=function(Oe){for(var be=0;this._state===ft&&be<Oe.length;be++)this._eachEntry(Oe[be],be)},Ie.prototype._eachEntry=function(Oe,be){var Ne=this._instanceConstructor,$e=Ne.resolve;if($e===Ze){var dt=void 0,Je=void 0,At=!1;try{dt=Oe.then}catch(pn){At=!0,Je=pn}if(dt===ze&&Oe._state!==ft)this._settledAt(Oe._state,be,Oe._result);else if(typeof dt!="function")this._remaining--,this._result[be]=Oe;else if(Ne===nt){var tn=new Ne(Ge);At?gt(tn,Je):tt(tn,Oe,dt),this._willSettleAt(tn,be)}else this._willSettleAt(new Ne(function(pn){return pn(Oe)}),be)}else this._willSettleAt($e(Oe),be)},Ie.prototype._settledAt=function(Oe,be,Ne){var $e=this.promise;$e._state===ft&&(this._remaining--,Oe===Ct?gt($e,Ne):this._result[be]=Ne),this._remaining===0&&Pt($e,this._result)},Ie.prototype._willSettleAt=function(Oe,be){var Ne=this;Ft(Oe,void 0,function($e){return Ne._settledAt(at,be,$e)},function($e){return Ne._settledAt(Ct,be,$e)})},Ie}();function kt(Ie){return new Yt(this,Ie).promise}function pt(Ie){var We=this;return Ce(Ie)?new We(function(Oe,be){for(var Ne=Ie.length,$e=0;$e<Ne;$e++)We.resolve(Ie[$e]).then(Oe,be)}):new We(function(Oe,be){return be(new TypeError("You must pass an array to race."))})}function Bt(Ie){var We=this,Oe=new We(Ge);return gt(Oe,Ie),Oe}function xt(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function vt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var nt=function(){function Ie(We){this[Xe]=Wt(),this._result=this._state=void 0,this._subscribers=[],Ge!==We&&(typeof We!="function"&&xt(),this instanceof Ie?Qt(this,We):vt())}return Ie.prototype.catch=function(Oe){return this.then(null,Oe)},Ie.prototype.finally=function(Oe){var be=this,Ne=be.constructor;return Be(Oe)?be.then(function($e){return Ne.resolve(Oe()).then(function(){return $e})},function($e){return Ne.resolve(Oe()).then(function(){throw $e})}):be.then(Oe,Oe)},Ie}();nt.prototype.then=ze,nt.all=kt,nt.race=pt,nt.resolve=Ze,nt.reject=Bt,nt._setScheduler=ge,nt._setAsap=le,nt._asap=xe;function He(){var Ie=void 0;if(typeof Ee.g!="undefined")Ie=Ee.g;else if(typeof self!="undefined")Ie=self;else try{Ie=Function("return this")()}catch(be){throw new Error("polyfill failed because global object is unavailable in this environment")}var We=Ie.Promise;if(We){var Oe=null;try{Oe=Object.prototype.toString.call(We.resolve())}catch(be){}if(Oe==="[object Promise]"&&!We.cast)return}Ie.Promise=nt}return nt.polyfill=He,nt.Promise=nt,nt})},86204:function(_n){"use strict";var en=typeof Reflect=="object"?Reflect:null,Ee=en&&typeof en.apply=="function"?en.apply:function(ue,Se,we){return Function.prototype.apply.call(ue,Se,we)},Me;en&&typeof en.ownKeys=="function"?Me=en.ownKeys:Object.getOwnPropertySymbols?Me=function(ue){return Object.getOwnPropertyNames(ue).concat(Object.getOwnPropertySymbols(ue))}:Me=function(ue){return Object.getOwnPropertyNames(ue)};function me(se){console&&console.warn&&console.warn(se)}var Be=Number.isNaN||function(ue){return ue!==ue};function ke(){ke.init.call(this)}_n.exports=ke,_n.exports.once=ee,ke.EventEmitter=ke,ke.prototype._events=void 0,ke.prototype._eventsCount=0,ke.prototype._maxListeners=void 0;var Ce=10;function Le(se){if(typeof se!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof se)}Object.defineProperty(ke,"defaultMaxListeners",{enumerable:!0,get:function(){return Ce},set:function(se){if(typeof se!="number"||se<0||Be(se))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+se+".");Ce=se}}),ke.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},ke.prototype.setMaxListeners=function(ue){if(typeof ue!="number"||ue<0||Be(ue))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+ue+".");return this._maxListeners=ue,this};function he(se){return se._maxListeners===void 0?ke.defaultMaxListeners:se._maxListeners}ke.prototype.getMaxListeners=function(){return he(this)},ke.prototype.emit=function(ue){for(var Se=[],we=1;we<arguments.length;we++)Se.push(arguments[we]);var Pe=ue==="error",Ae=this._events;if(Ae!==void 0)Pe=Pe&&Ae.error===void 0;else if(!Pe)return!1;if(Pe){var De;if(Se.length>0&&(De=Se[0]),De instanceof Error)throw De;var ze=new Error("Unhandled error."+(De?" ("+De.message+")":""));throw ze.context=De,ze}var Ze=Ae[ue];if(Ze===void 0)return!1;if(typeof Ze=="function")Ee(Ze,this,Se);else for(var Xe=Ze.length,Ge=de(Ze,Xe),we=0;we<Xe;++we)Ee(Ge[we],this,Se);return!0};function ye(se,ue,Se,we){var Pe,Ae,De;if(Le(Se),Ae=se._events,Ae===void 0?(Ae=se._events=Object.create(null),se._eventsCount=0):(Ae.newListener!==void 0&&(se.emit("newListener",ue,Se.listener?Se.listener:Se),Ae=se._events),De=Ae[ue]),De===void 0)De=Ae[ue]=Se,++se._eventsCount;else if(typeof De=="function"?De=Ae[ue]=we?[Se,De]:[De,Se]:we?De.unshift(Se):De.push(Se),Pe=he(se),Pe>0&&De.length>Pe&&!De.warned){De.warned=!0;var ze=new Error("Possible EventEmitter memory leak detected. "+De.length+" "+String(ue)+" listeners added. Use emitter.setMaxListeners() to increase limit");ze.name="MaxListenersExceededWarning",ze.emitter=se,ze.type=ue,ze.count=De.length,me(ze)}return se}ke.prototype.addListener=function(ue,Se){return ye(this,ue,Se,!1)},ke.prototype.on=ke.prototype.addListener,ke.prototype.prependListener=function(ue,Se){return ye(this,ue,Se,!0)};function xe(){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 ge(se,ue,Se){var we={fired:!1,wrapFn:void 0,target:se,type:ue,listener:Se},Pe=xe.bind(we);return Pe.listener=Se,we.wrapFn=Pe,Pe}ke.prototype.once=function(ue,Se){return Le(Se),this.on(ue,ge(this,ue,Se)),this},ke.prototype.prependOnceListener=function(ue,Se){return Le(Se),this.prependListener(ue,ge(this,ue,Se)),this},ke.prototype.removeListener=function(ue,Se){var we,Pe,Ae,De,ze;if(Le(Se),Pe=this._events,Pe===void 0)return this;if(we=Pe[ue],we===void 0)return this;if(we===Se||we.listener===Se)--this._eventsCount===0?this._events=Object.create(null):(delete Pe[ue],Pe.removeListener&&this.emit("removeListener",ue,we.listener||Se));else if(typeof we!="function"){for(Ae=-1,De=we.length-1;De>=0;De--)if(we[De]===Se||we[De].listener===Se){ze=we[De].listener,Ae=De;break}if(Ae<0)return this;Ae===0?we.shift():ce(we,Ae),we.length===1&&(Pe[ue]=we[0]),Pe.removeListener!==void 0&&this.emit("removeListener",ue,ze||Se)}return this},ke.prototype.off=ke.prototype.removeListener,ke.prototype.removeAllListeners=function(ue){var Se,we,Pe;if(we=this._events,we===void 0)return this;if(we.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):we[ue]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete we[ue]),this;if(arguments.length===0){var Ae=Object.keys(we),De;for(Pe=0;Pe<Ae.length;++Pe)De=Ae[Pe],De!=="removeListener"&&this.removeAllListeners(De);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Se=we[ue],typeof Se=="function")this.removeListener(ue,Se);else if(Se!==void 0)for(Pe=Se.length-1;Pe>=0;Pe--)this.removeListener(ue,Se[Pe]);return this};function le(se,ue,Se){var we=se._events;if(we===void 0)return[];var Pe=we[ue];return Pe===void 0?[]:typeof Pe=="function"?Se?[Pe.listener||Pe]:[Pe]:Se?z(Pe):de(Pe,Pe.length)}ke.prototype.listeners=function(ue){return le(this,ue,!0)},ke.prototype.rawListeners=function(ue){return le(this,ue,!1)},ke.listenerCount=function(se,ue){return typeof se.listenerCount=="function"?se.listenerCount(ue):ve.call(se,ue)},ke.prototype.listenerCount=ve;function ve(se){var ue=this._events;if(ue!==void 0){var Se=ue[se];if(typeof Se=="function")return 1;if(Se!==void 0)return Se.length}return 0}ke.prototype.eventNames=function(){return this._eventsCount>0?Me(this._events):[]};function de(se,ue){for(var Se=new Array(ue),we=0;we<ue;++we)Se[we]=se[we];return Se}function ce(se,ue){for(;ue+1<se.length;ue++)se[ue]=se[ue+1];se.pop()}function z(se){for(var ue=new Array(se.length),Se=0;Se<ue.length;++Se)ue[Se]=se[Se].listener||se[Se];return ue}function ee(se,ue){return new Promise(function(Se,we){function Pe(De){se.removeListener(ue,Ae),we(De)}function Ae(){typeof se.removeListener=="function"&&se.removeListener("error",Pe),Se([].slice.call(arguments))}ie(se,ue,Ae,{once:!0}),ue!=="error"&&oe(se,Pe,{once:!0})})}function oe(se,ue,Se){typeof se.on=="function"&&ie(se,"error",ue,Se)}function ie(se,ue,Se,we){if(typeof se.on=="function")we.once?se.once(ue,Se):se.on(ue,Se);else if(typeof se.addEventListener=="function")se.addEventListener(ue,function Pe(Ae){we.once&&se.removeEventListener(ue,Pe),Se(Ae)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof se)}},12378:function(_n,en,Ee){"use strict";Ee.d(en,{$u:function(){return xe},BD:function(){return Yt},E9:function(){return ye},FF:function(){return Fr},FJ:function(){return ue},Hn:function(){return se},KX:function(){return we},NB:function(){return Oe},S0:function(){return Wt},UL:function(){return ge},Vk:function(){return ie},Vm:function(){return Ne},YI:function(){return Kt},ZA:function(){return Be},Zt:function(){return le},al:function(){return vt},bn:function(){return xt},bx:function(){return kt},g2:function(){return Jt},h1:function(){return Ze},hD:function(){return qn},l4:function(){return Le},rU:function(){return be},s_:function(){return pt},uz:function(){return We},z6:function(){return ve}}),_n=Ee.hmd(_n),function(){var rt;function Ir(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Ar(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Ir(a)}}function $r(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var co=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},mo;if(typeof Object.setPrototypeOf=="function")mo=Object.setPrototypeOf;else{var no;e:{var lo={a:!0},ri={};try{ri.__proto__=lo,no=ri.a;break e}catch(a){}no=!1}mo=no?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ke=mo;function qe(a,y){if(a.prototype=co(y.prototype),a.prototype.constructor=a,Ke)Ke(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var Ye=typeof Ee.g!="undefined"&&Ee.g!=null?Ee.g:self,St=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var b=arguments[x];if(b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(a[E]=b[E])}return a},Ot=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Tt(a,y){if(y){var x=Ye;a=a.split(".");for(var b=0;b<a.length-1;b++){var E=a[b];E in x||(x[E]={}),x=x[E]}a=a[a.length-1],b=x[a],y=y(b),y!=b&&y!=null&&Ot(x,a,{writable:!0,value:y})}}Tt("Object.assign",function(a){return a||St}),Tt("Array.prototype.fill",function(a){return a||function(y,x,b){var E=this.length||0;for(0>x&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x<b;x++)this[x]=y;return this}});var _t=typeof globalThis=="object"&&globalThis||typeof Ee.g=="object"&&Ee.g.global===Ee.g&&Ee.g||typeof self=="object"&&self.self===self&&self||{};_t.requestAnimationFrame===void 0&&(_t.setImmediate===void 0?_t.requestAnimationFrame=function(a){_t.setTimeout(a,0)}:_t.requestAnimationFrame=_t.setImmediate);function dn(){}function Pn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&_t.clearTimeout(x),x=mn(function(){x=-1,a.apply(b,E)},y)}}function mn(a,y){return _t.setTimeout(a,y)}function sn(a){return _t.document.createElement(a)}function Nt(a){throw Error(a)}function un(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Nt(a)}function Ln(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),Nt(x+" is not in the range "+y+": "+a)}function Dn(a){_t.console&&_t.console.log(a)}function $t(a){return typeof a=="object"&&a!==null}function rn(a){return Array.isArray(a)||_t.NodeList&&a instanceof _t.NodeList||_t.HTMLCollection&&a instanceof _t.HTMLCollection}function jn(a){return Array.prototype.slice.call(a)}function On(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Nt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function ei(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Nt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Gn(){var a=zi.pop();return a===void 0?[]:a}function ti(a){a.length=0,zi.push(a)}function Bn(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if($t(a)&&a.constructor)return Bn(a.constructor);return typeof a}function li(a){var y=a;return $t(a)&&(a.text?y=a.text:a.name?y=a.name:a.key!==void 0?y=a.key:a.id!==void 0?y=a.id:a.constructor===Object&&(a.Text?y=a.Text:a.Name?y=a.Name:a.Key!==void 0?y=a.Key:a.Id!==void 0?y=a.Id:a.ID!==void 0&&(y=a.ID))),y===void 0?"undefined":y===null?"null":y.toString()}function Di(a,y){if(a.hasOwnProperty(y))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(y))return!0;var x=a.CA;if(x&&x[y])return!0;a=Object.getPrototypeOf(a)}return!1}function Ri(a,y,x){Object.defineProperty(Wo.prototype,a,{get:y,set:x})}function Mn(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var b=0,E=0;E<a.length;E+=2)x[b++]=y[a.substr(E,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var te="",ne=0;ne<a.length;ne++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,te+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[b])%256]);return te.indexOf("GoJS 2.1 evaluation")>-1||te.indexOf("\xA9 1998-2021 Northwoods Software")>-1||te.indexOf("Not for distribution or production use")>-1||te.indexOf("gojs.net")>-1?"":te}var Xi=_t.navigator!==void 0&&0<_t.navigator.userAgent.indexOf("Trident/7"),Nr=_t.navigator!==void 0&&_t.navigator.platform!==void 0&&_t.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,zi=[];Object.freeze([]),dn.className="Util",dn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",dn.adym="gojs.net",dn.vfo="28e645fdb266",dn.className="Util";function En(a,y,x){vr(this),this.j=a,this.xa=y,this.o=x}En.prototype.toString=function(){return"EnumValue."+this.xa};function Jn(a,y){return y==null||y===""?null:a[y]}Ye.Object.defineProperties(En.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),En.className="EnumValue";function fi(){this.ew=[]}fi.prototype.toString=function(){return this.ew.join("")},fi.prototype.add=function(a){a!==""&&this.ew.push(a)},fi.className="StringBuilder";function Si(){}Si.className="PropertyCollection";var hi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){_t.console&&_t.console.log(a)},HA:function(a,y,x,b){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var te=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);te.get!==void 0&&te.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,ae){return function(){throw Error("Property "+ne.Zl[ae.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Oi(){}Oi.prototype.reset=function(){},Oi.prototype.next=function(){return!1},Oi.prototype.Ad=function(){return!1},Oi.prototype.first=function(){return null},Oi.prototype.any=function(){return!1},Oi.prototype.all=function(){return!0},Oi.prototype.each=function(){return this},Oi.prototype.map=function(){return this},Oi.prototype.filter=function(){return this},Oi.prototype.de=function(){},Oi.prototype.toString=function(){return"EmptyIterator"},Ye.Object.defineProperties(Oi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Oi.prototype.first=Oi.prototype.first,Oi.prototype.hasNext=Oi.prototype.Ad,Oi.prototype.next=Oi.prototype.next,Oi.prototype.reset=Oi.prototype.reset;var tr=null;Oi.className="EmptyIterator",tr=new Oi;function Fi(a){this.key=-1,this.value=a}Fi.prototype.reset=function(){this.key=-1},Fi.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Fi.prototype.Ad=function(){return this.next()},Fi.prototype.first=function(){return this.key=0,this.value},Fi.prototype.any=function(a){return this.key=-1,a(this.value)},Fi.prototype.all=function(a){return this.key=-1,a(this.value)},Fi.prototype.each=function(a){return this.key=-1,a(this.value),this},Fi.prototype.map=function(a){return new Fi(a(this.value))},Fi.prototype.filter=function(a){return a(this.value)?new Fi(this.value):tr},Fi.prototype.de=function(){this.value=null},Fi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ye.Object.defineProperties(Fi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Fi.prototype.first=Fi.prototype.first,Fi.prototype.hasNext=Fi.prototype.Ad,Fi.prototype.next=Fi.prototype.next,Fi.prototype.reset=Fi.prototype.reset,Fi.className="SingletonIterator";function Hi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Hi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Hi.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},Hi.prototype.Ad=function(){return this.next()},Hi.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},Hi.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&a(te))return!0}return!1},Hi.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&!a(te))return!1}return!0},Hi.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];(b===null||b(te))&&a(te)}return this},Hi.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&x.push(a(ne))}return a=new Rn,a.s=x,a.xb(),a.iterator},Hi.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new Rn,a.s=x,a.xb(),a.iterator},Hi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Hi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ye.Object.defineProperties(Hi.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),Hi.prototype.first=Hi.prototype.first,Hi.prototype.hasNext=Hi.prototype.Ad,Hi.prototype.next=Hi.prototype.next,Hi.prototype.reset=Hi.prototype.reset,Hi.className="ListIterator";function mr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}mr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},mr.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},mr.prototype.Ad=function(){return this.next()},mr.prototype.first=function(){var a=this.Bb;this.qa=a.Ja;var y=a.s;return this.Za=a=y.length-1,0<=a?(y=y[a],this.key=a,this.value=y):null},mr.prototype.any=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(a(y[x]))return!0;return!1},mr.prototype.all=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(!a(y[x]))return!1;return!0},mr.prototype.each=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)a(y[x]);return this},mr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new Rn,a.s=x,a.xb(),a.iterator},mr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new Rn,a.s=x,a.xb(),a.iterator},mr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},mr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ye.Object.defineProperties(mr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),mr.prototype.first=mr.prototype.first,mr.prototype.hasNext=mr.prototype.Ad,mr.prototype.next=mr.prototype.next,mr.prototype.reset=mr.prototype.reset,mr.className="ListIteratorBackwards";function Rn(a){vr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Nt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}rt=Rn.prototype,rt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return this._isFrozen=!1,this},rt.toString=function(){return"List()#"+Dr(this)},rt.add=function(a){return a===null?this:(this._isFrozen&&un(this,a),this.s.push(a),this.xb(),this)},rt.push=function(a){this.add(a)},rt.addAll=function(a){if(a===null)return this;this._isFrozen&&un(this);var y=this.s;if(rn(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},rt.clear=function(){this._isFrozen&&un(this),this.s.length=0,this.xb()},rt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},rt.has=function(a){return this.contains(a)},rt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},rt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Ln(a,"0 <= i < length",Rn,"elt:i"),y[a]},rt.get=function(a){return this.M(a)},rt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Ln(a,"0 <= i < length",Rn,"setElt:i"),this._isFrozen&&un(this,a),x[a]=y},rt.set=function(a,y){this.cd(a,y)},rt.first=function(){var a=this.s;return a.length===0?null:a[0]},rt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},rt.pop=function(){this._isFrozen&&un(this);var a=this.s;return 0<a.length?a.pop():null},Rn.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},Rn.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},Rn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Rn.prototype.map=function(a){for(var y=new Rn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},Rn.prototype.filter=function(a){for(var y=new Rn,x=[],b=this.s,E=b.length,te=0;te<E;te++){var ne=b[te];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},rt=Rn.prototype,rt.Gb=function(a,y){0>a&&Ln(a,">= 0",Rn,"insertAt:i"),this._isFrozen&&un(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},rt.remove=function(a){if(a===null)return!1;this._isFrozen&&un(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},rt.delete=function(a){return this.remove(a)},rt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Ln(a,"0 <= i < length",Rn,"removeAt:i"),this._isFrozen&&un(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},rt.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&un(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},Rn.prototype.copy=function(){var a=new Rn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},rt=Rn.prototype,rt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},rt.Iv=function(){for(var a=new Nn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},rt.sort=function(a){return this._isFrozen&&un(this),this.s.sort(a),this.xb(),this},rt.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&un(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&Ln(y,"0 <= from < length",Rn,"sortRange:from"),te===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},rt.reverse=function(){return this._isFrozen&&un(this),this.s.reverse(),this.xb(),this},Ye.Object.defineProperties(Rn.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return tr;var a=this.Sa;return a!==null?(a.reset(),a):new Hi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return tr;var a=this.Hg;return a!==null?(a.reset(),a):new mr(this)}}}),Rn.prototype.reverse=Rn.prototype.reverse,Rn.prototype.sortRange=Rn.prototype.zi,Rn.prototype.sort=Rn.prototype.sort,Rn.prototype.toSet=Rn.prototype.Iv,Rn.prototype.toArray=Rn.prototype.Fa,Rn.prototype.removeRange=Rn.prototype.removeRange,Rn.prototype.removeAt=Rn.prototype.mb,Rn.prototype.delete=Rn.prototype.delete,Rn.prototype.remove=Rn.prototype.remove,Rn.prototype.insertAt=Rn.prototype.Gb,Rn.prototype.pop=Rn.prototype.pop,Rn.prototype.last=Rn.prototype.jc,Rn.prototype.first=Rn.prototype.first,Rn.prototype.set=Rn.prototype.set,Rn.prototype.setElt=Rn.prototype.cd,Rn.prototype.get=Rn.prototype.get,Rn.prototype.elt=Rn.prototype.M,Rn.prototype.indexOf=Rn.prototype.indexOf,Rn.prototype.has=Rn.prototype.has,Rn.prototype.contains=Rn.prototype.contains,Rn.prototype.clear=Rn.prototype.clear,Rn.prototype.addAll=Rn.prototype.addAll,Rn.prototype.push=Rn.prototype.push,Rn.prototype.add=Rn.prototype.add,Rn.prototype.thaw=Rn.prototype.ka,Rn.prototype.freeze=Rn.prototype.freeze,Rn.className="List";function Br(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Br.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Br.prototype.next=function(){var a=this.eg;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Br.prototype.Ad=function(){return this.next()},Br.prototype.first=function(){var a=this.eg;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Br.prototype.any=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Br.prototype.all=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Br.prototype.each=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Br.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Rn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Br.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Rn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Br.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Br.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ye.Object.defineProperties(Br.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Br.prototype.first=Br.prototype.first,Br.prototype.hasNext=Br.prototype.Ad,Br.prototype.next=Br.prototype.next,Br.prototype.reset=Br.prototype.reset,Br.className="SetIterator";function Nn(a){vr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Nt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}rt=Nn.prototype,rt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return this._isFrozen=!1,this},rt.toString=function(){return"Set()#"+Dr(this)},rt.add=function(a){if(a===null)return this;this._isFrozen&&un(this,a);var y=a;return $t(a)&&(y=So(a)),this.Tb[y]===void 0&&(this.Sb++,a=new hr(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},rt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&un(this),rn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},rt.contains=function(a){if(a===null)return!1;var y=a;return $t(a)&&(y=Dr(a),y===void 0)?!1:this.Tb[y]!==void 0},rt.has=function(a){return this.contains(a)},rt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},rt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},rt.first=function(){var a=this.ea;return a===null?null:a.value},Nn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Nn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Nn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Nn.prototype.map=function(a){for(var y=new Nn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Nn.prototype.filter=function(a){for(var y=new Nn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},rt=Nn.prototype,rt.remove=function(a){if(a===null)return!1;this._isFrozen&&un(this,a);var y=a;if($t(a)&&(y=Dr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},rt.delete=function(a){return this.remove(a)},rt.hp=function(a){if(a===null)return this;if(this._isFrozen&&un(this),rn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},rt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&un(this);var y=new Nn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},rt.clear=function(){this._isFrozen&&un(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Nn.prototype.copy=function(){var a=new Nn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Nn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},Nn.prototype.Hv=function(){var a=new Rn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function vr(a){a.__gohashid=Co++}function So(a){var y=a.__gohashid;return y===void 0&&(y=Co++,a.__gohashid=y),y}function Dr(a){return a.__gohashid}Ye.Object.defineProperties(Nn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return tr;var a=this.Sa;return a!==null?(a.reset(),a):new Br(this)}}}),Nn.prototype.toList=Nn.prototype.Hv,Nn.prototype.toArray=Nn.prototype.Fa,Nn.prototype.clear=Nn.prototype.clear,Nn.prototype.retainAll=Nn.prototype.pA,Nn.prototype.removeAll=Nn.prototype.hp,Nn.prototype.delete=Nn.prototype.delete,Nn.prototype.remove=Nn.prototype.remove,Nn.prototype.first=Nn.prototype.first,Nn.prototype.containsAny=Nn.prototype.Ty,Nn.prototype.containsAll=Nn.prototype.Sy,Nn.prototype.has=Nn.prototype.has,Nn.prototype.contains=Nn.prototype.contains,Nn.prototype.addAll=Nn.prototype.addAll,Nn.prototype.add=Nn.prototype.add,Nn.prototype.thaw=Nn.prototype.ka,Nn.prototype.freeze=Nn.prototype.freeze;var Co=1;Nn.className="Set",Nn.uniqueHash=vr,Nn.hashIdUnique=So,Nn.hashId=Dr;function ho(a){this.ma=a,this.qa=a.Ja,this.sa=null}ho.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ho.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},ho.prototype.Ad=function(){return this.next()},ho.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},ho.prototype.any=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},ho.prototype.all=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},ho.prototype.each=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;)a(y.key),y=y.va;return this},ho.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Rn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ho.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Rn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},ho.prototype.de=function(){this.value=this.key=null,this.qa=-1},ho.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ye.Object.defineProperties(ho.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ho.prototype.first=ho.prototype.first,ho.prototype.hasNext=ho.prototype.Ad,ho.prototype.next=ho.prototype.next,ho.prototype.reset=ho.prototype.reset,ho.className="MapKeySetIterator";function Yi(a){Nn.call(this),vr(this),this._isFrozen=!0,this.ma=a}qe(Yi,Nn),rt=Yi.prototype,rt.freeze=function(){return this},rt.ka=function(){return this},rt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},rt.add=function(){Nt("This Set is read-only: "+this.toString())},rt.contains=function(a){return this.ma.contains(a)},rt.has=function(a){return this.contains(a)},rt.remove=function(){Nt("This Set is read-only: "+this.toString())},rt.delete=function(a){return this.remove(a)},rt.clear=function(){Nt("This Set is read-only: "+this.toString())},rt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Yi.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Yi.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Yi.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Yi.prototype.map=function(a){for(var y=new Nn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Yi.prototype.filter=function(a){for(var y=new Nn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Yi.prototype.copy=function(){return new Yi(this.ma)},Yi.prototype.Iv=function(){var a=new Nn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Yi.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},Yi.prototype.Hv=function(){var a=new Rn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ye.Object.defineProperties(Yi.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?tr:new ho(this.ma)}}}),Yi.prototype.toList=Yi.prototype.Hv,Yi.prototype.toArray=Yi.prototype.Fa,Yi.prototype.toSet=Yi.prototype.Iv,Yi.prototype.first=Yi.prototype.first,Yi.prototype.clear=Yi.prototype.clear,Yi.prototype.delete=Yi.prototype.delete,Yi.prototype.remove=Yi.prototype.remove,Yi.prototype.has=Yi.prototype.has,Yi.prototype.contains=Yi.prototype.contains,Yi.prototype.add=Yi.prototype.add,Yi.prototype.thaw=Yi.prototype.ka,Yi.prototype.freeze=Yi.prototype.freeze,Yi.className="MapKeySet";function Ui(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Ui.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Ui.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Ui.prototype.Ad=function(){return this.next()},Ui.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Ui.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Ui.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Ui.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Ui.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Rn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ui.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Rn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Ui.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Ui.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ye.Object.defineProperties(Ui.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ui.prototype.first=Ui.prototype.first,Ui.prototype.hasNext=Ui.prototype.Ad,Ui.prototype.next=Ui.prototype.next,Ui.prototype.reset=Ui.prototype.reset,Ui.className="MapValueSetIterator";function hr(a,y){this.key=a,this.value=y,this.ll=this.va=null}hr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},hr.className="KeyValuePair";function Pr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Pr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Pr.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},Pr.prototype.Ad=function(){return this.next()},Pr.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},Pr.prototype.any=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Pr.prototype.all=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Pr.prototype.each=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y),y=y.va;return this},Pr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Rn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Pr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Rn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Pr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Pr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ye.Object.defineProperties(Pr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Pr.prototype.first=Pr.prototype.first,Pr.prototype.hasNext=Pr.prototype.Ad,Pr.prototype.next=Pr.prototype.next,Pr.prototype.reset=Pr.prototype.reset,Pr.className="MapIterator";function ci(a){vr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Nt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}rt=ci.prototype,rt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return this._isFrozen=!1,this},rt.toString=function(){return"Map()#"+Dr(this)},rt.add=function(a,y){this._isFrozen&&un(this,a);var x=a;$t(a)&&(x=So(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new hr(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):b.value=y,this},rt.set=function(a,y){return this.add(a,y)},rt.addAll=function(a){if(a===null)return this;if(rn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.value)}else if(a instanceof ci)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},rt.first=function(){return this.ea},ci.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},ci.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},ci.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},ci.prototype.map=function(a){for(var y=new ci,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},ci.prototype.filter=function(a){for(var y=new ci,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},rt=ci.prototype,rt.contains=function(a){var y=a;return $t(a)&&(y=Dr(a),y===void 0)?!1:this.Tb[y]!==void 0},rt.has=function(a){return this.contains(a)},rt.I=function(a){var y=a;return $t(a)&&(y=Dr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},rt.get=function(a){return this.I(a)},rt.remove=function(a){if(a===null)return!1;this._isFrozen&&un(this,a);var y=a;if($t(a)&&(y=Dr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},rt.delete=function(a){return this.remove(a)},rt.clear=function(){this._isFrozen&&un(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},ci.prototype.copy=function(){var a=new ci,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},ci.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new hr(E.key,E.value),x++}return y},ci.prototype.Lf=function(){return new Yi(this)},Ye.Object.defineProperties(ci.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return tr;var a=this.Sa;return a!==null?(a.reset(),a):new Pr(this)}},iteratorKeys:{get:function(){return 0>=this.count?tr:new ho(this)}},iteratorValues:{get:function(){if(0>=this.count)return tr;var a=this.jf;return a!==null?(a.reset(),a):new Ui(this)}}}),ci.prototype.toKeySet=ci.prototype.Lf,ci.prototype.toArray=ci.prototype.Fa,ci.prototype.clear=ci.prototype.clear,ci.prototype.delete=ci.prototype.delete,ci.prototype.remove=ci.prototype.remove,ci.prototype.get=ci.prototype.get,ci.prototype.getValue=ci.prototype.I,ci.prototype.has=ci.prototype.has,ci.prototype.contains=ci.prototype.contains,ci.prototype.first=ci.prototype.first,ci.prototype.addAll=ci.prototype.addAll,ci.prototype.set=ci.prototype.set,ci.prototype.add=ci.prototype.add,ci.prototype.thaw=ci.prototype.ka,ci.prototype.freeze=ci.prototype.freeze,ci.className="Map";function Mt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Nt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ur,Hr,ts,Ao,ss;Mt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Mt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Mt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Mt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Mt.prototype.copy=function(){var a=new Mt;return a.x=this.x,a.y=this.y,a},rt=Mt.prototype,rt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},rt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function _r(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Mt(x,E)}return new Mt}function fr(a){return a.x.toString()+" "+a.y.toString()}rt.toString=function(){return"Point("+this.x+","+this.y+")"},rt.D=function(a){return a instanceof Mt?this.x===a.x&&this.y===a.y:!1},rt.hi=function(a,y){return this.x===a&&this.y===y},rt.Xa=function(a){return on.B(this.x,a.x)&&on.B(this.y,a.y)},rt.add=function(a){return this.x+=a.x,this.y+=a.y,this},rt.re=function(a){return this.x-=a.x,this.y-=a.y,this},rt.offset=function(a,y){return this.x+=a,this.y+=y,this},Mt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},rt=Mt.prototype,rt.scale=function(a,y){return this.x*=a,this.y*=y,this},rt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},rt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},rt.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},rt.ab=function(a){return Kr(a.x-this.x,a.y-this.y)},rt.direction=function(a,y){return Kr(a-this.x,y-this.y)};function Kr(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}rt.Ry=function(a,y){return on.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},rt.fA=function(a,y,x,b){return on.qh(a,y,x,b,this.x,this.y,this),this},rt.gA=function(a,y){return on.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},rt.uA=function(a,y,x,b){return on.No(this.x,this.y,a,y,x,b,this),this},rt.vA=function(a,y){return on.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},rt.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},rt.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},rt.transform=function(a){return a.Ga(this),this};function pr(a,y){return y.Cd(a),a}function eo(a,y,x,b,E,te){var ne=E-x,ae=te-b,fe=ne*ne+ae*ae;x-=a,b-=y;var _e=-x*ne-b*ae;return 0>=_e||_e>=fe?(ne=E-a,ae=te-y,Math.min(x*x+b*b,ne*ne+ae*ae)):(a=ne*b-ae*x,a*a/fe)}function Yo(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function sr(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}rt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Mt.alloc=function(){var a=Ki.pop();return a===void 0?new Mt:a},Mt.allocAt=function(a,y){var x=Ki.pop();return x===void 0?new Mt(a,y):(x.x=a,x.y=y,x)},Mt.free=function(a){Ki.push(a)},Mt.prototype.isReal=Mt.prototype.w,Mt.prototype.setSpot=Mt.prototype.yi,Mt.prototype.setRectSpot=Mt.prototype.xi,Mt.prototype.snapToGridPoint=Mt.prototype.vA,Mt.prototype.snapToGrid=Mt.prototype.uA,Mt.prototype.projectOntoLineSegmentPoint=Mt.prototype.gA,Mt.prototype.projectOntoLineSegment=Mt.prototype.fA,Mt.intersectingLineSegments=function(a,y,x,b,E,te,ne,ae){return on.Rl(a,y,x,b,E,te,ne,ae)},Mt.prototype.compareWithLineSegmentPoint=Mt.prototype.Ry,Mt.compareWithLineSegment=function(a,y,x,b,E,te){return on.Fl(a,y,x,b,E,te)},Mt.prototype.direction=Mt.prototype.direction,Mt.prototype.directionPoint=Mt.prototype.ab,Mt.prototype.normalize=Mt.prototype.normalize,Mt.prototype.distanceSquared=Mt.prototype.zd,Mt.prototype.distanceSquaredPoint=Mt.prototype.Bf,Mt.prototype.scale=Mt.prototype.scale,Mt.prototype.rotate=Mt.prototype.rotate,Mt.prototype.offset=Mt.prototype.offset,Mt.prototype.subtract=Mt.prototype.re,Mt.prototype.add=Mt.prototype.add,Mt.prototype.equalsApprox=Mt.prototype.Xa,Mt.prototype.equalTo=Mt.prototype.hi,Mt.prototype.equals=Mt.prototype.D,Mt.prototype.set=Mt.prototype.set,Mt.prototype.setTo=Mt.prototype.sg;var Ki=[];Mt.className="Point",Mt.parse=_r,Mt.stringify=fr,Mt.distanceLineSegmentSquared=eo,Mt.distanceSquared=Yo,Mt.direction=sr,Mt.Origin=Ur=new Mt(0,0).ja(),Mt.InfiniteTopLeft=Hr=new Mt(-1/0,-1/0).ja(),Mt.InfiniteBottomRight=ts=new Mt(1/0,1/0).ja(),Mt.SixPoint=Ao=new Mt(6,6).ja(),Mt.NoPoint=ss=new Mt(NaN,NaN).ja(),Mt.parse=_r,Mt.stringify=fr,Mt.distanceLineSegmentSquared=eo,Mt.distanceSquared=Yo,Mt.direction=sr;function Xn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):Nt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var ar,to,Ro,Bo,Xo,as,Ho;Xn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Xn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Xn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Xn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Xn.prototype.copy=function(){var a=new Xn;return a.width=this.width,a.height=this.height,a},rt=Xn.prototype,rt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},rt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ia(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Xn(x,E)}return new Xn}function _s(a){return a.width.toString()+" "+a.height.toString()}rt.toString=function(){return"Size("+this.width+","+this.height+")"},rt.D=function(a){return a instanceof Xn?this.width===a.width&&this.height===a.height:!1},rt.hi=function(a,y){return this.width===a&&this.height===y},rt.Xa=function(a){return on.B(this.width,a.width)&&on.B(this.height,a.height)},rt.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},rt.w=function(){return isFinite(this.width)&&isFinite(this.height)},Xn.alloc=function(){var a=la.pop();return a===void 0?new Xn:a},Xn.free=function(a){la.push(a)},Xn.prototype.isReal=Xn.prototype.w,Xn.prototype.inflate=Xn.prototype.Bc,Xn.prototype.equalsApprox=Xn.prototype.Xa,Xn.prototype.equalTo=Xn.prototype.hi,Xn.prototype.equals=Xn.prototype.D,Xn.prototype.set=Xn.prototype.set,Xn.prototype.setTo=Xn.prototype.sg;var la=[];Xn.className="Size",Xn.parse=ia,Xn.stringify=_s,Xn.ZeroSize=ar=new Xn(0,0).ja(),Xn.OneSize=to=new Xn(1,1).ja(),Xn.SixSize=Ro=new Xn(6,6).ja(),Xn.EightSize=Bo=new Xn(8,8).ja(),Xn.TenSize=Xo=new Xn(10,10).ja(),Xn.InfiniteSize=as=new Xn(1/0,1/0).ja(),Xn.NoSize=Ho=new Xn(NaN,NaN).ja(),Xn.parse=ia,Xn.stringify=_s;function kn(a,y,x,b){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof Mt?(x=a.x,a=a.y,y instanceof Mt?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof Xn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Nt("Incorrect second argument supplied to Rect constructor "+y)):Nt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}rt=kn.prototype,rt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},rt.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Is(a,y,x){a.width=y,a.height=x}rt.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},rt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},rt.dd=function(a){return this.x=a.x,this.y=a.y,this},rt.tA=function(a){return this.width=a.width,this.height=a.height,this},kn.prototype.copy=function(){var a=new kn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},rt=kn.prototype,rt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},rt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Pu(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;(b=a[y++])&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new kn(x,E,te,ne)}return new kn}function Ua(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}rt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},rt.D=function(a){return a instanceof kn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},rt.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},rt.Xa=function(a){return on.B(this.x,a.x)&&on.B(this.y,a.y)&&on.B(this.width,a.width)&&on.B(this.height,a.height)};function Sa(a,y){return on.$(a.x,y.x)&&on.$(a.y,y.y)&&on.$(a.width,y.width)&&on.$(a.height,y.height)}rt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},rt.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},rt.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},rt.offset=function(a,y){return this.x+=a,this.y+=y,this},rt.Bc=function(a,y){return us(this,y,a,y,a)},rt.Co=function(a){return us(this,a.top,a.right,a.bottom,a.left)},rt.Fv=function(a){return us(this,-a.top,-a.right,-a.bottom,-a.left)},rt.Hz=function(a,y,x,b){return us(this,a,y,x,b)};function us(a,y,x,b,E){var te=a.width;return x+E<=-te?(a.x+=te/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}rt.Ex=function(a){return Ws(this,a.x,a.y,a.width,a.height)},rt.Uu=function(a,y,x,b){return Ws(this,a,y,x,b)};function Ws(a,y,x,b,E){var te=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=Math.max(0,y-te),a.height=Math.max(0,x-ne),a}rt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},rt.Vu=function(a,y,x,b){var E=this.width,te=this.x;return E!==1/0&&x!==1/0&&(E+=te,x+=a,isNaN(x)||isNaN(E)||te>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function _o(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}rt.Ye=function(a){return No(this,a.x,a.y,0,0)},rt.ed=function(a){return No(this,a.x,a.y,a.width,a.height)},rt.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),No(this,a,y,x,b)};function No(a,y,x,b,E){var te=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=y-te,a.height=x-ne,a}rt.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function Lo(a,y,x,b,E,te,ne,ae){return ne===void 0&&(ne=0),ae===void 0&&(ae=0),a<=E&&E+ne<=a+x&&y<=te&&te+ae<=y+b}function ua(a,y,x,b,E,te,ne,ae){return a>ne+E||E>x+a?!1:!(y>ae+te||te>b+y)}rt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},rt.Mz=function(){return this.width===0&&this.height===0},kn.alloc=function(){var a=Yr.pop();return a===void 0?new kn:a},kn.allocAt=function(a,y,x,b){var E=Yr.pop();return E===void 0?new kn(a,y,x,b):E.h(a,y,x,b)},kn.free=function(a){Yr.push(a)},Ye.Object.defineProperties(kn.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new Mt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Xn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Mt(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),kn.prototype.isEmpty=kn.prototype.Mz,kn.prototype.isReal=kn.prototype.w,kn.intersectsLineSegment=function(a,y,x,b,E,te,ne,ae){return on.Fx(a,y,x,b,E,te,ne,ae)},kn.prototype.setSpot=kn.prototype.yi,kn.prototype.union=kn.prototype.Kv,kn.prototype.unionRect=kn.prototype.ed,kn.prototype.unionPoint=kn.prototype.Ye,kn.prototype.intersects=kn.prototype.Vu,kn.prototype.intersectsRect=kn.prototype.Yc,kn.prototype.intersect=kn.prototype.Uu,kn.prototype.intersectRect=kn.prototype.Ex,kn.prototype.grow=kn.prototype.Hz,kn.prototype.subtractMargin=kn.prototype.Fv,kn.prototype.addMargin=kn.prototype.Co,kn.prototype.inflate=kn.prototype.Bc,kn.prototype.offset=kn.prototype.offset,kn.prototype.contains=kn.prototype.contains,kn.prototype.containsRect=kn.prototype.Re,kn.prototype.containsPoint=kn.prototype.ca,kn.prototype.equalsApprox=kn.prototype.Xa,kn.prototype.equalTo=kn.prototype.hi,kn.prototype.equals=kn.prototype.D,kn.prototype.setSize=kn.prototype.tA,kn.prototype.setPoint=kn.prototype.dd,kn.prototype.set=kn.prototype.set,kn.prototype.setTo=kn.prototype.sg;var br=null,uo=null,Yr=[];kn.className="Rect",kn.parse=Pu,kn.stringify=Ua,kn.contains=Lo,kn.intersects=ua,kn.ZeroRect=br=new kn(0,0,0,0).ja(),kn.NoRect=uo=new kn(NaN,NaN,NaN,NaN).ja(),kn.parse=Pu,kn.stringify=Ua,kn.contains=Lo,kn.intersects=ua;function Li(a,y,x,b){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):Nt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Li.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Li.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Li.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Li.prototype.copy=function(){var a=new Li;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},rt=Li.prototype,rt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},rt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Es(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new Li;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Li(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Li(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Li(x,E):new Li(x,E,te,ne)}return new Li}function Ls(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}rt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},rt.D=function(a){return a instanceof Li?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},rt.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},rt.Xa=function(a){return on.B(this.top,a.top)&&on.B(this.right,a.right)&&on.B(this.bottom,a.bottom)&&on.B(this.left,a.left)},rt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Li.alloc=function(){var a=Il.pop();return a===void 0?new Li:a},Li.free=function(a){Il.push(a)},Li.prototype.isReal=Li.prototype.w,Li.prototype.equalsApprox=Li.prototype.Xa,Li.prototype.equalTo=Li.prototype.hi,Li.prototype.equals=Li.prototype.D,Li.prototype.set=Li.prototype.set,Li.prototype.setTo=Li.prototype.sg;var xa=null,xl=null,Il=[];Li.className="Margin",Li.parse=Es,Li.stringify=Ls,Li.ZeroMargin=xa=new Li(0,0,0,0).ja(),Li.TwoMargin=xl=new Li(2,2,2,2).ja(),Li.parse=Es,Li.stringify=Ls;function vi(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var ms,Xs,qa,wl,Dl,jr,nc,Ia,Ga,Na,$l,_u,Wa,Za,Uu,yc,Eu,Rl,Sc,Gu,Lu,bl,th,xc,lu,oo,Uo,ka,ra,Ds,bs,ks,Zs,Ks,Yl,Bl;vi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},vi.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},vi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},vi.prototype.copy=function(){var a=new vi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},rt=vi.prototype,rt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},rt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Rs(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function xh(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ms;if(a==="TopLeft")return Xs;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return qa;if(a==="TopRight")return wl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Dl;if(a==="Center")return jr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return nc;if(a==="BottomLeft")return Ia;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ga;if(a==="BottomRight")return Na;if(a==="TopSide")return $l;if(a==="LeftSide")return _u;if(a==="RightSide")return Wa;if(a==="BottomSide")return Za;if(a==="TopBottomSides")return Uu;if(a==="LeftRightSides")return yc;if(a==="TopLeftSides")return Eu;if(a==="TopRightSides")return Rl;if(a==="BottomLeftSides")return Sc;if(a==="BottomRightSides")return Gu;if(a==="NotTopSide")return Lu;if(a==="NotLeftSide")return bl;if(a==="NotRightSide")return th;if(a==="NotBottomSide")return xc;if(a==="AllSides")return lu;if(a==="Default")return oo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new vi(x,E,te,ne)}return new vi}function nh(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}rt.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(ms)?"None":this.D(Xs)?"TopLeft":this.D(qa)?"Top":this.D(wl)?"TopRight":this.D(Dl)?"Left":this.D(jr)?"Center":this.D(nc)?"Right":this.D(Ia)?"BottomLeft":this.D(Ga)?"Bottom":this.D(Na)?"BottomRight":this.D($l)?"TopSide":this.D(_u)?"LeftSide":this.D(Wa)?"RightSide":this.D(Za)?"BottomSide":this.D(Uu)?"TopBottomSides":this.D(yc)?"LeftRightSides":this.D(Eu)?"TopLeftSides":this.D(Rl)?"TopRightSides":this.D(Sc)?"BottomLeftSides":this.D(Gu)?"BottomRightSides":this.D(Lu)?"NotTopSide":this.D(bl)?"NotLeftSide":this.D(th)?"NotRightSide":this.D(xc)?"NotBottomSide":this.D(lu)?"AllSides":this.D(oo)?"Default":"None"},rt.D=function(a){return a instanceof vi?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},rt.gv=function(){return new vi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},rt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Uo))a=_u;else if(a.D(ka))a=Wa;else if(a.D(ra))a=$l;else if(a.D(Ds))a=Za;else return!1;return a=a.offsetY,(this.offsetY&a)===a},rt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},rt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},rt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},rt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},rt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},vi.alloc=function(){var a=wc.pop();return a===void 0?new vi:a},vi.free=function(a){wc.push(a)},vi.prototype.isDefault=vi.prototype.Xb,vi.prototype.isNone=vi.prototype.ys,vi.prototype.isSide=vi.prototype.$c,vi.prototype.isNoSpot=vi.prototype.Mc,vi.prototype.isSpot=vi.prototype.sb,vi.prototype.includesSide=vi.prototype.Hf,vi.prototype.opposite=vi.prototype.gv,vi.prototype.equals=vi.prototype.D,vi.prototype.set=vi.prototype.set,vi.prototype.setTo=vi.prototype.sg;var wc=[];vi.className="Spot",vi.parse=xh,vi.stringify=nh,vi.None=ms=Rs(new vi(0,0,0,0),0).ja(),vi.Default=oo=Rs(new vi(0,0,-1,0),-1).ja(),vi.TopLeft=Xs=new vi(0,0,0,0).ja(),vi.TopCenter=qa=new vi(.5,0,0,0).ja(),vi.TopRight=wl=new vi(1,0,0,0).ja(),vi.LeftCenter=Dl=new vi(0,.5,0,0).ja(),vi.Center=jr=new vi(.5,.5,0,0).ja(),vi.RightCenter=nc=new vi(1,.5,0,0).ja(),vi.BottomLeft=Ia=new vi(0,1,0,0).ja(),vi.BottomCenter=Ga=new vi(.5,1,0,0).ja(),vi.BottomRight=Na=new vi(1,1,0,0).ja(),vi.MiddleTop=bs=qa,vi.MiddleLeft=ks=Dl,vi.MiddleRight=Zs=nc,vi.MiddleBottom=Ks=Ga,vi.Top=ra=qa,vi.Left=Uo=Dl,vi.Right=ka=nc,vi.Bottom=Ds=Ga,vi.TopSide=$l=Rs(new vi(0,0,1,1),1).ja(),vi.LeftSide=_u=Rs(new vi(0,0,1,2),1).ja(),vi.RightSide=Wa=Rs(new vi(0,0,1,4),1).ja(),vi.BottomSide=Za=Rs(new vi(0,0,1,8),1).ja(),vi.TopBottomSides=Uu=Rs(new vi(0,0,1,9),1).ja(),vi.LeftRightSides=yc=Rs(new vi(0,0,1,6),1).ja(),vi.TopLeftSides=Eu=Rs(new vi(0,0,1,3),1).ja(),vi.TopRightSides=Rl=Rs(new vi(0,0,1,5),1).ja(),vi.BottomLeftSides=Sc=Rs(new vi(0,0,1,10),1).ja(),vi.BottomRightSides=Gu=Rs(new vi(0,0,1,12),1).ja(),vi.NotTopSide=Lu=Rs(new vi(0,0,1,14),1).ja(),vi.NotLeftSide=bl=Rs(new vi(0,0,1,13),1).ja(),vi.NotRightSide=th=Rs(new vi(0,0,1,11),1).ja(),vi.NotBottomSide=xc=Rs(new vi(0,0,1,7),1).ja(),vi.AllSides=lu=Rs(new vi(0,0,1,15),1).ja(),Yl=new vi(.156,.156).ja(),Bl=new vi(.844,.844).ja(),vi.parse=xh,vi.stringify=nh;function yr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}yr.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},yr.prototype.setTransform=function(a,y,x,b,E,te){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},yr.prototype.copy=function(){var a=new yr;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},yr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},yr.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},yr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},yr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},yr.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},yr.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,te=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*te,E=this.m12*E+this.m22*te,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},yr.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),te=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},yr.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,te=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=te,this.m22=ne,this.translate(-y,-x),this},rt=yr.prototype,rt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},rt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},rt.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},rt.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},rt.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},rt.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,te=this.m11,ne=this.m12,ae=this.m21,fe=this.m22,_e=this.dx,Te=this.dy,je=y*te+x*ae+_e,Ve=y*ne+x*fe+Te,Qe=b*te+x*ae+_e,it=b*ne+x*fe+Te;return x=y*te+E*ae+_e,y=y*ne+E*fe+Te,te=b*te+E*ae+_e,b=b*ne+E*fe+Te,E=Math.min(je,Qe),je=Math.max(je,Qe),Qe=Math.min(Ve,it),Ve=Math.max(Ve,it),E=Math.min(E,x),je=Math.max(je,x),Qe=Math.min(Qe,y),Ve=Math.max(Ve,y),E=Math.min(E,te),je=Math.max(je,te),Qe=Math.min(Qe,b),Ve=Math.max(Ve,b),a.h(E,Qe,je-E,Ve-Qe),a},yr.alloc=function(){var a=bc.pop();return a===void 0?new yr:a},yr.free=function(a){bc.push(a)},yr.prototype.transformRect=yr.prototype.pp,yr.prototype.transformPoint=yr.prototype.Ga,yr.prototype.scale=yr.prototype.scale,yr.prototype.translate=yr.prototype.translate,yr.prototype.rotate=yr.prototype.rotate,yr.prototype.invert=yr.prototype.Vj,yr.prototype.multiplyInverted=yr.prototype.bv,yr.prototype.multiply=yr.prototype.multiply,yr.prototype.reset=yr.prototype.reset,yr.prototype.isIdentity=yr.prototype.ws,yr.prototype.equals=yr.prototype.D,yr.prototype.setTransform=yr.prototype.setTransform,yr.prototype.set=yr.prototype.set;var bc=[];yr.className="Transform",yr.xF="54a702f3e53909c447824c6706603faf4c";var on={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=on.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);on.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,b,E,te,ne){if(0>=E&&(E=1e-6),a<x)var ae=a,fe=x;else ae=x,fe=a;if(y<b)var _e=y,Te=b;else _e=b,Te=y;if(a===x)return _e<=ne&&ne<=Te&&a-E<=te&&te<=a+E;if(y===b)return ae<=te&&te<=fe&&y-E<=ne&&ne<=y+E;if(fe+=E,ae-=E,ae<=te&&te<=fe&&(Te+=E,_e-=E,_e<=ne&&ne<=Te))if(fe-ae>Te-_e)if(a-x>E||x-a>E){if(te=(b-y)/(x-a)*(te-a)+y,te-E<=ne&&ne<=te+E)return!0}else return!0;else if(y-b>E||b-y>E){if(ne=(x-a)/(b-y)*(ne-y)+a,ne-E<=te&&te<=ne+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,te,ne,ae,fe,_e,Te,je){if(on.Yb(a,y,ne,ae,je,x,b)&&on.Yb(a,y,ne,ae,je,E,te))return on.Yb(a,y,ne,ae,je,_e,Te);var Ve=(a+x)/2,Qe=(y+b)/2,it=(x+E)/2,ct=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Ve+it)/2,x=(Qe+ct)/2,it=(it+E)/2,ct=(ct+te)/2;var Dt=(b+it)/2,Lt=(x+ct)/2;return on.cs(a,y,Ve,Qe,b,x,Dt,Lt,fe,_e,Te,je)||on.cs(Dt,Lt,it,ct,E,te,ne,ae,fe,_e,Te,je)},ax:function(a,y,x,b,E,te,ne,ae,fe){var _e=(x+E)/2,Te=(b+te)/2;return fe.h((((a+x)/2+_e)/2+(_e+(E+ne)/2)/2)/2,(((y+b)/2+Te)/2+(Te+(te+ae)/2)/2)/2),fe},My:function(a,y,x,b,E,te,ne,ae){var fe=(x+E)/2,_e=(b+te)/2;return sr(((a+x)/2+fe)/2,((y+b)/2+_e)/2,(fe+(E+ne)/2)/2,(_e+(te+ae)/2)/2)},Dl:function(a,y,x,b,E,te,ne,ae,fe,_e){if(on.Yb(a,y,ne,ae,fe,x,b)&&on.Yb(a,y,ne,ae,fe,E,te))No(_e,a,y,0,0),No(_e,ne,ae,0,0);else{var Te=(a+x)/2,je=(y+b)/2,Ve=(x+E)/2,Qe=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Te+Ve)/2,x=(je+Qe)/2,Ve=(Ve+E)/2,Qe=(Qe+te)/2;var it=(b+Ve)/2,ct=(x+Qe)/2;on.Dl(a,y,Te,je,b,x,it,ct,fe,_e),on.Dl(it,ct,Ve,Qe,E,te,ne,ae,fe,_e)}return _e},Qe:function(a,y,x,b,E,te,ne,ae,fe,_e){if(on.Yb(a,y,ne,ae,fe,x,b)&&on.Yb(a,y,ne,ae,fe,E,te))_e.length===0&&(_e.push(a),_e.push(y)),_e.push(ne),_e.push(ae);else{var Te=(a+x)/2,je=(y+b)/2,Ve=(x+E)/2,Qe=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Te+Ve)/2,x=(je+Qe)/2,Ve=(Ve+E)/2,Qe=(Qe+te)/2;var it=(b+Ve)/2,ct=(x+Qe)/2;on.Qe(a,y,Te,je,b,x,it,ct,fe,_e),on.Qe(it,ct,Ve,Qe,E,te,ne,ae,fe,_e)}return _e},jv:function(a,y,x,b,E,te,ne,ae,fe,_e){if(on.Yb(a,y,E,te,_e,x,b))return on.Yb(a,y,E,te,_e,ae,fe);var Te=(a+x)/2,je=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ve=(Te+x)/2,Qe=(je+b)/2;return on.jv(a,y,Te,je,Ve,Qe,ne,ae,fe,_e)||on.jv(Ve,Qe,x,b,E,te,ne,ae,fe,_e)},OA:function(a,y,x,b,E,te,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+te)/2)/2),ne},iv:function(a,y,x,b,E,te,ne,ae){if(on.Yb(a,y,E,te,ne,x,b))No(ae,a,y,0,0),No(ae,E,te,0,0);else{var fe=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Te=(fe+x)/2,je=(_e+b)/2;on.iv(a,y,fe,_e,Te,je,ne,ae),on.iv(Te,je,x,b,E,te,ne,ae)}return ae},ep:function(a,y,x,b,E,te,ne,ae){if(on.Yb(a,y,E,te,ne,x,b))ae.length===0&&(ae.push(a),ae.push(y)),ae.push(E),ae.push(te);else{var fe=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Te=(fe+x)/2,je=(_e+b)/2;on.ep(a,y,fe,_e,Te,je,ne,ae),on.ep(Te,je,x,b,E,te,ne,ae)}return ae},Eo:function(a,y,x,b,E,te,ne,ae,fe,_e,Te,je,Ve,Qe){if(on.Yb(a,y,ne,ae,Ve,x,b)&&on.Yb(a,y,ne,ae,Ve,E,te))return!on.Rl(a,y,ne,ae,fe,_e,Te,je)||(Ve=(a-ne)*(_e-je)-(y-ae)*(fe-Te),Ve===0)?!1:(Qe.h(((a*ae-y*ne)*(fe-Te)-(a-ne)*(fe*je-_e*Te))/Ve,((a*ae-y*ne)*(_e-je)-(y-ae)*(fe*je-_e*Te))/Ve),!0);var it=(a+x)/2,ct=(y+b)/2,Dt=(x+E)/2,Lt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(it+Dt)/2,x=(ct+Lt)/2,Dt=(Dt+E)/2,Lt=(Lt+te)/2;var Gt=(b+Dt)/2,Zt=(x+Lt)/2,Vt=1/0,qt=!1,yn=0,ii=0;return on.Eo(a,y,it,ct,b,x,Gt,Zt,fe,_e,Te,je,Ve,Qe)&&(a=(Qe.x-fe)*(Qe.x-fe)+(Qe.y-_e)*(Qe.y-_e),a<Vt&&(Vt=a,qt=!0,yn=Qe.x,ii=Qe.y)),on.Eo(Gt,Zt,Dt,Lt,E,te,ne,ae,fe,_e,Te,je,Ve,Qe)&&(Qe.x-fe)*(Qe.x-fe)+(Qe.y-_e)*(Qe.y-_e)<Vt&&(qt=!0,yn=Qe.x,ii=Qe.y),qt&&(Qe.x=yn,Qe.y=ii),qt},Fo:function(a,y,x,b,E,te,ne,ae,fe,_e,Te,je,Ve){var Qe=0;if(on.Yb(a,y,ne,ae,Ve,x,b)&&on.Yb(a,y,ne,ae,Ve,E,te)){if(Ve=(a-ne)*(_e-je)-(y-ae)*(fe-Te),Ve===0)return Qe;var it=((a*ae-y*ne)*(fe-Te)-(a-ne)*(fe*je-_e*Te))/Ve,ct=((a*ae-y*ne)*(_e-je)-(y-ae)*(fe*je-_e*Te))/Ve;if(it>=Te)return Qe;if((fe>Te?fe-Te:Te-fe)<(_e>je?_e-je:je-_e)){if(y<ae?(fe=y,a=ae):(fe=ae,a=y),ct<fe||ct>a)return Qe}else if(a<ne?(fe=a,a=ne):fe=ne,it<fe||it>a)return Qe;0<Ve?Qe++:0>Ve&&Qe--}else{it=(a+x)/2,ct=(y+b)/2;var Dt=(x+E)/2,Lt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(it+Dt)/2,x=(ct+Lt)/2,Dt=(Dt+E)/2,Lt=(Lt+te)/2;var Gt=(b+Dt)/2,Zt=(x+Lt)/2;Qe+=on.Fo(a,y,it,ct,b,x,Gt,Zt,fe,_e,Te,je,Ve),Qe+=on.Fo(Gt,Zt,Dt,Lt,E,te,ne,ae,fe,_e,Te,je,Ve)}return Qe},qh:function(a,y,x,b,E,te,ne){return on.$(a,x)?(y<b?(x=y,y=b):x=b,te<x?(ne.h(a,x),!1):te>y?(ne.h(a,y),!1):(ne.h(a,te),!0)):on.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(ne.h(b,y),!1):E>a?(ne.h(a,y),!1):(ne.h(E,y),!0)):(E=((a-E)*(a-x)+(y-te)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(ne.h(a,y),!1):1.000005<E?(ne.h(x,b),!1):(ne.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,te,ne,ae,fe){return on.B(a,x)&&on.B(y,b)?(fe.h(a,y),!1):on.$(E,ne)?on.$(a,x)?(on.qh(a,y,x,b,E,te,fe),!1):on.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,fe):(ae=(ae-te)/(ne-E),on.$(a,x)?(x=ae*(a-E)+te,y<b?(E=y,y=b):E=b,x<E?(fe.h(a,E),!1):x>y?(fe.h(a,y),!1):(fe.h(a,x),!0)):(ne=(b-y)/(x-a),on.$(ae,ne)?(on.qh(a,y,x,b,E,te,fe),!1):(E=(ne*a-ae*E+te-y)/(ne-ae),on.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(fe.h(b,y),!1):E>a?(fe.h(a,y),!1):(fe.h(E,y),!0)):on.qh(a,y,x,b,E,ne*(E-a)+y,fe))))},MA:function(a,y,x,b,E){return on.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,te,ne,ae,fe,_e){function Te(Dt,Lt){var Gt=(Dt-a)*(Dt-a)+(Lt-y)*(Lt-y);Gt<je&&(je=Gt,fe.h(Dt,Lt))}var je=1/0;Te(fe.x,fe.y);var Ve=0,Qe=0,it=0,ct=0;if(E<ne?(Ve=E,Qe=ne):(Ve=ne,Qe=E),te<ae?(it=E,ct=ne):(it=ne,ct=E),Ve=(Qe-Ve)/2+_e,_e=(ct-it)/2+_e,E=(E+ne)/2,te=(te+ae)/2,Ve===0||_e===0)return fe;if(.5>(x>a?x-a:a-x)){if(Ve=1-(x-E)*(x-E)/(Ve*Ve),0>Ve)return fe;Ve=Math.sqrt(Ve),b=-_e*Ve+te,Te(x,_e*Ve+te),Te(x,b)}else{if(x=(b-y)/(x-a),b=1/(Ve*Ve)+x*x/(_e*_e),ae=2*x*(y-x*a)/(_e*_e)-2*x*te/(_e*_e)-2*E/(Ve*Ve),Ve=ae*ae-4*b*(2*x*a*te/(_e*_e)-2*y*te/(_e*_e)+te*te/(_e*_e)+E*E/(Ve*Ve)-1+(y-x*a)*(y-x*a)/(_e*_e)),0>Ve)return fe;Ve=Math.sqrt(Ve),_e=(-ae+Ve)/(2*b),Te(_e,x*_e-x*a+y),Ve=(-ae-Ve)/(2*b),Te(Ve,x*Ve-x*a+y)}return fe},Ff:function(a,y,x,b,E,te,ne,ae,fe){var _e=1e21,Te=a,je=y;if(on.Ve(a,y,a,b,E,te,ne,ae,fe)){var Ve=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te);Ve<_e&&(_e=Ve,Te=fe.x,je=fe.y)}return on.Ve(x,y,x,b,E,te,ne,ae,fe)&&(Ve=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),Ve<_e&&(_e=Ve,Te=fe.x,je=fe.y)),on.Ve(a,y,x,y,E,te,ne,ae,fe)&&(y=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),y<_e&&(_e=y,Te=fe.x,je=fe.y)),on.Ve(a,b,x,b,E,te,ne,ae,fe)&&(a=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),a<_e&&(_e=a,Te=fe.x,je=fe.y)),fe.h(Te,je),1e21>_e},us:function(a,y,x){return on.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,te,ne,ae){var fe=a+x,_e=y+b;return E===ne?(te<ae?(ne=te,te=ae):ne=ae,a<=E&&E<=fe&&ne<=_e&&te>=y):te===ae?(E<ne?(ae=E,E=ne):ae=ne,y<=te&&te<=_e&&ae<=fe&&E>=a):!!(Lo(a,y,x,b,E,te)||Lo(a,y,x,b,ne,ae)||on.Rl(a,y,fe,y,E,te,ne,ae)||on.Rl(fe,y,fe,_e,E,te,ne,ae)||on.Rl(fe,_e,a,_e,E,te,ne,ae)||on.Rl(a,_e,a,y,E,te,ne,ae))},Rl:function(a,y,x,b,E,te,ne,ae){return a===x&&y===b&&E===ne&&te===ae?a===E&&y===te:0>=on.Fl(a,y,x,b,E,te)*on.Fl(a,y,x,b,ne,ae)&&0>=on.Fl(E,te,ne,ae,a,y)*on.Fl(E,te,ne,ae,x,b)},Fl:function(a,y,x,b,E,te){return x-=a,b-=y,a=E-a,y=te-y,te=a*b-y*x,te===0&&(te=a*x+y*b,0<te&&(te=(a-x)*x+(y-b)*b,0>te&&(te=0))),te},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,te){var ne=Math.PI;te||(b*=ne/180,E*=ne/180);var ae=b>E?-1:1;te=[];var fe=ne/2,_e=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return fe=_e+ae*Math.min(b,fe),ae=a+x*Math.cos(_e),_e=y+x*Math.sin(_e),a+=x*Math.cos(fe),y+=x*Math.sin(fe),x=(ae+a)/2,fe=(_e+y)/2,te.push([ae,_e,x,fe,x,fe,a,y]),te;for(;1e-5<b;)E=_e+ae*Math.min(b,fe),te.push(on.Vy(x,_e,E,a,y)),b-=Math.abs(E-_e),_e=E;return te},Vy:function(a,y,x,b,E){var te=(x-y)/2,ne=a*Math.cos(te),ae=a*Math.sin(te),fe=-ae,_e=ne*ne+fe*fe,Te=_e+ne*ne+fe*ae;return _e=4/3*(Math.sqrt(2*_e*Te)-Te)/(ne*ae-fe*ne),ae=ne-_e*fe,ne=fe+_e*ne,fe=-ne,_e=te+y,te=Math.cos(_e),_e=Math.sin(_e),[b+a*Math.cos(y),E+a*Math.sin(y),b+ae*te-ne*_e,E+ae*_e+ne*te,b+ae*te-fe*_e,E+ae*_e+fe*te,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,te,ne){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/te)*te+b;var ae=x;return x+E-a<E/2&&(ae=x+E),a=b,b+te-y<te/2&&(a=b+te),ne.h(ae,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,te=0>b;if(a<y)var ne=1,ae=0;else ne=0,ae=1;var fe=ne===0?a:y,_e=ne===0?x:b;return(ne===0?E:te)&&(_e=-_e),ne=ae,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),on.az(fe,ne===0?a:y,_e,x,0,0)},az:function(a,y,x,b,E,te){if(0<b)if(0<x){E=a*a,te=y*y,a*=x;var ne=y*b,ae=-te+ne,fe=-te+Math.sqrt(a*a+ne*ne);y=ae;for(var _e=0;9999999999>_e&&(y=.5*(ae+fe),!(y===ae||y===fe));++_e){var Te=a/(y+E),je=ne/(y+te);if(Te=Te*Te+je*je-1,0<Te)ae=y;else if(0>Te)fe=y;else break}x=E*x/(y+E)-x,b=te*b/(y+te)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,te=a*x,te<b?(b=te/b,te=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+te*te)):x=Math.abs(x-a);return x},Ze:new Si,um:new Si,Mf:new Si,Nf:0,vm:100};on.za=on.AA;function Yn(a){vr(this),this.l=2,a===void 0&&(a=Yn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Yn.o?this.ee=new Rn:(Yn.V===null&&(Yn.V=new Rn().freeze()),this.ee=Yn.V),this.aq=this.ee.Ja,this.Ip=new kn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Xs,this.gg=Na,this.Rk=this.Sk=NaN,this.Uf=Un}Yn.prototype.copy=function(){var a=new Yn;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===Yn.o){for(var y=this.ee.s,x=a.ee,b=0;b<y.length;b++)x.add(y[b].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},Yn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Yn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Yn.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},Yn.prototype.ka=function(){if(Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Yn.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Yn.prototype.Xa=function(a){if(!(a instanceof Yn))return!1;if(this.type!==a.type)return this.type===Yn.j&&a.type===Yn.o?wh(this,a):a.type===Yn.j&&this.type===Yn.o?wh(a,this):!1;if(this.type===Yn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return on.B(this.startX,a.startX)&&on.B(this.startY,a.startY)&&on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)};function wh(a,y){return a.type!==Yn.j||y.type!==Yn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&on.B(a.startX,y.startX)&&on.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===wo&&on.B(a.endX,y.endX)&&on.B(a.endY,y.endY))))}Yn.ia=function(a){return a.toString()},Yn.prototype.qb=function(a){a.classType===Yn&&(this.type=a)},Yn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Yn.j:return 0>a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case Yn.u:var y=new kn(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case Yn.F:if(y=new kn(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case Yn.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var te=x[E];0<E&&(y+=" x "),te.isFilled&&(y+="F "),y+=te.toString(a)}return y;default:return this.type.toString()}},Yn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},Yn.parse=function(a,y){function x(){return ct>=Vt-1?!0:_e[ct+1].match(qt)!==null}function b(){return ct++,_e[ct]}function E(er){var Vi=parseFloat(b()),io=parseFloat(b());Dt===Dt.toLowerCase()&&(Vi=Zt.x+Vi,io=Zt.y+io),er.h(Vi,io)}function te(){return E(Zt),Zt}function ne(){return E(Gt),Gt}function ae(){var er=Lt.toLowerCase();return er!=="c"&&er!=="s"&&er!=="q"&&er!=="t"?Zt:new Mt(2*Zt.x-Gt.x,2*Zt.y-Gt.y)}y===void 0&&(y=!1);var fe=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(fe,"$1 $2"),a=a.replace(fe,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var _e=a.split(" ");for(a=0;a<_e.length;a++){var Te=_e[a];if(Te.match(/(\.[0-9]*)(\.)/gm)!==null){fe=Gn();for(var je="",Ve=!1,Qe=0;Qe<Te.length;Qe++){var it=Te[Qe];it!=="."||Ve?it==="."?(fe.push(je),je="."):je+=it:(Ve=!0,je+=it)}for(fe.push(je),_e.splice(a,1),Te=0;Te<fe.length;Te++)_e.splice(a+Te,0,fe[Te]);a+=fe.length-1,ti(fe)}}var ct=-1,Dt="",Lt="";fe=new Mt(0,0);var Gt=new Mt(0,0),Zt=new Mt(0,0),Vt=_e.length;a=A1(null),Ve=je=Te=!1,Qe=!0,it=null;for(var qt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ct>=Vt-1);)if(Lt=Dt,Dt=b(),Dt!=="")switch(Dt.toUpperCase()){case"X":Qe=!0,je=Te=!1;break;case"M":for(it=te(),a.mc===null||Qe===!0?(Sp(a,it.x,it.y,Te,!je,Ve),Qe=!1):a.moveTo(it.x,it.y),fe.assign(Zt);!x();)it=te(),a.lineTo(it.x,it.y);break;case"L":for(;!x();)it=te(),a.lineTo(it.x,it.y);break;case"H":for(;!x();)Zt=new Mt((Dt===Dt.toLowerCase()?Zt.x:0)+parseFloat(b()),Zt.y),a.lineTo(Zt.x,Zt.y);break;case"V":for(;!x();)Zt=new Mt(Zt.x,(Dt===Dt.toLowerCase()?Zt.y:0)+parseFloat(b())),a.lineTo(Zt.x,Zt.y);break;case"C":for(;!x();){it=new Mt,E(it);var yn=ne(),ii=te();Ih(a,it.x,it.y,yn.x,yn.y,ii.x,ii.y)}break;case"S":for(;!x();)it=ae(),yn=ne(),ii=te(),Ih(a,it.x,it.y,yn.x,yn.y,ii.x,ii.y);break;case"Q":for(;!x();)it=ne(),yn=te(),Um(a,it.x,it.y,yn.x,yn.y);break;case"T":for(;!x();)Gt=it=ae(),yn=te(),Um(a,it.x,it.y,yn.x,yn.y);break;case"B":for(;!x();){it=parseFloat(b()),yn=parseFloat(b()),ii=parseFloat(b());var di=parseFloat(b()),ui=parseFloat(b()),Vn=ui,In=!1;x()||(Vn=parseFloat(b()),x()||(In=parseFloat(b())!==0)),Dt===Dt.toLowerCase()&&(ii+=Zt.x,di+=Zt.y),a.arcTo(it,yn,ii,di,ui,Vn,In)}break;case"A":for(;!x();)it=Math.abs(parseFloat(b())),yn=Math.abs(parseFloat(b())),ii=parseFloat(b()),ui=di=!1,In=Vn=0,Vn=b(),Vn.length===1?(di=!!parseFloat(Vn),ui=!!parseFloat(b()),Vn=parseFloat(b())):Vn.length===2?(di=!!parseFloat(Vn[0]),ui=!!parseFloat(Vn[1]),Vn=parseFloat(b())):(di=!!parseFloat(Vn[0]),ui=!!parseFloat(Vn[1]),Vn=parseFloat(Vn.slice(2))),In=parseFloat(b()),Dt===Dt.toLowerCase()&&(Vn=Zt.x+Vn,In=Zt.y+In),Zt.h(Vn,In),Cx(a,it,yn,ii,di,ui,Vn,In);break;case"Z":bx(a),Zt.assign(fe);break;case"F":for(it="",yn=1;_e[ct+yn];)if(_e[ct+yn]==="0")Ve=!0,yn++;else if(_e[ct+yn].match(/[Uu]/)!==null)yn++;else if(_e[ct+yn].match(qt)===null)yn++;else{it=_e[ct+yn];break}it.match(/[Mm]/)?Te=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(it="",yn=1;_e[ct+yn];)if(_e[ct+yn].match(/[Ff]/)!==null)yn++;else if(_e[ct+yn].match(qt)===null)yn++;else{it=_e[ct+yn];break}it.match(/[Mm]/)?je=!0:a.mc.isShadowed=!1}if(fe=a.os,Gm=a,y)for(y=fe.figures.iterator;y.next();)y.value.isFilled=!0;return fe},Yn.Ha=function(a,y){for(var x=a.length,b=Mt.alloc(),E=0;E<x;E++){var te=a[E];b.x=te[0],b.y=te[1],y.Ga(b),te[0]=b.x,te[1]=b.y,b.x=te[2],b.y=te[3],y.Ga(b),te[2]=b.x,te[3]=b.y,b.x=te[4],b.y=te[5],y.Ga(b),te[4]=b.x,te[5]=b.y,b.x=te[6],b.y=te[7],y.Ga(b),te[6]=b.x,te[7]=b.y}Mt.free(b)},Yn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Yn.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},Yn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Yn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var te=0;te<E;te++){var ne=b[te];ne._isInvalidBounds=!1,ne.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Qh(this,a,!1),No(a,0,0,0,0),a.freeze()},Yn.prototype.ix=function(){var a=new kn;return Qh(this,a,!0),a};function Qh(a,y,x){switch(a.type){case Yn.j:case Yn.u:case Yn.F:x?y.h(a.od,a.pd,0,0):No(y,a.od,a.pd,0,0),No(y,a.Dc,a.Ec,0,0);break;case Yn.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var te=a[E];x&&E===0?y.h(te.startX,te.startY,0,0):No(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,ae=ne.length,fe=te.startX,_e=te.startY,Te=0;Te<ae;Te++){var je=ne[Te];switch(je.type){case wo:case Ms:fe=je.endX,_e=je.endY,No(y,fe,_e,0,0);break;case ga:on.Dl(fe,_e,je.point1X,je.point1Y,je.point2X,je.point2Y,je.endX,je.endY,.5,y),fe=je.endX,_e=je.endY;break;case dl:on.iv(fe,_e,je.point1X,je.point1Y,je.endX,je.endY,.5,y),fe=je.endX,_e=je.endY;break;case cs:case Cl:var Ve=je.type===cs?Da(je,te):$s(je,te,fe,_e),Qe=Ve.length;if(Qe===0){fe=je.type===cs?je.centerX:je.endX,_e=je.type===cs?je.centerY:je.endY,No(y,fe,_e,0,0);break}je=null;for(var it=0;it<Qe;it++)je=Ve[it],on.Dl(je[0],je[1],je[2],je[3],je[4],je[5],je[6],je[7],.5,y);je!==null&&(fe=je[6],_e=je[7]);break;default:Nt("Unknown Segment type: "+je.type)}}}break;default:Nt("Unknown Geometry type: "+a.type)}}Yn.prototype.normalize=function(){this._isFrozen&&un(this);var a=this.ix();return this.offset(-a.x,-a.y),new Mt(-a.x,-a.y)},Yn.prototype.offset=function(a,y){return this._isFrozen&&un(this),this.transform(1,0,0,1,a,y),this},Yn.prototype.scale=function(a,y){return this._isFrozen&&un(this),this.transform(a,0,0,y,0,0),this},Yn.prototype.rotate=function(a,y,x){this._isFrozen&&un(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=yr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),yr.free(b),this},rt=Yn.prototype,rt.transform=function(a,y,x,b,E,te){switch(this.type){case Yn.j:case Yn.u:case Yn.F:var ne=this.od,ae=this.pd;this.od=ne*a+ae*x+E,this.pd=ne*y+ae*b+te,ne=this.Dc,ae=this.Ec,this.Dc=ne*a+ae*x+E,this.Ec=ne*y+ae*b+te;break;case Yn.o:for(var fe=this.figures.s,_e=fe.length,Te=0;Te<_e;Te++){var je=fe[Te];ne=je.startX,ae=je.startY,je.startX=ne*a+ae*x+E,je.startY=ne*y+ae*b+te,je=je.segments.s;for(var Ve=je.length,Qe=0;Qe<Ve;Qe++){var it=je[Qe];switch(it.type){case wo:case Ms:ne=it.endX,ae=it.endY,it.endX=ne*a+ae*x+E,it.endY=ne*y+ae*b+te;break;case ga:ne=it.point1X,ae=it.point1Y,it.point1X=ne*a+ae*x+E,it.point1Y=ne*y+ae*b+te,ne=it.point2X,ae=it.point2Y,it.point2X=ne*a+ae*x+E,it.point2Y=ne*y+ae*b+te,ne=it.endX,ae=it.endY,it.endX=ne*a+ae*x+E,it.endY=ne*y+ae*b+te;break;case dl:ne=it.point1X,ae=it.point1Y,it.point1X=ne*a+ae*x+E,it.point1Y=ne*y+ae*b+te,ne=it.endX,ae=it.endY,it.endX=ne*a+ae*x+E,it.endY=ne*y+ae*b+te;break;case cs:ne=it.centerX,ae=it.centerY,it.centerX=ne*a+ae*x+E,it.centerY=ne*y+ae*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),it.startAngle+=ne),0>a&&(it.startAngle=180-it.startAngle,it.sweepAngle=-it.sweepAngle),0>b&&(it.startAngle=-it.startAngle,it.sweepAngle=-it.sweepAngle),it.radiusX*=Math.sqrt(a*a+x*x),it.radiusY!==void 0&&(it.radiusY*=Math.sqrt(y*y+b*b));break;case Cl:if(ne=it.endX,ae=it.endY,it.endX=ne*a+ae*x+E,it.endY=ne*y+ae*b+te,it.radiusX===0||it.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),it.xAxisRotation+=ne),0>a&&(it.xAxisRotation=180-it.xAxisRotation,it.isClockwiseArc=!it.isClockwiseArc),0>b&&(it.xAxisRotation=-it.xAxisRotation,it.isClockwiseArc=!it.isClockwiseArc),it.radiusX*=Math.sqrt(a*a+x*x),it.radiusY*=Math.sqrt(y*y+b*b);break;default:Nt("Unknown Segment type: "+it.type)}}}}return this._isInvalidBounds=!0,this},rt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,te=this.Ec;switch(this.type){case Yn.j:return on.Yb(x,b,E,te,y,a.x,a.y);case Yn.u:var ne=kn.allocAt(Math.min(x,E)-y,Math.min(b,te)-y,Math.abs(E-x)+2*y,Math.abs(te-b)+2*y);return a=ne.ca(a),kn.free(ne),a;case Yn.F:ne=Math.min(x,E)-y;var ae=Math.min(b,te)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(te-b)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),ae=a.y-(ae+y),1>=ne*ne/(x*x)+ae*ae/(y*y));case Yn.o:return Mu(this,a,y,!0,!1);default:return!1}};function Mu(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,ae=0,fe,_e,Te,je,Ve=a.figures.s,Qe=Ve.length,it=0;it<Qe;it++){var ct=Ve[it],Dt=!ct.isEvenOdd;if(ct.isFilled){if(b&&ct.ca(te,y,x))return!0;var Lt=ct.segments;fe=ct.startX,_e=ct.startY;for(var Gt=fe,Zt=_e,Vt=Lt.s,qt=0;qt<=Lt.length;qt++){var yn=void 0;if(qt!==Lt.length){yn=Vt[qt];var ii=yn.type;a=yn.endX,je=yn.endY}else ii=wo,a=Gt,je=Zt;switch(ii){case Ms:if(Gt=Tu(te,y,ne,y,fe,_e,Gt,Zt),isNaN(Gt))return!0;ae+=Gt,Gt=a,Zt=je;break;case wo:if(fe=Tu(te,y,ne,y,fe,_e,a,je),isNaN(fe))return!0;ae+=fe;break;case ga:Te=on.Fo(fe,_e,yn.point1X,yn.point1Y,yn.point2X,yn.point2Y,a,je,ne,y,te,y,.5),ae+=Te;break;case dl:Te=on.Fo(fe,_e,(fe+2*yn.point1X)/3,(_e+2*yn.point1Y)/3,(2*yn.point1X+a)/3,(2*yn.point1Y+je)/3,a,je,ne,y,te,y,.5),ae+=Te;break;case cs:case Cl:ii=yn.type===cs?Da(yn,ct):$s(yn,ct,fe,_e);var di=ii.length;if(di===0){if(fe=Tu(te,y,ne,y,fe,_e,yn.type===cs?yn.centerX:yn.endX,yn.type===cs?yn.centerY:yn.endY),isNaN(fe))return!0;ae+=fe;break}yn=null;for(var ui=0;ui<di;ui++){if(yn=ii[ui],ui===0){if(Te=Tu(te,y,ne,y,fe,_e,yn[0],yn[1]),isNaN(Te))return!0;ae+=Te}Te=on.Fo(yn[0],yn[1],yn[2],yn[3],yn[4],yn[5],yn[6],yn[7],ne,y,te,y,.5),ae+=Te}yn!==null&&(a=yn[6],je=yn[7]);break;default:Nt("Unknown Segment type: "+yn.type)}fe=a,_e=je}if(Dt){if(ae!==0)return!0}else if(ae%2!==0)return!0;ae=0}else if(ct.ca(te,y,E?x:x+2))return!0}return!1}function Tu(a,y,x,b,E,te,ne,ae){if(on.Yb(E,te,ne,ae,.05,a,y))return NaN;var fe=(a-x)*(te-ae);if(fe===0)return 0;var _e=((a*b-y*x)*(E-ne)-(a-x)*(E*ae-te*ne))/fe;if(y=(a*b-y*x)*(te-ae)/fe,_e>=a)return 0;if((E>ne?E-ne:ne-E)<(te>ae?te-ae:ae-te)){if(te<ae){if(y<te||y>ae)return 0}else if(y<ae||y>te)return 0}else if(E<ne){if(_e<E||_e>ne)return 0}else if(_e<ne||_e>E)return 0;return 0<fe?1:-1}function Wu(a,y,x,b){a=a.figures.s;for(var E=a.length,te=0;te<E;te++)if(a[te].ca(y,x,b))return!0;return!1}rt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Mt),this.type===Yn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,ae=0;ae<E;ae++){var fe=b[ae],_e=fe.length;for(a=0;a<_e;a++){var Te=fe[a];if(ne+Te>=te)return b=te-ne,b=Te===0?0:b/Te,x=x[ae],ae=x[2*a],E=x[2*a+1],y.h(ae+(x[2*a+2]-ae)*b,E+(x[2*a+3]-E)*b),y;ne+=Te}}return y},rt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Yn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,te=0,ne=0;ne<b;ne++){var ae=x[ne],fe=ae.length;for(a=0;a<fe;a++){var _e=ae[a];if(te+_e>=E)return E=y[ne],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;te+=_e}}return NaN},rt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Yn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,ae=0;ae<E;ae++){var fe=b[ae],_e=fe.length;for(a=0;a<_e;a++){var Te=fe[a];if(ne+Te>=te)return b=te-ne,b=Te===0?0:b/Te,Te=x[ae],x=Te[2*a],ae=Te[2*a+1],E=Te[2*a+2],a=Te[2*a+3],y[0]=x+(E-x)*b,y[1]=ae+(a-ae)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-ae)?0:1>Math.abs(E-x)?0<=a-ae?90:270:1>Math.abs(a-ae)?0<=E-x?0:180:180*Math.atan2(a-ae,E-x)/Math.PI,y;ne+=Te}}return y},rt.xx=function(a){if(this.type===Yn.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var te=a.x;if(a=a.y,y===b){if(x<E){var ne=x;b=E}else ne=E,b=x;return a<=ne?ne===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-ne)}if(x===E)return y<b?ne=y:(ne=b,b=y),te<=ne?ne===y?0:1:te>=b?b===y?0:1:Math.abs(te-y)/(b-ne);ne=(b-y)*(b-y)+(E-x)*(E-x);var ae=Mt.alloc();return on.qh(y,x,b,E,te,a,ae),a=ae.x,te=ae.y,Mt.free(ae),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Yn.u){ne=this.startX,ae=this.startY;var fe=this.endX;if(E=this.endY,ne!==fe||ae!==E){y=fe-ne,x=E-ae,te=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),fe),a=Math.min(Math.max(a,ae),E),ne=Math.abs(b-ne),fe=Math.abs(b-fe),ae=Math.abs(a-ae),E=Math.abs(a-E);var _e=Math.min(ne,fe,ae,E);if(_e===ae)return b/te;if(_e===fe)return(y+a)/te;if(_e===E)return(2*y+x-b)/te;if(_e===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=Mt.alloc(),E=1/0,ae=ne=0,fe=y.length;for(var Te=_e=0,je=0;je<fe;je++)for(var Ve=y[je],Qe=x[je],it=Ve.length,ct=0;ct<it;ct+=2){var Dt=Ve[ct],Lt=Ve[ct+1];if(ct!==0){on.qh(_e,Te,Dt,Lt,a.x,a.y,b);var Gt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Gt<E&&(E=Gt,ne=ae,ne+=Math.sqrt((b.x-_e)*(b.x-_e)+(b.y-Te)*(b.y-Te))),ae+=Qe[(ct-2)/2]}_e=Dt,Te=Lt}return Mt.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function bh(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Yn.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===Yn.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===Yn.F){var te=new Vs;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Vr(cs);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,te.add(ne),a=Da(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var ae=0;ae<E;ae++){var fe=a[ae];on.Qe(ne,te,fe[2],fe[3],fe[4],fe[5],fe[6],fe[7],.5,b),ne=fe[6],te=fe[7]}}y.push(b),x.push(Cc(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,te=E.startY,ae=ne,fe=te;for(var _e=E.segments.s,Te=_e.length,je=0;je<Te;je++){var Ve=_e[je];switch(Ve.type){case Ms:4<=b.length&&(y.push(b),x.push(Cc(b))),b=[],b.push(Ve.endX),b.push(Ve.endY),ne=Ve.endX,te=Ve.endY,ae=ne,fe=te;break;case wo:b.push(Ve.endX),b.push(Ve.endY),ne=Ve.endX,te=Ve.endY;break;case ga:on.Qe(ne,te,Ve.point1X,Ve.point1Y,Ve.point2X,Ve.point2Y,Ve.endX,Ve.endY,.5,b),ne=Ve.endX,te=Ve.endY;break;case dl:on.ep(ne,te,Ve.point1X,Ve.point1Y,Ve.endX,Ve.endY,.5,b),ne=Ve.endX,te=Ve.endY;break;case cs:var Qe=Da(Ve,E),it=Qe.length;if(it===0){b.push(Ve.centerX),b.push(Ve.centerY),ne=Ve.centerX,te=Ve.centerY;break}for(var ct=0;ct<it;ct++){var Dt=Qe[ct];on.Qe(ne,te,Dt[2],Dt[3],Dt[4],Dt[5],Dt[6],Dt[7],.5,b),ne=Dt[6],te=Dt[7]}break;case Cl:if(Qe=$s(Ve,E,ne,te),it=Qe.length,ct=Ve.endX,Dt=Ve.endY,it===0){b.push(ct),b.push(Dt),ne=ct,te=Dt;break}for(ct=0;ct<it;ct++)Dt=Qe[ct],on.Qe(ne,te,Dt[2],Dt[3],Dt[4],Dt[5],Dt[6],Dt[7],.5,b),ne=Dt[6],te=Dt[7];break;default:Nt("Segment not of valid type: "+Ve.type)}Ve.isClosed&&(b.push(ae),b.push(fe))}4<=b.length&&(y.push(b),x.push(Cc(b)))}}}function Cc(a){for(var y=[],x=0,b=0,E=a.length,te=0;te<E;te+=2){var ne=a[te],ae=a[te+1];te!==0&&y.push(Math.sqrt(Yo(x,b,ne,ae))),x=ne,b=ae}return y}rt.add=function(a){return this.ee.add(a),this},rt.pm=function(a,y,x,b,E,te,ne,ae){return this._isFrozen&&un(this),this.fg=new vi(a,y,E,te).freeze(),this.gg=new vi(x,b,ne,ae).freeze(),this},Ye.Object.defineProperties(Yn.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return bh(this),this.tk}},flattenedLengths:{get:function(){return bh(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Yn.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===Yn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,b=a=0;b<x;b++)for(var E=y[b],te=E.length,ne=0;ne<te;ne++)a+=E[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&un(this,a),this.na=a,a===Yn.o?this.ee=new Rn:(Yn.V===null&&(Yn.V=new Rn().freeze()),this.ee=Yn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&un(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&un(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&un(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&un(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&un(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&un(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&un(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&un(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Yn.prototype.setSpots=Yn.prototype.pm,Yn.prototype.add=Yn.prototype.add,Yn.prototype.getFractionForPoint=Yn.prototype.xx,Yn.prototype.getPointAndAngleAlongPath=Yn.prototype.Qu,Yn.prototype.getAngleAlongPath=Yn.prototype.wx,Yn.prototype.getPointAlongPath=Yn.prototype.Pu,Yn.prototype.containsPoint=Yn.prototype.ca,Yn.prototype.transform=Yn.prototype.transform,Yn.prototype.rotate=Yn.prototype.rotate,Yn.prototype.scale=Yn.prototype.scale,Yn.prototype.offset=Yn.prototype.offset,Yn.prototype.normalize=Yn.prototype.normalize,Yn.prototype.computeBoundsWithoutOrigin=Yn.prototype.ix,Yn.prototype.equalsApprox=Yn.prototype.Xa,Yn.className="Geometry",Yn.j=new En(Yn,"Line",0),Yn.u=new En(Yn,"Rectangle",1),Yn.F=new En(Yn,"Ellipse",2),Yn.o=new En(Yn,"Path",3),Yn.V=null,Yn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Yn.className="Geometry",Yn.stringify=Yn.ia,Yn.fillPath=Yn.nb,Yn.parse=Yn.parse,Yn.Line=Yn.j,Yn.Rectangle=Yn.u,Yn.Ellipse=Yn.F,Yn.Path=Yn.o;function Vs(a,y,x,b,E){vr(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Rn,this.sr=this.pl.Ja,this.fw=null}Vs.prototype.copy=function(){var a=new Vs;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var te=y[E].copy();b.add(te)}return a.sr=this.sr,a.fw=this.fw,a},rt=Vs.prototype,rt.Xa=function(a){if(!(a instanceof Vs&&on.B(this.startX,a.startX)&&on.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},rt.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},rt.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},rt.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},rt.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},rt.add=function(a){return this.pl.add(a),this},rt.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,ae=this.segments.s,fe=ae.length,_e=0;_e<fe;_e++){var Te=ae[_e];switch(Te.type){case Ms:te=Te.endX,ne=Te.endY,b=Te.endX,E=Te.endY;break;case wo:if(on.Yb(b,E,Te.endX,Te.endY,x,a,y))return!0;b=Te.endX,E=Te.endY;break;case ga:if(on.cs(b,E,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.5,a,y,x))return!0;b=Te.endX,E=Te.endY;break;case dl:if(on.jv(b,E,Te.point1X,Te.point1Y,Te.endX,Te.endY,.5,a,y,x))return!0;b=Te.endX,E=Te.endY;break;case cs:case Cl:var je=Te.type===cs?Da(Te,this):$s(Te,this,b,E),Ve=je.length,Qe=Te.type===cs?Te.centerX:Te.endX,it=Te.type===cs?Te.centerY:Te.endY;if(Ve===0){if(on.Yb(b,E,Qe,it,x,a,y))return!0;b=Qe,E=it;break}for(Qe=null,it=0;it<Ve;it++)if(Qe=je[it],it===0&&on.Yb(b,E,Qe[0],Qe[1],x,a,y)||on.cs(Qe[0],Qe[1],Qe[2],Qe[3],Qe[4],Qe[5],Qe[6],Qe[7],.5,a,y,x))return!0;Qe!==null&&(b=Qe[6],E=Qe[7]);break;default:Nt("Unknown Segment type: "+Te.type)}if(Te.isClosed&&(b!==te||E!==ne)&&on.Yb(b,E,te,ne,x,a,y))return!0}return!1},Ye.Object.defineProperties(Vs.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&un(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&un(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&un(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Vs.prototype.add=Vs.prototype.add,Vs.prototype.equalsApprox=Vs.prototype.Xa,Vs.className="PathFigure";function Vr(a,y,x,b,E,te,ne,ae){vr(this),a===void 0&&(a=wo),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),te===void 0&&(te=0),ne===void 0&&(ne=0),a===Cl?(a=te%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),ae&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===cs&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===cs&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Vr.prototype.copy=function(){var a=new Vr;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},rt=Vr.prototype,rt.Xa=function(a){if(!(a instanceof Vr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ms:case wo:return on.B(this.endX,a.endX)&&on.B(this.endY,a.endY);case ga:return on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)&&on.B(this.point1X,a.point1X)&&on.B(this.point1Y,a.point1Y)&&on.B(this.point2X,a.point2X)&&on.B(this.point2Y,a.point2Y);case dl:return on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)&&on.B(this.point1X,a.point1X)&&on.B(this.point1Y,a.point1Y);case cs:return on.B(this.startAngle,a.startAngle)&&on.B(this.sweepAngle,a.sweepAngle)&&on.B(this.centerX,a.centerX)&&on.B(this.centerY,a.centerY)&&on.B(this.radiusX,a.radiusX)&&on.B(this.radiusY,a.radiusY);case Cl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&on.B(this.xAxisRotation,a.xAxisRotation)&&on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)&&on.B(this.radiusX,a.radiusX)&&on.B(this.radiusY,a.radiusY);default:return!1}},rt.qb=function(a){a.classType===Vr&&(this.type=a)},rt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ms:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case wo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ga:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case dl:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case cs:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case Cl:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return this._isFrozen=!1,this},rt.close=function(){return this.isClosed=!0,this};function Da(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,te=on.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=yr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Yn.Ha(te,ne),yr.free(ne)}for(x=te.length,b=0;b<x;b++)ne=te[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=te,a.ae}function $s(a,y,x,b){function E(ct,Dt,Lt,Gt){return(ct*Gt<Dt*Lt?-1:1)*Math.acos((ct*Lt+Dt*Gt)/(Math.sqrt(ct*ct+Dt*Dt)*Math.sqrt(Lt*Lt+Gt*Gt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var te=a.Pg;y===0&&(y=1e-4),te===0&&(te=1e-4);var ne=Math.PI/180*a.Ne,ae=a.isLargeArc,fe=a.isClockwiseArc,_e=a.Dc,Te=a.Ec,je=Math.cos(ne),Ve=Math.sin(ne),Qe=je*(x-_e)/2+Ve*(b-Te)/2;ne=-Ve*(x-_e)/2+je*(b-Te)/2;var it=Qe*Qe/(y*y)+ne*ne/(te*te);return 1<it&&(y*=Math.sqrt(it),te*=Math.sqrt(it)),it=(ae===fe?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*Qe*Qe)/(y*y*ne*ne+te*te*Qe*Qe)),isNaN(it)&&(it=0),ae=it*y*ne/te,it=it*-te*Qe/y,isNaN(ae)&&(ae=0),isNaN(it)&&(it=0),x=(x+_e)/2+je*ae-Ve*it,b=(b+Te)/2+Ve*ae+je*it,Te=E(1,0,(Qe-ae)/y,(ne-it)/te),je=(Qe-ae)/y,_e=(ne-it)/te,Qe=(-Qe-ae)/y,ae=(-ne-it)/te,ne=E(je,_e,Qe,ae),Qe=(je*Qe+_e*ae)/(Math.sqrt(je*je+_e*_e)*Math.sqrt(Qe*Qe+ae*ae)),-1>=Qe?ne=Math.PI:1<=Qe&&(ne=0),!fe&&0<ne&&(ne-=2*Math.PI),fe&&0>ne&&(ne+=2*Math.PI),fe=y>te?1:y/te,Qe=y>te?te/y:1,y=on.jx(0,0,y>te?y:te,Te,Te+ne,!0),te=yr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(fe,Qe),Yn.Ha(y,te),yr.free(te),a.ae=y,a.ae}Ye.Object.defineProperties(Vr.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(a){this._isFrozen&&un(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&un(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&un(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&un(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&un(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&un(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&un(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&un(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&un(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Ln(a,">= zero",Vr,"radiusX"),this._isFrozen&&un(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Ln(a,">= zero",Vr,"radiusY"),this._isFrozen&&un(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&un(this,a),a%=360,0>a&&(a+=360),this.Dc=a,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&un(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&un(this,a),this.l=a?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&un(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Vr.prototype.equalsApprox=Vr.prototype.Xa;var Ms=new En(Vr,"Move",0),wo=new En(Vr,"Line",1),ga=new En(Vr,"Bezier",2),dl=new En(Vr,"QuadraticBezier",3),cs=new En(Vr,"Arc",4),Cl=new En(Vr,"SvgArc",4);Vr.className="PathSegment",Vr.Move=Ms,Vr.Line=wo,Vr.Bezier=ga,Vr.QuadraticBezier=dl,Vr.Arc=cs,Vr.SvgArc=Cl;function Ea(){this.H=null,this.xu=new Mt(0,0).freeze(),this.mt=new Mt(0,0).freeze(),this.Bp=this.Rq=0,this.Cp=1,this.xq="",this.Wr=this.Tp=!1,this.Rp=this.Ep=0,this.xg=this.nq=this.tq=!1,this.Zp=null,this.Rr=0,this.xd=this.Nr=null}Ea.prototype.copy=function(){var a=new Ea;return this.clone(a)},Ea.prototype.clone=function(a){return a.H=this.H,a.xu.assign(this.viewPoint),a.mt.assign(this.documentPoint),a.Rq=this.Rq,a.Bp=this.Bp,a.Cp=this.Cp,a.xq=this.xq,a.Tp=this.Tp,a.Wr=this.Wr,a.Ep=this.Ep,a.Rp=this.Rp,a.tq=this.tq,a.nq=this.nq,a.xg=this.xg,a.Zp=this.Zp,a.Rr=this.Rr,a.Nr=this.Nr,a.xd=this.xd,a},Ea.prototype.toString=function(){var a="^";return this.modifiers!==0&&(a+="M:"+this.modifiers),this.button!==0&&(a+="B:"+this.button),this.key!==""&&(a+="K:"+this.key),this.clickCount!==0&&(a+="C:"+this.clickCount),this.delta!==0&&(a+="D:"+this.delta),this.handled&&(a+="h"),this.bubbles&&(a+="b"),this.documentPoint!==null&&(a+="@"+this.documentPoint.toString()),a},Ea.prototype.So=function(a,y){var x=this.diagram;return x===null||Hd(x,a,y),y},Ea.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Hd(x,a,y),y.assign(x.Ps(y))),y},Ye.Object.defineProperties(Ea.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp},set:function(a){if(this.Bp=a,this.event===null)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr=a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return a===null?!1:a.pointerType==="touch"||a.pointerType==="pen"}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd=a}},control:{get:function(){return(this.modifiers&1)!==0},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return(this.modifiers&4)!==0},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return(this.modifiers&2)!==0},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{get:function(){return(this.modifiers&8)!==0},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&1)!==0:this.button===0},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&2)!==0:this.button===2},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&4)!==0:this.button===1},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}),Ea.prototype.getMultiTouchDocumentPoint=Ea.prototype.Bz,Ea.prototype.getMultiTouchViewPoint=Ea.prototype.So,Ea.className="InputEvent";function Pc(){this.H=null,this.xa="",this.ar=this.Lr=null}Pc.prototype.copy=function(){var a=new Pc;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Pc.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ye.Object.defineProperties(Pc.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}}),Pc.className="DiagramEvent";function Go(){this.Fm=Vo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Go.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Go.prototype.copy=function(){var a=new Go;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=$t(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=$t(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=$t(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=$t(y)&&typeof y.J=="function"?y.J():y,a},Go.prototype.qb=function(a){a.classType===Go&&(this.change=a)},Go.prototype.toString=function(){var a="";return a=this.change===Ka?a+"* ":this.change===Vo?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===Ka?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=li(this.object)),this.oldValue!==null&&(a+=" old: "+li(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+li(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Go.prototype.I=function(a){return a?this.oldValue:this.newValue},Go.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Go.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Go.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Go.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Go.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ye.Object.defineProperties(Go.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===Ka&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),Go.prototype.redo=Go.prototype.redo,Go.prototype.canRedo=Go.prototype.canRedo,Go.prototype.undo=Go.prototype.undo,Go.prototype.canUndo=Go.prototype.canUndo,Go.prototype.getParam=Go.prototype.Dz,Go.prototype.getValue=Go.prototype.I,Go.prototype.clear=Go.prototype.clear;var Ka=new En(Go,"Transaction",-1),Vo=new En(Go,"Property",0),vs=new En(Go,"Insert",1),ds=new En(Go,"Remove",2);Go.className="ChangedEvent",Go.Transaction=Ka,Go.Property=Vo,Go.Insert=vs,Go.Remove=ds;function Bs(){this.o=new Rn().freeze(),this.xa="",this.j=!1}Bs.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var b=this.changes.M(x);b!==null&&(y+=`
|
|
|
`+b.toString())}}return y},Bs.prototype.clear=function(){var a=this.changes;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),a.freeze()},Bs.prototype.canUndo=function(){return this.isComplete},Bs.prototype.undo=function(){if(this.canUndo())for(var a=this.changes.count-1;0<=a;a--){var y=this.changes.M(a);y!==null&&y.undo()}},Bs.prototype.canRedo=function(){return this.isComplete},Bs.prototype.redo=function(){if(this.canRedo())for(var a=this.changes.count,y=0;y<a;y++){var x=this.changes.M(y);x!==null&&x.redo()}},Bs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new ci,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Vo&&b.object){var E=y.get(b.object);E||(E=new ci,y.set(b.object,E));var te=E.get(b.propertyName);te===null?E.set(b.propertyName,-1):(0<te&&a.cd(te,null),E.set(b.propertyName,x))}}for(x=y=0;x<a.count;x++)b=a.M(x),b!==null&&(x>y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},Ye.Object.defineProperties(Bs.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}}),Bs.prototype.optimize=Bs.prototype.ak,Bs.prototype.redo=Bs.prototype.redo,Bs.prototype.canRedo=Bs.prototype.canRedo,Bs.prototype.undo=Bs.prototype.undo,Bs.prototype.canUndo=Bs.prototype.canUndo,Bs.prototype.clear=Bs.prototype.clear,Bs.className="Transaction";function Fo(){this.Pt=new Nn,this.Jd=!1,this.u=new Rn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Rn().freeze(),this.hl=new Rn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Fo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
|
|
|
`+this.history.M(b).toString(a-1);return y},Fo.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},Fo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},rt=Fo.prototype,rt.Xw=function(a){this.Pt.add(a)},rt.Rx=function(a){this.Pt.remove(a)},rt.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},rt.eb=function(a){return a===void 0&&(a=""),Rc(this,!0,a)},rt.Kf=function(){return Rc(this,!1,"")};function Rc(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Dn("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var te=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(te=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(te=y.M(0),te!==null&&te.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=te,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}rt.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},Fo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Fo.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){Dn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Fo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Fo.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){Dn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Fo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Go;for(b.change=Ka,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Fo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Bs);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Dn("Change not within a transaction: "+x.toString()))}},Fo.prototype.skipsEvent=function(a){if(a===null||0>a.change.value)return!0;if(a=a.object,a===null)return!1;if(a.layer!==void 0){if(a=a.layer,a!==null&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1},Ye.Object.defineProperties(Fo.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),Fo.prototype.handleChanged=Fo.prototype.Tu,Fo.prototype.redo=Fo.prototype.redo,Fo.prototype.undo=Fo.prototype.undo,Fo.prototype.canUndo=Fo.prototype.canUndo,Fo.prototype.discardHistoryAfterIndex=Fo.prototype.lx,Fo.prototype.rollbackTransaction=Fo.prototype.Kf,Fo.prototype.commitTransaction=Fo.prototype.eb,Fo.prototype.startTransaction=Fo.prototype.Ea,Fo.prototype.removeModel=Fo.prototype.Rx,Fo.prototype.addModel=Fo.prototype.Xw,Fo.prototype.clear=Fo.prototype.clear,Fo.className="UndoManager";function Gr(){vr(this),this.H=ac,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ea,this.Zr=-1}Gr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Bn(this.constructor)},Gr.prototype.updateAdornments=function(){},Gr.prototype.canStart=function(){return this.isEnabled},Gr.prototype.doStart=function(){},Gr.prototype.doActivate=function(){this.isActive=!0},Gr.prototype.doDeactivate=function(){this.isActive=!1},Gr.prototype.doStop=function(){},Gr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Gr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Gr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Gr.prototype.doMouseMove=function(){},Gr.prototype.doMouseUp=function(){this.stopTool()},Gr.prototype.doMouseWheel=function(){},Gr.prototype.canStartMultiTouch=function(){return!0},Gr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Mt.allocAt(NaN,NaN)),b=y.So(1,Mt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,te=b.y-x.y;a.Jw=Math.sqrt(E*E+te*te),y.bubbles=!1}Mt.free(x),Mt.free(b)},Gr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Mt.allocAt(NaN,NaN)),b=y.So(1,Mt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,te=b.y-x.y;te=Math.sqrt(E*E+te*te)/a.Jw,E=new Mt((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),te*=a.Bw;var ne=a.commandHandler;if(te!==a.scale&&ne.canResetZoom(te)){var ae=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(te),a.zoomPoint=ae}y.bubbles=!1}Mt.free(x),Mt.free(b)},Gr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Gr.prototype.doKeyUp=function(){},Gr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Gr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Gr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Nr?y.meta:y.control){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!y.isSelected),a.R("ChangedSelection",a.selection)}else if(y.shift){if(!x.isSelected){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!0),a.R("ChangedSelection",a.selection)}}else if(!x.isSelected){for(y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&a.select(y)}}else!y.left||(Nr?y.meta:y.control)||y.shift||a.clearSelection()}},Gr.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(E){return!E.layer.isTemporary});var x=this.diagram,b=x.lastInput;return a=x.ic(b.documentPoint,a,y),b.targetObject=a,Ad(a,b,x),b.handled};function Ad(a,y,x){if(y.handled=!1,a===null||a.If()){var b=0;y.left?b=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(b=3);var E="ObjectSingleClicked";if(a!==null){switch(b){case 1:E="ObjectSingleClicked";break;case 2:E="ObjectDoubleClicked";break;case 3:E="ObjectContextClicked"}b!==0&&x.R(E,a)}else{switch(b){case 1:E="BackgroundSingleClicked";break;case 2:E="BackgroundDoubleClicked";break;case 3:E="BackgroundContextClicked"}b!==0&&x.R(E)}if(a!==null)for(;a!==null;){switch(x=null,b){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,b){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}Gr.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var b=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(b=null),y.targetObject=b;var E=!1;if(b!==a.Ck){var te=a.Ck,ne=te;for(a.Ck=b,this.doCurrentObjectChanged(te,b),y.handled=!1;te!==null;){var ae=te.mouseLeave;if(ae!==null&&(b===te||b!==null&&b.rg(te)||(ae(y,te,b),E=!0,y.handled)))break;te=te.panel}for(te=ne,y.handled=!1;b!==null&&(ne=b.mouseEnter,!(ne!==null&&(te===b||te!==null&&te.rg(b)||(ne(y,b,te),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(te=b,ne="";te!==null&&(ne=te.cursor,ne==="");)te=te.panel;for(a.currentCursor=ne,y.handled=!1,te=b;te!==null&&(b=te.mouseOver,!(b!==null&&(b(y,te),E=!0,y.handled)));)te=te.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},Gr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Gr.prototype.doCurrentObjectChanged=function(){},Gr.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===rh&&!y.shift||E===ih&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===rh&&y.shift||E===ih&&!y.control){b=a.position.copy();var te=y.event;E=te.deltaMode;var ne=te.deltaX;te=te.deltaY;var ae="pixel";if(ne===0&&te===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(ae,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(ae,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:ae="pixel";break;case 1:ae="line";break;case 2:ae="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(ae,0<ne?"right":"left",Math.abs(ne))),te!==0&&a.allowVerticalScroll&&(te*=a.scrollVerticalLineChange/16,a.scroll(ae,0<te?"down":"up",Math.abs(te)))}this.doWheelChange(a,b,y)}}},Gr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Gr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=mn(function(){x.doWaitAfter(b)},a)},Gr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&_t.clearTimeout(this.Zr),this.Zr=-1},Gr.prototype.doWaitAfter=function(){},Gr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof qr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Gr.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var b=x.toolManager.dragSize,E=b.width;return b=b.height,x.firstInput.isTouchEvent&&(E+=6,b+=6),Math.abs(y.x-a.x)>E||Math.abs(y.y-a.y)>b},Ye.Object.defineProperties(Gr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof vn&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm},set:function(a){this.wm=a}}}),Gr.prototype.startTransaction=Gr.prototype.Ea,Gr.className="Tool";function Wo(){Gr.call(this),this.name="ToolManager",this.hb=new Rn,this.ob=new Rn,this.Hb=new Rn,this.F=this.V=850,this.o=new Xn(2,2).ja(),this.Ha=5e3,this.ia=ih,this.u=Ch,this.Mp=this.j=null,this.zj=-1}qe(Wo,Gr),Wo.prototype.initializeStandardTools=function(){},Wo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof qr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Wo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ic&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===ro){y.bubbles=!0;return}if(this.gestureBehavior===ic)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===ih?this.mouseWheelBehavior=rh:this.mouseWheelBehavior===rh&&(this.mouseWheelBehavior=ih)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Wo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===ro){y.bubbles=!0;return}if(this.gestureBehavior===ic)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Nd(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Nd(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Wo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof qr&&(y===a||y.rg(a))||this.hideToolTip()},Wo.prototype.doWaitAfter=function(a){var y=this.diagram;y.ta!==null&&(this.doMouseHover(),this.isActive||this.doToolTip(),a.isTouchEvent&&!y.lastInput.handled&&(a=a.copy(),a.button=2,a.buttons=2,y.lastInput=a,y.qu=!0,y.doMouseUp()))},Wo.prototype.doMouseHover=function(){var a=this.diagram,y=a.lastInput;y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null));var x=y.targetObject;if(x!==null)for(y.handled=!1;x!==null&&(a=this.isActive?x.mouseHold:x.mouseHover,!(a!==null&&(a(y,x),y.handled)));)x=x.panel;else x=this.isActive?a.mouseHold:a.mouseHover,x!==null&&x(y)},Wo.prototype.doToolTip=function(){var a=this.diagram,y=a.lastInput;if(y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null)),y=y.targetObject,y!==null){if(a=this.currentToolTip,!(a instanceof qr)||y!==a&&!y.rg(a)){for(;y!==null;){if(a=y.toolTip,a!==null){this.showToolTip(a,y);return}y=y.panel}this.hideToolTip()}}else y=a.toolTip,y!==null?this.showToolTip(y,null):this.hideToolTip()},Wo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof qr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Ji&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(_t.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=mn(function(){E.hideToolTip()},a)}},Wo.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y=x.y+20/y.scale+b.height>E.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.y<E.y&&(x.y=E.y),a.position=x}},Wo.prototype.hideToolTip=function(){this.zj!==-1&&(_t.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof qr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ji&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Wo.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var b=this.mouseUpTools.M(x);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Wo.prototype.doMouseWheel=function(){this.standardMouseWheel()},Wo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Wo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Wo.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var b=this.mouseDownTools.M(x);if(b.name===a)return b}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(b=this.mouseMoveTools.M(x),b.name===a)return b;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(b=this.mouseUpTools.M(x),b.name===a)return b;return null},Wo.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.name===a)return y!==null?this.mouseDownTools.cd(b,y):this.mouseDownTools.mb(b),E}for(x=this.mouseMoveTools.length,b=0;b<x;b++)if(E=this.mouseMoveTools.M(b),E.name===a)return y!==null?this.mouseMoveTools.cd(b,y):this.mouseMoveTools.mb(b),E;for(x=this.mouseUpTools.length,b=0;b<x;b++)if(E=this.mouseUpTools.M(b),E.name===a)return y!==null?this.mouseUpTools.cd(b,y):this.mouseUpTools.mb(b),E;return null},Wo.prototype.gb=function(a,y,x){y!==null&&(y.name=a,y.diagram=this.diagram),this.findTool(a)?this.replaceTool(a,y):y!==null&&x.add(y)},Ye.Object.defineProperties(Wo.prototype,{mouseWheelBehavior:{get:function(){return this.ia},set:function(a){this.ia=a}},gestureBehavior:{get:function(){return this.u},set:function(a){this.u=a}},currentToolTip:{get:function(){return this.j},set:function(a){this.j=a,this.Mp=a!==null&&a instanceof qr?a.adornedPart:null}},mouseDownTools:{get:function(){return this.hb}},mouseMoveTools:{get:function(){return this.ob}},mouseUpTools:{get:function(){return this.Hb}},hoverDelay:{get:function(){return this.V},set:function(a){this.V=a}},holdDelay:{get:function(){return this.F},set:function(a){this.F=a}},dragSize:{get:function(){return this.o},set:function(a){this.o=a.J()}},toolTipDuration:{get:function(){return this.Ha},set:function(a){this.Ha=a}}}),Wo.prototype.replaceStandardTool=Wo.prototype.gb;var ih=new En(Wo,"WheelScroll",0),rh=new En(Wo,"WheelZoom",1),Od=new En(Wo,"WheelNone",2),Ch=new En(Wo,"GestureZoom",3),ic=new En(Wo,"GestureCancel",4),ro=new En(Wo,"GestureNone",5);Wo.className="ToolManager",Wo.WheelScroll=ih,Wo.WheelZoom=rh,Wo.WheelNone=Od,Wo.GestureZoom=Ch,Wo.GestureCancel=ic,Wo.GestureNone=ro;function ns(){Gr.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new Mt(NaN,NaN),this.Fr=new Mt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Nn().freeze(),this.ia=new pe,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var ku;qe(ns,Gr),ns.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},ns.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},ns.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(Nr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},ns.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),ht=null,this.isActive=!0,this.tl.set(a.position),qh(this,a.selection),this.Cg.length=0,a.animationManager.Cc(),this.draggedParts=this.computeEffectiveCollection(a.selection,this.dragOptions),this.Sw=this.diagram.layout.isRealtime,this.diagram.layout.isRealtime=!1,a.Ns=!0,a.Gf("temporaryPixelRatio")===!0&&30<a.$w&&Ba(a),Qf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,ht=this,bt=this.diagram,this.doSimulatedDragOut()))};function qh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof $n?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new Zn,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}ns.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},ns.prototype.Pd=function(a){return a===void 0?new ah(Ur):this.isGridSnapEnabled?new ah(new Mt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new ah(a.copy())},ns.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Au(this),od(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<ku.count){for(var y=ku,x=y.length,b=0;b<x;b++){var E=y.M(b);ps(E),Fl(E),Au(E),E.diagram.ug()}y.clear()}ps(this),this.tl.h(NaN,NaN),bt!==null&&(bt.currentCursor=""),ht=bt=null,Fl(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),nd(a,!0)},ns.prototype.stopTransaction=function(){var a=this.diagram,y=Gr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Au(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Id(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function ed(){var a=ht;Fl(a),rc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}ns.prototype.doCancel=function(){Fl(this),rc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},ns.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},ns.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function uu(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):rc(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new ci,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var te=y.I(E);te!==null&&(te.location=E.location,te.Va(),x.add(te,a.Pd(te.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof $n&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,qh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Bh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Fl(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof $n&&(x.value.point=new Mt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ps(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function Fs(a,y,x){var b=a.diagram,E=a.startPoint,te=Mt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),Mt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Ba(b),b.hk())}ns.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Ec(b,a,y,this.dragOptions,x)};function rc(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof $n&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Bh(b,-E.x,-E.y)}y.bd()}}function el(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Oa(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var te=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=Id(a,E,b),!a.isActive&&ht===null)return;var ae=b!==null?b.part:null;if(ae===null||x.handlesDragDropForTopLevelParts&&ae.isTopLevel&&!(ae instanceof ir)){var fe=x.mouseDragOver;fe!==null&&(fe(E),ne=!0)}if(!a.isActive&&ht===null||(a.doDragOver(y,b),!a.isActive&&ht===null))return}finally{x.skipsUndoManager=te,ne&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}ns.prototype.findDragOverObject=function(a){var y=this;return Ku(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof qr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},ns.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function Id(a,y,x){var b=!1,E=a.Cg.length,te=0<E?a.Cg[0]:null;if(x===te)return!1;y.handled=!1;for(var ne=0;ne<E;ne++){var ae=a.Cg[ne],fe=ae.mouseDragLeave;if(fe!==null&&(fe(y,ae,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&ht===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=td(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],ae=ne.mouseDragEnter,ae===null||(ae(y,ne,te),b=!0,!y.handled));x++);return b}function td(a){var y=a.panel;return y!==null?y:a instanceof Mi&&!(a instanceof ir)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Dd(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(_e){return b.findValidLinkablePort(_e,x)});a=Mt.alloc();var te=1/0,ne=null;for(E=E.iterator;E.next();){var ae=E.value;if(ae.part!==null){var fe=ae.ga(jr,a);fe=y.Bf(fe),fe<te&&(ne=ae,te=fe)}}return Mt.free(a),ne}function Oa(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var te=null,ne=null;x.fromNode===null&&(te=Dd(a,x.i(0),!1),te!==null&&(ne=te.part));var ae=null,fe=null;x.toNode===null&&(ae=Dd(a,x.i(x.pointsCount-1),!0),ae!==null&&(fe=ae.part)),E.isValidLink(ne,te,fe,ae)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,te!==null&&(x.fromPortId=te.portId),x.toNode=fe,ae!==null&&(x.toPortId=ae.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):wi(E,ne,te,fe,ae):wi(E,null,null,null,null)}}}}ns.prototype.doDragOver=function(){};function oc(a,y){var x=a.diagram;a.dragsLink&&Oa(a,!0),Au(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var te=b;te!==null;){var ne=te.mouseDrop;if(ne!==null&&(ne(E,te),E.handled))break;gf(a,E,te),te=td(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||ht!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof oi&&te.linksConnected.each(function(ae){ae.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||ht!==null){for(a=kn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof oi&&jt(x,b,a);kn.free(a)}}}function gf(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof ir||(x=a.mouseDrop,x!==null&&x(y))}function jt(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof $n},!0,function(E){return E instanceof $n},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}ns.prototype.doDropOnto=function(){},ns.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(uu(this,!1),Qf(a,this.copiedParts),Fs(this,this.copiedParts,!1),od(a,this.copiedParts)):this.mayMove()?(Fl(this),Fs(this,this.draggedParts,!0)):this.mayDragOut()?(uu(this,!1),Fs(this,this.copiedParts,!1)):Fl(this),el(this,a.lastInput.documentPoint))}},ns.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;if(!this.simulatedMouseUp(y.event,y.documentPoint,y.targetDiagram)){y=!1;var x=this.mayCopy();if(x&&this.copiedParts!==null?(Fl(this),uu(this,!0),Qf(a,this.copiedParts),Fs(this,this.copiedParts,!1),od(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,Fl(this),this.mayMove()&&(Fs(this,this.draggedParts,!0),el(this,a.lastInput.documentPoint))),this.Ym=!0,oc(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Ut(this),a.Ya(),od(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},ns.prototype.simulatedMouseMove=function(a,y,x){if(ht===null)return!1;var b=ht.diagram;x instanceof vn||(x=null);var E=bt;return x!==E&&(E!==null&&E!==b&&(E.ug(),ht.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),bt=x,x!==null&&x!==b&&(ed(),E=x.toolManager.findTool("Dragging"),E!==null&&(ku.contains(E)||ku.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,b.doSimulatedDragOver()),!0)},ns.prototype.simulatedMouseUp=function(a,y,x){if(ht===null)return!1;var b=bt,E=ht.diagram;if(x===null)return ht.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),ht.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;bt=x,b=x.toolManager.findTool("Dragging"),b!==null&&(ed(),ku.contains(b)||ku.add(b),b.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new Mt),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!0,a=x.toolManager.findTool("Dragging"),a!==null&&a.doSimulatedDrop(),a=ht,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function Ut(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof oi&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}ns.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Nr?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},ns.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},ns.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},ns.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},ns.prototype.Az=function(){return ht},ns.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ht;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},ns.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),fl(a),a.animationManager.Cc(),a=ht,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},ns.prototype.doSimulatedDragLeave=function(){var a=ht;a!==null&&a.doSimulatedDragOut(),this.doCancel()},ns.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ht;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;cn(this,y.draggedParts.Lf(),!1,a.firstInput),Fs(this,this.copiedParts,!1),el(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},ns.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ht;if(y!==null){var x=y.diagram;if(y.Ym=!0,Fl(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),cn(this,y.draggedParts.Lf(),!0,a.lastInput),Fs(this,this.copiedParts,!1);var b=new Nn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),oc(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function cn(a,y,x,b){if(a.copiedParts===null){var E=a.diagram;if(!E.isReadOnly&&!E.isModelReadOnly){E.skipsUndoManager=!x,E.partManager.addsToTemporaryLayer=!x,a.startPoint=b.documentPoint,x=E.Kj(y,E,!0);var te=kn.alloc();E=b=1/0;for(var ne=-1/0,ae=-1/0,fe=y.iterator;fe.next();){var _e=fe.value;if(_e.isVisible()){var Te=_e.location;_e=Te.x,Te=Te.y,isNaN(_e)||isNaN(Te)||(_e<b&&(b=_e),Te<E&&(E=Te),_e>ne&&(ne=_e),Te>ae&&(ae=Te))}}for(b===1/0?te.h(0,0,0,0):te.h(b,E,ne-b,ae-E),b=te.x+te.width/2,E=te.y+te.height/2,kn.free(te),te=a.Fr,ne=new ci,ae=Mt.alloc(),fe=y.iterator;fe.next();)_e=fe.value,_e instanceof $n&&_e.canCopy()&&(Te=x.I(_e),Te!==null&&(Te.points=_e.points,Bh(Te,te.x-b,te.y-E),Te.suspendsRouting=!0,ne.add(Te,a.Pd())));for(y=y.iterator;y.next();)_e=y.value,_e.Zc()&&_e.canCopy()&&(fe=x.I(_e),fe!==null&&(_e=_e.location,ae.h(te.x-(b-_e.x),te.y-(E-_e.y)),fe.location=ae,fe.Va(),ne.add(fe,a.Pd(ae))));Mt.free(ae),a.copiedParts=ne,qh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Bh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}ns.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},ns.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Mt},Ye.Object.defineProperties(ns.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink=a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V},set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return this.copiedParts!==null?this.copiedParts.Lf():this.draggedParts!==null?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink=a}},isDragOutStarted:{get:function(){return this.Hb},set:function(a){this.Hb=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}}}),ns.prototype.getDraggingSource=ns.prototype.Az;var ht=null,bt=null;ns.className="DraggingTool",ku=new Rn,Ri("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Wo.prototype.doCancel=function(){ht!==null&&ht.doCancel(),Gr.prototype.doCancel.call(this)};function Et(){Gr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new $n,y=new gr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new gr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new oi,y=new gr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=to,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new oi,y=new gr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=to,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new ci,this.Of=this.gj=this.Pf=null}qe(Et,Gr),Et.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Et.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=Xn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,Xn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=jr,te=Mt.alloc(),x.location=y.ga(jr,te),Mt.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Et.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=to,y.fromSpot=ms,y.toSpot=ms),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Et.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Et.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof oi){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Et.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof oi))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof oi)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Et.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,te=y.og(x,b,function(je){return E.findValidLinkablePort(je,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,ae=ne.part;if(ae instanceof oi){var fe=ne.ga(jr,Mt.alloc()),_e=x.x-fe.x,Te=x.y-fe.y;Mt.free(fe),fe=_e*_e+Te*Te,fe<b&&(_e=this.validPortsCache.I(ne),_e!==null?_e&&(y=ne,b=fe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,ae,ne)||!a&&this.isValidLink(ae,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=fe):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof oi&&(x.layer===null||x.layer.allowLink))?y:null},Et.prototype.isValidFrom=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.fromLinkable!==!0))return!1;var x=y.fromMaxLinks;if(1/0>x){if(this.originalLink!==null&&a===this.originalFromNode&&y===this.originalFromPort)return!0;if(y=y.portId,y===null&&(y=""),a.Mo(y).count>=x)return!1}return!0},Et.prototype.isValidTo=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.toLinkable!==!0))return!1;var x=y.toMaxLinks;if(1/0>x){if(this.originalLink!==null&&a===this.originalToNode&&y===this.originalToPort)return!0;if(y=y.portId,y===null&&(y=""),a.Sd(y).count>=x)return!1}return!0},Et.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Et.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof oi))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof oi))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},Et.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},Et.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var b=new Nn;return b.add(a),wn(this,x,y,b)};function wn(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),wn(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),wn(a,y.labeledLink,x,b))))}Et.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==bf){if(b===og){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!fn(this,a,y,x,!0)}if(b===sg){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!fn(this,a,y,x,!0)}if(b===ng)return a===y?a=!0:(b=new Nn,b.add(y),a=an(this,b,a,y,x)),!a;if(b===ig)return!fn(this,a,y,x,!1);if(b===rg)return a===y?a=!0:(b=new Nn,b.add(y),a=Sn(this,b,a,y,x)),!a}return!0};function fn(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var te=y.linksConnected;te.next();){var ne=te.value;if(ne!==b&&(!E||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&fn(a,ne,x,b,E)))return!0}return!1}function an(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&an(a,y,ne,b,E)))return!0}return!1}function Sn(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E){var ae=ne.fromNode;if(ne=ne.toNode,ae=ae===x?ne:ae,ae!==x&&Sn(a,y,ae,b,E))return!0}}return!1}Ye.Object.defineProperties(Et.prototype,{portGravity:{get:function(){return this.te},set:function(a){0<=a&&(this.te=a)}},isUnconnectedLinkValid:{get:function(){return this.Ha},set:function(a){this.Ha=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.Ci},set:function(a){this.Ci=a}},temporaryFromNode:{get:function(){return this.Bi},set:function(a){(this.Bi=a)&&(this.j=a.port)}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(this.j!==null){var y=this.j.panel;if(y!==null){var x=y.O.indexOf(this.j);y.mb(x),y.Gb(x,a)}}this.j=a}},temporaryToNode:{get:function(){return this.Di},set:function(a){(this.Di=a)&&(this.o=a.port)}},temporaryToPort:{get:function(){return this.o},set:function(a){if(this.o!==null){var y=this.o.panel;if(y!==null){var x=y.O.indexOf(this.o);y.mb(x),y.Gb(x,a)}}this.o=a}},originalLink:{get:function(){return this.Hb},set:function(a){this.Hb=a}},originalFromNode:{get:function(){return this.hb},set:function(a){this.hb=a}},originalFromPort:{get:function(){return this.ob},set:function(a){this.ob=a}},originalToNode:{get:function(){return this.Oc},set:function(a){this.Oc=a}},originalToPort:{get:function(){return this.Pc},set:function(a){this.Pc=a}},isForwards:{get:function(){return this.ia},set:function(a){this.ia=a}},validPortsCache:{get:function(){return this.hy}},targetPort:{get:function(){return this.Pf},set:function(a){this.Pf=a}},linkValidation:{get:function(){return this.gj},set:function(a){this.gj=a}},portTargeted:{get:function(){return this.Of},set:function(a){this.Of=a}}}),Et.className="LinkingBaseTool";function xn(){Et.call(this),this.name="Linking",this.V={},this.F=null,this.K=Cn,this.Xd=null}qe(xn,Et),xn.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.xs()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:this.findLinkablePort()!==null},xn.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof oi)))return null;var x=this.direction;if(x===Cn||x===zn){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===Cn||x===ni)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},xn.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof oi&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof oi&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},xn.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},xn.prototype.doStop=function(){Et.prototype.doStop.call(this),this.startObject=null},xn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,te=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var ae=ne.part;ae instanceof oi&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=ae,E=ne):(y=ae,x=ne,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(te=this.insertLink(y,x,b,E),te!==null?(ne===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),te.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",te)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),te&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},xn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof $n)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},xn.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},xn.prototype.doNoLink=function(){},Ye.Object.defineProperties(xn.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}});var Cn=new En(xn,"Either",0),zn=new En(xn,"ForwardsOnly",0),ni=new En(xn,"BackwardsOnly",0);xn.className="LinkingTool",xn.Either=Cn,xn.ForwardsOnly=zn,xn.BackwardsOnly=ni;function Zn(){Et.call(this),this.name="Relinking";var a=new gr;a.figure="Diamond",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new gr,a.figure="Diamond",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new kn}qe(Zn,Et),Zn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof $n){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Zn.prototype.makeAdornment=function(a,y){var x=new qr;return x.type=Wn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Zn.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!a.lastInput.left)return!1;var y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");return y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")),y!==null},Zn.prototype.doActivate=function(){var a=this.diagram;if(this.originalLink===null){var y=this.handle;if(y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"))),y===null)return;var x=y.part;if(!(x instanceof qr&&x.adornedPart instanceof $n))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=ar),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=ar),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},Zn.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===bp||x===Fh)&&(x=ol),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},Zn.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},Zn.prototype.doStop=function(){Et.prototype.doStop.call(this),this.handle=null},Zn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,b=this.originalToNode,E=this.originalToPort,te=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof oi&&(this.isForwards?(b=ne,E=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:te=null;te!==null?(this.reconnectLink(te,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint,te.bb()),this.transactionResult=this.name,a.R("LinkRelinked",te,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Zn.prototype.reconnectLink=function(a,y,x,b){return x=x!==null&&x.portId!==null?x.portId:"",b?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Zn.prototype.doNoRelink=function(){};function wi(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Ye.Object.defineProperties(Zn.prototype,{fromHandleArchetype:{get:function(){return this.V},set:function(a){this.V=a}},toHandleArchetype:{get:function(){return this.Xd},set:function(a){this.Xd=a}},handle:{get:function(){return this.F},set:function(a){if(a!==null&&!(a.part instanceof qr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Zn.className="RelinkingTool",Ri("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Ri("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Kn(){Gr.call(this),this.name="LinkReshaping";var a=new gr;a.figure="Rectangle",a.desiredSize=Ro,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new gr,a.figure="Diamond",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Mt,this.Yq=new Rn}qe(Kn,Gr),Kn.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:si},Kn.prototype.om=function(a,y){a.reshapingBehavior=y},Kn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof $n){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},Kn.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new qr,E.type=Wn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==ou)for(var ae=x+ne;ae<te-ne;ae++){var fe=this.makeResegmentHandle(a,ae);fe!==null&&(fe.segmentIndex=ae,fe.segmentFraction=.5,fe.fromMaxLinks=999,E.add(fe))}for(ne=x+1;ne<te;ne++)if(ae=this.makeHandle(a,ne),ae!==null){if(ae.segmentIndex=ne,ne!==x)if(ne===x+1&&b){fe=y.i(x);var _e=y.i(x+1);on.B(fe.x,_e.x)&&on.B(fe.y,_e.y)&&(_e=y.i(x-1)),on.B(fe.x,_e.x)?(this.om(ae,Ni),ae.cursor="n-resize"):on.B(fe.y,_e.y)&&(this.om(ae,Ii),ae.cursor="w-resize")}else ne===te-1&&b?(fe=y.i(te-1),_e=y.i(te),on.B(fe.x,_e.x)&&on.B(fe.y,_e.y)&&(fe=y.i(te+1)),on.B(fe.x,_e.x)?(this.om(ae,Ni),ae.cursor="n-resize"):on.B(fe.y,_e.y)&&(this.om(ae,Ii),ae.cursor="w-resize")):ne!==te&&(this.om(ae,Gi),ae.cursor="move");E.add(ae)}E.adornedObject=a}return E},Kn.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Kn.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Kn.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Kn.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof $n){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},Kn.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Kn.prototype.stopTransaction=function(){var a=this.diagram,y=Gr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Kn.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Kn.prototype.getResegmentingPoint=function(){return this.handle.ga(jr)},Kn.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Kn.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,b=y.i(x-1),E=y.i(x),te=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(gi(this,ne,b,E,te,!0)||gi(this,ne,b,E,te,!1))){var ae=y.points.copy();gi(this,ne,b,E,te,!0)?(ae.cd(x-2,new Mt(ne.x,(te.y+ne.y)/2)),ae.cd(x+1,new Mt(te.x,(te.y+ne.y)/2))):(ae.cd(x-2,new Mt((te.x+ne.x)/2,ne.y)),ae.cd(x+1,new Mt((te.x+ne.x)/2,te.y))),ae.mb(x),ae.mb(x-1),y.points=ae,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-te.x)<this.resegmentingDistance&&Math.abs(E.y-te.y)<this.resegmentingDistance&&(gi(this,b,E,te,ne,!0)||gi(this,b,E,te,ne,!1))&&(ae=y.points.copy(),gi(this,b,E,te,ne,!0)?(ae.cd(x-1,new Mt(b.x,(b.y+ne.y)/2)),ae.cd(x+2,new Mt(ne.x,(b.y+ne.y)/2))):(ae.cd(x-1,new Mt((b.x+ne.x)/2,b.y)),ae.cd(x+2,new Mt((b.x+ne.x)/2,ne.y))),ae.mb(x+1),ae.mb(x),y.points=ae,y.Wb())}}else ne=Mt.alloc(),on.qh(b.x,b.y,te.x,te.y,E.x,E.y,ne)&&ne.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),Mt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function gi(a,y,x,b,E,te){return te?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}Kn.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===Ni?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Ii&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,b===Ni?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Ii&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),te=y.i(b-1),ne=y.i(b+1);on.B(te.x,E.x)&&on.B(E.y,ne.y)?(on.B(te.x,y.i(b-2).x)&&!on.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),on.B(ne.y,y.i(b+2).y)&&!on.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):on.B(te.y,E.y)&&on.B(E.x,ne.x)?(on.B(te.y,y.i(b-2).y)&&!on.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),on.B(ne.x,y.i(b+2).x)&&!on.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):on.B(te.x,E.x)&&on.B(E.x,ne.x)?(on.B(te.x,y.i(b-2).x)&&!on.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),on.B(ne.x,y.i(b+2).x)&&!on.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):on.B(te.y,E.y)&&on.B(E.y,ne.y)&&(on.B(te.y,y.i(b-2).y)&&!on.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),on.B(ne.y,y.i(b+2).y)&&!on.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(te=E.ga(jr,Mt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,Mt.alloc()),y.L(0,b.x,b.y),Mt.free(te),Mt.free(b)),b=y.toNode,E=y.toPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(jr,Mt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Mt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Mt.free(x),Mt.free(a));y.zf()},Kn.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Gi:return a;case Ni:return new Mt(y.i(x).x,a.y);case Ii:return new Mt(a.x,y.i(x).y);default:case si:return y.i(x)}},Ye.Object.defineProperties(Kn.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof qr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),Kn.prototype.setReshapingBehavior=Kn.prototype.om,Kn.prototype.getReshapingBehavior=Kn.prototype.Ru;var si=new En(Kn,"None",0),Ii=new En(Kn,"Horizontal",1),Ni=new En(Kn,"Vertical",2),Gi=new En(Kn,"All",3);Kn.className="LinkReshapingTool",Kn.None=si,Kn.Horizontal=Ii,Kn.Vertical=Ni,Kn.All=Gi,Ri("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function ki(){Gr.call(this),this.name="Resizing",this.o=new Xn(1,1).freeze(),this.j=new Xn(9999,9999).freeze(),this.yg=new Xn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new gr;a.alignmentFocus=jr,a.figure="Rectangle",a.desiredSize=Ro,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Mt,this.Dw=new Xn,this.Tn=new Mt,this.rt=new Xn(0,0),this.qt=new Xn(1/0,1/0),this.pt=new Xn(1,1)}qe(ki,Gr),ki.prototype.updateAdornments=function(a){if(!(a===null||a instanceof $n)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),hd(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},ki.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new qr,y.type=Wn.Spot,y.locationSpot=jr;var x=new rl;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Xs)),y.add(this.makeHandle(a,wl)),y.add(this.makeHandle(a,Na)),y.add(this.makeHandle(a,Ia)),y.add(this.makeHandle(a,bs)),y.add(this.makeHandle(a,Zs)),y.add(this.makeHandle(a,Ks)),y.add(this.makeHandle(a,ks))}else if(Ru(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ki.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},ki.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=jr),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break e;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Wn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ki.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},ki.prototype.doActivate=function(){var a=this.diagram;this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null&&(this.adornedObject=this.handle.part.adornedObject,this.adornedObject!==null&&(a.isMouseCaptured=!0,a.animationManager.Cc(),this.Ea(this.name),this.Xq.set(this.adornedObject.ga(this.handle.alignment.gv())),this.Tn.set(this.adornedObject.part.location),this.Dw.set(this.adornedObject.desiredSize),this.pt=this.computeCellSize(),this.rt=this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))},ki.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ki.prototype.stopTransaction=function(){var a=this.diagram,y=Gr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ki.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ki.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Mt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),Mt.free(E)}},ki.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Mt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),Mt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ki.prototype.resize=function(a){var y=this.diagram,x=this.adornedObject;if(x!==null){if(x.desiredSize=a.size,a=x.part,a.Va(),x=x.ga(this.handle.alignment.gv()),a instanceof ir){var b=new Rn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new pe;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},ki.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=jr);var ne=this.adornedObject.naturalBounds,ae=ne.x,fe=ne.y,_e=ne.x+ne.width,Te=ne.y+ne.height,je=1;if(!te){je=ne.width;var Ve=ne.height;0>=je&&(je=1),0>=Ve&&(Ve=1),je=Ve/je}return Ve=Mt.alloc(),on.No(a.x,a.y,ae,fe,E.width,E.height,Ve),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Ve.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=Math.max(_e-a.x,x.width),a.y=Math.max(Ve.y,Te-b.height),a.y=Math.min(a.y,Te-x.height),a.height=Math.max(Te-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je):(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width),a.x=_e-a.width,a.y=Te-a.height)):1<=y.y?(a.x=Math.max(Ve.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=Math.max(_e-a.x,x.width),a.height=Math.max(Math.min(Ve.y-fe,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je):(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width),a.x=_e-a.width)):(a.x=Math.max(Ve.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=_e-a.x,te||(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je,a.y=fe+.5*(Te-fe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Ve.x-ae,b.width),x.width),a.y=Math.max(Ve.y,Te-b.height),a.y=Math.min(a.y,Te-x.height),a.height=Math.max(Te-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je):(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width),a.y=Te-a.height)):1<=y.y?(a.width=Math.max(Math.min(Ve.x-ae,b.width),x.width),a.height=Math.max(Math.min(Ve.y-fe,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je):(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width))):(a.width=Math.max(Math.min(Ve.x-ae,b.width),x.width),te||(a.height=Math.max(Math.min(je*a.width,b.height),x.height),a.width=a.height/je,a.y=fe+.5*(Te-fe-a.height))):0>=y.y?(a.y=Math.max(Ve.y,Te-b.height),a.y=Math.min(a.y,Te-x.height),a.height=Te-a.y,te||(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width,a.x=ae+.5*(_e-ae-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Ve.y-fe,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/je,b.width),x.width),a.height=je*a.width,a.x=ae+.5*(_e-ae-a.width))),Mt.free(Ve),a},ki.prototype.computeReshape=function(){var a=Fn;return this.adornedObject instanceof gr&&(a=_v(this.adornedObject)),!(a===mi||this.diagram.lastInput.shift)},ki.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),y=this.minSize;return!isNaN(y.width)&&y.width>a.width&&(a.width=y.width),!isNaN(y.height)&&y.height>a.height&&(a.height=y.height),a},ki.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.width<a.width&&(a.width=y.width),!isNaN(y.height)&&y.height<a.height&&(a.height=y.height),a},ki.prototype.computeCellSize=function(){var a=new Xn(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},Ye.Object.defineProperties(ki.prototype,{handleArchetype:{get:function(){return this.F},set:function(a){this.F=a}},handle:{get:function(){return this.u},set:function(a){if(a!==null&&!(a.part instanceof qr))throw Error("new handle is not in an Adornment: "+a);this.u=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof qr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},minSize:{get:function(){return this.o},set:function(a){if(!this.o.D(a)){var y=a.width;isNaN(y)&&(y=0),a=a.height,isNaN(a)&&(a=0),this.o.h(y,a)}}},maxSize:{get:function(){return this.j},set:function(a){if(!this.j.D(a)){var y=a.width;isNaN(y)&&(y=1/0),a=a.height,isNaN(a)&&(a=1/0),this.j.h(y,a)}}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||this.yg.assign(a)}},isGridSnapEnabled:{get:function(){return this.V},set:function(a){this.V=a}},dragsMembers:{get:function(){return this.ia},set:function(a){this.ia=a}},oppositePoint:{get:function(){return this.Xq},set:function(a){this.Xq.D(a)||this.Xq.assign(a)}},originalDesiredSize:{get:function(){return this.Dw}},originalLocation:{get:function(){return this.Tn}}}),ki.className="ResizingTool",Ri("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ai(){Gr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Mt,this.ue=null;var a=new gr;a.figure="Ellipse",a.desiredSize=Bo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Mt(NaN,NaN),this.u=0,this.F=50}qe(Ai,Gr),Ai.prototype.updateAdornments=function(a){if(a!==null){if(a.ph()){var y=a.rotateObject;if(y===a||y===a.path||y.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(y=a.rotateObject,y!==null&&a.canRotate()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed())){var x=a.Pj(this.name);if((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null){x.angle=y.li(),x.placeholder===null&&(x.location=this.computeAdornmentLocation(y)),a.bh(this.name,x);return}}a.Jf(this.name)}},Ai.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new qr,y.type=Wn.Position,y.locationSpot=jr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Ru(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ai.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Ai.prototype.doActivate=function(){var a=this.diagram;if(this.adornedObject===null){if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle===null)return;this.adornedObject=this.handle.part.adornedObject}this.adornedObject!==null&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.Ea(this.name),this.Cw=this.adornedObject.angle,this.kr=this.computeRotationPoint(this.adornedObject),this.Tn=this.adornedObject.part.location.copy(),this.isActive=!0)},Ai.prototype.computeRotationPoint=function(a){var y=a.part,x=y.locationObject;return y.rotationSpot.sb()?a.ga(y.rotationSpot):a===y||a===x?x.ga(y.locationSpot):a.ga(jr)},Ai.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},Ai.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Mt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ai.prototype.stopTransaction=function(){var a=this.diagram,y=Gr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ai.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ai.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ai.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var y=this.computeRotate(a.lastInput.documentPoint);this.rotate(y),a.Ya(),this.transactionResult=this.name,a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()},Ai.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Ai.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},Ye.Object.defineProperties(Ai.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof qr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof qr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Cw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u=a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}}),Ai.className="RotatingTool",Ri("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function ur(){Gr.call(this),this.name="ClickSelecting"}qe(ur,Gr),ur.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},ur.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},ur.className="ClickSelectingTool";function Qn(){Gr.call(this),this.name="Action",this.pk=null}qe(Qn,Gr),Qn.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},Qn.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionDown!==null&&y.actionDown(a,y))}else this.canStart()&&this.doActivate()},Qn.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionMove!==null&&y.actionMove(a,y))}},Qn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;if(y===null)return;a.targetObject=y,y.actionUp!==null&&y.actionUp(a,y),this.standardMouseClick(function(x){for(;x.panel!==null&&(!x.isActionable||x!==y);)x=x.panel;return x},function(x){return x===y})}this.stopTool()},Qn.prototype.doCancel=function(){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionCancel!==null&&y.actionCancel(a,y),this.stopTool())},Qn.prototype.doStop=function(){this.pk=null},Qn.className="ActionTool";function ji(){Gr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Mt(0,0)}qe(ji,Gr),ji.prototype.canStart=function(){if(!this.isEnabled||this.archetypeNodeData===null)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(a.lastInput.clickCount===1&&(this.mw=a.lastInput.viewPoint.copy()),a.lastInput.clickCount!==2||this.isBeyondDragSize(this.mw))return!1}else if(a.lastInput.clickCount!==1)return!1;return!(a.currentTool!==this&&a.Ol(a.lastInput.documentPoint,!0)!==null)},ji.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},ji.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Mi)x.Zc()&&(Ru(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);$t(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=Mt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Jf(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Mt.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Ye.Object.defineProperties(ji.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}}),ji.className="ClickCreatingTool";function Ei(){Gr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Mi;a.layerName="Tool",a.selectable=!1;var y=new gr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}qe(Ei,Gr),Ei.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var y=a.lastInput;return!(!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.timestamp-a.firstInput.timestamp<this.delay||a.Ol(y.documentPoint,!0)!==null))},Ei.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Ei.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Ei.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var b=Xn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Xn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Ei.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;a.remove(this.box);try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),this.selectInRect(this.computeBoxBounds()),a.R("ChangedSelection",a.selection)}finally{a.currentCursor=""}}this.stopTool()},Ei.prototype.computeBoxBounds=function(){var a=this.diagram;return new kn(a.firstInput.documentPoint,a.lastInput.documentPoint)},Ei.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Nr?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new Rn,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Ye.Object.defineProperties(Ei.prototype,{delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}},isPartialInclusion:{get:function(){return this.o},set:function(a){this.o=a}},box:{get:function(){return this.j},set:function(a){this.j=a}}}),Ei.className="DragSelectingTool";function bi(){Gr.call(this),this.name="Panning",this.Xt=new Mt,this.xy=new Mt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(_t.document,"scroll",a.Kw,!1),a.stopTool()}}qe(bi,Gr),bi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!(!a.allowHorizontalScroll&&!a.allowVerticalScroll||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize())},bi.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(_t.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},bi.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},bi.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},bi.prototype.doMouseMove=function(){this.move()},bi.prototype.doMouseUp=function(){this.move(),this.stopTool()},bi.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},Ye.Object.defineProperties(bi.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),bi.className="PanningTool",Ri("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Ri("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Ri("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Ri("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Ri("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Ji(){this.F=this.u=this.j=this.o=null}Ye.Object.defineProperties(Ji.prototype,{mainElement:{get:function(){return this.u},set:function(a){this.u=a}},show:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},hide:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},valueFunction:{get:function(){return this.F},set:function(a){this.F=a}}}),Ji.className="HTMLInfo";function pi(a,y,x){this.text=a,this.hx=y,this.visible=x}pi.className="ContextMenuButtonInfo";function cr(){Gr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Mt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}qe(cr,Gr);function Qi(a){var y=new Ji;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},xo=y,a.tu=function(){a.stopTool()},y=sn("div");var x=sn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var b=sn("style");_t.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",Pi,!1),b.addEventListener(y,"selectstart",Pi,!1),b.addEventListener(x,"contextmenu",Pi,!1)),y.className="goCXforeground",x.className="goCXbackground",_t.document.body&&(_t.document.body.appendChild(y),_t.document.body.appendChild(x)),so=y,is=x,Po=!0}function Pi(a){return a.preventDefault(),!1}cr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return this.isBeyondDragSize()||!a.lastInput.right||1<a.lastInput.clickCount?!1:!!(a.lastInput.isTouchEvent&&this.defaultTouchContextMenu!==null||this.findObjectWithContextMenu()!==null)},cr.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},cr.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},cr.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof vn||(a instanceof nn?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},cr.prototype.doActivate=function(){},cr.prototype.doMouseDown=function(){if(Gr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof qr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Wi(this)},cr.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof qr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Wi(this)};function Wi(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Ji||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Sr(a,!0),a.isActive||a.stopTool())}cr.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Sr(a,y,x){if(x===void 0&&(x=null),!a.Et&&(a.Et=!0,y&&a.standardMouseSelect(),y=a.standardMouseClick(),a.Et=!1,!y)){if(a.isActive=!0,y=xo,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof nn?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof qr&&!a.currentContextMenu.visible&&a.stopTool()}}cr.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},cr.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof qr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Ji&&a.show(y,x,this);this.currentContextMenu=a},cr.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y+b.height>E.bottom&&(x.y-=b.height+5/y.scale),x.y<E.y&&(x.y=E.y),a.position=x}},cr.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof qr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ji&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function nr(a){var y=new Rn;return y.add(new pi("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new pi("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new pi("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new pi("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new pi("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new pi("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new pi("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new pi("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new pi("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new pi("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new pi("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new pi("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new pi("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}cr.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=nr(this)),so.innerHTML="",is.addEventListener("pointerdown",this.tu,!1);var y=this,x=sn("ul");x.className="goCXul",so.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,te=E.visible;if(typeof E.hx=="function"&&(typeof te!="function"||te(a))){te=sn("li"),te.className="goCXli";var ne=sn("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(ae){return this.ky(a),y.stopTool(),ae.preventDefault(),!1},!1),ne.textContent=E.text,te.appendChild(ne),x.appendChild(te)}}so.style.display="block",is.style.display="block"},cr.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===xo){so.style.display="none",is.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(is,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ye.Object.defineProperties(cr.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof qr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Po===!1&&xo===null&&ys&&Qi(this),xo},set:function(a){a===null&&(Po=!0),xo=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var xo=null,Po=!1,is=null,so=null;cr.className="ContextMenuTool",Ri("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Tr(){Gr.call(this),this.name="TextEditing",this.Zh=new To,this.ia=null,this.V=Cr,this.vj=null,this.qa=Lr,this.u=1,this.F=!0,this.o=null,this.j=new Ji,this.kt=null,Oo(this,this.j)}qe(Tr,Gr);function Oo(a,y){if(ys){var x=sn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(Er)):E==="Tab"?(a.acceptText(Wr),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Lr){var b=a.kt;a.qa===fo&&(a.qa=Zo),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Lr){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,te){if(b instanceof To&&te instanceof Tr)if(te.state===Qr)x.style.border="3px solid red",x.focus();else{var ne=b.ga(jr),ae=E.position,fe=E.scale,_e=b.Df()*fe;_e<te.minimumEditorScale&&(_e=te.minimumEditorScale);var Te=b.naturalBounds.width*_e+6,je=b.naturalBounds.height*_e+2,Ve=(ne.x-ae.x)*fe;ne=(ne.y-ae.y)*fe,ae=b.verticalAlignment,fe=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*_e,je=ae.y*je-ae.y*fe+ae.offsetY-(.5*je-.5*fe)-fe/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*_e+"%",x.style.lineHeight="normal",x.style.width=Te+"px",x.style.left=(Ve-Te/2|0)-1+"px",x.style.top=(ne+je|0)-1+"px",x.style.textAlign=b.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=b.lineCount,x.wA=_e,x.className="goTXarea",E.div.appendChild(x),x.focus(),te.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}Tr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Cs&&Cs!==this&&(Cs.acceptText(rs),Cs&&Cs!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof To&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Cr&&!y.isSelected||this.starting===ao&&2>a.lastInput.clickCount)):!1},Tr.prototype.doStart=function(){Cs=this,this.textBlock!==null&&this.doActivate()},Tr.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof To&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=fo;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new kn(this.textBlock.ga(Xs),this.textBlock.ga(Na));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Tr.prototype.doCancel=function(){this.stopTool()},Tr.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Tr.prototype.doMouseDown=function(){this.isActive&&this.acceptText(rs)},Tr.prototype.acceptText=function(a){switch(a){case rs:this.qa===Do?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===fo||this.qa===Qr||this.qa===Zo)&&(this.qa=Ko,Or(this));break;case Xr:case Er:case Wr:(Er!==a||this.textBlock.isMultiline!==!0)&&(this.qa===fo||this.qa===Qr||this.qa===Zo)&&(this.qa=Ko,Or(this))}};function Or(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,te="";b.valueFunction!==null&&(te=b.valueFunction()),a.isValidText(y,E,te)?(a.Ea(a.name),a.qa=Do,a.transactionResult=a.name,y.text=te,a.doSuccess(E,te),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Qr,a.doError(E,te))}}Tr.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},Tr.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Tr.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Lr,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Tr.prototype.doStop=function(){Cs=null},Tr.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},Tr.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ye.Object.defineProperties(Tr.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),Tr.prototype.measureTemporaryTextBlock=Tr.prototype.Lx;var Xr=new En(Tr,"LostFocus",0),rs=new En(Tr,"MouseDown",1),Wr=new En(Tr,"Tab",2),Er=new En(Tr,"Enter",3),Jr=new En(Tr,"SingleClick",0),Cr=new En(Tr,"SingleClickSelected",1),ao=new En(Tr,"DoubleClick",2),Lr=new En(Tr,"StateNone",0),fo=new En(Tr,"StateActive",1),Zo=new En(Tr,"StateEditing",2),Ko=new En(Tr,"StateValidating",3),Qr=new En(Tr,"StateInvalid",4),Do=new En(Tr,"StateValidated",5),Cs=null;Tr.className="TextEditingTool",Tr.LostFocus=Xr,Tr.MouseDown=rs,Tr.Tab=Wr,Tr.Enter=Er,Tr.SingleClick=Jr,Tr.SingleClickSelected=Cr,Tr.DoubleClick=ao,Tr.StateNone=Lr,Tr.StateActive=fo,Tr.StateEditing=Zo,Tr.StateValidating=Ko,Tr.StateInvalid=Qr,Tr.StateValidated=Do,Ri("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Mo(a){jl||(_l(),jl=!0),this.H=ac,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=cu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Nn,this.ce=new gs,this.ce.Yd=this,this.Ei=new Nn,this.pu=new Nn,this.Sr=new Nn,this.pr=new Nn,a&&Object.assign(this,a)}Mo.prototype.Xe=function(a){this.H=a},Mo.prototype.canStart=function(){return!0};function Jo(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ba(a.H),a.zb=!0)}function Ss(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===cu?(y.isViewportUnconstrained=!0,y.vc.clear(),y.add(x,"position",x.position.copy().offset(0,-200),x.position),y.add(x,"opacity",0,1)):a.Pk===Jl&&y.vc.clear(),a.Qw=!!(a.Pk===hu&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),Ra(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==$a&&b!==null&&(delete b.start.scale,delete b.end.scale),_t.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ba(x),Bd(x),a.zb=!1,y.start(),y.bc&&(xs(a),x.Ya(),_c(y,0),fl(x,!0),Ts(a),x.R("AnimationStarting",a)))}))}}function Js(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Pl(a,y,x,b){a.isTicking||Js(a)||y instanceof $n&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}rt=Mo.prototype,rt.fv=function(a){return this.ce.fv(a)},rt.Xu=function(a){return this.ce.Xu(a)};function Qo(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var te=E.pu.iterator;te.next();){var ne=te.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var ae=!0;else{for(ae=ne.vc.iterator;ae.next();){var fe=ae.key;if(fe instanceof nn&&fe.diagram!==null||fe instanceof vn){ae=!0;break e}}ae=!1}ae?Ql(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(xs(E),fl(E.H),Ts(E)),_t.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),_t.requestAnimationFrame(function(){x()}))}function qo(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function xs(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Ts(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}rt.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),Ra(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Ra(y,this.H)},rt.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},rt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),As(this,a))},rt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),oa(this.ce,y,"position",y.position,y.position),As(this,a))};function ma(a,y,x){!a.zb||y.D(x)||Js(a)||(a.H.pi||(y=x.copy()),oa(a.ce,a.H,"position",y,x))}function jo(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function As(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function La(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var te=a[0],ne=a[1],ae=a[2];a=a[3];var fe=y[0],_e=y[1],Te=y[2];return y=y[3],ae===0||ae===100?(te=fe,ne=_e):(Te===0||Te===100)&&(fe=te,_e=ne),180<Math.abs(fe-te)&&(fe>te?te+=360:fe+=360),te=E(x,te,fe-te,b)%360,ne=E(x,ne,_e-ne,b),ae=E(x,ae,Te-ae,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+ae+"%, "+x+")"}function _l(){function a(x,b,E,te,ne,ae){x.position=new Mt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}var y=new ci;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,te,ne,ae){ne<ae?x.mm(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae),!1):x.position=new Mt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}),y.add("location",function(x,b,E,te,ne,ae){ne<ae?x.mm(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae),!0):x.location=new Mt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}),y.add("position:placeholder",function(x,b,E,te,ne,ae){ne<ae?x.mm(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae),!1):x.position=new Mt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}),y.add("position:nodeCollapse",function(x,b,E,te,ne,ae){var fe=x.actualBounds,_e=E.actualBounds;E=_e.x+_e.width/2-fe.width/2,fe=_e.y+_e.height/2-fe.height/2,ne<ae?x.mm(te(ne,b.x,E-b.x,ae),te(ne,b.y,fe-b.y,ae),!1):x.position=new Mt(te(ne,b.x,E-b.x,ae),te(ne,b.y,fe-b.y,ae))}),y.add("desiredSize",function(x,b,E,te,ne,ae){x.desiredSize=new kn(te(ne,b.width,E.width-b.width,ae),te(ne,b.height,E.height-b.height,ae))}),y.add("width",function(x,b,E,te,ne,ae){x.width=te(ne,b,E-b,ae)}),y.add("height",function(x,b,E,te,ne,ae){x.height=te(ne,b,E-b,ae)}),y.add("fill",function(x,b,E,te,ne,ae){x.fill=La(b,E,ne,ae,te)}),y.add("stroke",function(x,b,E,te,ne,ae){x.stroke=La(b,E,ne,ae,te)}),y.add("strokeWidth",function(x,b,E,te,ne,ae){x.strokeWidth=te(ne,b,E-b,ae)}),y.add("strokeDashOffset",function(x,b,E,te,ne,ae){x.strokeDashOffset=te(ne,b,E-b,ae)}),y.add("background",function(x,b,E,te,ne,ae){x.background=La(b,E,ne,ae,te)}),y.add("areaBackground",function(x,b,E,te,ne,ae){x.areaBackground=La(b,E,ne,ae,te)}),y.add("opacity",function(x,b,E,te,ne,ae){x.opacity=te(ne,b,E-b,ae)}),y.add("scale",function(x,b,E,te,ne,ae){x.scale=te(ne,b,E-b,ae)}),y.add("angle",function(x,b,E,te,ne,ae){x.angle=te(ne,b,E-b,ae)}),Xl=y}Ye.Object.defineProperties(Mo.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&Ln(a,">= 1",Mo,"duration"),this.Dg=a}},isAnimating:{get:function(){return this.bc}},isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Pk},set:function(a){this.Pk=a}}}),Mo.prototype.stopAnimation=Mo.prototype.Cc;var Xl=null,jl=!1,cu=new En(Mo,"Default",1),hu=new En(Mo,"AnimateLocations",2),Jl=new En(Mo,"None",3);Mo.className="AnimationManager",Mo.defineAnimationEffect=function(a,y){jl||(_l(),jl=!0),Xl.add(a,y)},Mo.Default=cu,Mo.AnimateLocations=hu,Mo.None=Jl;function gs(a){this.vu=this.Nw=this.Yd=this.H=null,this.Xk=this.bc=this.j=!1,this.cn=this.Qd=0,this.Lp=this.ot=du,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Ur,this.vc=new ci,this.Tt=new ci,this.yl=new Nn,this.Ut=new Nn,this.dw=Th,a&&Object.assign(this,a)}gs.prototype.suspend=function(){this.Xk=!0},gs.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Ql(this,!0),xs(this.Yd),fl(this.H),Ts(this.Yd),this.H.redraw()};function Ra(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}rt=gs.prototype,rt.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof vn?a=x:x instanceof nn&&(a=x.diagram))}if(a!==null)this.H=a,this.Yd=a.animationManager;else return this;return y=this.Yd,y.isEnabled===!1?this:(this.Gd=isNaN(this.Dg)?y.duration:this.Dg,this.Lp=this.ot,y.Ok&&y.Pk===cu&&this===y.defaultAnimation&&(this.Lp=Zu,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Cf),xs(y),this.yl.each(function(b){b.data=null,a.add(b)}),Ts(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Qo(y,this),this)},rt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},rt.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof vn?this.H=a:a instanceof nn&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Mi){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return oa(this,a,y,x,b,E),this};function oa(a,y,x,b,E,te){var ne=a.vc;if(y instanceof vn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(uh(b),av(),b=[ru.j,ru.u,ru.o,ru.F],uh(E),av(),E=[ru.j,ru.u,ru.o,ru.F]),ne.contains(y)){var ae=ne.I(y),fe=ae.start,_e=ae.end;fe[x]===void 0&&(fe[x]=Ns(b)),_e[x]=Ns(E)}else fe={},_e={},fe[x]=Ns(b),_e[x]=Ns(E),ae=fe.position,y instanceof nn&&ae instanceof Mt&&!ae.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ae.assign(_e.position),ae=new sc(fe,_e,te),ne.add(y,ae);ne=fe[x],ne instanceof Mt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof Mi?ae.Ku.location=Ns(y.location):te&&(ae.Ku[x]=Ns(b))}function Ns(a){return a instanceof Mt||a instanceof Xn?a.copy():a}rt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},rt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Ql(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),xs(x),_c(a,E),fl(a.H,!0),Ts(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function _c(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof nn&&te.diagram===null)){var ne=b.value,ae=E?ne.end:ne.start;ne=E?ne.start:ne.end;var fe=Xl,_e;for(_e in ne)_e==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||fe.get(_e)===null||fe.get(_e)(te,ae[_e],ne[_e],a.Lp,y,x,a)}}}rt.stop=function(){return this.bc?(this.Ml(!0),this):this},rt.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,xs(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var te=Xl;b.next();){var ne=b.key,ae=b.value,fe=E?ae.end:ae.start,_e=E?ae.start:ae.end,Te=ae.Ku,je;for(je in _e)if(te.get(je)!==null){var Ve=je;!ae.Hu||Ve!=="position:nodeCollapse"&&Ve!=="position:placeholder"||(Ve="position"),te.get(Ve)(ne,fe[je],Te[je]!==void 0?Te[je]:ae.Hu?fe[je]:_e[je],this.Lp,this.Gd,this.Gd,this)}ae.Hu&&Te.location!==void 0&&ne instanceof Mi&&(ne.location=Te.location),ae.nv&&ne instanceof Mi&&ne.Zb(!1)}if(y.As.clear(),nd(y,!1),y.Ya(),y.N(),fl(y,!0),x.defaultAnimation===this){for(je=x.pr.iterator;je.next();)E=je.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}fl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Ts(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Ra(this,null),x.Ml(this),y.$b())}},rt.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof ir&&(b=y.placeholder),b!==null?(x=b.ga(Xs),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Mt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof ir)for(a=a.memberParts;a.next();)b=a.value,b instanceof oi&&this.Cj(b,y)},rt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof ir&&(x=y.placeholder),x!==null){var b=x.ga(Xs);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof ir)for(a=a.memberParts;a.next();)b=a.value,b instanceof oi&&this.Aj(b,y)}},rt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ye.Object.defineProperties(gs.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Ln(a,">= 1",gs,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:Nt("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),gs.prototype.getTemporaryState=gs.prototype.Ez,gs.prototype.stop=gs.prototype.stop,gs.prototype.add=gs.prototype.add,gs.prototype.addTemporaryPart=gs.prototype.Iy;function du(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Zu(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}gs.className="Animation",gs.EaseLinear=function(a,y,x,b){return x*a/b+y},gs.EaseInOutQuad=du,gs.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},gs.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},gs.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},gs.EaseOutExpo=Zu;function sc(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}sc.className="AnimationState";function zl(a,y,x){this.xd=null,this.rf=a,this.so=x||js,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=wa))}zl.prototype.copy=function(){var a=new zl(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function ls(a,y){a=a.uk,a!==null&&(a.duration&&(y.duration=a.duration),a.finished&&(y.finished=a.finished),a.easing&&(y.easing=a.easing))}Ye.Object.defineProperties(zl.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var js=new En(zl,"Default",1),wa=new En(zl,"Immediate",2),zs=new En(zl,"Bundled",3);zl.className="AnimationTrigger",zl.Default=js,zl.Immediate=wa,zl.Bundled=zs;function os(a){vr(this),this.H=null,this.Pa=new Rn,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}rt=os.prototype,rt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,za(x)}a.clear(),this.Zq.length=0},rt.Xe=function(a){this.H=a},rt.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,te=0,ne=0,ae=this.Pa.iterator;ae.next();){var fe=ae.value;fe instanceof ir?E++:fe instanceof oi?b++:fe instanceof $n?te++:fe instanceof qr?ne++:x++}if(ae="",0<x&&(ae+=x+" Parts "),0<b&&(ae+=b+" Nodes "),0<E&&(ae+=E+" Groups "),0<te&&(ae+=te+" Links "),0<ne&&(ae+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,ae+=`
|
|
|
`+x.toString(),b=x.data,b!==null&&Dr(b)&&(ae+=" #"+Dr(b)),x instanceof oi?ae+=" "+li(b):x instanceof $n&&(ae+=" "+li(x.fromNode)+" "+li(x.toNode));return y+" "+this.Pa.count+": "+ae},rt.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=Mt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var ae=te[ne];if((b!==!0||hd(ae)!==!1)&&ae.isVisible()&&(E.assign(a),pr(E,ae.oe),ae=ae.ic(E,y,x),ae!==null&&(y!==null&&(ae=y(ae)),ae!==null&&(x===null||x(ae)))))return Mt.free(E),ae}return Mt.free(E),null},rt.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Rn||b instanceof Nn||(b=new Nn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=Mt.alloc(),ne=this.Pa.s,ae=ne.length;ae--;){var fe=ne[ae];if((E!==!0||hd(fe)!==!1)&&fe.isVisible()){te.assign(a),pr(te,fe.oe);var _e=fe;fe.ji(te,y,x,b)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||b.add(_e))}}return Mt.free(te),b},rt.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Rn||E instanceof Nn||(E=new Nn),this.Uh===!1)return E;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(te=!0);for(var ne=this.Pa.s,ae=ne.length;ae--;){var fe=ne[ae];if((te!==!0||hd(fe)!==!1)&&fe.isVisible()){var _e=fe;fe.Cf(a,y,x,b,E)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||E.add(_e))}}return E},rt.Nu=function(a,y,x,b,E,te,ne){if(this.Uh===!1)return E;for(var ae=this.Pa.s,fe=ae.length;fe--;){var _e=ae[fe];if((ne!==!0||hd(_e)!==!1)&&te(_e)&&_e.isVisible()){var Te=_e;_e.Cf(a,y,x,b,E)&&(y!==null&&(Te=y(Te)),Te===null||x!==null&&!x(Te)||E.add(Te))}}return E},rt.og=function(a,y,x,b,E,te){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Rn||E instanceof Nn)&&(te=E),E=!0),te instanceof Rn||te instanceof Nn||(te=new Nn),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var ae=Mt.alloc(),fe=Mt.alloc(),_e=this.Pa.s,Te=_e.length;Te--;){var je=_e[Te];if((ne!==!0||hd(je)!==!1)&&je.isVisible()){ae.assign(a),pr(ae,je.oe),fe.h(a.x+y,a.y),pr(fe,je.oe);var Ve=je;je.og(ae,fe,x,b,E,te)&&(x!==null&&(Ve=x(Ve)),Ve===null||b!==null&&!b(Ve)||te.add(Ve))}}return Mt.free(ae),Mt.free(fe),te},rt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Gn();for(var E=Gn(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof $n){if(ne.fd===!1)continue}else if(ne instanceof qr&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&_o(ae,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&E.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],Rv(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)Rv(E[y]);ti(a),ti(E)}}};function Ma(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}rt.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Ma(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,ae=kn.alloc(),fe=0;fe<b;fe++)this.Oj(a,x[fe],y,te,ne,ae,!0);if(kn.free(ae),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function El(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var te=E.length;if(te!==0){var ne=Ma(a,y),ae=a.Zq;ae.length=0;for(var fe=x.scale,_e=kn.alloc(),Te=0;Te<te;Te++){var je=E[Te];b.contains(je)&&a.Oj(y,je,x,ae,fe,_e,!1)}kn.free(_e),y.globalAlpha=ne}}}rt.Oj=function(a,y,x,b,E,te,ne){if(ne&&!hd(y))a.Hs(y);else{if(b!==null&&y instanceof $n&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&te.Ex(b.tb):b.tb!==null&&(ne=!0,te.assign(b.tb)),b=b.containingGroup;var ae=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!te.Yc(ae)){a.Hs(y);return}b=!te.Re(ae)}b&&(a.save(),a instanceof Hl?a.bk=te.copy():(a.beginPath(),a.rect(te.x,te.y,te.width,te.height),a.clip())),ae.width*E>x.Oq||ae.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,te=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(ws(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(ws(y,a,"rgba(0,0,0,0.3)",!0,!1,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),ws(y,a,y.background,!0,!1,te,E),a.fillRect(0,0,te.width/2,te.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),b&&(a.restore(),a.Vc(!0))}},rt.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(Vo,a,this,y,x,b,E)},rt.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&za(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),Nu(this,a,y),a},rt.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,za(y),a};function Nu(a,y,x){if(y=mf(a,y,x),x instanceof ir&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];if(ae===x&&(y=ne,0<=b)||0>b&&ae.containingGroup===x&&(b=ne,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&Nu(a,-1,y)}x.svg!==null&&x.svg.remove()}function mf(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var te=y-1,ne=NaN;0<=te&&(ne=a.M(te).zOrder,!!isNaN(ne));)te--;for(var ae=y+1,fe=NaN;ae<E&&(fe=a.M(ae).zOrder,!!isNaN(fe));)ae++;if(!isNaN(ne)&&ne>b)for(;;){if(te===-1||ne<=b){if(te++,te===y)break;return a.mb(y),a.Gb(te,x),te}for(ne=NaN;0<=--te&&(ne=a.M(te).zOrder,isNaN(ne)););}else if(!isNaN(fe)&&fe<b)for(;;){if(ae===E||fe>=b){if(ae--,ae===y)break;return a.mb(y),a.Gb(ae,x),ae}for(fe=NaN;++ae<E&&(fe=a.M(ae).zOrder,isNaN(fe)););}return y}Ye.Object.defineProperties(os.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&Nt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Nt("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Ln(a,"0 <= value <= 1",os,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),os.prototype.findObjectsNear=os.prototype.og,os.prototype.findObjectsIn=os.prototype.Cf,os.prototype.findObjectsAt=os.prototype.ji,os.prototype.findObjectAt=os.prototype.ic,os.className="Layer";function vn(a,y){if(hm||(Fa(),hm=!0),vr(this),ac=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,ys){var x=this,b=function(){x.removeEventListener(_t.document,"DOMContentLoaded",b,!1),x.setRTL()};_t.document.body!==null?this.setRTL():x.addEventListener(_t.document,"DOMContentLoaded",b,!1)}this.ol=null,rp.add("Model",vo);var E=this;return this.Hb=function(te){var ne=E.partManager;if(te.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var ae=te.change;te.modelChange===""&&ae===Vo&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,vf(this),this.model=hy(),this.Wg=!0,id(this),this.layout=new es,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new dm,a!==void 0&&(typeof a=="string"||_t.Element&&a instanceof Element?Rd(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Bc,ac;function vf(a){a.Yd=new Mo,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Rn,a.pj=new ci,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Mt(NaN,NaN).freeze(),a.du=new Mt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Mt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new yr,a.zu=new Mt(NaN,NaN).freeze(),a.ut=new kn(NaN,NaN,NaN,NaN).freeze(),a.rj=new Li(0,0,0,0).freeze(),a.sj=Th,a.nu=!1,a.Zt=null,a.fu=null,a.yh=$a,a.zk=oo,a.Fg=$a,a.pq=oo,a.yt=Xs,a.Bt=Xs,a.Fc=!0,a.pn=!1,a.De=new Nn,a.Eh=new ci,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Li(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ea,a.bq.diagram=a,a.Qg=new Ea,a.Qg.diagram=a,a.cj=new Ea,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new Nn,a.Ht=!0,a.uu=kh,a.pw=!1,a.wu=bf,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new ci,a.Xn=new Rn,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new Li(5).freeze(),a.Hw=new Nn().freeze(),a.Nt=999999999,a.nw=new Nn().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new Nn,a.ow=new Nn,a.Xh=null,a.aw=new Xn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Mt,bounds:new kn,Py:new Xn,bA:new Xn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new kn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Xn(NaN,NaN).freeze(),a.Sp=new kn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new ci;var y=new oi,x=new To;x.bind(new Hs("text","",li)),y.add(x),a.ny=y,a.Lg.add("",y),y=new oi,x=new To,x.stroke="brown",x.bind(new Hs("text","",li)),y.add(x),a.Lg.add("Comment",y),y=new oi,y.selectable=!1,y.avoidable=!1,x=new gr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Xn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new ci,y=new ir,y.selectionObjectName="GROUPPANEL",y.type=Wn.Vertical,x=new To,x.font="bold 12pt sans-serif",x.bind(new Hs("text","",li)),y.add(x),x=new Wn(Wn.Auto),x.name="GROUPPANEL";var b=new gr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new rl,b.padding=new Li(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new ci,y=new $n,x=new gr,x.isPanelMain=!0,y.add(x),x=new gr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new $n,x=new gr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new qr,y.type=Wn.Auto,x=new gr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new rl,x.margin=new Li(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new qr,y.type=Wn.Link,x=new gr,x.isPanelMain=!0,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),a.Kt=y,a.fe=null,a.mq=!1,a.Ck=null,a.partManager=new vo,a.toolManager=new Wo,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new pe,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=oh(),a.eq=null,a.fq=ss,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new Mt,a.zy=500,a.wp=new Mt,a.wq=!1}vn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Kd=null,ad="",Ph(this,!1),this.Xn.clear(),vp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Ph(a,y){a.animationManager.Cc(!0),a.Hw=new Nn().freeze(),a.nw=new Nn().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var te=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var ae=a.Wa.s[y].parts;ae.next();){var fe=ae.value;fe!==E&&fe.data===null&&te.push(fe)}for(y=0;y<te.length;y++)a.remove(te[y])}for(y=0;y<ne;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),vp(),a.Og.clear(),zi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function oh(){return null}vn.prototype.reset=function(){this.clear(),this.vb=!0,vf(this),Mc(this),this.Wg=!0,id(this),this.layout=new es,this.Wg=!1,this.model=hy(),this.model.undoManager=new Fo,this.vb=this.rn=!1,this.N()},vn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=_t.document.body);var y=sn("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},vn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=_t.document.body);var y=0;if(ys){var x=cm;y=Bc,x===null&&(x=cm=sn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Bc=sn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||Nr||(y=11)}this.Db=y,this.Gw=!0},vn.prototype.qb=function(a){a.classType===vn&&(this.autoScale=a)},vn.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1);return y};function Rd(a,y){if(ys){if(y!=null||Nt("Diagram setup requires an argument DIV."),a.Ka!==null&&Nt("Diagram has already completed setup."),typeof y=="string"?a.Ka=_t.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Nt("No DIV or DIV id supplied: "+y),a.Ka===null&&Nt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Nt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&_t.ResizeObserver){var x=Pn(function(){a.$b()},250);a.ol=new _t.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}_t.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=_t.go;var E=new Du(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",_t.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Wd(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Du(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,ys){E=sn("div");var te=sn("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",te.style.position="absolute",te.style.width="1px",te.style.height="1px",a.Ka.appendChild(E),E.appendChild(te),E.onscroll=Yf,E.addEventListener("pointerdown",Sf),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=Pn(function(){a.Yh=null,a.N()},300),a.Ov=Pn(function(){Bd(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var ae=Ll(a,ne,!0);ae.bubbles=!0;var fe=0,_e=0;ae.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(fe=0<ne.deltaX?1:-1),ne.deltaY!==0&&(_e=0<ne.deltaY?1:-1),ae.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-fe:-_e):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(fe=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(_e=0<ne.wheelDeltaY?-1:1),ae.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-fe:-_e):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(ae.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),eu(ae,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Ll(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var ae=a.Yt;ae[ne.pointerId]===void 0&&(ae[ne.pointerId]=ne),ae=a.oj;var fe=!1;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType)if(ae[1]!==null&&ae[1].pointerId===ne.pointerId)ae[1]=ne,fe=!0;else if(ae[0]===null)ae[0]=ne;else if(ae[1]===null)ae[1]=ne,fe=!0;else{ne.preventDefault();return}else ae[0]=ne;(ae=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var _e=fe;fe=zd(a,ne,!0,!1,!0,_e),Lh(a,ne,fe),fe.targetDiagram=jd(ne,ne.target),fe.targetObject=null,_e||fe.clone(a.bq),_e=a.uw,ae=ae?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(_e.x-ne.screenX)>ae||Math.abs(_e.y-ne.screenY)>ae)?a.yq++:a.yq=1,fe.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():eu(fe,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=a.oj;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType){if(ae[1]!==null&&ae[1].pointerId===ne.pointerId){ae[1]=ne;return}if(ae[0]===null)ae[0]=ne;else return}else ae[0]=ne;if(ae[0].pointerId===ne.pointerId){ae=zd(a,ne,!1,!1,!1,ae[1]!==null);var fe=_t.document.elementFromPoint(ne.clientX,ne.clientY)||null;fe!==null&&fe.shadowRoot!==void 0&&fe.shadowRoot!==null&&(fe=fe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var _e=a,Te=ne;fe&&fe.H&&(Te=ne,_e=fe.H),ae.targetDiagram=_e,Lh(a,Te,ae),ae.targetObject=null,a.doMouseMove(),eu(ae,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=ne.pointerType==="touch"||ne.pointerType==="pen",fe=a.Yt;if(ae&&a.qu)delete fe[ne.pointerId],ne.preventDefault();else if(fe=a.oj,fe[0]===null||fe[0].pointerId!==ne.pointerId&&fe[0].pointerType===ne.pointerType)fe[1]!==null&&fe[1].pointerId===ne.pointerId&&(fe[1]=null);else{fe[0]=null,fe=zd(a,ne,!1,!0,!0,!1);var _e=_t.document.elementFromPoint(ne.clientX,ne.clientY)||null;_e!==null&&_e.shadowRoot!==void 0&&_e.shadowRoot!==null&&(_e=_e.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),_e!==null&&_e.H instanceof vn&&_e.H!==a&&Lh(_e.H,ne,fe),_e===null&&(_e=ne.target),Lh(a,ne,fe),fe.clickCount=a.yq,fe.targetDiagram=jd(ne,_e),fe.targetObject=null,a.doMouseUp(),eu(fe,ne),ae&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var ae=a.Yt;ae[ne.pointerId]&&delete ae[ne.pointerId],ae=a.oj,ae[0]!==null&&ae[0].pointerId===ne.pointerId&&(ae[0]=null),ae[1]!==null&&ae[1].pointerId===ne.pointerId&&(ae[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var ae=a.oj;ae[0]!==null&&ae[0].pointerId===ne.pointerId?(ae[0]=null,a.wq=!1):ae[1]!==null&&ae[1].pointerId===ne.pointerId&&(ae[1]=null)},a.Vp=b.Z["d"+_f[1]+_f[2]+"wI"+$d.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,Pf,y,y),b.Vc(!0),Kp(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}vn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},vn.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function Kp(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(_t,"resize",a.Ov,!1)}function Ba(a){30<a.Sq&&(a.Yh=1)}function nd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),hi&&hi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}vn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:_t.devicePixelRatio||1},vn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},vn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},vn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},vn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},vn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},vn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},vn.prototype.doFocus=function(){this.focus()},vn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=_t.scrollX||_t.pageXOffset,y=_t.scrollY||_t.pageYOffset;this.ta.focus(),_t.scrollTo(a,y)}},vn.prototype.Oy=function(){this.H.R("GainedFocus")},vn.prototype.Ny=function(){this.H.R("LostFocus")};function Bd(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===$a&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function id(a){var y=new os;y.name="Background",a.Al(y),y=new os,y.name="",a.Al(y),y=new os,y.name="Foreground",a.Al(y),y=new os,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new os,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new os,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function yf(a){var y=new Wn(Wn.Grid);y.name="GRID";var x=new gr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new gr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new gr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new gr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new gr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new gr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Mi,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function Yf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):zc(this.H)}function Sf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):zc(this.H)}vn.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,te=this.rj,ne=b.x-te.left,ae=b.y-te.top,fe=b.width+te.left+te.right,_e=b.height+te.top+te.bottom,Te=b.right+te.right;te=b.bottom+te.bottom;var je=E.x;b=E.y;var Ve=E.width,Qe=E.height,it=E.right,ct=E.bottom;E=this.scale;var Dt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Dt=Dt+a.scrollWidth-a.clientWidth;break;case"reverse":Dt=a.scrollWidth-Dt-a.clientWidth}var Lt=Dt;Ve<fe||Qe<_e?(Dt=Mt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Lt&&(Dt.x=Lt/E+ne,this.ju=Lt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Dt.y=a.scrollTop/E+ae,this.lu=a.scrollTop),this.position=Dt,Mt.free(Dt),this.Ee=this.qr=!1):(Dt=Mt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<je&&(this.position=Dt.h(Lt+ne,this.position.y)),Te>it&&(this.position=Dt.h(-(y.scrollWidth-this.Aa)+Lt-this.Aa/E+Te,this.position.y))),a.vy&&this.allowVerticalScroll&&(ae<b&&(this.position=Dt.h(this.position.x,a.scrollTop+ae)),te>ct&&(this.position=Dt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),Mt.free(Dt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Te=b.right,it=E.right,te=b.bottom,ct=E.bottom,ne=b.x,je=E.x,ae=b.y,b=E.y,Ve>=fe&&ne>=je&&Te<=it&&(x.style.width="1px"),Qe>=_e&&ae>=b&&te<=ct&&(x.style.height="1px"))}},vn.prototype.computeBounds=function(a){return a===void 0&&(a=new kn),ba(this),Fd(this,a)};function Fd(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,te=0;te<E;te++){var ne=b[te];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var ae=ne.length,fe=0;fe<ae;fe++){var _e=ne[fe];_e.isInDocumentBounds&&_e.isVisible()&&(_e=_e.actualBounds,_e.w()&&(x?(x=!1,y.assign(_e)):y.ed(_e)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}vn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(rn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof $n||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof $n||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new kn(NaN,NaN,0,0):x};function ql(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=Mt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=kn.allocAt(0,0,b.width,b.height);var E=Mt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,kn.free(b),Mt.free(E),Mt.free(x)}x=a.yh,y&&a.Fg!==$a&&(x=a.Fg);var te=x!==$a?_h(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/te;var ne=a.ya/te,ae=a.zk,fe=a.pq;y&&!ae.sb()&&(fe.sb()||fe.Xb())&&(ae=fe.Xb()?jr:fe),xf(a,a.documentBounds,E,ne,ae,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,on.B(te.x,x)&&on.B(te.y,b)&&on.B(te.width,E)&&on.B(te.height,ne)||a.onViewportBoundsChanged(new kn(x,b,E,ne),te,y,!1)}}function _h(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var b=a.documentBounds;if(!b.w())return x;var E=b.width;b=b.height;var te=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),ae=te/E,fe=ne/b;return y===tu?(y=Math.min(fe,ae),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===ld?(y=fe>ae?(ne-a.Db)/b:(te-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}vn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Th,this.scale=_h(this,tu),a!==Th&&(ql(this,!1),xf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},rt=vn.prototype,rt.BA=function(a,y){y===void 0&&(y=tu);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===tu||y===ld)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var te=this.ya;E=y===ld?te/b>E/x?(te-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(te/b,E/x)}this.scale=E,this.position=new Mt(a.x,a.y)}},rt.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Mt(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},rt.zz=function(a){if(a instanceof nn){this.eq=a;var y=Mt.alloc();this.fq=this.op(a.ga(Xs,y)),Mt.free(y)}else this.eq=null,this.fq=ss};function xf(a,y,x,b,E,te){var ne=Mt.allocAt(a.pa.x,a.pa.y),ae=ne.x,fe=ne.y;if(a.eq!==null){var _e=Mt.alloc();_e=a.eq.ga(Xs,_e),ae=_e.x-a.fq.x/a.scale,fe=_e.y-a.fq.y/a.scale,E=ms,Mt.free(_e)}(te||a.scrollMode===Th)&&(E.sb()&&(x>y.width&&(ae=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(fe=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,te=x-y.width,x<y.width+E.left+E.right?(ae=Math.min(ae+x/2,y.right+Math.max(te,E.right)-x/2),ae=Math.max(ae,y.left-Math.max(te,E.left)+x/2),ae-=x/2):ae>y.left?ae=y.left:ae<y.right-x&&(ae=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(fe=Math.min(fe+b/2,y.bottom+Math.max(x,E.bottom)-b/2),fe=Math.max(fe,y.top-Math.max(x,E.top)+b/2),fe-=b/2):fe>y.top?fe=y.top:fe<y.bottom-b&&(fe=y.bottom-b)),ne.x=isFinite(ae)?ae:-a.yb.left,ne.y=isFinite(fe)?fe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),ma(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Mc(a),Mt.free(ne)}rt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Ku(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Mi)return a}else if(a=Ku(this,a,function(x){return x.part}),a instanceof Mi)return a;return null},rt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ba(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function Ku(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),ba(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}rt.lz=function(a,y,x){return y===void 0&&(y=!0),Fc(this,a,function(b){return b.part},y?function(b){return b instanceof Mi&&b.canSelect()}:null,x)};function Fc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Rn||E instanceof Nn||(E=new Nn),ba(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}rt.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Rn||b instanceof Nn||(b=new Nn),ba(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},rt.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Eh(this,a,function(E){return E instanceof Mi&&(!x||E.canSelect())},y,b)},rt.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Rn||E instanceof Nn||(E=new Nn),ba(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},rt.Nu=function(a,y,x,b,E,te){var ne=new Nn;ba(this);for(var ae=this.Wa.iteratorBackwards;ae.next();){var fe=ae.value;fe.visible&&fe.Nu(a,y,x,b,ne,E,te)}return ne};function Eh(a,y,x,b,E){var te=null;for(te===void 0&&(te=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Rn||E instanceof Nn||(E=new Nn),ba(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}rt.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),sh(this,a,y,function(te){return te instanceof Mi&&(!b||te.canSelect())},x,E)},rt.og=function(a,y,x,b,E,te){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Rn||E instanceof Nn)&&(te=E),E=!0),te instanceof Rn||te instanceof Nn||(te=new Nn),ba(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var ae=ne.value;ae.visible&&ae.og(a,y,x,b,E,te)}return te};function sh(a,y,x,b,E,te){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Rn||E instanceof Nn)&&(te=E),E=!0),te instanceof Rn||te instanceof Nn||(te=new Nn),ba(a),a=a.Wa.iteratorBackwards;a.next();){var ae=a.value;ae.visible&&!ae.isTemporary&&ae.og(y,x,ne,b,E,te)}return te}vn.prototype.acceptEvent=function(a){return Ll(this,a,a instanceof MouseEvent)};function Ll(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?Lh(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),Nr&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=jd(y,y.target),b.targetObject=null,b}function jd(a,y){return y===null?null:(y=y.H)?y:((y=a.path)||typeof a.composedPath!="function"||(y=a.composedPath()),y&&y[0]&&y[0].H?y[0].H:null)}function zd(a,y,x,b,E,te){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,Nr&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=b,ne.handled=!1,ne.bubbles=E,ne.isMultiTouch=te,ne}function eu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}vn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Ll(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.down=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del";break;case 48:x.key="0";break;case 187:case 61:case 107:x.key="Add";break;case 189:case 173:case 109:x.key="Subtract";break;case 27:x.key="Esc"}return y.doKeyDown(),eu(x,a)},vn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ll(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.up=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del"}return y.doKeyUp(),eu(x,a)},vn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ll(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),eu(x,a)},vn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ll(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),eu(x,a)},vn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Mt(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?pr(new Mt(y,a),this.Ab):new Mt(y,a)};function Lh(a,y,x){var b=a.ta,E=a.Aa,te=a.ya,ne=0,ae=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,ae=y.clientY-te/b.height*b.top),x.viewPoint.h(ne,ae),a.Ab!==null?(y=Mt.allocAt(ne,ae),a.Ab.Cd(y),x.documentPoint.assign(y),Mt.free(y)):x.documentPoint.h(ne,ae)}function Hd(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var b=a.ta;b!==null&&(b=b.getBoundingClientRect(),x.h(y.clientX-a.Aa/b.width*b.left,y.clientY-a.ya/b.height*b.top))}}vn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Ud(a){a.ld||ba(a),a.Va()}vn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},rt=vn.prototype,rt.Pz=function(){return this.kg},rt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,fl(this),this.hf=!1,this.du=new Mt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&mn(function(){b.ld=!1,Jo(y,"Model"),a(b)},1)},rt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;_t.requestAnimationFrame(function(){y.kg&&y.bd()})}},rt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),fl(this))};function jc(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||zc(a)||(y&&ba(a),x&&ql(a,!1))}function fl(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,b=a.Xn;if(!x.isAnimating&&b.length!==0){for(var E=b.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];ea(ae,!1),ae.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(fe){fe.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Bd(a),jc(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Lc(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),ba(a),te=!1,(!a.hf||a.xh)&&(a.hf?qp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),qp(a,!1)),te=!0),a.Jk=!1,ba(a),a.ou||Ud(a),jc(a,!0,!1),ne=!1,te?(x=kn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Gd(a)),a.R("LayoutCompleted"),jc(a,!0,!1),kn.free(x)):x.Ok&&x.Qw&&(a.Fg!==$a?a.scale=_h(a,a.Fg):a.yh!==$a?a.scale=_h(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),ql(a,!0)),te&&ne&&a.eb("Initial Layout"),ba(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Gd(a){if(a.Fg!==$a)a.scale=_h(a,a.Fg);else if(a.yh!==$a)a.scale=_h(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}ql(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Lc(a)}function ba(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new Nn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof ir&&b.U&65536&&(b.U=b.U^65536)})}}rt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof ir||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof ir&&x.isVisible()&&fs(this,x);for(a.reset();a.next();)x=a.value,x instanceof $n&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof qr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function fs(a,y){for(var x=Gn(),b=Gn(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof ir?(iu(te)||nl(te)||cd(te))&&fs(a,te):te instanceof $n?te.fromNode===y||te.toNode===y?b.push(te):x.push(te):(te.measure(1/0,1/0),te.arrange()))}for(a=x.length,E=0;E<a;E++)te=x[E],te.measure(1/0,1/0),te.arrange();for(ti(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();ti(b)}rt.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},rt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Nt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){pu(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,te=Math.round(y.x*E)/E,ne=Math.round(y.y*E)/E,ae=this.Ab;for(ae.reset(),E!==1&&ae.scale(E),y.x===0&&y.y===0||ae.translate(-te,-ne),a.ti=null,Yy(a,ae.m11,ae.m12,ae.m21,ae.m22,ae.dx,ae.dy),this.pb!==1&&(a.globalAlpha=this.pb),Va(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<b;y++)x[y].gc(a,this);a=!1,this.Yf?Yd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(yr.prototype.Cd=yr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,pu(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!te.isAnimating)break e;te=this.Ab,te.reset(),ne=this.Mb,ae=this.pa;var fe=this.Ca,_e=Math.round(ae.x*fe)/fe,Te=Math.round(ae.y*fe)/fe;for(fe!==1&&te.scale(fe),ae.x===0&&ae.y===0||te.translate(-_e,-Te),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Va(this,a),ae=0;ae<E;ae++)a.setTransform(ne,0,0,ne,0,0),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),a.yc(),y[ae].gc(a,this);if(y=!1,this.Yf?Yd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(yr.prototype.Cd=yr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=hi&&hi.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function Ys(a,y,x,b,E,te,ne,ae,fe,_e){if(a.Ka!==null){a.ta===null&&Nt("No canvas specified"),ne===void 0&&(ne=null),ae===void 0&&(ae=null),fe===void 0&&(fe=!1),_e===void 0&&(_e=!1),pu(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var Te=a.Ca;a.Ca=E;var je=a.Wa.s,Ve=je.length;try{var Qe=new kn(te.x,te.y,b.width/E,b.height/E),it=Qe.copy();it.Co(x),Lc(a,it),ba(a),a.Fd(je,Ve,a,Qe),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),ae!==null&&ae!==""&&(y.fillStyle=ae,y.ox(0,0,b.width,b.height));var ct=a.Mb;y.scale(ct,ct);var Dt=yr.alloc();Dt.reset(),Dt.translate(x.left,x.top),Dt.scale(E),te.x===0&&te.y===0||Dt.translate(-te.x,-te.y),y.setTransform(Dt.m11,Dt.m12,Dt.m21,Dt.m22,Dt.dx,Dt.dy),y.yc(),y instanceof Hl&&Yy(y,Dt.m11,Dt.m12,Dt.m21,Dt.m22,Dt.dx,Dt.dy),yr.free(Dt),Va(a,y),y.globalAlpha=a.pb;var Lt=a.Qj("Grid");if(ne){var Gt=new Nn,Zt=ne.iterator;for(Zt.reset();Zt.next();){var Vt=Zt.value;Vt instanceof Mi&&(_e||Vt.layer!==Lt)&&(Vt.Gj(),Gt.add(Vt))}for(_e=0;_e<Ve;_e++)El(je[_e],y,a,Gt,fe);Gt.each(function(yn){return yn.Gj()})}else for(Gt=0;Gt<Ve;Gt++){var qt=je[Gt];qt===Lt?_e&&qt.gc(y,a,!0):qt.gc(y,a,fe)}a.$i=!1,a.Yf&&Yd(a.Yf,a)&&a.Vp()}finally{a.Ca=Te,a.ib.Vc(!0),a.vd=!0,a.Fd(je,Ve,a,a.viewportBounds),Lc(a),a.ib instanceof Hl&&(a.ib.Nj.PA(),a.redraw())}}}rt.Gf=function(a){return this.Rg[a]},rt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},rt.Tx=function(){this.Rg=new Si,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Nr||Xi),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Va(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}rt.Ql=function(a){return this.on[a]},rt.sA=function(a,y){this.on[a]=y},rt.Sx=function(){this.on=new Si,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},rt.set=function(a){return Object.assign(this,a),this},rt.Du=function(a){return this.nm(a)},rt.nm=function(a){return fu(this,a),this};function fu(a,y){var x=a instanceof Wn,b=a instanceof vn,E;for(E in y){E===""&&Nt("Setting properties requires non-empty property names");var te=a,ne=E;if(x||b){var ae=E.indexOf(".");if(0<ae){var fe=E.substring(0,ae);x?te=a.fb(fe):(te=a[fe],te==null&&(te=a.toolManager[fe])),$t(te)?ne=E.substr(ae+1):Nt("Unable to find object named: "+fe+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Di(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Di(a.toolManager,ne))te=a.toolManager;else if(b&&am(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof xi&&ne==="Changed"){a.Pe(y[ne]);continue}else Nt('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof nn&&te.Vw(ne)}}rt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new ci,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},rt.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},vn.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==Cf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),te=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*b&&0<Math.max(0,te-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=kn.alloc(),Qp(this,this.computeBounds(b)),kn.free(b)),b=this.ta,b===null||b instanceof Tc)))){var ne=this.Mb;E=this.Aa*ne;var ae=this.ya*ne,fe=this.scale*ne;te=Math.round(Math.round(y.x*fe)-Math.round(a.x*fe)),y=Math.round(Math.round(y.y*fe)-Math.round(a.y*fe)),fe=this.jw,a=this.oy,fe.width!==E&&(fe.width=E),fe.height!==ae&&(fe.height=ae),a.clearRect(0,0,E,ae),fe=190*ne;var _e=70*ne,Te=Math.max(te,0),je=Math.max(y,0),Ve=Math.floor(E-Te),Qe=Math.floor(ae-je);a.drawImage(b.Oa,Te,je,Ve,Qe,0,0,Ve,Qe),Yd(this.Yf,this)&&a.clearRect(0,0,fe,_e),b=Gn(),a=Gn(),Qe=Math.abs(te),Ve=Math.abs(y);var it=Te===0?0:E-Qe;Te=Mt.allocAt(it,0),Qe=Mt.allocAt(Qe+it,ae),a.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y)));var ct=this.Ab;if(ct.reset(),ct.scale(ne,ne),this.Ca!==1&&ct.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&ct.translate(-ne.x,-ne.y),pr(Te,ct),pr(Qe,ct),b.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),it=je===0?0:ae-Ve,Te.h(0,it),Qe.h(E,Ve+it),a.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),pr(Te,ct),pr(Qe,ct),b.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),Yd(this.Yf,this)&&(E=0<te?0:-te,ae=0<y?0:-y,Te.h(E,ae),Qe.h(fe+E,_e+ae),a.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y))),pr(Te,ct),pr(Qe,ct),b.push(new kn(Math.min(Te.x,Qe.x),Math.min(Te.y,Qe.y),Math.abs(Te.x-Qe.x),Math.abs(Te.y-Qe.y)))),Mt.free(Te),Mt.free(Qe),jc(this,!1,!0),this.Ka===null&&Nt("No div specified"),this.ta===null&&Nt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(pu(this),ae=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*ae,this.ya*ae),E.drawImage(this.jw.Oa,0<te?0:Math.round(-te),0<y?0:Math.round(-y)),te=this.pa,ne=this.Ca,fe=Math.round(te.x*ne)/ne,_e=Math.round(te.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),te.x===0&&te.y===0||y.translate(-fe,-_e),E.save(),E.beginPath(),te=a.length,ne=0;ne<te;ne++)fe=a[ne],fe.width!==0&&fe.height!==0&&E.rect(Math.floor(fe.x),Math.floor(fe.y),Math.ceil(fe.width),Math.ceil(fe.height));for(E.clip(),E.setTransform(ae,0,0,ae,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,te=y.length,this.Fd(y,te,this,this.viewportBounds),Va(this,E),E.globalAlpha=this.pb,ae=0;ae<te;ae++)if(ne=y[ae],fe=b,ne.visible&&ne.pb!==0){_e=Ma(ne,E),je=ne.Zq,je.length=0,Te=this.scale,Ve=kn.alloc(),Qe=ne.Pa.s,ct=Qe.length,it=fe.length;for(var Dt=0;Dt<ct;Dt++){var Lt=Qe[Dt],Gt=nf(Lt,Lt.actualBounds);e:{for(var Zt=2/Te,Vt=4/Te,qt=0;qt<it;qt++){var yn=fe[qt];if(yn.width!==0&&yn.height!==0&&Gt.Vu(yn.x-Zt,yn.y-Zt,yn.width+Vt,yn.height+Vt)){Gt=!0;break e}}Gt=!1}Gt&&ne.Oj(E,Lt,this,je,Te,Ve,!0)}kn.free(Ve),E.globalAlpha=_e}E.restore(),E.Vc(!0),this.Yf&&Yd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}ti(b),ti(a),this.ld=!1}}else this.bd();x&&(Ba(this),this.bd(),nd(this,!0))}else x?(Ba(this),this.bd(),nd(this,!0)):this.bd()}};function pu(a){a.pn!==!1&&(a.pn=!1,Wd(a,a.Aa,a.ya))}function Wd(a,y,x){Mc(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function zc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,te=!1,ne=a.gf?a.Db:0,ae=a.Be?a.Db:0,fe=E.clientWidth||x+ne,_e=E.clientHeight||b+ae,Te=a.viewportBounds;E=Te.x;var je=Te.y,Ve=Te.width,Qe=Te.height;if((fe!==x+ne||_e!==b+ae)&&(a.gf=!1,a.Be=!1,ae=ne=0,a.Aa=fe,a.ya=_e,te=a.pn=!0,Mc(a)),!a.hf||!a.viewportBounds.w())return!0;var it=a.ku,ct=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Dt=a.documentBounds,Lt=0,Gt=0,Zt=0,Vt=0,qt=Te.width,yn=Te.height,ii=a.rj;a.contentAlignment.sb()?(Dt.width>qt&&(Lt=ii.left,Gt=ii.right),Dt.height>yn&&(Zt=ii.top,Vt=ii.bottom)):(Lt=ii.left,Gt=ii.right,Zt=ii.top,Vt=ii.bottom);var di=Dt.width+Lt+Gt,ui=Dt.height+Zt+Vt;ii=a.scale;var Vn=di>fe/ii,In=ui>_e/ii;if(!(te||a.gf||a.Be||Vn||In))return!0;Lt=Dt.x-Lt,fe=Te.x,Gt=Dt.right+Gt,_e=Te.right+ne,Zt=Dt.y-Zt;var er=Te.y;Dt=Dt.bottom+Vt,Te=Te.bottom+ae;var Vi="1px";if(Vt="1px",a.scrollMode===Th&&(Vn||In)&&(Vn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Vn=1,Lt+1<fe&&(Vn=Math.max((fe-Lt)*ii+a.Aa,Vn)),Gt>_e+1&&(Vn=Math.max((Gt-_e)*ii+a.Aa,Vn)),qt+ne+1<di&&(Vn=Math.max((di-qt)*ii+a.Aa,Vn)),Vi=Vn.toString()+"px"),In&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Vn=1,Zt+1<er&&(Vn=Math.max((er-Zt)*ii+a.ya,Vn)),Dt>Te+1&&(Vn=Math.max((Dt-Te)*ii+a.ya,Vn)),yn+ae+1<ui&&(Vn=Math.max((ui-yn)*ii+a.ya,Vn)),Vt=Vn.toString()+"px")),Vn=Vi!=="1px",In=Vt!=="1px",Vn&&In||!Vn&&!In||(In&&(_e-=a.Db),Vn&&(Te-=a.Db),di<qt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Lt+1<fe&&(ne=Math.max((fe-Lt)*ii+a.Aa,ne)),Gt>_e+1&&(ne=Math.max((Gt-_e)*ii+a.Aa,ne)),qt+1<di&&(ne=Math.max((di-qt)*ii+a.Aa,ne)),Vi=ne.toString()+"px"),Vn=Vi!=="1px",ne=a.ya,Vn!==a.Be&&(ne=Vn?a.ya-a.Db:a.ya+a.Db),ui<yn+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,Zt+1<er&&(ae=Math.max((er-Zt)*ii+ne,ae)),Dt>Te+1&&(ae=Math.max((Dt-Te)*ii+ne,ae)),yn+1<ui&&(ae=Math.max((ui-yn)*ii+ne,ae)),Vt=ae.toString()+"px"),In=Vt!=="1px"),a.qr&&Vn===a.Be&&In===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Vn!==a.Be&&(Vi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Vn,ct.style.width=Vi,In!==a.gf&&(Vt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(ae=Mt.alloc(),In?(y.style.left=a.Db+"px",a.position=ae.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=ae.h(a.pa.x-a.Db/a.scale,a.pa.y)),Mt.free(ae))),te&&Mc(a),a.gf=In,ct.style.height=Vt,a.gu=!0,te&&(a.pn=!0),y=it.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(qt+1<di?y=(a.position.x-Lt)*ii:Lt+1<fe?y=it.scrollWidth-it.clientWidth:Gt>_e+1&&(y=a.position.x*ii)),a.tn)switch(a.bu){case"negative":y=-(it.scrollWidth-y-it.clientWidth);break;case"reverse":y=it.scrollWidth-y-it.clientWidth}return it.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(yn+1<ui?it.scrollTop=(a.position.y-Zt)*ii:Zt+1<er?it.scrollTop=it.scrollHeight-it.clientHeight:Dt>Te+1&&(it.scrollTop=a.position.y*ii)),fe=a.Aa,_e=a.ya,it.style.width=fe+(a.gf?a.Db:0)+"px",it.style.height=_e+(a.Be?a.Db:0)+"px",x!==fe||b!==_e||a.animationManager.zb?(x=kn.allocAt(E,je,Ve,Qe),a.onViewportBoundsChanged(x,a.viewportBounds,ii,te),kn.free(x),!1):!0}rt=vn.prototype,rt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Nt("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&Nt('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(vs,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},rt.oi=function(a){this.partManager.oi(a);var y=this;qd(a,function(x){Zd(y,x)}),(a instanceof qr||a instanceof ir&&a.placeholder!==null)&&a.v(),a.data!==null&&qd(a,function(x){ly(y.partManager,x)}),nl(a)!==!0&&cd(a)!==!0||this.De.add(a),F1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.$b()},rt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&qd(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.$b()},rt.remove=function(a){rd(this,a,!0)};function rd(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(ds,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}rt.Is=function(a,y){if(y===void 0&&(y=!1),rn(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new Nn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},rt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},vn.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=Xf(this)),this.toolManager!==null){var E=new ci;if(a!==null)if(rn(a))for(var te=0;te<a.length;te++)Ou(this,E,a[te],x,b);else for(a=a.iterator;a.next();)Ou(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Ou(this,E,a.value,x,b);for(a=this.nodes;a.next();)Ou(this,E,a.value,x,b);for(a=this.links;a.next();)Ou(this,E,a.value,x,b)}Ec(this,E,y,b,x)}};function Ou(a,y,x,b,E,te){if(!y.contains(x)&&(te===void 0&&(te=!1),!b||te||x.canMove()||x.canCopy()))if(E===void 0&&(E=Xf(a)),x instanceof oi){if(y.add(x,a.Pd(E,x,x.location)),x instanceof ir&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)Ou(a,y,te.value,b,E,E.groupsAlwaysMove);for(te=x.linksConnected;te.next();){var ne=te.value;if(!y.contains(ne)){var ae=ne.fromNode,fe=ne.toNode;ae!==null&&y.contains(ae)&&fe!==null&&y.contains(fe)&&Ou(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Ou(a,y,x.value,b,E)}else if(x instanceof $n)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Ou(a,y,x.value,b,E);else x instanceof qr||y.add(x,a.Pd(E,x,x.location))}function Ec(a,y,x,b,E){if(y!==null&&y.count!==0){var te=Mt.alloc(),ne=Mt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||Qf(a,y);for(var ae=Gn(),fe=Gn(),_e=y.iterator,Te=Mt.alloc();_e.next();){var je=_e.key,Ve=_e.value;if(je.Zc()){var Qe=Vp(a,je,y);Qe!==null?ae.push(new re(je,Ve,Qe)):(!E||je.canMove())&&(Qe=Ve.point,te.assign(Qe),a.computeMove(je,te.add(ne),b,Te),je.location=Te,Ve.shifted===void 0&&(Ve.shifted=new Mt),Ve.shifted.assign(Te.re(Qe)))}else _e.key instanceof $n&&fe.push(_e.sa)}for(Mt.free(Te),E=ae.length,_e=0;_e<E;_e++)je=ae[_e],te.assign(je.info.point),je.Su.shifted===void 0&&(je.Su.shifted=new Mt),je.node.location=te.add(je.Su.shifted);for(E=Mt.alloc(),_e=Mt.alloc(),je=fe.length,Ve=0;Ve<je;Ve++){var it=fe[Ve];if(Qe=it.key,Qe instanceof $n)if(Qe.suspendsRouting){Qe.Tg=null,Te=Qe.fromNode;var ct=Qe.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ct=it.value.point,Qe.dragComputation===null)y.add(Qe,a.Pd(b,Qe,ne)),Bh(Qe,ne.x-ct.x,ne.y-ct.y);else{it=Mt.allocAt(0,0),(Te=Qe.i(0))&&Te.w()&&it.assign(Te);var Dt=Te=Mt.alloc().assign(it).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Dt=Mt.alloc(),Jf(a,Qe,Te,Dt,b)),Te.assign(Qe.dragComputation(Qe,Te,Dt)).re(it),y.add(Qe,a.Pd(b,Qe,Te)),Bh(Qe,Te.x-ct.x,Te.y-ct.y),Mt.free(it),Mt.free(Te),Dt!==Te&&Mt.free(Dt)}else Te!==null&&(E.assign(Te.location),Dt=y.I(Te),Dt!==null&&E.re(Dt.point)),ct!==null&&(_e.assign(ct.location),Dt=y.I(ct),Dt!==null&&_e.re(Dt.point)),Te!==null&&ct!==null?E.Xa(_e)?(Te=it.value.point,ct=te,ct.assign(E),ct.re(Te),y.add(Qe,a.Pd(b,Qe,E)),Bh(Qe,ct.x,ct.y)):(Qe.suspendsRouting=!1,Qe.bb()):(it=it.value.point,Te=Te!==null?E:ct!==null?_e:ne,y.add(Qe,a.Pd(b,Qe,Te)),Bh(Qe,Te.x-it.x,Te.y-it.y))}else(Qe.fromNode===null||Qe.toNode===null)&&(Te=it.value.point,y.add(Qe,a.Pd(b,Qe,ne)),Bh(Qe,ne.x-Te.x,ne.y-Te.y))}Mt.free(te),Mt.free(ne),Mt.free(E),Mt.free(_e),ti(ae),ti(fe),x||(ba(a),od(a,y))}}vn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Mt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Mt.alloc(),Jf(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,ae=ne.x;isNaN(ae)&&(ae=te?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=te?Math.round(1e3*a.location.y)/1e3:a.location.y);var fe=a.maxLocation,_e=fe.x;return isNaN(_e)&&(_e=te?Math.round(1e3*a.location.x)/1e3:a.location.x),fe=fe.y,isNaN(fe)&&(fe=te?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(ae,Math.min(x.x,_e)),Math.max(ne,Math.min(x.y,fe))),E!==y&&Mt.free(E),b};function Xf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Jf(a,y,x,b,E){if(E===void 0&&(E=Xf(a)),b.assign(x),y!==null){var te=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,ae=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,te!==null){var fe=te.gridCellSize;isNaN(a)&&(a=fe.width),isNaN(y)&&(y=fe.height),te=te.gridOrigin,isNaN(ae)&&(ae=te.x),isNaN(ne)&&(ne=te.y)}te=Mt.allocAt(0,0),te.yi(0,0,a,y,E),on.No(x.x,x.y,ae+te.x,ne+te.y,a,y,b),Mt.free(te)}}function Qf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof $n&&(y.suspendsRouting=!0)}function od(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof $n&&(x.suspendsRouting=!1,$v(x)&&x.bb())}a.Mr=!1}}function Vp(a,y,x){return y=y.containingGroup,y!==null&&(a=Vp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}rt=vn.prototype,rt.Pd=function(a,y,x){if(x===void 0)return new ah(Ur);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new ah(new Mt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new ah(x.copy())};function $p(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Nt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Nt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Nt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Nt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&Nt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}rt.Al=function(a){$p(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(vs,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},rt.Ww=function(a,y){$p(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(ds,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te,a);break}return this.cc!==null&&this.cb(vs,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},rt.Cy=function(a,y){$p(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(ds,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te+1,a);break}return this.cc!==null&&this.cb(vs,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},rt.kA=function(a){if(a.diagram!==this&&Nt("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(ds,"layers",this,a,null,x,null),this.N(),this.Ya()}}},rt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},rt.Yw=function(a){return this.pf===null&&(this.pf=new Rn),this.pf.add(a),this.model.Pe(a),this},rt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},rt.Pe=function(a){return this.zg===null&&(this.zg=new Rn),this.zg.add(a),this},rt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},rt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ka&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},rt.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var ae=new Go;ae.diagram=this,ae.change=a,ae.propertyName=y,ae.object=x,ae.oldValue=b,ae.oldParam=te,ae.newValue=E,ae.newParam=ne,this.ds(ae)},rt.g=function(a,y,x,b,E){this.cb(Vo,a,this,y,x,b,E)},vn.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===Vo){var E=a.object;if($o(E,a.propertyName,a.I(y)),E instanceof nn){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===vs){var ne=a.object,ae=a.newParam,fe=a.newValue;if(ne instanceof Wn)if(typeof ae=="number"&&fe instanceof nn){y?ne.pc(ae):ne.Gb(ae,fe);var _e=ne.part;_e!==null&&_e.Wb()}else typeof ae=="number"&&fe instanceof ta&&(fe.isRow?h1(ne,ae,y?void 0:fe):d1(ne,ae,y?void 0:fe));else if(ne instanceof os){var Te=a.oldParam===!0;typeof ae=="number"&&fe instanceof Mi&&(y?(fe.isSelected=!1,fe.isHighlighted=!1,fe.Wb(),ne.pc(Te?ae:-1,fe,Te)):ne.oi(ae,fe,Te))}else ne instanceof vn?typeof ae=="number"&&fe instanceof os&&(y?this.Wa.mb(ae):(fe.Xe(this),this.Wa.Gb(ae,fe))):Nt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===ds){var je=a.object,Ve=a.oldParam,Qe=a.oldValue;if(je instanceof Wn)typeof Ve=="number"&&Qe instanceof nn?y?je.Gb(Ve,Qe):je.pc(Ve):typeof Ve=="number"&&Qe instanceof ta&&(Qe.isRow?h1(je,Ve,y?Qe:void 0):d1(je,Ve,y?Qe:void 0));else if(je instanceof os){var it=a.newParam===!0;typeof Ve=="number"&&Qe instanceof Mi&&(y?0>je.Pa.indexOf(Qe)&&je.oi(Ve,Qe,it):(Qe.isSelected=!1,Qe.isHighlighted=!1,Qe.Wb(),je.pc(it?Ve:-1,Qe,it)))}else je instanceof vn?typeof Ve=="number"&&Qe instanceof os&&(y?(Qe.Xe(this),this.Wa.Gb(Ve,Qe)):this.Wa.mb(Ve)):Nt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ka&&Nt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},vn.prototype.Ea=function(a){return this.undoManager.Ea(a)},vn.prototype.eb=function(a){return this.undoManager.eb(a)},vn.prototype.Kf=function(){return this.undoManager.Kf()},vn.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},vn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},vn.prototype.rp=function(){this.partManager.rp()};function Yp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Mc(a),a.N(),a.Ee=!0,b.zb&&(Js(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Mc(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,ae=a.zoomPoint.x,fe=a.zoomPoint.y,_e=a.contentAlignment;isNaN(ae)&&(_e.$c()?_e.Hf(_u)?ae=0:_e.Hf(Wa)&&(ae=te-1):ae=_e.sb()?_e.x*(te-1):te/2),isNaN(fe)&&(_e.$c()?_e.Hf($l)?fe=0:_e.Hf(Za)&&(fe=ne-1):fe=_e.sb()?_e.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),te=Mt.allocAt(a.pa.x+ae/y-ae/x,a.pa.y+fe/y-fe/x),a.position=te,Mt.free(te),a.Ca=x,Mc(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),ql(a,!1),b.zb&&(Js(b)||b.ce.add(b.H,"scale",y,a.Ca))}}vn.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==$a||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Wo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Nd(E,this)),this.vb||this.invalidateViewport(a,y),Lc(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(te){te.isAvoiding&&te.actualBounds.Yc(y)&&te.bb()})}};function Lc(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Xn.alloc(),E=1,te=1,ne=x.O.s,ae=ne.length,fe=0;fe<ae;fe++){var _e=ne[fe],Te=Math.abs(_e.interval);2>Te||(mv(_e.figure)?te=te*Te/on.vx(te,Te):E=E*Te/on.vx(E,Te))}if(ne=x.gridCellSize,b.h(te*ne.width,E*ne.height),y!==void 0)E=y.width,te=y.height,a=y.x,ne=y.y;else{if(y=kn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){kn.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,kn.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=Mt.alloc(),on.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Xn.free(b),x.part.location=y,Mt.free(y)}}vn.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),b=x.length,E=0;E<b;E++)x[E].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},vn.prototype.select=function(a){a!==null&&a.diagram===this&&(!a.isSelected||1<this.selection.count)&&(this.R("ChangingSelection",this.selection),this.clearSelection(!0),a.isSelected=!0,this.R("ChangedSelection",this.selection))},vn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),rn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Mi||Nt("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Mi||Nt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},vn.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},rt=vn.prototype,rt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},rt.Jz=function(a){a=new Nn().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof Mi||Nt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},rt.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=Mt.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=te.h(x.x,E.y):y==="left"?this.position=te.h(E.x,x.y):y==="down"?this.position=te.h(x.x,E.bottom-x.height):y==="right"&&(this.position=te.h(E.right-x.width,x.y)),Mt.free(te);return}Nt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=te.h(x.x,x.y-E):y==="down"?this.position=te.h(x.x,x.y+E):y==="left"?this.position=te.h(x.x-E,x.y):y==="right"?this.position=te.h(x.x+E,x.y):Nt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Mt.free(te)},rt.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},rt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},rt.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},rt.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,te=b+a.height,ne=y.m11,ae=y.m12,fe=y.m21,_e=y.m22,Te=y.dx,je=y.dy,Ve=x*ne+b*fe+Te;y=x*ae+b*_e+je;var Qe=E*ne+b*fe+Te;return a=E*ae+b*_e+je,b=x*ne+te*fe+Te,x=x*ae+te*_e+je,ne=E*ne+te*fe+Te,E=E*ae+te*_e+je,te=Math.min(Ve,Qe),Ve=Math.max(Ve,Qe),Qe=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),Ve=Math.max(Ve,b),Qe=Math.min(Qe,x),y=Math.max(y,x),te=Math.min(te,ne),Ve=Math.max(Ve,ne),Qe=Math.min(Qe,E),y=Math.max(y,E),new kn(te,Qe,Ve-te,y-Qe)},rt.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),pr(a.copy(),this.Ab)};function om(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Xp(a){return a=rp.get(a),a!==null?new a:new vo}vn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ka&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(fe){return fe.diagram=E}),a.mouseMoveTools.each(function(fe){return fe.diagram=E}),a.mouseUpTools.each(function(fe){return fe.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Ka){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ba(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Ss(te),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(om(this),this.As.clear(),qo(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var ae=this;mn(function(){ae.currentTool.standardMouseOver(),ae.Rt=!1},10)}}}finally{this.aa=!0}}}};function Zd(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)sd(a,y[b])}function sd(a,y){if(y instanceof vl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Nn&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function Jp(a,y){if(y instanceof vl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof Nn&&x.Bg.remove(a),vp(b));break}}}}}vn.prototype.Wd=function(){this.partManager.Wd()},vn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},vn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},vn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},vn.prototype.Vb=function(a){return this.partManager.Vb(a)},vn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},rt=vn.prototype,rt.Lc=function(a){return this.partManager.Lc(a)},rt.ii=function(a){return this.partManager.ii(a)},rt.Kc=function(a){return this.partManager.Kc(a)},rt.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:$r(Ar(y)))},rt.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:$r(Ar(y)))};function Mc(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function Qp(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),ql(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}rt.Va=function(){if(this.Zi){var a=kn.alloc();Qp(this,this.computeBounds(a)),kn.free(a)}},rt.rz=function(){for(var a=new Nn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},rt.qz=function(){return this.ai.iterator},rt.Uz=function(a){ba(this),a&&qf(this,!0),this.ld?qp(this,!1):(this.Jk=!0,fl(this))};function qf(a,y){for(var x=a.ai.iterator;x.next();)sm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function sm(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)sm(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function qp(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,te=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!te.defaultAnimation.isAnimating&&!te.zb&&(y||Jo(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)eg(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),ba(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||Ss(te),a.aa=x}}}function eg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)eg(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),fs(a,y),E.isValidLayout=!0):a.xh=!0)}}rt.yz=function(){for(var a=new Rn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function nv(a){function y(E){var te=E.toLowerCase(),ne=new Rn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new ci,b=new ci;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function am(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function ep(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Nt("Unknown DiagramEvent name: "+y)}rt.Bj=function(a,y){return a=ep(this,a),a!==null&&a.add(y),this},rt.am=function(a,y){a=ep(this,a),a!==null&&a.remove(y)},rt.R=function(a,y,x){var b=ep(this,a),E=new Pc;if(E.diagram=this,a=am(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function tp(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}rt.Yj=function(a,y){return np(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},vn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Fd(this,a):a.assign(this.documentBounds)};function np(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new Tg(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=lm(a,x)),x===null){y=kn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var te=a.nodes;te.next();){var ne=te.value,ae=ne.layer;ae!==null&&ae.visible&&!ae.isTemporary&&ip(a,ne,b,y)}kn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=kn.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof oi&&ip(a,ne,b,y);kn.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function lm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?lm(a,y.containingGroup):null}function ip(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,te=y.y;if(Cp(a,E,te))for(x=(te-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((te+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(te=a.ac[E],te.fill)te.fill(jh,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=jh}else if(y instanceof ir)for(y=y.memberParts;y.next();)E=y.value,E instanceof oi&&ip(a,E,x,b)}}function Mh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}vn.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():tg(this)};function tg(a){a.vk===-1&&(a.vk=mn(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=kn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qp(a,y),kn.free(y),a.Fc=!0,a.bd(),tg(a))}},a.vp))}vn.prototype.ug=function(){this.vk!==-1&&(_t.clearTimeout(this.vk),this.vk=-1)},vn.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var b=this.viewportBounds,E=this.scale;b=kn.allocAt(0,0,b.width*E,b.height*E);var te=Mt.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,te.x-=ne,a.x<b.x+x.left/2&&(te.x-=ne),a.x<b.x+x.left/4&&(te.x-=4*ne)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,te.x+=ne,a.x>b.x+b.width-x.right/2&&(te.x+=ne),a.x>b.x+b.width-x.right/4&&(te.x+=4*ne));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y-=ne,a.y<b.y+x.top/2&&(te.y-=ne),a.y<b.y+x.top/4&&(te.y-=4*ne)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y+=ne,a.y>b.y+b.height-x.bottom/2&&(te.y+=ne),a.y>b.y+b.height-x.bottom/4&&(te.y+=4*ne)),te.Xa(Ur)||(y=new Mt(y.x+te.x/E,y.y+te.y/E)),kn.free(b),Mt.free(te),y},rt=vn.prototype,rt.Cs=function(){return null},rt.av=function(){return null},rt.bs=function(a,y){this.pj.add(a,y)},rt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof ir&&(y.$p=null)})};function wf(a,y,x){function b(){var Te=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||Te-_e>fe?y(x,E,ae):_t.requestAnimationFrame(b)}for(var E=x.callback,te=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){te=!1;break}if(typeof E!="function"||te)return y(x,E,a);var ae=a,fe=x.callbackTimeout||300,_e=+new Date;return _t.requestAnimationFrame(function(){b()}),null}rt.Wz=function(a){return ys?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},rt.Jx=function(a){return a===void 0&&(a={}),wf(this,this.Xz,a)},rt.Xz=function(a,y,x){var b=um(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case $d+"data":E=b.getImageData(0,0,x.width,x.height);break;case $d:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Nt('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function um(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Nt("properties argument must be an Object.");var E=y.size||null,te=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(te="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new Xn(1/0,1/0):new Xn(2e3,2e3));var ae=y.position||null,fe=y.parts||null,_e=y.padding===void 0?1:y.padding,Te=y.background||null,je=y.omitTemporary;je===void 0&&(je=!0);var Ve=y.document||document,Qe=y.elementFinished||null,it=y.showTemporary;it===void 0&&(it=!je),y=y.showGrid,y===void 0&&(y=it),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof _e=="number"?_e=new Li(_e):_e instanceof Li||Nt("MakeImage padding must be a Margin or a number."),_e.left=Math.max(_e.left,0),_e.right=Math.max(_e.right,0),_e.top=Math.max(_e.top,0),_e.bottom=Math.max(_e.bottom,0),a.ib.Vc(!0),je=new Du(null,Ve,void 0,!0);var ct=je.context;if(!(E||te||fe||ae))return je.width=a.Aa+Math.ceil(_e.left+_e.right),je.height=a.ya+Math.ceil(_e.top+_e.bottom),x==="SVG"?b===null?null:(b.resize(je.width,je.height,je.width,je.height),b.ownerDocument=Ve,b.hs=Qe,Ys(a,b.context,_e,new Xn(je.width,je.height),a.Ca,a.pa,fe,Te,it,y),b.context):(a.Xm=!1,Ys(a,ct,_e,new Xn(je.width,je.height),a.Ca,a.pa,fe,Te,it,y),a.Xm=!0,je.context);var Dt=a.Pp,Lt=a.documentBounds.copy();if(Lt.Fv(a.yb),it)for(var Gt=a.Wa.s,Zt=Gt.length,Vt=0;Vt<Zt;Vt++){var qt=Gt[Vt];if(qt.visible&&qt.isTemporary){qt=qt.Pa.s;for(var yn=qt.length,ii=0;ii<yn;ii++){var di=qt[ii];di.isInDocumentBounds&&di.isVisible()&&(di=di.actualBounds,di.w()&&Lt.ed(di))}}}if(Gt=new Mt(Lt.x,Lt.y),fe!==null){for(Zt=new kn(0,0,0,0),Vt=!0,qt=fe.iterator,qt.reset();qt.next();)yn=qt.value,yn instanceof Mi&&(ii=yn.layer,ii!==null&&!ii.visible||ii!==null&&!it&&ii.isTemporary||!yn.isVisible()||(yn=yn.actualBounds,yn.w()&&(Vt?(Vt=!1,Zt.assign(yn)):Zt.ed(yn))));Lt.width=Zt.width,Lt.height=Zt.height,Gt.x=Zt.x,Gt.y=Zt.y}return ae!==null&&ae.w()&&(Gt=ae,te||(te=Dt)),Zt=ae=0,_e!==null&&(ae=_e.left+_e.right,Zt=_e.top+_e.bottom),Vt=qt=0,E!==null&&(qt=E.width,Vt=E.height,isFinite(qt)&&(qt=Math.max(0,qt-ae)),isFinite(Vt)&&(Vt=Math.max(0,Vt-Zt))),E!==null&&te!==null?(te==="NaN"&&(te=Dt),E.w()?(E=qt,Lt=Vt):isNaN(Vt)?(E=qt,Lt=Lt.height*te):(E=Lt.width*te,Lt=Vt)):E!==null?E.w()?(te=Math.min(qt/Lt.width,Vt/Lt.height),E=qt,Lt=Vt):isNaN(Vt)?(te=qt/Lt.width,E=qt,Lt=Lt.height*te):(te=Vt/Lt.height,E=Lt.width*te,Lt=Vt):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-ae)/Lt.width,(ne.height-Zt)/Lt.height),te>Dt?(te=Dt,E=Lt.width,Lt=Lt.height):(E=ne.width,Lt=ne.height)):(E=Lt.width*te,Lt=Lt.height*te):(te=Dt,E=Lt.width,Lt=Lt.height),_e!==null?(E+=ae,Lt+=Zt):_e=new Li(0),ne!==null&&(Dt=ne.width,ne=ne.height,isNaN(Dt)&&(Dt=2e3),isNaN(ne)&&(ne=2e3),isFinite(Dt)&&(E=Math.min(E,Dt)),isFinite(ne)&&(Lt=Math.min(Lt,ne))),je.width=Math.ceil(E),je.height=Math.ceil(Lt),x==="SVG"?b===null?null:(b.resize(je.width,je.height,je.width,je.height),b.ownerDocument=Ve,b.hs=Qe,Ys(a,b.context,_e,new Xn(Math.ceil(E),Math.ceil(Lt)),te,Gt,fe,Te,it,y),b.context):(a.Xm=!1,Ys(a,ct,_e,new Xn(Math.ceil(E),Math.ceil(Lt)),te,Gt,fe,Te,it,y),a.Xm=!0,je.context)}Ye.Object.defineProperties(vn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Ue||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Tc(this,_t.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new Tc(this,_t.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(a.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var y=this.Ka;y!==null?(y.H=void 0,y.goDiagram=void 0,y.go=void 0,y.innerHTML="",this.ta!==null&&(y=this.ta.Oa,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),y=this.toolManager,y!==null&&(y.mouseDownTools.each(function(x){x.cancelWaitAfter()}),y.mouseMoveTools.each(function(x){x.cancelWaitAfter()}),y.mouseUpTools.each(function(x){x.cancelWaitAfter()})),y.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(_t,"resize",this.Ov,!1),this.removeEventListener(_t,"wheel",this.$j,!0),ac===this&&(ac=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Rd(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Ln(a,"0 <= value <= 1",vn,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),ql(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var y=this.mn;y!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",y,a),ql(this,!1))}},allowHorizontalScroll:{get:function(){return this.Xs},set:function(a){var y=this.Xs;y!==a&&(this.Xs=a,this.g("allowHorizontalScroll",y,a),ql(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var y=this.$s;y!==a&&(this.$s=a,this.g("allowVerticalScroll",y,a),ql(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Ln(a,">= 0",vn,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Ln(a,">= 0",vn,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else Ln(a,">= 0",vn,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||om(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&Nt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Ph(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Jo(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(te){return y.ik(te)}),y.ik(this.Oc)),this.cc=a,this.partManager=Xp(this.cc.type);for(var E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(te){return a.Pe(te)}),this.vb=b,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(_t,"pointermove",this.dk,!0),this.addEventListener(_t,"pointerdown",this.ui,!0),this.addEventListener(_t,"pointerup",this.fk,!0),this.addEventListener(_t,"pointerout",this.ek,!0),this.addEventListener(_t,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(_t,"wheel",this.$j,!0),this.addEventListener(_t,"selectstart",this.preventDefault,!1)):(this.removeEventListener(_t,"pointermove",this.dk,!0),this.removeEventListener(_t,"pointerdown",this.ui,!0),this.removeEventListener(_t,"pointerup",this.fk,!0),this.removeEventListener(_t,"pointerout",this.ek,!0),this.removeEventListener(_t,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(_t,"wheel",this.$j,!0),this.removeEventListener(_t,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=Mt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),ma(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Mc(this):(this.vb=!0,a=this.scale,xf(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}Mt.free(y)}},initialPosition:{get:function(){return this.zt},set:function(a){this.zt.D(a)||(this.zt=a.J())}},initialScale:{get:function(){return this.At},set:function(a){this.At!==a&&(this.At=a)}},grid:{get:function(){return this.fe===null&&(this.fe=yf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=yf(this)),a.type!==Wn.Grid&&Nt("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),Lc(this),this.N(),this.g("grid",y,a)}}},viewportBounds:{get:function(){return this.Rw}},viewSize:{get:function(){return this.wo},set:function(a){var y=this.viewSize;y.D(a)||(this.wo=a=a.J(),this.ya=this.Aa=0,a.w()?(this.Aa=a.width,this.ya=a.height):this.Ka!==null&&(this.Aa=this.Ka.clientWidth||1,this.ya=this.Ka.clientHeight||1),Mc(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||Nt("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new Li(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===Th&&ql(this,!1),this.g("scrollMode",y,a),this.Ee=!0,this.N())}},scrollsPageOnFocus:{get:function(){return this.nu},set:function(a){var y=this.nu;y!==a&&(this.nu=a,this.g("scrollsPageOnFocus",y,a))}},positionComputation:{get:function(){return this.Zt},set:function(a){var y=this.Zt;y!==a&&(this.Zt=a,ql(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,Yp(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&Yp(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==$a&&ql(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||Nt("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||Nt("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):Ln(a,"> 0",vn,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):Ln(a,"> 0",vn,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.zk},set:function(a){var y=this.zk;y.D(a)||(this.zk=a=a.J(),this.g("contentAlignment",y,a),ql(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Li(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&Nt("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Sg(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==kh&&a!==Qs&&a!==op&&Nt("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new Xn(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new Li(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ye.Object.defineProperties(vn,{licenseKey:{get:function(){return ag.jc()},set:function(a){ag.add(a.replace(/\s/g,""))}},version:{get:function(){return Vd}}}),vn.prototype.makeImageData=vn.prototype.Jx,vn.prototype.makeImage=vn.prototype.Wz,vn.prototype.cacheGroupExternalLinks=vn.prototype.Fu,vn.prototype.addRenderer=vn.prototype.bs,vn.prototype.makeSVG=vn.prototype.av,vn.prototype.makeSvg=vn.prototype.Cs,vn.prototype.stopAutoScroll=vn.prototype.ug,vn.prototype.doAutoScroll=vn.prototype.gs,vn.prototype.isUnoccupied=vn.prototype.Yj,vn.prototype.raiseDiagramEvent=vn.prototype.R,vn.prototype.removeDiagramListener=vn.prototype.am,vn.prototype.addDiagramListener=vn.prototype.Bj,vn.prototype.findTreeRoots=vn.prototype.yz,vn.prototype.layoutDiagram=vn.prototype.Uz,vn.prototype.findTopLevelGroups=vn.prototype.qz,vn.prototype.findTopLevelNodesAndLinks=vn.prototype.rz,vn.prototype.ensureBounds=vn.prototype.Va,vn.prototype.findLinksByExample=vn.prototype.ls,vn.prototype.findNodesByExample=vn.prototype.ms,vn.prototype.findLinkForData=vn.prototype.Kc,vn.prototype.findNodeForData=vn.prototype.ii,vn.prototype.findPartForData=vn.prototype.Lc,vn.prototype.findLinkForKey=vn.prototype.findLinkForKey,vn.prototype.findNodeForKey=vn.prototype.Vb,vn.prototype.findPartForKey=vn.prototype.findPartForKey,vn.prototype.rebuildParts=vn.prototype.Wd,vn.prototype.transformViewToDoc=vn.prototype.Ps,vn.prototype.transformRectDocToView=vn.prototype.zA,vn.prototype.transformDocToView=vn.prototype.op,vn.prototype.centerRect=vn.prototype.es,vn.prototype.scrollToRect=vn.prototype.tv,vn.prototype.scroll=vn.prototype.scroll,vn.prototype.highlightCollection=vn.prototype.Jz,vn.prototype.highlight=vn.prototype.Iz,vn.prototype.selectCollection=vn.prototype.rA,vn.prototype.select=vn.prototype.select,vn.prototype.updateAllRelationshipsFromData=vn.prototype.rp,vn.prototype.updateAllTargetBindings=vn.prototype.updateAllTargetBindings,vn.prototype.commit=vn.prototype.commit,vn.prototype.rollbackTransaction=vn.prototype.Kf,vn.prototype.commitTransaction=vn.prototype.eb,vn.prototype.startTransaction=vn.prototype.Ea,vn.prototype.raiseChanged=vn.prototype.g,vn.prototype.raiseChangedEvent=vn.prototype.cb,vn.prototype.removeChangedListener=vn.prototype.ik,vn.prototype.addChangedListener=vn.prototype.Pe,vn.prototype.removeModelChangedListener=vn.prototype.mA,vn.prototype.addModelChangedListener=vn.prototype.Yw,vn.prototype.findLayer=vn.prototype.Qj,vn.prototype.removeLayer=vn.prototype.kA,vn.prototype.addLayerAfter=vn.prototype.Cy,vn.prototype.addLayerBefore=vn.prototype.Ww,vn.prototype.addLayer=vn.prototype.Al,vn.prototype.moveParts=vn.prototype.moveParts,vn.prototype.copyParts=vn.prototype.Kj,vn.prototype.removeParts=vn.prototype.Is,vn.prototype.remove=vn.prototype.remove,vn.prototype.add=vn.prototype.add,vn.prototype.clearDelayedGeometries=vn.prototype.bx,vn.prototype.setProperties=vn.prototype.nm,vn.prototype.attach=vn.prototype.Du,vn.prototype.set=vn.prototype.set,vn.prototype.resetInputOptions=vn.prototype.Sx,vn.prototype.setInputOption=vn.prototype.sA,vn.prototype.getInputOption=vn.prototype.Ql,vn.prototype.resetRenderingHints=vn.prototype.Tx,vn.prototype.setRenderingHint=vn.prototype.Xx,vn.prototype.getRenderingHint=vn.prototype.Gf,vn.prototype.maybeUpdate=vn.prototype.bd,vn.prototype.requestUpdate=vn.prototype.$b,vn.prototype.delayInitialization=vn.prototype.Xy,vn.prototype.isUpdateRequested=vn.prototype.Pz,vn.prototype.invalidateDocumentBounds=vn.prototype.Ya,vn.prototype.findObjectsNear=vn.prototype.og,vn.prototype.findPartsNear=vn.prototype.mz,vn.prototype.findObjectsIn=vn.prototype.Cf,vn.prototype.findPartsIn=vn.prototype.ux,vn.prototype.findObjectsAt=vn.prototype.ji,vn.prototype.findPartsAt=vn.prototype.lz,vn.prototype.findObjectAt=vn.prototype.ic,vn.prototype.findPartAt=vn.prototype.Ol,vn.prototype.focusObject=vn.prototype.zz,vn.prototype.alignDocument=vn.prototype.Jy,vn.prototype.zoomToRect=vn.prototype.BA,vn.prototype.zoomToFit=vn.prototype.zoomToFit,vn.prototype.diagramScroll=vn.prototype.kx,vn.prototype.focus=vn.prototype.focus;var rp=new ci,cm=null,ys=_t.document!==void 0,Kd=null,ad="",$a=new En(vn,"None",0),tu=new En(vn,"Uniform",1),ld=new En(vn,"UniformToFill",2),bf=new En(vn,"CycleAll",10),ng=new En(vn,"CycleNotDirected",11),ig=new En(vn,"CycleNotDirectedFast",12),rg=new En(vn,"CycleNotUndirected",13),og=new En(vn,"CycleDestinationTree",14),sg=new En(vn,"CycleSourceTree",15),Th=new En(vn,"DocumentScroll",1),Cf=new En(vn,"InfiniteScroll",2),kh=new En(vn,"TreeParentCollapsed",21),Qs=new En(vn,"AllParentsCollapsed",22),op=new En(vn,"AnyParentsCollapsed",23),ag=new Rn,Vd="2.3.10",$d="image",Pf=null,hm=!1;function Fa(){if(ys){var a=_t.document.createElement("canvas"),y=a.getContext("2d"),x=Mn("7ca11abfd022028846");y[x]=Mn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",dn.Dx+"4ae6247590da4bb21c324ba3a84e385776",yr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",on.za],E=1;5>E;E++)y[Mn("7ca11abfd7330390")](Mn(b[E-1]),10,15*E);for(y[x]=Mn("39f046ebb36e4b"),x=1;5>x;x++)y[Mn("7ca11abfd7330390")](Mn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(yr.prototype.Cd=yr.prototype.Eu),Pf=a}}vn.className="Diagram",vn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=_t.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof vn?y.H:null},vn.inherit=function(a,y){function x(){}if(Object.getPrototypeOf(a).prototype)throw Error(`Used go.Diagram.inherit defining already defined class
|
|
|
`+a);x.prototype=y.prototype,a.prototype=new x,a.prototype.constructor=a},vn.useDOM=function(a){ys=a?_t.document!==void 0:!1},vn.isUsingDOM=function(){return ys},vn.None=$a,vn.Uniform=tu,vn.UniformToFill=ld,vn.CycleAll=bf,vn.CycleNotDirected=ng,vn.CycleNotDirectedFast=ig,vn.CycleNotUndirected=rg,vn.CycleDestinationTree=og,vn.CycleSourceTree=sg,vn.DocumentScroll=Th,vn.InfiniteScroll=Cf,vn.TreeParentCollapsed=kh,vn.AllParentsCollapsed=Qs,vn.AnyParentsCollapsed=op;function dm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Yd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=_t[Mn("76a715b2f73f148a")][Mn("72ba13b5")]||"";if(a.Rc=!0,ys){var b=vn[Mn("76a115b6ed251eaf4692")];if(b)for(var E=ag.iterator;E.next()&&(b=E.value,b=Mn(b).split(Mn("39e9")),!(6>b.length));){var te=Mn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=Mn(dn[Mn("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var ae=_t[Mn("74a900bae4370f8b51")][Mn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[Mn("73a612b6fb191d")](Mn("3aad1ab6e022098b4dc4")),te=Mn(b[2]),-1<ne&&(ae=ae[Mn("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[Mn("76ad18b4f73e")],ae=x[Mn("73a612b6fb191d")](Mn("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[Mn("73a612b6fb191d")](te),0>ne&&te!==Mn("7da71ca0ad381e90")&&(ne=y[Mn("73a612b6fb191d")](Mn("76a715b2ef3e149757"))),0>ne&&(ne=y[Mn("73a612b6fb191d")](Mn("76a715b2ef3e149757"))),0>ne&&(ne=y[Mn("73a612b6fb191d")](Mn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Mn("73a612b6fb191d")](Mn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Mn("73a612b6fb191d")](Mn("35"))||y[Mn("73a612b6fb191d")](Mn("35"))===-1),!a.Rc||x[Mn("73a612b6fb191d")](Mn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Mn("73a612b6fb191d")](te)),!a.Rc)||(ne=_t[Mn("76a715b2f73f148a")][Mn("69ad17a1e03e")],ae=ne[Mn("73a612b6fb191d")](Mn("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[Mn("73a612b6fb191d")](te)>ae),!a.Rc)))break;if(te[0]==="#"){ne=_t.document.createElement("div");for(var fe=b[0].replace(/[A-Za-z]/g,"");4>fe.length;)fe+="9";if(ae=fe,fe=fe.substr(fe.length-4),b="",b+=["gsh","gsf"][parseInt(fe.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(fe.substr(0,1),10)%4],ne[Mn("79a417a0f0181a8946")]=b,_t.document[Mn("78a712aa")]){_t.document[Mn("78a712aa")][Mn("7bb806b6ed32388c4a875b")](ne),fe=_t.getComputedStyle(ne).getPropertyValue(Mn("78a704b7e62456904c9b12701b6532a8"));var _e=_t.getComputedStyle(ne).getPropertyValue(Mn("75b817b0ea2202"));if(_t.document[Mn("78a712aa")][Mn("68ad1bbcf533388c4a875b")](ne),fe){if(ne=_t[Mn("77a902b0eb1b1e804a8a")],_e==="0."+parseInt(ae,10)%100||fe.indexOf(parseInt(te[1]+te[2],16))!==-1&&fe.indexOf(parseInt(te[3]+te[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(Mn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var Te in ne)if(b===ne[Te].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(Te=x[Mn("76ad18b4f73e")],E=x[Mn("73a612b6fb191d")](Mn("35e7"))+2;E<Te;E++)y+=x[E];x=y[Mn("73a612b6fb191d")](Mn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Mn("73a612b6fb191d")](Mn("35")))}}}return 0<a.Rc&&a!==a.wy}dm.className="DiagramHelper";function ah(a){this.j=a===void 0?new Mt:a,this.o=new Mt}Ye.Object.defineProperties(ah.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var _f="DraggingInfo";ah.className="DraggingInfo";function re(a,y,x){this.node=a,this.info=y,this.Su=x}re.className="DraggingNodeInfoPair";function pe(){this.reset()}pe.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Xn(NaN,NaN).freeze(),this.gridSnapCellSpot=Xs,this.gridSnapOrigin=new Mt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},pe.className="DraggingOptions";function Fe(a,y){if(typeof a=="string"||_t.Element&&a instanceof Element)var x=vn.call(this,a)||this;else x=vn.call(this)||this,y=a;return Re(x),y&&x.nm(y),x}qe(Fe,vn);function Re(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=qa,a.layout=new Pa}Fe.prototype.reset=function(){vn.prototype.reset.call(this),Re(this)},Fe.className="Palette";function Ue(a,y){if(typeof a=="string"||_t.Element&&a instanceof Element)var x=vn.call(this,a)||this;else x=vn.call(this)||this,y=a;var b=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new Mi;var E=new gr;return E.stroke="magenta",E.strokeWidth=2,E.fill="transparent",E.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(E),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Li(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Rt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,ae=b.lastInput.documentPoint;te.position=new Mt(ae.x-ne.width/2,ae.y-ne.height/2)}},x.Pf=function(){b.Ya(),wt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&wt(b)},x.autoScale=tu,x.vb=!1,y&&Object.assign(x,y),x}qe(Ue,vn),Ue.prototype.computePixelRatio=function(){return 1},Ue.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(pu(this),this.ql===null){var x=new Du(null);x.width=a.width,x.height=a.height,this.ql=x}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),ot(this)}finally{this.ta=a,this.ib=y}}}vn.prototype.redraw.call(this)},Ue.prototype.gc=function(){if(this.Ka===null&&Nt("No div specified"),this.ta===null&&Nt("No canvas specified"),!(this.ta instanceof Tc)&&(Rv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){pu(this);var y=this.ta;a=this.ib,a.Vc(!0),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,y.width,y.height),1>this.updateDelay?ot(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function ot(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=kn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Lc(y,E),kn.free(E),ba(y));var te=a.Ab;te.reset(),a.scale!==1&&te.scale(a.scale),a.position.x===0&&a.position.y===0||te.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),E.yc(),y=y.Wa.s,te=y.length;for(var ne=0;ne<te;ne++){var ae=y[ne],fe=a;if(ae.visible&&ae.opacity!==0){var _e=ae.diagram.grid.part;if(!x&&ae.isTemporary)b&&_e.layer===ae&&(ae=Ma(ae,E),_e.gc(E,fe),E.globalAlpha=ae);else{for(var Te=Ma(ae,E),je=fe.scale,Ve=kn.alloc(),Qe=ae.Pa.s,it=Qe.length,ct=0;ct<it;ct++){var Dt=Qe[ct];(b||Dt!==_e)&&ae.Oj(E,Dt,fe,null,je,Ve,!1)}kn.free(Ve),E.globalAlpha=Te}}}}}function wt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=Xn.alloc();E.h(x.width,x.height),b.desiredSize=E,Xn.free(E),a=2/a.scale,b instanceof gr&&(b.strokeWidth=a),y.location=new Mt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Ue.prototype.computeBounds=function(){var a=this.observed;if(a===null)return br;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Ue.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Ue.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),wt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=b,this.R("ViewportBoundsChanged",this.fc,a))},Ye.Object.defineProperties(Ue.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Ue&&Nt("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),wt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),wt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),Ue.className="Overview";function Rt(){ns.call(this),this.j=null}qe(Rt,ns),Rt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new Mt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Mt(a.x-this.j.x,a.y-this.j.y)),!0)},Rt.prototype.doActivate=function(){this.j=null,ns.prototype.doActivate.call(this)},Rt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Rt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new Mt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Mt(a.x-this.j.x,a.y-this.j.y)}}},Rt.className="OverviewDraggingTool";function It(){vr(this),this.H=ac,this.Ha=this.u=this.o=!0,this.F=this.V=this.nb=this.ia=!1,this.ij=this.j=null,this.Hb=1.05,this.Jt=NaN,this.sw=null,this.Au=NaN,this.yu=br,this.hb=!0,this.cg=null,this.ob=200}It.prototype.toString=function(){return"CommandHandler"},It.prototype.Xe=function(a){this.H=a},It.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Nr?y.meta:y.control,b=y.shift,E=y.alt,te=y.key;!x||te!=="C"&&te!=="Insert"?x&&te==="X"||b&&te==="Del"?this.canCutSelection()&&this.cutSelection():x&&te==="V"||b&&te==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&te==="Y"||E&&b&&te==="Backspace"?this.canRedo()&&this.redo():x&&te==="Z"||E&&te==="Backspace"?this.canUndo()&&this.undo():te==="Del"||te==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&te==="A"?this.canSelectAll()&&this.selectAll():te==="Esc"?this.canStopCommand()&&this.stopCommand():te==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):te==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):te==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):te==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):te==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):te==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):te==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):te==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):te===" "?this.canScrollToPart()&&this.scrollToPart():te==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():te==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&te==="0"?this.canResetZoom()&&this.resetZoom():b&&te==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&te==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&te==="G"?this.canUngroupSelection()&&this.ungroupSelection():te==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():te==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},It.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},It.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Wo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},It.prototype.canStopCommand=function(){return!0},It.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var b=a.links;b.next();)b.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},It.prototype.canSelectAll=function(){return this.diagram.allowSelect},It.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new Nn,x=a.selection.iterator;x.next();)dd(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},It.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},It.prototype.copySelection=function(){var a=this.diagram,y=new Nn;for(a=a.selection.iterator;a.next();)dd(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},It.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},It.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},It.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},It.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Kd=null,ad="";else{x=y.model;var b=!1,E=!1,te=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),te=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new Rn,x.addAll(te),Kd=x,ad=y.model.dataFormat}}y.R("ClipboardChanged",x)},It.prototype.pasteFromClipboard=function(){var a=new Nn,y=Kd;if(y===null)return a;var x=this.diagram;if(ad!==x.model.dataFormat)return a;var b=x.model,E=!1,te=!1,ne=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(te=b.Ij,b.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=te),y=ne.iterator;y.next();)x=y.value,b=y.key,x.location.w()||(b.location.w()?x.location=b.location:!x.position.w()&&b.position.w()&&(x.position=b.position)),a.add(x)}return a},It.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var b=x.iterator;b.next();)b.value.isSelected=!0;if(a!==null){var E=y.computePartsBounds(y.selection);if(E.w()){var te=this.computeEffectiveCollection(y.selection,y.Wm);Ec(y,te,new Mt(a.x-E.centerX,a.y-E.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},It.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Kd===null||Kd.count===0||ad!==a.model.dataFormat)},It.prototype.undo=function(){this.diagram.undoManager.undo()},It.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},It.prototype.redo=function(){this.diagram.undoManager.redo()},It.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},It.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===$a&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},It.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==$a?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},It.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===$a&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},It.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==$a?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},It.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},It.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},It.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Jo(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=br):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Ss(y)},It.prototype.canZoomToFit=function(){return this.diagram.allowZoom},It.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(fe){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;Jo(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Xt(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var te=function(){y.Ea();for(var fe=E.pop();0<E.length&&fe instanceof oi&&fe.isTreeExpanded&&(!(fe instanceof ir)||fe.isSubGraphExpanded);)fe=E.pop();0<E.length?(fe instanceof Mi&&y.tv(fe.actualBounds),fe instanceof oi&&!fe.isTreeExpanded&&(fe.isTreeExpanded=!0),fe instanceof ir&&!fe.isSubGraphExpanded&&(fe.isSubGraphExpanded=!0)):(fe instanceof Mi&&y.es(fe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){mn(te,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),te()}}else{var ae=y.position.copy();y.es(a.actualBounds),ae.Xa(y.position)&&x.Cc()}}};function Xt(a,y,x){if(y.isVisible())return x;if(y instanceof qr)Xt(a,y.adornedPart,x);else if(y instanceof $n){var b=y.fromNode;b!==null&&Xt(a,b,x),y=y.toNode,y!==null&&Xt(a,y,x)}else y instanceof oi&&(b=y.labeledLink,b!==null&&Xt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Xt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Xt(a,y,x));return x}It.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Mi)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},It.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Jo(y.animationManager,"Collapse Tree");var x=new Rn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof oi&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},It.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof oi&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof oi&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},It.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Jo(y.animationManager,"Expand Tree");var x=new Rn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof oi&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},It.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof oi)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof oi&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},It.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new Rn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var ae=new Rn,fe=E.iterator;fe.next();){var _e=fe.value;te=!1;for(var Te=E.iterator;Te.next();)if(_e.Td(Te.value)){te=!0;break}te||ae.add(_e)}if(0<ae.count){var je=ae.first().containingGroup;if(je!==null)for(;je!==null;){E=!1;for(var Ve=ae.iterator;Ve.next();)if(!Ve.value.Td(je)){E=!0;break}if(E)je=je.containingGroup;else break}if(x instanceof ir)Ru(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Qe=y.copyNodeData(x);$t(Qe)&&(y.xf(Qe),b=a.ii(Qe))}if(b!==null){je!==null&&this.isValidMember(je,b)&&(b.containingGroup=je);for(var it=ae.iterator;it.next();){var ct=it.value;this.isValidMember(b,ct)&&(ct.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},It.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function Tn(a){var y=Gn();for(a=a.iterator;a.next();){var x=a.value;x instanceof $n||y.push(x)}a=new Nn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],te=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){te=!1;break}te&&a.add(E)}return ti(y),a}It.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof $n)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},It.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var b=new Rn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof ir&&te.canUngroup()&&b.add(te)}var ne=new Rn;if(0<b.count){y.clearSelection(!0);for(var ae=b.iterator;ae.next();){var fe=ae.value;fe.expandSubGraph();var _e=fe.containingGroup,Te=_e!==null&&_e.data!==null?x.wa(_e.data):void 0;ne.addAll(fe.memberParts);for(var je=ne.iterator;je.next();){var Ve=je.value;if(Ve.isSelected=!0,!(Ve instanceof $n)){var Qe=Ve.data;Qe!==null?x.mp(Qe,Te):Ve.containingGroup=_e}}y.remove(fe)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},It.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof ir))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ir&&y.canUngroup())return!0;return!1},It.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Tn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},It.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Jo(y.animationManager,"Collapse SubGraph");var x=new Rn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof ir&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},It.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof ir&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ir&&y.isSubGraphExpanded)return!0;return!1},It.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Jo(y.animationManager,"Expand SubGraph");var x=new Rn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof ir&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},It.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof ir&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ir&&!y.isSubGraphExpanded)return!0;return!1},It.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var b=y.selection.iterator;b.next();){var E=b.value;if(E.canEdit()){a=E;break}}if(a===null)return;a=a.Nl(function(te){return te instanceof To&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},It.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof To))return!1;if(a=a.part,a!==null&&a.canEdit())return!0}else for(y=y.selection.iterator;y.next();)if(a=y.value,a.canEdit()&&(a=a.Nl(function(x){return x instanceof To&&x.editable}),a!==null))return!0;return!1},It.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var b=y.lastInput,E=null;a instanceof nn?E=a.ga(jr):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Mt(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,Sr(x,!1,a)}},It.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},It.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,b=x.toolManager.findTool("Dragging"),E=x.currentTool===b;if(y===void 0&&(y=E?b.dragOptions:x.Wm),b=new ci,a===null)return b;for(var te=a.iterator;te.next();)Ou(x,b,te.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(te=a.iterator;te.next();)a=te.value,a instanceof $n&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Ye.Object.defineProperties(It.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||Nt("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),It.className="CommandHandler",oh=function(){return new It};function nn(){vr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Mt(NaN,NaN).freeze(),this.jd=Ho,this.Ab=new yr,this.wh=new yr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=xa,this.uc=new kn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new kn(NaN,NaN,NaN,NaN).freeze(),this.dc=new kn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=oo,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var Un,Fn,mi,_i,Bi,rr,Rr,wr,Zr,bo;nn.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=jn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},nn.prototype.Vw=function(a){var y=this.Dh;if(rn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},nn.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},nn.prototype.clone=function(){var a=new this.constructor;if(this.cloneProtected(a),this.Dh!==null)for(var y=0;y<this.Dh.length;y++){var x=this.Dh[y];a[x]=this[x]}return a},nn.prototype.copy=function(){return this.clone()},rt=nn.prototype,rt.qb=function(a){a.classType===$n?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Nt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===nn&&(this.stretch=a)},rt.toString=function(){return Bn(this.constructor)+"#"+Dr(this)},rt.th=function(){this.A!==null&&(this.A.nc=!0)};function xr(a){a.A===null?a.A=new Lf:a.A.nc&&(a.A=a.A.copy())}rt.Xc=function(){if(this.ba===null){var a=new lg;a.Xi=ms,a.yj=ms,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},rt.cb=function(a,y,x,b,E,te,ne){var ae=this.part;if(ae!==null&&(ae.gk(a,y,x,b,E,te,ne),x===this&&a===Vo&&Ta(this)&&zo(this,ae,y),te=this.diagram,this.animationTriggers===null||te===null||!te.pi||te.undoManager.isUndoingRedoing||te.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&te.animationManager.isEnabled&&!te.animationManager.isTicking&&(this.jo===null&&(this.jo=new ci),ne=te.undoManager.transactionLevel===0,a.startCondition===wa?ne=!0:a.startCondition===zs&&(ne=!1),ne?(te=new gs,ls(a,te),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,te),te.vu=this,te.Nw=a,te.add(this,y,b,E),te.start()):(Jo(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Wn&&x===ae&&(ae.l&16777216)!==0&&ae.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)ae=x[E],ae instanceof Wn&&qd(ae,function(fe){fe.data!==null&&fe.l&16777216&&fe.La(y)})};function zo(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var te=E.value,ne=null;if(te.sourceName!==null){if(ne=LS(te,b,a),ne===null)continue;te.sp(a,ne,x,null)}else if(te.isToModel){var ae=y.diagram;ae===null||ae.skipsModelSourceBindings||te.sp(a,ae.model.modelData,x,b)}else{if(ae=b.data,ae===null)continue;var fe=y.diagram;fe===null||fe.skipsModelSourceBindings||te.sp(a,ae,x,b)}ne===a&&(ae=b.ks(te.Ai),ae!==null&&te.Mv(ae,ne,x))}}rt.ks=function(a){return this.bindingId===a?this:null},rt.g=function(a,y,x){this.cb(Vo,a,this,y,x)},rt.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new yr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function ca(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}rt.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?eo(a.x,a.y,0,0,0,b.height)<=y||eo(a.x,a.y,0,b.height,b.width,b.height)<=y||eo(a.x,a.y,b.width,b.height,b.width,0)<=y||eo(a.x,a.y,b.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,b.height)<=y&&a.zd(b.width,0)<=y&&a.zd(b.width,b.height)<=y},rt.se=function(){return!0},rt.ca=function(a){var y=Mt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Mt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),te=b.Ql("extraTouchArea"),ne=te/2,ae=this.naturalBounds;b=this.Df()*b.scale;var fe=1/b;if(ae.width*b<E&&ae.height*b<E)return a=Lo(x.x-ne*fe,x.y-ne*fe,x.width+te*fe,x.height+te*fe,y.x,y.y),Mt.free(y),a}return E=!1,(this instanceof qr||this instanceof gr?Lo(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),Mt.free(y),E},rt.gh=function(a){var y=this.naturalBounds;return Lo(0,0,y.width,y.height,a.x,a.y)},rt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=kn.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=Mt.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),Mt.free(E),kn.free(y),b},rt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Mt.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),Mt.free(E),b},rt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Mt.allocAt(0,0),E=Mt.allocAt(0,x.height),te=Mt.allocAt(x.width,x.height),ne=Mt.allocAt(x.width,0),ae=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(te))||a.ca(y.Ga(ne)))ae=!0;else{x=kn.allocAt(0,0,x.width,x.height);var fe=Mt.allocAt(a.x,a.y);x.ca(y.Cd(fe))?ae=!0:(fe.h(a.x,a.bottom),x.ca(y.Cd(fe))?ae=!0:(fe.h(a.right,a.bottom),x.ca(y.Cd(fe))?ae=!0:(fe.h(a.right,a.y),x.ca(y.Cd(fe))&&(ae=!0)))),Mt.free(fe),kn.free(x),!ae&&(on.us(a,b,E)||on.us(a,E,te)||on.us(a,te,ne)||on.us(a,ne,b))&&(ae=!0)}return Mt.free(b),Mt.free(E),Mt.free(te),Mt.free(ne),ae},rt.ga=function(a,y){if(y===void 0&&(y=new Mt),a instanceof vi){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},rt.mi=function(a){a===void 0&&(a=new kn);var y=this.naturalBounds,x=this.oe,b=Mt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),No(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),No(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),No(a,b.x,b.y,0,0),Mt.free(b),a},rt.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},rt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},rt.qs=function(a,y){return y===void 0&&(y=new Mt),y.assign(a),this.oe.Cd(y),y},rt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},rt.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),ae=te.m22*ne,fe=-te.m12*ne,_e=-te.m21*ne,Te=te.m11*ne,je=ne*(te.m21*te.dy-te.m22*te.dx),Ve=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,on.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*ae+y*_e+je,a=a*fe+y*Te+Ve,y=x*ae+b*_e+je,x=x*fe+b*Te+Ve,E.h(0,0),b=this.naturalBounds,x=on.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},nn.prototype.measure=function(a,y,x,b){if(iu(this)!==!1){var E=this.Kg,te=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-te,0),y=Math.max(y-E,0),x=Math.max((x||0)-te,0),b=Math.max((b||0)-E,0),te=this.angle,E=this.desiredSize;var ne=this.kq();te===90||te===270?(a=isFinite(E.height)?E.height+ne:a,y=isFinite(E.width)?E.width+ne:y):(a=isFinite(E.width)?E.width+ne:a,y=isFinite(E.height)?E.height+ne:y),E=x||0,ne=b||0;var ae=this instanceof Wn;switch(gl(this,!0)){case Fn:ne=E=0,ae&&(y=a=1/0);break;case Un:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case _i:isFinite(a)&&a>x&&(E=a),ne=0,ae&&(y=1/0);break;case Bi:isFinite(y)&&y>b&&(ne=y),E=0,ae&&(a=1/0)}ae=this.maxSize;var fe=this.minSize;E>ae.width&&fe.width<ae.width&&(E=ae.width),ne>ae.height&&fe.height<ae.height&&(ne=ae.height),x=Math.max(E,fe.width),b=Math.max(ne,fe.height),ae.width<x&&(x=Math.min(fe.width,x)),ae.height<b&&(b=Math.min(fe.height,b)),a=Math.min(ae.width,a),y=Math.min(ae.height,y),a=Math.max(x,a),y=Math.max(b,y),(te===90||te===270)&&(te=a,a=y,y=te,te=x,x=b,b=te),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||Nt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),ea(this,!1)}},nn.prototype.Wl=function(){},nn.prototype.Dd=function(){return!1},nn.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=kn.alloc();te.assign(this.Ib),this.Ib.ka(),nl(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&Oh(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof To&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||Nt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),Hc(this,!1),kn.free(te)},rt=nn.prototype,rt.eh=function(){};function Ya(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var te=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=te.width+y,te=te.height+ne,b+=y,E+=ne,y=gl(a,!0),x===b&&te===E&&(y=Fn),y){case Fn:(x>b||te>E)&&(ea(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Un:ea(a,!0),a.measure(b,E,0,0);break;case _i:ea(a,!0),a.measure(b,te,0,0);break;case Bi:ea(a,!0),a.measure(x,E,0,0)}}}rt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||jv(x,!0),this.N(),Sa(a,y)||(x.oh(),this.Pn(x)))},rt.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof oi&&W1(a,this))},rt.gc=function(a,y){if(!gu(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var te=this instanceof Wn&&Oh(this),ne=this.Ib;if(te){var ae=this.Ib,fe=this.dc,_e=this.areaBackground,Te=this.Ma;_e===null&&Te===null||a.yc(),_e!==null&&(ws(this,a,_e,!0,!0,fe,ae),_e instanceof po&&_e.type===yu?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(_e)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),Te!==null&&(ws(this,a,Te,!0,!1,fe,ae),Te instanceof po&&Te.type===yu?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(Te)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),this.hh(a,y)}if(!te&&(te||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){te=this.transform,ae=this.panel,this.l&4096&&Ca(this),_e=this.part,fe=!1;var je=0;_e&&y.Gf("drawShadows")&&(fe=_e.isShadowed)&&(Te=_e.shadowOffset,je=Math.max(Te.y,Te.x)*y.scale*y.Mb),Te=this.Dd();var Ve;if(!(Ve=y.$i||!Te)){var Qe=this.naturalBounds;Ve=this.wh;var it=Ve.m11,ct=Ve.m21,Dt=Ve.dx,Lt=Ve.m12,Gt=Ve.m22,Zt=Ve.dy,Vt,qt=Vt=0;Ve=Vt*it+qt*ct+Dt;var yn=Vt*Lt+qt*Gt+Zt;Vt=Qe.width+je,qt=0;var ii=Vt*it+qt*ct+Dt;Vt=Vt*Lt+qt*Gt+Zt,qt=Math.min(Ve,ii);var di=Math.min(yn,Vt),ui=Math.max(Ve+0,ii)-qt,Vn=Math.max(yn+0,Vt)-di;Ve=qt,yn=di,Vt=Qe.width+je,qt=Qe.height+je,ii=Vt*it+qt*ct+Dt,Vt=Vt*Lt+qt*Gt+Zt,qt=Math.min(Ve,ii),di=Math.min(yn,Vt),ui=Math.max(Ve+ui,ii)-qt,Vn=Math.max(yn+Vn,Vt)-di,Ve=qt,yn=di,Vt=0,qt=Qe.height+je,ii=Vt*it+qt*ct+Dt,Vt=Vt*Lt+qt*Gt+Zt,qt=Math.min(Ve,ii),di=Math.min(yn,Vt),ui=Math.max(Ve+ui,ii)-qt,Vn=Math.max(yn+Vn,Vt)-di,Ve=qt,yn=di,je=y.viewportBounds,Qe=je.x,it=je.y,Ve=!(Ve>je.width+Qe||Qe>ui+Ve||yn>je.height+it||it>Vn+yn)}if(Ve){if(Ve=(this.l&256)!==0,a.clipInsteadOfFill&&(Ve=!1),this instanceof To&&(a.font=this.font),Ve){if(yn=ae.se()?ae.naturalBounds:ae.actualBounds,ui=Math.max(ne.x,yn.x),Vn=Math.max(ne.y,yn.y),je=Math.min(ne.right,yn.right)-ui,Qe=Math.min(ne.bottom,yn.bottom)-Vn,it=this.tb,it!==null&&(ui=it.x,Vn=it.y,je=it.width,Qe=it.height),ui>ne.width+ne.x||ne.x>yn.width+yn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(ui,Vn,je,Qe),a.clip()}if(Te){if(!_e.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}fe&&(yn=_e.shadowOffset,a.Ev(yn.x*y.scale*this.scale*y.Mb,yn.y*y.scale*this.scale*y.Mb,_e.shadowBlur),lh(a),a.shadowColor=_e.shadowColor)}fe&&this.shadowVisible===!0?lh(a):fe&&this.shadowVisible===!1&&Uc(a),_e=this.naturalBounds,this.areaBackground!==null&&(a.yc(),nu(this,a,_e,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),fe&&va(this,ae)&&this.shadowVisible===null&&Uc(a),this.Ma!==null&&(a.yc(),Ml(this,a,_e,ne)),fe&&(this.Ma!==null||this.areaBackground!==null||va(this,ae))?(Vu(this,!0),this.shadowVisible===null&&Uc(a)):Vu(this,!1),this.hh(a,y),fe&&this.l&512&&lh(a),Te&&fe&&Uc(a),Ve&&(a.restore(),a.Vc(this instanceof Wn)),te.ws()||(y=1/(te.m11*te.m22-te.m12*te.m21),a.transform(te.m22*y,-te.m12*y,-te.m21*y,te.m11*y,y*(te.m21*te.dy-te.m22*te.dx),y*(te.m12*te.dx-te.m11*te.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function va(a,y){return y===null?!1:(Oh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Wn.Auto||y.type===Wn.Spot)&&y.Pb()!==a)}rt.Dv=function(){};function nu(a,y,x,b){ws(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof po&&a.areaBackground.type===yu?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function Ml(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,ae=x.width+E,fe=x.height+E;ws(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof po&&a.Ma.type===yu?(y.beginPath(),y.rect(te-E/2,ne-E/2,ae,fe),y.ng(a.Ma)):y.fillRect(te-E/2,ne-E/2,ae,fe)}function ja(a,y,x){for(var b=y.O.s,E=b.length,te=-1,ne=0;ne<E;ne++)if(b[ne]===a){te=ne;break}if(a=te,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Wn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function gu(a,y,x){if(!(y instanceof Hl))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var b=a.panel,E=a.nk(y);if(a.kk(y,x,E))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):b&&ja(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var te=a.shadowOffset;y.Ev(te.x*x.scale*a.scale*x.Mb,te.y*x.scale*a.scale*x.Mb,a.shadowBlur),lh(y),y.shadowColor=a.shadowColor}a instanceof To&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Wn;var ae=a instanceof Wn?Oh(a):!1;a.l&4096&&Ca(a);var fe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&ae?(ug(y,1,0,0,1,0,0),a.svg=y.ad):te?(ug(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):ug(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var _e=ne.copy().Vj();y.rb.ha=[_e.m11,_e.m12,_e.m21,_e.m22,_e.dx,_e.dy],nu(a,y,E,fe),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return te||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(te?(ae&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),Ml(a,y,E,fe),ae&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Ml(a,y,E,fe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,ae=!1,E&&x.Gf("drawShadows")&&(ae=E.isShadowed),y.clipInsteadOfFill&&(ae=!1),a.Dd()&&ae&&lh(y),ae&&a.shadowVisible===!0?lh(y):ae&&a.shadowVisible===!1&&Uc(y),E=a.panel,ae&&va(a,E)&&a.shadowVisible===null&&Uc(y),y.Il&&(_e=x.computePixelRatio(),_e="drop-shadow("+y.shadowOffsetX/_e+"px "+y.shadowOffsetY/_e+"px "+y.shadowBlur/_e/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",_e),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",_e)),ae&&(a.Ma!==null||a.areaBackground!==null||va(a,E))?(Vu(a,!0),a.shadowVisible===null&&Uc(y)):Vu(a,!1),E=ae,a.hh(y,x),te&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,ae=te?a.svg:y.yd,_e=a.svg,!te&&_e!==null&&ae!==_e&&_e.parentNode===a.panel.svg?(a.svg.replaceWith(ae),a.svg=ae,ae!==null&&a.$o(y,b,fe,ae),pl(y,_e),!0):(a.svg=ae,ne!==null&&ae===null&&(pm(y),y.nh.pop()),ae===null||(a.$o(y,b,fe,ae),y.Il&&(x=x.computePixelRatio(),a.Dv(ae,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&lh(y),a.Dd()&&Uc(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&ae.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&ae.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(ae):y.Nj.prepend(ae),y.ti=ae):b!==null&&ja(a,b,ae),ne!==null&&ne(a,ae)),!0)}rt.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var te=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,te.x),E=Math.max(x.y,te.y);var ne=Math.min(x.right,te.right)-y;x=Math.min(x.bottom,te.bottom)-E,te=this.tb,te!==null&&(y=te.x,E=te.y,ne=te.width,x=te.height),te=b.getAttribute("clip-path");var ae=null;te!==null&&(ae=a.svg.getElementById(te.split("#")[1].slice(0,-1))),ae===null?(te="CLIP"+Co++,ae=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Wn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),ae.appendChild(y),a.svg.appendChild(ae),b.setAttributeNS(null,"clip-path","url(#"+te+")")):(a=ae.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),pl(a,b)};function pl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function za(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Ar(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}rt.hh=function(){},rt.lv=function(){this.Uc=!0},rt.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var b=this.transform,E=this instanceof Wn?Oh(this):!1;if(!(this instanceof Wn&&E))if(this instanceof vl){var te=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],te!==null&&Xy(a,te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Jy(a)):y.setAttributeNS(null,"transform",Jy(a))}else if(!x||this instanceof Wn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof gr){te=y.getElementsByTagName("path");for(var ne=0;ne<te.length;ne++)te[ne].setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");return te=this.Dd()?this.opacity*a.globalAlpha:this.opacity,te===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",te.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(te=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=b.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],nu(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),te&&gm(a,te)),(this.background!==null||y.Ma!==void 0)&&(te=y.Ma,this.background===null?(gm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Wn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),Ml(this,a,this.naturalBounds,this.actualBounds),y.Ma?(gm(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),te&&gm(a,te)),this.$o(a,this.panel,this.actualBounds,y),!0},rt.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function ws(a,y,x,b,E,te,ne){if(x!==null){var ae=1,fe=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Nh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var _e=a.kq();if(ae=te.width,fe=te.height,E?(ae=ne.width,fe=ne.height):b||(ae+=_e,fe+=_e),(te=y instanceof Qd)&&x.xe&&(x.type===dp||x.yk===ae&&x.ft===fe))var Te=x.xe;else{var je=0,Ve=0,Qe=0,it=0,ct=0,Dt=0;if(Dt=ct=0,E?(ct=ne.x,Dt=ne.y):b||(ct-=_e/2,Dt-=_e/2),je=x.start.x*ae+x.start.offsetX,Ve=x.start.y*fe+x.start.offsetY,Qe=x.end.x*ae+x.end.offsetX,it=x.end.y*fe+x.end.offsetY,je+=ct,Qe+=ct,Ve+=Dt,it+=Dt,x.type===ch)Te=y.createLinearGradient(je,Ve,Qe,it);else if(x.type===yu)Dt=isNaN(x.endRadius)?Math.max(ae,fe)/2:x.endRadius,isNaN(x.startRadius)?(ct=0,Dt=Math.max(ae,fe)/2):ct=x.startRadius,Te=y.createRadialGradient(je,Ve,ct,Qe,it,Dt);else if(x.type===dp)try{Te=y.createPattern(x.pattern,"repeat")}catch(Gt){Te=null}if(x.type!==dp&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)Te.addColorStop(E.key,E.value);if(te&&(x.xe=Te,Te!==null&&(x.yk=ae,x.ft=fe),Te===null&&x.type===dp&&x.yk!==-1)){x.yk=-1;var Lt=a.diagram;Lt!==null&&x.yk===-1&&mn(function(){Lt.redraw()},600)}}b?y.fillStyle=Te:y.strokeStyle=Te}}}rt.rg=function(a){if(a instanceof Wn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},rt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},rt.If=function(){for(var a=this instanceof Wn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ca(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Iu(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}Iu(a,!1),mu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,mu(a,!1)):y.oe!==null&&(x=a.wh,x.reset(),y.se()?x.multiply(y.wh):y.panel!==null&&x.multiply(y.panel.wh),x.multiply(a.Ab),a.Kk=a.scale*y.Kk,mu(a,!1)))}rt.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Mt.alloc();te.yi(y,x,b,E,jr),a.rotate(this.Kb,te.x,te.y),Mt.free(te)}},rt.v=function(a){if(!iu(this)){a===void 0&&(a=!1),ea(this,!0),Hc(this,!0);var y=this.panel;y===null||a||y.v()}},rt.Uj=function(){iu(this)||(ea(this,!0),Hc(this,!0))};function tl(a){if(!nl(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof oi&&a.Bd(),y.$b())),Hc(a,!0)}}rt.Uk=function(){!(this.l&2048)&&(Iu(this,!0),mu(this,!0))},rt.Wu=function(){mu(this,!0)},rt.N=function(){var a=this.part;a!==null&&a.N()};function gl(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Wn.Table?lc(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Wn.Auto&&b.Pb()===a?ya(a,Un,y):x===rr?b!==null?b.type===Wn.Spot&&b.Pb()===a?ya(a,Un,y):(x=b.defaultStretch,x===rr?ya(a,Fn,y):ya(a,x,y)):ya(a,Fn,y):ya(a,x,y)}function lc(a,y,x,b){var E=a.stretch;if(E!==rr)return ya(a,E,b);var te=E=null;switch(y.stretch){case Bi:te=!0;break;case Un:te=!0}switch(x.stretch){case _i:E=!0;break;case Un:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===_i||y===Un),te===null&&(te=y===Bi||y===Un),E===!0&&te===!0?ya(a,Un,b):E===!0?ya(a,_i,b):te===!0?ya(a,Bi,b):ya(a,Fn,b)}function ya(a,y,x){if(x)return y;if(y===Fn||(x=a.desiredSize,x.w()))return Fn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===_i)return Fn;if(y===Un)return Bi}else{if(y===Bi)return Fn;if(y===Un)return _i}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Bi)return Fn;if(y===Un)return _i}else{if(y===_i)return Fn;if(y===Un)return Bi}return y}function Vu(a,y){a.l=y?a.l|512:a.l&-513}function Ta(a){return(a.l&1024)!==0}function Ef(a,y){a.l=y?a.l|1024:a.l&-1025}function Iu(a,y){a.l=y?a.l|2048:a.l&-2049}function mu(a,y){a.l=y?a.l|4096:a.l&-4097}function iu(a){return(a.l&8192)!==0}function ea(a,y){a.l=y?a.l|8192:a.l&-8193}function nl(a){return(a.l&16384)!==0}function Hc(a,y){a.l=y?a.l|16384:a.l&-16385}rt.Gj=function(){this.svg=null},rt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},rt.Av=function(){},rt.zv=function(a){return this.pa=a,tl(this),!0},rt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},rt.kq=function(){return 0};function Xd(a){var y=a.part;if(y instanceof oi&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function $y(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Wn?a instanceof oi?a.Bd():a.qm(a,function(x){Xd(x)}):Xd(a))}rt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Hs(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&Nt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Rn),this.localBindings.add(E),this},rt.set=function(a){return Object.assign(this,a),this},rt.Du=function(a){return iv(this,a),this},rt.apply=function(a){return a(this),this},rt.nm=function(a){return fu(this,a),this},rt.pz=function(){return this.ih()},rt.ih=function(){for(var a=this instanceof Wn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},rt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new ci),this.animationTriggers.add(a.propertyName,a),this};function vu(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var b=null,E=null;if(typeof a=="function")E=a;else if(typeof a=="string"){var te=sp.I(a);typeof te=="function"?(x=jn(arguments),b=te(x),$t(b)||Nt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=_t.go[a]}if(b===null&&(E!=null&&E.constructor||Nt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof vn&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Rd(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?Nt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):iv(b,te);return b}function iv(a,y){if(typeof y=="string")if(a instanceof To)a.text=y;else if(a instanceof gr)a.figure=y;else if(a instanceof vl)a.source=y;else if(a instanceof Wn)y=$u.I(y),y!==null&&(a.type=y);else if(a instanceof po){var x=Jn(po,y);x!==null?a.type=x:Nt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Yn?(y=Jn(Yn,y),y!==null&&(a.type=y)):a instanceof Vr&&(y=Jn(Vr,y),y!==null&&(a.type=y));else if(y instanceof nn)a instanceof Wn||Nt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof ta){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof ta?Am(b,y):Nt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof En)typeof a.qb=="function"&&a.qb(y);else if(y instanceof sa)a.type=y;else if(y instanceof Hs)a instanceof nn||a instanceof ta?a.bind(y):Nt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof zl)a instanceof nn?a.Jv(y):Nt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Vs)a instanceof Yn&&a.type===Yn.o?a.figures.add(y):Nt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Vr)a instanceof Vs?a.segments.add(y):Nt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof es)a instanceof vn||a instanceof ir?a.layout=y:Nt("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)iv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof po){x=new Si;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);fu(a,x)}else if(a instanceof ta){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Nt("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&Nt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new Si;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);fu(a,E)}else fu(a,y);else Nt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Ah(a,y){sp.add(a,y)}function fm(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Ye.Object.defineProperties(nn.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Lf),this.A.zp=a)}},localBindings:{get:function(){return this.A!==null?this.A.te:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Lf),this.A.te=a)}},srcBindings:{get:function(){return this.A!==null?this.A.wm:null},set:function(a){this.srcBindings!==a&&(this.A===null&&(this.A=new Lf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(xr(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",y,a))}},enabledChanged:{get:function(){return this.A!==null?this.A.Hb:null},set:function(a){var y=this.enabledChanged;y!==a&&(xr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:ol},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new ud),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===ol&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new ud),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new ud),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Ur},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new ud),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:rr},set:function(a){var y=this.stretch;y!==a&&(xr(this),this.A.hg=a,this.v(),this.g("stretch",y,a))}},name:{get:function(){return this.A!==null?this.A.xa:""},set:function(a){var y=this.name;y!==a&&(xr(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Ln(a,"0 <= value <= 1",nn,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(nf(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(nf(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),$y(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Tf(a,"GraphObject.areaBackground"),a instanceof po&&a.freeze(),xr(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Tf(a,"GraphObject.background"),a instanceof po&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof Mi)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new Mt(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Nt("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,$y(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,te=b.height;(E===y||isNaN(E)&&isNaN(y))&&(te===x||isNaN(te)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof gr&&this.qc(),this.g("desiredSize",b,a),Ta(this)&&(a=this.part,a!==null&&(zo(this,a,"width"),zo(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new Xn(a,this.jd.height).freeze(),this.v(),this instanceof gr&&this.qc(),this.g("desiredSize",y,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new Xn(this.jd.width,a).freeze(),this.v(),this instanceof gr&&this.qc(),this.g("desiredSize",y,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:ar},set:function(a){var y=this.minSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),xr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:as},set:function(a){var y=this.maxSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=1/0),isNaN(a.height)&&(a.height=1/0),a.freeze(),xr(this),this.A.o=a,this.v(),this.g("maxSize",y,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.dc}},margin:{get:function(){return this.Kg},set:function(a){typeof a=="number"&&(a=new Li(a));var y=this.Kg;y.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",y,a))}},transform:{get:function(){return this.l&2048&&Ca(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ca(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(xr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Fn},set:function(a){this.reshapingBehavior!==a&&(xr(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&Nt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),tl(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Ln(a,">= 0",nn,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&Ln(a,">= 1",nn,"columnSpan"),xr(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&Ln(a,">= 0",nn,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&Ln(a,">= 1",nn,"rowSpan"),xr(this),this.A.Bi=a,this.v(),this.g("rowSpan",y,a))}},spanAllocation:{get:function(){return this.A!==null?this.A.Di:null},set:function(a){var y=this.spanAllocation;y!==a&&(xr(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof oi||Nt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Gv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,V1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:ms},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Xd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Ln(a,">= 0",nn,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Xd(this))}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:0},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",y,a),Xd(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&Ln(a,">= 0",nn,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:ms},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Xd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Ln(a,">= 0",nn,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Xd(this))}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:0},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength",y,a),Xd(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&Ln(a,">= 0",nn,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",y,a))}},cursor:{get:function(){return this.A!==null?this.A.j:""},set:function(a){var y=this.cursor;y!==a&&(xr(this),this.A.j=a,this.g("cursor",y,a))}},click:{get:function(){return this.A!==null?this.A.zh:null},set:function(a){var y=this.click;y!==a&&(xr(this),this.A.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.A!==null?this.A.Fh:null},set:function(a){var y=this.doubleClick;y!==a&&(xr(this),this.A.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.A!==null?this.A.Bh:null},set:function(a){var y=this.contextClick;y!==a&&(xr(this),this.A.Bh=a,this.g("contextClick",y,a))}},mouseEnter:{get:function(){return this.A!==null?this.A.Mh:null},set:function(a){var y=this.mouseEnter;y!==a&&(xr(this),this.A.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.A!==null?this.A.Ph:null},set:function(a){var y=this.mouseLeave;y!==a&&(xr(this),this.A.Ph=a,this.g("mouseLeave",y,a))}},mouseOver:{get:function(){return this.A!==null?this.A.Qh:null},set:function(a){var y=this.mouseOver;y!==a&&(xr(this),this.A.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.A!==null?this.A.Oh:null},set:function(a){var y=this.mouseHover;y!==a&&(xr(this),this.A.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.A!==null?this.A.Nh:null},set:function(a){var y=this.mouseHold;y!==a&&(xr(this),this.A.Nh=a,this.g("mouseHold",y,a))}},mouseDragEnter:{get:function(){return this.A!==null?this.A.Of:null},set:function(a){var y=this.mouseDragEnter;y!==a&&(xr(this),this.A.Of=a,this.g("mouseDragEnter",y,a))}},mouseDragLeave:{get:function(){return this.A!==null?this.A.Xd:null},set:function(a){var y=this.mouseDragLeave;y!==a&&(xr(this),this.A.Xd=a,this.g("mouseDragLeave",y,a))}},mouseDrop:{get:function(){return this.A!==null?this.A.Lh:null},set:function(a){var y=this.mouseDrop;y!==a&&(xr(this),this.A.Lh=a,this.g("mouseDrop",y,a))}},actionDown:{get:function(){return this.A!==null?this.A.V:null},set:function(a){var y=this.actionDown;y!==a&&(xr(this),this.A.V=a,this.g("actionDown",y,a))}},actionMove:{get:function(){return this.A!==null?this.A.ia:null},set:function(a){var y=this.actionMove;y!==a&&(xr(this),this.A.ia=a,this.g("actionMove",y,a))}},actionUp:{get:function(){return this.A!==null?this.A.Ha:null},set:function(a){var y=this.actionUp;y!==a&&(xr(this),this.A.Ha=a,this.g("actionUp",y,a))}},actionCancel:{get:function(){return this.A!==null?this.A.F:null},set:function(a){var y=this.actionCancel;y!==a&&(xr(this),this.A.F=a,this.g("actionCancel",y,a))}},toolTip:{get:function(){return this.A!==null?this.A.$h:null},set:function(a){var y=this.toolTip;y!==a&&(xr(this),this.A.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.A!==null?this.A.Ch:null},set:function(a){var y=this.contextMenu;y!==a&&(xr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),nn.prototype.trigger=nn.prototype.Jv,nn.prototype.findBindingPanel=nn.prototype.ih,nn.prototype.findTemplateBinder=nn.prototype.pz,nn.prototype.setProperties=nn.prototype.nm,nn.prototype.apply=nn.prototype.apply,nn.prototype.attach=nn.prototype.Du,nn.prototype.set=nn.prototype.set,nn.prototype.isEnabledObject=nn.prototype.If,nn.prototype.isVisibleObject=nn.prototype.Ed,nn.prototype.isContainedBy=nn.prototype.rg,nn.prototype.getNearestIntersectionPoint=nn.prototype.rs,nn.prototype.getLocalPoint=nn.prototype.qs,nn.prototype.getDocumentScale=nn.prototype.Df,nn.prototype.getDocumentAngle=nn.prototype.li,nn.prototype.getDocumentBounds=nn.prototype.mi,nn.prototype.getDocumentPoint=nn.prototype.ga,nn.prototype.intersectsRect=nn.prototype.Yc,nn.prototype.containedInRect=nn.prototype.fh,nn.prototype.containsRect=nn.prototype.Re,nn.prototype.containsPoint=nn.prototype.ca,nn.prototype.raiseChanged=nn.prototype.g,nn.prototype.raiseChangedEvent=nn.prototype.cb,nn.prototype.addCopyProperty=nn.prototype.Vw;var sp=null;nn.className="GraphObject",sp=new ci,Ah("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=vu(Wn,Wn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Wn){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},vu(gr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new vi(0,0,2.76142374915397,2.761423749153969),spot2:new vi(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof Wn&&(x=b.fb("ButtonBorder"),x instanceof gr)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof Wn&&(x=b.fb("ButtonBorder"),x instanceof gr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Wn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof gr){x=x.diagram;var te=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=ne,ne=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=ne,x.skipsUndoManager=te}}},y.actionUp=function(x,b){if(b.If()&&b instanceof Wn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof gr){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof Wn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof gr){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionMove=function(x,b){if(b.If()&&b instanceof Wn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof gr))){var te=E.skipsUndoManager;E.skipsUndoManager=!0;var ne=b._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=b._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),E.skipsUndoManager=te}}},y}),Ah("TreeExpanderButton",function(){var a=vu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},vu(gr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Bo},new Hs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Hs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof qr&&(x=x.adornedPart),x instanceof oi){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),Ah("SubGraphExpanderButton",function(){var a=vu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},vu(gr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Bo},new Hs("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof qr&&(x=x.adornedPart),x instanceof ir){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),Ah("ToolTip",function(){return vu(qr,Wn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Mt(0,3),shadowBlur:5},vu(gr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new vi(0,0,4,6),spot2:new vi(1,1,-4,-4)}))}),Ah("ContextMenu",function(){return vu(qr,Wn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Mt(0,3),shadowBlur:5},new Hs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Ah("ContextMenuButton",function(){var a=vu("Button");a.stretch=_i;var y=a.fb("ButtonBorder");return y instanceof gr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new vi(0,0,2,3),y.spot2=new vi(1,1,-2,-2)),a}),Ah("PanelExpanderButton",function(a){var y=fm(a,"COLLAPSIBLE"),x=vu("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},vu(gr,{name:"ButtonIcon",strokeWidth:2},new Hs("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof gr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var te=E.diagram;if(te!==null&&!te.isReadOnly){var ne=E.ih();ne===null&&(ne=E.part),ne!==null&&(E=ne.fb(y),E!==null&&(b.handled=!0,te.Ea("Collapse/Expand Panel"),E.visible=!E.visible,te.eb("Collapse/Expand Panel")))}},x}),Ah("CheckBoxButton",function(a){var y=fm(a);return a=vu("Button",{desiredSize:new Xn(14,14)},vu(gr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Un,geometryStretch:mi,visible:!1},y!==""?new Hs("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Wn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var te=b.fb("ButtonIcon");E.Ea("checkbox"),te.visible=!te.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),Ah("CheckBox",function(a){a=fm(a),a=vu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Li(0,1,0,0)});var y=vu(Wn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Li(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),nn.None=Fn=new En(nn,"None",0),nn.Default=rr=new En(nn,"Default",0),nn.Vertical=Bi=new En(nn,"Vertical",4),nn.Horizontal=_i=new En(nn,"Horizontal",5),nn.Fill=Un=new En(nn,"Fill",3),nn.Uniform=mi=new En(nn,"Uniform",1),nn.UniformToFill=Rr=new En(nn,"UniformToFill",2),nn.FlipVertical=wr=new En(nn,"FlipVertical",1),nn.FlipHorizontal=Zr=new En(nn,"FlipHorizontal",2),nn.FlipBoth=bo=new En(nn,"FlipBoth",3),nn.make=vu,nn.getBuilders=function(){var a=new ci,y;for(y in sp)if(y!==y.toLowerCase()){var x=sp.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},nn.defineBuilder=Ah,nn.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=sp.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof nn))return y&&b.set(y),b;Nt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},nn.takeBuilderArgument=fm;function Lf(){this.nc=!1,this.xa="",this.zp=-1,this.nb=this.wm=this.te=null,this.j="",this.hb=this.Di=this.Hb=this.Ch=this.$h=this.F=this.Ha=this.ia=this.V=this.Lh=this.Xd=this.Of=this.Nh=this.Oh=this.Qh=this.Ph=this.Mh=this.Bh=this.Fh=this.zh=null,this.u=ar,this.o=as,this.hg=rr,this.ob=this.Bi=1,this.Pf=Fn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Lf.prototype.copy=function(){var a=new Lf;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function ud(){this.u=-1/0,this.o=0,this.F=Ur,this.rr=ol,this.j=this.V="None"}ud.prototype.copy=function(){var a=new ud;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},ud.className="LinkElementSettings";function lg(){this.yj=this.Xi=oo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}lg.prototype.copy=function(){var a=new lg;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},lg.className="LinkSettings";function Jd(){this.ha=[1,0,0,1,0,0]}Jd.prototype.copy=function(){var a=new Jd;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Jd.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Jd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Jd.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,te=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=te,this.ha[3]=ne,this.translate(-y,-x)}},Jd.className="STransform";function Mf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Mf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Mf.className="SGradient";function Tc(a,y,x){this.ownerDocument=a=y===void 0?_t.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new Hl(this,x)}Tc.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},Tc.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),$t(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},Tc.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Tc.prototype.focus=function(){this.Oa.focus()},Tc.prototype.mx=function(){this.ownerDocument=null},Ye.Object.defineProperties(Tc.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}}),Tc.className="SVGSurface";function Hl(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new Jd,this.j=pm(this),this.Nj=pm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Co++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Yy(a,y,x,b,E,te,ne){a.Nj===void 0?ug(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}rt=Hl.prototype,rt.arc=function(a,y,x,b,E,te,ne,ae){var fe=2*Math.PI,_e=fe-1e-6,Te=x*Math.cos(b),je=x*Math.sin(b),Ve=a+Te,Qe=y+je,it=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-Ve)||1e-6<Math.abs(ae-Qe))&&this.path.push(["L",Ve,+Qe]),0>b&&(b=b%fe+fe),b>_e?(this.path.push(["A",x,x,0,1,it,a-Te,y-je]),this.path.push(["A",x,x,0,1,it,Ve,Qe])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),it,a+x*Math.cos(E),y+x*Math.sin(E)])},rt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},rt.Se=function(a){this.addPath(this.path,this.rb,a||0)},rt.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},rt.clearRect=function(){},rt.clip=function(){this.Yl.clipPath=!0},rt.closePath=function(){this.path.push(["z"])},rt.createLinearGradient=function(a,y,x,b){var E=new Mf("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},rt.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+Co++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud($d,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},rt.createRadialGradient=function(a,y,x,b,E,te){var ne=new Mf("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=te,ne};function Xy(a,y,x,b,E,te,ne,ae,fe){b=ae/b,E=fe/E,te===0&&ne===0||a.rb.translate(te,ne),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}rt.drawImage=function(a,y,x,b,E,te,ne,ae,fe){var _e="";a instanceof HTMLCanvasElement&&(_e=a.toDataURL()),a instanceof HTMLImageElement&&(_e=a.getAttribute("src"));var Te=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,ae=b=Te,fe=E=a),b=b||0,E=E||0,ae=ae||0,fe=fe||0,Xy(this,y,x,b,E,te||0,ne||0,ae,fe),te={x:0,y:0,width:Te||b,height:a||E,href:_e},on.$(b,ae)&&on.$(E,fe)?_e.toLowerCase().indexOf(".svg")===-1&&_e.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==Te||E!==a)&&(b+=y,E+=x,te["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),ap(this,$d,te,this.rb),this.addElement($d,te)},rt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(this,this.Yl)},rt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},rt.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},ap(this,"fill",a,this.rb),this.addElement("rect",a)},rt.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},ap(this,"fill",a,this.rb),rv(this,a),this.svg.prepend(this.Ud("rect",a))},rt.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},ap(this,"fill",y,this.rb),this.addElement("text",y,a[0])},rt.lineTo=function(a,y){this.path.push(["L",a,y])},rt.moveTo=function(a,y){this.path.push(["M",a,y])},rt.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},rt.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},rt.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle,this.font=a.font,this.globalAlpha=a.globalAlpha,this.lineCap=a.lineCap,this.lineDashOffset=a.lineDashOffset,this.lineJoin=a.lineJoin,this.lineWidth=a.lineWidth,this.miterLimit=a.miterLimit,this.shadowBlur=a.shadowBlur,this.shadowColor=a.shadowColor,this.shadowOffsetX=a.shadowOffsetX,this.shadowOffsetY=a.shadowOffsetY,this.strokeStyle=a.strokeStyle,this.textAlign=a.textAlign,this.bk=a.bk},rt.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},rt.setTransform=function(a,y,x,b,E,te){a===1&&y===0&&x===0&&b===1&&E===0&&te===0||ug(this,a,y,x,b,E,te)};function Jy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}rt.scale=function(a,y){this.rb.scale(a,y)},rt.translate=function(a,y){this.rb.translate(a,y)},rt.transform=function(){},rt.yc=function(){},rt.stroke=function(){qy(this,this.Yl)},rt.jk=function(){this.clipInsteadOfFill||this.stroke()},rt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},rt.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function ap(a,y,x,b){y==="fill"?rv(a,x):y==="stroke"&&qy(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function rv(a,y){a.fillStyle instanceof Mf?y.fill=ov(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Mf?y.setAttributeNS(null,"fill",ov(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function qy(a,y){if(a.strokeStyle instanceof Mf)y.stroke=ov(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function ov(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+Co++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var te=[],ne=0;ne<y;ne++){var ae=E[ne],fe=ae.color;ae={offset:ae.offset,"stop-color":fe},/^rgba\(/.test(fe)&&(fe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(fe),ae["stop-color"]="rgb("+fe[1]+","+fe[2]+","+fe[3]+")",ae["stop-opacity"]=fe[4]),te.push(ae)}for(te.sort(function(_e,Te){return _e.offset>Te.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}rt.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=jn(a[E]),ne=[te.shift()];if(ne[0]==="A")ne.push(te.shift()+","+te.shift(),te.shift(),te.shift()+","+te.shift(),te.shift()+","+te.shift());else for(;te.length;)ne.push(te.shift()+","+te.shift());b.push(ne.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,ap(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var ae in a)ae!=="transform"&&y.setAttributeNS(null,ae,a[ae]);else{ae=y.getElementsByTagName("path");for(var fe in a)fe!=="transform"&&ae[x].setAttributeNS(null,fe,a[fe])}else this.addElement("path",a)};function ug(a,y,x,b,E,te,ne){var ae=new Jd;ae.ha=[y,x,b,E,te,ne],y={},ap(a,"g",y,ae),ae=a.addElement("g",y),a.nh.push(ae)}function pm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}rt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Uc(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function lh(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}rt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},rt.fs=function(){this.Ct=!1},rt.Vc=function(){},rt.Wx=function(){},Hl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Hl.prototype.getImageData=function(){return null},Hl.prototype.measureText=function(){return null};function gm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}Hl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Hl.className="SVGContext",vn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Tc(this,_t.document));var y=new Tc(this,_t.document,!0);a===void 0&&(a=new Si);var x=this;return wf(this,function(b,E){return b=um(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},vn.prototype.makeSvg=vn.prototype.Cs,vn.prototype.av=function(a){return this.Cs(a)},vn.prototype.makeSVG=vn.prototype.av;function Du(a,y,x,b){this.ownerDocument=y=y===void 0?_t.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Qd(y,x,b),y.H=a}Du.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},Du.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Du.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Du.prototype.focus=function(){this.Oa.focus()},Du.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ye.Object.defineProperties(Du.prototype,{width:{get:function(){return this.Oa.width},set:function(a){this.Oa.width=a}},height:{get:function(){return this.Oa.height},set:function(a){this.Oa.height=a}},style:{get:function(){return this.Oa.style}}}),Du.className="CanvasSurface";function Qd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Nt("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new yr,this.isTemporary=!!x}rt=Qd.prototype,rt.Wx=function(a){this.Z.imageSmoothingEnabled=a},rt.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},rt.beginPath=function(){this.Z.beginPath()},rt.Se=function(){},rt.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},rt.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},rt.clip=function(){this.Z.clip()},rt.closePath=function(){this.Z.closePath()},rt.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},rt.createPattern=function(a,y){return this.Z.createPattern(a,y)},rt.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},rt.drawImage=function(a,y,x,b,E,te,ne,ae,fe){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,te,ne,ae,fe)},rt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},rt.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},rt.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},rt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},rt.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},rt.lineTo=function(a,y){this.Z.lineTo(a,y)},rt.measureText=function(a){return this.Z.measureText(a)},rt.moveTo=function(a,y){this.Z.moveTo(a,y)},rt.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},rt.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},rt.restore=function(){this.Z.restore()},rt.save=function(){this.yc(),this.Z.save()},Qd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},rt=Qd.prototype,rt.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},rt.scale=function(a,y){this.El.scale(a,y)},rt.translate=function(a,y){this.El.translate(a,y)},rt.stroke=function(){this.Z.stroke()},rt.transform=function(a,y,x,b,E,te){if(a!==1||y!==0||x!==0||b!==1||E!==0||te!==0){var ne=this.El,ae=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*b,x=ne.m12*x+ne.m22*b,ne.dx=ne.m11*E+ne.m21*te+ne.dx,ne.dy=ne.m12*E+ne.m22*te+ne.dy,ne.m11=ae,ne.m12=a,ne.m21=y,ne.m22=x}},rt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},rt.ng=function(a,y){if(a instanceof po&&a.type===yu){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},rt.jk=function(){this.Hm||this.stroke()},rt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},rt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},rt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},rt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},rt.Hs=function(){},Ye.Object.defineProperties(Qd.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var vx=Object.freeze([]);Qd.className="CanvasSurfaceContext";function cg(){this.F=this.o=this.u=this.j=0}cg.className="ColorNumbers";function po(a,y){hp||(hv(),hp=!0),vr(this),this._isFrozen=!1,a===void 0?(this.na=Nh,this.xk="black"):typeof a=="string"?(this.na=Nh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===ch?(this.Qd=qa,this.Lk=Ga):this.Lk=a===yu?this.Qd=jr:this.Qd=ms,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}po.prototype.copy=function(){var a=new po;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},rt=po.prototype,rt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},rt.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},rt.qb=function(a){a.classType===po&&(this.type=a)},rt.toString=function(){var a="Brush(";if(this.type===Nh)a+=this.color;else if(a=this.type===ch?a+"Linear ":this.type===yu?a+"Radial ":this.type===dp?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},rt.addColorStop=function(a,y){return this._isFrozen&&un(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Ln(a,"0 <= loc <= 1",po,"addColorStop:loc"),this.we===null&&(this.we=new ci),this.we.add(a,y),this.na===Nh&&(this.type=ch),this.xe=null,this},rt.Vz=function(a,y){if(this._isFrozen&&un(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?fp:y,this.type===Nh)uh(this.color),this.color=up(a,y);else if((this.type===ch||this.type===yu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)uh(x.value),this.addColorStop(x.key,up(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?fp:x,uh(a),up(y,x)}rt.Wy=function(a,y){if(this._isFrozen&&un(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?fp:y,this.type===Nh)uh(this.color),this.color=up(-a,y);else if((this.type===ch||this.type===yu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)uh(x.value),this.addColorStop(x.key,up(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?fp:x,uh(a),up(-y,x)}function sv(a,y,x){uh(a),a=Io.j;var b=Io.u,E=Io.o,te=Io.F;return uh(y),x===void 0&&(x=.5),"rgba("+Math.round((Io.j-a)*x+a)+", "+Math.round((Io.u-b)*x+b)+", "+Math.round((Io.o-E)*x+E)+", "+Math.round((Io.F-te)*x+te)+")"}rt.Gx=function(){if(this.type===Nh)return lp(this.color);if((this.type===ch||this.type===yu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===yu)return lp(a.first().value);if(a.get(.5)!==null)return lp(a.get(.5));if(a.count===2)return a=a.Fa(),lp(sv(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,te=1;y.next();){var ne=y.key,ae=Math.abs(.5-y.key);E>te&&ae<E?(x=ne,E=ae):te>=E&&ae<te&&(b=ne,te=ae)}return x>b&&(te=x,x=b,b=te,te=E),E=b-x,lp(sv(a.get(x),a.get(b),1-te/E))}return!1};function lp(a){return a?a instanceof po?a.Gx():(uh(a),128>(299*Io.j+587*Io.u+114*Io.o)/1e3):!1}function up(a,y){switch(y){case fp:y=100*lv(Io.j);var x=100*lv(Io.u),b=100*lv(Io.o);return il.j=.4124564*y+.3575761*x+.1804375*b,il.u=.2126729*y+.7151522*x+.072175*b,il.o=.0193339*y+.119192*x+.9503041*b,il.F=Io.F,y=cv(il.j/cp[0]),x=cv(il.u/cp[1]),b=cv(il.o/cp[2]),Gc.j=116*x-16,Gc.u=500*(y-x),Gc.o=200*(x-b),Gc.F=il.F,Gc.j=Math.min(100,Math.max(0,Gc.j+100*a)),a=(Gc.j+16)/116,y=a-Gc.o/200,il.j=cp[0]*n1(Gc.u/500+a),il.u=cp[1]*(Gc.j>mm*dv?Math.pow(a,3):Gc.j/mm),il.o=cp[2]*n1(y),il.F=Gc.F,a=-.969266*il.j+1.8760108*il.u+.041556*il.o,y=.0556434*il.j+-.2040259*il.u+1.0572252*il.o,Io.j=255*uv((3.2404542*il.j+-1.5371385*il.u+-.4985314*il.o)/100),Io.u=255*uv(a/100),Io.o=255*uv(y/100),Io.F=il.F,Io.j=Math.round(Io.j),255<Io.j?Io.j=255:0>Io.j&&(Io.j=0),Io.u=Math.round(Io.u),255<Io.u?Io.u=255:0>Io.u&&(Io.u=0),Io.o=Math.round(Io.o),255<Io.o?Io.o=255:0>Io.o&&(Io.o=0),"rgba("+Io.j+", "+Io.u+", "+Io.o+", "+Io.F+")";case i1:return av(),ru.o=Math.min(100,Math.max(0,ru.o+100*a)),"hsla("+ru.j+", "+ru.u+"%, "+ru.o+"%, "+ru.F+")";default:Nt("Unknown color space: "+y)}}function uh(a){hp||(hv(),hp=!0);var y=fv;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,Io.j=a[0],Io.u=a[1],Io.o=a[2],Io.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Io.j=0,Io.u=0,Io.o=0,Io.F=1)}}function av(){var a=Io.j/255,y=Io.u/255,x=Io.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),te=b-E;if(E=(b+E)/2,te===0)var ne=a=0;else{switch(b){case a:ne=(y-x)/te%6;break;case y:ne=(x-a)/te+2;break;case x:ne=(a-y)/te+4}ne*=60,0>ne&&(ne+=360),a=te/(1-Math.abs(2*E-1))}ru.j=Math.round(ne),ru.u=Math.round(100*a),ru.o=Math.round(100*E),ru.F=Io.F}function lv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function uv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function cv(a){return a>dv?Math.pow(a,1/3):(mm*a+16)/116}function n1(a){var y=a*a*a;return y>dv?y:(116*a-16)/mm}function Tf(a,y){typeof a!="string"&&(a instanceof po||Nt("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){fv=ys?new Du(null,void 0,{willReadFrequently:!0}).context:null}Ye.Object.defineProperties(po.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&un(this,a),this.na=a,this.start.Mc()&&(a===ch?this.start=qa:a===yu&&(this.start=jr)),this.end.Mc()&&(a===ch?this.end=Ga:a===yu&&(this.end=jr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&un(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&un(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&un(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&un(this,a),0>a&&Ln(a,">= zero",po,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&un(this,a),0>a&&Ln(a,">= zero",po,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&un(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&un(this,a),this.cr=a,this.xe=null}}}),po.prototype.isDark=po.prototype.Gx,po.prototype.darkenBy=po.prototype.Wy,po.prototype.lightenBy=po.prototype.Vz,po.prototype.addColorStop=po.prototype.addColorStop;var dv=216/24389,mm=24389/27,cp=[95.047,100,108.883],fv=null,Io=new cg,ru=new cg,il=new cg,Gc=new cg,hp=!1;po.className="Brush";var Nh;po.Solid=Nh=new En(po,"Solid",0);var ch;po.Linear=ch=new En(po,"Linear",1);var yu;po.Radial=yu=new En(po,"Radial",2);var dp;po.Pattern=dp=new En(po,"Pattern",4);var fp;po.Lab=fp=new En(po,"Lab",5);var i1;po.HSL=i1=new En(po,"HSL",6),po.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var b=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},po.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;hp||(hv(),hp=!0);var y=fv;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},po.lighten=function(a){return e1(a)},po.lightenBy=e1,po.darken=function(a){return t1(a)},po.darkenBy=t1,po.mix=sv,po.isDark=lp;function sa(){this.xa="Base"}sa.prototype.measure=function(){},sa.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},sa.prototype.arrange=function(){},sa.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},sa.prototype.iA=function(a){a.Uj()},sa.prototype.gc=function(){},Ye.Object.defineProperties(sa.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Wn}}}),sa.prototype.remeasureObject=sa.prototype.iA,sa.prototype.arrangeElement=sa.prototype.Ly,sa.prototype.measureElement=sa.prototype.Yz,sa.className="PanelLayout";function vm(){this.xa="Base"}qe(vm,sa),vm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length;a=hh(a);for(var fe=0;fe<ae;fe++){var _e=b[fe];if(_e.visible||_e===a){var Te=_e.margin,je=Te.right+Te.left;Te=Te.top+Te.bottom,_e.measure(y,x,te,ne);var Ve=_e.measuredBounds;je=Math.max(Ve.width+je,0),Te=Math.max(Ve.height+Te,0),Ve=_e.position.x;var Qe=_e.position.y;isFinite(Ve)||(Ve=0),isFinite(Qe)||(Qe=0),_e instanceof gr&&_e.isGeometryPositioned&&(_e=_e.strokeWidth/2,Ve-=_e,Qe-=_e),No(E,Ve,Qe,je,Te)}}},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var te=y[E],ne=te.measuredBounds,ae=te.margin,fe=te.position.x,_e=te.position.y;if(fe=isNaN(fe)?-a:fe-a,_e=isNaN(_e)?-x:_e-x,te instanceof gr&&te.isGeometryPositioned){var Te=te.strokeWidth/2;fe-=Te,_e-=Te}te.visible&&te.arrange(fe+ae.left,_e+ae.top,ne.width,ne.height)}};function ym(){this.xa="Base"}qe(ym,sa),ym.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length;y=Gn(),te=hh(a);for(var fe=0;fe<ae;fe++){var _e=b[fe];if(_e.visible||_e===te){var Te=gl(_e,!1);if(Te!==Fn&&Te!==_i)y.push(_e);else{_e.measure(1/0,x,0,ne),Te=_e.margin,_e=_e.measuredBounds;var je=Math.max(_e.height+Te.top+Te.bottom,0);E.width+=Math.max(_e.width+Te.right+Te.left,0),E.height=Math.max(E.height,je)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)fe=y[a],(fe.visible||fe===te)&&(Te=fe.margin,ae=Te.right+Te.left,Te=Te.top+Te.bottom,fe.measure(1/0,x,0,ne),fe=fe.measuredBounds,Te=Math.max(fe.height+Te,0),E.width+=Math.max(fe.width+ae,0),E.height=Math.max(E.height,Te));ti(y)},ym.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.top,ne=a.isOpposite,ae=ne?x.width:E.left,fe=0;fe<b;fe++){var _e=te,Te=y[fe];if(Te.visible){var je=Te.measuredBounds,Ve=Te.margin,Qe=Ve.top+Ve.bottom,it=te+E.bottom,ct=je.height,Dt=gl(Te,!1);(isNaN(Te.desiredSize.height)&&Dt===Un||Dt===Bi)&&(ct=Math.max(x.height-Qe-it,0)),Qe=ct+Qe+it,it=Te.alignment,it.Xb()&&(it=a.defaultAlignment),it.sb()||(it=jr),ne&&(ae-=je.width+Ve.left+Ve.right),Te.arrange(ae+it.offsetX+Ve.left,_e+it.offsetY+Ve.top+(x.height*it.y-Qe*it.y),je.width,ct),ne||(ae+=je.width+Ve.left+Ve.right)}}};function Sm(){this.xa="Base"}qe(Sm,sa),Sm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=Gn();for(var ae=hh(a),fe=0;fe<ne;fe++){var _e=b[fe];if(_e.visible||_e===ae){var Te=gl(_e,!1);if(Te!==Fn&&Te!==Bi)x.push(_e);else{var je=_e.margin;Te=je.right+je.left,je=je.top+je.bottom,_e.measure(y,1/0,te,0),_e=_e.measuredBounds,Is(E,Math.max(E.width,Math.max(_e.width+Te,0)),E.height+Math.max(_e.height+je,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)fe=x[a],(fe.visible||fe===ae)&&(_e=fe.margin,ne=_e.right+_e.left,_e=_e.top+_e.bottom,fe.measure(y,1/0,te,0),fe=fe.measuredBounds,_e=Math.max(fe.height+_e,0),E.width=Math.max(E.width,Math.max(fe.width+ne,0)),E.height+=_e);ti(x)}},Sm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.left,ne=a.isOpposite,ae=ne?x.height:E.top,fe=0;fe<b;fe++){var _e=te,Te=y[fe];if(Te.visible){var je=Te.measuredBounds,Ve=Te.margin,Qe=Ve.left+Ve.right,it=te+E.right,ct=je.width,Dt=gl(Te,!1);(isNaN(Te.desiredSize.width)&&Dt===Un||Dt===_i)&&(ct=Math.max(x.width-Qe-it,0)),Qe=ct+Qe+it,it=Te.alignment,it.Xb()&&(it=a.defaultAlignment),it.sb()||(it=jr),ne&&(ae-=je.height+Ve.bottom+Ve.top),Te.arrange(_e+it.offsetX+Ve.left+(x.width*it.x-Qe*it.x),ae+it.offsetY+Ve.top,ct,je.height),ne||(ae+=je.height+Ve.bottom+Ve.top)}}};function xm(){this.xa="Base"}qe(xm,sa),xm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length,fe=a.Pb(),_e=fe.margin,Te=_e.right+_e.left,je=_e.top+_e.bottom;fe.measure(y,x,te,ne);var Ve=fe.measuredBounds;te=Ve.width,ne=Ve.height;var Qe=Math.max(te+Te,0),it=Math.max(ne+je,0),ct=a.isClipping,Dt=kn.allocAt(-_e.left,-_e.top,Qe,it),Lt=kn.allocAt(0,0,te,ne);pv(fe,Lt,!0),te=Lt.width,ne=Lt.height;for(var Gt=!0,Zt=hh(a),Vt=0;Vt<ae;Vt++){var qt=b[Vt];Ve=y;var yn=x;if(qt!==fe&&(qt.visible||qt===Zt)){_e=qt.margin;var ii=_e.left,di=_e.top;switch(Qe=_e.right+_e.left,it=_e.top+_e.bottom,_e=gl(qt,!1),_e){case Un:Ve=te,yn=ne,di=ii=it=Qe=0;break;case _i:Ve=te,ii=Qe=0;break;case Bi:yn=ne,di=it=0}qt.measure(Ve,yn,0,0),Ve=qt.measuredBounds,Qe=Math.max(Ve.width+Qe,0),it=Math.max(Ve.height+it,0),_e=qt.alignment,_e.Xb()&&(_e=a.defaultAlignment),_e.sb()||(_e=jr);var ui=qt.alignmentFocus;if(ui.Xb()&&(ui=jr),yn=null,qt instanceof Wn&&qt.$e!==""&&(yn=qt.fb(qt.$e),yn===qt&&(yn=null)),ii=Lt.x-ii,di=Lt.y-di,yn!==null){for(qt.arrange(0,0,Ve.width,Ve.height),Ve=yn.actualBounds,Ve=Mt.allocAt(Ve.x+(ui.x*Ve.width-ui.offsetX),Ve.y+(ui.y*Ve.height-ui.offsetY)),yn=yn.panel;yn!==qt;)yn.transform.Ga(Ve),yn=yn.panel;ii+=_e.x*te+_e.offsetX-Ve.x,di+=_e.y*ne+_e.offsetY-Ve.y,Mt.free(Ve)}else ii+=_e.x*te+_e.offsetX-(ui.x*Ve.width+ui.offsetX),di+=_e.y*ne+_e.offsetY-(ui.y*Ve.height+ui.offsetY);Gt?(Gt=!1,E.h(ii,di,Qe,it)):No(E,ii,di,Qe,it)}}switch(Gt?E.assign(Dt):ct?E.Uu(Lt.x,Lt.y,Lt.width,Lt.height):No(E,Dt.x,Dt.y,Dt.width,Dt.height),kn.free(Dt),kn.free(Lt),_e=fe.stretch,_e===rr&&(_e=gl(fe,!1)),_e){case Fn:return;case Un:if(!isFinite(y)&&!isFinite(x))return;break;case _i:if(!isFinite(y))return;break;case Bi:if(!isFinite(x))return}for(Ve=fe.measuredBounds,te=Ve.width,ne=Ve.height,Qe=Math.max(te+Te,0),it=Math.max(ne+je,0),_e=fe.margin,Lt=kn.allocAt(-_e.left,-_e.top,Qe,it),pv(fe,Lt,!0),te=Lt.width,ne=Lt.height,y=0;y<ae;y++)x=b[y],x===fe||!x.visible&&x!==Zt||(_e=x.margin,Qe=_e.right+_e.left,it=_e.top+_e.bottom,Ve=x.measuredBounds,Qe=Math.max(Ve.width+Qe,0),it=Math.max(Ve.height+it,0),Te=x.alignment,Te.Xb()&&(Te=a.defaultAlignment),Te.sb()||(Te=jr),x=x.alignmentFocus,x.Xb()&&(x=jr),Gt?(Gt=!1,E.h(Te.x*te+Te.offsetX-(x.x*Ve.width+x.offsetX)-_e.left,Te.y*ne+Te.offsetY-(x.y*Ve.height+x.offsetY)-_e.top,Qe,it)):No(E,Te.x*te+Te.offsetX-(x.x*Ve.width+x.offsetX)-_e.left,Te.y*ne+Te.offsetY-(x.y*Ve.height+x.offsetY)-_e.top,Qe,it));Gt?E.assign(Dt):ct?E.Uu(Lt.x,Lt.y,Lt.width,Lt.height):No(E,Dt.x,Dt.y,Dt.width,Dt.height),kn.free(Lt)},xm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),te=E.measuredBounds,ne=te.width,ae=te.height,fe=a.padding;te=fe.left,fe=fe.top;var _e=te-x.x,Te=fe-x.y;for(E.arrange(_e,Te,ne,ae),ne=kn.allocAt(0,0,ne,ae),pv(E,ne,!1),ae=0;ae<b;ae++){var je=y[ae];if(je!==E){_e=je.measuredBounds;var Ve=_e.width,Qe=_e.height;Te=je.alignment,Te.Xb()&&(Te=a.defaultAlignment),Te.sb()||(Te=jr);var it=je.alignmentFocus;if(it.Xb()&&(it=jr),_e=null,je instanceof Wn&&je.$e!==""&&(_e=je.fb(je.$e),_e===je&&(_e=null)),_e!==null){var ct=_e.actualBounds;for(it=Mt.allocAt(ct.x+(it.x*ct.width-it.offsetX),ct.y+(it.y*ct.height-it.offsetY)),_e=_e.panel;_e!==je;)_e.transform.Ga(it),_e=_e.panel;_e=Te.x*ne.width+Te.offsetX-it.x,Te=Te.y*ne.height+Te.offsetY-it.y,Mt.free(it)}else _e=Te.x*ne.width+Te.offsetX-(it.x*Ve+it.offsetX),Te=Te.y*ne.height+Te.offsetY-(it.y*Qe+it.offsetY);_e+=ne.x-x.x,Te+=ne.y-x.y,je.visible&&je.arrange(te+_e,fe+Te,Ve,Qe)}}kn.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Wn&&a.$e!==""&&(b=a.fb(a.$e),b===a&&(b=null)),b!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(b.actualBounds),b=b.panel;b!==a;)b.transform.pp(y),b=b.panel}function wm(){this.xa="Base"}qe(wm,sa),wm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length,fe=a.Pb(),_e=fe.margin,Te=y,je=x,Ve=_e.right+_e.left,Qe=_e.top+_e.bottom;fe.measure(y,x,te,ne),_e=fe.measuredBounds;var it=0,ct=null;fe instanceof gr&&(ct=fe,it=ct.strokeWidth*ct.scale);var Dt=Math.max(_e.width+Ve,0);_e=Math.max(_e.height+Qe,0);var Lt=yv(fe),Gt=Lt.x*Dt+Lt.offsetX;Lt=Lt.y*_e+Lt.offsetY;var Zt=Sv(fe),Vt=Zt.x*Dt+Zt.offsetX;for(Zt=Zt.y*_e+Zt.offsetY,isFinite(y)&&(Te=Math.max(Math.abs(Gt-Vt)-it,0)),isFinite(x)&&(je=Math.max(Math.abs(Lt-Zt)-it,0)),it=Xn.alloc(),it.h(0,0),a=hh(a),Zt=0;Zt<ae;Zt++)Lt=b[Zt],Lt===fe||!Lt.visible&&Lt!==a||(_e=Lt.margin,Dt=_e.right+_e.left,Gt=_e.top+_e.bottom,Lt.measure(Te,je,0,0),_e=Lt.measuredBounds,Dt=Math.max(_e.width+Dt,0),_e=Math.max(_e.height+Gt,0),it.h(Math.max(Dt,it.width),Math.max(_e,it.height)));if(ae===1)E.width=Dt,E.height=_e,Xn.free(it);else{switch(Lt=yv(fe),Zt=Sv(fe),ae=b=0,Zt.x!==Lt.x&&Zt.y!==Lt.y&&(b=it.width/Math.abs(Zt.x-Lt.x),ae=it.height/Math.abs(Zt.y-Lt.y)),Xn.free(it),it=0,ct!==null&&(it=ct.strokeWidth*ct.scale,_v(ct)===mi&&(b=ae=Math.max(b,ae))),b+=Math.abs(Lt.offsetX)+Math.abs(Zt.offsetX)+it,ae+=Math.abs(Lt.offsetY)+Math.abs(Zt.offsetY)+it,ct=fe.stretch,ct===rr&&(ct=gl(fe,!1)),ct){case Fn:ne=te=0;break;case Un:isFinite(y)&&(b=y),isFinite(x)&&(ae=x);break;case _i:isFinite(y)&&(b=y),ne=0;break;case Bi:te=0,isFinite(x)&&(ae=x)}fe.Uj(),fe.measure(b,ae,te,ne),E.width=fe.measuredBounds.width+Ve,E.height=fe.measuredBounds.height+Qe}},wm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=kn.alloc();te.h(0,0,1,1);var ne=b.margin,ae=ne.left;ne=ne.top;var fe=a.padding,_e=fe.left;fe=fe.top,b.arrange(_e+ae,fe+ne,E.width,E.height);var Te=yv(b),je=Sv(b),Ve=Te.y*E.height+Te.offsetY,Qe=je.x*E.width+je.offsetX;for(je=je.y*E.height+je.offsetY,te.x=Te.x*E.width+Te.offsetX,te.y=Ve,No(te,Qe,je,0,0),te.x+=ae+_e,te.y+=ne+fe,E=0;E<x;E++)ae=y[E],ae!==b&&(_e=ae.measuredBounds,ne=ae.margin,fe=Math.max(_e.width+ne.right+ne.left,0),Te=Math.max(_e.height+ne.top+ne.bottom,0),Ve=ae.alignment,Ve.Xb()&&(Ve=a.defaultAlignment),Ve.sb()||(Ve=jr),fe=te.width*Ve.x+Ve.offsetX-fe*Ve.x+ne.left+te.x,ne=te.height*Ve.y+Ve.offsetY-Te*Ve.y+ne.top+te.y,ae.visible&&(Lo(te.x,te.y,te.width,te.height,fe,ne,_e.width,_e.height)?ae.arrange(fe,ne,_e.width,_e.height):ae.arrange(fe,ne,_e.width,_e.height,new kn(te.x,te.y,te.width,te.height))));kn.free(te)};function bm(){this.xa="Base",this.name="Table"}qe(bm,sa),bm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=Gn(),ae=Gn(),fe=0;fe<te;fe++){var _e=b[fe],Te=_e instanceof Wn?_e:null;if(Te!==null&&Oh(Te)&&_e.visible){ae.push(Te);for(var je=Te.O.s,Ve=je.length,Qe=0;Qe<Ve;Qe++){var it=je[Qe];Te.type===Wn.TableRow?it.row=_e.row:Te.type===Wn.TableColumn&&(it.column=_e.column),ne.push(it)}}else ne.push(_e)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var ct=[],Dt=0;Dt<te;Dt++){var Lt=ne[Dt];Lt.visible&&(ea(Lt,!0),Hc(Lt,!0),ct[Lt.row]||(ct[Lt.row]=[]),ct[Lt.row][Lt.column]||(ct[Lt.row][Lt.column]=[]),ct[Lt.row][Lt.column].push(Lt))}ti(ne);var Gt=Gn(),Zt=Gn(),Vt=Gn(),qt={count:0},yn={count:0},ii=y,di=x,ui=a.rowDefs,Vn=a.colDefs,In=null;te=ui.length;for(var er=0;er<te;er++)In=ui[er],In!==void 0&&(In.actual=0);te=Vn.length;for(var Vi=0;Vi<te;Vi++)In=Vn[Vi],In!==void 0&&(In.actual=0);for(var io=ct.length,Eo=0,ha=0;ha<io;ha++)ct[ha]&&(Eo=Math.max(Eo,ct[ha].length));var pa=Math.min(a.topIndex,io-1),Xa=Math.min(a.leftIndex,Eo-1),da=0;io=ct.length;for(var Gh=hh(a),Us=0;Us<io;Us++)if(ct[Us]){Eo=ct[Us].length;var fc=a.Fb(Us);fc.actual=0;for(var Ja=fc.oc=0;Ja<Eo;Ja++)if(ct[Us][Ja]){var Wh=a.Eb(Ja);Gt[Ja]===void 0&&(Wh.actual=0,Wh.oc=0,Gt[Ja]=!0);for(var au=ct[Us][Ja],ju=au.length,Wl=0;Wl<ju;Wl++){var kl=au[Wl];if(kl.visible||kl===Gh){var Cd=1<kl.rowSpan||1<kl.columnSpan;Cd&&(Us<pa||Ja<Xa||Zt.push(kl));var pc=kl.margin,Rp=pc.right+pc.left,Zl=pc.top+pc.bottom,Qa=lc(kl,fc,Wh,!1),Jg=kl.desiredSize,Hf=!isNaN(Jg.height),Nc=!isNaN(Jg.width)&&Hf;if(Cd||Qa===Fn||Nc||Us<pa||Ja<Xa||(qt[Ja]!==void 0||Qa!==Un&&Qa!==_i||(qt[Ja]=-1,qt.count++),yn[Us]!==void 0||Qa!==Un&&Qa!==Bi||(yn[Us]=-1,yn.count++),Vt.push(kl)),kl.measure(1/0,1/0,0,0),!(Us<pa||Ja<Xa)){var Al=kl.measuredBounds,lf=Math.max(Al.width+Rp,0),Kl=Math.max(Al.height+Zl,0);if(kl.rowSpan===1&&(Qa===Fn||Qa===_i)){In=a.Fb(Us);var Pd=In.Wc();da=Math.max(Kl-In.actual,0),da+Pd>di&&(da=Math.max(di-Pd,0));var Z0=In.oa===0;In.oc=In.oc+da,In.actual=In.oa+da,di=Math.max(di-(da+(Z0?Pd:0)),0)}if(kl.columnSpan===1&&(Qa===Fn||Qa===Bi)){In=a.Eb(Ja);var Qg=In.Wc();da=Math.max(lf-In.actual,0),da+Qg>ii&&(da=Math.max(ii-Qg,0));var Hy=In.oa===0;In.oc=In.oc+da,In.actual=In.oa+da,ii=Math.max(ii-(da+(Hy?Qg:0)),0)}Cd&&kl.Uj()}}}}}ti(Gt);var Qc=0,ph=0;te=a.columnCount;for(var Uf=0;Uf<te;Uf++){var _d=Vn[Uf];_d!==void 0&&(Qc+=isNaN(_d.Hc)?_d.oc:_d.Hc,_d.oc!==0&&(Qc+=_d.Wc()))}te=a.rowCount;for(var Bp=0;Bp<te;Bp++){var Ed=ui[Bp];Ed!==void 0&&(ph+=isNaN(Ed.Hc)?Ed.oc:Ed.Hc,Ed.oc!==0&&(ph+=Ed.Wc()))}ii=Math.max(y-Qc,0);var qc=di=Math.max(x-ph,0),Zh=ii;te=Vt.length;for(var Nl=0;Nl<te;Nl++){var Oc=Vt[Nl],K0=a.Fb(Oc.row),gh=a.Eb(Oc.column),Fp=Oc.measuredBounds,gc=Oc.margin,uf=gc.right+gc.left,Ic=gc.top+gc.bottom;qt[Oc.column]=gh.oc===0&&qt[Oc.column]!==void 0?Math.max(Fp.width+uf,qt[Oc.column]):null,yn[Oc.row]=K0.oc===0&&yn[Oc.row]!==void 0?Math.max(Fp.height+Ic,yn[Oc.row]):null}var Gf=0,jp=0,ec;for(ec in yn)ec!=="count"&&(Gf+=yn[ec]);for(ec in qt)ec!=="count"&&(jp+=qt[ec]);for(var _a=Xn.alloc(),qg=0;qg<te;qg++){var cl=Vt[qg];if(cl.visible||cl===Gh){var Gs=a.Fb(cl.row),hl=a.Eb(cl.column),mh=0;isFinite(hl.width)?mh=hl.width:(isFinite(ii)&&qt[cl.column]!==null?jp===0?mh=hl.actual+ii:mh=qt[cl.column]/jp*Zh:qt[cl.column]!==null?mh=ii:mh=hl.actual||ii,mh=Math.max(0,mh-hl.Wc()));var Kh=0;switch(isFinite(Gs.height)?Kh=Gs.height:(isFinite(di)&&yn[cl.row]!==null?Gf===0?Kh=Gs.actual+di:Kh=yn[cl.row]/Gf*qc:yn[cl.row]!==null?Kh=di:Kh=Gs.actual||di,Kh=Math.max(0,Kh-Gs.Wc())),_a.h(Math.max(hl.minimum,Math.min(mh,hl.maximum)),Math.max(Gs.minimum,Math.min(Kh,Gs.maximum))),Qa=lc(cl,Gs,hl,!1),Qa){case _i:_a.height=Math.max(_a.height,Gs.actual+di);break;case Bi:_a.width=Math.max(_a.width,hl.actual+ii)}var cf=cl.margin,Uy=cf.right+cf.left,V0=cf.top+cf.bottom;cl.Uj(),cl.measure(_a.width,_a.height,hl.minimum,Gs.minimum);var zp=cl.measuredBounds,hf=Math.max(zp.width+Uy,0),Wf=Math.max(zp.height+V0,0);isFinite(ii)&&(hf=Math.min(hf,_a.width)),isFinite(di)&&(Wf=Math.min(Wf,_a.height));var Ol=0;Ol=Gs.actual,Gs.actual=Math.max(Gs.actual,Wf),Gs.oc=Math.max(Gs.oc,Wf),da=Gs.actual-Ol,di=Math.max(di-da,0),yn[cl.row]===null&&(qc=Math.max(qc-da,0)),Ol=hl.actual,hl.actual=Math.max(hl.actual,hf),hl.oc=Math.max(hl.oc,hf),da=hl.actual-Ol,ii=Math.max(ii-da,0),qt[cl.column]===null&&(Zh=Math.max(Zh-da,0))}}ti(Vt);var vh=Xn.alloc(),mc=Gn(),Cu=Gn();if(te=Zt.length,te!==0){for(var Ld=0;Ld<io;Ld++)if(ct[Ld]){Eo=ct[Ld].length;var Hp=a.Fb(Ld);mc[Ld]=Hp.actual;for(var Md=0;Md<Eo;Md++)if(ct[Ld][Md]){var $0=a.Eb(Md);Cu[Md]=$0.actual}}}for(var Up=0;Up<te;Up++){var Ps=Zt[Up];if(Ps.visible||Ps===Gh){var tc=a.Fb(Ps.row),zu=a.Eb(Ps.column);switch(_a.h(Math.max(zu.minimum,Math.min(y,zu.maximum)),Math.max(tc.minimum,Math.min(x,tc.maximum))),Qa=lc(Ps,tc,zu,!1),Qa){case Un:Cu[zu.index]!==0&&(_a.width=Math.min(_a.width,Cu[zu.index])),mc[tc.index]!==0&&(_a.height=Math.min(_a.height,mc[tc.index]));break;case _i:Cu[zu.index]!==0&&(_a.width=Math.min(_a.width,Cu[zu.index]));break;case Bi:mc[tc.index]!==0&&(_a.height=Math.min(_a.height,mc[tc.index]))}isFinite(zu.width)&&(_a.width=zu.width),isFinite(tc.height)&&(_a.height=tc.height),vh.h(0,0);for(var Y0=zu.minimum,Vl=tc.minimum,Vh=1;Vh<Ps.rowSpan&&!(Ps.row+Vh>=a.rowCount);Vh++)In=a.Fb(Ps.row+Vh),da=0,da=Qa===Un||Qa===Bi?Math.max(In.minimum,mc[Ps.row+Vh]===0?In.maximum:Math.min(mc[Ps.row+Vh],In.maximum)):Math.max(In.minimum,isNaN(In.Hc)?In.maximum:Math.min(In.Hc,In.maximum)),vh.height+=da,Vl+=In.minimum;for(var Hu=1;Hu<Ps.columnSpan&&!(Ps.column+Hu>=a.columnCount);Hu++)In=a.Eb(Ps.column+Hu),da=0,da=Qa===Un||Qa===_i?Math.max(In.minimum,Cu[Ps.column+Hu]===0?In.maximum:Math.min(Cu[Ps.column+Hu],In.maximum)):Math.max(In.minimum,isNaN(In.Hc)?In.maximum:Math.min(In.Hc,In.maximum)),vh.width+=da,Y0+=In.minimum;_a.width+=vh.width,_a.height+=vh.height;var Gp=Ps.margin,Td=Gp.right+Gp.left,em=Gp.top+Gp.bottom;Ps.measure(_a.width,_a.height,Y0,Vl);for(var Wp=Ps.measuredBounds,Dc=Math.max(Wp.width+Td,0),df=Math.max(Wp.height+em,0),kd=0,Zp=0;Zp<Ps.rowSpan&&!(Ps.row+Zp>=a.rowCount);Zp++)In=a.Fb(Ps.row+Zp),kd+=In.total||0;if(kd<df){var $h=df-kd,eh=df-kd;if(Ps.spanAllocation!==null)for(var Yh=Ps.spanAllocation,yh=0;yh<Ps.rowSpan&&!(0>=$h)&&!(Ps.row+yh>=a.rowCount);yh++){In=a.Fb(Ps.row+yh);var Xh=In.oa||0,ff=Yh(Ps,In,eh);In.actual=Math.min(In.maximum,Xh+ff),In.oa!==Xh&&($h-=In.oa-Xh)}for(;0<$h;){var vc=In.oa||0;if(isNaN(In.height)&&In.maximum>vc&&(In.actual=Math.min(In.maximum,vc+$h),In.oa!==vc&&($h-=In.oa-vc)),In.index===0)break;In=a.Fb(In.index-1)}}for(var Zf=0,Jh=0;Jh<Ps.columnSpan&&!(Ps.column+Jh>=a.columnCount);Jh++)In=a.Eb(Ps.column+Jh),Zf+=In.total||0;if(Zf<Dc){var Kf=Dc-Zf,Gy=Dc-Zf;if(Ps.spanAllocation!==null)for(var Sh=Ps.spanAllocation,pf=0;pf<Ps.columnSpan&&!(0>=Kf)&&!(Ps.column+pf>=a.columnCount);pf++){In=a.Eb(Ps.column+pf);var tm=In.oa||0,Wy=Sh(Ps,In,Gy);In.actual=Math.min(In.maximum,tm+Wy),In.oa!==tm&&(Kf-=In.oa-tm)}for(;0<Kf;){var X0=In.oa||0;if(isNaN(In.width)&&In.maximum>X0&&(In.actual=Math.min(In.maximum,X0+Kf),In.oa!==X0&&(Kf-=In.oa-X0)),In.index===0)break;In=a.Eb(In.index-1)}}}}ti(Zt),Xn.free(vh),Xn.free(_a),mc!==void 0&&ti(mc),Cu!==void 0&&ti(Cu);var Vf=0,$f=0,J0=a.desiredSize,gx=a.maxSize;Qa=gl(a,!0);var nm=ph=Qc=0,im=0;te=a.columnCount;for(var Q0=0;Q0<te;Q0++)Vn[Q0]!==void 0&&(In=a.Eb(Q0),isFinite(In.width)?(nm+=In.width,nm+=In.Wc()):Nm(In)===pg?(nm+=In.oa,nm+=In.Wc()):In.oa!==0&&(Qc+=In.oa,Qc+=In.Wc()));isFinite(J0.width)?Vf=Math.min(J0.width,gx.width):Vf=Qa!==Fn&&isFinite(y)?y:Qc,Vf=Math.max(Vf,a.minSize.width),Vf=Math.max(Vf-nm,0);for(var Qx=Qc===0?1:Math.max(Vf/Qc,1),q0=0;q0<te;q0++)Vn[q0]!==void 0&&(In=a.Eb(q0),isFinite(In.width)||Nm(In)===pg||(In.actual=In.oa*Qx),In.position=E.width,In.oa!==0&&(E.width+=In.oa,E.width+=In.Wc()));te=a.rowCount;for(var ev=0;ev<te;ev++)ui[ev]!==void 0&&(In=a.Fb(ev),isFinite(In.height)?(im+=In.height,im+=In.Wc()):Nm(In)===pg?(im+=In.oa,im+=In.Wc()):In.oa!==0&&(ph+=In.oa,ph+=In.Wc()));isFinite(J0.height)?$f=Math.min(J0.height,gx.height):$f=Qa!==Fn&&isFinite(x)?x:ph,$f=Math.max($f,a.minSize.height),$f=Math.max($f-im,0);for(var qx=ph===0?1:Math.max($f/ph,1),tv=0;tv<te;tv++)ui[tv]!==void 0&&(In=a.Fb(tv),isFinite(In.height)||Nm(In)===pg||(In.actual=In.oa*qx),In.position=E.height,In.oa!==0&&(E.height+=In.oa,E.height+=In.Wc()));te=ae.length;for(var Zy=0;Zy<te;Zy++){var rm=ae[Zy],Ky=0,Vy=0;rm.type===Wn.TableRow?(Ky=E.width,In=a.Fb(rm.row),Vy=In.actual):(In=a.Eb(rm.column),Ky=In.actual,Vy=E.height),rm.measuredBounds.h(0,0,Ky,Vy),ea(rm,!1)}ti(ae),a.inRowsCols=ct},bm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,te=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var ae,fe,_e=ne.length,Te=0,je=0;je<_e;je++)ne[je]&&(Te=Math.max(Te,ne[je].length));fe=a.rowDefs,ae=a.colDefs;var Ve=je=0,Qe=Math.min(a.topIndex,_e-1);if(0<fe.length){for(;Qe!==_e&&(fe[Qe]===void 0||fe[Qe].oa===0);)Qe++;Qe=Math.max(Math.min(Qe,_e-1),0),je=-fe[Qe].position}var it=Math.min(a.leftIndex,Te-1);if(0<ae.length){for(;it!==Te&&(ae[it]===void 0||ae[it].oa===0);)it++;it=Math.max(Math.min(it,Te-1),0),Ve=-ae[it].position}for(var ct=0,Dt=0;ct!==_e&&fe[ct]===void 0;)ct++;for(;Dt!==_e&&ae[Dt]===void 0;)Dt++;Te=a.part,a.Fb(ct),a.Eb(Dt);for(var Lt=0;Lt<y.length;Lt++){var Gt=y[Lt];if(Gt instanceof Wn&&Gt.visible&&Oh(Gt)){if(Gt.type===Wn.TableRow){ae=a.Fb(Gt.row);var Zt=a.Eb(Dt)}else ae=a.Fb(ct),Zt=a.Eb(Gt.column);fe=ae.position+je+E,ae.oa!==0&&(fe+=ae.Io(Math.max(ct,Qe))),ae=Zt.position+Ve+te,Zt.oa!==0&&(ae+=Zt.Io(Math.max(Dt,it))),Zt=Gt.measuredBounds,Gt.Uk(),Gt.actualBounds.ka();var Vt=Gt.actualBounds,qt=kn.allocAt(Vt.x,Vt.y,Vt.width,Vt.height);Vt.x=Gt.type===Wn.TableRow?te:ae,Vt.y=Gt.type===Wn.TableColumn?E:fe,Vt.width=Zt.width,Vt.height=Zt.height,Gt.actualBounds.freeze(),Hc(Gt,!1),Sa(qt,Vt)||Te===null||(Te.oh(),Gt.Pn(Te)),kn.free(qt)}}for(Lt=Xn.alloc(),Gt=0;Gt<_e;Gt++)if(ne[Gt]){for(Te=ne[Gt].length,Zt=a.Fb(Gt),fe=Zt.position+je+E,Zt.oa!==0&&(fe+=Zt.Io(Math.max(ct,Qe))),Vt=0;Vt<Te;Vt++)if(ne[Gt][Vt]){qt=a.Eb(Vt),ae=qt.position+Ve+te,qt.oa!==0&&(ae+=qt.Io(Math.max(Dt,it)));for(var yn=ne[Gt][Vt],ii=yn.length,di=0;di<ii;di++){var ui=yn[di],Vn=ui.measuredBounds;Lt.h(0,0);for(var In=1;In<ui.rowSpan&&!(Gt+In>=a.rowCount);In++){var er=a.Fb(Gt+In);er.oa!==0&&(Lt.height+=er.total)}for(In=1;In<ui.columnSpan&&!(Vt+In>=a.columnCount);In++)er=a.Eb(Vt+In),er.oa!==0&&(Lt.width+=er.total);var Vi=qt.oa+Lt.width,io=Zt.oa+Lt.height;In=ae,er=fe;var Eo=Vi,ha=io,pa=ae,Xa=fe,da=Vi,Gh=io;ae+Vi>x.width&&(da=Math.max(x.width-ae,0)),fe+io>x.height&&(Gh=Math.max(x.height-fe,0));var Us=ui.alignment;if(Us.Xb()){Us=a.defaultAlignment,Us.sb()||(Us=jr);var fc=Us.x,Ja=Us.y,Wh=Us.offsetX;Us=Us.offsetY;var au=qt.alignment,ju=Zt.alignment;au.sb()&&(fc=au.x,Wh=au.offsetX),ju.sb()&&(Ja=ju.y,Us=ju.offsetY)}else fc=Us.x,Ja=Us.y,Wh=Us.offsetX,Us=Us.offsetY;(isNaN(fc)||isNaN(Ja))&&(Ja=fc=.5,Us=Wh=0),au=Vn.width,ju=Vn.height;var Wl=ui.margin,kl=Wl.left+Wl.right,Cd=Wl.top+Wl.bottom,pc=lc(ui,Zt,qt,!1);!isNaN(ui.desiredSize.width)||pc!==Un&&pc!==_i||(au=Math.max(Vi-kl,0)),!isNaN(ui.desiredSize.height)||pc!==Un&&pc!==Bi||(ju=Math.max(io-Cd,0)),Vi=ui.maxSize,io=ui.minSize,au=Math.min(Vi.width,au),ju=Math.min(Vi.height,ju),au=Math.max(io.width,au),ju=Math.max(io.height,ju),Vi=ju+Cd,In+=Eo*fc-(au+kl)*fc+Wh+Wl.left,er+=ha*Ja-Vi*Ja+Us+Wl.top,ui.visible&&(Lo(pa,Xa,da,Gh,In,er,Vn.width,Vn.height)?ui.arrange(In,er,au,ju):ui.arrange(In,er,au,ju,new kn(pa,Xa,da,Gh)))}}}for(Xn.free(Lt),a=0;a<b;a++)x=y[a],te=x instanceof Wn?x:null,te!==null&&Oh(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function Cm(){this.xa="Base"}qe(Cm,sa),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Pm(){this.xa="Base"}qe(Pm,sa),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function _m(){this.xa="Base"}qe(_m,sa),_m.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&Nt("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,te,ne);var ae=b.measuredBounds,fe=b.margin,_e=fe.right+fe.left;if(fe=fe.top+fe.bottom,isFinite(y)||isFinite(x)){var Te=b.scale,je=ae.width;ae=ae.height;var Ve=Math.max(y-_e,0),Qe=Math.max(x-fe,0),it=1;a.viewboxStretch===mi?je!==0&&ae!==0&&(it=Math.min(Ve/je,Qe/ae)):je!==0&&ae!==0&&(it=Math.max(Ve/je,Qe/ae)),it===0&&(it=1e-4),b.Ca*=it,Te!==b.scale&&(ea(b,!0),b.measure(1/0,1/0,te,ne))}ae=b.measuredBounds,E.width=isFinite(y)?y:Math.max(ae.width+_e,0),E.height=isFinite(x)?x:Math.max(ae.height+fe,0)},_m.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,te=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=jr),y.arrange(x.width*ne.x-te*ne.x+ne.offsetX,x.height*ne.y-E*ne.y+ne.offsetY,b.width,b.height)};function hg(){this.xa="Base"}qe(hg,sa),hg.prototype.measure=function(){},hg.prototype.arrange=function(){},hg.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var te=a.naturalBounds,ne=a.actualBounds,ae=te.width,fe=te.height,_e=Math.ceil(ae/E),Te=Math.ceil(fe/b),je=a.gridOrigin,Ve=je.x;je=je.y,y.save(),y.beginPath(),y.rect(0,0,ae,fe),y.clip(),y.Se();for(var Qe=[],it=a.O.s,ct=it.length,Dt=0;Dt<ct;Dt++){var Lt=it[Dt],Gt=[];if(Qe.push(Gt),Lt.visible){var Zt=Lt.interval;if(!(0>Zt)){Lt=mv(Lt.figure);for(var Vt=0;Vt<ct;Vt++)if(Vt!==Dt){var qt=it[Vt];qt.visible&&mv(qt.figure)===Lt&&(qt=qt.interval,qt>Zt&&Gt.push(qt))}}}}for(it=a.O.s,ct=it.length,Dt=0;Dt<ct;Dt++){var yn=it[Dt];if(yn.visible&&(Gt=yn.interval||1,Lt=Math.abs(Gt),!(2>E*Lt*x))){if(Zt=yn.segmentIndex,(!isFinite(Zt)||isNaN(Zt))&&(Zt=0),0>Zt&&(Zt=Lt-Math.min(-Zt,Lt)),Zt=Math.round(Zt%Lt),Lt=yn.opacity,Vt=1,Lt!==1){if(Lt===0)continue;Vt=y.globalAlpha,y.globalAlpha=Vt*Lt}qt=Qe[Dt];var ii=!1,di=yn.strokeDashArray;if(di!==null&&(ii=!0,y.js(di,yn.strokeDashOffset)),yn.figure==="LineV"&&yn.stroke!==null&&0<yn.strokeWidth){for(y.lineWidth=yn.strokeWidth,ws(a,y,yn.stroke,!1,!1,te,ne),y.beginPath(),di=yn=Math.floor((Ve-E)/E);di<=yn+_e;di++){var ui=di*E+Ve;0<=ui&&ui<=ae&&Em(di,Gt,Zt,qt)&&(y.moveTo(ui,0),y.lineTo(ui,fe))}y.stroke(),y.Se()}else if(yn.figure==="LineH"&&yn.stroke!==null&&0<yn.strokeWidth){for(y.lineWidth=yn.strokeWidth,ws(a,y,yn.stroke,!1,!1,te,ne),y.beginPath(),di=yn=Math.floor((je-b)/b);di<=yn+Te;di++)ui=di*b+je,0<=ui&&ui<=fe&&Em(di,Gt,Zt,qt)&&(y.moveTo(0,ui),y.lineTo(ae,ui));y.stroke(),y.Se()}else if(yn.figure==="BarV"&&yn.fill!==null)for(ws(a,y,yn.fill,!0,!1,te,ne),yn=yn.width,isNaN(yn)&&(yn=E),ui=di=Math.floor((Ve-E)/E);ui<=di+_e;ui++){var Vn=ui*E+Ve;0<=Vn+yn&&Vn<=ae&&Em(ui,Gt,Zt,qt)&&y.fillRect(Vn,0,yn,fe)}else if(yn.figure==="BarH"&&yn.fill!==null)for(ws(a,y,yn.fill,!0,!1,te,ne),yn=yn.height,isNaN(yn)&&(yn=b),ui=di=Math.floor((je-b)/b);ui<=di+Te;ui++)Vn=ui*b+je,0<=Vn+yn&&Vn<=fe&&Em(ui,Gt,Zt,qt)&&y.fillRect(0,Vn,ae,yn);ii&&y.fs(),Lt!==1&&(y.globalAlpha=Vt)}}y.restore(),y.Vc(!1)};function Em(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function Lm(){this.xa="Base"}qe(Lm,sa),Lm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof qr||a instanceof $n){var ne=null,ae=null;if(a instanceof $n&&(ne=a),a instanceof qr&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof $n){var fe=ne;if(te===0)Is(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var _e=a instanceof qr?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var Te=fe.points,je=ne.pointsCount;ae!==null?ae.Ul(!1):ne!==null&&ne.Ul(!1),ae=y.width;var Ve=y.height,Qe=a.j;if(Qe.length=0,_e!==null){r1(a,ae,Ve,_e);var it=_e.measuredBounds;x.ed(it),Qe.push(it)}it=yr.alloc();for(var ct=Mt.alloc(),Dt=Mt.alloc(),Lt=0;Lt<te;Lt++){var Gt=b[Lt];if(Gt!==_e)if(Gt.isPanelMain&&Gt instanceof gr){r1(a,ae,Ve,Gt);var Zt=Gt.measuredBounds;x.ed(Zt),Qe.push(Zt)}else if(2>je)Gt.measure(1/0,1/0,0,0),Zt=Gt.measuredBounds,x.ed(Zt),Qe.push(Zt);else{var Vt=Gt.segmentIndex,qt=Gt.segmentFraction,yn=Gt.alignmentFocus;yn.Mc()&&(yn=jr);var ii=Gt.segmentOrientation,di=Gt.segmentOffset;if(isNaN(Vt)){var ui=fe.ua;Zt=Gn(),ui.Qu(qt,Zt);var Vn=Mt.allocAt(Zt[0],Zt[1]);if(Vn.add(fe.i(0)),ui.type===Yn.j?Vn.offset(-ui.startX,-ui.startY):(ui=ui.figures.first(),ui!==null&&Vn.offset(-ui.startX,-ui.startY)),ui=Zt[2],ii!==ol){var In=fe.computeAngle(Gt,ii,ui);Gt.Kb=In}In=Vn.x-y.x;var er=Vn.y-y.y;Mt.free(Vn),ti(Zt)}else if(Vt<-je||Vt>=je)Zt=Mt.alloc(),fe.vg(),fe.computeMidPoint(Zt),ui=fe.midAngle,ii!==ol&&(In=fe.computeAngle(Gt,ii,ui),Gt.Kb=In),In=Zt.x-y.x,er=Zt.y-y.y,Mt.free(Zt);else{if(In=0,0<=Vt?(er=Te.M(Vt),Zt=Vt<je-1?Te.M(Vt+1):er):(In=je+Vt,er=Te.M(In),Zt=0<In?Te.M(In-1):er),er.Xa(Zt)){0<=Vt?(ui=0<Vt?Te.M(Vt-1):er,In=Vt<je-2?Te.M(Vt+2):Zt):(ui=In<je-1?Te.M(In+1):er,In=1<In?Te.M(In-2):Zt),Vn=ui.Bf(er);var Vi=Zt.Bf(In);ui=Vn>Vi+10?0<=Vt?ui.ab(er):er.ab(ui):Vi>Vn+10?0<=Vt?Zt.ab(In):In.ab(Zt):0<=Vt?ui.ab(In):In.ab(ui)}else ui=0<=Vt?er.ab(Zt):Zt.ab(er);ii!==ol&&(In=fe.computeAngle(Gt,ii,ui),Gt.Kb=In),In=er.x+(Zt.x-er.x)*qt-y.x,er=er.y+(Zt.y-er.y)*qt-y.y}Gt.measure(1/0,1/0,0,0),Zt=Gt.measuredBounds,Vn=Gt.naturalBounds;var io=0;Gt instanceof gr&&(io=Gt.strokeWidth),Vi=Vn.width+io;var Eo=Vn.height+io;it.reset(),it.translate(-Zt.x,-Zt.y),it.scale(Gt.scale,Gt.scale),it.rotate(ii===ol?Gt.angle:ui,Vi/2,Eo/2),ii!==Pg&&ii!==Eg||it.rotate(90,Vi/2,Eo/2),ii!==_g&&ii!==Lg||it.rotate(-90,Vi/2,Eo/2),ii===i0&&(45<ui&&135>ui||225<ui&&315>ui)&&it.rotate(-ui,Vi/2,Eo/2),Vn=new kn(0,0,Vi,Eo),ct.xi(Vn,yn),it.Ga(ct),yn=-ct.x+io/2*Gt.scale,Gt=-ct.y+io/2*Gt.scale,Dt.assign(di),io=isNaN(di.x);var ha=isNaN(di.y);if(io||ha){Vi=Vi/2+3,Eo=Eo/2+3;var pa=45<=ui&&135>=ui,Xa=225<=ui&&315>=ui;ii===ol&&(pa||Xa)?(Dt.x=ha?Vi:di.y,Dt.y=io?Eo:di.x,pa?0<=Vt||isNaN(Vt)&&.5>qt||!io||(Dt.y=-Eo):Xa&&((0<=Vt||isNaN(Vt)&&.5>qt)&&io&&(Dt.y=-Eo),ha&&(Dt.x=-Vi))):(io&&(Dt.x=0<=Vt||isNaN(Vt)&&.5>qt?Vi:-Vi),ha&&(Dt.y=-Eo),Dt.rotate(ui))}else Dt.rotate(ui);In+=Dt.x,er+=Dt.y,Vn.set(Zt),Vn.h(In+yn,er+Gt,Zt.width,Zt.height),Qe.push(Vn),x.ed(Vn)}}if(ne!==null)for(b=ne.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Is(E,x.width||0,x.height||0),yr.free(it),Mt.free(ct),Mt.free(Dt)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof qr||a instanceof $n){var b=a,E=null;a instanceof qr&&(E=a,b=E.adornedPart);var te=a instanceof qr?null:b.path,ne=a.j;if(ne.length!==0){var ae=0;if(te!==null&&ae<ne.length){var fe=ne[ae];ae++,te.arrange(fe.x-a.jg.x,fe.y-a.jg.y,fe.width,fe.height)}for(fe=0;fe<x;fe++){var _e=y[fe];if(_e!==te&&ae<ne.length){var Te=ne[ae];ae++,_e.arrange(Te.x-a.jg.x,Te.y-a.jg.y,Te.width,Te.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof $n)for(te=a.labelNodes;te.next();){var je=a;ne=te.value,ae=ne.segmentIndex,fe=ne.segmentFraction;var Ve=ne.alignmentFocus;if(_e=ne.segmentOrientation,Te=ne.segmentOffset,isNaN(ae)){var Qe=je.ua,it=Gn();Qe.Qu(fe,it);var ct=Mt.allocAt(it[0],it[1]);ct.add(je.i(0)),Qe.type===Yn.j||(Qe=Qe.figures.first()),ct.offset(-Qe.startX,-Qe.startY),Qe=it[2],_e!==ol&&(je=je.computeAngle(ne,_e,Qe),ne.angle=je),je=ct.x;var Dt=ct.y;Mt.free(ct),ti(it)}else if(ae<-x||ae>=x)it=Mt.alloc(),Qe=je,Dt=it,Qe.vg(),Qe.computeMidPoint(Dt),Qe=je.midAngle,_e!==ol&&(je=je.computeAngle(ne,_e,Qe),ne.angle=je),je=it.x,Dt=it.y,Mt.free(it);else{if(ct=0,0<=ae?(it=y.s[ae],Dt=ae<x-1?y.s[ae+1]:it):(ct=x+ae,it=y.s[ct],Dt=0<ct?y.s[ct-1]:it),it.Xa(Dt)){0<=ae?(Qe=0<ae?y.s[ae-1]:it,ct=ae<x-2?y.s[ae+2]:Dt):(Qe=ct<x-1?y.s[ct+1]:it,ct=1<ct?y.s[ct-2]:Dt);var Lt=Qe.Bf(it),Gt=Dt.Bf(ct);Qe=Lt>Gt+10?0<=ae?Qe.ab(it):it.ab(Qe):Gt>Lt+10?0<=ae?Dt.ab(ct):ct.ab(Dt):0<=ae?Qe.ab(ct):ct.ab(Qe)}else Qe=0<=ae?it.ab(Dt):Dt.ab(it);_e!==ol&&(je=je.computeAngle(ne,_e,Qe),ne.angle=je),je=it.x+(Dt.x-it.x)*fe,Dt=it.y+(Dt.y-it.y)*fe}if(Ve.ys())ne.location=new Mt(je,Dt);else{Ve.Mc()&&(Ve=jr),it=yr.alloc(),it.reset(),it.scale(ne.scale,ne.scale),it.rotate(ne.angle,0,0);var Zt=ne.naturalBounds;ct=kn.allocAt(0,0,Zt.width,Zt.height),Lt=Mt.alloc(),Lt.xi(ct,Ve),it.Ga(Lt),Ve=-Lt.x,Gt=-Lt.y;var Vt=Zt.width,qt=Zt.height;Zt=Mt.alloc(),Zt.assign(Te);var yn=isNaN(Te.x),ii=isNaN(Te.y);if(yn||ii){Vt=Vt/2+3,qt=qt/2+3;var di=45<=Qe&&135>=Qe,ui=225<=Qe&&315>=Qe;_e===ol&&(di||ui)?(Zt.x=ii?Vt:Te.y,Zt.y=yn?qt:Te.x,di?0<=ae||isNaN(ae)&&.5>fe||!yn||(Zt.y=-qt):ui&&((0<=ae||isNaN(ae)&&.5>fe)&&yn&&(Zt.y=-qt),ii&&(Zt.x=-Vt))):(yn&&(Zt.x=0<=ae||isNaN(ae)&&.5>fe?Vt:-Vt),ii&&(Zt.y=-qt),Zt.rotate(Qe))}else Zt.rotate(Qe);je+=Zt.x,Dt+=Zt.y,it.pp(ct),Ve+=ct.x,Gt+=ct.y,ae=Mt.allocAt(je+Ve,Dt+Gt),ne.move(ae),Mt.free(ae),Mt.free(Zt),Mt.free(Lt),kn.free(ct),yr.free(it)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Mt.free(b)}};function r1(a,y,x,b){if(iu(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof qr&&a.type===Wn.Link&&a.adornedObject instanceof gr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof $n&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof qr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),ea(b,!1)}}function dg(){this.xa="Base"}qe(dg,sa),dg.prototype.measure=function(a,y,x,b,E,te,ne){var ae=a.Pb();a.graduatedBounds=[];var fe=ae.margin,_e=fe.right+fe.left,Te=fe.top+fe.bottom;ae.measure(y,x,te,ne);var je=ae.measuredBounds,Ve=new kn(-fe.left,-fe.top,Math.max(je.width+_e,0),Math.max(je.height+Te,0));a.graduatedBounds.push(Ve),E.assign(Ve);for(var Qe=ae.geometry,it=ae.strokeWidth,ct=Qe.flattenedSegments,Dt=Qe.flattenedLengths,Lt=Qe.flattenedTotalLength,Gt=ct.length,Zt=0,Vt=0,qt=Gn(),yn=0;yn<Gt;yn++){var ii=ct[yn],di=[];Vt=Zt=0;for(var ui=ii.length,Vn=0;Vn<ui;Vn+=2){var In=ii[Vn],er=ii[Vn+1];if(Vn!==0){var Vi=180*Math.atan2(er-Vt,In-Zt)/Math.PI;0>Vi&&(Vi+=360),di.push(Vi)}Zt=In,Vt=er}qt.push(di)}if(a.graduatedIntervals===null){for(var io=[],Eo=a.O.s,ha=Eo.length,pa=0;pa<ha;pa++){var Xa=Eo[pa],da=[];if(io.push(da),Xa.visible){var Gh=Xa.interval;if(!(0>Gh)){for(var Us=0;Us<ha;Us++)if(Us!==pa){var fc=Eo[Us];if(fc.visible&&Xa.constructor===fc.constructor){var Ja=fc.interval;Ja>Gh&&da.push(Ja)}}}}}a.graduatedIntervals=io}var Wh=a.graduatedIntervals,au=a.O.s,ju=au.length,Wl=0,kl=0,Cd=Lt;a.graduatedMarks=[];for(var pc,Rp=0;Rp<ju;Rp++){var Zl=au[Rp];if(pc=[],Zl.visible&&Zl!==ae){var Qa=Math.abs(Zl.interval),Jg=a.graduatedTickUnit;if(!(2>Jg*Qa*Lt/a.graduatedRange&&Zl.graduatedSkip===null)){var Hf=Dt[0][0],Nc=0,Al=0;kl=Lt*Zl.graduatedStart-1e-4,Cd=Lt*Zl.graduatedEnd+1e-4;var lf=Jg*Qa,Kl=a.graduatedTickBase;if(Kl<a.graduatedMin){var Pd=(a.graduatedMin-Kl)/lf;Pd=Pd%1===0?Pd:Math.floor(Pd+1),Kl+=Pd*lf}else Kl>a.graduatedMin+lf&&(Kl-=Math.floor((Kl-a.graduatedMin)/lf)*lf);for(var Z0=Wh[Rp],Qg=Kl,Hy=1e-6*a.graduatedMax,Qc=1;Kl<=a.graduatedMax+Hy;Qc++){e:{for(var ph=Z0.length,Uf=0;Uf<ph;Uf++){var _d=(Kl-a.graduatedTickBase)%(Z0[Uf]*a.graduatedTickUnit),Bp=1e-6*a.graduatedTickUnit;if(_d<Bp&&_d>-Bp){var Ed=!1;break e}}Ed=!0}if(Ed&&(Kl>a.graduatedMax&&(Kl=a.graduatedMax),Zl.graduatedSkip===null||Zl instanceof To&&!Zl.graduatedSkip(Kl,Zl)||Zl instanceof gr&&!Zl.graduatedSkip(Kl,Zl))&&(Wl=(Kl-a.graduatedMin)*Lt/a.graduatedRange,Wl>Lt&&(Wl=Lt),kl<=Wl&&Wl<=Cd)){for(var qc=qt[Nc][Al],Zh=Dt[Nc][Al];Nc<Dt.length;){for(;Wl>Hf&&Al<Dt[Nc].length-1;)Al++,qc=qt[Nc][Al],Zh=Dt[Nc][Al],Hf+=Zh;if(Wl<=Hf)break;Nc++,Al=0,qc=qt[Nc][Al],Zh=Dt[Nc][Al],Hf+=Zh}var Nl=ct[Nc],Oc=Nl[2*Al],K0=Nl[2*Al+1],gh=(Wl-(Hf-Zh))/Zh,Fp=new Mt(Oc+(Nl[2*Al+2]-Oc)*gh+it/2-Qe.bounds.x,K0+(Nl[2*Al+3]-K0)*gh+it/2-Qe.bounds.y);Fp.scale(ae.scale,ae.scale);e:{var gc=qc,uf=qt[Nc];if(!(.5005>gh&&.4995<gh)){var Ic=gc;if(.5>gh?0<Al?Ic=uf[Al-1]:on.$(Nl[0],Nl[Nl.length-2])&&on.$(Nl[1],Nl[Nl.length-1])&&(Ic=uf[uf.length-1]):.5<gh&&(Al+1<uf.length?Ic=uf[Al+1]:on.$(Nl[0],Nl[Nl.length-2])&&on.$(Nl[1],Nl[Nl.length-1])&&(Ic=uf[0])),gc!==Ic){var Gf=Math.abs(gc-Ic);if(180<Gf&&(gc<Ic?gc+=360:Ic+=360,Gf=Math.abs(gc-Ic)),5e-4>gh||.9995<gh){qc=(gc+Ic)/2%360;break e}if(10>Gf){var jp=1-Math.abs(.5-gh);qc=(gc*jp+Ic*(1-jp))%360;break e}}}qc=gc}if(Zl instanceof To){var ec="";Zl.graduatedFunction!==null?(ec=Zl.graduatedFunction(Kl,Zl),ec=ec!=null?ec.toString():""):ec=(+Kl.toFixed(2)).toString(),ec!==""&&pc.push({$l:Fp,angle:qc,text:ec})}else pc.push({$l:Fp,angle:qc})}Kl=Qg+Qc*lf}}}a.graduatedMarks.push(pc)}ti(qt);var _a=a.graduatedMarks;if(_a!==null)for(var qg=b.length,cl=0;cl<qg;cl++){var Gs=b[cl],hl=_a[cl];if(Gs.visible&&Gs!==ae&&hl.length!==0){if(Gs instanceof gr){var mh=a,Kh=E,cf=Gs.alignmentFocus;cf.Mc()&&(cf=qa);var Uy=Gs.angle;Gs.Kb=0,Gs.measure(1/0,1/0,0,0),Gs.Kb=Uy;var V0=Gs.measuredBounds,zp=V0.width,hf=V0.height,Wf=kn.allocAt(0,0,zp,hf),Ol=Mt.alloc();Ol.xi(Wf,cf),kn.free(Wf);for(var vh=-Ol.x,mc=-Ol.y,Cu=new kn,Ld=hl.length,Hp=0;Hp<Ld;Hp++)for(var Md=hl[Hp],$0=Md.$l.x,Up=Md.$l.y,Ps=Md.angle,tc=0;4>tc;tc++){switch(tc){case 0:Ol.h(vh,mc);break;case 1:Ol.h(vh+zp,mc);break;case 2:Ol.h(vh,mc+hf);break;case 3:Ol.h(vh+zp,mc+hf)}Ol.rotate(Ps+Gs.angle),Ol.offset($0,Up),Hp===0&&tc===0?Cu.h(Ol.x,Ol.y,0,0):Cu.Ye(Ol),Ol.offset(-$0,-Up),Ol.rotate(-Ps-Gs.angle)}Mt.free(Ol),mh.graduatedBounds!==null&&mh.graduatedBounds.push(Cu),No(Kh,Cu.x,Cu.y,Cu.width,Cu.height)}else if(Gs instanceof To){var zu=a,Y0=E;zu.temporaryTextBlock===null&&(zu.temporaryTextBlock=new To);var Vl=zu.temporaryTextBlock;S1(Vl,Gs);var Vh=Gs.alignmentFocus;Vh.Mc()&&(Vh=qa);for(var Hu=Gs.segmentOrientation,Gp=Gs.segmentOffset,Td=new kn,em=0,Wp=0,Dc=0,df=0,kd=0,Zp=hl.length,$h=0;$h<Zp;$h++){var eh=hl[$h];em=eh.$l.x,Wp=eh.$l.y,Dc=eh.angle,kd=df=Gs.angle,Hu!==ol&&(kd=Hu===Cg||Hu===n0?Dc+Gs.angle:Dc,df=$n.computeAngle(Hu,kd)),Vl.Kb=df,Vl.text=eh.text||"",Vl.measure(1/0,1/0,0,0);var Yh=Vl.measuredBounds,yh=Vl.naturalBounds,Xh=yh.width,ff=yh.height,vc=yr.alloc();vc.reset(),vc.translate(-Yh.x,-Yh.y),vc.scale(Vl.scale,Vl.scale),vc.rotate(kd,Xh/2,ff/2),Hu!==Pg&&Hu!==Eg||vc.rotate(90,Xh/2,ff/2),Hu!==_g&&Hu!==Lg||vc.rotate(-90,Xh/2,ff/2),Hu===i0&&(45<Dc&&135>Dc||225<Dc&&315>Dc)&&vc.rotate(-Dc,Xh/2,ff/2);var Zf=kn.allocAt(0,0,Xh,ff),Jh=Mt.alloc();Jh.xi(Zf,Vh),vc.Ga(Jh);var Kf=-Jh.x,Gy=-Jh.y,Sh=Mt.alloc();Sh.assign(Gp),isNaN(Sh.x)&&(Sh.x=Xh/2+3),isNaN(Sh.y)&&(Sh.y=-(ff/2+3)),Sh.rotate(Dc),em+=Sh.x+Kf,Wp+=Sh.y+Gy;var pf=new kn(em,Wp,Yh.width,Yh.height),tm=new kn(Yh.x,Yh.y,Yh.width,Yh.height),Wy=new kn(yh.x,yh.y,yh.width,yh.height);eh.Sz=df,eh.lineCount=Vl.lineCount,eh.lines=[Vl.Cb,Vl.Ih,Vl.df,Vl.Le,Vl.Qc,Vl.Qb,Vl.ze],eh.actualBounds=pf,eh.measuredBounds=tm,eh.naturalBounds=Wy,$h===0?Td.assign(pf):Td.ed(pf),Mt.free(Sh),Mt.free(Jh),kn.free(Zf),yr.free(vc)}zu.graduatedBounds!==null&&zu.graduatedBounds.push(Td),No(Y0,Td.x,Td.y,Td.width,Td.height)}ea(Gs,!1)}}},dg.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var te=a.graduatedBounds,ne=0,ae=te[ne];ne++,b!==null&&b.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height);for(var fe=y.length,_e=0;_e<fe;_e++){var Te=y[_e];ae=E[_e],Te.visible&&Te!==b&&ae.length!==0&&(ae=te[ne],ne++,Te.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height))}a.graduatedBounds=null}}},dg.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,te=E.width,ne=E.height;E=y instanceof Hl,y.save(),y.beginPath(),y.rect(-1,-1,te+1,ne+1),y.clip(),y.Se(),te=a.Pb(),te.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var ae=te.actualBounds,fe=a.O.s,_e=a.graduatedMarks,Te=fe.length,je=0;je<Te;je++){var Ve=fe[je],Qe=_e[je],it=Qe.length;if(Ve.visible&&Ve!==te&&Qe.length!==0){if(Ve instanceof gr){if(!(2>a.graduatedTickUnit*Ve.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ve.graduatedSkip===null)){var ct=Ve.measuredBounds,Dt=Ve.strokeWidth*Ve.scale,Lt=Ve.alignmentFocus;Lt.Mc()&&(Lt=qa);for(var Gt=0;Gt<it;Gt++){var Zt=Qe[Gt].$l,Vt=Qe[Gt].angle,qt=Lt,yn=Ve.Ab;yn.reset(),yn.translate(Zt.x+ae.x,Zt.y+ae.y),yn.rotate(Vt+Ve.angle,0,0),yn.translate(-ct.width*qt.x+qt.offsetX+Dt/2,-ct.height*qt.y+qt.offsetY+Dt/2),yn.scale(Ve.scale,Ve.scale),Iu(Ve,!1),Ve.wh.set(Ve.Ab),Ve.Kk=Ve.scale,mu(Ve,!1),Ve.gc(y,x),E&&(a.svg.appendChild(Ve.svg),Ve.svg=null),Ve.Ab.reset()}}}else if(Ve instanceof To)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new To),ct=a.temporaryTextBlock,S1(ct,Ve),Dt=0;Dt<it;Dt++)Lt=Qe[Dt],Lt.actualBounds&&Lt.measuredBounds&&Lt.naturalBounds&&(ct.ec=Lt.text||"",ct.Kb=Lt.Sz||0,ct.Gc=Lt.lineCount||0,Gt=Lt.lines,Gt!==void 0&&(ct.Cb=Gt[0],ct.Ih=Gt[1],ct.df=Gt[2],ct.Le=Gt[3],ct.Qc=Gt[4],ct.Qb=Gt[5],ct.ze=Gt[6]),Lt.naturalBounds&&(ct.dc=Lt.naturalBounds),Lt.actualBounds&&(Gt=Lt.actualBounds,ct.arrange(Gt.x,Gt.y,Gt.width,Gt.height)),Gt=Lt.actualBounds,ct.arrange(Gt.x,Gt.y,Gt.width,Gt.height),Zt=Lt.measuredBounds,Lt=Lt.naturalBounds,Vt=ct.Ab,Vt.reset(),Vt.translate(Gt.x+ae.x,Gt.y+ae.y),Vt.translate(-Zt.x,-Zt.y),ct.no(Vt,Lt.x,Lt.y,Lt.width,Lt.height),Iu(ct,!1),ct.wh.set(ct.Ab),ct.Kk=ct.scale,mu(ct,!1),ct.Ng=Ve.part,ct.Me=Ve.panel,ct.gc(y,x),ct.Me=null,ct.Ng=null,E&&(a.svg.appendChild(ct.svg),ct.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Wn(a,y){if(nn.call(this),this.na=null,a===void 0)this.na=Wn.Position;else if(typeof a=="string"){var x=$u.I(a);x!==null&&(this.na=x)}else a instanceof sa?this.na=a:a&&(this.na=Wn.Position,y=a);this.na===null&&Nt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Wn.Grid?1048576:0),this.O=new Rn,this.yb=xa,this.Tm=oo,this.Uf=rr,this.$g=null,this.$e="",this.jg=new kn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=mi,this.jn=Xo,this.kn=Ur,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}qe(Wn,nn),Wn.prototype.cloneProtected=function(a){nn.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},Wn.prototype.Af=function(a){nn.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,b=0;b<x;b++)y[b].Me=a;a.$g=null},Wn.prototype.copy=function(){var a=nn.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].copy();E.wi(a),E.Ng=null;var te=a.O,ne=te.count;if(te.Gb(ne,E),te=a.part,te!==null){te.Rh=null,E.portId!==null&&te instanceof oi&&(te.Te=!0);var ae=a.diagram;ae!==null&&ae.undoManager.isUndoingRedoing||te.cb(vs,"elements",a,null,E,null,ne)}}return a}return null},rt=Wn.prototype,rt.toString=function(){return"Panel("+this.type.name+")#"+Dr(this)},rt.Pn=function(a){nn.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},rt.hh=function(a,y){if(this.na===Wn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Wn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Wn.Table)if(a.yc(),a instanceof Hl){var x=a.yd;a.yd=pm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Wn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];x&&ae===b&&(a.clipInsteadOfFill=!0),ae.gc(a,y),x&&ae===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Mm(a,y,!0,x,!0),b!==null&&Mm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Mm(a,y,!0,x,!1),b!==null&&Mm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,te=a.actualBounds,ne=a.naturalBounds,ae=!0,fe=0;fe<E;fe++){var _e=b[fe];if(_e!==void 0&&_e.actual!==0)if(ae)ae=!1;else{if(x){if(_e.position>ne.height)continue}else if(_e.position>ne.width)continue;var Te=_e.separatorStrokeWidth;isNaN(Te)&&(Te=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var je=_e.separatorStroke;if(je===null&&(je=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),Te!==0&&je!==null){ws(a,y,je,!1,!1,ne,te),je=!1;var Ve=_e.separatorDashArray;Ve===null&&(Ve=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Ve!==null&&(je=!0,y.js(Ve,0)),y.beginPath(),Ve=_e.position+Te,x?Ve>ne.height&&(Te-=Ve-ne.height):Ve>ne.width&&(Te-=Ve-ne.width),_e=_e.position+Te/2,y.lineWidth=Te,Te=a.yb,x?(_e+=Te.top,Ve=ne.width-Te.right,y.moveTo(Te.left,_e),y.lineTo(Ve,_e)):(_e+=Te.left,Ve=ne.height-Te.bottom,y.moveTo(_e,Te.top),y.lineTo(_e,Ve)),y.stroke(),y.Se(),je&&y.fs()}}}}function Mm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,ae=a.naturalBounds,fe=s1(a,!0),_e=s1(a,!1),Te=0;Te<te;Te++){var je=b[Te];if(je!==void 0&&je.background!==null&&je.coversSeparators!==E&&je.actual!==0){var Ve=x?ne.height:ne.width;if(!(je.position>Ve)){var Qe=je.Wc(),it=je.separatorStrokeWidth;isNaN(it)&&(it=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ct=je.separatorStroke;ct===null&&(ct=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ct===null||je.index===(x?fe:_e))&&(it=0),Qe-=it,it=je.position+it,Qe+=je.actual,it+Qe>Ve&&(Qe=Ve-it),0>=Qe||(Ve=a.yb,ws(a,y,je.background,!0,!1,ae,ne),x?y.fillRect(Ve.left,it+Ve.top,ne.width-(Ve.left+Ve.right),Qe):y.fillRect(it+Ve.left,Ve.top,Qe,ne.height-(Ve.top+Ve.bottom)))}}}}function s1(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function mv(a){return a==="LineV"||a==="BarV"}rt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},rt.kk=function(a,y,x){if(!nn.prototype.kk.call(this,a,y,x))return!1;if(this.type===Wn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Wn.Grid||this.na===Wn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},rt.nk=function(){return!0},rt.$o=function(a,y,x,b){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var E=0,te=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var ae=y[ne].actualBounds;E=ne===0?ae.x:Math.min(ae.x,E),te=ne===0?ae.y:Math.min(ae.y,te)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-te)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else nn.prototype.$o.call(this,a,y,x,b)},rt.Sj=function(a,y,x,b,E){var te=this.se(),ne=this.transform,ae=1/(ne.m11*ne.m22-ne.m12*ne.m21),fe=ne.m22*ae,_e=-ne.m12*ae,Te=-ne.m21*ae,je=ne.m11*ae,Ve=ae*(ne.m21*ne.dy-ne.m22*ne.dx),Qe=ae*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,on.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*fe+y*Te+Ve,ae=a*_e+y*je+Qe,a=x*fe+b*Te+Ve,fe=x*_e+b*je+Qe,E.h(0,0),x=this.naturalBounds,te=on.Ff(0,0,x.width,x.height,te,ae,a,fe,E),E.transform(ne),te;te||(fe=1,Te=_e=0,je=1,Qe=Ve=0),ae=a*fe+y*Te+Ve,a=a*_e+y*je+Qe,fe=x*fe+b*Te+Ve,x=x*_e+b*je+Qe,E.h(fe,x),b=(fe-ae)*(fe-ae)+(x-a)*(x-a),_e=!1,je=this.O.s,Qe=je.length,Te=Mt.alloc(),Ve=null,y=1/0;var it=null,ct=this.isClipping&&this.na===Wn.Spot;ct&&(it=Mt.alloc(),Ve=this.Pb(),(_e=Ve.Sj(ae,a,fe,x,it))&&(y=(ae-it.x)*(ae-it.x)+(a-it.y)*(a-it.y)));for(var Dt=0;Dt<Qe;Dt++){var Lt=je[Dt];Lt.visible&&Lt!==Ve&&Lt.Sj(ae,a,fe,x,Te)&&(_e=!0,Lt=(ae-Te.x)*(ae-Te.x)+(a-Te.y)*(a-Te.y),Lt<b&&(b=Lt,E.set(Te)))}return ct&&(y>b&&E.set(it),Mt.free(it)),Mt.free(Te),te&&E.transform(ne),_e},rt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();nn.prototype.Gj.call(this)},rt.v=function(a){if(!iu(this)){nn.prototype.v.call(this,a),a=null,(this.na===Wn.Auto||this.na===Wn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var te=gl(E,!1);(E instanceof rl||E instanceof Wn||E instanceof To||te!==Fn)&&E.v(!0)}}}},rt.Uj=function(){if(!iu(this)){ea(this,!0),Hc(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},rt.Uk=function(){if(!(this.l&2048)){Iu(this,!0),mu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},rt.Wu=function(){mu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},rt.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var te=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var ae=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,ae.width)),isNaN(te.height)||(y=Math.min(te.height,ae.height)),a=Math.max(x,a),y=Math.max(b,y);var fe=this.yb;a=Math.max(a-fe.left-fe.right,0),y=Math.max(y-fe.top-fe.bottom,0);var _e=this.O.s;_e.length!==0&&this.na.measure(this,a,y,_e,E,x,b),a=E.width+fe.left+fe.right,fe=E.height+fe.top+fe.bottom,isFinite(te.width)&&(a=te.width),isFinite(te.height)&&(fe=te.height),a=Math.min(ae.width,a),fe=Math.min(ae.height,fe),a=Math.max(ne.width,a),fe=Math.max(ne.height,fe),a=Math.max(x,a),fe=Math.max(b,fe),Is(E,a,fe),Is(this.naturalBounds,a,fe),this.Ge(0,0,a,fe)},rt.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function hh(a){return a.part!==null?a.part.locationObject:null}rt.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=gl(this,!0);var te=this.measuredBounds;y=te.width,te=te.height;var ne=this.Kg,ae=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&te===b&&(a=Fn),a){case Fn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case Un:this.v(!0),this.measure(x+ae,b+ne,0,0);break;case _i:this.v(!0),this.measure(x+ae,te+ne,0,0);break;case Bi:this.v(!0),this.measure(y+ae,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},rt.gh=function(a){var y=this.naturalBounds,x=hh(this);if(Lo(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Mt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(pr(E.set(a),te.transform),te.ca(E)))return Mt.free(E),!0}return Mt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},rt.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},rt.qm=function(a,y){if(y(this,a),a instanceof Wn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function qd(a,y){a1(a,a,y)}function a1(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=y[E];te instanceof Wn&&a1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Wn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}rt.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Wn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=u1(a,y[E],x);if(te!==null)return te}}return null}rt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=fg(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Wn){var te=E.fb(a);if(te!==null)return te}if(E.name===a)return E}return null};function c1(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof Wn?x=Math.max(x,c1(E)):E instanceof gr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}rt.se=function(){return!(this.type===Wn.TableRow||this.type===Wn.TableColumn)};function Oh(a){return a.type===Wn.TableRow||a.type===Wn.TableColumn}rt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),nl(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:pr(Mt.allocAt(a.x,a.y),this.transform),ae=this.diagram,fe=10,_e=5;if(ae!==null&&(fe=ae.Ql("extraTouchArea"),_e=fe/2),Lo(-(_e*E),-(_e*E),b.width+fe*E,b.height+fe*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var Te=E.length;if(ae=Mt.alloc(),_e=(fe=this.isClipping&&this.na===Wn.Spot)?this.Pb():null,fe&&(_e.se()?pr(ae.set(a),_e.transform):ae.set(a),!_e.ca(ae)))return Mt.free(ae),te||Mt.free(ne),null;for(var je=hh(this);Te--;){var Ve=E[Te];if((Ve.visible||Ve===je)&&(Ve.se()?pr(ae.set(a),Ve.transform):ae.set(a),!fe||Ve!==_e)){var Qe=null;if(Ve instanceof Wn?Qe=Ve.ic(ae,y,x):Ve.pickable===!0&&Ve.ca(ae)&&(Qe=Ve),Qe!==null&&(y!==null&&(Qe=y(Qe)),Qe!==null&&(x===null||x(Qe))))return Mt.free(ae),te||Mt.free(ne),Qe}}Mt.free(ae)}return this.background===null&&this.areaBackground===null?(te||Mt.free(ne),null):(a=Lo(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||Mt.free(ne),a)}return te||Mt.free(ne),null},rt.ji=function(a,y,x,b){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var E=this.naturalBounds,te=this.se(),ne=te?a:pr(Mt.allocAt(a.x,a.y),this.transform);if(E=Lo(0,0,E.width,E.height,ne.x,ne.y),Oh(this)||E){if(!this.isAtomic){for(var ae=this.O.s,fe=ae.length,_e=Mt.alloc(),Te=hh(this);fe--;){var je=ae[fe];if(je.visible||je===Te){je.se()?pr(_e.set(a),je.transform):_e.set(a);var Ve=je;je=je instanceof Wn?je:null,(je!==null?je.ji(_e,y,x,b):Ve.ca(_e))&&Ve.pickable!==!1&&(y!==null&&(Ve=y(Ve)),Ve===null||x!==null&&!x(Ve)||b.add(Ve))}}Mt.free(_e)}return te||Mt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||Mt.free(ne),!1},rt.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=yr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&yr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var ae=hh(this),fe=this.O.s,_e=fe.length;_e--;){var Te=fe[_e];if(Te.visible||Te===ae){var je=Te.actualBounds,Ve=this.naturalBounds;je.x>Ve.width||je.y>Ve.height||0>je.x+je.width||0>je.y+je.height||(je=Te,Te=Te instanceof Wn?Te:null,Ve=yr.alloc(),Ve.set(ne),(Te!==null?Te.Cf(a,y,x,b,E,Ve):ca(je,a,b,Ve))&&(y!==null&&(je=y(je)),je===null||x!==null&&!x(je)||E.add(je)),yr.free(Ve))}}return te===void 0&&yr.free(ne),b}return te===void 0&&yr.free(ne),!1};function vv(a,y,x,b){for(var E=a.O.s,te=E.length;te--;){var ne=E[te];if(ne.visible){var ae=ne.actualBounds,fe=a.naturalBounds;ae.x>fe.width||ae.y>fe.height||0>ae.x+ae.width||0>ae.y+ae.height||(ne instanceof Wn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}rt.og=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var ne=this.naturalBounds,ae=this.se(),fe=ae?a:pr(Mt.allocAt(a.x,a.y),this.transform),_e=ae?y:pr(Mt.allocAt(y.x,y.y),this.transform),Te=fe.Bf(_e),je=0<fe.x&&fe.x<ne.width&&0<fe.y&&fe.y<ne.height||eo(fe.x,fe.y,0,0,0,ne.height)<=Te||eo(fe.x,fe.y,0,ne.height,ne.width,ne.height)<=Te||eo(fe.x,fe.y,ne.width,ne.height,ne.width,0)<=Te||eo(fe.x,fe.y,ne.width,0,0,0)<=Te;if(ne=fe.zd(0,0)<=Te&&fe.zd(0,ne.height)<=Te&&fe.zd(ne.width,0)<=Te&&fe.zd(ne.width,ne.height)<=Te,ae||(Mt.free(fe),Mt.free(_e)),je){if(!this.isAtomic){fe=Mt.alloc(),_e=Mt.alloc(),Te=hh(this);for(var Ve=this.O.s,Qe=Ve.length;Qe--;){var it=Ve[Qe];if(it.visible||it===Te){var ct=it.actualBounds,Dt=this.naturalBounds;(!ae||!(ct.x>Dt.width||ct.y>Dt.height||0>ct.x+ct.width||0>ct.y+ct.height))&&(it.se()?(ct=it.transform,pr(fe.set(a),ct),pr(_e.set(y),ct)):(fe.set(a),_e.set(y)),ct=it,it=it instanceof Wn?it:null,(it!==null?it.og(fe,_e,x,b,E,te):ct.tx(fe,_e,E))&&(x!==null&&(ct=x(ct)),ct===null||b!==null&&!b(ct)||te.add(ct)))}}Mt.free(fe),Mt.free(_e)}return E?je:ne}return!1};function yv(a){var y=null;return a instanceof gr&&(y=a.spot1,y===oo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Xs),y}function Sv(a){var y=null;return a instanceof gr&&(y=a.spot2,y===oo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Na),y}rt.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},rt.M=function(a){return this.O.M(a)},rt.Gb=function(a,y){y instanceof Mi&&Nt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Nt("Cannot make a Panel contain itself: "+this.toString()),Nt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Nt("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Wn.Grid||y instanceof gr||Nt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Wn.Graduated||y instanceof gr||y instanceof To||Nt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new ci),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var te=-1,ne=this.O.s,ae=ne.length,fe=0;fe<ae;fe++)if(ne[fe]===y){te=fe;break}if(te!==-1){if(te===a||te+1>=E.count&&a>=E.count)return;E.mb(te),b=te}else Nt("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),iu(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Wn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||km(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof oi&&(x.Te=!0),x.Te&&x instanceof oi&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(ds,"elements",this,y,null,b,null),x.cb(vs,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}rt.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;E<x;E++)if(y[E]===a){b=E;break}b!==-1&&this.pc(b,!0)},rt.mb=function(a){0<=a&&this.pc(a,!0)},rt.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),ea(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var te=this.part;te!==null&&(te.Rh=null,te.ag=NaN,te.Wb(),te instanceof oi&&(b instanceof Wn?b.qm(b,function(ne,ae){Gv(te,ae,y)}):Gv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(ds,"elements",this,b,null,a,null))},rt.Fb=function(a){0>a&&Ln(a,">= 0",Wn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new ta;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(vs,"rowdefs",this,null,x,null,a)}return y[a]},rt.oA=function(a){if(0>a&&Ln(a,">= 0",Wn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(ds,"rowdefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof ta?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}rt.Eb=function(a){0>a&&Ln(a,">= 0",Wn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new ta;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(vs,"coldefs",this,null,x,null,a)}return y[a]},rt.jA=function(a){if(0>a&&Ln(a,">= 0",Wn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(ds,"coldefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof ta?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}rt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Am(y,a),this},rt.Hy=function(a,y){return(a=this.Fb(a))&&Am(a,new ta(y)),this},rt.By=function(a,y){return(a=this.Eb(a))&&Am(a,new ta(y)),this},rt.nz=function(a){if(0>a||this.type!==Wn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},rt.fz=function(a){if(0>a||this.type!==Wn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},rt.Fz=function(a,y){if(y===void 0&&(y=new Mt(NaN,NaN)),this.type!==Wn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},rt.Gz=function(a){if(this.type!==Wn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function f1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Ru(a){var y=a.allBindings;if(y===null)a.data!==null&&Nt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Rn;else if(y._isFrozen)return;var x=new Rn;xv(a,!1),a.qm(a,function(_e,Te){Te.th();var je=Te.localBindings;if(je!==null)for(Ef(Te,!1),je=je.iterator;je.next();){var Ve=je.value;Ve.mode===Dg&&Ef(Te,!0);var Qe=Ve.sourceName;Qe!==null&&(Qe==="/"&&xv(_e,!0),Qe=LS(Ve,_e,Te),Qe!==null&&(x.add(Qe),Qe.srcBindings===null&&(Qe.srcBindings=new Rn),Qe.srcBindings.add(Ve))),y.add(Ve)}if(Te instanceof Wn&&Te.type===Wn.Table){if(0<Te.rowCount){for(_e=Te.rowDefs,je=_e.length,Ve=0;Ve<je;Ve++)if(Qe=_e[Ve],Qe!==void 0&&Qe.be!==null)for(var it=Qe.be.iterator;it.next();){var ct=it.value;ct.xd=Qe,ct.to=2,ct.wl=Qe.index,y.add(ct)}}if(0<Te.columnCount){for(Te=Te.colDefs,_e=Te.length,je=0;je<_e;je++)if(Ve=Te[je],Ve!==void 0&&Ve.be!==null)for(Qe=Ve.be.iterator;Qe.next();)it=Qe.value,it.xd=Ve,it.to=1,it.wl=Ve.index,y.add(it)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Ef(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new Rn),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,te=E.xd,te!==null){E.xd=null;var ae=E.targetProperty,fe=ae.indexOf(".");0<fe&&te instanceof Wn&&(ne=ae.substring(0,fe),ae=ae.substr(fe+1),fe=te.fb(ne),fe!==null?(te=fe,E.targetProperty=ae):Dn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof ta?(ne=Dr(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof nn?(ne=Dr(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):Nt("Unknown type of binding target: "+te)}y.freeze(),a instanceof Mi&&a.Zc()&&a.Va()}rt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Wn&&(x.allBindings=null,x.ub=null);var b=x.localBindings;b!==null&&(x.localBindings=null,b.each(function(E){x.bind(E.copy())})),b=x.animationTriggers,b!==null&&(x.animationTriggers=null,b.each(function(E){x.Jv(E.value.copy())}))}),a&&Ru(y),y},rt.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,b=x.sourceProperty;if((a===""||b===""||b===a)&&(b=x.targetProperty,x.converter!==null||b!=="")){b=this.data;var E=x.sourceName;if(E!==null){if(E==="")b=this;else if(E==="/")b=this;else if(E===".")b=this;else if(E==="..")b=this;else if(b=this.fb(E),b===null)continue}else if(x.isToModel)if(b=this.diagram,b!==null)b=b.model.modelData;else continue;var te=this,ne=x.Ai;if(ne!==-1){if(te=this.ks(ne),te===null)continue}else x.xd!==null&&(te=x.xd);if(E==="/"?b=te.part:E==="."?b=te:E===".."&&(b=te.panel),E=x.to,E!==0){if(!(te instanceof Wn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},rt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Sx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,te=null;E<x&&(te=a[E],!(te instanceof Wn&&te.data!==null));)E++,te=a[E];if(x-E!==b)return!0;if(te===null)return 0<b;for(var ne=0;E<x&&ne<b;){if(te=a[E],!(te instanceof Wn)||te.data!==y[ne])return!0;E++,ne++}return!1}function fg(a){if(a.type===Wn.Spot||a.type===Wn.Auto)return Math.min(a.O.length,1);if(a.type===Wn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof gr&&b.isPanelMain))break}return x}return a.type===Wn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Wn&&Oh(a))?1:0}rt.mv=function(){for(var a=fg(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=fg(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;b<x;b++)Tm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var te=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof Wn){if(ne.data!==te){var ae=bv(a,ne.data),fe=bv(a,te),_e=fe!==ae;_e||(ae=Cv(a,ae),_e=Cv(a,fe)!==ae),_e?(a.pc(b,!1),Tm(a,te,E,!1)):ne.data=te}}else Tm(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,wv(a,x,0),iu(a)||a.v(),a.graduatedIntervals=null,a.If()||km(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof oi&&(y.Te=!0),y.Te&&y instanceof oi&&(y.wc=null))}}function Tm(a,y,x,b){if(!(y==null||0>x)){var E=bv(a,y);if(E=Cv(a,E),E!==null){if(Ru(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&xv(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new ci),a.ge.add(y,E)),te=x+fg(a),a.Gb(te,E),b&&(E.ub=y,wv(a,te,x),E.ub=null),E.data=y}}}function wv(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Wn){var E=y,te=x;b.type===Wn.TableRow?b.row=E:b.type===Wn.TableColumn&&(b.column=E),b.itemIndex=te}y++,x++}}function bv(a,y){if(y===null)return"";if(a=a.itemCategoryProperty,typeof a=="function")a=a(y);else if(typeof a=="string"&&typeof y=="object"){if(a==="")return"";a=Os(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Nt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Cv(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(g1||(g1=!0,Dn('No item template Panel found for category "'+y+'" on '+a),Dn(" Using default item template."),a=new Wn,y=new To,y.bind(new Hs("text","",li)),a.add(y),m1=a),b=m1)),b}function km(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Wn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Wn&&!te.isEnabled||km(a,te,x)}}}function kc(a,y){y.name=a,$u.add(a,y)}Ye.Object.defineProperties(Wn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Wn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&Ln(a,">= 0",Wn,"padding"),a=new Li(a)):(0>a.left&&Ln(a.left,">= 0",Wn,"padding:value.left"),0>a.right&&Ln(a.right,">= 0",Wn,"padding:value.right"),0>a.top&&Ln(a.top,">= 0",Wn,"padding:value.top"),0>a.bottom&&Ln(a.bottom,">= 0",Wn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:xa},set:function(a){typeof a=="number"&&(a=new Li(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Su),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof po)&&(a instanceof po&&a.freeze(),this.T===null&&(this.T=new Su),this.T.ia=a,this.N(),this.g("defaultRowSeparatorStroke",y,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(a){var y=this.defaultRowSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new Su),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Nt("defaultRowSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Su),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof po)&&(a instanceof po&&a.freeze(),this.T===null&&(this.T=new Su),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new Su),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Nt("defaultColumnSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Su),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new Su),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||Nt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Lc(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||Nt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Lc(x),this.N(),this.g("gridOrigin",y,a)}}},graduatedMin:{get:function(){return this.ra!==null?this.ra.lq:0},set:function(a){var y=this.graduatedMin;y!==a&&(this.ra===null&&(this.ra=new dh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new dh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"graduatedRange")))}},graduatedRange:{get:function(){return this.graduatedMax-this.graduatedMin}},graduatedTickUnit:{get:function(){return this.ra!==null?this.ra.ia:10},set:function(a){var y=this.graduatedTickUnit;y!==a&&0<a&&(this.ra===null&&(this.ra=new dh),this.ra.ia=a,this.v(),this.g("graduatedTickUnit",y,a))}},graduatedTickBase:{get:function(){return this.ra!==null?this.ra.V:0},set:function(a){var y=this.graduatedTickBase;y!==a&&(this.ra===null&&(this.ra=new dh),this.ra.V=a,this.v(),this.g("graduatedTickBase",y,a))}},graduatedMarks:{get:function(){return this.ra!==null?this.ra.u:null},set:function(a){this.ra!==null?this.ra.u=a:a!==null&&(this.ra=new dh,this.ra.u=a)}},graduatedBounds:{get:function(){return this.ra!==null?this.ra.j:null},set:function(a){this.ra!==null?this.ra.j=a:a!==null&&(this.ra=new dh,this.ra.j=a)}},graduatedIntervals:{get:function(){return this.ra!==null?this.ra.o:null},set:function(a){this.ra!==null?this.ra.o=a:a!==null&&(this.ra=new dh,this.ra.o=a)}},temporaryTextBlock:{get:function(){return this.ra!==null?this.ra.Zh:null},set:function(a){this.ra!==null?this.ra.Zh=a:a!==null&&(this.ra=new dh,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new Su),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Su),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Om},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Su),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Om},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Su),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&Nt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Su),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&Nt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Su),this.T.hb=a,this.v(),this.g("leftIndex",y,a))}},data:{get:function(){return this.ub},set:function(a){var y=this.ub;if(y!==a){var x=this instanceof Mi&&!(this instanceof qr);Ru(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof $n?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Mi&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),b!==null&&b.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Lf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Sx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ly(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||p1(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new ci}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Mi||a.isPanelMain)&&Nt("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););xr(this),this.A.Pc=a,this.g("itemTemplateMap",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv()}}},itemCategoryProperty:{get:function(){return this.A!==null?this.A.Oc:"category"},set:function(a){var y=this.itemCategoryProperty;y!==a&&(xr(this),this.A.Oc=a,this.g("itemCategoryProperty",y,a))}},isAtomic:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("isAtomic",y,a))}},isClipping:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this instanceof ir&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&km(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),Ye.Object.defineProperties(Wn,{Position:{get:function(){return $u.I("Position")}},Horizontal:{get:function(){return $u.I("Horizontal")}},Vertical:{get:function(){return $u.I("Vertical")}},Spot:{get:function(){return $u.I("Spot")}},Auto:{get:function(){return $u.I("Auto")}},Table:{get:function(){return $u.I("Table")}},Viewbox:{get:function(){return $u.I("Viewbox")}},TableRow:{get:function(){return $u.I("TableRow")}},TableColumn:{get:function(){return $u.I("TableColumn")}},Link:{get:function(){return $u.I("Link")}},Grid:{get:function(){return $u.I("Grid")}},Graduated:{get:function(){return $u.I("Graduated")}}}),Wn.prototype.rebuildItemElements=Wn.prototype.mv,Wn.prototype.findItemPanelForData=Wn.prototype.sx,Wn.prototype.updateTargetBindings=Wn.prototype.La,Wn.prototype.copyTemplate=Wn.prototype.Uy,Wn.prototype.graduatedValueForPoint=Wn.prototype.Gz,Wn.prototype.graduatedPointForValue=Wn.prototype.Fz,Wn.prototype.findColumnForLocalX=Wn.prototype.fz,Wn.prototype.findRowForLocalY=Wn.prototype.nz,Wn.prototype.addColumnDefinition=Wn.prototype.By,Wn.prototype.addRowDefinition=Wn.prototype.Hy,Wn.prototype.addRowColumnDefinition=Wn.prototype.Gy,Wn.prototype.removeColumnDefinition=Wn.prototype.jA,Wn.prototype.getColumnDefinition=Wn.prototype.Eb,Wn.prototype.removeRowDefinition=Wn.prototype.oA,Wn.prototype.getRowDefinition=Wn.prototype.Fb,Wn.prototype.removeAt=Wn.prototype.mb,Wn.prototype.remove=Wn.prototype.remove,Wn.prototype.insertAt=Wn.prototype.Gb,Wn.prototype.elt=Wn.prototype.M,Wn.prototype.add=Wn.prototype.add,Wn.prototype.findObject=Wn.prototype.fb,Wn.prototype.findInVisualTree=Wn.prototype.Nl,Wn.prototype.walkVisualTreeFrom=Wn.prototype.qm,Wn.prototype.findMainElement=Wn.prototype.Pb;var g1=!1,m1=null,$u=new ci;Wn.className="Panel",Wn.definePanelLayout=kc,kc("Position",new vm),kc("Vertical",new Sm),kc("Auto",new wm),kc("Link",new Lm);function dh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}dh.prototype.copy=function(){var a=new dh;return a.lq=this.lq,a.F=this.F,a.ia=this.ia,a.V=this.V,a.u=this.u,a.j=this.j,a.o=this.o,a.Zh=this.Zh,a},dh.className="GradPanelSettings";function Su(){this.Pc=[],this.Oc=[],this.j=this.ob=Om,this.hb=this.Hb=0,this.Qp=xa,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Su.prototype.copy=function(a){for(var y=new Su,x=this.Pc,b=x.length,E=y.Pc,te=0;te<b;te++)if(x[te]!==void 0){var ne=x[te].copy();ne.wi(a),E[te]=ne}for(x=this.Oc,b=x.length,E=y.Oc,te=0;te<b;te++)x[te]!==void 0&&(ne=x[te].copy(),ne.wi(a),E[te]=ne);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},Su.className="TablePanelSettings";function ta(a){vr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=oo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Pv,this.hg=rr,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}ta.prototype.copy=function(){var a=new ta;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=jn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Am(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=jn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}rt=ta.prototype,rt.qb=function(a){a.classType===ta&&(this.sizing=a)},rt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Dr(this)},rt.wi=function(a){this.Me=a},rt.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},rt.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Wn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,te=0;te<E;te++){var ne=b?y.rowDefs[te]:y.colDefs[te];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},rt.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Vo,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Nm(a){if(a.sizing===Pv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}rt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Hs(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&Nt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Rn),this.be.add(E),this},Ye.Object.defineProperties(ta.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Ln(a,">= 0",ta,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Ln(a,">= 0",ta,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Ln(a,">= 0",ta,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Ln(a,">= 0",ta,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new Li(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&Tf(a,"RowColumnDefinition.separatorStroke"),a instanceof po&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Nt("separatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Tf(a,"RowColumnDefinition.background"),a instanceof po&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),ta.prototype.computeEffectiveSpacing=ta.prototype.Wc,ta.prototype.computeEffectiveSpacingTop=ta.prototype.Io;var Pv=new En(ta,"Default",0),pg=new En(ta,"None",1),Om=new En(ta,"ProportionalExtra",2);ta.className="RowColumnDefinition",ta.Default=Pv,ta.None=pg,ta.ProportionalExtra=Om;function gr(a,y){nn.call(this),this.Rd=this.ua=null,this.an="None",this.xc=this.Ui="black",this.ig=1,this.Na=this.Yg=null,this.Vn=this.Un=NaN,this.fa=null,typeof a=="string"?this.figure=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}qe(gr,nn),gr.prototype.cloneProtected=function(a){nn.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=jn(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function ef(a){a.Na===null?a.Na=new Lv:a.Na.nc&&(a.Na=a.Na.copy())}rt=gr.prototype,rt.th=function(){nn.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},rt.qb=function(a){a===Fn||a===mi||a===Rr||a===rr?this.geometryStretch=a:nn.prototype.qb.call(this,a)},rt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Dr(this)};function pp(a,y,x,b){var E=x.length;if(!(4>E)){var te=b.measuredBounds,ne=Math.max(1,te.width);te=te.height;for(var ae=x[0],fe=x[1],_e,Te,je,Ve,Qe,it,ct=0,Dt=Gn(),Lt=2;Lt<E;Lt+=2)_e=x[Lt],Te=x[Lt+1],je=_e-ae,ae=Te-fe,je===0&&(je=.001),Ve=ae/je,Qe=Math.atan2(ae,je),it=Math.sqrt(je*je+ae*ae),Dt.push([je,Qe,Ve,it]),ct+=it,ae=_e,fe=Te;ae=x[0],fe=x[1],je=b.measuredBounds.width,b instanceof gr&&(je-=b.strokeWidth),1>je&&(je=1),E=x=je,_e=ne/2,Te=_e!==0,Lt=0,it=Dt[Lt],je=it[0],Qe=it[1],Ve=it[2],it=it[3];for(var Gt=0;.1<=ct;){if(Gt===0&&(Te?(E=x,E-=_e,ct-=_e,Te=!1):E=x,E===0&&(E=1)),E>ct){ti(Dt);return}E>it?(Gt=E-it,E=it):Gt=0;var Zt=Math.sqrt(E*E/(1+Ve*Ve));if(0>je&&(Zt=-Zt),ae+=Zt,fe+=Ve*Zt,a.translate(ae,fe),a.rotate(Qe),a.translate(-(ne/2),-(te/2)),Gt===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Qe),a.translate(-ae,-fe),ct-=E,it-=E,Gt!==0){if(Lt++,Lt===Dt.length){ti(Dt);return}it=Dt[Lt],je=it[0],Qe=it[1],Ve=it[2],it=it[3],E=Gt}}ti(Dt)}}rt.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var te=this.actualBounds,ne=this.naturalBounds;b!==null&&ws(this,a,b,!0,!1,ne,te);var ae=this.part,fe=this.ig;if(x===null||fe!==0||ae===null||!this.isPanelMain&&ae.Pb()!==this||(fe=ae.type===Wn.Link&&ae instanceof qr&&ae.category==="Selection"&&ae.adornedObject instanceof gr&&ae.adornedPart.Pb()===ae.adornedObject?ae.adornedObject.strokeWidth:0),fe===0&&(x=null),x!==null&&fe!==0&&(ws(this,a,x,!1,!1,ne,te),a.lineWidth=fe,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),te=!1,ae&&y.Gf("drawShadows")&&(te=ae.isShadowed),a.Il===!1&&(te=!1),ae=!0,x===null||b!==null&&b!=="transparent"||(ae=!1),ne=!1,fe=this.strokeDashArray,fe!==null&&(ne=!0,a.js(fe,this.strokeDashOffset)),E.type===Yn.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===Yn.u){var _e=E.startX;fe=E.startY;var Te=E.endX,je=E.endY;E=Math.min(_e,Te);var Ve=Math.min(fe,je);_e=Math.abs(Te-_e),fe=Math.abs(je-fe),a.beginPath(),a.rect(E,Ve,_e,fe),b!==null&&a.ng(b),x!==null&&(ae&&te&&Uc(a),a.jk(),ae&&te&&lh(a)),a.Se()}else if(E.type===Yn.F)_e=E.startX,fe=E.startY,Te=E.endX,je=E.endY,E=Math.abs(Te-_e)/2,Ve=Math.abs(je-fe)/2,_e=Math.min(_e,Te)+E,fe=Math.min(fe,je)+Ve,a.beginPath(),a.moveTo(_e,fe-Ve),a.bezierCurveTo(_e+on.wg*E,fe-Ve,_e+E,fe-on.wg*Ve,_e+E,fe),a.bezierCurveTo(_e+E,fe+on.wg*Ve,_e+on.wg*E,fe+Ve,_e,fe+Ve),a.bezierCurveTo(_e-on.wg*E,fe+Ve,_e-E,fe+on.wg*Ve,_e-E,fe),a.bezierCurveTo(_e-E,fe-on.wg*Ve,_e-on.wg*E,fe-Ve,_e,fe-Ve),a.closePath(),b!==null&&a.ng(b),x!==null&&(ae&&te&&Uc(a),a.jk(),ae&&te&&lh(a)),a.Se();else if(E.type===Yn.o)for(E=E.figures,fe=E.length,Ve=0;Ve<fe;Ve++){_e=E.s[Ve],a.beginPath(),a.moveTo(_e.startX,_e.startY),Te=_e.segments.s,je=Te.length;for(var Qe=null,it=0;it<je;it++){var ct=Te[it];switch(ct.type){case Ms:a.moveTo(ct.endX,ct.endY);break;case wo:a.lineTo(ct.endX,ct.endY);break;case ga:a.bezierCurveTo(ct.point1X,ct.point1Y,ct.point2X,ct.point2Y,ct.endX,ct.endY);break;case dl:a.quadraticCurveTo(ct.point1X,ct.point1Y,ct.endX,ct.endY);break;case cs:if(ct.radiusX===ct.radiusY){var Dt=Math.PI/180;a.arc(ct.point1X,ct.point1Y,ct.radiusX,ct.startAngle*Dt,(ct.startAngle+ct.sweepAngle)*Dt,0>ct.sweepAngle,Qe!==null?Qe.endX:_e.startX,Qe!==null?Qe.endY:_e.startY)}else if(Qe=Da(ct,_e),Dt=Qe.length,Dt===0)a.lineTo(ct.centerX,ct.centerY);else for(var Lt=0;Lt<Dt;Lt++){var Gt=Qe[Lt];Lt===0&&a.lineTo(Gt[0],Gt[1]),a.bezierCurveTo(Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7])}break;case Cl:if(Lt=Dt=0,Qe!==null&&Qe.type===cs){if(Qe=Da(Qe,_e),Gt=Qe.length,Gt===0){a.lineTo(ct.endX,ct.endY);break}Qe=Qe[Gt-1]||null,Qe!==null&&(Dt=Qe[6],Lt=Qe[7])}else Dt=Qe!==null?Qe.endX:_e.startX,Lt=Qe!==null?Qe.endY:_e.startY;if(Qe=$s(ct,_e,Dt,Lt),Dt=Qe.length,Dt===0){a.lineTo(ct.endX,ct.endY);break}for(Lt=0;Lt<Dt;Lt++)Gt=Qe[Lt],a.bezierCurveTo(Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7]);break;default:Nt("Segment not of valid type: "+ct.type)}ct.isClosed&&a.closePath(),Qe=ct}Te=_e.isFilled,te?_e.isShadowed?(Te===!0&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&(Te&&ae&&Uc(a),a.jk(),Te&&ae&&lh(a))):(Uc(a),Te&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk(),lh(a)):(Te&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk()),a.Se(Ve)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),te=this.geometry,a.save(),a.beginPath(),b=Gn(),te.type===Yn.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),pp(a,y,b,x);else if(te.type===Yn.o)for(te=te.figures.iterator;te.next();){for(ae=te.value,b.length=0,b.push(ae.startX),b.push(ae.startY),ne=ae.startX,E=ae.startY,fe=ne,Ve=E,_e=ae.segments.s,Te=_e.length,je=0;je<Te;je++){switch(it=_e[je],it.type){case Ms:pp(a,y,b,x),b.length=0,b.push(it.endX),b.push(it.endY),ne=it.endX,E=it.endY,fe=ne,Ve=E;break;case wo:b.push(it.endX),b.push(it.endY),ne=it.endX,E=it.endY;break;case ga:on.Qe(ne,E,it.point1X,it.point1Y,it.point2X,it.point2Y,it.endX,it.endY,.5,b),ne=it.endX,E=it.endY;break;case dl:on.ep(ne,E,it.point1X,it.point1Y,it.endX,it.endY,.5,b),ne=it.endX,E=it.endY;break;case cs:if(ct=Da(it,ae),Qe=ct.length,Qe===0){b.push(it.centerX),b.push(it.centerY),ne=it.centerX,E=it.centerY;break}for(Dt=0;Dt<Qe;Dt++)Lt=ct[Dt],on.Qe(ne,E,Lt[2],Lt[3],Lt[4],Lt[5],Lt[6],Lt[7],.5,b),ne=Lt[6],E=Lt[7];break;case Cl:if(ct=$s(it,ae,ne,E),Qe=ct.length,Qe===0){b.push(it.endX),b.push(it.endY),ne=it.endX,E=it.endY;break}for(Dt=0;Dt<Qe;Dt++)Lt=ct[Dt],on.Qe(ne,E,Lt[2],Lt[3],Lt[4],Lt[5],Lt[6],Lt[7],.5,b),ne=Lt[6],E=Lt[7];break;default:Nt("Segment not of valid type: "+it.type)}it.isClosed&&(b.push(fe),b.push(Ve),pp(a,y,b,x))}pp(a,y,b,x)}else if(te.type===Yn.u)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.startY),b.push(te.endX),b.push(te.endY),b.push(te.startX),b.push(te.endY),b.push(te.startX),b.push(te.startY),pp(a,y,b,x);else if(te.type===Yn.F){if(E=new Vs,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Vr(cs),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(te.startX+te.endX)/2,ne.centerY=(te.startY+te.endY)/2,ne.radiusX=Math.abs(te.startX-te.endX)/2,ne.radiusY=Math.abs(te.startY-te.endY)/2,E.add(ne),te=Da(ne,E),ae=te.length,ae===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,fe=0;fe<ae;fe++)Ve=te[fe],on.Qe(ne,E,Ve[2],Ve[3],Ve[4],Ve[5],Ve[6],Ve[7],.5,b),ne=Ve[6],E=Ve[7];pp(a,y,b,x)}ti(b),a.restore(),a.Vc(!1)}}}},rt.kk=function(a,y,x){return!nn.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},rt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:nn.prototype.nk.call(this,a)},rt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},rt.ga=function(a,y){if(y===void 0&&(y=new Mt),a instanceof vi){a.Mc()&&Nt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},rt.mi=function(a){a===void 0&&(a=new kn);var y=this.naturalBounds,x=this.oe;y=kn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=Mt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),No(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),No(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),No(a,b.x,b.y,0,0),kn.free(y),Mt.free(b),a},rt.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==Yn.j||y||(E+=2);var te=kn.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return kn.free(te),!1;if(b=E+1e-4,x.type===Yn.j)return this.stroke===null||(b=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>b)?!1:(kn.free(te),on.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Yn.u){y=x.startX;var ne=x.startY,ae=x.endX;if(x=x.endY,te.x=Math.min(y,ae),te.y=Math.min(ne,x),te.width=Math.abs(ae-y),te.height=Math.abs(x-ne),this.fill===null){if(te.Bc(-b,-b),te.ca(a))return kn.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),kn.free(te),a}if(x.type===Yn.F){ne=x.startX,E=x.startY,ae=x.endX;var fe=x.endY;if(x=Math.min(ne,ae),y=Math.min(E,fe),ne=Math.abs(ae-ne)/2,E=Math.abs(fe-E)/2,x=a.x-(x+ne),y=a.y-(y+E),this.fill===null){if(ne-=b,E-=b,0>=ne||0>=E||1>=x*x/(ne*ne)+y*y/(E*E))return kn.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),kn.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Yn.o)return kn.free(te),this.fill===null?Wu(x,a.x,a.y,E):Mu(x,a,E,1<this.strokeWidth,y);Nt("Unknown Geometry type: "+x.type)},rt.Wl=function(a,y,x,b){var E=this.desiredSize,te=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var ae=this.figure,fe=Ev[ae];if(fe===void 0){var _e=on.Ze[ae];typeof _e=="string"&&(_e=on.Ze[_e]),typeof _e=="function"?(fe=_e(null,100,100),Ev[ae]=fe):Nt("Unsupported Figure: "+ae)}ne=fe.bounds}ae=ne.width,fe=ne.height,_e=ne.width;var Te=ne.height;switch(gl(this,!0)){case Fn:b=x=0;break;case Un:_e=Math.max(a-te,0),Te=Math.max(y-te,0);break;case _i:_e=Math.max(a-te,0),b=0;break;case Bi:x=0,Te=Math.max(y-te,0)}isFinite(E.width)&&(_e=E.width),isFinite(E.height)&&(Te=E.height);var je=this.maxSize,Ve=this.minSize;switch(x=Math.max(x-te,Ve.width),b=Math.max(b-te,Ve.height),_e=Math.min(je.width,_e),Te=Math.min(je.height,Te),_e=isFinite(_e)?Math.max(x,_e):Math.max(ae,x),Te=isFinite(Te)?Math.max(b,Te):Math.max(fe,b),x=_v(this),x){case Fn:break;case Un:ae=_e,fe=Te;break;case mi:x=Math.min(_e/ae,Te/fe),isFinite(x)||(x=1),ae*=x,fe*=x;break;default:Nt(x+" is not a valid geometryStretch.")}this.Rd!==null?(ae===0&&(ae=.001),fe===0&&(fe=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=ae/ne.width,ne=fe/ne.height,isFinite(b)||(b=1),isFinite(ne)||(ne=1),this.ua=b===1&&ne===1?x:x.copy().scale(b,ne)):this.ua!==null&&on.$(this.ua.Sk,a-te)&&on.$(this.ua.Rk,y-te)||(this.ua=gr.makeGeometry(this,ae,fe)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-te/2,ne.y-te/2,a===0&&ae===0?0:ne.width+te,y===0&&fe===0?0:ne.height+te):this.Ge(-(te/2),-(te/2),_e+te,Te+te),E.w()?(_e=E.width,Te=E.height,_e=Math.min(je.width,_e),Te=Math.min(je.height,Te),_e=Math.max(Ve.width,_e),Te=Math.max(Ve.height,Te),this.dc.h(0,0,_e,Te)):this.dc.assign(ne)};function _v(a){var y=a.geometryStretch;return a.Rd!==null?y===rr?Un:y:y===rr?Ev[a.figure].defaultStretch:y}rt.eh=function(a,y,x,b){Ya(this,a,y,x,b)},rt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},rt.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),ae=te.m22*ne,fe=-te.m12*ne,_e=-te.m21*ne,Te=te.m11*ne,je=ne*(te.m21*te.dy-te.m22*te.dx),Ve=ne*(te.m12*te.dx-te.m11*te.dy);te=a*ae+y*_e+je,ne=a*fe+y*Te+Ve,ae=x*ae+b*_e+je,fe=x*fe+b*Te+Ve,je=this.ig/2,_e=this.ua,_e===null&&(this.measure(1/0,1/0),_e=this.ua);var Qe=_e.bounds;if(Te=!1,_e.type===Yn.j)if(1.5>=this.strokeWidth)Te=on.Ve(_e.startX,_e.startY,_e.endX,_e.endY,te,ne,ae,fe,E);else{if(_e.startX===_e.endX?(b=je,Te=0):(y=(_e.endY-_e.startY)/(_e.endX-_e.startX),Te=je/Math.sqrt(1+y*y),b=Te*y),y=Gn(),a=new Mt,on.Ve(_e.startX+b,_e.startY+Te,_e.endX+b,_e.endY+Te,te,ne,ae,fe,a)&&y.push(a),a=new Mt,on.Ve(_e.startX-b,_e.startY-Te,_e.endX-b,_e.endY-Te,te,ne,ae,fe,a)&&y.push(a),a=new Mt,on.Ve(_e.startX+b,_e.startY+Te,_e.startX-b,_e.startY-Te,te,ne,ae,fe,a)&&y.push(a),a=new Mt,on.Ve(_e.endX+b,_e.endY+Te,_e.endX-b,_e.endY-Te,te,ne,ae,fe,a)&&y.push(a),ae=y.length,ae===0)return ti(y),!1;for(Te=!0,fe=1/0,b=0;b<ae;b++)a=y[b],x=(a.x-te)*(a.x-te)+(a.y-ne)*(a.y-ne),x<fe&&(fe=x,E.x=a.x,E.y=a.y);ti(y)}else if(_e.type===Yn.u)Te=on.Ff(Qe.x-je,Qe.y-je,Qe.x+Qe.width+je,Qe.y+Qe.height+je,te,ne,ae,fe,E);else if(_e.type===Yn.F){y=kn.allocAt(Qe.x,Qe.y,Qe.width,Qe.height).Bc(je,je);e:if(y.width===0)Te=on.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,ae,fe,E);else if(y.height===0)Te=on.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,ae,fe,E);else{if(a=y.width/2,_e=y.height/2,b=y.x+a,Te=y.y+_e,x=9999,te!==ae&&(x=(ne-fe)/(te-ae)),9999>Math.abs(x)){if(fe=ne-Te-x*(te-b),0>a*a*x*x+_e*_e-fe*fe){E.x=NaN,E.y=NaN,Te=!1;break e}je=Math.sqrt(a*a*x*x+_e*_e-fe*fe),ae=(-(a*a*x*fe)+a*_e*je)/(_e*_e+a*a*x*x)+b,a=(-(a*a*x*fe)-a*_e*je)/(_e*_e+a*a*x*x)+b,_e=x*(ae-b)+fe+Te,fe=x*(a-b)+fe+Te,Math.abs((te-ae)*(te-ae))+Math.abs((ne-_e)*(ne-_e))<Math.abs((te-a)*(te-a))+Math.abs((ne-fe)*(ne-fe))?(E.x=ae,E.y=_e):(E.x=a,E.y=fe)}else{if(ae=_e*_e,fe=te-b,ae-=ae/(a*a)*fe*fe,0>ae){E.x=NaN,E.y=NaN,Te=!1;break e}fe=Math.sqrt(ae),ae=Te+fe,fe=Te-fe,Math.abs(ae-ne)<Math.abs(fe-ne)?(E.x=te,E.y=ae):(E.x=te,E.y=fe)}Te=!0}kn.free(y)}else if(_e.type===Yn.o){Ve=Mt.alloc();var it=ae-te,ct=fe-ne,Dt=it*it+ct*ct,Lt=te,Gt=ne;if(0<Dt&&Qe.contains(Lt,Gt)&&(Ve.x=Lt,Ve.y=Gt,this.ca(Ve)))for(it!==0&&.5>Math.abs(it)?(ct*=.5/it,it=.5):ct!==0&&.5>Math.abs(ct)&&(it*=.5/ct,ct=.5),Lt-=it,Gt-=ct;Qe.contains(Lt,Gt);)Lt-=it,Gt-=ct;for(E.x=ae,E.y=fe,ct=0;ct<_e.figures.count;ct++){var Zt=_e.figures.s[ct],Vt=Zt.isFilled?Lt:te,qt=Zt.isFilled?Gt:ne,yn=Zt.segments;Qe=Zt.startX,it=Zt.startY;for(var ii=Qe,di=it,ui=0;ui<yn.count;ui++){var Vn=yn.s[ui],In=Vn.type,er=Vn.endX,Vi=Vn.endY,io=!1;switch(In){case Ms:ii=er,di=Vi;break;case wo:io=Dm(Qe,it,er,Vi,Vt,qt,ae,fe,Ve);break;case ga:io=on.Eo(Qe,it,Vn.point1X,Vn.point1Y,Vn.point2X,Vn.point2Y,er,Vi,Vt,qt,ae,fe,.6,Ve);break;case dl:io=on.Eo(Qe,it,Qe+2/3*(Vn.point1X-Qe),it+2/3*(Vn.point1Y-it),er+2/3*(Vn.point1X-er),Vi+2/3*(Vn.point1Y-Vi),er,Vi,Vt,qt,ae,fe,.6,Ve);break;case cs:case Cl:In=Vn.type===cs?Da(Vn,Zt):$s(Vn,Zt,Qe,it);var Eo=In.length;if(Eo===0){io=Dm(Qe,it,Vn.type===cs?Vn.centerX:Vn.endX,Vn.type===cs?Vn.centerY:Vn.endY,Vt,qt,ae,fe,Ve);break}for(Vi=null,er=0;er<Eo;er++){if(Vi=In[er],er===0&&Dm(Qe,it,Vi[0],Vi[1],Vt,qt,ae,fe,Ve)){var ha=Im(Vt,qt,Ve,Dt,E);ha<Dt&&(Dt=ha,Te=!0)}on.Eo(Vi[0],Vi[1],Vi[2],Vi[3],Vi[4],Vi[5],Vi[6],Vi[7],Vt,qt,ae,fe,.6,Ve)&&(ha=Im(Vt,qt,Ve,Dt,E),ha<Dt&&(Dt=ha,Te=!0))}er=Vi[6],Vi=Vi[7];break;default:Nt("Unknown Segment type: "+In)}Qe=er,it=Vi,io&&(io=Im(Vt,qt,Ve,Dt,E),io<Dt&&(Dt=io,Te=!0)),Vn.isClosed&&(er=ii,Vi=di,Dm(Qe,it,er,Vi,Vt,qt,ae,fe,Ve)&&(Vn=Im(Vt,qt,Ve,Dt,E),Vn<Dt&&(Dt=Vn,Te=!0)))}}te=x-a,ne=b-y,ae=Math.sqrt(te*te+ne*ne),ae!==0&&(te/=ae,ne/=ae),E.x-=te*je,E.y-=ne*je,Mt.free(Ve)}else Nt("Unknown Geometry type: "+_e.type);return Te?(this.transform.Ga(E),!0):!1};function Im(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Dm(a,y,x,b,E,te,ne,ae,fe){if(on.$(a,x)&&on.$(y,b)||on.$(E,ne)&&on.$(te,ae))return!1;var _e=!1,Te=(E-ne)*(y-b)-(te-ae)*(a-x);return Te===0?!1:(fe.x=((E*ae-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/Te,fe.y=((E*ae-te*ne)*(y-b)-(te-ae)*(a*b-y*x))/Te,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(fe.y>a||on.$(fe.y,a))&&(fe.y<y||on.$(fe.y,y))&&(_e=!0)):(y=a<x?a:x,a=a<x?x:a,(fe.x>y||on.$(fe.x,y))&&(fe.x<a||on.$(fe.x,a))&&(_e=!0)),_e)}rt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var b=this.strokeWidth/2,E=!1,te=Mt.alloc();return te.h(x.x-b,x.y-b),a.ca(y.Ga(te))&&(te.h(x.x-b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.y-b),a.ca(y.Ga(te))&&(E=!0)))),Mt.free(te),E},rt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=yr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=Mt.alloc();if(ne.h(b,te),x.Ga(ne),this.gh(ne,!0)||(ne.h(E,te),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0)))return Mt.free(ne),!0;var ae=Mt.alloc(),fe=Mt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),ae.x=E,ae.y=te,ae.transform(x),ne.x=b,ne.y=te,ne.transform(x),y=!1,tf(this,ne,ae,fe)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),tf(this,ne,ae,fe)?y=!0:(ae.x=b,ae.y=a,ae.transform(x),tf(this,ne,ae,fe)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),tf(this,ne,ae,fe)&&(y=!0)))),Mt.free(ne),yr.free(x),Mt.free(ae),Mt.free(fe),y};function tf(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,te=x.y;return x=b.x,b=b.y,a===E?(y<te?(a=y,y=te):a=te,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}rt.tx=function(a,y,x){function b(Dt,Lt){for(var Gt=Dt.length,Zt=0;Zt<Gt;Zt+=2)if(Lt.zd(Dt[Zt],Dt[Zt+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),te=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,ae=ne.x,fe=ne.y,_e=ne.x+ne.width;if(ne=ne.y+ne.height,Yo(a.x,a.y,ae,fe)<=E&&Yo(a.x,a.y,_e,fe)<=E&&Yo(a.x,a.y,ae,ne)<=E&&Yo(a.x,a.y,_e,ne)<=E)return!0}if(ae=y.startX,fe=y.startY,_e=y.endX,ne=y.endY,y.type===Yn.j){if(x=(ae-_e)*(a.x-_e)+(fe-ne)*(a.y-ne),eo(a.x,a.y,ae,fe,_e,ne)<=(0<=(_e-ae)*(a.x-ae)+(ne-fe)*(a.y-fe)&&0<=x?E:te))return!0}else{if(y.type===Yn.u)return y=!1,x&&(y=eo(a.x,a.y,ae,fe,ae,ne)<=E||eo(a.x,a.y,ae,fe,_e,fe)<=E||eo(a.x,a.y,_e,fe,_e,ne)<=E||eo(a.x,a.y,ae,ne,_e,ne)<=E),y;if(y.type===Yn.F){y=a.x-(ae+_e)/2,te=a.y-(fe+ne)/2;var Te=Math.abs(_e-ae)/2,je=Math.abs(ne-fe)/2;if(Te===0||je===0)return eo(a.x,a.y,ae,fe,_e,ne)<=E;if(x){if(a=on.$y(Te,je,y,te),a*a<=E)return!0}else return!(Yo(y,te,-Te,0)>=E||Yo(y,te,0,-je)>=E||Yo(y,te,0,je)>=E||Yo(y,te,Te,0)>=E)}else if(y.type===Yn.o){if(_e=y.bounds,te=_e.x,ae=_e.y,fe=_e.x+_e.width,_e=_e.y+_e.height,a.x>fe&&a.x<te&&a.y>_e&&a.y<ae&&eo(a.x,a.y,te,ae,te,_e)>E&&eo(a.x,a.y,te,ae,fe,ae)>E&&eo(a.x,a.y,fe,_e,te,_e)>E&&eo(a.x,a.y,fe,_e,fe,ae)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?Wu(y,a.x,a.y,te):Mu(y,a,te,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(te=x.s[y],ne=te.startX,Te=te.startY,a.zd(ne,Te)>E)return!1;for(ae=te.segments.s,fe=ae.length,_e=0;_e<fe;_e++)switch(je=ae[_e],je.type){case Ms:case wo:if(ne=je.endX,Te=je.endY,a.zd(ne,Te)>E)return!1;break;case ga:var Ve=Gn();if(on.Qe(ne,Te,je.point1X,je.point1Y,je.point2X,je.point2Y,je.endX,je.endY,.8,Ve),ne=b(Ve,a),ti(Ve),ne||(ne=je.endX,Te=je.endY,a.zd(ne,Te)>E))return!1;break;case dl:if(Ve=Gn(),on.ep(ne,Te,je.point1X,je.point1Y,je.endX,je.endY,.8,Ve),ne=b(Ve,a),ti(Ve),ne||(ne=je.endX,Te=je.endY,a.zd(ne,Te)>E))return!1;break;case cs:case Cl:Ve=je.type===cs?Da(je,te):$s(je,te,ne,Te);var Qe=Ve.length;if(Qe===0){if(ne=je.type===cs?je.centerX:je.endX,Te=je.type===cs?je.centerY:je.endY,a.zd(ne,Te)>E)return!1;break}je=null;for(var it=Gn(),ct=0;ct<Qe;ct++)if(je=Ve[ct],it.length=0,on.Qe(je[0],je[1],je[2],je[3],je[4],je[5],je[6],je[7],.8,it),b(it,a))return ti(it),!1;ti(it),je!==null&&(ne=je[6],Te=je[7]);break;default:Nt("Unknown Segment type: "+je.type)}}return!0}}}return!1},rt.qc=function(){this.ua=null},rt.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=Cg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Zs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new vi(1-Zs.x,Zs.y)))}gr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Wc[a.toArrow];else a.fromArrow!=="None"?b=Wc[a.fromArrow]:(b=on.Ze[a.figure],typeof b=="string"&&(b=on.Ze[b]),b===void 0&&Nt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=on.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=Wc[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Wc[x],y===void 0){var b=null,E;for(E in on.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Yn.parse(on.um[b],!1),Wc[b]=a,x!==b&&(Wc[x]=b),b}}return typeof y=="string"?y:y instanceof Yn?a:null}Ye.Object.defineProperties(gr.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),Ta(this)&&(a=this.part,a!==null&&zo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Yn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Mt.allocAt(-y.x,-y.y),Mt.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&Tf(a,"Shape.fill"),a instanceof po&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Tf(a,"Shape.stroke"),a instanceof po&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else Ln(a,"value >= 0",gr,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?Ln(a,'"butt", "round", or "square"',gr,"strokeCap"):(ef(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?Ln(a,'"miter", "bevel", or "round"',gr,"strokeJoin"):(ef(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",y,a)))}},strokeMiterLimit:{get:function(){return this.Na!==null?this.Na.Jr:10},set:function(a){var y=this.strokeMiterLimit;if(y!==a&&1<=a){ef(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];0<=te&&isFinite(te)||Nt("strokeDashArray:value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(ef(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=on.Ze[a];typeof x=="function"?x=a:(x=on.Ze[a.toLowerCase()])||Nt("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?Nt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new ud),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?Nt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new ud),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:oo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),ef(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:oo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),ef(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(ef(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:rr},set:function(a){var y=this.geometryStretch;y!==a&&(ef(this),this.Na.jq=a,this.v(),this.g("geometryStretch",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Zc),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Lc(x),this.v(),x=this.panel,x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Zc),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Zc),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Zc),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),gr.prototype.intersectsRect=gr.prototype.Yc,gr.prototype.containedInRect=gr.prototype.fh,gr.prototype.getNearestIntersectionPoint=gr.prototype.rs,gr.prototype.getDocumentBounds=gr.prototype.mi,gr.prototype.getDocumentPoint=gr.prototype.ga;var Wc=new Si,Ev=new Si;gr.className="Shape",gr.getFigureGenerators=function(){var a=new ci,y;for(y in on.Ze)y!==y.toLowerCase()&&a.add(y,on.Ze[y]);return a.freeze(),a},gr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=on.Ze;b[a]=y,b[x]=a},gr.getArrowheadGeometries=function(){var a=new ci;for(b in on.um)if(Wc[b]===void 0){var y=Yn.parse(on.um[b],!1);Wc[b]=y,y=b.toLowerCase(),y!==b&&(Wc[y]=b)}for(var x in Wc)if(x!==x.toLowerCase()){var b=Wc[x];b instanceof Yn&&a.add(x,b)}return a.freeze(),a},gr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Yn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Nt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=Wc;b[a]=x,b[y]=a};function Lv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=rr,this.gg=this.fg=oo}Lv.prototype.copy=function(){var a=new Lv;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function To(a,y){return nn.call(this),zm||(ml=ys?new Du(null).context:null,zm=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}qe(To,nn),To.prototype.cloneProtected=function(a){nn.prototype.cloneProtected.call(this,a),a.ec=this.ec,a.xc=this.xc,a.Ae=this.Ae,a.Gc=this.Gc,a.Cb=this.Cb,a.Lq=this.Lq,a.Gm=this.Gm,this.fa!==null&&(a.fa=this.fa.copy()),this.da!==null&&(a.da=this.da.nc?this.da:this.da.copy()),a.Ih=this.Ih,a.df=this.df,a.Le=this.Le,a.Qc=this.Qc,a.Qb=this.Qb,a.ze=this.ze};function Ac(a){a.da===null?a.da=new Iv:a.da.nc&&(a.da=a.da.copy())}rt=To.prototype,rt.th=function(){nn.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function S1(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}rt.qb=function(a){a.classType===To?this.wrap=a:nn.prototype.qb.call(this,a)},rt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},rt.v=function(){nn.prototype.v.call(this)},rt.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,te=x.height,ne=mg(this),ae=a.textAlign=this.textAlign,fe=y.tn;ae==="start"?ae=fe?"right":"left":ae==="end"&&(ae=fe?"left":"right"),fe=this.isUnderline;var _e=this.isStrikethrough;ws(this,a,this.xc,!0,!1,x,b),(fe||_e)&&ws(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var Te=this.oe,je=Te.dx-(ne*Te.m21+Te.dx);Te=Te.dy-(ne*Te.m22+Te.dy);var Ve=y.scale;switch(8>(je*je+Te*Te)*Ve*Ve&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Hl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,je=this.spacingBelow,this.flip){case Zr:a.translate(E,0),a.scale(-1,1);break;case wr:a.translate(0,te),a.scale(1,-1);break;case bo:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),Te=this.Gc,Ve=(y+ne+je)*Te,te>Ve&&(b=this.verticalAlignment,b=b.y*te-b.y*Ve+b.offsetY),Te===1&&this.ze!==null)je=this.Cb,je>E&&(je=E),this.Oj(this.ze,a,0,b+y,E,ne,je,x,ae,fe,_e);else if(this.Qc!==null&&this.Qb!==null)for(Ve=0;Ve<Te;Ve++){var Qe=this.Qc[Ve];Qe>E&&(Qe=E),b+=y,this.Oj(this.Qb[Ve],a,0,b,E,ne,Qe,x,ae,fe,_e),b+=ne+je}switch(this.flip){case Zr:a.scale(-1,1),a.translate(-E,0);break;case wr:a.scale(1,-1),a.translate(0,-te);break;case bo:a.scale(-1,-1),a.translate(-E,-te)}}},rt.Oj=function(a,y,x,b,E,te,ne,ae,fe,_e,Te){var je=0;if(ae)fe==="left"?je=0:fe==="right"?je=E-ne:fe==="center"&&(je=(E-ne)/2),y.fillRect(x+je,b+.25*te,ne,1);else{if(fe==="left"?je=0:fe==="right"?je=E:fe==="center"&&(je=E/2),E=Rm!==null?Rm(this,te):.75*te,y.fillText(a,x+je,b+E),a=te/20|0,a===0&&(a=1),fe==="right"?je-=ne:fe==="center"&&(je-=ne/2),_e){ae=Bm!==null?Bm(this,te):.8*te,fe=x+je,_e=b+ae,E=x+je+ne,ae=b+ae;var Ve=a;y.beginPath(),y.lineWidth=Ve,y.moveTo(fe,_e),y.lineTo(E,ae),y.stroke(),y.Se(),y instanceof Hl&&y.ad.classList.add("gojs-td")}Te&&(Te=b+te-te/2.2|0,a%2!==0&&(Te+=.5),b=x+je,te=Te,x=x+je+ne,ne=Te,je=a,y.beginPath(),y.lineWidth=je,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Hl&&y.ad.classList.add("gojs-td"))}},rt.kk=function(a,y,x){if(!nn.prototype.kk.call(this,a,y,x))return!1;if(ws(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x<y.length;x++)Qy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qy(a,y,!0);return!0},rt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:nn.prototype.nk.call(this,a)},rt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},rt.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;ml!==null&&E1!==te&&(E1=ml.font=te),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(te=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),te.length===0)te=8;else if(this.isMultiline){for(var ae=ne=0,fe=!1;!fe;){var _e=te.indexOf(`
|
|
|
`,ae);_e===-1&&(_e=te.length,fe=!0),ae=te.substr(ae,_e-ae),this.formatting===vg&&(ae=ae.trim()),ne=Math.max(ne,Yu(ae)),ae=_e+1}te=ne}else ne=te.indexOf(`
|
|
|
`,0),0<=ne&&(te=te.substr(0,ne)),te=Yu(te);te=Math.min(te,a/this.scale)}else te=this.desiredSize.width;if(this.panel!==null&&(te=Math.min(te,this.panel.maxSize.width)),ne=w1(this,te),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,fe=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Fm&&(y=this.Ae,y=this.overflow===Fm?x1(y):0,_e=this.spacingAbove+this.spacingBelow,_e=Math.max(0,mg(this)+_e),fe=Math.min(this.maxLines-1,Math.max(Math.floor(fe/_e+.01)-1,0)),!(fe+1>=this.Qb.length))){for(this.l|=16777216,_e=this.Qb[fe],y=Math.max(1,a-y);Yu(_e)>y&&1<_e.length;)_e=_e.substr(0,_e.length-1);_e+=yg,y=Yu(_e),this.Qb[fe]=_e,this.Qb=this.Qb.slice(0,fe+1),this.Qc[fe]=y,this.Qc=this.Qc.slice(0,fe+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===b1||isNaN(this.desiredSize.width))&&(te=isNaN(a)?this.Cb:Math.min(a,this.Cb)),te=Math.max(x,te),ne=Math.max(b,ne),Is(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},rt.eh=function(a,y,x,b){Ya(this,a,y,x,b)};function gg(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Mv(a,y,x,b){var E=a.formatting===vg;E&&(y=y.trim());var te=0,ne=a.Ae,ae=a.spacingAbove+a.spacingBelow;ae=Math.max(0,mg(a)+ae);var fe=a.overflow===Fm?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,ae);else if(ne=y,a.wrap===Tv){a.Le=1;var _e=Yu(y);if(fe===0||_e<=x)a.Cb=Math.max(a.Cb,_e),gg(a,y,a.Cb),b!==null&&b.h(_e,ae);else{for(te=gp(a,ne),ne=ne.substr(te.length),y=gp(a,ne),_e=Yu(te+y);0<y.length&&_e<=x;)te+=y,ne=ne.substr(y.length),y=gp(a,ne),_e=te+y,E&&(_e=_e.trim()),_e=Yu(_e);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-fe);Yu(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=yg;var Te=Yu(te);a.Cb=Te,gg(a,te,Te),b!==null&&b.h(Te,ae)}}else{for(fe=0,ne.length===0&&(fe=1,gg(a,ne,0));0<ne.length;){for(y=gp(a,ne),ne=ne.substr(y.length);Yu(y)>x;){var je=1;for(_e=Yu(y.substr(0,je)),Te=0;_e<=x;)je++,Te=_e,_e=Yu(y.substr(0,je));if(je===1){var Ve=_e;te=Math.max(te,_e)}else Ve=Te,te=Math.max(te,Te);if(je--,1>je&&(je=1),gg(a,y.substr(0,je),Ve),fe++,y=y.substr(je),a.Gc+fe>a.maxLines)break}for(Te=gp(a,ne),_e=Yu(y+Te);0<Te.length&&_e<=x;)y+=Te,ne=ne.substr(Te.length),Te=gp(a,ne),_e=y+Te,E&&(_e=_e.trim()),_e=Yu(_e);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),Te.length===0?(je=_e,te=Math.max(te,_e)):(je=Te=Yu(y),te=Math.max(te,Te)),gg(a,y,je),fe++,a.Gc+fe>a.maxLines))break}a.Le=Math.min(a.maxLines,fe),a.Cb=Math.max(a.Cb,te),b!==null&&b.h(a.Cb,ae*a.Le)}}function gp(a,y){if(a.wrap===C1)return y.substr(0,1);for(var x=y.length,b=0,E=xx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===P1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function Yu(a){return ml===null?8*a.length:ml.measureText(a).width}function mg(a){if(a.df!==null)return a.df;var y=a.Ae;if(ml===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>_1?x=Nv[y]:(x=1.3*ml.measureText("M").width,Nv[y]=x,_1++),a.df=x}function x1(a){if(ml===null)return 6;if(jm[a]!==void 0&&5e3>Ov)var y=jm[a];else y=ml.measureText(yg).width,jm[a]=y,Ov++;return y}function w1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,mg(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
|
|
|
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var te=a.Gc=0,ne,ae=!1;!ae;){if(ne=x.indexOf(`
|
|
|
`,te),ne===-1&&(ne=x.length,ae=!0),te<=ne){if(te=x.substr(te,ne-te),a.wrap!==Tv){a.Le=0;var fe=Xn.alloc();Mv(a,te,y,fe),E+=fe.height,Xn.free(fe),a.Gc+=a.Le}else Mv(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ae=!0)}te=ne+1}return a.Lq=E}Ye.Object.defineProperties(To.prototype,{font:{get:function(){return this.Ae},set:function(a){var y=this.Ae;y!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;a!=null?a=a.toString():a="",y!==a&&(this.ec=a,this.v(),this.g("text",y,a),this.Uc=!0)}},textAlign:{get:function(){return this.da!==null?this.da.Or:"start"},set:function(a){var y=this.textAlign;y===a||a!=="start"&&a!=="end"&&a!=="left"&&a!=="right"&&a!=="center"||(Ac(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Fn},set:function(a){var y=this.flip;y!==a&&(Ac(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ra},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Ac(this),this.da.Yr=a,tl(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Xn.alloc();Mv(this,this.ec,999999,a);var y=a.width;Xn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Is(this.dc,y,a)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",y,a))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;y!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",y,a))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(a){var y=(this.l&8388608)!==0;y!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",y,a))}},wrap:{get:function(){return this.da!==null?this.da.$r:kv},set:function(a){var y=this.wrap;y!==a&&(Ac(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Av},set:function(a){var y=this.overflow;y!==a&&(Ac(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Tf(a,"TextBlock.stroke"),a instanceof po&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return mg(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("editable",y,a))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(a){var y=this.textEditor;y!==a&&(Ac(this),this.da.Qr=a,this.g("textEditor",y,a))}},errorFunction:{get:function(){return this.da!==null?this.da.Hd:null},set:function(a){var y=this.errorFunction;y!==a&&(Ac(this),this.da.Hd=a,this.g("errorFunction",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Zc),this.fa.Tk=a,this.v();var x=this.panel;x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Zc),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Zc),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedFunction:{get:function(){return this.fa!==null?this.fa.F:null},set:function(a){var y=this.graduatedFunction;y!==a&&(this.fa===null&&(this.fa=new Zc),this.fa.F=a,this.v(),this.g("graduatedFunction",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Zc),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}},textValidation:{get:function(){return this.da!==null?this.da.vj:null},set:function(a){var y=this.textValidation;y!==a&&(Ac(this),this.da.vj=a,this.g("textValidation",y,a))}},textEdited:{get:function(){return this.da!==null?this.da.Pr:null},set:function(a){var y=this.textEdited;y!==a&&(Ac(this),this.da.Pr=a,this.g("textEdited",y,a))}},spacingAbove:{get:function(){return this.da!==null?this.da.Dr:0},set:function(a){var y=this.spacingAbove;y!==a&&(Ac(this),this.da.Dr=a,this.v(),this.g("spacingAbove",y,a))}},spacingBelow:{get:function(){return this.da!==null?this.da.Er:0},set:function(a){var y=this.spacingBelow;y!==a&&(Ac(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:vg},set:function(a){var y=this.formatting;y!==a&&(Ac(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&Ln(a,"> 0",To,"maxLines"),Ac(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var Rm=null,Bm=null,Tv=new En(To,"None",0),b1=new En(To,"WrapFit",1),kv=new En(To,"WrapDesiredSize",2),C1=new En(To,"WrapBreakAll",3),Av=new En(To,"OverflowClip",0),Fm=new En(To,"OverflowEllipsis",1),vg=new En(To,"FormatTrim",0),P1=new En(To,"FormatNone",0),xx=/[ \u200b\u00ad]/,Nv=new Si,_1=0,jm=new Si,Ov=0,yg="...",E1="",ml=null,zm=!1;To.className="TextBlock";function Iv(){this.nc=!1,this.Hd=null,this.Xf=Fn,this.gq=vg,this.Jq=1/0,this.$q=Av,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ra,this.$r=kv}Iv.prototype.copy=function(){var a=new Iv;return a.Hd=this.Hd,a.Xf=this.Xf,a.gq=this.gq,a.Jq=this.Jq,a.$q=this.$q,a.Dr=this.Dr,a.Er=this.Er,a.Or=this.Or,a.Pr=this.Pr,a.Qr=this.Qr,a.vj=this.vj,a.Yr=this.Yr,a.$r=this.$r,a},To.getEllipsis=function(){return yg},To.setEllipsis=function(a){yg=a,jm=new Si,Ov=0},To.getBaseline=function(){return Rm},To.setBaseline=function(a){Rm=a},To.getUnderline=function(){return Bm},To.setUnderline=function(a){Bm=a},To.isValidFont=function(a){if(zm||(ml=ys?new Du(null).context:null,zm=!0),ml===null)return!0;var y=ml.font;if(a===y||a==="10px sans-serif")return!0;ml.font="10px sans-serif",ml.font=a;var x=ml.font;if(x!=="10px sans-serif")return ml.font=y,!0;ml.font="19px serif";var b=ml.font;return ml.font=a,x=ml.font,ml.font=y,x!==b},To.FormatNone=P1,To.FormatTrim=vg,To.None=Tv,To.OverflowClip=Av,To.OverflowEllipsis=Fm,To.WrapBreakAll=C1,To.WrapDesiredSize=kv,To.WrapFit=b1;function Zc(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Zc.prototype.copy=function(){var a=new Zc;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Zc.className="GradElementSettings";function vl(a,y){nn.call(this),this.Eg=null,this.qo="",this.Xg=uo,this.Nk=Un,this.Zg=this.Hd=null,this.Mk=jr,this.Xf=Fn,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var mp;qe(vl,nn),vl.prototype.cloneProtected=function(a){nn.prototype.cloneProtected.call(this,a),a.qo=this.qo,a.element=this.Eg,a.Xg=this.Xg.J(),a.Nk=this.Nk,a.Xf=this.Xf,a.Hd=this.Hd,a.Zg=this.Zg,a.Mk=this.Mk.J(),a.en=this.en,a.rl=this.rl},vl.prototype.qb=function(a){a===Fn||a===mi||a===Rr?this.imageStretch=a:nn.prototype.qb.call(this,a)},vl.prototype.toString=function(){return"Picture("+this.source+")#"+Dr(this)};function vp(a){a===void 0&&(a=""),a!==""?mp[a]&&(delete mp[a],Hm--):(mp=new Si,Hm=0)}function L1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null)for(var ae=ne.length,fe=0;fe<ae;fe++)te=ne[fe],E.Xn.add(te),te.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),te.Zg!==null&&te.Zg(te,x))}y.Bg.clear()}a.desiredSize.w()||(ea(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null){E=ne.length,te=Gn();for(var ae=0;ae<E;ae++)te.push(ne[ae]);if(y.hn)for(ae=0;ae<E;ae++)ne=te[ae],ne.Hd!==null&&ne.Hd(ne,x);ti(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}vl.prototype.hA=function(){if(this.source!==""){vp(this.source);var a=this.source;this.source="",this.source=a}},vl.prototype.redraw=function(){this.N(),this.Uc=!0},vl.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof Qd)){var E=a instanceof Hl;b=this.naturalBounds;var te=0,ne=0,ae=this.qn,fe=ae?+x.width:x.naturalWidth;if(ae=ae?+x.height:x.naturalHeight,fe===void 0&&x.videoWidth&&(fe=x.videoWidth),ae===void 0&&x.videoHeight&&(ae=x.videoHeight),fe=fe||b.width,ae=ae||b.height,fe!==0&&ae!==0){var _e=fe,Te=ae;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,fe=this.Xg.width,ae=this.Xg.height);var je=fe,Ve=ae,Qe=this.Nk,it=this.Mk;switch(Qe){case Fn:if(this.sourceRect.w())break;je>=b.width&&(te=te+it.offsetX+(je*it.x-b.width*it.x)),Ve>=b.height&&(ne=ne+it.offsetY+(Ve*it.y-b.height*it.y)),fe=Math.min(b.width,je),ae=Math.min(b.height,Ve);break;case Un:je=b.width,Ve=b.height;break;case mi:case Rr:Qe===mi?(Qe=Math.min(b.height/Ve,b.width/je),je*=Qe,Ve*=Qe):Qe===Rr&&(Qe=Math.max(b.height/Ve,b.width/je),je*=Qe,Ve*=Qe,je>=b.width&&(te=(te+it.offsetX+(je*it.x-b.width*it.x)/je)*fe),Ve>=b.height&&(ne=(ne+it.offsetY+(Ve*it.y-b.height*it.y)/Ve)*ae),fe*=1/(je/b.width),ae*=1/(Ve/b.height),je=b.width,Ve=b.height)}Qe=this.Df()*y.scale;var ct=je*Qe*Ve*Qe,Dt=fe*ae/ct,Lt=x.__goCache;Qe=null;var Gt=wx;if(!E){if(x.sq&&Lt!==void 0&&4<ct&&Dt>Gt*Gt)for(Lt.gi===null&&(T1(Lt,4,_e,Te,x),T1(Lt,16,_e,Te,x)),E=Lt.gi,_e=E.length,Te=0;Te<_e&&E[Te].ratio*E[Te].ratio<Dt;Te++)Qe=E[Te];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new Du(null).context;try{E.drawImage(this.Eg,0,0)}catch(Zt){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Zt){this.vl=!0}}if(this.vl)return}}switch(E=je<b.width?it.offsetX+(b.width*it.x-je*it.x):0,it=Ve<b.height?it.offsetY+(b.height*it.y-Ve*it.y):0,this.flip){case Zr:a.translate(Math.min(b.width,je),0),a.scale(-1,1);break;case wr:a.translate(0,Math.min(b.height,Ve)),a.scale(1,-1);break;case bo:a.translate(Math.min(b.width,je),Math.min(b.height,Ve)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Lt!==void 0&&Qe!==null&&Qe.ratio!==1){a.save(),y=Qe.ratio;try{a.drawImage(Qe.source,te/y,ne/y,Math.min(Qe.source.width,fe/y),Math.min(Qe.source.height,ae/y),E,it,Math.min(b.width,je),Math.min(b.height,Ve)),a instanceof Hl&&(this.bt=[te/y,ne/y,Math.min(Qe.source.width,fe/y),Math.min(Qe.source.height,ae/y),E,it,Math.min(b.width,je),Math.min(b.height,Ve)])}catch(Zt){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,fe,ae,E,it,Math.min(b.width,je),Math.min(b.height,Ve)),a instanceof Hl&&(this.bt=[te,ne,fe,ae,E,it,Math.min(b.width,je),Math.min(b.height,Ve)])}catch(Zt){this.en=!1}switch(this.flip){case Zr:a.scale(-1,1),a.translate(-Math.min(b.width,je),0);break;case wr:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ve));break;case bo:a.scale(-1,-1),a.translate(-Math.min(b.width,je),-Math.min(b.height,Ve))}}}}},vl.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=gl(this,!0),ne=this.Eg,ae=this.qn,fe=0,_e=0;(ae||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(fe=ae?+ne.width:ne.naturalWidth,_e=ae?+ne.height:ne.naturalHeight),isFinite(E.width)||te===Un||te===_i?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=fe)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:fe),isFinite(E.height)||te===Un||te===Bi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=_e)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:_e),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,te=this.minSize,x=Math.max(x||0,te.width),b=Math.max(b||0,te.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Is(this.dc,a,y),this.Ge(0,0,a,y)},vl.prototype.eh=function(a,y,x,b){Ya(this,a,y,x,b)},Ye.Object.defineProperties(vl.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||Nt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Jp(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Nn),b!==null&&x&&sd(b,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(ea(this,!1),this.v())):x&&L1(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=mp;if(ys){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Hm&&(vp(),x=mp),b=sn("img"),b.hn=!0,L1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Hm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new M1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),vl.prototype.redraw=vl.prototype.redraw,vl.prototype.reloadSource=vl.prototype.hA;var Hm=0,wx=4;vl.className="Picture",mp=new Si,vl.clearCache=vp;function M1(){this.gi=null}function T1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new Du(null),ne=te.context,ae=1/y;te.width=x/y,te.height=b/y,te.width!==0&&te.height!==0&&(y=new k1(te.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(ae*x,0,0,ae*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}M1.className="PictureCacheArray";function k1(a,y){this.source=a,this.ratio=y}k1.className="PictureCacheInstance";function yp(){this.os=new Yn,this.mc=null}yp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Yn,this.mc=null};function Sp(a,y,x,b,E,te){a.mc=new Vs,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=te||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function bx(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}yp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Vr(Ms);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},yp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Vr(wo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Ih(a,y,x,b,E,te,ne){var ae;ae===void 0&&(ae=!1);var fe=new Vr(ga);fe.point1X=y,fe.point1Y=x,fe.point2X=b,fe.point2Y=E,fe.endX=te,fe.endY=ne,ae&&fe.close(),a.mc.segments.add(fe)}function Um(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new Vr(dl);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}yp.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var ae=new Vr(cs);ae.startAngle=a,ae.sweepAngle=y,ae.centerX=x,ae.centerY=b,ae.radiusX=E,ae.radiusY=te!==0?te:E,ne&&ae.close(),this.mc.segments.add(ae)};function Cx(a,y,x,b,E,te,ne,ae){var fe;fe===void 0&&(fe=!1),y=new Vr(Cl,ne,ae,y,x,b,E,te),fe&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Gm;return y!==null?(Gm=null,y.reset(a),y):(y=new yp,y.reset(a),y)}var Gm=null;yp.className="StreamGeometryContext";function Ha(a,y){var x=a.toLowerCase(),b=on.Ze;b[a]=y,b[x]=a}Ha("Rectangle",function(a,y,x){a="r"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Yn(Yn.u),b.endX=y,b.endY=x,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),Ha("Square",function(a,y,x){a="s"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Yn(Yn.u),b.endX=y,b.endY=x,b.defaultStretch=mi,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),Ha("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=on.Mf[b];if(E!==void 0)return E;var te=a*on.wg;return E=new Yn().add(new Vs(a,0,!0).add(new Vr(wo,y-a,0)).add(new Vr(ga,y,a,y-te,0,y,te)).add(new Vr(wo,y,x-a)).add(new Vr(ga,y-a,x,y,x-te,y-te,x)).add(new Vr(wo,a,x)).add(new Vr(ga,0,x-a,te,x,0,x-te)).add(new Vr(wo,0,a)).add(new Vr(ga,a,0,0,te,te,0).close())),1<te&&(E.spot1=new vi(0,0,te,te),E.spot2=new vi(1,1,-te,-te)),on.Nf<on.vm&&(on.Mf[b]=E,on.Nf++),E}),Ha("Border","RoundedRectangle"),Ha("Ellipse",function(a,y,x){a="e"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Yn(Yn.F),b.endX=y,b.endY=x,b.spot1=Yl,b.spot2=Bl,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),Ha("Circle",function(a,y,x){a="c"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Yn(Yn.F),b.endX=y,b.endY=x,b.spot1=Yl,b.spot2=Bl,b.defaultStretch=mi,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),Ha("TriangleRight",function(a,y,x){return new Yn().add(new Vs(0,0).add(new Vr(wo,y,.5*x)).add(new Vr(wo,0,x).close())).pm(0,.25,.5,.75)}),Ha("TriangleDown",function(a,y,x){return new Yn().add(new Vs(0,0).add(new Vr(wo,y,0)).add(new Vr(wo,.5*y,x).close())).pm(.25,0,.75,.5)}),Ha("TriangleLeft",function(a,y,x){return new Yn().add(new Vs(y,x).add(new Vr(wo,0,.5*x)).add(new Vr(wo,y,0).close())).pm(.5,.25,1,.75)}),Ha("TriangleUp",function(a,y,x){return new Yn().add(new Vs(y,x).add(new Vr(wo,0,x)).add(new Vr(wo,.5*y,0).close())).pm(.25,.5,.75,1)}),Ha("Triangle","TriangleUp"),Ha("Diamond",function(a,y,x){return new Yn().add(new Vs(.5*y,0).add(new Vr(wo,0,.5*x)).add(new Vr(wo,.5*y,x)).add(new Vr(wo,y,.5*x).close())).pm(.25,.25,.75,.75)}),Ha("LineH",function(a,y,x){return a=new Yn(Yn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Ha("LineV",function(a,y,x){return a=new Yn(Yn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Ha("None","Rectangle"),Ha("BarH","Rectangle"),Ha("BarV","Rectangle"),Ha("MinusLine","LineH"),Ha("PlusLine",function(a,y,x){return new Yn().add(new Vs(0,x/2,!1).add(new Vr(wo,y,x/2)).add(new Vr(Ms,y/2,0)).add(new Vr(wo,y/2,x)))}),Ha("XLine",function(a,y,x){return new Yn().add(new Vs(0,x,!1).add(new Vr(wo,y,0)).add(new Vr(Ms,0,0)).add(new Vr(wo,y,x)))}),Ha("LineRight",function(a,y,x){return new Yn().add(new Vs(.25*y,0,!1).add(new Vr(wo,.75*y,.5*x)).add(new Vr(wo,.25*y,x)))}),Ha("LineDown",function(a,y,x){return new Yn().add(new Vs(0,.25*x,!1).add(new Vr(wo,.5*y,.75*x)).add(new Vr(wo,y,.25*x)))}),Ha("LineLeft",function(a,y,x){return new Yn().add(new Vs(.75*y,0,!1).add(new Vr(wo,.25*y,.5*x)).add(new Vr(wo,.75*y,x)))}),Ha("LineUp",function(a,y,x){return new Yn().add(new Vs(0,.75*x,!1).add(new Vr(wo,.5*y,.25*x)).add(new Vr(wo,y,.75*x)))}),on.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Dv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Ho,this.ir=null,this.jr="",this.lr=oo,this.Gq="",this.Hq=Xs,this.Pq=Hr,this.Kq=ts,this.Up=null,this.Cq=127,this.zr=Ao,this.yr="gray",this.Vg=4}Dv.prototype.copy=function(){var a=new Dv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function Mi(a,y){a===void 0||a instanceof sa||typeof a=="string"?Wn.call(this,a):(Wn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new Mt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new kn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}qe(Mi,Wn),Mi.prototype.cloneProtected=function(a){Wn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},rt=Mi.prototype,rt.Af=function(a){Wn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},rt.toString=function(){var a=Bn(this.constructor)+"#"+Dr(this);return this.data!==null&&(a+="("+li(this.data)+")"),a};function yl(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}rt.th=function(){Wn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},rt.gk=function(a,y,x,b,E,te,ne){var ae=this.diagram;ae!==null&&(a===vs&&y==="elements"?E instanceof Wn?qd(E,function(fe){ly(ae.partManager,fe),Zd(ae,fe)}):sd(ae,E):a===ds&&y==="elements"&&(E instanceof Wn?qd(E,function(fe){uy(ae.partManager,fe,ae)}):Jp(ae,E)),ae.cb(a,y,x,b,E,te,ne))},rt.La=function(a){if(Wn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E instanceof Wn&&qd(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Mi.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Mi.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Mi.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new ci),y.Tf!==a&&(y.category=a),b.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},Mi.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Mi.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Gn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);ti(y)}},Mi.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}e:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof ir?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof qr))break e;Ru(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Wn.Link),x.adornedObject=y)}if(x!==null){x.type===Wn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Px(this,a),y=this.adornments;y.next();)y.value.La()}},Mi.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Rv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Px(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Wm(a){if(cd(a)===!1){Fv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function N1(a){if(a.G|=2097152,cd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=kn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),kn.free(b),Fv(a,!1)}}Mi.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new yr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},Mi.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=jr;this.locationSpot.sb()&&(te=this.locationSpot);var ne=Mt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,te),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),te=y.panel;te!==null&&te!==this;)te.Lb!==null&&te.Lb.Ga(ne),ne.offset(-te.measuredBounds.x,-te.measuredBounds.y),te=te.panel;else ne.yi(y,x,b,E,te);a.rotate(this.Kb,ne.x,ne.y),Mt.free(ne)}},Mi.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Mi.prototype.moveTo=function(a,y,x){a=Mt.allocAt(a,y),this.move(a,x),Mt.free(a)},Mi.prototype.isVisible=function(){if(!this.visible)return!1;var a=this.layer;if(a!==null){if(!a.visible)return!1;if(a=a.diagram,a!==null&&a.animationManager.fv(this))return!0}return a=this.containingGroup,!!(a===null||a.isSubGraphExpanded&&a.isVisible())},Mi.prototype.Zb=function(a){var y=this.diagram;a?(this.C(4),this.Wb(),y!==null&&y.De.add(this)):(this.C(8),this.Ej()),this.oh(),y!==null&&(y.Ya(),y.N())},Mi.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new ci),y.I(a)!==null)return y.I(a);var x=Wn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Dh(a,y,x,b){b===void 0&&(b=new Mt),x=x.Mc()?jr:x;var E=y.naturalBounds;if(b.h(E.width*x.x+x.offsetX,E.height*x.y+x.offsetY),y===null||y===a)return b;for(y.transform.Ga(b),y=y.panel;y!==null&&y!==a;)y.transform.Ga(b),y=y.panel;return a.Lb!==null&&a.Lb.Ga(b),b.offset(-a.uc.x,-a.uc.y),b}Mi.prototype.mi=function(a){return a===void 0&&(a=new kn),a.assign(this.actualBounds)},Mi.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=Mt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof gr?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function nf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=c1(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var te=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,te+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?te+=a.x:(b+=a.x,te-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,te+2,y+2),x}Mi.prototype.arrange=function(){if(nl(this)===!1)N1(this);else{Hc(this,!1);var a=this.Ib,y=kn.alloc();y.assign(a);var x=hd(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;D1(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||on.B(y.width,a.width)&&on.B(y.height,a.height)||0<=this.vw&&this.C(16),kn.free(y),Fv(this,!1)}},rt=Mi.prototype,rt.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=kn.alloc();E.assign(x.documentBounds),E.Fv(x.padding),a.x>E.x&&a.y>E.y&&a.right<E.right&&a.bottom<E.bottom&&y.x>E.x&&y.y>E.y&&y.right<E.right&&y.bottom<E.bottom&&(b=!0),kn.free(E)}!(this.G&65536)&&a.D(y)||F1(this,b,x),x.N(),!a.w()&&!y.w()||Sa(a,y)||(this instanceof oi&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},rt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&I1(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new Mt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),cd(this)===!1&&nl(this)===!1&&(Wm(this),N1(this)),!0};function I1(a,y,x,b,E){y===null||a instanceof qr||(y=y.animationManager,y.zb&&Pl(y,a,new Mt(b,E),x))}rt.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;cd(this)||nl(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}Wm(this)},rt.Av=function(){this.G&=-2097153,Wm(this)};function D1(a,y,x){var b=O1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?R1(a,y,x,E,b):B1(a,y,x,E,b):te?R1(a,y,x,E,b):ne&&B1(a,y,x,E,b),a.G|=2097152,Mt.free(b),a.Uk()}function R1(a,y,x,b,E){var te=y.x,ne=y.y;y.h(x.x-E.x,x.y-E.y),b!==null&&(x=b.animationManager,(b=x.defaultAnimation.isAnimating)||!x.zb||a instanceof qr||Pl(x,a,new Mt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new Mt(te,ne),y.copy()))}function B1(a,y,x,b,E){var te=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(te)||b===null||a.g("location",te,x.copy())}function F1(a,y,x){jv(a,!1),a instanceof oi&&Mh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?hd(a)?(_o(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}rt.si=function(){return!0},rt.Zc=function(){return!0},rt.ph=function(){return!1},rt.Dd=function(){return!0};function Bv(a,y,x,b){y.constructor===a.constructor||H1||(H1=!0,Dn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Dn(" Old class: "+Bn(a.constructor)+", new class: "+Bn(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var te=a.isSelected,ne=a.isHighlighted,ae=!0,fe=!0,_e=!1;a instanceof oi&&(ae=a.isTreeLeaf,fe=a.isTreeExpanded,_e=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=te?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof oi&&(a.U=ae?a.U|4:a.U&-5,a.U=fe?a.U|1:a.U&-2,a.U=_e?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}Mi.prototype.canCopy=function(){if(!this.copyable)return!1;var a=this.layer;return a===null?!0:a.allowCopy?(a=a.diagram,a===null?!0:!!a.allowCopy):!1},Mi.prototype.canDelete=function(){if(!this.deletable)return!1;var a=this.layer;return a===null?!0:a.allowDelete?(a=a.diagram,a===null?!0:!!a.allowDelete):!1},Mi.prototype.canEdit=function(){if(!this.textEditable)return!1;var a=this.layer;return a===null?!0:a.allowTextEdit?(a=a.diagram,a===null?!0:!!a.allowTextEdit):!1},Mi.prototype.canGroup=function(){if(!this.groupable)return!1;var a=this.layer;return a===null?!0:a.allowGroup?(a=a.diagram,a===null?!0:!!a.allowGroup):!1},Mi.prototype.canMove=function(){if(!this.movable)return!1;var a=this.layer;return a===null?!0:a.allowMove?(a=a.diagram,a===null?!0:!!a.allowMove):!1},Mi.prototype.canReshape=function(){if(!this.reshapable)return!1;var a=this.layer;return a===null?!0:a.allowReshape?(a=a.diagram,a===null?!0:!!a.allowReshape):!1},Mi.prototype.canResize=function(){if(!this.resizable)return!1;var a=this.layer;return a===null?!0:a.allowResize?(a=a.diagram,a===null?!0:!!a.allowResize):!1},Mi.prototype.canRotate=function(){if(!this.rotatable)return!1;var a=this.layer;return a===null?!0:a.allowRotate?(a=a.diagram,a===null?!0:!!a.allowRotate):!1},Mi.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function cd(a){return(a.G&32768)!==0}function Fv(a,y){a.G=y?a.G|32768:a.G&-32769}function jv(a,y){a.G=y?a.G|65536:a.G&-65537}function hd(a){return(a.G&131072)!==0}rt=Mi.prototype,rt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Zm(a,y){a.G=y?a.G|1048576:a.G&-1048577}rt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},rt.N=function(){var a=this.diagram;a!==null&&!nl(this)&&!cd(this)&&this.isVisible()&&this.Ib.w()&&a.N(nf(this,this.Ib))},rt.v=function(){Wn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof oi&&this.labeledLink!==null&&tl(this.labeledLink),a.$b(!0))},rt.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},rt.Wo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},rt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},rt.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof oi&&(y=y.labeledLink,y!==null)?zv(a,y):0}rt.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof oi&&(x=y.labeledLink,x!==null)?j1(a,x):y}rt.Td=function(a){return a instanceof ir?Hv(this,this,a):!1};function Hv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Hv(a,b,x)?y instanceof oi&&(y=y.labeledLink,y!==null)?Hv(a,y,x):!1:!0}rt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof ir&&Zm(y,!0),y instanceof oi){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof oi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof ir&&Zm(y,!1),y instanceof oi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Mi.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof oi&&this.isLinkLabel)},Mi.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof oi&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function dd(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof qr)){if(a.add(y),y instanceof oi){if(x&&y instanceof ir)for(var ne=y.memberParts;ne.next();)dd(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var ae=ne.value;if(!a.contains(ae)){var fe=ae.fromNode,_e=ae.toNode;fe=fe===null||a.contains(fe),_e=_e===null||a.contains(_e),(E?fe&&_e:fe||_e)&&dd(a,ae,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)dd(a,y.value,x,b-1,E,te)}else if(y instanceof $n)for(y=y.labelNodes;y.next();)dd(a,y.value,x,b,E,te)}}Ye.Object.defineProperties(Mi.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?tr:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var b=y.pc(-1,this,!0);if(0<=b&&x.cb(ds,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(vs,"parts",a,null,this,!0,b),b=this.layerChanged,b!==null){var E=x.aa;x.aa=!0,b(this,y,a),x.aa=E}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(yl(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&Nu(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof qr?this.type!==Wn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:Hr},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),yl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:ts},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),yl(this),this.P.Kq=a,this.g("maxLocation",y,a))}},locationObjectName:{get:function(){return this.P!==null?this.P.Gq:""},set:function(a){var y=this.locationObjectName;y!==a&&(yl(this),this.P.Gq=a,this.nf=null,this.v(),this.g("locationObjectName",y,a))}},locationSpot:{get:function(){return this.P!==null?this.P.Hq:Xs},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),yl(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,nl(this)===!1&&(Wm(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var te=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),I1(this,E,x,te.x,te.y),this.g("position",te,x.copy())}}y=!0}y&&this.g("location",b,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,b=this.data,E=null;if(x!==null&&b!==null&&!(this instanceof qr)){var te=x.model.undoManager;te.isEnabled&&!te.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof qr?this instanceof qr&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(te=x.model,te.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Ru(x),x=x.copy(),x!==null&&Bv(this,x,y,a))):(te!==null&&te.jm(b,a),x=dS(x.partManager,b,a),x!==null&&(Ru(x),x=x.copy(),x===null||x instanceof $n||(b=this.location.copy(),Bv(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){Bv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(yl(this),this.P.oq=a,this.g("highlightedChanged",y,a))}},selectionObjectName:{get:function(){return this.P!==null?this.P.vr:""},set:function(a){var y=this.selectionObjectName;y!==a&&(yl(this),this.P.vr=a,this.Ug=null,this.g("selectionObjectName",y,a))}},selectionAdornmentTemplate:{get:function(){return this.P!==null?this.P.tr:null},set:function(a){var y=this.selectionAdornmentTemplate;y!==a&&(yl(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof $n?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(yl(this),this.P.ur=a,this.g("selectionChanged",y,a))}},resizeAdornmentTemplate:{get:function(){return this.P!==null?this.P.fr:null},set:function(a){var y=this.resizeAdornmentTemplate;y!==a&&(yl(this),this.P.fr=a,this.g("resizeAdornmentTemplate",y,a))}},resizeObjectName:{get:function(){return this.P!==null?this.P.hr:""},set:function(a){var y=this.resizeObjectName;y!==a&&(yl(this),this.P.hr=a,this.g("resizeObjectName",y,a))}},resizeObject:{get:function(){var a=this.resizeObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},resizeCellSize:{get:function(){return this.P!==null?this.P.gr:Ho},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),yl(this),this.P.gr=a,this.g("resizeCellSize",y,a))}},rotateAdornmentTemplate:{get:function(){return this.P!==null?this.P.ir:null},set:function(a){var y=this.rotateAdornmentTemplate;y!==a&&(yl(this),this.P.ir=a,this.g("rotateAdornmentTemplate",y,a))}},rotateObjectName:{get:function(){return this.P!==null?this.P.jr:""},set:function(a){var y=this.rotateObjectName;y!==a&&(yl(this),this.P.jr=a,this.g("rotateObjectName",y,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},rotationSpot:{get:function(){return this.P!==null?this.P.lr:oo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),yl(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&Nt("Cannot make a Group a member of itself: "+this.toString()),Nt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Kv(y,this):this instanceof ir&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof ir&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var te=E.wa(a!==null?a.data:null);E.mp(b,te)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof ir){for(x=new Nn,dd(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof oi)for(b=b.linksConnected;b.next();)xp(b.value)}if(this instanceof oi){for(x=this.linksConnected;x.next();)xp(x.value);x=this.labeledLink,x!==null&&xp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Nu(y,-1,a))}}else Nt("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(yl(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof oi&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(yl(this),this.P.Cq=a,this.g("layoutConditions",y,a))}},dragComputation:{get:function(){return this.P!==null?this.P.Up:null},set:function(a){var y=this.dragComputation;y!==a&&(yl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Ao},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),yl(this),this.P.zr=a,this.N(),this.g("shadowOffset",y,a))}},shadowColor:{get:function(){return this.P!==null?this.P.yr:"gray"},set:function(a){var y=this.shadowColor;y!==a&&(yl(this),this.P.yr=a,this.N(),this.g("shadowColor",y,a))}},shadowBlur:{get:function(){return this.P!==null?this.P.Vg:4},set:function(a){var y=this.shadowBlur;y!==a&&(yl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Mi.prototype.invalidateLayout=Mi.prototype.C,Mi.prototype.findCommonContainingGroup=Mi.prototype.px,Mi.prototype.isMemberOf=Mi.prototype.Td,Mi.prototype.findTopLevelPart=Mi.prototype.sz,Mi.prototype.findSubGraphLevel=Mi.prototype.oz,Mi.prototype.ensureBounds=Mi.prototype.Va,Mi.prototype.getDocumentBounds=Mi.prototype.mi,Mi.prototype.findObject=Mi.prototype.fb,Mi.prototype.moveTo=Mi.prototype.moveTo,Mi.prototype.invalidateAdornments=Mi.prototype.Wb,Mi.prototype.clearAdornments=Mi.prototype.Ej,Mi.prototype.removeAdornment=Mi.prototype.Jf,Mi.prototype.addAdornment=Mi.prototype.bh,Mi.prototype.findAdornment=Mi.prototype.Pj,Mi.prototype.updateTargetBindings=Mi.prototype.La;var H1=!1;Mi.className="Part",Mi.LayoutNone=0,Mi.LayoutAdded=1,Mi.LayoutRemoved=2,Mi.LayoutShown=4,Mi.LayoutHidden=8,Mi.LayoutNodeSized=16,Mi.LayoutGroupLayout=32,Mi.LayoutNodeReplaced=64,Mi.LayoutStandard=127,Mi.LayoutAll=16777215;function qr(a,y){a===void 0||a instanceof sa||typeof a=="string"?Mi.call(this,a):(Mi.call(this),a&&(y=a)),this.G&=-257,this.Jg="Adornment",this.ue=null,this.Aw=0,this.Uw=!1,this.j=this.$a=null,y&&Object.assign(this,y)}qe(qr,Mi),qr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},qr.prototype.updateRelationshipsFromData=function(){},qr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof $n&&y instanceof gr){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;b<y;b++){var E=x[b];E.isPanelMain&&E instanceof gr&&(E.ua=a)}}},qr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!nl(a))},qr.prototype.Zc=function(){return!1},qr.prototype.gk=function(a,y,x,b,E,te,ne){if(a===vs&&y==="elements"){if(E instanceof rl)this.$a===null&&(this.$a=E);else if(E instanceof Wn){var ae=E.Nl(function(fe){return fe instanceof rl});ae instanceof rl&&this.$a===null&&(this.$a=ae)}}else a===ds&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Wn&&this.$a.rg(b)&&(this.$a=null));Mi.prototype.gk.call(this,a,y,x,b,E,te,ne)},qr.prototype.updateAdornments=function(){},qr.prototype.Lj=function(){},Ye.Object.defineProperties(qr.prototype,{placeholder:{get:function(){return this.$a}},adornedObject:{get:function(){return this.ue},set:function(a){var y=this.adornedPart,x=null;a!==null&&(x=a.part),y===null||a!==null&&y===x||y.Jf(this.category),this.ue=a,x!==null&&x.bh(this.category,this)}},adornedPart:{get:function(){var a=this.ue;return a!==null?a.part:null}},containingGroup:{get:function(){return null}}}),qr.className="Adornment";function Uv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=xl,this.er=$m,this.Kr=this.ij=this.Nq=this.Mq=null}Uv.prototype.copy=function(){var a=new Uv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function oi(a,y){a===void 0||a instanceof sa||typeof a=="string"?Mi.call(this,a):(Mi.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Rn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}qe(oi,Mi),oi.prototype.cloneProtected=function(a){Mi.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},rt=oi.prototype,rt.Af=function(a){Mi.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Rh(a){a.Ba===null?a.Ba=new Uv:a.Ba.nc&&(a.Ba=a.Ba.copy())}rt.th=function(){Mi.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new Nn),a.af.add(y))}function G1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var te=E.value;if(te.Ds===a&&te.cv===y&&te.Ox===x&&te.Px===b||te.Ds===y&&te.cv===a&&te.Ox===b&&te.Px===x)return te}return null}rt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=G1(this,a,y,x),a!==null&&a.Sl()},rt.gk=function(a,y,x,b,E,te,ne){a===vs&&y==="elements"?this.wc=null:a===ds&&y==="elements"&&(this.wc=null),Mi.prototype.gk.call(this,a,y,x,b,E,te,ne)},rt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ul(x.fromPort),Ul(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ul(x.fromPort),Ul(x.toPort),x.bb())}}function Ul(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ul(y.port)}}rt.si=function(){return!0},oi.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},oi.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},oi.prototype.isVisible=function(){if(!Mi.prototype.isVisible.call(this))return!1;var a=!0,y=kh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===kh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Qs){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===op&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},oi.prototype.Zb=function(a){Mi.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},oi.prototype.qx=function(){var a=new Nn,y=new Nn;return Z1(this,this,a,y),y.iterator};function Z1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,te=a.diagram;te!==null&&(E=te.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&Z1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}oi.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Hi(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},rt=oi.prototype,rt.Mo=function(a){a===void 0&&(a=null);var y=new Hi(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},rt.Sd=function(a){a===void 0&&(a=null);var y=new Hi(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},rt.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):tr},rt.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):tr},rt.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):tr},rt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Hi(this.jb),E=this;return b.predicate=function(te){return!((te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)&&(te.fromNode!==a||te.toNode!==E||x!==null&&te.fromPortId!==x||y!==null&&te.toPortId!==y))},b},rt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Hi(this.jb),E=this;return b.predicate=function(te){return!(te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)},b};function Km(a,y,x){Ul(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=te)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,te=b?x:y,E.ci||(E.ci=te),!te.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===te&&(te.isTreeLeaf=!1):y===te&&(te.isTreeLeaf=!1))))}function Vm(a,y,x){Ul(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var te=a.linkDisconnected;if(E=a.diagram,te!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),te(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):Sg(y)))}function Sg(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}oi.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},rt=oi.prototype,rt.Vo=function(a){Mi.prototype.Vo.call(this,a),a||(Sg(this),a=this.Yk,a!==null&&eS(a,this))},rt.Wo=function(a){Mi.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},rt.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,Mi.prototype.Lj.call(this)},rt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;K1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function K1(a){a.wc===null?a.wc=new ci:a.wc.clear(),a.qm(a,function(y,x){V1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function V1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Gv(a,y,x){var b=y.portId;if(b!==null&&(a.wc!==null&&a.wc.remove(b),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(b);a.next();)b=a.value,x===null&&(x=Gn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);ti(x)}}}rt.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var b=x.jb.iterator;b.next();){var E=b.value;if(E.isTreeLink&&(y=E.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,b=x.jb.iterator;b.next()&&(E=b.value,!E.isTreeLink||(y=E.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},rt.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink&&(a=b.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(b=x.value,!b.isTreeLink||(a=b.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},rt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Zm(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)Zm(y,!1),y=y.pg();return x},rt.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},rt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof oi)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},rt.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new Nn;return a(this,y),y},rt.uz=function(){return $1(this,this)};function $1(a,y){return y=y.pg(),y===null?0:1+$1(a,y)}rt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Hi(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},rt.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Rn,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Rn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Fi(x):tr},rt.wz=function(a){a===void 0&&(a=1/0);var y=new Nn;return dd(y,this,!1,a,!0),y},oi.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Nn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===kh),y.Ue=!1}};function Y1(a,y,x,b,E,te,ne){if(1<b)for(var ae=x?a.Mo():a.Sd();ae.next();){var fe=ae.value;fe.isTreeLink&&(fe=fe.To(a),fe===null||fe===a||y.contains(fe)||(y.add(fe),Y1(fe,y,x,b-1,E,te,ne)))}else X1(a,y,x,E,te,ne)}function X1(a,y,x,b,E,te){for(var ne=E===a?!0:a.isTreeExpanded,ae=x?a.Mo():a.Sd(),fe={};ae.next();){var _e=ae.value;if(_e.isTreeLink&&(_e=_e.To(a),_e!==null&&_e!==a)){var Te=y.contains(_e);if(Te||y.add(_e),ne){var je=x?_e.Oo():_e.Po();fe.uv=a,je.all(function(Ve){return function(Qe){return Qe===Ve.uv||!Qe.isTreeExpanded}}(fe))&&b.Aj(_e,E),_e.oh(),_e.Zb(!1)}_e.isTreeExpanded&&(_e.wasTreeExpanded=_e.isTreeExpanded,Te||X1(_e,y,x,b,E,te))}fe={uv:fe.uv}}a.isTreeExpanded=!1}oi.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Nn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===kh),y.Ue=!1}};function J1(a,y,x,b,E,te,ne){for(var ae=te===a?!1:a.isTreeExpanded,fe=x?a.Mo():a.Sd(),_e={};fe.next();){var Te=fe.value;if(Te.isTreeLink&&(ae||Te.fd||Te.bb(),Te=Te.To(a),Te!==null&&Te!==a&&!y.contains(Te))){if(y.add(Te),!ae){Te.Zb(!0),Te.oh();var je=x?Te.Oo():Te.Po();_e.vv=a,je.all(function(Ve){return function(Qe){return Qe===Ve.vv||!Qe.isTreeExpanded}}(_e))&&E.Cj(Te,te)}(2<b||Te.wasTreeExpanded)&&(Te.wasTreeExpanded=!1,J1(Te,y,x,b-1,E,te,ne))}_e={vv:_e.vv}}a.isTreeExpanded=!0}Ye.Object.defineProperties(oi.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:$m},set:function(a){var y=this.portSpreading;y!==a&&(Rh(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&Mh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:xl},set:function(a){typeof a=="number"&&(a=new Li(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Rh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Mh(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(Rh(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(Rh(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(Rh(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,te=x.model;if(E!==null&&te.ri()){var ne=te.wa(b);ne!==void 0&&te.Qx(E,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(eS(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),tl(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&K1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(Rh(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),oi.prototype.expandTree=oi.prototype.expandTree,oi.prototype.collapseTree=oi.prototype.collapseTree,oi.prototype.findTreeParts=oi.prototype.wz,oi.prototype.findTreeChildrenNodes=oi.prototype.Ou,oi.prototype.findTreeChildrenLinks=oi.prototype.Qo,oi.prototype.findTreeLevel=oi.prototype.uz,oi.prototype.findTreeParentChain=oi.prototype.vz,oi.prototype.findTreeParentNode=oi.prototype.pg,oi.prototype.findTreeParentLink=oi.prototype.kh,oi.prototype.findCommonTreeParent=oi.prototype.gz,oi.prototype.findTreeRoot=oi.prototype.xz,oi.prototype.isInTreeOf=oi.prototype.Nz,oi.prototype.findPort=oi.prototype.ns,oi.prototype.findLinksTo=oi.prototype.kz,oi.prototype.findLinksBetween=oi.prototype.jz,oi.prototype.findNodesInto=oi.prototype.Oo,oi.prototype.findNodesOutOf=oi.prototype.Po,oi.prototype.findNodesConnected=oi.prototype.Mu,oi.prototype.findLinksInto=oi.prototype.Sd,oi.prototype.findLinksOutOf=oi.prototype.Mo,oi.prototype.findExternalTreeLinksConnected=oi.prototype.qx,oi.prototype.invalidateConnectedLinks=oi.prototype.Bd,oi.prototype.invalidateLinkBundle=oi.prototype.Lz;var _x=new En(oi,"SpreadingNone",10),$m=new En(oi,"SpreadingEvenly",11),Wv=new En(oi,"SpreadingPacked",12);oi.className="Node",oi.SpreadingNone=_x,oi.SpreadingEvenly=$m,oi.SpreadingPacked=Wv;function ir(a,y){a===void 0||a instanceof sa||typeof a=="string"?oi.call(this,a):(oi.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Nn,this.$a=null,this.Sc=new es,this.Sc.group=this,this.gl=new Nn,this.tb=this.$p=null,y&&Object.assign(this,y)}qe(ir,oi),ir.prototype.cloneProtected=function(a){oi.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof rl});y instanceof rl?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},rt=ir.prototype,rt.Af=function(a){oi.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof oi)x.Bd(y);else if(x instanceof $n)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},rt.gk=function(a,y,x,b,E,te,ne){if(a===vs&&y==="elements"){if(E instanceof rl)this.$a===null?this.$a=E:this.$a!==E&&Nt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Wn){var ae=E.Nl(function(fe){return fe instanceof rl});ae instanceof rl&&(this.$a===null?this.$a=ae:this.$a!==ae&&Nt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===ds&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Wn&&this.$a.rg(b)&&(this.$a=null));oi.prototype.gk.call(this,a,y,x,b,E,te,ne)},rt.Xl=function(a,y){oi.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Wn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Wn&&(a=a.Pb()),this.tb===null&&(this.tb=new kn),a.mi(this.tb),a instanceof gr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},rt.eh=function(a,y,x,b){this.nf=this.$a,oi.prototype.eh.call(this,a,y,x,b)},rt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof $n||y.Va()}),oi.prototype.Va.call(this)},rt.si=function(){if(!oi.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof oi){if(y.isVisible()&&nl(y))return!1}else if(y instanceof $n&&y.isVisible()&&nl(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof ir&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof $n&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Kv(a,y){if(a.Gn.remove(y)){y instanceof ir&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof $n&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}rt.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}oi.prototype.Lj.call(this)},ir.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Tn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},ir.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=Tn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},ir.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},rt=ir.prototype,rt.Bd=function(a){var y=(this.U&65536)!==0;if(oi.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(Ul(x.fromPort),Ul(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Ul(x.fromPort),Ul(x.toPort),x.bb()))}}},rt.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new Nn,b=y.iterator;b.next();){var E=b.value;if(E instanceof oi)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},rt.iz=function(){var a=this.Rj();a.add(this);for(var y=new Nn,x=a.iterator;x.next();){var b=x.value;if(b instanceof oi)for(b=b.linksConnected;b.next();){var E=b.value,te=E.fromNode;te===null||a.contains(te)&&te!==this||y.add(te),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},rt.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new Nn;return a(this,y),y},rt.Rj=function(){var a=new Nn;return dd(a,this,!0,0,!0),a.remove(this),a},rt.Zb=function(a){oi.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},ir.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!1),te instanceof ir&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof oi)te.Bd(y),x.Aj(te,b);else if(te instanceof $n)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}ir.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();q1(this,y,a,this),a.Ue=!1}};function q1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!0),te instanceof ir&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof oi)te.Bd(y),x.Cj(te,b);else if(te instanceof $n)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}ir.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,b=x.x;x=x.y;var E=a.x,te=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===te||isNaN(x)&&isNaN(te))){for(b=E-(isNaN(b)?0:b),x=te-(isNaN(x)?0:x),te=Mt.alloc(),oi.prototype.move.call(this,a,y),a=new Nn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof $n&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof oi&&E.isLinkLabel)){var ne=E.position,ae=E.location;ne.w()?(te.x=ne.x+b,te.y=ne.y+x,E.position=te):ae.w()&&(te.x=ae.x+b,te.y=ae.y+x,E.location=te)}for(y.reset();y.next();)E=y.value,E instanceof $n&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(ne=E.position,te.x=ne.x+b,te.y=ne.y+x,te.w()?E.move(te):E.bb(),$v(E)&&E.bb());Mt.free(te)}},Ye.Object.defineProperties(ir.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&Nt("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(Rh(this),this.Ba.Mq=a,this.g("memberAdded",y,a))}},memberRemoved:{get:function(){return this.Ba!==null?this.Ba.Nq:null},set:function(a){var y=this.memberRemoved;y!==a&&(Rh(this),this.Ba.Nq=a,this.g("memberRemoved",y,a))}},memberValidation:{get:function(){return this.Ba!==null?this.Ba.ij:null},set:function(a){var y=this.memberValidation;y!==a&&(Rh(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(E){E.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(Rh(this),this.Ba.Kr=a,this.g("subGraphExpandedChanged",y,a))}},rh:{get:function(){return(this.U&32768)!==0},set:function(a){(this.U&32768)!==0!==a&&(this.U^=32768)}}}),ir.prototype.expandSubGraph=ir.prototype.expandSubGraph,ir.prototype.collapseSubGraph=ir.prototype.collapseSubGraph,ir.prototype.findSubGraphParts=ir.prototype.Rj,ir.prototype.findContainingGroupChain=ir.prototype.hz,ir.prototype.findExternalNodesConnected=ir.prototype.iz,ir.prototype.findExternalLinksConnected=ir.prototype.Lu,ir.prototype.ensureBounds=ir.prototype.Va,ir.className="Group";function rl(a){nn.call(this),this.yb=xa,this.ko=new kn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}qe(rl,nn),rl.prototype.cloneProtected=function(a){nn.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},rl.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Lo(0,0,y.width,y.height,a.x,a.y)},rl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof ir||a instanceof qr)||Nt("Placeholder is not inside a Group or Adornment."),a instanceof ir){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Is(b,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Mt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Mt.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,te=a.adornedObject;a.angle=te.li();var ne=0;te instanceof gr&&(ne=te.strokeWidth);var ae=te.Df(),fe=te.naturalBounds,_e=(fe.width+ne)*ae;ne=(fe.height+ne)*ae,a.type!==Wn.Link&&(ae=te.ga(a.category==="Selection"?Xs:a.locationSpot,Mt.alloc()),a.location=ae,Mt.free(ae)),isNaN(_e)||isNaN(ne)?(a=te.ga(Xs,Mt.alloc()),_e=kn.allocAt(a.x,a.y,0,0),_e.Ye(te.ga(Na,a)),_e.Ye(te.ga(wl,a)),_e.Ye(te.ga(Ia,a)),Is(y,_e.width+b||0,_e.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Mt.free(a),kn.free(_e)):(Is(y,_e+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},rl.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},rl.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof ir&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=kn.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof ir&&!y.isSubGraphExpanded?a.h(E.x-te.left,E.y-te.top,0,0):a.h(E.x-te.left,E.y-te.top,Math.max(E.width+te.left+te.right,0),Math.max(E.height+te.top+te.bottom,0)),kn.free(x),b&&y instanceof ir&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},rl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof ir))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,te=-1/0,ne=y.memberParts;ne.next();){var ae=ne.value;if(ae.isVisible()){if(ae instanceof $n&&(!y.computesBoundsIncludingLinks||iu(ae)||ae.fromNode===y||ae.toNode===y))continue;ae=ae.actualBounds,ae.left<x&&(x=ae.left),ae.top<b&&(b=ae.top),ae.right>E&&(E=ae.right),ae.bottom>te&&(te=ae.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,te-b):(y=y.location,a.h(y.x,y.y,0,0)),a},Ye.Object.defineProperties(rl.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Li(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),rl.className="Placeholder";function $n(a){Mi.call(this,Wn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=ol,this.Om=0,this.Qm=ol,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new Rn().freeze(),this.Tg=this.Mg=null,this.ml=new kn,this.ua=new Yn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Mt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}qe($n,Mi),$n.prototype.cloneProtected=function(a){Mi.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},rt=$n.prototype,rt.Af=function(a){Mi.prototype.Af.call(this,a),this.ff=a.ff,this.vf=a.vf,a.Mg=null,a.bb(),a.Sf=this.Sf;var y=a.fromPort;y!==null&&Ul(y),a=a.toPort,a!==null&&Ul(a)},rt.qb=function(a){a.classType===$n?(a.value&2)===2?this.routing=a:a===ou||a===Fh||a===bp?this.curve=a:a===bg||a===e0||a===t0?this.adjusting=a:a!==Jv&&a!==ol&&Nt("Unknown Link enum value for a Link property: "+a):Mi.prototype.qb.call(this,a)},rt.Xc=function(){this.ba===null&&(this.ba=new lg)},rt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),nl(a)||cd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),nl(a)||cd(a)))},rt.zv=function(){return!1},rt.Av=function(){},rt.Zc=function(){return!1},$n.prototype.computeAngle=function(a,y,x){return $n.computeAngle(y,x)},$n.computeAngle=function(a,y){switch(a){default:case ol:a=0;break;case Cg:a=y;break;case Pg:a=y+90;break;case _g:a=y-90;break;case Qv:a=y+180;break;case n0:a=on.bp(y),90<a&&270>a&&(a-=180);break;case Eg:a=on.bp(y+90),90<a&&270>a&&(a-=180);break;case Lg:a=on.bp(y-90),90<a&&270>a&&(a-=180);break;case i0:if(a=on.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return on.bp(a)};function xp(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&Kv(x,a),a.Ah=y,y!==null&&Zv(y,a);var E=a.containingGroupChanged;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=te)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}rt=$n.prototype,rt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Mi.prototype.oh.call(this)},rt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},rt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new Nn),a.wd.add(y),a.v()}rt.Vo=function(a){if(Mi.prototype.Vo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Km(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Km(x,this,b)}xg(this)}},rt.Wo=function(a){if(Mi.prototype.Wo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Vm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Vm(x,this,b)}wg(this)}},rt.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},$n.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},$n.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?Mi.prototype.move.call(this,a,!1):(a=Mt.allocAt(x.x+b,x.y+E),Mi.prototype.move.call(this,a,!1),Mt.free(a)),Bh(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},$n.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},$n.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},$n.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(ss),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ou))return this.ua.Pu(.5,a),a.add(this.i(0)),x=this.ua.figures.first(),a.offset(-x.startX,-x.startY),a;if(this.computeCurve()===ou){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return on.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var te=this.i(x+2);x=this.i(x+3),on.ax(b.x,b.y,E.x,E.y,te.x,te.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=te=b=0;b<x/2&&te<y&&(E=ne[te],!(b+E>x/2));)b+=E,te++;return y=this.i(te),te=this.i(te+1),1>Math.abs(y.x-te.x)?y.y>te.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-te.y)?y.x>te.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(te.x-y.x),y.y+x*(te.y-y.y))),a},$n.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ou))return this.ua.wx(.5);if(this.computeCurve()===ou&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var b=this.i(x+2);return x=this.i(x+3),on.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var te;E<b/2&&x<a&&(te=y[x],!(E+te>b/2));)E+=te,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},rt=$n.prototype,rt.i=function(a){return this.Nb.s[a]},rt.dd=function(a,y){this.Nb.cd(a,y)},rt.L=function(a,y,x){this.Nb.cd(a,new Mt(y,x))},rt.Kz=function(a,y){this.Nb.Gb(a,y)},rt.m=function(a,y,x){this.Nb.Gb(a,new Mt(y,x))},rt.ne=function(a){this.Nb.add(a)},rt.yf=function(a,y){this.Nb.add(new Mt(a,y))},rt.pv=function(a){this.Nb.mb(a)},rt.Fj=function(){this.Nb.clear()};function Bh(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var b=a.fd,E=new Rn,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new Mt(ne.x+y,ne.y+x).freeze())}E.freeze(),te=a.Nb,a.Nb=E,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),tl(a)),b?Ym(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&jo(ne.animationManager,a,E),a.g("points",te,E)}}rt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},rt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];x=Math.min(ae.x,x),b=Math.min(ae.y,b)}ae=ne=1/0;for(var fe=y.s,_e=fe.length,Te=0;Te<_e;Te++){var je=fe[Te];ne=Math.min(je.x,ne),ae=Math.min(je.y,ae),je.freeze()}if(y.freeze(),_e===te){for(te=0;te<_e;te++)if(Te=E[te],je=fe[te],Te.x-x!==je.x-ne||Te.y-b!==je.y-ae){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&jo(x.animationManager,this,y),Ym(this),this.g("points",a,y)}},rt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Ym(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),qm(a,!1))}rt.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},rt.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},$n.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Nf||(Nf=new oi,Nf.desiredSize=ar,Nf.Va()),this.defaultFromPoint&&(Nf.location=this.defaultFromPoint,Nf.Va(),y=a=Nf)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var b=this.toNode,E=null;if(b===null?(Of||(Of=new oi,Of.desiredSize=ar,Of.Va()),this.defaultToPoint&&(Of.location=this.defaultToPoint,Of.Va(),E=b=Of)):E=this.toPort,E===null||b.isVisible()||(x=b.findVisibleNode(),x!==null&&x!==b?(b=x,E=x.port):b=x),this.Mw=b,b===null||!b.location.w())return!1;for(;!(E===null||E.actualBounds.w()&&E.Ed());)E=E.panel;if(E===null)return!1;var te=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var ae=wp(ne),fe=wp(x),_e=y===E&&y!==null,Te=this.isOrthogonal,je=this.curve===ou;this.Wf=_e&&!Te?je=!0:!1;var Ve=this.computeAdjusting()===ol||_e;if(!Te&&!_e&&ae&&fe){if(ae=!1,!Ve&&3<=te&&(Ve=this.getLinkPoint(a,y,ne,!0,!1,b,E),fe=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=this.adjustPoints(0,Ve,te-1,fe))&&(Ve=this.getLinkPoint(a,y,ne,!0,!1,b,E),fe=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Ve,te-1,fe)),!ae)if(this.Fj(),je){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),Ve=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=Ve.x-te.x,fe=Ve.y-te.y,_e=this.computeCurviness(),je=Te=0;var Qe=te.x+ae/3,it=te.y+fe/3,ct=Qe,Dt=it;on.B(fe,0)?Dt=0<ae?Dt-_e:Dt+_e:(Te=-ae/fe,je=Math.sqrt(_e*_e/(Te*Te+1)),0>_e&&(je=-je),ct=(0>fe?-1:1)*je+Qe,Dt=Te*(ct-Qe)+it),Qe=te.x+2*ae/3,it=te.y+2*fe/3;var Lt=Qe,Gt=it;on.B(fe,0)?Gt=0<ae?Gt-_e:Gt+_e:(Lt=(0>fe?-1:1)*je+Qe,Gt=Te*(Lt-Qe)+it),this.Fj(),this.ne(te),this.yf(ct,Dt),this.yf(Lt,Gt),this.ne(Ve),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else te=b,Ve=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,Ve),E=this.getLinkPoint(te,Ve,x,!1,!1,a,y),this.hasCurviness()?(Ve=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+Ve/2,y=b.y+x/2,te=a,ae=y,on.B(x,0)?ae=0<Ve?ae-ne:ae+ne:(Ve=-Ve/x,te=Math.sqrt(ne*ne/(Ve*Ve+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,ae=Ve*(te-a)+y),this.ne(b),this.yf(te,ae),this.ne(E)):(this.ne(b),this.ne(E),ae=kn.alloc(),y.mi(ae),fe=ae.ca(E),Ve.mi(ae),_e=ae.ca(b),(fe||_e)&&(ne=y.ga(Jm(ne),new Mt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ve.ga(Jm(x),new Mt),this.dd(1,this.getLinkPointFromPoint(te,Ve,x,b,!1,x))),kn.free(ae))}else{je=this.isAvoiding,Ve&&(Te&&je||_e)&&this.Fj();var Zt=_e?this.computeCurviness():0;je=this.getLinkPoint(a,y,ne,!0,Te,b,E),Qe=ct=it=0,(Te||!ae||_e)&&(Dt=this.computeEndSegmentLength(a,y,ne,!0),Qe=this.getLinkDirection(a,y,je,ne,!0,Te,b,E),_e&&(ae||ne.D(x)||!Te&&ne.x+x.x===1&&ne.y+x.y===1)&&(Qe-=Te?90:30,0>Zt&&(Qe-=180)),0>Qe?Qe+=360:360<=Qe&&(Qe-=360),_e&&(Dt+=Math.abs(Zt)*(Te?1:2)),Qe===0?it=Dt:Qe===90?ct=Dt:Qe===180?it=-Dt:Qe===270?ct=-Dt:(it=Dt*Math.cos(Qe*Math.PI/180),ct=Dt*Math.sin(Qe*Math.PI/180)),ne.Mc()&&_e&&(Dt=y.ga(jr,Mt.alloc()),Lt=Mt.allocAt(Dt.x+1e3*it,Dt.y+1e3*ct),this.getLinkPointFromPoint(a,y,Dt,Lt,!0,je),Mt.free(Dt),Mt.free(Lt))),Dt=this.getLinkPoint(b,E,x,!1,Te,a,y);var Vt=Gt=Lt=0;if(Te||!fe||_e){var qt=this.computeEndSegmentLength(b,E,x,!1);Vt=this.getLinkDirection(b,E,Dt,x,!1,Te,a,y),_e&&(fe||ne.D(x)||!Te&&ne.x+x.x===1&&ne.y+x.y===1)&&(Vt+=Te?0:30,0>Zt&&(Vt+=180)),0>Vt?Vt+=360:360<=Vt&&(Vt-=360),_e&&(qt+=Math.abs(Zt)*(Te?1:2)),Vt===0?Lt=qt:Vt===90?Gt=qt:Vt===180?Lt=-qt:Vt===270?Gt=-qt:(Lt=qt*Math.cos(Vt*Math.PI/180),Gt=qt*Math.sin(Vt*Math.PI/180)),x.Mc()&&_e&&(x=E.ga(jr,Mt.alloc()),ne=Mt.allocAt(x.x+1e3*Lt,x.y+1e3*Gt),this.getLinkPointFromPoint(b,E,x,ne,!1,Dt),Mt.free(x),Mt.free(ne))}x=je,(Te||!ae||_e)&&(x=new Mt(je.x+it,je.y+ct)),ne=Dt,(Te||!fe||_e)&&(ne=new Mt(Dt.x+Lt,Dt.y+Gt)),!Ve&&!Te&&ae&&3<te&&this.adjustPoints(0,je,te-2,ne)?this.dd(te-1,Dt):!Ve&&!Te&&fe&&3<te&&this.adjustPoints(1,x,te-1,Dt)?this.dd(0,je):!Ve&&(Te?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,je),this.dd(te-1,Dt)):(this.Fj(),this.ne(je),(Te||!ae||_e)&&this.ne(x),Te&&this.addOrthoPoints(x,Qe,ne,Vt,a,b),(Te||!fe||_e)&&this.ne(ne),this.ne(Dt))}return!0};function Vv(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}$n.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new Mt),a===null||y===null)return te.assign(x),te;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var ne=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*E;var ae=-a.m12*E,fe=-a.m21*E,_e=a.m11*E,Te=E*(a.m21*a.dy-a.m22*a.dx),je=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*fe+Te,b=b.x*ae+b.y*_e+je,ne=x.x*ne+x.y*fe+Te,x=x.x*ae+x.y*_e+je}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function Xm(a,y){var x=y.Zn;return x===null&&(x=new If,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}$n.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,ae){if(ae===void 0&&(ae=new Mt),x.sb()&&!wp(x))return y.ga(x,ae),ae;if(x.$c()){var fe=Xm(this,y);if(fe!==null){if(ae.assign(fe.Zo),E&&this.routing===nS){var _e=Xm(this,ne);if(_e!==null&&fe.Gl<_e.Gl){fe=Mt.alloc(),_e=Mt.alloc();var Te=new kn(y.ga(Xs,fe),y.ga(Na,_e)),je=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,je,!b,E,a,y,_e),(x.Hf(_u)||x.Hf(Wa))&&a.y>=Te.y&&a.y<=Te.y+Te.height?ae.y=a.y:(x.Hf($l)||x.Hf(Za))&&a.x>=Te.x&&a.x<=Te.x+Te.width&&(ae.x=a.x),Mt.free(fe),Mt.free(_e)}}return ae}}return x=y.ga(Jm(x),Mt.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Vv(x,ne.copy()))):(fe=this.computeSpot(!b,ne),te=Mt.alloc(),ne=ne.ga(Jm(fe),te),E&&(ne=Vv(x,ne)),Mt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,ae),Mt.free(x),ae},$n.prototype.getLinkDirection=function(a,y,x,b,E,te,ne,ae){e:if(b.sb())var fe=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(fe=Xm(this,y),fe!==null))switch(fe.Nc){case 1:fe=270;break e;case 2:fe=180;break e;default:case 4:fe=0;break e;case 8:fe=90;break e}fe=y.ga(jr,Mt.alloc()),this.pointsCount>(te?6:2)?(ae=E?this.i(1):this.i(this.pointsCount-2),ae=te?Vv(fe,ae.copy()):x):(x=Mt.alloc(),ae=ae.ga(jr,x),Mt.free(x)),x=Math.abs(ae.x-fe.x)>Math.abs(ae.y-fe.y)?ae.x>=fe.x?0:180:ae.y>=fe.y?90:270,Mt.free(fe),fe=x}return b.Mc()&&ne.Td(a)&&(fe+=180,360<=fe&&(fe-=360)),wp(b)||(a=y.li(),a===0)||(45<=a&&135>a?fe+=90:135<=a&&225>a?fe+=180:225<=a&&315>a&&(fe+=270),360<=fe&&(fe-=360)),fe},$n.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Xm(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},$n.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=jr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===oo?ms:y)):(a=y||this.toPort,a===null?a=jr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===oo?ms:y)),a};function wp(a){return a===ms||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:jr}$n.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==ol&&4<this.pointsCount?this.computeMidPoint(new Mt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(jr))},$n.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},$n.prototype.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=yr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&yr.free(ne),!0;if(this.Yc(a,ne)){var ae=!1;if(!this.isAtomic)for(var fe=this.O.s,_e=fe.length;_e--;){var Te=fe[_e];if(Te.visible||Te===this.locationObject){var je=Te.actualBounds,Ve=this.naturalBounds;if(!(je.x>Ve.width||je.y>Ve.height||0>je.x+je.width||0>je.y+je.height)){if(je=yr.alloc(),je.set(ne),Te instanceof Wn)ae=Te.Cf(a,y,x,b,E,je);else if(this.path===Te){if(Te instanceof gr)if(ae=a,Ve=b,Te.pickable===!1)ae=!1;else if(je.multiply(Te.transform),Ve)e:{var Qe=ae,it=je;if(Te.fh(Qe,it))ae=!0;else{if(it===void 0&&(it=Te.transform,Qe.Re(Te.actualBounds))){ae=!0;break e}ae=Qe.left,Ve=Qe.right;var ct=Qe.top;Qe=Qe.bottom;var Dt=Mt.alloc(),Lt=Mt.alloc(),Gt=Mt.alloc(),Zt=yr.alloc();Zt.set(it),Zt.bv(Te.transform),Zt.Vj(),Lt.x=Ve,Lt.y=ct,Lt.transform(Zt),Dt.x=ae,Dt.y=ct,Dt.transform(Zt),it=!1,tf(Te,Dt,Lt,Gt)?it=!0:(Dt.x=Ve,Dt.y=Qe,Dt.transform(Zt),tf(Te,Dt,Lt,Gt)?it=!0:(Lt.x=ae,Lt.y=Qe,Lt.transform(Zt),tf(Te,Dt,Lt,Gt)?it=!0:(Dt.x=ae,Dt.y=ct,Dt.transform(Zt),tf(Te,Dt,Lt,Gt)&&(it=!0)))),yr.free(Zt),Mt.free(Dt),Mt.free(Lt),Mt.free(Gt),ae=it}}else ae=Te.fh(ae,je)}else ae=ca(Te,a,b,je);ae&&(Ve=Te,y!==null&&(Ve=y(Te)),Ve&&(x===null||x(Ve))&&E.add(Ve)),yr.free(je)}}}return te===void 0&&yr.free(ne),ae||this.background!==null||this.areaBackground!==null}return te===void 0&&yr.free(ne),!1},$n.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?ou:this.curve},$n.prototype.computeCorner=function(){if(this.curve===ou)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},$n.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},$n.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,te=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+te.left+te.right;E=isNaN(E.height)?14:E.height*b.scale+te.top+te.bottom,b=b.segmentOrientation,b===Cg||b===n0||b===Qv?a=Math.max(a,E):b===_g||b===Lg||b===Pg||b===Eg?a=Math.max(a,ne):(y=y.ga(jr).ab(x.ga(jr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===ou&&(a*=1.333)}}return a},$n.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===ol&&x.bb()}},$n.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iS;var y=this.Sf;if(y!==null){for(var x=Gn(),b=0,E=y.links,te=0;te<E.length;te++){var ne=E[te].computeSpacing();x.push(ne),b+=ne}for(b=-b/2,te=0;te<E.length;te++){if(E[te]===this){a=b+x[te]/2;break}b+=x[te]}y.Ds===this.fromNode&&(a=-a),ti(x)}}return a},$n.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},$n.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},$n.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===e0)return!1;E===t0&&(E=bg)}switch(E){case e0:var te=this.i(a),ne=this.i(x);if(!te.Xa(y)||!ne.Xa(b)){E=te.x,te=te.y;var ae=ne.x-E,fe=ne.y-te,_e=Math.sqrt(ae*ae+fe*fe);if(!on.$(_e,0)){if(on.$(ae,0))var Te=0>fe?-Math.PI/2:Math.PI/2;else Te=Math.atan(fe/Math.abs(ae)),0>ae&&(Te=Math.PI-Te);ne=y.x;var je=y.y;ae=b.x-ne;var Ve=b.y-je;for(fe=Math.sqrt(ae*ae+Ve*Ve),on.$(ae,0)?Ve=0>Ve?-Math.PI/2:Math.PI/2:(Ve=Math.atan(Ve/Math.abs(ae)),0>ae&&(Ve=Math.PI-Ve)),_e=fe/_e,Te=Ve-Te,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),ae=y.x-E,fe=y.y-te,y=Math.sqrt(ae*ae+fe*fe),on.$(y,0)||(on.$(ae,0)?fe=0>fe?-Math.PI/2:Math.PI/2:(fe=Math.atan(fe/Math.abs(ae)),0>ae&&(fe=Math.PI-fe)),ae=fe+Te,y*=_e,this.L(a,ne+y*Math.cos(ae),je+y*Math.sin(ae)));this.dd(x,b)}}return!0;case t0:if(te=this.i(a),je=this.i(x),!te.Xa(y)||!je.Xa(b)){E=te.x,te=te.y,ne=je.x,je=je.y,_e=(ne-E)*(ne-E)+(je-te)*(je-te),ae=y.x,Te=y.y,fe=b.x,Ve=b.y;var Qe=1;if(fe-ae!==0){var it=(Ve-Te)/(fe-ae);Qe=Math.sqrt(1+1/(it*it))}else it=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ct=y.x,Dt=y.y,Lt=.5;_e!==0&&(Lt=((E-ct)*(E-ne)+(te-Dt)*(te-je))/_e);var Gt=E+Lt*(ne-E),Zt=te+Lt*(je-te);y=Math.sqrt((ct-Gt)*(ct-Gt)+(Dt-Zt)*(Dt-Zt)),Dt<it*(ct-Gt)+Zt&&(y=-y),0<it&&(y=-y),ct=ae+Lt*(fe-ae),Lt=Te+Lt*(Ve-Te),it!==0?(y=ct+y/Qe,this.L(a,y,Lt-(y-ct)/it)):this.L(a,ct,Lt+y)}this.dd(x,b)}return!0;case bg:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),ae=te.x,Te=te.y,je=ae,_e=Te,on.B(E.y,te.y)?on.B(te.x,ne.x)?Te=y.y:on.B(te.y,ne.y)&&(ae=y.x):on.B(E.x,te.x)&&(on.B(te.y,ne.y)?ae=y.x:on.B(te.x,ne.x)&&(Te=y.y)),this.L(a+1,ae,Te),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),ae=te.x,Te=te.y,fe=ae,Ve=Te,on.B(E.y,te.y)?on.B(te.x,ne.x)?Te=b.y:on.B(te.y,ne.y)&&(ae=b.x):on.B(E.x,te.x)&&(on.B(te.y,ne.y)?ae=b.x:on.B(te.x,ne.x)&&(Te=b.y)),this.L(x-1,ae,Te),$v(this))){this.L(a+1,je,_e),this.L(x-1,fe,Ve),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},$n.prototype.addOrthoPoints=function(a,y,x,b,E,te){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var ne=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var ae=E.actualBounds.copy(),fe=te.actualBounds.copy();if(ae.w()&&fe.w()){ae.Bc(Mg,Mg),fe.Bc(Mg,Mg),ae.Ye(a),fe.Ye(x);var _e=Mt.alloc(),Te=Mt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&fe.right>a.x||b===90&&x.y>a.y&&fe.right>a.x?(_e.h(x.x,a.y),Te.h(x.x,(a.y+x.y)/2),b===180?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Te.x=_e.x,Te.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(_e.x=a.x<fe.left?this.computeMidOrthoPosition(a.x,a.y,fe.left,x.y,!1):a.x<fe.right&&(b===270&&a.y<fe.top||b===90&&a.y>fe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):fe.right,Te.x=_e.x,Te.y=x.y):b===0&&a.x<fe.left&&a.y>fe.top&&a.y<fe.bottom&&(_e.x=a.x,_e.y=a.y<x.y?Math.min(x.y,fe.top):Math.max(x.y,fe.bottom),Te.y=_e.y)):(_e.h(a.x,x.y),Te.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===180&&(fe.ca(a)||ae.ca(x))?_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?_e.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,fe.bottom),!0):x.y>a.y&&(b===180||b===270)&&(_e.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,fe.top),!0)),Te.x=x.x,Te.y=_e.y),_e.y>ae.top&&_e.y<ae.bottom&&(x.x>=ae.left&&x.x<=a.x||a.x<=fe.right&&a.x>=x.x?(b===90||b===270)&&(_e.h(Math.max((a.x+x.x)/2,a.x),a.y),Te.h(_e.x,x.y)):(_e.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?ae.top:Math.min(ae.top,fe.top)):Math.max(x.y,b===0?ae.bottom:Math.max(ae.bottom,fe.bottom)),Te.x=x.x,Te.y=_e.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&fe.left<a.x||b===90&&x.y>a.y&&fe.left<a.x?(_e.h(x.x,a.y),Te.h(x.x,(a.y+x.y)/2),b===0?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Te.x=_e.x,Te.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(_e.x=a.x>fe.right?this.computeMidOrthoPosition(a.x,a.y,fe.right,x.y,!1):a.x>fe.left&&(b===270&&a.y<fe.top||b===90&&a.y>fe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):fe.left,Te.x=_e.x,Te.y=x.y):b===180&&a.x>fe.right&&a.y>fe.top&&a.y<fe.bottom&&(_e.x=a.x,_e.y=a.y<x.y?Math.min(x.y,fe.top):Math.max(x.y,fe.bottom),Te.y=_e.y)):(_e.h(a.x,x.y),Te.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===0&&(fe.ca(a)||ae.ca(x))?_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?_e.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,fe.bottom),!0):x.y>a.y&&(b===0||b===270)&&(_e.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,fe.top),!0)),Te.x=x.x,Te.y=_e.y),_e.y>ae.top&&_e.y<ae.bottom&&(x.x<=ae.right&&x.x>=a.x||a.x>=fe.left&&a.x<=x.x?(b===90||b===270)&&(_e.h(Math.min((a.x+x.x)/2,a.x),a.y),Te.h(_e.x,x.y)):(_e.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?ae.top:Math.min(ae.top,fe.top)):Math.max(x.y,b===180?ae.bottom:Math.max(ae.bottom,fe.bottom)),Te.x=x.x,Te.y=_e.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&fe.bottom>a.y||b===0&&x.x>a.x&&fe.bottom>a.y?(_e.h(a.x,x.y),Te.h((a.x+x.x)/2,x.y),b===270?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Te.x=x.x,Te.y=_e.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(_e.y=a.y<fe.top?this.computeMidOrthoPosition(a.x,a.y,x.x,fe.top,!0):a.y<fe.bottom&&(b===180&&a.x<fe.left||b===0&&a.x>fe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):fe.bottom,Te.x=x.x,Te.y=_e.y):b===90&&a.y<fe.top&&a.x>fe.left&&a.x<fe.right&&(_e.x=a.x<x.x?Math.min(x.x,fe.left):Math.max(x.x,fe.right),_e.y=a.y,Te.x=_e.x)):(_e.h(x.x,a.y),Te.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===270&&(fe.ca(a)||ae.ca(x))?_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?_e.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,fe.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(_e.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,fe.left),x.y,!1)),Te.x=_e.x,Te.y=x.y),_e.x>ae.left&&_e.x<ae.right&&(x.y>=ae.top&&x.y<=a.y||a.y<=fe.bottom&&a.y>=x.y?(b===0||b===180)&&(_e.h(a.x,Math.max((a.y+x.y)/2,a.y)),Te.h(x.x,_e.y)):(_e.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?ae.left:Math.min(ae.left,fe.left)):Math.max(x.x,b===90?ae.right:Math.max(ae.right,fe.right)),Te.x=_e.x,Te.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&fe.top<a.y||b===0&&x.x>a.x&&fe.top<a.y?(_e.h(a.x,x.y),Te.h((a.x+x.x)/2,x.y),b===90?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Te.x=x.x,Te.y=_e.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(_e.y=a.y>fe.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,fe.bottom,!0):a.y>fe.top&&(b===180&&a.x<fe.left||b===0&&a.x>fe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):fe.top,Te.x=x.x,Te.y=_e.y):b===270&&a.y>fe.bottom&&a.x>fe.left&&a.x<fe.right&&(_e.x=a.x<x.x?Math.min(x.x,fe.left):Math.max(x.x,fe.right),_e.y=a.y,Te.x=_e.x)):(_e.h(x.x,a.y),Te.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===90&&(fe.ca(a)||ae.ca(x))?_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?_e.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,fe.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(_e.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,fe.left),x.y,!1)),Te.x=_e.x,Te.y=x.y),_e.x>ae.left&&_e.x<ae.right&&(x.y<=ae.bottom&&x.y>=a.y||a.y>=fe.top&&a.y<=x.y?(b===0||b===180)&&(_e.h(a.x,Math.min((a.y+x.y)/2,a.y)),Te.h(x.x,_e.y)):(_e.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?ae.left:Math.min(ae.left,fe.left)):Math.max(x.x,b===270?ae.right:Math.max(ae.right,fe.right)),Te.x=_e.x,Te.y=x.y)));var je=x;if(this.isAvoiding){var Ve=this.diagram;if(Ve===null||E===te||this.layer.isTemporary||!tp(Ve)||ae.ca(je)&&!te.Td(E)||fe.ca(a)&&!E.Td(te))y=!1;else{var Qe=np(Ve,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Qe.Yj(Math.min(a.x,_e.x),Math.min(a.y,_e.y),Math.abs(a.x-_e.x),Math.abs(a.y-_e.y))&&Qe.Yj(Math.min(_e.x,Te.x),Math.min(_e.y,Te.y),Math.abs(_e.x-Te.x),Math.abs(_e.y-Te.y))&&Qe.Yj(Math.min(Te.x,je.x),Math.min(Te.y,je.y),Math.abs(Te.x-je.x),Math.abs(Te.y-je.y)))y=!1;else{E=a,te=je;var it=x=null;if(Ve.isVirtualized){Ve=Qe.bounds.copy(),Ve.Bc(-Qe.Ho,-Qe.Go);var ct=Mt.alloc();Cp(Qe,a.x,a.y)||(on.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,a.x,a.y,_e.x,_e.y,ct)?(x=a=ct.copy(),y=ct.ab(_e)):on.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,_e.x,_e.y,Te.x,Te.y,ct)?(x=a=ct.copy(),y=ct.ab(Te)):on.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,Te.x,Te.y,je.x,je.y,ct)&&(x=a=ct.copy(),y=ct.ab(je))),Cp(Qe,je.x,je.y)||(on.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,je.x,je.y,Te.x,Te.y,ct)?(it=je=ct.copy(),b=Te.ab(ct)):on.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,Te.x,Te.y,_e.x,_e.y,ct)?(it=je=ct.copy(),b=_e.ab(ct)):on.Ff(Ve.x,Ve.y,Ve.x+Ve.width,Ve.y+Ve.height,_e.x,_e.y,a.x,a.y,ct)&&(it=je=ct.copy(),b=a.ab(ct))),Mt.free(ct)}ae=ae.copy().ed(fe),ae.Bc(Qe.Ho*Qe.Os,Qe.Go*Qe.Os),sS(Qe,a,y,je,b,ae,!0),fe=Kc(Qe,je.x,je.y),!Qe.abort&&fe>=Pp&&(oS(Qe),ae.Bc(Qe.Ho*Qe.Hx,Qe.Go*Qe.Ix),sS(Qe,a,y,je,b,ae,!1),fe=Kc(Qe,je.x,je.y)),!Qe.abort&&fe<Pp&&Kc(Qe,je.x,je.y)!==jh?(Yv(this,Qe,je.x,je.y,b,!0,ne),ae=this.i(2),4>this.pointsCount?(y===0||y===180?(ae.x=a.x,ae.y=je.y):(ae.x=je.x,ae.y=a.y),this.L(2,ae.x,ae.y),this.m(3,ae.x,ae.y)):(ne=this.i(3),y===0||y===180?on.B(ae.x,ne.x)?(ae=y===0?Math.max(ae.x,a.x):Math.min(ae.x,a.x),this.L(2,ae,a.y),this.L(3,ae,ne.y)):on.B(ae.y,ne.y)?(Math.abs(a.y-ae.y)<=Qe.Go/2&&(this.L(2,ae.x,a.y),this.L(3,ne.x,a.y)),this.m(2,ae.x,a.y)):this.L(2,a.x,ae.y):(y===90||y===270)&&(on.B(ae.y,ne.y)?(ae=y===90?Math.max(ae.y,a.y):Math.min(ae.y,a.y),this.L(2,a.x,ae),this.L(3,ne.x,ae)):on.B(ae.x,ne.x)?(Math.abs(a.x-ae.x)<=Qe.Ho/2&&(this.L(2,a.x,ae.y),this.L(3,a.x,ne.y)),this.m(2,a.x,ae.y)):this.L(2,ae.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),it!==null&&(b===0||b===180?this.yf(te.x,it.y):this.yf(it.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(_e.copy()),this.ne(Te.copy())),Mt.free(_e),Mt.free(Te)}},$n.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var te=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(te=this.computeCurviness()),E?(y+b)/2+te:(a+x)/2+te};function $v(a){if(a.diagram===null||!a.isAvoiding||!tp(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=np(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],te=y[b+1];if(!a.Yj(Math.min(E.x,te.x),Math.min(E.y,te.y),Math.abs(E.x-te.x),Math.abs(E.y-te.y)))return!0}return!1}function Yv(a,y,x,b,E,te,ne){var ae=y.Ho,fe=y.Go,_e=Kc(y,x,b),Te=x,je=b;for(E===0?Te+=ae:E===90?je+=fe:E===180?Te-=ae:je-=fe,E!==ne&&_e>of&&Kc(y,Te,je)!==_e-1&&(Kc(y,x-ae,b)===_e-1?(E=180,Te=x-ae,je=b):Kc(y,x+ae,b)===_e-1?(E=0,Te=x+ae,je=b):Kc(y,x,b-fe)===_e-1?(E=270,Te=x,je=b-fe):Kc(y,x,b+fe)===_e-1&&(E=90,Te=x,je=b+fe));_e>of&&Kc(y,Te,je)===_e-1;)x=Te,b=je,E===0?Te+=ae:E===90?je+=fe:E===180?Te-=ae:je-=fe,--_e;te?_e>of&&(E===180||E===0?x=Math.floor(x/ae)*ae+ae/2:(E===90||E===270)&&(b=Math.floor(b/fe)*fe+fe/2)):(x=Math.floor(x/ae)*ae+ae/2,b=Math.floor(b/fe)*fe+fe/2),_e>of&&(te=E,ne=x,Te=b,E===0?(te=90,Te+=fe):E===90?(te=180,ne-=ae):E===180?(te=270,Te-=fe):E===270&&(te=0,ne+=ae),Kc(y,ne,Te)===_e-1?Yv(a,y,ne,Te,te,!1,te):(ne=x,Te=b,E===0?(te=270,Te-=fe):E===90?(te=0,ne+=ae):E===180?(te=90,Te+=fe):E===270&&(te=180,ne-=ae),Kc(y,ne,Te)===_e-1&&Yv(a,y,ne,Te,te,!1,te))),a.yf(x,b)}$n.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=eo(y,a,x.x,x.y,b.x,b.y),te=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var ae=eo(y,a,b.x,b.y,x.x,x.y);b=x,ae<E&&(te=ne,E=ae)}return te},$n.prototype.qc=function(){this.lk=!1,this.v()},$n.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof gr&&(E.ua=this.ua)}}},$n.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&rf(this)&&b.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(b.animationManager.isAnimating||b.currentTool!==b.toolManager)&&(x=!0);var E=this.i(0).copy(),te=E.copy();b=this.Nb.s;var ne=this.computeCurve();if(ne===ou&&3<=y&&!on.$(this.smoothness,0))if(y===3){var ae=this.i(1);b=Math.min(E.x,ae.x);var fe=Math.min(E.y,ae.y);ae=this.i(2),b=Math.min(b,ae.x),fe=Math.min(fe,ae.y)}else{if(this.isOrthogonal)for(fe=0;fe<y;fe++)ae=b[fe],te.x=Math.min(ae.x,te.x),te.y=Math.min(ae.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),fe=this.i(b),te.x=Math.min(fe.x,te.x),te.y=Math.min(fe.y,te.y);b=te.x,fe=te.y}else{for(fe=0;fe<y;fe++)ae=b[fe],te.x=Math.min(ae.x,te.x),te.y=Math.min(ae.y,te.y);b=te.x,fe=te.y}if(b-=this.su.x,fe-=this.su.y,E.x-=b,E.y-=fe,y!==2||rf(this)){if(a.type=Yn.o,ae=A1(a),this.computeShortLength(!0)!==0&&(E=kf(this,E,!0,te)),Sp(ae,E.x,E.y,!1),ne===ou&&3<=y&&!on.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-fe,E=this.i(2).copy(),E.x-=b,E.y-=fe,this.computeShortLength(!1)!==0&&(E=kf(this,E,!1,te)),Ih(ae,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=Mt.allocAt(b,fe),x=Mt.alloc(),x.assign(this.i(1)),te=Mt.allocAt(b,fe),E=Mt.allocAt(b,fe),ne=this.i(0);for(var _e,Te=this.smoothness/3,je=1;je<this.pointsCount-1;je++){_e=this.i(je);var Ve=ne,Qe=_e,it=this.i(Xv(this,_e,je,!1));if((!on.$(Ve.x,Qe.x)||!on.$(Qe.x,it.x))&&(!on.$(Ve.y,Qe.y)||!on.$(Qe.y,it.y))){var ct=Te;isNaN(ct)&&(ct=this.smoothness/3);var Dt=Ve.x;Ve=Ve.y;var Lt=Qe.x;Qe=Qe.y;var Gt=it.x;it=it.y;var Zt=ct*Qm(Dt,Ve,Lt,Qe);ct*=Qm(Lt,Qe,Gt,it),on.$(Ve,Qe)&&on.$(Lt,Gt)&&(Lt>Dt?it>Qe?(te.x=Lt-Zt,te.y=Qe-Zt,E.x=Lt+ct,E.y=Qe+ct):(te.x=Lt-Zt,te.y=Qe+Zt,E.x=Lt+ct,E.y=Qe-ct):it>Qe?(te.x=Lt+Zt,te.y=Qe-Zt,E.x=Lt-ct,E.y=Qe+ct):(te.x=Lt+Zt,te.y=Qe+Zt,E.x=Lt-ct,E.y=Qe-ct)),on.$(Dt,Lt)&&on.$(Qe,it)&&(Qe>Ve?(Gt>Lt?(te.x=Lt-Zt,te.y=Qe-Zt,E.x=Lt+ct):(te.x=Lt+Zt,te.y=Qe-Zt,E.x=Lt-ct),E.y=Qe+ct):(Gt>Lt?(te.x=Lt-Zt,te.y=Qe+Zt,E.x=Lt+ct):(te.x=Lt+Zt,te.y=Qe+Zt,E.x=Lt-ct),E.y=Qe-ct)),(on.$(Dt,Lt)&&on.$(Lt,Gt)||on.$(Ve,Qe)&&on.$(Qe,it))&&(Dt=.5*(Dt+Gt),Ve=.5*(Ve+it),te.x=Dt,te.y=Ve,E.x=Dt,E.y=Ve),(je===1||je===2&&on.$(ne.x,this.i(0).x)&&on.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+_e.x),x.y=.5*(ne.y+_e.y)),Ih(ae,x.x-b,x.y-fe,te.x-b,te.y-fe,_e.x-b,_e.y-fe),y.set(te),x.set(E),ne=_e}}_e=ne.x,ne=ne.y,Te=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(Te=kf(this,Te.copy(),!1,Ur)),_e=.5*(_e+Te.x),ne=.5*(ne+Te.y),Ih(ae,E.x-b,E.y-fe,_e-b,ne-fe,Te.x-b,Te.y-fe),Mt.free(y),Mt.free(x),Mt.free(te),Mt.free(E)}else for(x=3;x<y;x+=3)te=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=kf(this,ne.copy(),!1,Ur)),Ih(ae,te.x-b,te.y-fe,E.x-b,E.y-fe,ne.x-b,ne.y-fe);else{for(te=Mt.alloc(),te.assign(this.i(0)),E=Mt.alloc(),E.assign(te),ne=this.computeCorner(),je=1,_e=0;je<y;){if(je=Xv(this,te,je,1<je),Te=this.i(je),je>=y-1){if(!te.D(Te))this.computeShortLength(!1)!==0&&(Te=kf(this,Te.copy(),!1,Ur)),Af(this,ae,-b,-fe,te,Te,x);else if(_e===0)for(je=1;je<y;)E.assign(te),Te=this.i(je++),Af(this,ae,-b,-fe,te,Te,x),te.assign(Te);break}if(_e=Xv(this,Te,je+1,je<y-3),je=-b,Dt=-fe,Ve=Te,Lt=this.i(_e),ct=x,on.B(te.y,Ve.y)&&on.B(Ve.x,Lt.x))if(it=Math.min(ne,Math.abs(Ve.x-E.x)/2),it=Zt=Math.min(it,Math.abs(Lt.y-Ve.y)/2),on.B(it,0))Af(this,ae,je,Dt,te,Ve,ct),te.assign(Ve);else{var Vt=Ve.x,qt=Ve.y;Qe=Vt,Gt=qt,Ve.x>te.x?Vt=Ve.x-it:Vt=Ve.x+it,Lt.y>Ve.y?Gt=Ve.y+Zt:Gt=Ve.y-Zt,Lt=Mt.allocAt(Vt,qt),Af(this,ae,je,Dt,te,Lt,ct),Mt.free(Lt),Um(ae,Ve.x+je,Ve.y+Dt,Qe+je,Gt+Dt),te.h(Qe,Gt)}else on.B(te.x,Ve.x)&&on.B(Ve.y,Lt.y)?(it=Math.min(ne,Math.abs(Ve.y-E.y)/2),it=Zt=Math.min(it,Math.abs(Lt.x-Ve.x)/2),on.B(Zt,0)?(Af(this,ae,je,Dt,te,Ve,ct),te.assign(Ve)):(Vt=Ve.x,qt=Ve.y,Qe=Vt,Gt=qt,Ve.y>te.y?qt=Ve.y-it:qt=Ve.y+it,Lt.x>Ve.x?Qe=Ve.x+Zt:Qe=Ve.x-Zt,Lt=Mt.allocAt(Vt,qt),Af(this,ae,je,Dt,te,Lt,ct),Mt.free(Lt),Um(ae,Ve.x+je,Ve.y+Dt,Qe+je,Gt+Dt),te.h(Qe,Gt))):(Af(this,ae,je,Dt,te,Ve,ct),te.assign(Ve));E.assign(Te),je=_e}Mt.free(te)}Gm=ae}else ae=this.i(1).copy(),ae.x-=b,ae.y-=fe,this.computeShortLength(!0)!==0&&(E=kf(this,E,!0,te)),this.computeShortLength(!1)!==0&&(ae=kf(this,ae,!1,te)),a.type=Yn.j,a.startX=E.x,a.startY=E.y,a.endX=ae.x,a.endY=ae.y;return this.lk=!0,a};function Qm(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),on.$(a,0)?y:on.$(y,0)?a:Math.sqrt(a*a+y*y)))}function kf(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var te=a.i(1);if(x=te.x-b.x,te=te.y-b.y,b=Qm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(te-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(te=a.i(E-2),x=te.x-b.x,te=te.y-b.y,b=Qm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-te)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function Xv(a,y,x,b){for(var E=a.pointsCount,te=y;on.$(y.x,te.x)&&on.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!on.$(y.x,te.x)&&!on.$(y.y,te.y))return x-1;for(var ne=te;on.$(y.x,te.x)&&on.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||on.$(y.y,te.y)&&on.$(te.y,ne.y)&&(!b||(y.x>=te.x?te.x>=ne.x:te.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}$n.prototype.computeJumpLength=function(){return 10};function Af(a,y,x,b,E,te,ne){if(!ne&&rf(a)){ne=a.computeJumpLength();var ae=ne/2,fe=[],_e=0;if(a.isVisible()&&(_e=Ex(a,E,te,fe)),0<_e){if(on.B(E.y,te.y))if(E.x<te.x)for(var Te=0;Te<_e;){var je=Math.max(E.x,Math.min(fe[Te++]-ae,te.x-ne));y.lineTo(je+x,te.y+b);for(var Ve=je+x,Qe=Math.min(je+ne,te.x);Te<_e&&(je=fe[Te],je<Qe+ne);)Te++,Qe=Math.min(je+ae,te.x);je=te.y-ne+b,Qe+=x;var it=te.y+b;a.curve===Fh?Sp(y,Qe,it,!1):Ih(y,Ve,je,Qe,je,Qe,it)}else for(--_e;0<=_e;){for(Te=Math.min(E.x,Math.max(fe[_e--]+ae,te.x+ne)),y.lineTo(Te+x,te.y+b),Ve=Te+x,je=Math.max(Te-ne,te.x);0<=_e&&(Te=fe[_e],Te>je-ne);)_e--,je=Math.max(Te-ae,te.x);Te=te.y-ne+b,je+=x,Qe=te.y+b,a.curve===Fh?Sp(y,je,Qe,!1):Ih(y,Ve,Te,je,Te,je,Qe)}else if(on.B(E.x,te.x))if(E.y<te.y)for(Te=0;Te<_e;){for(je=Math.max(E.y,Math.min(fe[Te++]-ae,te.y-ne)),y.lineTo(te.x+x,je+b),Ve=je+b,je=Math.min(je+ne,te.y);Te<_e&&(Qe=fe[Te],Qe<je+ne);)Te++,je=Math.min(Qe+ae,te.y);Qe=te.x-ne+x,it=te.x+x,je+=b,a.curve===Fh?Sp(y,it,je,!1):Ih(y,Qe,Ve,Qe,je,it,je)}else for(--_e;0<=_e;){for(Te=Math.min(E.y,Math.max(fe[_e--]+ae,te.y+ne)),y.lineTo(te.x+x,Te+b),Ve=Te+b,Te=Math.max(Te-ne,te.y);0<=_e&&(je=fe[_e],je>Te-ne);)_e--,Te=Math.max(je-ae,te.y);je=te.x-ne+x,Qe=te.x+x,Te+=b,a.curve===Fh?Sp(y,Qe,Te,!1):Ih(y,je,Ve,je,Te,Qe,Te)}}}y.lineTo(te.x+x,te.y+b)}function Ex(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var te=E.value;if(te!==null&&te.visible){te=te.Pa.s;for(var ne=te.length,ae=0;ae<ne;ae++){var fe=te[ae];if(fe instanceof $n){if(fe===a)return 0<b.length&&b.sort(function(Te,je){return Te-je}),b.length;if(fe.isVisible()&&rf(fe)){var _e=fe.routeBounds;_e.w()&&a.routeBounds.Yc(_e)&&!a.usesSamePort(fe)&&(_e=fe.path,_e!==null&&_e.Ed()&&Lx(y,x,b,fe))}}}}}return 0<b.length&&b.sort(function(Te,je){return Te-je}),b.length}function Lx(a,y,x,b){for(var E=on.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),ae=Mt.alloc(),fe=1;fe<te;fe++){var _e=b.i(fe);if(fe<te-1){var Te=b.i(fe+1);if(ne.y===_e.y&&_e.y===Te.y){if(_e.x>ne.x&&Te.x>=_e.x||_e.x<ne.x&&Te.x<=_e.x)continue}else if(ne.x===_e.x&&_e.x===Te.x&&(_e.y>ne.y&&Te.y>=_e.y||_e.y<ne.y&&Te.y<=_e.y))continue}e:{Te=a.x;var je=a.y,Ve=y.x,Qe=y.y,it=ne.x;ne=ne.y;var ct=_e.x,Dt=_e.y;if(on.B(Te,Ve)){if(!on.B(je,Qe)&&on.B(ne,Dt)&&Math.min(je,Qe)<ne&&Math.max(je,Qe)>ne&&Math.min(it,ct)<Te&&Math.max(it,ct)>Te&&!on.B(it,ct)){ae.x=Te,ae.y=ne,Te=!0;break e}}else if(on.B(je,Qe)&&on.B(it,ct)&&Math.min(Te,Ve)<it&&Math.max(Te,Ve)>it&&Math.min(ne,Dt)<je&&Math.max(ne,Dt)>je&&!on.B(ne,Dt)){ae.x=it,ae.y=je,Te=!0;break e}ae.x=0,ae.y=0,Te=!1}Te&&(E?x.push(ae.x):x.push(ae.y)),ne=_e}Mt.free(ae)}function rf(a){return a=a.curve,a===bp||a===Fh}function qm(a,y){(y||rf(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}$n.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var te=!1;E=E.Pa.s;for(var ne=E.length,ae=0;ae<ne;ae++){var fe=E[ae];fe instanceof $n&&(fe===this?te=!0:te&&tS(this,fe,a))}}else if(b)for(te=E.Pa.s,E=te.length,ne=0;ne<E;ne++)ae=te[ne],ae instanceof $n&&tS(this,ae,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&rf(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}$n.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},$n.prototype.isVisible=function(){if(!Mi.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},$n.prototype.Zb=function(a){if(Mi.prototype.Zb.call(this,a),a&&qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},$n.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?bg:this.qk};function xg(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,te=a=null,ne=y.jb.s,ae=ne.length,fe=0;fe<ae;fe++){var _e=ne[fe];(_e.ef===y&&_e.ff===b&&_e.uf===x&&_e.vf===E||_e.ef===x&&_e.ff===E&&_e.uf===y&&_e.vf===b)&&(te===null?te=_e:(a===null&&(a=[],a.push(te)),a.push(_e)))}if(a!==null){for(te=G1(y,x,b,E),te===null&&(te=new r0(y,b,x,E),U1(y,te),U1(x,te)),te.links=a,y=0;y<a.length;y++)a[y].Sf=te;te.Sl()}}}}function wg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(ei(y.links,a),y.Sl()))}$n.prototype.ph=function(){return!0},Ye.Object.defineProperties($n.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Vm(y,this,x),wg(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,te=this.fromPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Km(a,this,E),xg(this),this.C(1)),this.g("fromNode",y,a),xp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ul(x),wg(this),this.ff=a;var b=this.fromPort;b!==null&&Ul(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.xv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.fromPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),xg(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Vm(y,this,x),wg(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,te=this.toPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&Km(a,this,E),xg(this),this.C(1)),this.g("toNode",y,a),xp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ul(x),wg(this),this.vf=a;var b=this.toPort;b!==null&&Ul(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.Cv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.toPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),xg(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:oo},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&Ul(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Ln(a,">= 0",$n,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:oo},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&Ul(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Ln(a,">= 0",$n,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?tr:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&Sg(this.fromNode),this.toNode!==null&&Sg(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof gr?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,b=this.pointsCount;if(b===0)a.h(NaN,NaN,0,0);else{if(b===1)b=this.i(0),y=Math.min(b.x,y),x=Math.min(b.y,x),a.h(b.x,b.y,0,0);else if(b===2){b=this.i(0);var E=this.i(1);y=Math.min(b.x,E.x),x=Math.min(b.y,E.y),a.h(b.x,b.y,0,0),a.Ye(E)}else if(this.computeCurve()===ou&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var te=this.i(2);y=Math.min(te.x,y),x=Math.min(te.y,x),on.Dl(E.x,E.y,b.x,b.y,b.x,b.y,te.x,te.y,.5,a)}else for(te=3;te<b;te+=3){var ne=this.i(te-2);te+3>=b&&(te=b-1);var ae=this.i(te-1),fe=this.i(te);on.Dl(E.x,E.y,ne.x,ne.y,ae.x,ae.y,fe.x,fe.y,.5,a),y=Math.min(fe.x,y),x=Math.min(fe.y,x),E=fe}else for(E=this.i(0),te=this.i(1),y=Math.min(E.x,te.x),x=Math.min(E.y,te.y),a.h(E.x,E.y,0,0),a.Ye(te),E=2;E<b;E++)te=this.i(E),y=Math.min(te.x,y),x=Math.min(te.y,x),a.Ye(te);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Mt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Ym(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var b=this.i(x),E=this.i(x+1);on.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):on.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new Rn,b=0;b<a.length/2;b++)E=new Mt(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var te=a[E];if(!$t(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new Rn,b=0;b<a.length;b++)E=a[b],x.add(new Mt(E.x,E.y).freeze())}}else if(a instanceof Rn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Nt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Ym(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&jo(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!wp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!wp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),qm(this,y===Fh||y===bp||a===Fh||a===bp),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),qm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),$n.prototype.invalidateOtherJumpOvers=$n.prototype.Xo,$n.prototype.findClosestSegment=$n.prototype.ez,$n.prototype.updateRoute=$n.prototype.vg,$n.prototype.invalidateRoute=$n.prototype.bb,$n.prototype.rollbackRoute=$n.prototype.rv,$n.prototype.commitRoute=$n.prototype.zf,$n.prototype.startRoute=$n.prototype.uh,$n.prototype.clearPoints=$n.prototype.Fj,$n.prototype.removePoint=$n.prototype.pv,$n.prototype.addPointAt=$n.prototype.yf,$n.prototype.addPoint=$n.prototype.ne,$n.prototype.insertPointAt=$n.prototype.m,$n.prototype.insertPoint=$n.prototype.Kz,$n.prototype.setPointAt=$n.prototype.L,$n.prototype.setPoint=$n.prototype.dd,$n.prototype.getPoint=$n.prototype.i,$n.prototype.getOtherPort=$n.prototype.Cz,$n.prototype.getOtherNode=$n.prototype.To;var Nf=null,Of=null,Jv=new En($n,"Normal",1),Mx=new En($n,"Orthogonal",2),Tx=new En($n,"AvoidsNodes",6),nS=new En($n,"AvoidsNodesStraight",7),ol=new En($n,"None",0),ou=new En($n,"Bezier",9),Fh=new En($n,"JumpGap",10),bp=new En($n,"JumpOver",11),bg=new En($n,"End",17),e0=new En($n,"Scale",18),t0=new En($n,"Stretch",19),Cg=new En($n,"OrientAlong",21),Pg=new En($n,"OrientPlus90",22),_g=new En($n,"OrientMinus90",23),Qv=new En($n,"OrientOpposite",24),n0=new En($n,"OrientUpright",25),Eg=new En($n,"OrientPlus90Upright",26),Lg=new En($n,"OrientMinus90Upright",27),i0=new En($n,"OrientUpright45",28),iS=16,rS=14,Mg=8;$n.className="Link",$n.Normal=Jv,$n.Orthogonal=Mx,$n.AvoidsNodes=Tx,$n.AvoidsNodesStraight=nS,$n.None=ol,$n.Bezier=ou,$n.JumpGap=Fh,$n.JumpOver=bp,$n.End=bg,$n.Scale=e0,$n.Stretch=t0,$n.OrientAlong=Cg,$n.OrientPlus90=Pg,$n.OrientMinus90=_g,$n.OrientOpposite=Qv,$n.OrientUpright=n0,$n.OrientPlus90Upright=Eg,$n.OrientMinus90Upright=Lg,$n.OrientUpright45=i0,$n.EndSegmentStep=8,$n.CurvinessStart=iS,$n.SpacingMin=rS,$n.OrthoShortCut=Mg;function r0(a,y,x,b){vr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}r0.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},r0.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},r0.className="LinkBundle";function Tg(a){vr(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}Tg.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((b+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],b=0;b<=a;b++)x[b]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function Cp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Kc(a,y,x){return Cp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):qv}function oS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=of&&(x[b]=qv)}Tg.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var te=y;te<=x;te++)if(E[te]===jh)return!1}return!0};function Vc(a,y,x,b,E,te,ne,ae,fe){if(!(y<te||y>ne||x<ae||x>fe)){var _e=y|0,Te=x|0,je=a.ac[_e][Te];if(je>=of&&je<Pp)for(E?Te+=b:_e+=b,je+=1;te<=_e&&_e<=ne&&ae<=Te&&Te<=fe&&!(je>=a.ac[_e][Te]);)a.ac[_e][Te]=je,je+=1,E?Te+=b:_e+=b;if(_e=E?Te:_e,E)if(0<b)for(x+=b;x<_e;x+=b)Vc(a,y,x,1,!E,te,ne,ae,fe),Vc(a,y,x,-1,!E,te,ne,ae,fe);else for(x+=b;x>_e;x+=b)Vc(a,y,x,1,!E,te,ne,ae,fe),Vc(a,y,x,-1,!E,te,ne,ae,fe);else if(0<b)for(y+=b;y<_e;y+=b)Vc(a,y,x,1,!E,te,ne,ae,fe),Vc(a,y,x,-1,!E,te,ne,ae,fe);else for(y+=b;y>_e;y+=b)Vc(a,y,x,1,!E,te,ne,ae,fe),Vc(a,y,x,-1,!E,te,ne,ae,fe)}}function o0(a,y,x,b,E,te,ne,ae,fe){y|=0,x|=0;var _e=jh,Te=of;for(a.ac[y][x]=Te;_e===jh&&y>te&&y<ne&&x>ae&&x<fe;)Te+=1,a.ac[y][x]=Te,E?x+=b:y+=b,_e=a.ac[y][x]}function s0(a,y,x,b,E,te,ne,ae,fe){y|=0,x|=0;var _e=jh,Te=Pp;for(a.ac[y][x]=Te;_e===jh&&y>te&&y<ne&&x>ae&&x<fe;)a.ac[y][x]=Te,E?x+=b:y+=b,_e=a.ac[y][x]}function sS(a,y,x,b,E,te,ne){if(a.ac!==null){a.abort=!1;var ae=y.x,fe=y.y;if(Cp(a,ae,fe)){ae-=a.Nd,ae/=a.rc,fe-=a.Od,fe/=a.sc;var _e=b.x,Te=b.y;if(Cp(a,_e,Te))if(_e-=a.Nd,_e/=a.rc,Te-=a.Od,Te/=a.sc,1>=Math.abs(ae-_e)&&1>=Math.abs(fe-Te))a.abort=!0;else{var je=te.x;b=te.y,y=te.x+te.width;var Ve=te.y+te.height;je-=a.Nd,je/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Ve-=a.Od,Ve/=a.sc,te=Math.max(0,Math.min(a.di,je|0)),y=Math.min(a.di,Math.max(0,y|0)),je=Math.max(0,Math.min(a.ei,b|0)),Ve=Math.min(a.ei,Math.max(0,Ve|0)),b=a.ac,ae|=0,fe|=0,_e|=0,Te|=0;var Qe=x===0||x===90?1:-1;if(x=x===90||x===270,b[ae][fe]===jh?(o0(a,ae,fe,Qe,x,te,y,je,Ve),o0(a,ae,fe,1,!x,te,y,je,Ve),o0(a,ae,fe,-1,!x,te,y,je,Ve)):o0(a,ae,fe,Qe,x,ae,fe,ae,fe),b[_e][Te]===jh?(s0(a,_e,Te,E===0||E===90?1:-1,E===90||E===270,te,y,je,Ve),s0(a,_e,Te,1,!(E===90||E===270),te,y,je,Ve),s0(a,_e,Te,-1,!(E===90||E===270),te,y,je,Ve)):s0(a,_e,Te,Qe,x,_e,Te,_e,Te),x=Gn(),ne&&aS(a,_e,Te,E,ae,fe,x))for((x[0]!==_e||x[1]!==Te)&&(x.unshift(Te),x.unshift(_e)),(x[x.length-2]!==ae||x[x.length-1]!==fe)&&(x.push(ae),x.push(fe)),a=of,E=x[x.length-2],ne=x[x.length-1],b[E][ne]=a++,te=x.length-4;0<=te;te-=2)for(E=x[te+2],ne=x[te+3],y=x[te],_e=x[te+1];y>E?E++:y<E?E--:_e>ne?ne++:_e<ne&&ne--,b[E][ne]=a++,E!==y||ne!==_e;);else Vc(a,ae,fe,1,!1,te,y,je,Ve),Vc(a,ae,fe,-1,!1,te,y,je,Ve),Vc(a,ae,fe,1,!0,te,y,je,Ve),Vc(a,ae,fe,-1,!0,te,y,je,Ve);ti(x)}}}}function aS(a,y,x,b,E,te,ne){for(var ae=a.ac,fe=y,_e=x;;){if(fe===E&&_e===te)return!0;var Te=fe,je=_e;if(b===0)if(Te<E)Te++;else break;else if(b===90)if(je<te)je++;else break;else if(b===180)if(Te>E)Te--;else break;else if(je>te)je--;else break;var Ve=ae[Te][je];if(Ve===0||Ve===ey)break;fe=Te,_e=je}for(;;){if(Te=b,je=fe,Ve=_e,b===0?Ve<te?(Te=90,Ve++):Ve>te&&(Te=270,Ve--):b===90?je<E?(Te=0,je++):je>E&&(Te=180,je--):b===180?Ve<te?(Te=90,Ve++):Ve>te&&(Te=270,Ve--):je<E?(Te=0,je++):je>E&&(Te=180,je--),je=ae[je][Ve],Te!==b&&je!==0&&je!==ey){if(ne.push(fe),ne.push(_e),aS(a,fe,_e,Te,E,te,ne))return!0;ne.pop(),ne.pop()}if(ae[fe][_e]=ey,b===0){if(fe===y)return!1;fe--}else if(b===90){if(_e===x)return!1;_e--}else if(b===180){if(fe===y)return!1;fe++}else{if(_e===x)return!1;_e++}}}Ye.Object.defineProperties(Tg.prototype,{bounds:{get:function(){return new kn(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var jh=0,of=1,Pp=999999,qv=Pp+1,ey=Pp+2;Tg.className="PositionArray";function If(){vr(this),this.port=this.node=null,this.pe=[],this.ap=!1}If.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
|
|
|
`+b.toString())}return y};function kx(a,y,x,b){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return b&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}If.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,te=E instanceof ir?E:null;if(te===null||te.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!te.actualBounds.w()){a.ap=x;break e}b=te,ne=b.Lu()}te=a.pe.length=0;var ae=a.port.ga(Xs,Mt.alloc()),fe=a.port.ga(Na,Mt.alloc());for(E=kn.allocAt(ae.x,ae.y,0,0),E.Ye(fe),Mt.free(ae),Mt.free(fe),ae=Mt.allocAt(E.x+E.width/2,E.y+E.height/2),fe=a.port.li(),ne=ne.iterator;ne.next();){var _e=ne.value;if(_e.isVisible()&&_e.fromPort!==_e.toPort){var Te=_e.fromPort===a.port||_e.fromNode!==null&&_e.fromNode.Td(b),je=_e.computeSpot(Te,a.port);if(je.$c()&&(Te=Te?_e.toPort:_e.fromPort,Te!==null)){var Ve=Te.part;if(Ve!==null){var Qe=Ve.findVisibleNode();Qe!==null&&Qe!==Ve&&(Ve=Qe,Te=Ve.port),Te=_e.computeOtherPoint(Ve,Te),Ve=ae.ab(Te),Ve-=fe,0>Ve?Ve+=360:360<=Ve&&(Ve-=360),je=kx(E,je,Ve,_e.isOrthogonal),je===0?(je=4,180<Ve&&(Ve-=360)):je===90?(je=8,270<Ve&&(Ve-=360)):je===180?je=2:(je=1,90>Ve&&(Ve+=360)),Qe=a.pe[te],Qe===void 0?(Qe=new ty(_e,Ve,je),a.pe[te]=Qe):(Qe.link=_e,Qe.angle=Ve,Qe.Nc=je),Qe.hv.set(Te),te++}}}}for(Mt.free(ae),a.pe.sort(If.prototype.j),fe=a.pe.length,b=-1,te=ae=0;te<fe;te++)ne=a.pe[te],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,ae=0),ne.Uo=ae,ae++);for(b=-1,ae=0,te=fe-1;0<=te;te--)fe=a.pe[te],fe!==void 0&&(fe.Nc!==b&&(b=fe.Nc,ae=fe.Uo+1),fe.Gl=ae);if(te=a.pe,je=a.port,b=a.node.portSpreading,ae=Mt.alloc(),fe=Mt.alloc(),ne=Mt.alloc(),_e=Mt.alloc(),je.ga(Xs,ae),je.ga(wl,fe),je.ga(Na,ne),je.ga(Ia,_e),Qe=Ve=Te=je=0,b===Wv)for(var it=0;it<te.length;it++){var ct=te[it];if(ct!==null){var Dt=ct.link.computeThickness();switch(ct.Nc){case 8:Ve+=Dt;break;case 2:Qe+=Dt;break;case 1:je+=Dt;break;default:case 4:Te+=Dt}}}var Lt=it=0,Gt=1,Zt=ct=0;for(Dt=0;Dt<te.length;Dt++){var Vt=te[Dt];if(Vt!==null){if(it!==Vt.Nc){switch(it=Vt.Nc,it){case 8:var qt=ne;Lt=_e;break;case 2:qt=_e,Lt=ae;break;case 1:qt=ae,Lt=fe;break;default:case 4:qt=fe,Lt=ne}switch(ct=Lt.x-qt.x,Zt=Lt.y-qt.y,it){case 8:Ve>Math.abs(ct)?(Gt=Math.abs(ct)/Ve,Ve=Math.abs(ct)):Gt=1;break;case 2:Qe>Math.abs(Zt)?(Gt=Math.abs(Zt)/Qe,Qe=Math.abs(Zt)):Gt=1;break;case 1:je>Math.abs(ct)?(Gt=Math.abs(ct)/je,je=Math.abs(ct)):Gt=1;break;default:case 4:Te>Math.abs(Zt)?(Gt=Math.abs(Zt)/Te,Te=Math.abs(Zt)):Gt=1}Lt=0}var yn=Vt.Zo;if(b===Wv){switch(Vt=Vt.link.computeThickness(),Vt*=Gt,yn.set(qt),it){case 8:yn.x=qt.x+ct/2+Ve/2-Lt-Vt/2;break;case 2:yn.y=qt.y+Zt/2+Qe/2-Lt-Vt/2;break;case 1:yn.x=qt.x+ct/2-je/2+Lt+Vt/2;break;default:case 4:yn.y=qt.y+Zt/2-Te/2+Lt+Vt/2}Lt+=Vt}else{var ii=.5;b===$m&&(ii=(Vt.Uo+1)/(Vt.Gl+1)),yn.x=qt.x+ct*ii,yn.y=qt.y+Zt*ii}}}for(Mt.free(ae),Mt.free(fe),Mt.free(ne),Mt.free(_e),qt=a.pe,te=0;te<qt.length;te++)b=qt[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,kn.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}If.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},If.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,ms,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var te=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<te.y:y.x<te.x)?x+8*b:(a?y.y===te.y:y.x===te.x)?x:x+8*(E-1-b)},If.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Mt,this.Gl=this.Uo=0,this.Zo=new Mt,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function es(a){vr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Mt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}es.prototype.cloneProtected=function(a){a.sn=this.sn,a.Gh=this.Gh,a.yn=this.yn,a.Am.assign(this.Am),a.vn=this.vn,a.un=this.un,a.Em=this.Em,a.xn=!0},es.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},es.prototype.qb=function(){},es.prototype.toString=function(){var a=Bn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},es.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(a!==null&&!a.undoManager.isUndoingRedoing){var y=a.animationManager;!y.isTicking&&(y.defaultAnimation.isAnimating&&y.Cc(),this.isOngoing&&a.pi||this.isInitial&&!a.pi)&&(this.isValidLayout=!1,a.$b())}}},es.prototype.createNetwork=function(){return new ko(this)},es.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof vn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof ir?y.lg(a.memberParts):y.lg(a.iterator),y},es.prototype.updateParts=function(){this.isValidLayout=!0;var a=this.diagram;if(a===null&&this.network!==null)for(var y=this.network.vertexes.iterator;y.next();){var x=y.value.node;if(x!==null&&(a=x.diagram,a!==null))break}try{a!==null&&a.Ea("Layout"),this.commitLayout()}finally{a!==null&&a.eb("Layout")}},es.prototype.commitLayout=function(){if(this.network!==null){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}},es.prototype.doLayout=function(a){var y=new Nn;a instanceof vn?(fd(this,y,a.nodes,!0,this.rh,!0,!1,!0),fd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof ir?fd(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},es.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,te=0,ne=0;for(a=a.iterator;a.next();){var ae=a.value;kg(ae);var fe=ae.measuredBounds,_e=fe.width;fe=fe.height,ae.moveTo(b,E),ae instanceof ir&&(ae.rh=!1),b+=Math.max(_e,50)+20,ne=Math.max(ne,Math.max(fe,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},es.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,te=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value.node;if(!(ae===null||ae instanceof $n)&&(kg(ae),this.rh(ae))){var fe=ae.measuredBounds,_e=fe.width;fe=fe.height,ae.moveTo(x,b),ae instanceof ir&&(ae.rh=!1),x+=Math.max(_e,50)+20,te=Math.max(te,Math.max(fe,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},es.prototype.rh=function(a){return!!(!a.location.w()||a instanceof ir&&a.rh)};function fd(a,y,x,b,E,te,ne,ae){for(x=x.iterator;x.next();){var fe=x.value;b&&!fe.isTopLevel||E!==null&&!E(fe)||!fe.canLayout()||(te&&fe instanceof oi?fe.isLinkLabel||(fe instanceof ir&&fe.layout===null?fd(a,y,fe.memberParts,!1,E,te,ne,ae):(kg(fe),y.add(fe))):ne&&fe instanceof $n?y.add(fe):!ae||!fe.Zc()||fe instanceof oi||(kg(fe),y.add(fe)))}}function kg(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}es.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new kn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},es.prototype.ex=function(a){var y=new Nn;return a instanceof vn?(fd(this,y,a.nodes,!0,null,!0,!0,!0),fd(this,y,a.links,!0,null,!0,!0,!0),fd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof ir?fd(this,y,a.memberParts,!1,null,!0,!0,!0):fd(this,y,a.iterator,!1,null,!0,!0,!0),y},es.prototype.initialOrigin=function(a){var y=this.group;if(y!==null){var x=y.position.copy();return(isNaN(x.x)||isNaN(x.y))&&x.set(a),y=y.placeholder,y!==null&&(x=y.ga(Xs),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ye.Object.defineProperties(es.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a,a!==null&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.sn},set:function(a){this.sn!==a&&(this.sn=a)}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a,a||(this.xn=!0)}},isViewportSized:{get:function(){return this.yn},set:function(a){this.yn!==a&&(this.yn=a)&&this.C()}},isRouting:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a)}},isRealtime:{get:function(){return this.un},set:function(a){this.un!==a&&(this.un=a)}},isValidLayout:{get:function(){return this.xn},set:function(a){this.xn!==a&&(this.xn=a,a||(a=this.diagram,a!==null&&(a.xh=!0)))}},network:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,a!==null&&(a.layout=this))}},boundsComputation:{get:function(){return this.Em},set:function(a){this.Em!==a&&(this.Em=a,this.C())}},arrangementOrigin:{get:function(){return this.Am},set:function(a){this.Am.D(a)||(this.Am.assign(a),this.C())}}}),es.prototype.collectParts=es.prototype.ex,es.prototype.getLayoutBounds=es.prototype.ni,es.prototype.invalidateLayout=es.prototype.C,es.className="Layout";function ko(a){vr(this),this.Sc=a,this.wf=new Nn,this.ye=new Nn,this.Es=new ci,this.zs=new ci}ko.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new Nn,this.ye=new Nn,this.Es=new ci,this.zs=new ci},ko.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=a)return y;if(y+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1<a){for(var x=this.wf.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1);for(x=this.ye.iterator;x.next();)y+=`
|
|
|
`+x.value.toString(a-1)}return y},ko.prototype.createVertex=function(){return new aa(this)},ko.prototype.createEdge=function(){return new Gl(this)},ko.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof oi)return!ne.isLinkLabel;if(ne instanceof $n){var ae=ne.fromNode;return ae===null||ae.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof oi&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof ir&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof $n&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var te=b.fromNode;E=b.toNode,te!==null&&E!==null&&te!==E&&(te=this.findGroupVertex(te),E=this.findGroupVertex(E),te!==null&&E!==null&&this.Zj(te,E,b))}}},ko.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},rt=ko.prototype,rt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},rt.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},rt.Iu=function(a){if(a!==null&&uS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var b=y.M(x);this.Mj(b)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function uS(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}rt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},rt.ki=function(a){return a===null?null:this.Es.I(a)},rt.Bo=function(a){if(a!==null){ny(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ny(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}rt.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,b=this.Lo(a);return b===null?(b=this.createEdge(),b.link=a,y!==null&&(b.fromVertex=this.Bl(y)),x!==null&&(b.toVertex=this.Bl(x)),this.Bo(b)):(y!==null?b.fromVertex=this.Bl(y):b.fromVertex=null,x!==null?b.toVertex=this.Bl(x):b.toVertex=null),b},rt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),iy(this,a)}};function iy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}rt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},rt.Lo=function(a){return a===null?null:this.zs.I(a)},rt.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},rt.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},rt.Ko=function(){for(var a=Gn(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);ti(a)},ko.prototype.deleteArtificialVertexes=function(){for(var a=Gn(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=Gn(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);ti(a),ti(y)};function Ax(a){for(var y=Gn(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);ti(y)}ko.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new Rn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),ry(this,y,b),y=!0;break}}}return a.sort(function(E,te){return E===null||te===null||E===te?0:te.vertexes.count-E.vertexes.count}),a};function ry(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(iy(a,E),ny(y,E),ry(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(iy(a,x),ny(y,x),ry(a,y,x.toVertex))}}ko.prototype.dz=function(){for(var a=new Nn,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},Ye.Object.defineProperties(ko.prototype,{layout:{get:function(){return this.Sc},set:function(a){a!==null&&(this.Sc=a)}},vertexes:{get:function(){return this.wf}},edges:{get:function(){return this.ye}}}),ko.prototype.findAllParts=ko.prototype.dz,ko.prototype.splitIntoSubNetworks=ko.prototype.Zx,ko.prototype.deleteSelfEdges=ko.prototype.Ko,ko.prototype.reverseEdge=ko.prototype.gm,ko.prototype.linkVertexes=ko.prototype.Zj,ko.prototype.findEdge=ko.prototype.Lo,ko.prototype.deleteLink=ko.prototype.Yy,ko.prototype.deleteEdge=ko.prototype.Mj,ko.prototype.addLink=ko.prototype.Dy,ko.prototype.addEdge=ko.prototype.Bo,ko.prototype.findVertex=ko.prototype.ki,ko.prototype.deleteNode=ko.prototype.Zy,ko.prototype.deleteVertex=ko.prototype.Iu,ko.prototype.addNode=ko.prototype.Bl,ko.prototype.addVertex=ko.prototype.dh,ko.prototype.addParts=ko.prototype.lg,ko.className="LayoutNetwork";function aa(a){vr(this),this.ob=a,this.j=new kn(0,0,10,10).freeze(),this.o=new Mt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Rn,this.mg=new Rn}aa.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Rn,this.mg=new Rn},aa.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Dr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,b=this.tg.iterator;b.next();){var E=b.value;x?x=!1:a+=",",a+=E.toString(0)}for(E="",x=!0,b=this.mg.iterator;b.next();){var te=b.value;x?x=!1:E+=",",E+=te.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},aa.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;$t(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof ir)){x=kn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(jr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),kn.free(x);return}kn.free(x)}a.moveTo(y.x,y.y)}},aa.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},aa.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},aa.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},aa.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}Ye.Object.defineProperties(aa.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=kn.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,te=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,te,b),kn.free(x),!(a instanceof ir)&&(a=a.locationObject.ga(jr),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(te/2,b/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new Nn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Nn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Nn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new Rn,y=this.sourceEdges;y.next();)a.add(y.value);for(y=this.destinationEdges;y.next();)a.add(y.value);return a.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),aa.prototype.deleteDestinationEdge=aa.prototype.Jl,aa.prototype.addDestinationEdge=aa.prototype.zl,aa.prototype.deleteSourceEdge=aa.prototype.Kl,aa.prototype.addSourceEdge=aa.prototype.Cl,aa.className="LayoutVertex",aa.standardComparer=oy,aa.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function Gl(a){vr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Gl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Gl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Dr(this);return 0<a&&(y+=this.$k!==null?"("+this.$k.toString()+")":"",1<a&&(y+=" "+(this.kd?this.kd.toString():"null")+" --> "+(this.qd?this.qd.toString():"null"))),y},Gl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Gl.prototype.commit=function(){},Gl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ye.Object.defineProperties(Gl.prototype,{network:{get:function(){return this.nb},set:function(a){this.nb=a}},data:{get:function(){return this.ub},set:function(a){this.ub!==a&&(this.ub=a)}},link:{get:function(){return this.$k},set:function(a){this.$k!==a&&(this.$k=a)}},fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}}}),Gl.prototype.getOtherVertex=Gl.prototype.Ax,Gl.className="LayoutEdge";function Pa(a){es.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Xn(NaN,NaN).freeze(),this.tf=new Xn(10,10).freeze(),this.Jb=Ag,this.Rb=l0,this.nd=Ng,this.hd=cS,a&&Object.assign(this,a)}qe(Pa,es),Pa.prototype.cloneProtected=function(a){es.prototype.cloneProtected.call(this,a),a.zo=this.zo,a.yo=this.yo,a.yg.assign(this.yg),a.tf.assign(this.tf),a.Jb=this.Jb,a.Rb=this.Rb,a.nd=this.nd,a.hd=this.hd},Pa.prototype.qb=function(a){a.classType===Pa?a===Ng||a===c0||a===sy||a===u0?this.sorting=a:a===l0||a===uc?this.arrangement=a:a===Ag||a===a0?this.alignment=a:Nt("Unknown enum value: "+a):es.prototype.qb.call(this,a)},Pa.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof ir)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case u0:E.reverse();break;case Ng:E.sort(this.comparer);break;case c0:E.sort(this.comparer),E.reverse()}var te=this.wrappingColumn;isNaN(te)&&(te=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=te&&0>=ne&&(te=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case a0:var ae=y,fe=x,_e=kn.alloc(),Te=Math.max(this.cellSize.width,1);if(!isFinite(Te))for(var je=Te=0;je<E.length;je++){var Ve=this.ni(E[je],_e);Te=Math.max(Te,Ve.width)}if(Te=Math.max(Te+ae,1),je=Math.max(this.cellSize.height,1),!isFinite(je))for(Ve=je=0;Ve<E.length;Ve++){var Qe=this.ni(E[Ve],_e);je=Math.max(je,Qe.height)}je=Math.max(je+fe,1),Ve=this.arrangement;for(var it=Qe=this.arrangementOrigin.x,ct=this.arrangementOrigin.y,Dt=0,Lt=0,Gt=0;Gt<E.length;Gt++){var Zt=E[Gt],Vt=this.ni(Zt,_e),qt=Math.ceil((Vt.width+ae)/Te)*Te,yn=Math.ceil((Vt.height+fe)/je)*je;switch(Ve){case uc:var ii=Math.abs(it-Vt.width);break;default:ii=it+Vt.width}switch((0<te&&Dt>te-1||0<ne&&0<Dt&&ii-Qe>ne)&&(b.push(new kn(0,ct,ne+ae,Lt)),Dt=0,it=Qe,ct+=Lt,Lt=0),Lt=Math.max(Lt,yn),Ve){case uc:Vt=-Vt.width;break;default:Vt=0}switch(Zt.moveTo(it+Vt,ct),Ve){case uc:it-=qt;break;default:it+=qt}Dt++}b.push(new kn(0,ct,ne+ae,Lt)),kn.free(_e);break;case Ag:for(fe=ne,Te=te,je=y,Ve=x,ne=kn.alloc(),Qe=Math.max(this.cellSize.width,1),te=ct=_e=0,ae=Mt.alloc(),it=0;it<E.length;it++)Lt=E[it],Dt=this.ni(Lt,ne),Lt=Dh(Lt,Lt.locationObject,Lt.locationSpot,ae),_e=Math.max(_e,Lt.x),ct=Math.max(ct,Dt.width-Lt.x),te=Math.max(te,Lt.y);switch(it=this.arrangement,it){case uc:_e+=je;break;default:ct+=je}Qe=isFinite(Qe)?Math.max(Qe+je,1):Math.max(_e+ct,1);var di=Lt=this.arrangementOrigin.x;for(Gt=this.arrangementOrigin.y,ct=0,fe>=_e&&(fe-=_e),_e=Zt=0,qt=Math.max(this.cellSize.height,1),Vt=te=0,yn=!0,Dt=Mt.alloc(),ii=0;ii<E.length;ii++){var ui=E[ii],Vn=this.ni(ui,ne),In=Dh(ui,ui.locationObject,ui.locationSpot,ae);if(0<ct)switch(it){case uc:di=(di-Lt-(Vn.width-In.x))/Qe,di=on.$(Math.round(di),di)?Math.round(di):Math.floor(di),di=di*Qe+Lt;break;default:di=(di-Lt+In.x)/Qe,di=on.$(Math.round(di),di)?Math.round(di):Math.ceil(di),di=di*Qe+Lt}else switch(it){case uc:Zt=di+In.x+Vn.width;break;default:Zt=di-In.x}switch(it){case uc:var er=-(di+In.x)+Zt;break;default:er=di+Vn.width-In.x-Zt}if(0<Te&&ct>Te-1||0<fe&&0<ct&&er>fe){for(b.push(new kn(0,yn?Gt-te:Gt,fe+je,Vt+te+Ve)),di=0;di<ct&&ii!==ct;di++){er=E[ii-ct+di];var Vi=Dh(er,er.locationObject,er.locationSpot,Dt);er.moveTo(er.position.x,er.position.y+te-Vi.y)}Vt+=Ve,Gt=yn?Gt+Vt:Gt+(Vt+te),ct=Vt=te=0,di=Lt,yn=!1}switch(di===Lt&&(_e=it===uc?Math.max(_e,Vn.width-In.x):Math.min(_e,-In.x)),te=Math.max(te,In.y),Vt=Math.max(Vt,Vn.height-In.y),isFinite(qt)&&(Vt=Math.max(Vt,Math.max(Vn.height,qt)-In.y)),yn?ui.moveTo(di-In.x,Gt-In.y):ui.moveTo(di-In.x,Gt),it){case uc:di-=In.x+je;break;default:di+=Vn.width-In.x+je}ct++}if(b.push(new kn(0,Gt,fe+je,(yn?Vt:Vt+te)+Ve)),E.length!==ct)for(fe=0;fe<ct;fe++)Te=E[E.length-ct+fe],je=Dh(Te,Te.locationObject,Te.locationSpot,ae),Te.moveTo(Te.position.x,Te.position.y+te-je.y);if(Mt.free(ae),Mt.free(Dt),it===uc)for(E=0;E<b.length;E++)te=b[E],te.width+=_e,te.x-=_e;else for(E=0;E<b.length;E++)te=b[E],te.x>_e&&(te.width+=te.x-_e,te.x=_e);kn.free(ne)}for(ae=te=ne=E=0;ae<b.length;ae++)fe=b[ae],E=Math.min(E,fe.x),ne=Math.min(ne,fe.y),te=Math.max(te,fe.x+fe.width);this.arrangement===uc?this.commitLayers(b,new Mt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new Mt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Pa.prototype.commitLayers=function(){};function cS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ye.Object.defineProperties(Pa.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==Ag&&a!==a0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==l0&&a!==uc||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==sy&&a!==u0&&a!==Ng&&a!==c0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var a0=new En(Pa,"Position",0),Ag=new En(Pa,"Location",1),l0=new En(Pa,"LeftToRight",2),uc=new En(Pa,"RightToLeft",3),sy=new En(Pa,"Forward",4),u0=new En(Pa,"Reverse",5),Ng=new En(Pa,"Ascending",6),c0=new En(Pa,"Descending",7);Pa.className="GridLayout",Pa.standardComparer=cS,Pa.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Pa.Position=a0,Pa.Location=Ag,Pa.LeftToRight=l0,Pa.RightToLeft=uc,Pa.Forward=sy,Pa.Reverse=u0,Pa.Ascending=Ng,Pa.Descending=c0;function vo(){this.On=new Nn,this.Dn=new Nn,this.Pa=new Nn,this.cf=new ci,this.bf=new ci,this.aj=new ci,this.H=null,this.tp=!1}rt=vo.prototype,rt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},rt.Xe=function(a){this.H=a},rt.oi=function(a){if(a instanceof oi){if(this.On.add(a),a instanceof ir){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof $n?this.Dn.add(a):a instanceof qr||this.Pa.add(a);y=a.data,y===null||a instanceof qr||(a instanceof $n?this.bf.add(y,a):this.cf.add(y,a))},rt.pc=function(a){if(a.Ej(),a instanceof oi){if(this.On.remove(a),a instanceof ir){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof $n?this.Dn.remove(a):a instanceof qr||this.Pa.remove(a);y=a.data,y===null||a instanceof qr||(a instanceof $n?this.bf.remove(y):this.cf.remove(y))},rt.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof ir)&&Nt('Invalid node template in Diagram.nodeTemplateMap: template for "'+b+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof ir||Nt('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof $n||Nt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Gn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Gn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Gn(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);ti(y),ti(x),ti(a)}},vo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},vo.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&hS(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&qf(this.diagram,!1)};function hS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=dS(a,y,b);if(E!==null&&(Ru(E),E=E.copy(),E!==null)){var te=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=b,E.ub=y,a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=te,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}vo.prototype.insertLink=function(){return null},vo.prototype.resolveReferencesForData=function(){},vo.prototype.Ro=function(a){return this.H.model.Ro(a)};function dS(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,Dn('No Group template found for category "'+x+'"'),Dn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Dn('No Node template found for category "'+x+'"'),Dn(" Using default node template")),y=a.ny))),y}vo.prototype.getLinkCategoryForData=function(){return""},vo.prototype.setLinkCategoryForData=function(){},vo.prototype.setFromNodeForLink=function(){},vo.prototype.setToNodeForLink=function(){},vo.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mS||(mS=!0,Dn('No Link template found for category "'+a+'"'),Dn(" Using default link template")),x=y.my)),x},vo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},vo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},vo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(rd(this.diagram,a,!1),this.unresolveReferencesForPart(a))},vo.prototype.unresolveReferencesForPart=function(){},vo.prototype.removeDataForLink=function(){},vo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},vo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof oi?a:null)},vo.prototype.findLinkForKey=function(){return null},rt=vo.prototype,rt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},rt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof oi?a:null)},rt.Kc=function(a){return a===null?null:this.bf.I(a)},rt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Nn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if($t(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator},rt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Nn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if($t(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator};function ay(a,y,x){for(var b in x){var E=y[b],te=x[b];if(rn(te)){if(!rn(E)||E.length<te.length)return!1;for(var ne=0;ne<E.length;ne++){var ae=te[ne];if(ae!==void 0&&!fS(a,E[ne],ae))return!1}}else if(!fS(a,E,te))return!1}return!0}function fS(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if($t(y)&&$t(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}vo.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var b=a.modelChange;if(b!=="")if(x===Vo){if(b==="nodeCategory"){var E=this.Lc(a.object),te=a.newValue;E!==null&&typeof te=="string"&&(E.category=te)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===vs){var ne=a.newValue;b==="nodeDataArray"&&$t(ne)&&hS(this,ne),y.isModified=!0}else if(x===ds){var ae=a.oldValue;b==="nodeDataArray"&&$t(ae)&&this.ip(ae),y.isModified=!0}else x===Ka&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Vo){var fe=a.propertyName,_e=a.object;_e===y.model?(fe==="nodeKeyProperty"||fe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(_e,fe),y.isModified=!0}else if(x===vs||x===ds){var Te=a.change===vs,je=Te?a.newParam:a.oldParam,Ve=Te?a.newValue:a.oldValue,Qe=this.aj.I(a.object);if(Array.isArray(Qe))for(a=0;a<Qe.length;a++){var it=Qe[a];if(Te)Tm(it,Ve,je,!0);else if(!(0>je)){var ct=je+fg(it);it.pc(ct,!0),wv(it,ct,je)}}y.isModified=!0}}finally{y.aa=!0}}}}},vo.prototype.updateAllTargetBindings=function(a){a===void 0&&(a="");for(var y=this.parts.iterator;y.next();)y.value.La(a);for(y=this.nodes.iterator;y.next();)y.value.La(a);for(y=this.links.iterator;y.next();)y.value.La(a)},vo.prototype.rp=function(){for(var a=this.H.model,y=new Nn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),E.forEach(function(ne){_S(a,ne,!1)}),b=0;b<x.length;b++){var te=x[b];this.Lc(te)===null&&PS(a,te,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},vo.prototype.refreshDataBoundLinks=function(){},vo.prototype.updateRelationshipsFromData=function(){},vo.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var b=this.aj.iterator;b.next();){for(var E=b.value,te=0;te<E.length;te++){var ne=E[te].sx(a);ne!==null&&(x===null&&(x=Gn()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);ti(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(rn(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function uy(a,y,x){qd(y,function(ne){ne=ne.O.s;for(var ae=ne.length,fe=0;fe<ae;fe++)Jp(x,ne[fe])});var b=y.Hh;if(rn(b)){var E=a.aj.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&a.aj.remove(b);break}}}}vo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new ci;if(rn(a))for(var E=0;E<a.length;E++)h0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)h0(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new Nn;for(var te=new ci,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof $n)a||ae.fromNode!==null&&ae.toNode!==null||E.add(ae);else if(ae instanceof oi&&ae.data!==null&&x.Tl()){var fe=ae;ae=ne.key;var _e=ae.pg();_e!==null&&(_e=b.I(_e),_e!==null?(x.qe(fe.data,x.wa(_e.data)),fe=y.Kc(fe.data),ae=ae.kh(),ae!==null&&fe!==null&&te.add(ae,fe)):x.qe(fe.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<te.count)for(x=te.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var Te=new ci;b.each(function(je){je.key.data!==null&&Te.add(je.key.data,je.value.data)}),x(Te,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function h0(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var te=a.copyPartData(y,x);if(!(te instanceof Mi))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof oi){for(var ne=y.linksConnected;ne.next();){var ae=ne.value;if(ae.fromNode===y){var fe=b.I(ae);fe!==null&&(fe.fromNode=te)}ae.toNode===y&&(ae=b.I(ae),ae!==null&&(ae.toNode=te))}if(y instanceof ir&&te instanceof ir)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,b,E),ne instanceof $n||ne===null||(ne.containingGroup=te)}else if(y instanceof $n&&te instanceof $n)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.toNode=ne)),y=y.labelNodes;y.next();)ne=h0(a,y.value,x,b,E),ne!==null&&ne instanceof oi&&(ne.labeledLink=te);return te}vo.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof $n||(b=E.copyNodeData(b),$t(b)&&(E.xf(b),x=y.Lc(b)))}else Ru(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof $n||(E=y.copyNodeData(b)),$t(E)&&(x.data=E)));return x},Ye.Object.defineProperties(vo.prototype,{nodes:{get:function(){return this.On}},links:{get:function(){return this.Dn}},parts:{get:function(){return this.Pa}},diagram:{get:function(){return this.H}},addsToTemporaryLayer:{get:function(){return this.tp},set:function(a){this.tp=a}}}),vo.prototype.updateAllRelationshipsFromData=vo.prototype.rp,vo.prototype.findLinksByExample=vo.prototype.ls,vo.prototype.findNodesByExample=vo.prototype.ms,vo.prototype.findLinkForData=vo.prototype.Kc,vo.prototype.findNodeForData=vo.prototype.ii,vo.prototype.findPartForData=vo.prototype.Lc,vo.prototype.findNodeForKey=vo.prototype.Vb,vo.prototype.removeModeledPart=vo.prototype.ip,vo.prototype.removeModeledParts=vo.prototype.Gs,vo.prototype.rebuildParts=vo.prototype.Wd;var pS=!1,gS=!1,mS=!1;vo.className="PartManager";function fa(a){vo.apply(this,arguments)}qe(fa,vo),fa.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},fa.prototype.addModeledParts=function(a){for(vo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)xp(a.value);qf(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),qf(a.diagram,!1)}function yS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){Ru(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var te=g0(x,y,!0);te!==""&&(E.fromPortId=te),te=su(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof oi&&(E.fromNode=te)),te=g0(x,y,!1),te!==""&&(E.toPortId=te),te=su(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof oi&&(E.toNode=te)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}fa.prototype.removeAllModeledParts=function(){var a=this.diagram.model;SS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function SS(a,y){y.forEach(function(x){a.ip(x)})}fa.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},fa.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},fa.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},fa.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},fa.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},fa.prototype.findPartForKey=function(a){var y=vo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},fa.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},fa.prototype.doModelChanged=function(a){var y=this;if(vo.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===Vo){if(E==="linkFromKey"){var te=this.Kc(a.object);if(te!==null){var ne=this.Vb(a.newValue);te.fromNode=ne}}else if(E==="linkToKey"){var ae=this.Kc(a.object);if(ae!==null){var fe=this.Vb(a.newValue);ae.toNode=fe}}else if(E==="linkFromPortId"){var _e=this.Kc(a.object);if(_e!==null){var Te=a.newValue;typeof Te=="string"&&(_e.fromPortId=Te)}}else if(E==="linkToPortId"){var je=this.Kc(a.object);if(je!==null){var Ve=a.newValue;typeof Ve=="string"&&(je.toPortId=Ve)}}else if(E==="nodeGroupKey"){var Qe=this.Lc(a.object);if(Qe!==null){var it=a.newValue;if(it!==void 0){var ct=this.Vb(it);ct instanceof ir?Qe.containingGroup=ct:Qe.containingGroup=null}else Qe.containingGroup=null}}else if(E==="linkLabelKeys"){var Dt=this.Kc(a.object);if(Dt!==null){var Lt=a.oldValue,Gt=a.newValue;Array.isArray(Lt)&&Lt.forEach(function(In){0<=Gt.indexOf(In)||(In=y.Vb(In),In!==null&&(In.labeledLink=null))}),Array.isArray(Gt)&&Gt.forEach(function(In){In=y.Vb(In),In!==null&&(In.labeledLink=Dt)})}}else if(E==="linkCategory"){var Zt=this.Kc(a.object),Vt=a.newValue;Zt!==null&&typeof Vt=="string"&&(Zt.category=Vt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===vs){var qt=a.newValue;if(E==="linkDataArray"&&typeof qt=="object"&&qt!==null)yS(this,qt);else if(E==="linkLabelKeys"&&gd(qt)){var yn=this.Kc(a.object),ii=this.Vb(qt);yn!==null&&ii!==null&&(ii.labeledLink=yn)}x.isModified=!0}else if(b===ds){var di=a.oldValue;if(E==="linkDataArray"&&typeof di=="object"&&di!==null)this.ip(di);else if(E==="linkLabelKeys"&&gd(di)){var ui=this.Vb(di);ui!==null&&(ui.labeledLink=null)}x.isModified=!0}}else if(b===Vo){var Vn=a.propertyName;a.object!==x.model||Vn!=="linkFromKeyProperty"&&Vn!=="linkToKeyProperty"&&Vn!=="linkFromPortIdProperty"&&Vn!=="linkToPortIdProperty"&&Vn!=="linkLabelKeysProperty"&&Vn!=="nodeIsGroupProperty"&&Vn!=="nodeGroupKeyProperty"&&Vn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},fa.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Nn,b=y.linkDataArray;b.forEach(function(te){x.add(te)});var E=[];this.links.each(function(te){te.data===null||x.contains(te.data)||E.push(te.data)}),E.forEach(function(te){AS(y,te,!1)}),b.forEach(function(te){a.Kc(te)===null&&kS(y,te,!1)})},fa.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof $n){var E=su(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=su(b,y,!1),E=x.Vb(E),a.toNode=E,y=b.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){E=y[0];var te=a.labelNodes.first();if(b.wa(te.data)===E)return}E=new Nn().addAll(y);var ne=new Nn;a.labelNodes.each(function(ae){ae.data!==null&&(ae=b.wa(ae.data),ae!==void 0&&ne.add(ae))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(ae){ae=x.Vb(ae),ae!==null&&ae.labeledLink===a&&(ae.labeledLink=null)}),E.each(function(ae){ae=x.Vb(ae),ae!==null&&ae.labeledLink!==a&&(ae.labeledLink=a)}))}}else!(a instanceof qr)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof ir)&&(a.containingGroup=y)}}},fa.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Og(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var te={};b.next();){var ne=b.value;y.lb(ne)?E instanceof ir&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof oi&&(su(y,ne,!0)===x&&(te.link.fromNode=E),su(y,ne,!1)===x&&(te.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(ae){return function(fe){return fe===x?(E.labeledLink=ae.link,!0):!1}}(te)))),te={link:te.link}}hc(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof ir&&(E.containingGroup=a))}},fa.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof oi){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)cc(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&cc(y,x,b.data)),a instanceof ir)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&cc(y,x,b)}}},fa.prototype.copyPartData=function(a,y){var x=vo.prototype.copyPartData.call(this,a,y);if(a instanceof $n)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},fa.prototype.insertLink=function(a,y,x,b){var E=this.diagram,te=E.model,ne=E.toolManager.findTool("Linking"),ae="";if(a!==null&&(y===null&&(y=a),ae=y.portId,ae===null&&(ae="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof $n){if(Ru(b),te=b.copy(),te!==null)return te.fromNode=a,te.fromPortId=ae,te.toNode=x,te.toPortId=y,E.add(te),a=ne.archetypeLabelNodeData,a instanceof oi&&(Ru(a),a=a.copy(),a!==null&&(a.labeledLink=te,E.add(a))),te}else if(b!==null&&(b=te.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Ep(te,b,te.wa(a.data),!0),Lp(te,b,ae,!0),x!==null&&Ep(te,b,te.wa(x.data),!1),Lp(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof oi||(a=te.copyNodeData(a),typeof a=="object"&&a!==null&&(te.xf(a),a=te.wa(a),a!==void 0&&te.Bu(b,a))),E.Kc(b);return null},fa.prototype.findLinkForKey=fa.prototype.findLinkForKey,fa.prototype.findPartForKey=fa.prototype.findPartForKey,fa.prototype.removeAllModeledParts=fa.prototype.removeAllModeledParts,fa.prototype.addModeledParts=fa.prototype.addModeledParts,fa.prototype.addAllModeledParts=fa.prototype.addAllModeledParts,fa.className="GraphLinksPartManager";function xu(){vo.apply(this,arguments),this.Sg=null}qe(xu,vo);function d0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,te=x;if(a.diagram.isTreePathToChildren||(E=x,te=y),(b===null||!fn(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(Ru(b),b=b.copy(),b!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=te,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}xu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},xu.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},xu.prototype.setFromNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)b.qe(a.data,b.wa(y));else{var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=E}},xu.prototype.setToNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=E}else b.qe(a.data,b.wa(y))},xu.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},xu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},xu.prototype.doModelChanged=function(a){if(vo.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var b=a.modelChange;if(b!==""){if(x===Vo){if(b==="nodeParentKey"){var E=a.object,te=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)te!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var ae=ne.kh();ae!==null?te===null?y.remove(ae):y.isTreePathToChildren?ae.fromNode=te:ae.toNode=te:d0(this,te,ne)}}else if(b==="parentLinkCategory"){var fe=this.ii(a.object),_e=a.newValue;if(fe!==null&&typeof _e=="string"){var Te=fe.kh();Te!==null&&(Te.category=_e)}}y.isModified=!0}}else if(x===Vo){var je=a.propertyName;a.object===y.model&&je==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},xu.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof oi&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:d0(this,y,a):b!==null&&rd(x,b,!1)))}}},xu.prototype.updateDataBindings=function(a,y){vo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},xu.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Og(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var te=b.value;y.lb(te)&&E instanceof oi&&y.mh(te)===x&&d0(this,E,this.ii(te))}hc(y,x)}a=y.mh(a),a!==void 0&&E instanceof oi&&(a=this.Vb(a),d0(this,a,E))}},xu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof oi){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var te=E.pc(-1,b,!1);0<=te&&this.diagram.cb(ds,"parts",E,b,null,te,null),te=b.layerChanged,te!==null&&te(b,E,null)}}for(b=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)E=a.value,E=(b?E.toNode:E.fromNode).data,y.lb(E)&&cc(y,x,E)}},xu.prototype.insertLink=function(a,y,x){y=this.diagram.model;var b=a,E=x;return this.diagram.isTreePathToChildren||(b=x,E=a),b!==null&&E!==null?(y.qe(E.data,y.wa(b.data)),E.kh()):null},xu.prototype.findLinkForKey=xu.prototype.findLinkForKey,xu.className="TreePartManager";function xi(a,y){this.kl=new Nn,this.il=new Nn,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,vr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new ci,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new ci,this.Lt=new Rn,this.Wg=!1,this.o=null,this.undoManager=new Fo,a!==void 0&&(rn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}xi.prototype.cloneProtected=function(a){a.xa=this.xa,a.Sm=this.Sm,a.Gg=this.Gg,a.Th=this.Th,a.bl=this.bl,a.Bk=this.Bk,a.Km=this.Km,a.Jm=this.Jm,a.Mm=this.Mm,a.xm=this.xm,a.lj=this.lj},xi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},xi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},xi.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+li(E)}}return y},xi.prototype.xA=function(a){a.change!==Ka&&Nt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Bs?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},xi.prototype.Qv=function(a,y){var x=this,b=!1,E=new Nn,te=new Nn,ne=new Nn,ae=this.vh;a.changes.each(function(je){je.model===x&&(je.modelChange==="nodeDataArray"?je.change===vs?E.add(je.newValue):je.change===ds&&ne.add(je.oldValue):x.lb(je.object)?te.add(je.object):je.change!==Vo||x.modelData!==je.object&&je.propertyName!=="modelData"?je.object!==null&&(ae&&ae.contains(je.object)?ae.get(je.object).each(function(Ve){x.lb(Ve)&&te.add(Ve)}):je.object instanceof xi||x.ri()&&x.Jc(je.object)||bS(x,je.object).each(function(Ve){te.add(Ve)})):b=!0)});var fe=this.il;fe.clear(),E.each(function(je){fe.add(x.wa(je)),y||te.add(je)});var _e=this.kl;_e.clear(),ne.each(function(je){_e.add(x.wa(je)),y&&te.add(je)}),a=x.cloneDeep(te.Fa());var Te=null;return b&&(Te===null&&(Te={}),Te.modelData=this.cloneDeep(this.modelData)),0<fe.count&&(Te===null&&(Te={}),y?Te.removedNodeKeys=fe.Fa():Te.insertedNodeKeys=fe.Fa()),0<a.length&&(Te===null&&(Te={}),Te.modifiedNodeData=a),0<_e.count&&(Te===null&&(Te={}),y?Te.insertedNodeKeys=_e.Fa():Te.removedNodeKeys=_e.Fa()),_e.clear(),fe.clear(),Te},xi.prototype.cloneDeep=function(a){return _p(this,a,!0)};function _p(a,y,x,b,E,te){function ne(je,Ve){ae?(je.__gohashid===void 0&&te.push(je),b.set(je,Ve)):(je=Co++,b.set(je,Ve),E.set(je,y))}if(!$t(y))return y;te||(te=[]);var ae=Object.isExtensible(y);if(b||(b=new ci),ae){var fe=b.get(y);if(fe)return fe}else for(E||(E=new ci),fe=E.iterator;fe.next();){var _e=fe.key;if(fe.value===y&&(_e=b.get(_e)))return _e}if(Array.isArray(y)){fe=[],ne(y,fe);for(var Te=0;Te<y.length;Te++)fe.push(_p(a,y[Te],!1,b,E,te))}else if(y instanceof Mt||y instanceof Xn||y instanceof kn||y instanceof Li||y instanceof vi)fe=y.copy(),ne(y,fe);else{if(y instanceof po||y instanceof Yn||y instanceof En)return y;if(y instanceof Rn)fe=new Rn().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof Nn)fe=new Nn().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof ci)fe=new ci().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof Date)fe=new Date(y.getTime()),ne(y,fe);else if(y instanceof RegExp)fe=new RegExp(y),ne(y,fe),fe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")fe=y.copy(),ne(y,fe);else for(Te in fe={},ne(y,fe),y)Te!=="__gohashid"&&(fe[Te]=_p(a,y[Te],!1,b,E,te))}return x&&te.forEach(function(je){delete je.__gohashid}),fe}rt=xi.prototype,rt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},rt.rm=function(){var a="";return this.name!==""&&(a+=`,
|
|
|
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
|
|
|
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
|
|
|
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
|
|
|
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
|
|
|
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
|
|
|
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
|
|
|
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
|
|
|
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},rt.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function xS(a,y){y=y.modelData,$t(y)&&(a.dm(y),a.modelData=y)}rt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!CS(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+cy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+pd(this,this.nodeDataArray,!0)},rt.kv=function(a){xS(this,a),a=a.nodeDataArray,rn(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,te){if((te=te.part)&&(te=te.data,E!==te)){var ne=b.get(E);ne===null?(ne=new Nn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new ci,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===Vo?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===vs||te===ds)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function bS(a,y){for(var x=new Nn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];f0(a,y,E,E,x)}return x}function f0(a,y,x,b,E){if(Array.isArray(x))for(var te=0;te<x.length;te++){var ne=x[te];if(ne===y)return E.add(b),!0;if(f0(a,y,ne,b,E))return!0}else if($t(x)&&Object.getPrototypeOf(x)===Object.prototype)for(te in x){if(ne=x[te],ne===y)return E.add(b),!0;if(f0(a,y,ne,b,E))return!0}return!1}rt.Pv=function(a,y){var x=this,b=!1,E=new Nn,te=new Nn,ne=new Nn,ae=this.vh;a.changes.each(function(Te){Te.model===x&&(Te.modelChange==="nodeDataArray"?Te.change===vs?E.add(Te.newValue):Te.change===ds&&ne.add(Te.oldValue):x.lb(Te.object)?te.add(Te.object):Te.change!==Vo||x.modelData!==Te.object&&Te.propertyName!=="modelData"?Te.object!==null&&(ae&&ae.contains(Te.object)?ae.get(Te.object).each(function(je){x.lb(je)&&te.add(je)}):Te.object instanceof xi||x.ri()&&x.Jc(Te.object)||bS(x,Te.object).each(function(je){te.add(je)})):b=!0)});var fe=this.il;fe.clear(),E.each(function(Te){fe.add(x.wa(Te)),y||te.add(Te)});var _e=this.kl;return _e.clear(),ne.each(function(Te){_e.add(x.wa(Te)),y&&te.add(Te)}),a="",b&&(a+=`,
|
|
|
"modelData": `+cy(this,this.modelData)),0<fe.count&&(a+=(y?this.Yv:this.Wv)+pd(this,fe.Fa(),!0)),0<te.count&&(a+=this.jy+pd(this,te.Fa(),!0)),0<_e.count&&(a+=(y?this.Wv:this.Yv)+pd(this,_e.Fa(),!0)),_e.clear(),fe.clear(),a},rt.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&Nt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new ci;if(Array.isArray(x))for(var E=0;E<x.length;E++){var te=x[E],ne=this.wa(te);ne!=null&&b.set(ne,te)}if(Array.isArray(y))for(E=y.length,te=0;te<E;te++){ne=y[te];var ae=this.hc(ne);ae===null&&(ae=(ae=b.get(ne))?ae:this.copyNodeData({}),this.km(ae,ne),this.xf(ae))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],te=this.wa(E),te=this.hc(te),te!==null){for(var fe in E)fe==="__gohashid"||fe===this.nodeKeyProperty||this.Wj()&&fe===this.nodeIsGroupProperty||this.setDataProperty(te,fe,E[fe]);this.lm(E,te)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,fe=0;fe<x;fe++)y=this.hc(a[fe]),y!==null&&this.cm(y)},rt.$x=function(a,y){a.change!==Ka&&Nt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Bs?(y===void 0&&(y=Ig(this,this)),wS(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},rt.yA=function(a,y){return this.$x(a,y)},rt.np=function(a){return a===void 0&&(a=Ig(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},rt.toJSON=function(a){return this.np(a)},rt.Zw=function(a){var y=null;if(typeof a=="string")try{y=_t.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Nt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Nt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},rt.Ky=function(a){return this.Zw(a)},xi.constructGraphLinksModel=function(){return new xi},rt=xi.prototype,rt.dm=function(a){if(rn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if($t(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Nt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if($t(a)){for(y in a)if(x=a[y],$t(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new Rn,b=0;b<x.length/2;b++)E.add(new Mt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Nx(a)}return a},rt.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):rn(a)?pd(this,a):$t(a)?cy(this,a):typeof a=="function"?"null":a.toString()};function pd(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new fi;E.add("["),x&&1<b&&E.add(`
|
|
|
`);for(var te=0;te<b;te++){var ne=y[te];ne!==void 0&&(0<te&&(E.add(","),x&&E.add(`
|
|
|
`)),E.add(a.sm(ne)))}return x&&1<b&&E.add(`
|
|
|
`),E.add("]"),E.toString()}function CS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function sl(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function cy(a,y){var x=y;if(x instanceof Mt)y={class:"go.Point",x:sl(x.x),y:sl(x.y)};else if(x instanceof Xn)y={class:"go.Size",width:sl(x.width),height:sl(x.height)};else if(x instanceof kn)y={class:"go.Rect",x:sl(x.x),y:sl(x.y),width:sl(x.width),height:sl(x.height)};else if(x instanceof Li)y={class:"go.Margin",top:sl(x.top),right:sl(x.right),bottom:sl(x.bottom),left:sl(x.left)};else if(x instanceof vi)x.sb()?y={class:"go.Spot",x:sl(x.x),y:sl(x.y),offsetX:sl(x.offsetX),offsetY:sl(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof po){if(y={class:"go.Brush",type:x.type.name},x.type===Nh?y.color=x.color:(x.type===ch||x.type===yu)&&(y.start=x.start,y.end=x.end,x.type===yu&&(x.startRadius!==0&&(y.startRadius=sl(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=sl(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof Yn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=sl(x.startX)),x.startY!==0&&(y.startY=sl(x.startY)),x.endX!==0&&(y.endX=sl(x.endX)),x.endY!==0&&(y.endY=sl(x.endY)),x.spot1.D(Xs)||(y.spot1=x.spot1),x.spot2.D(Na)||(y.spot2=x.spot2),x.type===Yn.o&&(y.path=Yn.ia(x))):x instanceof En&&(y={class:"go.EnumValue",classType:Ig(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=Os(y,E);if(!CS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof Rn){var ne="[";for(te=te.iterator;te.next();){var ae=te.value;1<ne.length&&(ne+=","),ne+=a.sm(ae.x),ne+=",",ne+=a.sm(ae.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function al(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Nx(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new Mt(al(a.x),al(a.y));else if(y==="Size")x=new Xn(al(a.width),al(a.height));else if(y==="Rect")x=new kn(al(a.x),al(a.y),al(a.width),al(a.height));else if(y==="Margin")x=new Li(al(a.top),al(a.right),al(a.bottom),al(a.left));else if(y==="Spot")typeof a.enum=="string"?x=xh(a.enum):x=new vi(al(a.x),al(a.y),al(a.offsetX),al(a.offsetY));else if(y==="Brush"){if(x=new po,x.type=Jn(po,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof vi&&(x.start=a.start),a.end instanceof vi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=al(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=al(a.endRadius)),a=a.colorStops,$t(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Yn.parse(a.path):x=new Yn,x.type=Jn(Yn,a.type),typeof a.startX=="number"&&(x.startX=al(a.startX)),typeof a.startY=="number"&&(x.startY=al(a.startY)),typeof a.endX=="number"&&(x.endX=al(a.endX)),typeof a.endY=="number"&&(x.endY=al(a.endY)),a.spot1 instanceof vi&&(x.spot1=a.spot1),a.spot2 instanceof vi&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=Jn(b,a.name)));return x}rt.Pe=function(a){return this.Lt.add(a),this},rt.ik=function(a){this.Lt.remove(a)},rt.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},rt.cb=function(a,y,x,b,E,te,ne){na(this,"",a,y,x,b,E,te,ne)},rt.g=function(a,y,x,b,E){na(this,"",Vo,a,this,y,x,b,E)},rt.Fs=function(a,y,x,b,E,te){na(this,"",Vo,y,a,x,b,E,te)};function na(a,y,x,b,E,te,ne,ae,fe){ae===void 0&&(ae=null),fe===void 0&&(fe=null);var _e=new Go;_e.model=a,_e.change=x,_e.modelChange=y,_e.propertyName=b,_e.object=E,_e.oldValue=te,_e.oldParam=ae,_e.newValue=ne,_e.newParam=fe,a.ds(_e)}xi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Vo){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),$o(x,b,E)}else a.change===vs?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,$t(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&ei(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&On(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!rn(b)&&a.propertyName&&(b=Os(a.object,a.propertyName)),rn(b)&&typeof x=="number"&&(a=a.newValue,y?ei(b,x):On(b,x,a))):Nt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===ds?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,$t(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&On(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&ei(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!rn(b)&&a.propertyName&&(b=Os(a.object,a.propertyName)),rn(b)&&typeof x=="number"&&(a=a.oldValue,y?On(b,x,a):ei(b,x))):Nt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ka&&Nt("unknown ChangedEvent: "+a.toString())},xi.prototype.Ea=function(a){return this.undoManager.Ea(a)},xi.prototype.eb=function(a){return this.undoManager.eb(a)},xi.prototype.Kf=function(){return this.undoManager.Kf()},xi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},rt=xi.prototype,rt.La=function(a,y){y===void 0&&(y=""),na(this,"SourceChanged",Ka,y,a,null,null)},rt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;Nt("Key value for node data "+a+" is not a number or a string: "+y)}}},rt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Os(a,x);b!==y&&this.hc(y)===null&&($o(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),na(this,"nodeKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else $o(a,x,y)}};function gd(a){return typeof a=="number"||typeof a=="string"}rt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},rt.hc=function(a){return a===null&&Nt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&gd(a)?this.kb.I(a):null},rt.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){$o(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;$o(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;$o(a,y,x)}}}}},rt.xf=function(a){a!==null&&(So(a),this.lb(a)||PS(this,a,!0))};function PS(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&Nt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,On(a.Tc,b,y)),na(a,"nodeDataArray",vs,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}rt.Fy=function(a){if(rn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},rt.cm=function(a){a!==null&&_S(this,a,!0)};function _S(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;ei(a.Tc,b)}na(a,"nodeDataArray",ds,"nodeDataArray",a,y,null,b,null),a.qp(y)}rt.nA=function(a){if(rn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},rt.$z=function(a){if(a!==this.nodeDataArray&&rn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.wa(te);if(ne!==void 0){x.add(ne);var ae=this.hc(ne);ae!==te&&(ae!==null?(this.Do(ae,te),this.lm(te,ae)):(te=this.cloneDeep(te),this.km(te,ne),this.xf(te)))}else ne=this.cloneDeep(te),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},rt.jp=function(a,y){y!==void 0&&(a=Og(this,a),a instanceof Nn&&this.Vf.add(y,a))},rt.Lv=function(){},rt.fm=function(){},rt.em=function(){},rt.qp=function(){};function cc(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new Nn,a.Vf.add(y,b)),b.add(x)}}function hc(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof Nn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function Og(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Nn?a:null)}rt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},xi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):p0(this,a,!0),$t(a)&&vr(a),a};function p0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=p0(a,y[x],a.copiesArrayObjects);b.push(E)}return vr(b),b}if(x&&$t(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var te=Os(y,b),ne=Ig(a,te);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||te instanceof xi||te instanceof Fo||te instanceof Bs||te instanceof Go||(te=p0(a,te,!1)),$o(x,b,te)}return vr(x),x}return y instanceof Mt||y instanceof Xn||y instanceof kn||y instanceof vi||y instanceof Li?y.copy():y}xi.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!ES&&a instanceof nn&&(ES=!0,Dn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Dn(" Is that really your intent?"));var b=Os(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},rt=xi.prototype,rt.set=function(a,y,x){this.setDataProperty(a,y,x)},rt.Do=function(a,y){if(y){var x=this.lb(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||this.setDataProperty(a,b,y[b])}},rt.Ay=function(a,y){this.ts(a,-1,y)},rt.ts=function(a,y,x){0>y&&(y=a.length),On(a,y,x),na(this,"",vs,"",a,null,x,null,y)},rt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Nt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];ei(a,y),na(this,"",ds,"",a,x,null,y,null)},rt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Os(a,y),y===void 0))return"";if(typeof y=="string")return y;Nt("getCategoryForNodeData found a non-string category for "+a+": "+y)},rt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Os(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),na(this,"nodeCategory",Vo,x,a,b,y))}else $o(a,x,y)}},rt.lm=function(a,y){this.jm(y,this.Ro(a))},rt.Tl=function(){return!1},rt.Wj=function(){return!1},rt.ri=function(){return!1},rt.xs=function(){return!1},rt.Xj=function(){return!1};function hy(){return new xi}function Ig(a,y){if(typeof y=="function"){if(y.className)return y.className;if(y.name)return y.name}else if(typeof y=="object"&&y!==null&&y.constructor)return Ig(a,y.constructor);return typeof y}function dy(a){return Xu[a]?Xu[a]:_t.go!==void 0&&_t.go[a]?_t.go[a]:null}function Os(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(b){}return x}function $o(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(b){}}Ye.Object.defineProperties(xi.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&Nt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Nt("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,b=0;b<x;b++){var E=a[b];$t(E)||Nt("Model.nodeDataArray must only contain Objects, not: "+E),So(E)}for(this.Tc=a,b=new Rn,E=0;E<x;E++){var te=a[E],ne=this.wa(te);ne===void 0||this.kb.I(ne)!==null?b.add(te):this.kb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),te=this.wa(E),te!==void 0&&this.kb.add(te,E);for(na(this,"nodeDataArray",Vo,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),xi.prototype.setCategoryForNodeData=xi.prototype.jm,xi.prototype.getCategoryForNodeData=xi.prototype.Ro,xi.prototype.removeArrayItem=xi.prototype.ov,xi.prototype.insertArrayItem=xi.prototype.ts,xi.prototype.addArrayItem=xi.prototype.Ay,xi.prototype.assignAllDataProperties=xi.prototype.Do,xi.prototype.set=xi.prototype.set,xi.prototype.clearUnresolvedReferences=xi.prototype.Qy,xi.prototype.mergeNodeDataArray=xi.prototype.$z,xi.prototype.removeNodeDataCollection=xi.prototype.nA,xi.prototype.removeNodeData=xi.prototype.cm,xi.prototype.addNodeDataCollection=xi.prototype.Fy,xi.prototype.addNodeData=xi.prototype.xf,xi.prototype.makeNodeDataKeyUnique=xi.prototype.$u,xi.prototype.findNodeDataForKey=xi.prototype.hc,xi.prototype.containsNodeData=xi.prototype.lb,xi.prototype.setKeyForNodeData=xi.prototype.km,xi.prototype.getKeyForNodeData=xi.prototype.wa,xi.prototype.updateTargetBindings=xi.prototype.La,xi.prototype.commit=xi.prototype.commit,xi.prototype.rollbackTransaction=xi.prototype.Kf,xi.prototype.commitTransaction=xi.prototype.eb,xi.prototype.startTransaction=xi.prototype.Ea,xi.prototype.raiseDataChanged=xi.prototype.Fs,xi.prototype.raiseChanged=xi.prototype.g,xi.prototype.raiseChangedEvent=xi.prototype.cb,xi.prototype.removeChangedListener=xi.prototype.ik,xi.prototype.addChangedListener=xi.prototype.Pe,xi.prototype.writeJsonValue=xi.prototype.sm,xi.prototype.replaceJsonObjects=xi.prototype.dm,xi.prototype.applyIncrementalJSON=xi.prototype.Ky,xi.prototype.applyIncrementalJson=xi.prototype.Zw,xi.prototype.toJSON=xi.prototype.toJSON,xi.prototype.toJson=xi.prototype.np,xi.prototype.toIncrementalJSON=xi.prototype.yA,xi.prototype.toIncrementalJson=xi.prototype.$x,xi.prototype.toIncrementalData=xi.prototype.xA,xi.prototype.clear=xi.prototype.clear;var ES=!1,Xu={};xi.className="Model",xi.fromJSON=xi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=_t.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:Nt("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=dy(b)):(E=dy(b),E===null&&(E=_t[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof xi?y=a:Nt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=xi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},xi.safePropertyValue=Os,xi.safePropertySet=$o,Xu.Brush=po,Xu.ChangedEvent=Go,Xu.Geometry=Yn,Xu.Margin=Li,Xu.Panel=Wn,Xu.Point=Mt,Xu.Rect=kn,Xu.Size=Xn,Xu.Spot=vi,Xu.Transaction=Bs,Xu.UndoManager=Fo;function Hs(a,y,x,b){vr(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,b===void 0?(this.el=MS,this.wk=null):(this.el=Dg,this.wk=b),this.st=new Nn}Hs.prototype.copy=function(){var a=new Hs;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},rt=Hs.prototype,rt.qb=function(a){a.classType===Hs&&(this.mode=a)},rt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},rt.freeze=function(){return this._isFrozen=!0,this},rt.ka=function(){return this._isFrozen=!1,this},rt.Kx=function(a){return a===void 0&&(a=null),this.mode=Dg,this.backConverter=a,this},rt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},rt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function LS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}rt.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")Dn("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=Os(y,b)),te!==void 0)if(E===null)x!==""&&$o(a,x,te);else try{if(x!==""){var ne=E(te,a);$o(a,x,ne)}else E(te,a)}catch(ae){}}}},rt.sp=function(a,y,x,b){if(this.el===Dg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=Os(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var ae=b!==null?b.diagram:null,fe=ae!==null?ae.model:null;if(te===null){if(x!=="")fe!==null?fe.setDataProperty(y,x,ne):$o(y,x,ne);else if(fe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var _e=b.itemIndex,Te=b.panel.itemArray;fe.ov(Te,_e),fe.ts(Te,_e,ne)}}else try{if(x!==""){var je=te(ne,y,fe);fe!==null?fe.setDataProperty(y,x,je):$o(y,x,je)}else{var Ve=te(ne,y,fe);if(Ve!==void 0&&fe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Qe=b.itemIndex,it=b.panel.itemArray;fe.ov(it,Qe),fe.ts(it,Qe,Ve)}}}catch(ct){}}finally{this.st.remove(a)}}}},Ye.Object.defineProperties(Hs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&un(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&un(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&un(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&un(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&un(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&un(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&un(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&un(this),this.el=a}}}),Hs.prototype.updateSource=Hs.prototype.sp,Hs.prototype.updateTarget=Hs.prototype.Mv,Hs.prototype.ofModel=Hs.prototype.dA,Hs.prototype.ofObject=Hs.prototype.cp,Hs.prototype.makeTwoWay=Hs.prototype.Kx;var Ox="Binding",MS=new En(Hs,"OneWay",1),Dg=new En(Hs,"TwoWay",2);Hs.className="Binding",Hs.parseEnum=function(a,y){return function(x){return x=Jn(a,x),x===null?y:x}},Hs.toString=li,Hs.OneWay=MS,Hs.TwoWay=Dg;function zr(a,y,x){xi.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Nn,this.wb=new ci,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(rn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}qe(zr,xi),zr.constructGraphLinksModel=xi.constructGraphLinksModel,zr.prototype.cloneProtected=function(a){xi.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},rt=zr.prototype,rt.clear=function(){xi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},rt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;var x=a.length,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+li(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+su(this,E,!0)+"-->"+su(this,E,!1)}return y},rt.Qv=function(a,y){this.linkKeyProperty===""&&Nt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=xi.prototype.Qv.call(this,a,y),b=this,E=new Nn,te=new Nn,ne=new Nn,ae=this.vh;a.changes.each(function(Te){Te.model===b&&(Te.modelChange==="linkDataArray"?Te.change===vs?E.add(Te.newValue):Te.change===ds&&ne.add(Te.oldValue):b.Jc(Te.object)?te.add(Te.object):Te.object!==null&&(Te.object!==null&&ae&&ae.contains(Te.object)?ae.get(Te.object).each(function(je){b.Jc(je)&&te.add(je)}):Te.object instanceof xi||b.lb(Te.object)||TS(b,Te.object).each(function(je){te.add(je)})))});var fe=this.il;fe.clear(),E.each(function(Te){fe.add(b.Ac(Te)),y||te.add(Te)});var _e=this.kl;return _e.clear(),ne.each(function(Te){_e.add(b.Ac(Te)),y&&te.add(Te)}),a=b.cloneDeep(te.Fa()),0<fe.count&&(x===null&&(x={}),y?x.removedLinkKeys=fe.Fa():x.insertedLinkKeys=fe.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<_e.count&&(x===null&&(x={}),y?x.insertedLinkKeys=_e.Fa():x.removedLinkKeys=_e.Fa()),_e.clear(),fe.clear(),x},rt.rm=function(){var a=xi.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
|
|
|
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
|
|
|
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
|
|
|
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
|
|
|
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
|
|
|
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
|
|
|
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
|
|
|
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
|
|
|
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
|
|
|
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},rt.gp=function(a){xi.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},rt.Rv=function(){var a=xi.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+pd(this,this.linkDataArray,!0);return a+y},rt.kv=function(a){xi.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function TS(a,y){for(var x=new Nn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];f0(a,y,E,E,x)}return x}rt.Pv=function(a,y){this.linkKeyProperty===""&&Nt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=xi.prototype.Pv.call(this,a,y),b=this,E=new Nn,te=new Nn,ne=new Nn,ae=this.vh;a.changes.each(function(Te){Te.model===b&&(Te.modelChange==="linkDataArray"?Te.change===vs?E.add(Te.newValue):Te.change===ds&&ne.add(Te.oldValue):b.Jc(Te.object)?te.add(Te.object):Te.object!==null&&(Te.object!==null&&ae&&ae.contains(Te.object)?ae.get(Te.object).each(function(je){b.Jc(je)&&te.add(je)}):Te.object instanceof xi||b.lb(Te.object)||TS(b,Te.object).each(function(je){te.add(je)})))});var fe=this.il;fe.clear(),E.each(function(Te){fe.add(b.Ac(Te)),y||te.add(Te)});var _e=this.kl;return _e.clear(),ne.each(function(Te){_e.add(b.Ac(Te)),y&&te.add(Te)}),a=x,0<fe.count&&(a+=(y?this.Xv:this.Vv)+pd(this,fe.Fa(),!0)),0<te.count&&(a+=this.iy+pd(this,te.Fa(),!0)),0<_e.count&&(a+=(y?this.Vv:this.Xv)+pd(this,_e.Fa(),!0)),_e.clear(),fe.clear(),a},rt.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&Nt("applyIncrementalJson cannot change Model properties"),xi.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,b=0;b<x;b++){var E=y[b],te=this.jh(E);te===null&&(te=this.Jo({}),this.Ks(te,E),this.fi(te))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],te=this.Ac(E),te=this.jh(te),te!==null){for(var ne in E)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(te,ne,E[ne]);NS(this,E,te)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},zr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Vo){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),$o(x,b,E);return}}else if(a.change===vs){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,$t(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===ds){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,$t(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}xi.prototype.changeState.call(this,a,y)}},rt=zr.prototype,rt.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),$o(x,this.nodeKeyProperty,a),this.xf(x))}return a}},rt.yx=function(a){return su(this,a,!0)},rt.wv=function(a,y){Ep(this,a,y,!0)},rt.Bx=function(a){return su(this,a,!1)},rt.Bv=function(a,y){Ep(this,a,y,!1)};function su(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Os(y,a),a!==void 0))){if(gd(a))return a;Nt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ep(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var te=Os(y,E);te!==x&&(hc(a,te,y),$o(y,E,x),a.hc(x)===null&&cc(a,x,y),na(a,b?"linkFromKey":"linkToKey",Vo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else $o(y,E,x)}}rt.zx=function(a){return g0(this,a,!0)},rt.xv=function(a,y){Lp(this,a,y,!0)},rt.Cx=function(a){return g0(this,a,!1)},rt.Cv=function(a,y){Lp(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Os(y,a),y===void 0?"":y)}function Lp(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=Os(y,E);te===void 0&&(te=""),te!==x&&($o(y,E,x),na(a,b?"linkFromPortId":"linkToPortId",Vo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else $o(y,E,x)}}rt.Ef=function(a){if(a===null)return m0;var y=this.je;return y===""?m0:(a=Os(a,y),a===void 0?m0:a)},rt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Os(a,x);if(b===void 0&&(b=m0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)hc(this,b[te],a);for($o(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&cc(this,ne,a)}na(this,"linkLabelKeys",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else $o(a,x,y)}},rt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Os(a,x);if(b===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(b)){var E=b.indexOf(y);0<=E||(E=b.length,b.push(y),this.Jc(a)&&(this.hc(y)===null&&cc(this,y,a),na(this,"linkLabelKeys",vs,x,a,null,y,null,E)))}else Nt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},rt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Os(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(hc(this,y,a),na(this,"linkLabelKeys",ds,x,a,y,null,E,null)))}else b!==void 0&&Nt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},rt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;Nt("Key value for link data "+a+" is not a number or a string: "+y)}}},rt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Os(a,x);b!==y&&this.jh(y)===null&&($o(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),na(this,"linkKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},rt.jh=function(a){return a===null&&Nt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&gd(a)?this.wb.I(a):null},rt.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){$o(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;$o(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;$o(a,y,x)}}}}},rt.Jc=function(a){return a===null?!1:this.$f.contains(a)},rt.fi=function(a){a!==null&&(So(a),this.Jc(a)||kS(this,a,!0))};function kS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&Nt("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),na(a,"linkDataArray",vs,"linkDataArray",a,null,y,null,b),fy(a,y)}rt.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},rt.bm=function(a){a!==null&&AS(this,a,!0)};function AS(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(na(a,"linkDataArray",ds,"linkDataArray",a,y,null,b,null),x=su(a,y,!0),hc(a,x,y),x=su(a,y,!1),hc(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],hc(a,x,y)}rt.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},rt.Zz=function(a){if(this.linkKeyProperty===""&&Nt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&rn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.Ac(te);if(ne!==void 0){x.add(ne);var ae=this.jh(ne);ae!==te&&(ae!==null?(this.Do(ae,te),NS(this,te,ae)):(te=this.cloneDeep(te),this.Ks(te,ne),this.fi(te)))}else ne=this.cloneDeep(te),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function fy(a,y){var x=su(a,y,!0);x=a.Vl(x),a.hc(x)===null&&cc(a,x,y),x=su(a,y,!1),x=a.Vl(x),a.hc(x)===null&&cc(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],a.hc(x)===null&&cc(a,x,y)}rt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):p0(this,a,!0),$t(a)&&(vr(a),this.lf!==""&&$o(a,this.lf,void 0),this.mf!==""&&$o(a,this.mf,void 0),this.je!==""&&$o(a,this.je,[])),a},rt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Os(a,y)},rt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;Nt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},rt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Os(a,x);b!==y&&(hc(this,b,a),$o(a,x,y),this.hc(y)===null&&cc(this,y,a),na(this,"nodeGroupKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},zr.prototype.copyNodeData=function(a){return a===null?null:(a=xi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Os(a,this.Je)===void 0||$o(a,this.Je,void 0),a)},zr.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){Ep(this,a,x,!0);return}if(y===this.linkToKeyProperty){Ep(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Lp(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Lp(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var b=Os(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},rt=zr.prototype,rt.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&Os(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},rt.jp=function(a,y){xi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var b=x.value,E=a,te=y;if(su(this,b,!0)===E){var ne=this.lf;$o(b,ne,te),na(this,"linkFromKey",Vo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(su(this,b,!1)===E&&(ne=this.mf,$o(b,ne,te),na(this,"linkToKey",Vo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var ae=ne.length,fe=this.je,_e=0;_e<ae;_e++)ne[_e]===E&&(ne[_e]=te,na(this,"linkLabelKeys",vs,fe,b,E,te,_e,_e))}},rt.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;$o(a,b,x),na(this,"nodeGroupKey",Vo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},rt.Lv=function(){xi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},rt.fm=function(a){xi.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=Gn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;na(this,"nodeGroupKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(su(this,b,!0)===a&&(E=this.lf,na(this,"linkFromKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),su(this,b,!1)===a&&(E=this.mf,na(this,"linkToKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var te=E.length,ne=this.je,ae=0;ae<te;ae++)E[ae]===a&&(na(this,"linkLabelKeys",vs,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)hc(this,a,x[y]);ti(x)}},rt.em=function(a){xi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&cc(this,y,a)},rt.qp=function(a){xi.prototype.qp.call(this,a);var y=this.lh(a);hc(this,y,a)},rt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Os(a,y),y===void 0))return"";if(typeof y=="string")return y;Nt("getCategoryForLinkData found a non-string category for "+a+": "+y)},zr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},zr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Os(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),na(this,"linkCategory",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},zr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},rt=zr.prototype,rt.lm=function(a,y){xi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function NS(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}rt.Wj=function(){return!0},rt.ri=function(){return!0},rt.xs=function(){return!0},rt.Xj=function(){return!0},Ye.Object.defineProperties(zr.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,b=0;b<x;b++){var E=a[b];$t(E)||Nt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),So(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Rn,E=0;E<x;E++){var te=a[E],ne=this.Ac(te);ne===void 0||this.wb.I(ne)!==null?b.add(te):this.wb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),te=this.Ac(E),te!==void 0&&this.wb.add(te,E)}for(b=new Nn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,na(this,"linkDataArray",Vo,"linkDataArray",this,y,a),y=0;y<x;y++)fy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,b=0;b<x;b++){var E=this.linkDataArray[b],te=this.Ac(E);te===void 0&&(this.Bs(E),te=this.Ac(E)),te!==void 0&&this.wb.add(te,E)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),zr.prototype.setCategoryForLinkData=zr.prototype.lp,zr.prototype.getCategoryForLinkData=zr.prototype.ps,zr.prototype.assignAllDataProperties=zr.prototype.Do,zr.prototype.setGroupKeyForNodeData=zr.prototype.mp,zr.prototype.getGroupKeyForNodeData=zr.prototype.lh,zr.prototype.isGroupForNodeData=zr.prototype.Yu,zr.prototype.copyLinkData=zr.prototype.Jo,zr.prototype.mergeLinkDataArray=zr.prototype.Zz,zr.prototype.removeLinkDataCollection=zr.prototype.lA,zr.prototype.removeLinkData=zr.prototype.bm,zr.prototype.addLinkDataCollection=zr.prototype.Ey,zr.prototype.addLinkData=zr.prototype.fi,zr.prototype.containsLinkData=zr.prototype.Jc,zr.prototype.makeLinkDataKeyUnique=zr.prototype.Bs,zr.prototype.findLinkDataForKey=zr.prototype.jh,zr.prototype.setKeyForLinkData=zr.prototype.Ks,zr.prototype.getKeyForLinkData=zr.prototype.Ac,zr.prototype.removeLabelKeyForLinkData=zr.prototype.Qx,zr.prototype.addLabelKeyForLinkData=zr.prototype.Bu,zr.prototype.setLabelKeysForLinkData=zr.prototype.Ls,zr.prototype.getLabelKeysForLinkData=zr.prototype.Ef,zr.prototype.setToPortIdForLinkData=zr.prototype.Cv,zr.prototype.getToPortIdForLinkData=zr.prototype.Cx,zr.prototype.setFromPortIdForLinkData=zr.prototype.xv,zr.prototype.getFromPortIdForLinkData=zr.prototype.zx,zr.prototype.setToKeyForLinkData=zr.prototype.Bv,zr.prototype.getToKeyForLinkData=zr.prototype.Bx,zr.prototype.setFromKeyForLinkData=zr.prototype.wv,zr.prototype.getFromKeyForLinkData=zr.prototype.yx,zr.prototype.clear=zr.prototype.clear;var m0=Object.freeze([]);zr.className="GraphLinksModel",Xu.GraphLinksModel=zr,xi.constructGraphLinksModel=xi.constructGraphLinksModel=function(){return new zr},xi.initDiagramModel=hy=function(){return new zr};function ll(a,y){xi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(rn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}qe(ll,xi),ll.constructGraphLinksModel=xi.constructGraphLinksModel,ll.prototype.cloneProtected=function(a){xi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},rt=ll.prototype,rt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+li(E)}}return y},rt.rm=function(){var a=xi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},rt.gp=function(a){xi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},rt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Nt("applyIncrementalJson cannot change Model properties"),xi.prototype.fp.call(this,a)},rt.Vl=function(a){return a},rt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Os(a,y),y!==void 0)){if(gd(y))return y;Nt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},rt.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var b=Os(a,x);b!==y&&(hc(this,b,a),$o(a,x,y),this.hc(y)===null&&cc(this,y,a),na(this,"nodeParentKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},rt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Os(a,y),y===void 0)?"":typeof y=="string"?y:(Nt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},ll.prototype.getLinkCategoryForData=function(a){return this.ss(a)},ll.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Os(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),na(this,"parentLinkCategory",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},ll.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},ll.prototype.copyNodeData=function(a){return a===null?null:(a=xi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Os(a,this.Ke)===void 0||$o(a,this.Ke,void 0),a)},ll.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var b=Os(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},rt=ll.prototype,rt.jp=function(a,y){xi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},rt.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;$o(a,b,x),na(this,"nodeParentKey",Vo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},rt.fm=function(a){xi.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=Gn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;na(this,"nodeParentKey",Vo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)hc(this,a,x[y]);ti(x)}},rt.em=function(a){xi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&cc(this,y,a)},rt.qp=function(a){xi.prototype.qp.call(this,a);var y=this.mh(a);hc(this,y,a)},rt.lm=function(a,y){xi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},rt.Tl=function(){return!0},rt.xs=function(){return!0},Ye.Object.defineProperties(ll.prototype,{nodeParentKeyProperty:{get:function(){return this.Ke},set:function(a){var y=this.Ke;y!==a&&(this.Ke=a,this.g("nodeParentKeyProperty",y,a))}},Jj:{get:function(){return this.Nm},set:function(a){this.Nm!==a&&(this.Nm=a)}},parentLinkCategoryProperty:{get:function(){return this.nj},set:function(a){var y=this.nj;y!==a&&(this.nj=a,this.g("parentLinkCategoryProperty",y,a))}},linkCategoryProperty:{get:function(){return this.parentLinkCategoryProperty},set:function(a){this.parentLinkCategoryProperty=a}},type:{get:function(){return"TreeModel"}}}),ll.prototype.setParentLinkCategoryForNodeData=ll.prototype.Ms,ll.prototype.getParentLinkCategoryForNodeData=ll.prototype.ss,ll.prototype.setParentKeyForNodeData=ll.prototype.qe,ll.prototype.getParentKeyForNodeData=ll.prototype.mh,ll.className="TreeModel",Xu.TreeModel=ll;function hs(a){es.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Ju,this.Ti=0,this.Zv=new Mt,this.Jp=this.me=0,this.Xr=new jg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Ju,this.K=ul,this.nd=Tp,this.hd=oy,this.tf=6,this.Nn=C0,a&&Object.assign(this,a)}qe(hs,es),hs.prototype.cloneProtected=function(a){es.prototype.cloneProtected.call(this,a),a.eo=this.eo,a.Cm=this.Cm,a.ro=this.ro,a.ul=this.ul,a.Rb=this.Rb,a.K=this.K,a.nd=this.nd,a.hd=this.hd,a.tf=this.tf,a.Nn=this.Nn},hs.prototype.qb=function(a){a.classType===hs?a===w0||a===b0||a===S0||a===x0||a===Tp?this.sorting=a:a===sf||a===Mp||a===ul||a===vd?this.direction=a:a===zh||a===md||a===Ju||a===Qu?this.arrangement=a:(a===Df||a===C0)&&(this.nodeDiameterFormula=a):es.prototype.qb.call(this,a)},hs.prototype.createNetwork=function(){return new kp(this)},hs.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new Rn;y.addAll(a.iterator),a=new Rn;var x=new Rn,b=this.sort(y),E,te,ne=this.Jp,ae=this.arrangement,fe=this.nodeDiameterFormula,_e=this.radius;(!isFinite(_e)||0>=_e)&&(_e=NaN);var Te=this.aspectRatio;(!isFinite(Te)||0>=Te)&&(Te=1);var je=this.startAngle;isFinite(je)||(je=0);var Ve=this.sweepAngle;if((!isFinite(Ve)||360<Ve||1>Ve)&&(Ve=360),y=this.spacing,isFinite(y)||(y=NaN),ae===Qu&&fe===Df?ae=Ju:ae===Qu&&fe!==Df&&(ae=this.arrangement),(this.direction===sf||this.direction===Mp)&&this.sorting!==Tp){for(fe=0;!(fe>=b.length)&&(a.add(b.M(fe)),!(fe+1>=b.length));fe+=2)x.add(b.M(fe+1));this.direction===sf?(this.arrangement===Qu&&a.reverse(),b=new Rn,b.addAll(a),b.addAll(x)):(this.arrangement===Qu&&x.reverse(),b=new Rn,b.addAll(x),b.addAll(a))}fe=b.length;for(var Qe=te=E=0;Qe<b.length;Qe++){var it=je+Ve*te*(this.direction===ul?1:-1)/fe,ct=b.M(Qe).diameter;isNaN(ct)&&(ct=yd(b.M(Qe),it)),360>Ve&&(Qe===0||Qe===b.length-1)&&(ct/=2),E+=ct,te++}if(isNaN(_e)||ae===Qu){if(isNaN(y)&&(y=6),ae!==Ju&&ae!==Qu){for(te=-1/0,ne=0;ne<fe;ne++)Qe=b.M(ne),E=b.M(ne===fe-1?0:ne+1),isNaN(Qe.diameter)&&yd(Qe,0),isNaN(E.diameter)&&yd(E,0),te=Math.max(te,(Qe.diameter+E.diameter)/2);ne=te+y,ae===zh?_e=(te+y)/(2*Math.PI/fe):_e=v0(this,ne*(360<=Ve?fe:fe-1),Te,je*Math.PI/180,Ve*Math.PI/180)}else _e=v0(this,E+(360<=Ve?fe:fe-1)*(ae!==Qu?y:1.6*y),Te,je*Math.PI/180,Ve*Math.PI/180);te=_e*Te}else if(te=_e*Te,Qe=py(this,_e,te,je*Math.PI/180,Ve*Math.PI/180),isNaN(y))(ae===Ju||ae===Qu)&&(y=(Qe-E)/(360<=Ve?fe:fe-1));else if(ae===Ju||ae===Qu)Qe=(Qe-E)/(360<=Ve?fe:fe-1),Qe<y?(_e=v0(this,E+y*(360<=Ve?fe:fe-1),Te,je*Math.PI/180,Ve*Math.PI/180),te=_e*Te):y=Qe;else{for(ne=-1/0,E=0;E<fe;E++)it=b.M(E),ct=b.M(E===fe-1?0:E+1),isNaN(it.diameter)&&yd(it,0),isNaN(ct.diameter)&&yd(ct,0),ne=Math.max(ne,(it.diameter+ct.diameter)/2);ne+=y,E=v0(this,ne*(360<=Ve?fe:fe-1),Te,je*Math.PI/180,Ve*Math.PI/180),E>_e?(_e=E,te=_e*Te):ne=Qe/(360<=Ve?fe:fe-1)}if(this.kw=ae,this.lc=_e,this.Zm=Te,this.lw=je,this.Wp=Ve,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,ae=this.lc,_e=this.lw,Te=this.Wp,je=this.Ti,Ve=this.me,fe=this.Jp,this.direction!==sf&&this.direction!==Mp||b!==Qu)if(this.direction===sf||this.direction===Mp){switch(ne=0,b){case md:ne=180*y0(this,ae,Ve,_e,fe)/Math.PI;break;case Ju:fe=y=0,ne=a.first(),ne!==null&&(y=yd(ne,Math.PI/2)),ne=x.first(),ne!==null&&(fe=yd(ne,Math.PI/2)),ne=180*y0(this,ae,Ve,_e,je+(y+fe)/2)/Math.PI;break;case zh:ne=Te/y.length}if(this.direction===sf){switch(b){case md:Fg(this,a,_e,vd);break;case Ju:Bg(this,a,_e,vd);break;case zh:Rg(this,a,Te/2,_e,vd)}switch(b){case md:Fg(this,x,_e+ne,ul);break;case Ju:Bg(this,x,_e+ne,ul);break;case zh:Rg(this,x,Te/2,_e+ne,ul)}}else{switch(b){case md:Fg(this,x,_e,vd);break;case Ju:Bg(this,x,_e,vd);break;case zh:Rg(this,x,Te/2,_e,vd)}switch(b){case md:Fg(this,a,_e+ne,ul);break;case Ju:Bg(this,a,_e+ne,ul);break;case zh:Rg(this,a,Te/2,_e+ne,ul)}}}else switch(b){case md:Fg(this,y,_e,this.direction);break;case Ju:Bg(this,y,_e,this.direction);break;case zh:Rg(this,y,Te,_e,this.direction);break;case Qu:OS(this,y,Te,_e,this.direction)}else OS(this,y,Te,_e-Te/2,ul)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Rg(a,y,x,b,E){var te=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var ae=y.length,fe=0;fe<ae;fe++){var _e=b+(E===ul?fe*x/(360<=te?ae:ae-1):-(fe*x)/ae),Te=y.M(fe),je=ne*Math.tan(_e)/a;je=Math.sqrt((ne*ne+a*a*je*je)/(1+je*je)),Te.centerX=je*Math.cos(_e),Te.centerY=je*Math.sin(_e),Te.actualAngle=180*_e/Math.PI}}function Bg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Ti;x=x*Math.PI/180;for(var ae=y.length,fe=0;fe<ae;fe++){var _e=y.M(fe),Te=y.M(fe===ae-1?0:fe+1),je=te*Math.sin(x);_e.centerX=E*Math.cos(x),_e.centerY=je,_e.actualAngle=180*x/Math.PI,isNaN(_e.diameter)&&yd(_e,0),isNaN(Te.diameter)&&yd(Te,0),_e=y0(a,E,te,b===ul?x:-x,(_e.diameter+Te.diameter)/2+ne),x+=b===ul?_e:-_e}}function Fg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Jp;x=x*Math.PI/180;for(var ae=y.length,fe=0;fe<ae;fe++){var _e=y.M(fe);_e.centerX=E*Math.cos(x),_e.centerY=te*Math.sin(x),_e.actualAngle=180*x/Math.PI,_e=y0(a,E,te,b===ul?x:-x,ne),x+=b===ul?_e:-_e}}function OS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new jg,360>x){for(te=b+(E===ul?te:-te);0>te;)te+=360;te%=360,180<te&&(te-=360),te*=Math.PI/180,a.gt=te,DS(a,y,x,b,E)}else IS(a,y,x,b,E);a.Xr.commit(y)}function IS(a,y,x,b,E){var te=a.lc,ne=a.Ti,ae=a.Zm,fe=te*Math.cos(b*Math.PI/180),_e=a.me*Math.sin(b*Math.PI/180),Te=y.Fa();if(Te.length===3)Te[0].centerX=te,Te[0].centerY=0,Te[1].centerX=Te[0].centerX-Te[0].width/2-Te[1].width/2-ne,Te[1].y=Te[0].y,Te[2].centerX=(Te[0].centerX+Te[1].centerX)/2,Te[2].y=Te[0].y-Te[2].height-ne;else if(Te.length===4)Te[0].centerX=te,Te[0].centerY=0,Te[2].centerX=-Te[0].centerX,Te[2].centerY=Te[0].centerY,Te[1].centerX=0,Te[1].y=Math.min(Te[0].y,Te[2].y)-Te[1].height-ne,Te[3].centerX=0,Te[3].y=Math.max(Te[0].y+Te[0].height+ne,Te[2].y+Te[2].height+ne);else{te=Mt.alloc();for(var je=0;je<Te.length&&(Te[je].centerX=fe,Te[je].centerY=_e,!(je>=Te.length-1));je++)RS(a,fe,_e,Te,je,E,te)||BS(a,fe,_e,Te,je,E,te),fe=te.x,_e=te.y;if(Mt.free(te),a.mj++,!(23<a.mj)){fe=Te[0].centerX,_e=Te[0].centerY,te=Te[Te.length-1].centerX,je=Te[Te.length-1].centerY;var Ve=Math.abs(fe-te)-((Te[0].width+Te[Te.length-1].width)/2+ne),Qe=Math.abs(_e-je)-((Te[0].height+Te[Te.length-1].height)/2+ne);ne=0,1>Math.abs(Qe)?Math.abs(fe-te)<(Te[0].width+Te[Te.length-1].width)/2&&(ne=0):ne=0<Qe?Qe:1>Math.abs(Ve)?0:Ve,fe=Math.abs(te)>Math.abs(je)?0<te!=_e>je:0<je!=fe<te,(fe=E===ul?fe:!fe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-Te[Te.length-1].width),ne=Math.min(ne,-Te[Te.length-1].height)),a.Xr.compare(ne,Te),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>Te.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*ae,IS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var te=a.lc,ne=a.me,ae=a.Zm,fe=te*Math.cos(b*Math.PI/180),_e=ne*Math.sin(b*Math.PI/180),Te=Mt.alloc(),je=y.Fa(),Ve=0;Ve<je.length&&(je[Ve].centerX=fe,je[Ve].centerY=_e,!(Ve>=je.length-1));Ve++)RS(a,fe,_e,je,Ve,E,Te)||BS(a,fe,_e,je,Ve,E,Te),fe=Te.x,_e=Te.y;if(Mt.free(Te),a.mj++,!(23<a.mj)){if(fe=Math.atan2(_e,fe),fe=E===ul?a.gt-fe:fe-a.gt,fe=Math.abs(fe)<Math.abs(fe-2*Math.PI)?fe:fe-2*Math.PI,te=fe*(te+ne)/2,ne=a.Xr,Math.abs(te)<Math.abs(ne.Pl))for(ne.Pl=te,ne.mk=[],ne.tm=[],fe=0;fe<je.length;fe++)ne.mk[fe]=je[fe].bounds.x,ne.tm[fe]=je[fe].bounds.y;1<Math.abs(te)&&(a.lc=8>a.mj?a.lc-te/(2*Math.PI):a.lc-(0<te?1.7:-2.3),a.me=a.lc*ae,DS(a,y,x,b,E))}}function RS(a,y,x,b,E,te,ne){var ae=a.lc,fe=a.me,_e=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var Te=!1;if(0<=x!=(te===ul)){if(te=y+a,te>ae){if(te=y-a,te<-ae)return ne.x=te,ne.y=_e,!1;Te=!0}}else if(te=y-a,te<-ae){if(te=y+a,te>ae)return ne.x=te,ne.y=_e,!1;Te=!0}return _e=Math.sqrt(1-Math.min(1,te*te/(ae*ae)))*fe,0>x!==Te&&(_e=-_e),Math.abs(x-_e)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=_e,!1):(ne.x=te,ne.y=_e,!0)}function BS(a,y,x,b,E,te,ne){var ae=a.lc,fe=a.me,_e=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===ul)){if(te=x-a,te<-fe){if(te=x+a,te>fe){ne.x=_e,ne.y=te;return}b=!0}}else if(te=x+a,te>fe){if(te=x-a,te<-fe){ne.x=_e,ne.y=te;return}b=!0}_e=Math.sqrt(1-Math.min(1,te*te/(fe*fe)))*ae,0>y!==b&&(_e=-_e),ne.x=_e,ne.y=te}hs.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},hs.prototype.commitNodes=function(){var a=this.group!==null&&this.group.placeholder!==null&&this.group.isSubGraphExpanded,y=a?this.group.location.copy():null,x=this.actualCenter;a?x=new Mt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},hs.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var te=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,ae=b!==void 0&&E!==void 0?E/(te+1):Math.PI/(2*(te+1)),fe=0,_e=0;_e<=te;_e++){b!==void 0&&E!==void 0?fe=b+_e*E/te:fe=_e*Math.PI/(2*te);var Te=Math.sin(fe);ne+=Math.sqrt(1-a*a*Te*Te)*ae}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function v0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function y0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var te=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var ae=0;;ae++){var fe=Math.sin(b+ae*a);if(ne+=(y>x?y:x)*Math.sqrt(1-te*te*fe*fe)*a,ne>=E)return ae*a}}hs.prototype.sort=function(a){switch(this.sorting){case S0:break;case x0:a.reverse();break;case w0:a.sort(this.comparer);break;case b0:a.sort(this.comparer),a.reverse();break;case Tp:return this.ak(Ix(a));default:Nt("Invalid sorting type.")}return a};function Ix(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Rn;for(var b=0;b<a.length;b++){var E=-1,te=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var ae=a.M(ne).edgesCount;ae>E&&(E=ae,te=ne)}else for(ne=0;ne<a.length;ne++)ae=y[ne],ae>E&&(E=ae,te=ne);for(x.add(a.M(te)),y[te]=-1,te=a.M(te),ne=te.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(te=te.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}hs.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,te=b.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(te=[],x=0;x<y.length;x++)te[x]=0;x=[];var ne=[],ae=[];b=[],E=new Rn;for(var fe=0,_e=0;_e<y.length;_e++){var Te=y[_e].length;if(Te===1)b.push(_e);else if(Te===0)E.add(a.M(_e));else{if(fe===0)x.push(_e);else{for(var je=Te=1/0,Ve=-1,Qe=[],it=0;it<x.length;it++)0>y[x[it]].indexOf(x[it===x.length-1?0:it+1])&&Qe.push(it===x.length-1?0:it+1);if(Qe.length===0)for(it=0;it<x.length;it++)Qe.push(it);for(it=0;it<Qe.length;it++){for(var ct=Qe[it],Dt=y[_e],Lt=0,Gt=0;Gt<ne.length;Gt++){var Zt=te[ne[Gt]],Vt=te[ae[Gt]];if(Zt<Vt){var qt=Zt;Zt=Vt}else qt=Vt;if(qt<ct&&ct<=Zt)for(Vt=0;Vt<Dt.length;Vt++){var yn=Dt[Vt];0>x.indexOf(yn)||qt<te[yn]&&te[yn]<Zt||qt===te[yn]||Zt===te[yn]||Lt++}else for(Vt=0;Vt<Dt.length;Vt++)yn=Dt[Vt],0>x.indexOf(yn)||qt<te[yn]&&te[yn]<Zt&&qt!==te[yn]&&Zt!==te[yn]&&Lt++}for(Dt=Lt,Gt=Lt=0;Gt<y[_e].length;Gt++)qt=x.indexOf(y[_e][Gt]),0<=qt&&(qt=Math.abs(ct-(qt>=ct?qt+1:qt)),Lt+=qt<x.length+1-qt?qt:x.length+1-qt);for(Gt=0;Gt<ne.length;Gt++)qt=te[ne[Gt]],Zt=te[ae[Gt]],qt>=ct&&qt++,Zt>=ct&&Zt++,qt>Zt&&(Vt=Zt,Zt=qt,qt=Vt),Zt-qt<(x.length+2)/2==(qt<ct&&ct<=Zt)&&Lt++;(Dt<Te||Dt===Te&&Lt<je)&&(Te=Dt,je=Lt,Ve=ct)}for(x.splice(Ve,0,_e),Te=0;Te<x.length;Te++)te[x[Te]]=Te;for(Te=0;Te<y[_e].length;Te++)je=y[_e][Te],0<=x.indexOf(je)&&(ne.push(_e),ae.push(je))}fe++}}for(ne=x.length;;){for(te=!0,ae=0;ae<b.length;ae++)if(fe=b[ae],_e=y[fe][0],Te=x.indexOf(_e),0<=Te){for(Ve=je=0;Ve<y[_e].length;Ve++)Qe=x.indexOf(y[_e][Ve]),0>Qe||Qe===Te||(it=Qe>Te?Qe-Te:Te-Qe,je+=Qe<Te!=it>ne-it?1:-1);x.splice(0>je?Te:Te+1,0,fe),b.splice(ae,1),ae--}else te=!1;if(te)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},Ye.Object.defineProperties(hs.prototype,{radius:{get:function(){return this.eo},set:function(a){this.eo!==a&&(0<a||isNaN(a))&&(this.eo=a,this.C())}},aspectRatio:{get:function(){return this.Cm},set:function(a){this.Cm!==a&&0<a&&(this.Cm=a,this.C())}},startAngle:{get:function(){return this.ro},set:function(a){this.ro!==a&&(this.ro=a,this.C())}},sweepAngle:{get:function(){return this.ul},set:function(a){this.ul!==a&&(0<a&&360>=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==Qu&&a!==Ju&&a!==md&&a!==zh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==ul&&a!==vd&&a!==sf&&a!==Mp||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==S0&&a!==x0&&a!==w0&&!b0&&a!==Tp||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==C0&&a!==Df||(this.Nn=a,this.C())}},actualXRadius:{get:function(){return this.lc}},actualYRadius:{get:function(){return this.me}},actualSpacing:{get:function(){return this.Ti}},actualCenter:{get:function(){return this.Zv}}});var Ju=new En(hs,"ConstantSpacing",0),md=new En(hs,"ConstantDistance",1),zh=new En(hs,"ConstantAngle",2),Qu=new En(hs,"Packed",3),ul=new En(hs,"Clockwise",4),vd=new En(hs,"Counterclockwise",5),sf=new En(hs,"BidirectionalLeft",6),Mp=new En(hs,"BidirectionalRight",7),S0=new En(hs,"Forwards",8),x0=new En(hs,"Reverse",9),w0=new En(hs,"Ascending",10),b0=new En(hs,"Descending",11),Tp=new En(hs,"Optimized",12),C0=new En(hs,"Pythagorean",13),Df=new En(hs,"Circular",14);hs.className="CircularLayout",hs.ConstantSpacing=Ju,hs.ConstantDistance=md,hs.ConstantAngle=zh,hs.Packed=Qu,hs.Clockwise=ul,hs.Counterclockwise=vd,hs.BidirectionalLeft=sf,hs.BidirectionalRight=Mp,hs.Forwards=S0,hs.Reverse=x0,hs.Ascending=w0,hs.Descending=b0,hs.Optimized=Tp,hs.Pythagorean=C0,hs.Circular=Df;function jg(){this.Pl=-1/0,this.tm=this.mk=null}jg.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},jg.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},jg.className="VertexArrangement";function kp(a){ko.call(this,a)}qe(kp,ko),kp.prototype.createVertex=function(){return new zg(this)},kp.prototype.createEdge=function(){return new P0(this)},kp.className="CircularNetwork";function zg(a){aa.call(this,a),this.u=this.Si=NaN}qe(zg,aa);function yd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Qu)if(x.nodeDiameterFormula===Df)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===Df?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Ye.Object.defineProperties(zg.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),zg.className="CircularVertex";function P0(a){Gl.call(this,a)}qe(P0,Gl),P0.className="CircularEdge";function Aa(a){es.call(this),this.ah=null,this.An=0,this.$d=new Xn(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}qe(Aa,es),Aa.prototype.cloneProtected=function(a){es.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},Aa.prototype.createNetwork=function(){return new Rf(this)},Aa.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var te=E.value;te.Vd=te.vertexes.count,te.sh=1,te.Hj=null,te.We=null}FS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var ae=ne.count,fe=!0;te=E=0;for(var _e=Gn(),Te=0;Te<ae+y.vertexes.count+2;Te++)_e[Te]=null;ae=0,ne.reset();for(var je=kn.alloc();ne.next();)if(Te=ne.value,this.computeBounds(Te,je),fe)fe=!1,E=je.x+je.width/2,te=je.y+je.height/2,_e[0]=new Mt(je.x+je.width+b.width,je.y),_e[1]=new Mt(je.x,je.y+je.height+b.height),ae=2;else{var Ve=jS(_e,ae,E,te,je.width,je.height,b),Qe=_e[Ve],it=new Mt(Qe.x+je.width+b.width,Qe.y),ct=new Mt(Qe.x,Qe.y+je.height+b.height);for(Ve+1<ae&&_e.splice(Ve+1,0,null),_e[Ve]=it,_e[Ve+1]=ct,ae++,Ve=Qe.x-je.x,Qe=Qe.y-je.y,Te=Te.vertexes.iterator;Te.next();)it=Te.value,it.centerX+=Ve,it.centerY+=Qe}for(kn.free(je),Te=y.vertexes.iterator;Te.next();)ne=Te.value,Ve=ne.bounds,2>ae?(E=Ve.x+Ve.width/2,te=Ve.y+Ve.height/2,_e[0]=new Mt(Ve.x+Ve.width+b.width,Ve.y),_e[1]=new Mt(Ve.x,Ve.y+Ve.height+b.height),ae=2):(fe=jS(_e,ae,E,te,Ve.width,Ve.height,b),je=_e[fe],Qe=new Mt(je.x+Ve.width+b.width,je.y),Ve=new Mt(je.x,je.y+Ve.height+b.height),fe+1<ae&&_e.splice(fe+1,0,null),_e[fe]=Qe,_e[fe+1]=Ve,ae++,ne.centerX=je.x+ne.width/2,ne.centerY=je.y+ne.height/2);for(ti(_e),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}HS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Aa.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Aa.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function FS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Rx(a,y),te=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=te,FS(a,y+1,x),HS(a,te),Bx(a,E),y=E.vertexes.Fa(),y.sort(function(ne,ae){return ne===null||ae===null||ne===ae?0:ae.Vd-ne.Vd}),x=0;x<y.length;x++)Fx(a,y[x]);a.Zf=b}}function Dx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Rx(a,y){for(var x=a.network,b=new Rf(a),E=0;E<a.ah.length;E++){var te=a.ah[E];if(1<te.Vd){b.dh(te);var ne=new US;ne.Rs=te.Vd,ne.Ss=te.width,ne.Qs=te.height,ne.Sv=te.focus.x,ne.Tv=te.focus.y,te.We===null&&(te.We=new Rn),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var ae=te.value;E=ae.fromVertex,ne=ae.toVertex,E.network===b&&ne.network===b?b.Bo(ae):E.network===b?(ae=E.Hj,ae===null&&(ae=new Rn,E.Hj=ae),ae.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(ae=ne.Hj,ae===null&&(ae=new Rn,ne.Hj=ae),ae.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,on.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var fe=E.Hj;if(fe!==null&&0<fe.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var _e=ae=0,Te=fe.count-ne;Te<fe.count;Te++){var je=fe.M(Te),Ve=null;for(te=je.edges.iterator;te.next();){var Qe=te.value;if(Qe.Ax(je)===E){Ve=Qe;break}}Ve!==null&&(_e+=Ve.length,ae+=je.width*je.height)}te=E.centerX,fe=E.centerY,Te=E.width,je=E.height,Ve=E.focus,Qe=Te*je,1>Qe&&(Qe=1),ae=on.sqrt((ae+Qe+_e*_e*4/(ne*ne))/Qe),ne=(ae-1)*Te/2,ae=(ae-1)*je/2,E.bounds=new kn(te-Ve.x-ne,fe-Ve.y-ae,Te+2*ne,je+2*ae),E.focus=new Mt(Ve.x+ne,Ve.y+ae)}}return a.network=b,x}function Bx(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var te=E.Sv,ne=E.Tv;b.bounds=new kn(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new Mt(te,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Fx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,te=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),te=ne.Ss,ne=ne.Qs),te=on.sqrt(te*te+ne*ne)/2;for(var ae=!1,fe=ne=0,_e=0,Te=y.vertexes.iterator;Te.next();){var je=Te.value;1>=je.Vd?fe++:(ae=!0,_e++,ne+=Math.atan2(y.centerY-je.centerY,y.centerX-je.centerX))}if(fe!==0){for(0<_e&&(ne/=_e),_e=y=0,y=ae?2*Math.PI/(fe+1):2*Math.PI/fe,fe%2===0&&(_e=y/2),1<x.count&&x.sort(function(Qe,it){return Qe===null||it===null||Qe===it?0:it.width*it.height-Qe.width*Qe.height}),ae=fe%2===0?0:1,x=x.iterator;x.next();)if(fe=x.value,!(1<fe.Vd||a.isFixed(fe))){for(Te=null,je=fe.edges.iterator;je.next();){Te=je.value;break}je=fe.width;var Ve=fe.height;je=on.sqrt(je*je+Ve*Ve)/2,Te=te+Te.length+je,je=ne+(y*(ae/2>>1)+_e)*(ae%2===0?1:-1),fe.centerX=b+Te*Math.cos(je),fe.centerY=E+Te*Math.sin(je),ae++}}}}function jS(a,y,x,b,E,te,ne){var ae=9e19,fe=-1,_e=0;e:for(;_e<y;_e++){var Te=a[_e],je=Te.x-x,Ve=Te.y-b;if(je=je*je+Ve*Ve,je<ae){for(Ve=_e-1;0<=Ve;Ve--)if(a[Ve].y>Te.y&&a[Ve].x-Te.x<E+ne.width)continue e;for(Ve=_e+1;Ve<y;Ve++)if(a[Ve].x>Te.x&&a[Ve].y-Te.y<te+ne.height)continue e;fe=_e,ae=je}}return fe}Aa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Aa.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var te=E.value;if(te.toVertex===a){x=te;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(te=E.value,te.fromVertex===a){x=te;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var te=y.bounds,ne=te.x;y=te.y;var ae=te.width;return te=te.height,b+E<ne?a>y+te?(x=b+E-ne,a=a-y-te,on.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,on.sqrt(b*b+a*a)):ne-(b+E):b>ne+ae?a>y+te?(x=b-ne-ae,a=a-y-te,on.sqrt(x*x+a*a)):a+x<y?(b=b-ne-ae,a=a+x-y,on.sqrt(b*b+a*a)):b-(ne+ae):a>y+te?a-(y+te):a+x<y?y-(a+x):.1}function HS(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jx(a)););a.ah=null}function jx(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var b=x.centerX,E=b,te=x=x.centerY,ne=1;ne<y.length;ne++){var ae=y[ne];ae.forceX=0,ae.forceY=0;var fe=ae.centerX;ae=ae.centerY,b=Math.min(b,fe),E=Math.max(E,fe),x=Math.min(x,ae),te=Math.max(te,ae)}(E=E-b>te-x)?y.sort(function(ct,Dt){return ct===null||Dt===null||ct===Dt?0:ct.centerX-Dt.centerX}):y.sort(function(ct,Dt){return ct===null||Dt===null||ct===Dt?0:ct.centerY-Dt.centerY}),x=a.Zf;var _e=b=ae=0;for(te=0;te<y.length;te++){ne=y[te],b=ne.bounds,ae=ne.focus,fe=b.x+ae.x;var Te=b.y+ae.y;b=ne.charge*a.electricalFieldX(fe,Te),_e=ne.charge*a.electricalFieldY(fe,Te),b+=ne.mass*a.gravitationalFieldX(fe,Te),_e+=ne.mass*a.gravitationalFieldY(fe,Te),ne.forceX+=b,ne.forceY+=_e;for(var je=te+1;je<y.length;je++){var Ve=y[je];if(Ve!==ne){b=Ve.bounds,ae=Ve.focus,_e=b.x+ae.x;var Qe=b.y+ae.y;if(fe-_e>x||_e-fe>x){if(E)break}else if(Te-Qe>x||Qe-Te>x){if(!E)break}else{var it=zS(ne,Ve);1>it?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new _0),it=b.random(),ae=b.random(),fe>_e?(b=Math.abs(Ve.bounds.right-ne.bounds.x),b=(1+b)*it):fe<_e?(b=Math.abs(Ve.bounds.x-ne.bounds.right),b=-(1+b)*it):(b=Math.max(Ve.width,ne.width),b=(1+b)*it-b/2),Te>Qe?(_e=Math.abs(Ve.bounds.bottom-ne.bounds.y),_e=(1+_e)*ae):fe<_e?(_e=Math.abs(Ve.bounds.y-ne.bounds.bottom),_e=-(1+_e)*ae):(_e=Math.max(Ve.height,ne.height),_e=(1+_e)*ae-_e/2)):(ae=-(ne.charge*Ve.charge)/(it*it),b=(_e-fe)/it*ae,_e=(Qe-Te)/it*ae),ne.forceX+=b,ne.forceY+=_e,Ve.forceX-=b,Ve.forceY-=_e}}}}for(E=a.network.edges.iterator;E.next();)ae=E.value,x=ae.fromVertex,te=ae.toVertex,ne=x.bounds,fe=x.focus,b=ne.x+fe.x,ne=ne.y+fe.y,Te=te.bounds,je=te.focus,fe=Te.x+je.x,Te=Te.y+je.y,je=zS(x,te),1>je?(je=a.randomNumberGenerator,je===null&&(a.randomNumberGenerator=je=new _0),ae=je.random(),je=je.random(),b=(b>fe?1:-1)*(1+(te.width>x.width?te.width:x.width))*ae,_e=(ne>Te?1:-1)*(1+(te.height>x.height?te.height:x.height))*je):(ae=ae.stiffness*(je-ae.length),b=(fe-b)/je*ae,_e=(Te-ne)/je*ae),x.forceX+=b,x.forceY+=_e,te.forceX-=b,te.forceY-=_e;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}Aa.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},Aa.prototype.moveFixedVertex=function(){},Aa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Aa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=oo,y.toSpot=oo)}},Aa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=kn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,kn.free(x)}x=kn.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}kn.free(x)},Aa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Aa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Aa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Aa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Aa.prototype.electricalFieldX=function(){return 0},Aa.prototype.electricalFieldY=function(){return 0},Aa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Aa.prototype.gravitationalFieldX=function(){return 0},Aa.prototype.gravitationalFieldY=function(){return 0},Aa.prototype.isFixed=function(a){return a.isFixed},Ye.Object.defineProperties(Aa.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&Nt('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),Aa.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Rf(a){ko.call(this,a)}qe(Rf,ko),Rf.prototype.createVertex=function(){return new Hg(this)},Rf.prototype.createEdge=function(){return new Ug(this)},Rf.className="ForceDirectedNetwork";function Hg(a){aa.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}qe(Hg,aa),Ye.Object.defineProperties(Hg.prototype,{isFixed:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},charge:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},mass:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},forceX:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},forceY:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}}}),Hg.className="ForceDirectedVertex";function Ug(a){Gl.call(this,a),this.j=this.o=NaN}qe(Ug,Gl),Ye.Object.defineProperties(Ug.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),Ug.className="ForceDirectedEdge";function _0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}_0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},_0.className="RandomNumberGenerator";function yo(a){es.call(this),this.kc=this.ie=25,this.K=0,this.Dk=k0,this.Zk=A0,this.Qk=N0,this.bj=4,this.rk=O0,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new Mt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}qe(yo,es),yo.prototype.cloneProtected=function(a){es.prototype.cloneProtected.call(this,a),a.ie=this.ie,a.kc=this.kc,a.K=this.K,a.Dk=this.Dk,a.Zk=this.Zk,a.Qk=this.Qk,a.bj=this.bj,a.rk=this.rk,a.bg=this.bg,a.sf=this.sf,a.Cn=this.Cn,a.ve=this.ve},yo.prototype.qb=function(a){a.classType===yo?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:Nt("Unknown enum value: "+a):es.prototype.qb.call(this,a)},yo.prototype.createNetwork=function(){return new Np(this)},yo.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Wg&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Wg&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,te=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||te.node===null&&te.data===null)&&E.layer===te.layer)){var ne=0,ae=0,fe=0,_e=0;if(b.link!==null){if(ae=b.link,ae===null)continue;var Te=E.node;if(ne=te.node,Te===null||ne===null)continue;var je=ae.fromNode;fe=ae.toNode;for(var Ve=ae.fromPort;Ve!==null&&!Ve.Ed();)Ve=Ve.panel;for(ae=ae.toPort;ae!==null&&!ae.Ed();)ae=ae.panel;if(b.rev){_e=je;var Qe=Ve;je=fe,Ve=ae,fe=_e,ae=Qe}var it=E.focus;_e=te.focus;var ct=b.rev?te.bounds:E.bounds;Qe=Mt.alloc(),Te!==je?ct.w()&&je.isVisible()?je.actualBounds.w()?(Dh(je,Ve,jr,Qe),Qe.x+=je.actualBounds.x-ct.x,Qe.y+=je.actualBounds.y-ct.y):(Dh(je,Ve,jr,Qe),Qe.w()||Qe.assign(it)):Qe.assign(it):ct.w()?(Dh(je,Ve,jr,Qe),Qe.w()||Qe.assign(it)):Qe.assign(it),je=b.rev?E.bounds:te.bounds,Te=Mt.alloc(),ne!==fe?je.w()&&fe.isVisible()?fe.actualBounds.w()?(Dh(fe,ae,jr,Te),Te.x+=fe.actualBounds.x-je.x,Te.y+=fe.actualBounds.y-je.y):(Dh(fe,ae,jr,Te),Te.w()||Te.assign(_e)):Te.assign(_e):je.w()?(Dh(fe,ae,jr,Te),Te.w()||Te.assign(_e)):Te.assign(_e),this.K===90||this.K===270?(ne=Math.round((Qe.x-it.x)/this.kc),fe=Qe.x,ae=Math.round((Te.x-_e.x)/this.kc),_e=Te.x):(ne=Math.round((Qe.y-it.y)/this.kc),fe=Qe.y,ae=Math.round((Te.y-_e.y)/this.kc),_e=Te.y),Mt.free(Qe),Mt.free(Te),b.portFromColOffset=ne,b.portFromPos=fe,b.portToColOffset=ae,b.portToPos=_e}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Qe=E.layer,Te=te.layer,je=0,ct=b.link,ct!==null){var Dt=ct.fromPort,Lt=ct.toPort;if(Dt!==null&&Lt!==null){var Gt=ct.fromNode;if(Ve=ct.toNode,Gt!==null&&Ve!==null){var Zt=T0(this,!0),Vt=T0(this,!1),qt=this.setsPortSpots?Zt:ct.computeSpot(!0,Dt);it=this.setsPortSpots?Vt:ct.computeSpot(!1,Lt);var yn=ct.isOrthogonal;qt.$c()&&qt.Hf(Vt)&&it.$c()&&it.Hf(Zt)?je=0:(Zt=ct.getLinkPoint(Gt,Dt,qt,!0,yn,Ve,Lt,Mt.alloc()),Vt=ct.getLinkDirection(Gt,Dt,Zt,qt,!0,yn,Ve,Lt),Mt.free(Zt),qt.ys()||Vt!==JS(this,b,!0)?this.setsPortSpots&&Gt!==null&&Gt.ports.count===1&&b.rev&&(je+=1):je+=1,qt=ct.getLinkPoint(Ve,Lt,it,!1,yn,Gt,Dt,Mt.alloc()),ct=ct.getLinkDirection(Ve,Lt,qt,it,!1,yn,Gt,Dt),Mt.free(qt),it.ys()||ct!==JS(this,b,!1)?this.setsPortSpots&&Ve!==null&&Ve.ports.count===1&&b.rev&&(je+=2):je+=2)}}}if(Ve=je,je=Ve===1||Ve===3,(Ve=Ve===2||Ve===3)&&(it=a.createVertex(),it.node=null,it.Dj=1,it.layer=Qe,it.near=E,a.dh(it),E=a.Zj(E,it,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=fe,E.portToPos=0,E=it),ct=1,je&&ct--,Qe-Te>ct&&0<Qe){for(b.valid=!1,it=a.createVertex(),it.node=null,it.Dj=2,it.layer=Qe-1,a.dh(it),E=a.Zj(E,it,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=Ve?0:ne,E.portToColOffset=0,E.portFromPos=Ve?0:fe,E.portToPos=0,E=it,Qe--;Qe-Te>ct&&0<Qe;)it=a.createVertex(),it.node=null,it.Dj=3,it.layer=Qe-1,a.dh(it),E=a.Zj(E,it,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=it,Qe--;E=a.Zj(it,te,b.link),E.valid=!je,je&&(it.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=ae,E.portFromPos=0,E.portToPos=_e}else b.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=Sd(this,a),x=0,b=this.tc[a],te=0;te<b;te++)E=y[te],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),xd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},yo.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}yo.prototype.nodeMinLayerSpace=function(a,y){return a.node===null&&a.data===null?0:this.K===90||this.K===270?y?a.focus.y+10:a.bounds.height-a.focus.y+10:y?a.focus.x+10:a.bounds.width-a.focus.x+10},yo.prototype.nodeMinColumnSpace=function(a,y){if(a.node===null&&a.data===null)return 0;var x=y?a.ev:a.dv;return x!==null?x:(x=this.K,x===90||x===270?y?a.ev=a.focus.x/this.kc+1|0:a.dv=(a.bounds.width-a.focus.x)/this.kc+1|0:y?a.ev=a.focus.y/this.kc+1|0:a.dv=(a.bounds.height-a.focus.y)/this.kc+1|0)};function Sl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var b=x.value;a.kj[y]=b.layer,y++,a.kj[y]=b.column,y++,a.kj[y]=b.index,y++}return a.kj}function wu(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var b=a.value;b.layer=y[x],x++,b.column=y[x],x++,b.index=y[x],x++}}function GS(a,y,x){var b=Sd(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var te=a.Jn,ne=0;ne<E;ne++){var ae=0,fe=b[ne],_e=fe.near;if(_e!==null&&_e.layer===fe.layer)if(fe=_e.index,fe>ne)for(var Te=ne+1;Te<fe;Te++){var je=b[Te];je.near===_e&&je.Dj===_e.Dj||ae++}else for(Te=ne-1;Te>fe;Te--)je=b[Te],je.near===_e&&je.Dj===_e.Dj||ae++;var Ve;if(0<=x)for(fe=b[ne].sourceEdgesArrayAccess,_e=0;_e<fe.length;_e++){var Qe=fe[_e];if(Qe.valid&&Qe.fromVertex.layer!==y)for(je=Qe.fromVertex.index,Te=Qe.portToPos,Qe=Qe.portFromPos,Ve=_e+1;Ve<fe.length;Ve++){var it=fe[Ve];if(it.valid&&it.fromVertex.layer!==y){var ct=it.fromVertex.index,Dt=it.portToPos;it=it.portFromPos,Te<Dt&&(je>ct||je===ct&&Qe>it)&&ae++,Dt<Te&&(ct>je||ct===je&&it>Qe)&&ae++}}}if(0>=x){for(fe=b[ne].destinationEdgesArrayAccess,_e=0;_e<fe.length;_e++)if(Qe=fe[_e],Qe.valid&&Qe.toVertex.layer!==y)for(je=Qe.toVertex.index,Te=Qe.portToPos,Qe=Qe.portFromPos,Ve=_e+1;Ve<fe.length;Ve++)it=fe[Ve],it.valid&&it.toVertex.layer!==y&&(ct=it.toVertex.index,Dt=it.portToPos,it=it.portFromPos,Qe<it&&(je>ct||je===ct&&Te>Dt)&&ae++,it<Qe&&(ct>je||ct===je&&Dt>Te)&&ae++)}for(te[ne*E+ne]=ae,fe=ne+1;fe<E;fe++){var Lt=0,Gt=0;if(0<=x){ae=b[ne].sourceEdgesArrayAccess;var Zt=b[fe].sourceEdgesArrayAccess;for(_e=0;_e<ae.length;_e++)if(Qe=ae[_e],Qe.valid&&Qe.fromVertex.layer!==y)for(je=Qe.fromVertex.index,Qe=Qe.portFromPos,Ve=0;Ve<Zt.length;Ve++)it=Zt[Ve],it.valid&&it.fromVertex.layer!==y&&(ct=it.fromVertex.index,it=it.portFromPos,(je<ct||je===ct&&Qe<it)&&Gt++,(ct<je||ct===je&&it<Qe)&&Lt++)}if(0>=x){for(ae=b[ne].destinationEdgesArrayAccess,Zt=b[fe].destinationEdgesArrayAccess,_e=0;_e<ae.length;_e++)if(Qe=ae[_e],Qe.valid&&Qe.toVertex.layer!==y)for(je=Qe.toVertex.index,Te=Qe.portToPos,Ve=0;Ve<Zt.length;Ve++)it=Zt[Ve],it.valid&&it.toVertex.layer!==y&&(ct=it.toVertex.index,Dt=it.portToPos,(je<ct||je===ct&&Te<Dt)&&Gt++,(ct<je||ct===je&&Dt<Te)&&Lt++)}te[ne*E+fe]=Lt,te[fe*E+ne]=Gt}}return xd(a,y,b),te}yo.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=GS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var te=E;te<b;te++)a+=x[E*b+te];return a};function E0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=Sd(b,E),ne=b.tc[E],ae=0,fe=0;fe<ne;fe++){var _e=te[fe].destinationEdgesArrayAccess;if(_e!==null)for(var Te=0;Te<_e.length;Te++){var je=_e[Te];if(je.valid&&je.toVertex.layer!==E){var Ve=je.fromVertex.column+je.portFromColOffset,Qe=je.toVertex.column+je.portToColOffset;ae+=(Math.abs(Ve-Qe)+1)*gy(je)}}}xd(b,E,te),y+=ae}return y}yo.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function my(a,y,x){for(var b=Sd(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var ae=b[ne],fe=null;0>=x&&(fe=ae.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=ae.destinationEdgesArrayAccess);var Te=0,je=0,Ve=ae.near;if(Ve!==null&&Ve.layer===ae.layer&&(Te+=Ve.column-1,je++),fe!==null)for(Ve=0;Ve<fe.length;Ve++){ae=fe[Ve];var Qe=ae.fromVertex;ae.valid&&!ae.rev&&Qe.layer!==y&&(Te+=Qe.column,je++)}if(_e!==null)for(fe=0;fe<_e.length;fe++)ae=_e[fe],Ve=ae.toVertex,ae.valid&&!ae.rev&&Ve.layer!==y&&(Te+=Ve.column,je++);te[ne]=je===0?-1:Te/je}return xd(a,y,b),te}function WS(a,y,x){for(var b=Sd(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var ae=b[ne],fe=null;0>=x&&(fe=ae.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=ae.destinationEdgesArrayAccess);var Te=0,je=[],Ve=ae.near;if(Ve!==null&&Ve.layer===ae.layer&&(je[Te]=Ve.column-1,Te++),ae=void 0,fe!==null)for(Ve=0;Ve<fe.length;Ve++){ae=fe[Ve];var Qe=ae.fromVertex;ae.valid&&!ae.rev&&Qe.layer!==y&&(je[Te]=Qe.column+ae.portFromColOffset,Te++)}if(_e!==null)for(fe=0;fe<_e.length;fe++)ae=_e[fe],Ve=ae.toVertex,ae.valid&&!ae.rev&&Ve.layer!==y&&(je[Te]=Ve.column+ae.portToColOffset,Te++);Te===0?te[ne]=-1:(je.sort(function(it,ct){return it-ct}),_e=Te>>1,te[ne]=Te&1?je[_e]:je[_e-1]+je[_e]>>1)}return xd(a,y,b),te}function Gg(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var ae=ne.value,fe=ae.toVertex,_e=y.layer-fe.layer;ae=a.linkMinLength(ae),_e===ae&&Gg(a,fe,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)ae=ne.value,fe=ae.fromVertex,_e=fe.layer-y.layer,ae=a.linkMinLength(ae),_e===ae&&Gg(a,fe,x,b,E,te)}}function vy(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,te);if(te)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,te)}}yo.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=ZS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=ZS(a);for(E=KS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=KS(a);E=null;for(var te=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value;if(ae.valid){for(var fe=0,_e=ae.destinationEdges;_e.next();)_e.value.toVertex.valid&&fe++;_e=0;for(var Te=ae.sourceEdges;Te.next();)Te.value.fromVertex.valid&&_e++;(E===null||te<fe-_e)&&(E=ae,te=fe-_e)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case k0:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&yy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&yy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,te=E.finish,E.Ll<y.Ll&&x<te&&(this.network.gm(b),b.rev=!0));break;case Wg:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(te=0;te<E.length;te++)E[te].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function ZS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}yo.prototype.assignLayers=function(){switch(this.Zk){case wy:VS(this);break;case by:for(var a,y=this.network.vertexes.iterator;y.next();)a=YS(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case A0:for(VS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&XS(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function VS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=$S(a,y.value);a.Ia=Math.max(x,a.Ia)}}function $S(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,te=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,$S(a,te)+E)}y.layer=x}else x=y.layer;return x}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,te=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,te)+E)}y.layer=x}else x=y.layer;return x}function XS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)XS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,te=0;te<E;te++){var ne=b[te],ae=ne.fromVertex,fe=ne.toVertex;ne=a.linkMinLength(ne),ae.layer-fe.layer>ne&&Gg(a,ae,0,-1,!0,!1)}for(Gg(a,y,1,-1,!0,!0);y.component!==0;){for(te=0,b=1/0,ae=0,fe=null,ne=a.network.vertexes.iterator;ne.next();){var _e=ne.value;if(_e.component===1){var Te=0,je=!1,Ve=_e.sourceEdgesArrayAccess;E=Ve.length;for(var Qe=0;Qe<E;Qe++){var it=Ve[Qe],ct=it.fromVertex;Te+=1,ct.component!==1&&(te+=1,ct=ct.layer-_e.layer,it=a.linkMinLength(it),b=Math.min(b,ct-it))}for(Ve=_e.destinationEdgesArrayAccess,E=Ve.length,Qe=0;Qe<E;Qe++)it=Ve[Qe].toVertex,--Te,it.component!==1?--te:je=!0;(fe===null||Te<ae)&&!je&&(fe=_e,ae=Te)}}if(0<te){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else fe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Gg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,te=0,ae=null,fe=a.network.vertexes.iterator;fe.next();)if(ne=fe.value,ne.component===1){for(_e=0,Te=!1,Ve=ne.sourceEdgesArrayAccess,je=Ve.length,Qe=0;Qe<je;Qe++)it=Ve[Qe].fromVertex,_e+=1,it.component!==1?b+=1:Te=!0;for(Ve=ne.destinationEdgesArrayAccess,je=Ve.length,Qe=0;Qe<je;Qe++)it=Ve[Qe],ct=it.toVertex,--_e,ct.component!==1&&(--b,ct=ne.layer-ct.layer,it=a.linkMinLength(it),E=Math.min(E,ct-it));(ae===null||_e>te)&&!Te&&(ae=ne,te=_e)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else ae.component=0}}}function JS(a,y,x){return a.K===90?x&&!y.rev||!x&&y.rev?270:90:a.K===180?x&&!y.rev||!x&&y.rev?0:180:a.K===270?x&&!y.rev||!x&&y.rev?90:270:x&&!y.rev||!x&&y.rev?180:0}yo.prototype.initializeIndices=function(){switch(this.Qk){default:case Py:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case N0:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&QS(this,x);break;case Cy:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&qS(this,x)}};function QS(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var b=0;b<y.length-1;b++){var E=y[b],te=y[b+1];E.portFromColOffset>te.portFromColOffset&&(x=!0,y[b]=te,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&QS(a,b))}function qS(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var b=!0;b;)for(b=!1,x=0;x<y.length-1;x++){var E=y[x],te=y[x+1];E.portToColOffset>te.portToColOffset&&(b=!0,y[x]=te,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&qS(a,b))}yo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Sl(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)L0(this,b,1),Bu(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=Sl(this)),b=this.Ia;0<=b;b--)L0(this,b,-1),Bu(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=Sl(this))}for(wu(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)L0(this,b,0),Bu(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=Sl(this)),b=this.Ia;0<=b;b--)L0(this,b,0),Bu(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=Sl(this))}wu(this,y);var te,ne,ae;switch(this.rk){case _y:break;case Ey:for(ae=a+1;(b=this.countCrossings())<ae;)for(ae=b,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,-1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,0)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,0)||te;E>=a?wu(this,y):(a=E,y=Sl(this))}break;default:case O0:for(x=this.Ia,ne=0,ae=a+1;(b=this.countCrossings())<ae;){for(ae=b,te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,1)||te;for(E=this.countCrossings(),E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,-1)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,0)||te;for(E>=a?wu(this,y):(a=E,y=Sl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,0)||te;E>=a?wu(this,y):(a=E,y=Sl(this))}}wu(this,y)};function L0(a,y,x){var b=Sd(a,y),E=a.tc[y],te=WS(a,y,x),ne=my(a,y,x);for(x=0;x<E;x++)ne[x]===-1&&(ne[x]=b[x].column),te[x]===-1&&(te[x]=b[x].column);for(var ae=!0,fe;ae;)for(ae=!1,x=0;x<E-1;x++)(te[x+1]<te[x]||te[x+1]===te[x]&&ne[x+1]<ne[x])&&(ae=!0,fe=te[x],te[x]=te[x+1],te[x+1]=fe,fe=ne[x],ne[x]=ne[x+1],ne[x+1]=fe,fe=b[x],b[x]=b[x+1],b[x+1]=fe);for(x=te=0;x<E;x++)fe=b[x],fe.index=x,te+=a.nodeMinColumnSpace(fe,!0),fe.column=te,te+=1,te+=a.nodeMinColumnSpace(fe,!1);xd(a,y,b)}function Bu(a,y,x){var b=Sd(a,y),E=a.tc[y];x=GS(a,y,x);var te,ne=[];for(te=0;te<E;te++)ne[te]=-1;var ae=[];for(te=0;te<E;te++)ae[te]=-1;for(var fe=!1,_e=!0;_e;)for(_e=!1,te=0;te<E-1;te++){var Te=x[b[te].index*E+b[te+1].index],je=x[b[te+1].index*E+b[te].index],Ve=0,Qe=0,it=b[te].column,ct=b[te+1].column,Dt=a.nodeMinColumnSpace(b[te],!0),Lt=a.nodeMinColumnSpace(b[te],!1),Gt=a.nodeMinColumnSpace(b[te+1],!0),Zt=a.nodeMinColumnSpace(b[te+1],!1);Dt=it-Dt+Gt,Lt=ct-Lt+Zt;var Vt=b[te].sourceEdges.iterator;for(Vt.reset();Vt.next();)if(Gt=Vt.value,Zt=Gt.fromVertex,Gt.valid&&Zt.layer===y){for(Gt=0;b[Gt]!==Zt;)Gt++;Gt<te&&(Ve+=2*(te-Gt),Qe+=2*(te+1-Gt)),Gt===te+1&&(Ve+=1),Gt>te+1&&(Ve+=4*(Gt-te),Qe+=4*(Gt-(te+1)))}for(Vt=b[te].destinationEdges.iterator,Vt.reset();Vt.next();)if(Gt=Vt.value,Zt=Gt.toVertex,Gt.valid&&Zt.layer===y){for(Gt=0;b[Gt]!==Zt;)Gt++;Gt===te+1&&(Qe+=1)}for(Vt=b[te+1].sourceEdges.iterator,Vt.reset();Vt.next();)if(Gt=Vt.value,Zt=Gt.fromVertex,Gt.valid&&Zt.layer===y){for(Gt=0;b[Gt]!==Zt;)Gt++;Gt<te&&(Ve+=2*(te+1-Gt),Qe+=2*(te-Gt)),Gt===te&&(Qe+=1),Gt>te+1&&(Ve+=4*(Gt-(te+1)),Qe+=4*(Gt-te))}for(Vt=b[te+1].destinationEdges.iterator,Vt.reset();Vt.next();)if(Gt=Vt.value,Zt=Gt.toVertex,Gt.valid&&Zt.layer===y){for(Gt=0;b[Gt]!==Zt;)Gt++;Gt===te&&(Ve+=1)}Gt=Zt=0,Vt=ne[b[te].index];var qt=ae[b[te].index],yn=ne[b[te+1].index],ii=ae[b[te+1].index];Vt!==-1&&(Zt+=Math.abs(Vt-it),Gt+=Math.abs(Vt-Lt)),qt!==-1&&(Zt+=Math.abs(qt-it),Gt+=Math.abs(qt-Lt)),yn!==-1&&(Zt+=Math.abs(yn-ct),Gt+=Math.abs(yn-Dt)),ii!==-1&&(Zt+=Math.abs(ii-ct),Gt+=Math.abs(ii-Dt)),(Qe<Ve-.5||Qe===Ve&&je<Te-.5||Qe===Ve&&je===Te&&Gt<Zt-.5)&&(_e=fe=!0,b[te].column=Lt,b[te+1].column=Dt,Te=b[te],b[te]=b[te+1],b[te+1]=Te)}for(te=0;te<E;te++)b[te].index=te;return xd(a,y,b),fe}yo.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&$x)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var b,E=this.network.vertexes.iterator;E.next();){var te=E.value;y=te.layer,b=te.column,te=this.nodeMinColumnSpace(te,!1),x[y]=Math.max(x[y],b+te)}for(E.reset();E.next();)te=E.value,y=te.layer,b=te.column,te.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Ap(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Ap(this,y,-1)||x;x=Ap(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Sy(this,y,1);for(y=this.Md-1;0<=y;y--)Sy(this,y,-1);Sy(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Ap(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Ap(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Ap(this,y,0)||x}}else Wx(this)};function Ap(a,y,x){for(var b=!1;Hx(a,y,x);)b=!0;return b}function Hx(a,y,x){var b,E=Sd(a,y),te=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<te;b++)ne[b]=-1;var ae=my(a,y,1);if(0>x)for(b=0;b<te;b++)ae[b]=-1;for(var fe=!1,_e=!0;_e;)for(_e=!1,b=0;b<te;b++){var Te=E[b].column,je=a.nodeMinColumnSpace(E[b],!0),Ve=a.nodeMinColumnSpace(E[b],!1),Qe=0;0>b-1||Te-E[b-1].column-1>je+a.nodeMinColumnSpace(E[b-1],!1)?Qe=Te-1:Qe=Te,je=b+1>=te||E[b+1].column-Te-1>Ve+a.nodeMinColumnSpace(E[b+1],!0)?Te+1:Te;var it=Ve=0,ct=0;if(0>=x)for(var Dt=E[b].sourceEdges.iterator;Dt.next();){var Lt=Dt.value,Gt=Lt.fromVertex;if(Lt.valid&&Gt.layer!==y){var Zt=gy(Lt),Vt=Lt.portFromColOffset;Lt=Lt.portToColOffset,Gt=Gt.column,Ve+=(Math.abs(Te+Lt-(Gt+Vt))+1)*Zt,it+=(Math.abs(Qe+Lt-(Gt+Vt))+1)*Zt,ct+=(Math.abs(je+Lt-(Gt+Vt))+1)*Zt}}if(0<=x)for(Dt=E[b].destinationEdges.iterator;Dt.next();)Lt=Dt.value,Gt=Lt.toVertex,Lt.valid&&Gt.layer!==y&&(Zt=gy(Lt),Vt=Lt.portFromColOffset,Lt=Lt.portToColOffset,Gt=Gt.column,Ve+=(Math.abs(Te+Vt-(Gt+Lt))+1)*Zt,it+=(Math.abs(Qe+Vt-(Gt+Lt))+1)*Zt,ct+=(Math.abs(je+Vt-(Gt+Lt))+1)*Zt);Lt=Vt=Zt=0,Dt=ne[E[b].index],Gt=ae[E[b].index],Dt!==-1&&(Zt+=Math.abs(Dt-Te),Vt+=Math.abs(Dt-Qe),Lt+=Math.abs(Dt-je)),Gt!==-1&&(Zt+=Math.abs(Gt-Te),Vt+=Math.abs(Gt-Qe),Lt+=Math.abs(Gt-je)),it<Ve||it===Ve&&Vt<Zt?(_e=fe=!0,E[b].column=Qe):(ct<Ve||ct===Ve&&Lt<Zt)&&(_e=fe=!0,E[b].column=je)}return xd(a,y,E),a.normalize(),fe}function Sy(a,y,x){var b=Sd(a,y),E=a.tc[y],te=WS(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=te[x];for(te=!0;te;)for(te=!1,x=0;x<E;x++){var ae=b[x].column,fe=a.nodeMinColumnSpace(b[x],!0),_e=a.nodeMinColumnSpace(b[x],!1),Te=0;if(ne[x]===-1)if(x===0&&x===E-1)Te=ae;else if(x===0){var je=b[x+1].column;je-ae===_e+a.nodeMinColumnSpace(b[x+1],!0)?Te=ae-1:Te=ae}else x===E-1?(je=b[x-1].column,Te=ae-je===fe+a.nodeMinColumnSpace(b[x-1],!1)?ae+1:ae):(je=b[x-1].column,fe=je+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,je=b[x+1].column,_e=je-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Te=(fe+_e)/2|0);else x===0&&x===E-1?Te=ne[x]:x===0?(je=b[x+1].column,_e=je-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Te=Math.min(ne[x],_e)):x===E-1?(je=b[x-1].column,fe=je+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,Te=Math.max(ne[x],fe)):(je=b[x-1].column,fe=je+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,je=b[x+1].column,_e=je-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,fe<ne[x]&&ne[x]<_e?Te=ne[x]:fe>=ne[x]?Te=fe:_e<=ne[x]&&(Te=_e));Te!==ae&&(te=!0,b[x].column=Te)}xd(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,te=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-te<=y&&E.column+ne>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Gx(a,y){var x=y+1,b,E=[],te=[];for(b=0;b<=a.Ia;b++)E[b]=!1,te[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var ae=b.column-a.nodeMinColumnSpace(b,!0),fe=b.column+a.nodeMinColumnSpace(b,!1);ae<=y&&fe>=y&&(E[b.layer]=!0),ae<=x&&fe>=x&&(te[b.layer]=!0)}for(ae=!0,x=!1,b=0;b<=a.Ia;b++)ae=ae&&!(E[b]&&te[b]);if(ae)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Gx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=Sl(a),te=E0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=E0(a);ne>te?wu(a,E):ne<te&&(te=ne,E=Sl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=Sl(a),te=E0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=E0(a),ne>te?wu(a,E):ne<te&&(te=ne,E=Sl(a));a.normalize()}function tx(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(vy(a,y,a.le,-1,!0,!0),a.le++);var te;for(y=[],te=0;te<a.le*a.le;te++)y[te]=!1;for(E=[],te=0;te<(a.Ia+1)*(a.Ra+1);te++)E[te]=-1;for(b.reset();b.next();){te=b.value;for(var ne=te.layer,ae=Math.max(0,te.column-a.nodeMinColumnSpace(te,!0)),fe=Math.min(a.Ra,te.column+a.nodeMinColumnSpace(te,!1));ae<=fe;ae++)E[ne*(a.Ra+1)+ae]=te.component}for(te=0;te<=a.Ia;te++){if(0<x)for(ne=0;ne<a.Ra;ne++)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne+1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne+1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne-1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne-1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne-1]]=!0)}for(E=[],te=0;te<a.le;te++)E[te]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(fe=ne[ne.length-1],ne.pop(),E[fe])for(E[fe]=!1,te=0;te<a.le;te++)y[fe*a.le+te]&&ne.splice(0,0,te);if(0<x)for(b.reset();b.next();)a=b.value,E[a.component]&&--a.column;if(0>x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Wx(a){for(var y=Gn(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new Nn,Zx(y,x);var te=null,ne=null,ae=null,fe=null,_e=(a.ve&1)!==0,Te=(a.ve&2)!==0,je=(a.ve&4)!==0,Ve=(a.ve&8)!==0;for(_e&&(a.verticalAlignment(y,x,!0),te=M0(a,y,!0,!1)),y.reverse(),je&&(a.verticalAlignment(y,x,!1),ae=M0(a,y,!1,!1)),b=Ar(y),E=b.next();!E.done;E=b.next())E.value.reverse();Ve&&(a.verticalAlignment(y,x,!1),fe=M0(a,y,!1,!0)),y.reverse(),Te&&(a.verticalAlignment(y,x,!0),ne=M0(a,y,!0,!0)),ti(y),a.u(te,ne,ae,fe),a.network.vertexes.each(function(Qe){var it=Gn();_e&&it.push(te.get(Qe)),Te&&it.push(ne.get(Qe)),je&&it.push(ae.get(Qe)),Ve&&it.push(fe.get(Qe)),it.sort(function(Dt,Lt){return Dt-Lt});var ct=it.length;ct=(it[Math.floor((ct-1)/2)]+it[Math.ceil((ct-1)/2)])/2,ti(it),Qe.zc=ct})}function Zx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,te=0,ne=a[b],ae=a[b+1],fe=0;te<ae.length;fe++){var _e=ae[fe];e:{if(_e.node===null){var Te=Ly(_e);if(0<Te.length){Te=Te[0].node===null;break e}}Te=!1}var je=Te;if(fe===ae.length-1||je){for(Te=ne.length-1,je&&(Te=Ly(_e)[0].index);te<=fe;){if(_e=ae[te],!_e.bo){je=[];for(var Ve=Ar(_e.sourceEdgesArrayAccess),Qe=Ve.next();!Qe.done;Qe=Ve.next())Qe=Qe.value,Qe.valid&&je.push(Qe);_e.bo=je}for(_e=Ar(_e.bo),je=_e.next();!je.done;je=_e.next())je=je.value,Ve=je.fromVertex.index,(Ve<E||Ve>Te)&&y.add(je);te++}E=Te}}}yo.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Ar(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Ar(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?Ly(te):Yx(te),ae=ne.length;if(0<ae){ne.sort(function(je,Ve){return je.vi-Ve.vi});var fe=(ae-1)/2;for(ae=Math.floor(fe),fe=Math.ceil(fe);ae<=fe;ae++)if(te.align===te){var _e=ne[ae],Te=void 0;Te=x?I0(_e,te):I0(te,_e),!y.contains(Te)&&E<_e.vi&&(_e.align=te,te.root=_e.root,te.align=_e.root,E=_e.vi)}}}}};function Kx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function M0(a,y,x,b){for(var E=a.K===90||a.K===270,te=Ar(y),ne=te.next();!ne.done;ne=te.next()){var ae=Ar(ne.value);for(ne=ae.next();!ne.done;ne=ae.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,te=Ar(y),ae=te.next();!ae.done;ae=te.next()){ae=Ar(ae.value);for(var fe=ae.next();!fe.done;fe=ae.next())if(fe=fe.value,fe.root===fe){for(var _e=0,Te=fe;Te.align!==fe;){var je=Te.align,Ve=ne?Te.width:Te.height,Qe=ne?je.width:je.height;if(x){var it=I0(Te,je),ct=it.portFromPos,Dt=it.portToPos;it.link!==null&&(Te.node&&Te.node!==it.link.fromNode&&(ct=ne?Te.focusX:Te.focusY),je.node&&je.node!==it.link.toNode&&(Dt=ne?je.focusX:je.focusY))}else it=I0(je,Te),ct=it.portToPos,Dt=it.portFromPos,it.link!==null&&(Te.node&&Te.node!==it.link.toNode&&(ct=ne?Te.focusX:Te.focusY),je.node&&je.node!==it.link.fromNode&&(Dt=ne?je.focusX:je.focusY));Ve=b?Te.qg+(Ve-ct)-(Qe-Dt):Te.qg+ct-Dt,je.qg=Ve,_e=Math.min(_e,Ve),Te=Te.align}Te=fe;do Te.qg=Te.qg-_e,Te=Te.align;while(Te!==fe)}}for(x=Ar(y),ne=x.next();!ne.done;ne=x.next())for(te=Ar(ne.value),ne=te.next();!ne.done;ne=te.next())ne=ne.value,ne.root===ne&&nx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,ae=0;do{for(te=y[ne][ae];te.align!==te.root;)te=te.align,ne++,0<te.vi&&(ae=ix(te,y),ae.sd.shift=Math.min(ae.sd.shift,te.sd.shift+te.zc+te.qg-(ae.zc+ae.qg+(E?ae.width:ae.height)+a.columnSpacing)));ae=te.vi+1}while(ne<y.length&&ae<y[ne].length&&te.sd===y[ne][ae].sd)}for(a=new ci,y=Ar(y),ne=y.next();!ne.done;ne=y.next())for(x=Ar(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,te=E?ne.width:ne.height,a.add(ne,b?-ne.zc-te:ne.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=ix(b,x),te=E.root;nx(a,te,x),y.sd===y&&(y.sd=te.sd);var ne=a.K===90||a.K===270?E.width:E.height;y.sd===te.sd&&(y.zc=Math.max(y.zc,te.zc+E.qg+ne-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function ix(a,y){var x=a.Tz;return a=a.vi,1>a&&Nt("Could not determine previous vertex in layer"),y[x][a-1]}yo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Gn(),E=Gn(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var ae=Vx(this,y[ne],b,E,ne);ae<te&&(x=ne,te=ae)}for(te={},ne=0;4>ne;te={delta:te.delta},ne++)y[ne]&&(te.delta=ne===0||ne===2?b[x]-b[ne]:E[x]-E[ne],te.delta!==0&&y[ne].each(function(fe){return function(_e){_e.value+=fe.delta}}(te)));ti(b),ti(E)};function Vx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var te=1/0,ne=-1/0;return y.each(function(ae){var fe=ae.key;ae=ae.value,fe=a.K===90||a.K===270?fe.width:fe.height,ae<te&&(te=ae),ae+fe>ne&&(ne=ae+fe)}),x[E]=te,b[E]=ne,ne-te}yo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=T0(this,!0),y=T0(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function T0(a,y){return a.K===270?y?bs:Ks:a.K===90?y?Ks:bs:a.K===180?y?ks:Zs:y?Zs:ks}yo.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var te=1/0,ne=E=1/0,ae=-1/0;a.next();){var fe=a.value,_e=fe.layer,Te=fe.column|0;b?(ne=y.x+this.kc*Te,_e=this.Kd[_e]):(ne=this.Kd[_e],_e=y.y+this.kc*Te),fe.centerX=ne,fe.centerY=_e,x&&isFinite(fe.zc)&&(b?fe.node?fe.x=y.x+fe.zc:fe.centerX=y.x+fe.zc:fe.node?fe.y=y.y+fe.zc:fe.centerY=y.y+fe.zc),te=Math.min(fe.x,te),E=Math.min(fe.y,E),b?(ne=te,ae=Math.max(ae,fe.bounds.right)):(ne=E,ae=Math.max(ae,fe.bounds.bottom))}for(this.xw=ae-ne,te=y.x-te,y=y.y-E,this.Rf=new Mt(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},yo.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new kn(0,0,x,Math.abs(this.Ta[0]))):y.push(new kn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new kn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new kn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new kn(0,0,Math.abs(this.Ta[0]),x)):y.push(new kn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new kn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new kn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},yo.prototype.commitLayers=function(){},yo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var b=y,E=b.fromNode,te=b.toNode,ne=b.fromPort,ae=b.toPort;if(E!==null){var fe=E.findVisibleNode();fe!==null&&fe!==E&&(E=fe,ne=fe.port)}te!==null&&(fe=te.findVisibleNode(),fe!==null&&fe!==te&&(te=fe,ae=fe.port));var _e=y.computeSpot(!0,ne);fe=y.computeSpot(!1,ae);var Te=x.fromVertex,je=x.toVertex;if(x.valid)y.curve===ou&&y.pointsCount===4&&(Te.column===je.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,_e,!0,!1,te,ae),ae=y.getLinkPoint(te,ae,fe,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),ae.w()||ae.set(te.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+ae.x)/3,(2*x.y+ae.y)/3),y.yf((x.x+2*ae.x)/3,(x.y+2*ae.y)/3),y.yf(ae.x,ae.y)):(x=b=!1,ne!==null&&_e===ms&&(b=!0),ae!==null&&fe===ms&&(x=!0),(b||x)&&(fe=null,b&&(fe=y.getLinkPointFromPoint(E,ne,ne.ga(jr),y.i(3),!0),fe.w()||fe.set(E.actualBounds.center),y.L(0,fe.x,fe.y)),E=null,x&&(E=y.getLinkPointFromPoint(te,ae,ae.ga(jr),y.i(0),!1),E.w()||E.set(te.actualBounds.center),y.L(3,E.x,E.y)),fe&&(te=y.i(2),y.L(1,(2*fe.x+te.x)/3,(2*fe.y+te.y)/3)),E&&(te=y.i(1),y.L(2,(2*E.x+te.x)/3,(2*E.y+te.y)/3))))),y.zf();else if(Te.layer===je.layer)y.zf();else{var Ve=!1,Qe=!1,it=this.ie,ct=y.firstPickIndex+1;if(y.isOrthogonal){Qe=!0;var Dt=y.pointsCount;4<Dt&&y.points.removeRange(2,Dt-3)}else if(y.curve===ou)Ve=!0,Dt=y.pointsCount,4<Dt&&y.points.removeRange(2,Dt-3),Dt===4&&(ct=2);else{Dt=y.pointsCount;var Lt=_e===ms,Gt=fe===ms;2<Dt&&Lt&&Gt?y.points.removeRange(1,Dt-2):3<Dt&&Lt&&!Gt?y.points.removeRange(1,Dt-3):3<Dt&&!Lt&&Gt?y.points.removeRange(2,Dt-2):4<Dt&&!Lt&&!Gt&&y.points.removeRange(2,Dt-3)}if(x.rev){for(;je!==null&&Te!==je;){var Zt=Dt=null;for(Lt=je.sourceEdges.iterator;Lt.next()&&(Gt=Lt.value,Gt.link!==x.link||(Dt=Gt.fromVertex,Zt=Gt.toVertex,Dt.node!==null)););if(Dt===null)break;if(Dt!==Te){Lt=y.i(ct-1).x,Gt=y.i(ct-1).y;var Vt=Dt.centerX,qt=Dt.centerY;if(Qe)this.K===180||this.K===0?ct===y.firstPickIndex+1?(y.m(ct++,Lt,Gt),y.m(ct++,Lt,qt)):(Zt!==null?Zt.centerY:Gt)!==qt&&(Zt=this.Ta[Dt.layer-1]+this.Rf.x,y.m(ct++,Zt,Gt),y.m(ct++,Zt,qt)):ct===y.firstPickIndex+1?(y.m(ct++,Lt,Gt),y.m(ct++,Vt,Gt)):(Zt!==null?Zt.centerX:Lt)!==Vt&&(Zt=this.Ta[Dt.layer-1]+this.Rf.y,y.m(ct++,Lt,Zt),y.m(ct++,Vt,Zt));else if(ct===y.firstPickIndex+1){Zt=Math.max(10,this.he[je.layer]);var yn=Math.max(10,this.Ld[je.layer]);if(Ve)this.K===180?Vt<=je.bounds.x?(je=je.bounds.x,y.m(ct++,je-Zt,qt),y.m(ct++,je,qt),y.m(ct++,je+yn,qt)):(y.m(ct++,Vt-Zt,qt),y.m(ct++,Vt,qt),y.m(ct++,Vt+yn,qt)):this.K===90?qt>=je.bounds.bottom?(je=je.bounds.y+je.bounds.height,y.m(ct++,Vt,je+yn),y.m(ct++,Vt,je),y.m(ct++,Vt,je-Zt)):(y.m(ct++,Vt,qt+yn),y.m(ct++,Vt,qt),y.m(ct++,Vt,qt-Zt)):this.K===270?qt<=je.bounds.y?(je=je.bounds.y,y.m(ct++,Vt,je-Zt),y.m(ct++,Vt,je),y.m(ct++,Vt,je+yn)):(y.m(ct++,Vt,qt-Zt),y.m(ct++,Vt,qt),y.m(ct++,Vt,qt+yn)):this.K===0&&(Vt>=je.bounds.right?(je=je.bounds.x+je.bounds.width,y.m(ct++,je+yn,qt),y.m(ct++,je,qt),y.m(ct++,je-Zt,qt)):(y.m(ct++,Vt+yn,qt),y.m(ct++,Vt,qt),y.m(ct++,Vt-Zt,qt)));else{y.m(ct++,Lt,Gt);var ii=0;this.K===180||this.K===0?((this.K===180?Vt>=je.bounds.right:Vt<=je.bounds.x)&&(ii=(this.K===0?-Zt:yn)/2),y.m(ct++,Lt+ii,qt)):((this.K===270?qt>=je.bounds.bottom:qt<=je.bounds.y)&&(ii=(this.K===90?-Zt:yn)/2),y.m(ct++,Vt,Gt+ii)),y.m(ct++,Vt,qt)}}else Zt=Math.max(10,this.he[Dt.layer]),yn=Math.max(10,this.Ld[Dt.layer]),Ve?this.K===180?(y.m(ct++,Vt-Zt-it,qt),y.m(ct++,Math.min(Vt-Zt+it/2,Vt),qt),y.m(ct++,Vt,qt),y.m(ct++,Vt,qt),y.m(ct++,Math.max(Vt+yn-it/2,Vt),qt),y.m(ct++,Vt+yn+it,qt)):this.K===90?(y.m(ct++,Vt,qt+yn+it),y.m(ct++,Vt,Math.max(qt+yn-it/2,qt)),y.m(ct++,Vt,qt),y.m(ct++,Vt,qt),y.m(ct++,Vt,Math.min(qt-Zt+it/2,qt)),y.m(ct++,Vt,qt-Zt-it)):this.K===270?(y.m(ct++,Vt,qt-Zt-it),y.m(ct++,Vt,Math.min(qt-Zt+it/2,qt)),y.m(ct++,Vt,qt),y.m(ct++,Vt,qt),y.m(ct++,Vt,Math.max(qt+yn-it/2,qt)),y.m(ct++,Vt,qt+yn+it)):(y.m(ct++,Vt+yn+it,qt),y.m(ct++,Math.max(Vt+yn-it/2,Vt),qt),y.m(ct++,Vt,qt),y.m(ct++,Vt,qt),y.m(ct++,Math.min(Vt-Zt+it/2,Vt),qt),y.m(ct++,Vt-Zt-it,qt)):y.m(ct++,Vt,qt)}je=Dt}(ae===null||_e!==ms||Qe)&&(Lt=y.i(ct-1).x,Gt=y.i(ct-1).y,Vt=y.i(ct).x,qt=y.i(ct).y,Qe?(it=this.Ld[Te.layer],this.K===180||this.K===0?(Qe=Gt,Qe>=Te.bounds.y&&Qe<=Te.bounds.bottom&&(this.K===180?Vt>=Te.bounds.x:Vt<=Te.bounds.right)&&(je=Te.centerX+(this.K===180?-it:it),Qe<Te.bounds.y+Te.bounds.height/2?Qe=Te.bounds.y-this.kc/2:Qe=Te.bounds.bottom+this.kc/2,y.m(ct++,je,Gt),y.m(ct++,je,Qe)),y.m(ct++,Vt,Qe)):(Qe=Lt,Qe>=Te.bounds.x&&Qe<=Te.bounds.right&&(this.K===270?qt>=Te.bounds.y:qt<=Te.bounds.bottom)&&(je=Te.centerY+(this.K===270?-it:it),Qe<Te.bounds.x+Te.bounds.width/2?Qe=Te.bounds.x-this.kc/2:Qe=Te.bounds.right+this.kc/2,y.m(ct++,Lt,je),y.m(ct++,Qe,je)),y.m(ct++,Qe,qt)),y.m(ct++,Vt,qt)):Ve?(Zt=Math.max(10,this.he[Te.layer]),yn=Math.max(10,this.Ld[Te.layer]),this.K===180&&Vt>=Te.bounds.x?(je=Te.bounds.x+Te.bounds.width,y.L(ct-2,je,Gt),y.L(ct-1,je+yn,Gt)):this.K===90&&qt<=Te.bounds.bottom?(je=Te.bounds.y,y.L(ct-2,Lt,je),y.L(ct-1,Lt,je-Zt)):this.K===270&&qt>=Te.bounds.y?(je=Te.bounds.y+Te.bounds.height,y.L(ct-2,Lt,je),y.L(ct-1,Lt,je+yn)):this.K===0&&Vt<=Te.bounds.right&&(je=Te.bounds.x,y.L(ct-2,je,Gt),y.L(ct-1,je-Zt,Gt))):(Zt=Math.max(10,this.he[Te.layer]),yn=Math.max(10,this.Ld[Te.layer]),Qe=0,this.K===180||this.K===0?((this.K===180?Vt<=Te.bounds.x:Vt>=Te.bounds.right)&&(Qe=(this.K===0?yn:-Zt)/2),y.m(ct++,Vt+Qe,Gt)):((this.K===270?qt<=Te.bounds.y:qt>=Te.bounds.bottom)&&(Qe=(this.K===90?yn:-Zt)/2),y.m(ct++,Lt,qt+Qe)),y.m(ct++,Vt,qt)))}else{for(;Te!==null&&Te!==je;){for(Zt=Dt=null,Te=Te.destinationEdges.iterator;Te.next()&&(Lt=Te.value,Lt.link!==x.link||(Dt=Lt.toVertex,Zt=Lt.fromVertex,Zt.node!==null&&(Zt=null),Dt.node!==null)););if(Dt===null)break;Dt!==je&&(Lt=y.i(ct-1).x,Gt=y.i(ct-1).y,Vt=Dt.centerX,qt=Dt.centerY,Qe?this.K===180||this.K===0?(Zt!==null?Zt.centerY:Gt)!==qt&&(Zt=this.Ta[Dt.layer]+this.Rf.x,ct===y.firstPickIndex+1&&(Zt=this.K===0?Math.max(Zt,Lt):Math.min(Zt,Lt)),y.m(ct++,Zt,Gt),y.m(ct++,Zt,qt)):(Zt!==null?Zt.centerX:Lt)!==Vt&&(Zt=this.Ta[Dt.layer]+this.Rf.y,ct===y.firstPickIndex+1&&(Zt=this.K===90?Math.max(Zt,Gt):Math.min(Zt,Gt)),y.m(ct++,Lt,Zt),y.m(ct++,Vt,Zt)):(Zt=Math.max(10,this.he[Dt.layer]),yn=Math.max(10,this.Ld[Dt.layer]),Ve?this.K===180?(y.m(ct++,Vt+yn+it,qt),y.m(ct++,Math.max(Vt+yn-it/2,Vt),qt),y.m(ct++,Vt,qt),y.m(ct++,Vt,qt),y.m(ct++,Math.min(Vt-Zt+it/2,Vt),qt),y.m(ct++,Vt-Zt-it,qt)):this.K===90?(y.m(ct++,Vt,qt-Zt-it),y.m(ct++,Vt,Math.min(qt-Zt+it/2,qt)),y.m(ct++,Vt,qt),y.m(ct++,Vt,qt),y.m(ct++,Vt,Math.max(qt+yn-it/2,qt)),y.m(ct++,Vt,qt+yn+it)):this.K===270?(y.m(ct++,Vt,qt+yn+it),y.m(ct++,Vt,Math.max(qt+yn-it/2,qt)),y.m(ct++,Vt,qt),y.m(ct++,Vt,qt),y.m(ct++,Vt,Math.min(qt-Zt+it/2,qt)),y.m(ct++,Vt,qt-Zt-it)):(y.m(ct++,Vt-Zt-it,qt),y.m(ct++,Math.min(Vt-Zt+it/2,Vt),qt),y.m(ct++,Vt,qt),y.m(ct++,Vt,qt),y.m(ct++,Math.max(Vt+yn-it/2,Vt),qt),y.m(ct++,Vt+yn+it,qt)):this.K===180?(y.m(ct++,Vt+yn,qt),y.m(ct++,Vt-Zt,qt)):this.K===90?(y.m(ct++,Vt,qt-Zt),y.m(ct++,Vt,qt+yn)):this.K===270?(y.m(ct++,Vt,qt+yn),y.m(ct++,Vt,qt-Zt)):(y.m(ct++,Vt-Zt,qt),y.m(ct++,Vt+yn,qt)))),Te=Dt}Qe&&(Lt=y.i(ct-1).x,Gt=y.i(ct-1).y,Vt=y.i(ct).x,qt=y.i(ct).y,this.K===180||this.K===0?Gt!==qt&&(Zt=this.K===0?Math.min(Math.max((Vt+Lt)/2,this.Ta[je.layer]+this.Rf.x),Vt):Math.max(Math.min((Vt+Lt)/2,this.Ta[je.layer]+this.Rf.x),Vt),y.m(ct++,Zt,Gt),y.m(ct++,Zt,qt)):Lt!==Vt&&(Zt=this.K===90?Math.min(Math.max((qt+Gt)/2,this.Ta[je.layer]+this.Rf.y),qt):Math.max(Math.min((qt+Gt)/2,this.Ta[je.layer]+this.Rf.y),qt),y.m(ct++,Lt,Zt),y.m(ct++,Vt,Zt)))}b!==null&&Ve&&4<=y.pointsCount&&(ne!==null&&(ne=_e===ms?y.getLinkPointFromPoint(E,ne,ne.ga(jr),y.i(3),!0):y.i(0),_e===ms&&(_e=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+_e.x)/2,_e.y),y.L(2,b.x,(_e.y+b.y)/2)):(y.L(1,_e.x,(ne.y+_e.y)/2),y.L(2,(_e.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),ae!==null&&(E=fe===ms?y.getLinkPointFromPoint(te,ae,ae.ga(jr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),fe===ms&&(ae=y.i(y.pointsCount-3),fe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+ae.x)/2,ae.y),y.L(y.pointsCount-2,fe.x,(ae.y+fe.y)/2)):(y.L(y.pointsCount-2,ae.x,(E.y+ae.y)/2),y.L(y.pointsCount-3,(ae.x+fe.x)/2,fe.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},yo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Rn,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var te=b.i(E),ne=b.i(E+1);if(this.B(te.y,ne.y)&&!this.B(te.x,ne.x)){var ae=new wd;ae.layer=Math.floor(te.y/2);var fe=b.i(0),_e=b.i(b.pointsCount-1);if(ae.first=fe.x*fe.x+fe.y,ae.jc=_e.x*_e.x+_e.y,ae.rd=Math.min(te.x,ne.x),ae.Ic=Math.max(te.x,ne.x),ae.index=E,ae.link=b,E+2<b.pointsCount){fe=b.i(E-1),_e=b.i(E+2);var Te=0;fe.y<te.y?Te=_e.y<te.y?3:te.x<ne.x?2:1:fe.y>te.y&&(Te=_e.y>te.y?0:ne.x<te.x?2:1),ae.j=Te}x.push(ae)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),Te=1,ae=x[te].jc,fe=te;fe<E;fe++)_e=x[fe],_e.jc!==ae&&(Te++,ae=_e.jc);this.zi(x,this.Ux,te,te+ne);var je=1;for(ae=x[te].first,fe=te;fe<E;fe++)_e=x[fe],_e.first!==ae&&(je++,ae=_e.first);for(fe=!0,_e=je,Te<je?(fe=!1,_e=Te,ae=x[te].jc,this.zi(x,this.Js,te,te+ne)):ae=x[te].first,Te=0,je=te;je<E;je++){var Ve=x[je];(fe?Ve.first:Ve.jc)!==ae&&(Te++,ae=fe?Ve.first:Ve.jc);var Qe=Ve.link;te=Qe.i(Ve.index),ne=Qe.i(Ve.index+1);var it=this.linkSpacing*(Te-(_e-1)/2);y++,Qe.uh(),Qe.L(Ve.index,te.x,te.y+it),Qe.L(Ve.index+1,ne.x,ne.y+it),Qe.zf()}}te=E}a=b}}else{for(y=0,x=[],a=a.iterator;a.next();)if(b=a.value,b!==null&&b.isOrthogonal)for(E=2;E<b.pointsCount-3;E++)te=b.i(E),ne=b.i(E+1),this.B(te.x,ne.x)&&!this.B(te.y,ne.y)&&(ae=new wd,ae.layer=Math.floor(te.x/2),fe=b.i(0),_e=b.i(b.pointsCount-1),ae.first=fe.x+fe.y*fe.y,ae.jc=_e.x+_e.y*_e.y,ae.rd=Math.min(te.y,ne.y),ae.Ic=Math.max(te.y,ne.y),ae.index=E,ae.link=b,E+2<b.pointsCount&&(fe=b.i(E-1),_e=b.i(E+2),Te=0,fe.x<te.x?Te=_e.x<te.x?3:te.y<ne.y?2:1:fe.x>te.x&&(Te=_e.x>te.x?0:ne.y<te.y?2:1),ae.j=Te),x.push(ae));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),Te=1,ae=x[te].jc,fe=te;fe<E;fe++)_e=x[fe],_e.jc!==ae&&(Te++,ae=_e.jc);for(this.zi(x,this.Ux,te,te+ne),je=1,ae=x[te].first,fe=te;fe<E;fe++)_e=x[fe],_e.first!==ae&&(je++,ae=_e.first);for(fe=!0,_e=je,Te<je?(fe=!1,_e=Te,ae=x[te].jc,this.zi(x,this.Js,te,te+ne)):ae=x[te].first,Te=0,je=te;je<E;je++)Ve=x[je],(fe?Ve.first:Ve.jc)!==ae&&(Te++,ae=fe?Ve.first:Ve.jc),Qe=Ve.link,te=Qe.i(Ve.index),ne=Qe.i(Ve.index+1),it=this.linkSpacing*(Te-(_e-1)/2),y++,Qe.uh(),Qe.L(Ve.index,te.x+it,te.y),Qe.L(Ve.index+1,ne.x+it,ne.y),Qe.zf()}te=E}a=b}}}},rt=yo.prototype,rt.Vx=function(a,y){return a instanceof wd&&y instanceof wd&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},rt.Ux=function(a,y){return a instanceof wd&&y instanceof wd&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},rt.Js=function(a,y){return a instanceof wd&&y instanceof wd&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},rt.B=function(a,y){return a-=y,-1<a&&1>a},rt.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&Nt("not in range 0 <= from < length: "+x),te===2)b=a[x],E=a[x+1],0<y(b,E)&&(a[x]=E,a[x+1]=b);else if(x===0)if(b>=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y<b;y++)a[y]=x[y];else if(b>=E)for(b=a.slice(x),b.sort(y),y=x;y<E;y++)a[y]=b[y-x];else for(E=a.slice(x,b),E.sort(y),y=x;y<b;y++)a[y]=E[y-x]};function Sd(a,y){var x=a.tc[y];if(x>=a.He.length){for(var b=[],E=0;E<a.He.length;E++)b[E]=a.He[E];a.He=b}for(a.He[x]===void 0||a.He[x]===null?b=[]:(b=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],b[x.index]=x;return b}function xd(a,y,x){a.He[a.tc[y]]=x}Ye.Object.defineProperties(yo.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):Nt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==k0&&a!==Wg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==A0&&a!==wy&&a!==by||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==N0&&a!==Cy&&a!==Py||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==_y&&a!==O0&&a!==Ey||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var k0=new En(yo,"CycleDepthFirst",0),xy=new En(yo,"CycleGreedy",1),Wg=new En(yo,"CycleFromLayers",2),A0=new En(yo,"LayerOptimalLinkLength",0),wy=new En(yo,"LayerLongestPathSink",1),by=new En(yo,"LayerLongestPathSource",2),N0=new En(yo,"InitDepthFirstOut",0),Cy=new En(yo,"InitDepthFirstIn",1),Py=new En(yo,"InitNaive",2),_y=new En(yo,"AggressiveNone",0),O0=new En(yo,"AggressiveLess",1),Ey=new En(yo,"AggressiveMore",2),$x=8;yo.className="LayeredDigraphLayout",yo.CycleDepthFirst=k0,yo.CycleGreedy=xy,yo.CycleFromLayers=Wg,yo.LayerOptimalLinkLength=A0,yo.LayerLongestPathSink=wy,yo.LayerLongestPathSource=by,yo.InitDepthFirstOut=N0,yo.InitDepthFirstIn=Cy,yo.InitNaive=Py,yo.AggressiveNone=_y,yo.AggressiveLess=O0,yo.AggressiveMore=Ey,yo.PackNone=0,yo.PackExpand=1,yo.PackStraighten=2,yo.PackMedian=4,yo.PackAll=15,yo.AlignNone=0,yo.AlignUpperLeft=1,yo.AlignUpperRight=2,yo.AlignLowerLeft=4,yo.AlignLowerRight=8,yo.AlignAll=15;function wd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}wd.className="SegInfo";function Np(a){ko.call(this,a)}qe(Np,ko),Np.prototype.createVertex=function(){return new bu(this)},Np.prototype.createEdge=function(){return new Zg(this)},Np.className="LayeredDigraphNetwork";function bu(a){aa.call(this,a),this.$n=this.bo=this.ao=this.co=null,this.Za=this.Ag=this.Ig=-1,this.u=NaN,this.F=null,this.valid=!1,this.finish=this.Ll=NaN,this.Dj=0,this.dv=this.ev=null}qe(bu,aa);function rx(a,y){return a.index-y.index}function I0(a,y){if(!a.$n){for(var x=[],b=Ar(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Ar(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Nt("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=Ar(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(rx),a.co=y}return a.co}function Yx(a){if(!a.ao){for(var y=[],x=Ar(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(rx),a.ao=y}return a.ao}bu.prototype.Cl=function(a){aa.prototype.Cl.call(this,a),this.bo=this.co=null},bu.prototype.Kl=function(a){aa.prototype.Kl.call(this,a),this.bo=this.co=null},bu.prototype.zl=function(a){aa.prototype.zl.call(this,a),this.$n=this.ao=null},bu.prototype.Jl=function(a){aa.prototype.Jl.call(this,a),this.$n=this.ao=null},Ye.Object.defineProperties(bu.prototype,{layer:{get:function(){return this.Ig},set:function(a){this.Ig!==a&&(this.Ig=a)}},column:{get:function(){return this.Ag},set:function(a){this.Ag!==a&&(this.Ag=a)}},index:{get:function(){return this.Za},set:function(a){this.Za!==a&&(this.Za=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),bu.prototype.deleteDestinationEdge=bu.prototype.Jl,bu.prototype.addDestinationEdge=bu.prototype.zl,bu.prototype.deleteSourceEdge=bu.prototype.Kl,bu.prototype.addSourceEdge=bu.prototype.Cl,bu.className="LayeredDigraphVertex";function Zg(a){Gl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}qe(Zg,Gl),Ye.Object.defineProperties(Zg.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},valid:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},rev:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},forest:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},portFromColOffset:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},portToColOffset:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),Zg.className="LayeredDigraphEdge";function kr(a){es.call(this),this.Ub=new Nn,this.Wn=F0,this.ud=$c,this.vo=z0,this.Bq=Fy,this.$v=[],this.td=!0,this.Rb=H0,this.$d=new Xn(10,10).freeze();var y=new zf(this);this.W=new Fu(y),this.Y=new Fu(y),this.ru=[],a&&Object.assign(this,a)}qe(kr,es),kr.prototype.cloneProtected=function(a){es.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},kr.prototype.qb=function(a){a.classType===kr?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:Nt("Unknown enum value: "+a):es.prototype.qb.call(this,a)},kr.prototype.createNetwork=function(){return new zf(this)},kr.prototype.makeNetwork=function(a){function y(b){if(b instanceof oi)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof $n){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof vn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof ir?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},kr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==U0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof vn&&(y=a),this.path===F0&&y!==null?this.ud=y.isTreePathToChildren?$c:Ff:this.ud=this.path===F0?$c:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new Nn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof oi?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Fu&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,My(this,y));for(y=this.network.vertexes,a=null;a=Xx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,My(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&ux(this,y);if(this.Cu(),this.layerStyle===G0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===jy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var te=y.children[E];b=Math.max(b,x?te.width:te.height)}if(0<=b)for(E=0;E<y.children.length;E++)te=y.children[E],x?(y.angle===180&&(te.focusX+=b-te.width),te.width=b):(y.angle===270&&(te.focusY+=b-te.height),te.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Nn,this.isValidLayout=!0};function Xx(a){var y=new Nn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}kr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case $c:x.sourceEdges.count===0&&this.Ub.add(x);break;case Ff:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Nt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case $c:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Ff:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Nt("Unhandled path value "+a.ud.toString())}}return b}function My(a,y){if(y!==null){switch(a.ud){case $c:if(0<y.destinationEdges.count){for(var x=new Rn,b=y.destinationVertexes;b.next();){var E=b.value;sx(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Ff:if(0<y.sourceEdges.count){for(x=new Rn,b=y.sourceVertexes;b.next();)E=b.value,sx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Nt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var te=x[E];te.initialized=!0,te.level=y.level+1,te.parent=y,a.Ub.remove(te)}for(y=0;y<b;y++)My(a,x[y])}}function sx(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}kr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var te=E=0;te<x.length;te++)x[te]!==y&&(b[E++]=x[te]);a.children=b}}};function ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Jc&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,te=y.children,ne=te.length,ae=0;ae<ne;ae++){var fe=te[ae];ax(a,fe),x+=fe.descendantCount+1,b=Math.max(b,fe.maxChildrenCount),E=Math.max(E,fe.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function Jx(a,y){switch(a.vo){default:case z0:return y.parent!==null?y.parent:a.W;case Ry:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Dy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Iy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,te=0;te<E;te++)if(0<b[te].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}kr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Jx(this,a)),a.parent!==null&&a.parent.alignment===Jc){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}kr.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Jc&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}kr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Op:break;case Vg:a.children.reverse();break;case $g:a.children.sort(a.comparer);break;case Yg:a.children.sort(a.comparer),a.children.reverse();break;default:Nt("Unhandled sorting value "+a.sorting.toString())}},kr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},kr.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=bd(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var te=0,ne=0,ae=0,fe=a.commentSpacing;if(a.node!==null)for(var _e=a.node.Mu();_e.next();){var Te=_e.value;Te.category==="Comment"&&Te.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(Te),Te.Va(),Te=Te.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,Te.width),ne+=Te.height+Math.abs(ae)):(te+=Te.width+Math.abs(ae),ne=Math.max(ne,Te.height)),ae=fe)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(te+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),te=Math.max(0,te-a.width)),E=kn.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,kn.free(E))};function bd(a){return a===Hh||a===Jc||a===Uh||a===fh}function Kg(a){return a===Hh||a===Jc}function Ty(a){var y=a.parent;if(y!==null){var x=y.alignment;if(bd(x)){if(Kg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Uh)return!0}}return!1}kr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,te=!1;x!==null&&(E=x.angle,te=x.alignment,te=bd(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,ae=Ty(a),fe=0,_e=a.comments,Te=_e.length,je=Mt.alloc(),Ve=0;Ve<Te;Ve++){var Qe=_e[Ve],it=Qe.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&ae)if(0<=a.commentMargin)for(je.h(a.bounds.x-a.commentMargin-it.width,a.bounds.y+fe),Qe.move(je),Qe=Qe.Sd();Qe.next();){var ct=Qe.value;ct.fromSpot=ks,ct.toSpot=Zs}else for(je.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+fe),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=Zs,ct.toSpot=ks;else if(0<=a.commentMargin)for(je.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+fe),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=Zs,ct.toSpot=ks;else for(je.h(a.bounds.x+a.commentMargin-it.width,a.bounds.y+fe),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=ks,ct.toSpot=Zs;fe=0<=a.commentSpacing?fe+(it.height+a.commentSpacing):fe+(a.commentSpacing-it.height)}else{if(135<E&&!te||!x&&ae)if(0<=a.commentMargin)for(je.h(a.bounds.x+fe,a.bounds.y-a.commentMargin-it.height),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=bs,ct.toSpot=Ks;else for(je.h(a.bounds.x+fe,a.bounds.y+2*a.focus.y-a.commentMargin),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=Ks,ct.toSpot=bs;else if(0<=a.commentMargin)for(je.h(a.bounds.x+fe,a.bounds.y+2*a.focus.y+a.commentMargin),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=Ks,ct.toSpot=bs;else for(je.h(a.bounds.x+fe,a.bounds.y+a.commentMargin-it.height),Qe.move(je),Qe=Qe.Sd();Qe.next();)ct=Qe.value,ct.fromSpot=bs,ct.toSpot=Ks;fe=0<=a.commentSpacing?fe+(it.width+a.commentSpacing):fe+(a.commentSpacing-it.width)}}if(Mt.free(je),y=fe-a.commentSpacing-(b?y.height:y.width),this.ud===$c)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},kr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case j0:cx(this,a);break;case Xg:if(a.alignment===Jc)cx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=bd(x)),b=Ty(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var E=qu(a);y=E===90||E===270;var te=0,ne=a.children,ae=ne.length;for(x=0;x<ae;x++)b=ne[x],te=Math.max(te,y?b.Da.width:b.Da.height);var fe=a.alignment;b=fe===Yc;var _e=fe===Xc,Te=bd(fe),je=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Ve=a.nodeSpacing,Qe=this.computeNodeIndent(a),it=a.rowSpacing,ct=0;(b||_e||a.hm||a.im&&a.maxGenerationCount===1)&&(ct=Math.max(0,a.rowIndent)),b=a.width;var Dt=a.height,Lt=0,Gt=0,Zt=0,Vt=null,qt=null,yn=0,ii=0,di=0,ui=0,Vn=0,In=0,er=0,Vi=0;if(Te&&!Kg(fe)&&135<E&&ne.reverse(),Kg(fe))if(1<ae)for(var io=0;io<ae;io++)io%2===0&&io!==ae-1&&(Vi=Math.max(Vi,y?ne[io].Da.width:ne[io].Da.height));else ae===1&&(Vi=y?ne[0].Da.width:ne[0].Da.height);if(Te){switch(fe){case Hh:Gt=135>E?hx(this,a,ne,Vi,Lt,Gt):dx(this,a,ne,Vi,Lt,Gt),Vi=Gt.x,Lt=Gt.width,Gt=Gt.height;break;case Uh:for(Vt=0;Vt<ae;Vt++)qt=ne[Vt],je=qt.Da,Zt=In===0?0:it,y?(qt.S.h(te-je.width,ui+Zt),Lt=Math.max(Lt,je.width),Gt=Math.max(Gt,ui+Zt+je.height),ui+=Zt+je.height):(qt.S.h(di+Zt,te-je.height),Lt=Math.max(Lt,di+Zt+je.width),Gt=Math.max(Gt,je.height),di+=Zt+je.width),In++;break;case fh:for(Vt=0;Vt<ae;Vt++)qt=ne[Vt],te=qt.Da,je=In===0?0:it,y?(qt.S.h(Ve/2+a.focus.x,ui+je),Lt=Math.max(Lt,te.width),Gt=Math.max(Gt,ui+je+te.height),ui+=je+te.height):(qt.S.h(di+je,Ve/2+a.focus.y),Lt=Math.max(Lt,di+je+te.width),Gt=Math.max(Gt,te.height),di+=je+te.width),In++}Vt=Tl(this,2),qt=Tl(this,2),y?(Vt[0].h(0,0),Vt[1].h(0,Gt),qt[0].h(Lt,0)):(Vt[0].h(0,0),Vt[1].h(Lt,0),qt[0].h(0,Gt)),qt[1].h(Lt,Gt)}else for(io=0;io<ae;io++){var Eo=ne[io],ha=Eo.Da;if(y){0<je&&0<In&&di+Ve+ha.width>je&&(di<te&&af(a,fe,te-di,0,er,io-1),Vn++,In=0,er=io,Zt=Gt,di=0,ui=135<E?-Gt-it:Gt+it),R0(this,Eo,0,ui);var pa=0;if(In===0)Vt=Eo.Yo,qt=Eo.kp,yn=ha.width,ii=ha.height,(Vt===null||qt===null||E!==qu(Eo))&&(Vt=Tl(this,2),qt=Tl(this,2),Vt[0].h(0,0),Vt[1].h(0,ii),qt[0].h(yn,0),qt[1].h(yn,ii));else{var Xa=Gn();ii=fx(this,a,Eo,Vt,qt,yn,ii,Xa),pa=ii.x,Vt=Xa[0],qt=Xa[1],yn=ii.width,ii=ii.height,ti(Xa),di<ha.width&&0>pa&&(Bf(a,-pa,0,er,io-1),B0(Vt,-pa,0),B0(qt,-pa,0),pa=0)}Eo.S.h(pa,ui),Lt=Math.max(Lt,yn),Gt=Math.max(Gt,Zt+(Vn===0?0:it)+ha.height),di=yn}else 0<je&&0<In&&ui+Ve+ha.height>je&&(ui<te&&af(a,fe,0,te-ui,er,io-1),Vn++,In=0,er=io,Zt=Lt,ui=0,di=135<E?-Lt-it:Lt+it),R0(this,Eo,di,0),pa=0,In===0?(Vt=Eo.Yo,qt=Eo.kp,yn=ha.width,ii=ha.height,(Vt===null||qt===null||E!==qu(Eo))&&(Vt=Tl(this,2),qt=Tl(this,2),Vt[0].h(0,0),Vt[1].h(yn,0),qt[0].h(0,ii),qt[1].h(yn,ii))):(Xa=Gn(),ii=fx(this,a,Eo,Vt,qt,yn,ii,Xa),pa=ii.x,Vt=Xa[0],qt=Xa[1],yn=ii.width,ii=ii.height,ti(Xa),ui<ha.height&&0>pa&&(Bf(a,0,-pa,er,io-1),B0(Vt,0,-pa),B0(qt,0,-pa),pa=0)),Eo.S.h(di,pa),Gt=Math.max(Gt,ii),Lt=Math.max(Lt,Zt+(Vn===0?0:it)+ha.width),ui=ii;In++}switch(0<Vn&&(y?(Gt+=Math.max(0,x),di<Lt&&af(a,fe,Lt-di,0,er,ae-1),0<ct&&(_e||Bf(a,ct,0,0,ae-1),Lt+=ct)):(Lt+=Math.max(0,x),ui<Gt&&af(a,fe,0,Gt-ui,er,ae-1),0<ct&&(_e||Bf(a,0,ct,0,ae-1),Gt+=ct))),ct=_e=0,fe){case Ip:y?_e+=Lt/2-a.focus.x-Qe/2:ct+=Gt/2-a.focus.y-Qe/2;break;case jf:0<Vn?y?_e+=Lt/2-a.focus.x-Qe/2:ct+=Gt/2-a.focus.y-Qe/2:y?(Vi=ne[0].S.x+ne[0].la.x,_e+=Vi+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-Vi)/2-a.focus.x-Qe/2):(Vi=ne[0].S.y+ne[0].la.y,ct+=Vi+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-Vi)/2-a.focus.y-Qe/2);break;case Yc:y?(_e-=Qe,Lt+=Qe):(ct-=Qe,Gt+=Qe);break;case Xc:y?(_e+=Lt-a.width+Qe,Lt+=Qe):(ct+=Gt-a.height+Qe,Gt+=Qe);break;case Hh:y?1<ae?_e+=Vi+Ve/2-a.focus.x:_e+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?ct+=Vi+Ve/2-a.focus.y:ct+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Uh:y?_e+=Lt+Ve/2-a.focus.x:ct+=Gt+Ve/2-a.focus.y;break;case fh:break;default:Gt=this.customAlignment(a,_e,ct,Lt,Gt),_e=Gt[0],ct=Gt[1],Lt=Gt[2],Gt=Gt[3]}for(Qe=0;Qe<ae;Qe++)Vi=ne[Qe],y?Vi.S.h(Vi.S.x+Vi.la.x-_e,Vi.S.y+(135<E?(Te?-Gt:-Vi.Da.height)+Vi.la.y-x:Dt+x+Vi.la.y)):Vi.S.h(Vi.S.x+(135<E?(Te?-Lt:-Vi.Da.width)+Vi.la.x-x:b+x+Vi.la.x),Vi.S.y+Vi.la.y-ct);if(ae=ne=0,Te?y?(Lt=ky(a,Lt,_e),0>_e&&(_e=0),135<E&&(ct+=Gt+x),Gt+=Dt+x,fe===fh&&(ne+=Ve/2+a.focus.x),ae+=Dt+x):(135<E&&(_e+=Lt+x),Lt+=b+x,Gt=Ay(a,Gt,ct),0>ct&&(ct=0),fe===fh&&(ae+=Ve/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>Lt&&(Lt=Ny(fe,b-Lt,0),ne=Lt.x,ae=Lt.y,Lt=b,_e=0):Lt=ky(a,Lt,_e),0>_e&&(ne-=_e,_e=0),135<E&&(ct+=Gt+x),Gt=Math.max(Math.max(Gt,Dt),Gt+Dt+x),ae+=Dt+x):(135<E&&(_e+=Lt+x),Lt=Math.max(Math.max(Lt,b),Lt+b+x),a.comments===null?Dt>Gt&&(Gt=Ny(fe,0,Dt-Gt),ne=Gt.x,ae=Gt.y,Gt=Dt,ct=0):Gt=Ay(a,Gt,ct),0>ct&&(ae-=ct,ct=0),ne+=b+x),0<Vn)E=Tl(this,4),Vn=Tl(this,4),y?(E[2].h(0,Dt+x),E[3].h(E[2].x,Gt),Vn[2].h(Lt,E[2].y),Vn[3].h(Vn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Lt,E[2].y),Vn[2].h(E[2].x,Gt),Vn[3].h(E[3].x,Vn[2].y));else{for(E=Tl(this,Vt.length+2),Vn=Tl(this,qt.length+2),fe=0;fe<Vt.length;fe++)Te=Vt[fe],E[fe+2].h(Te.x+ne,Te.y+ae);for(fe=0;fe<qt.length;fe++)Te=qt[fe],Vn[fe+2].h(Te.x+ne,Te.y+ae)}y?(E[0].h(_e,0),E[1].h(E[0].x,Dt),E[2].y<E[1].y&&(E[2].x>E[0].x?E[2].assign(E[1]):E[1].assign(E[2])),E[3].y<E[2].y&&(E[3].x>E[0].x?E[3].assign(E[2]):E[2].assign(E[3])),Vn[0].h(_e+b,0),Vn[1].h(Vn[0].x,Dt),Vn[2].y<Vn[1].y&&(Vn[2].x<Vn[0].x?Vn[2].assign(Vn[1]):Vn[1].assign(Vn[2])),Vn[3].y<Vn[2].y&&(Vn[3].x<Vn[0].x?Vn[3].assign(Vn[2]):Vn[2].assign(Vn[3])),E[2].y-=x/2,Vn[2].y-=x/2):(E[0].h(0,ct),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),Vn[0].h(0,ct+Dt),Vn[1].h(b,Vn[0].y),Vn[2].x<Vn[1].x&&(Vn[2].y<Vn[0].y?Vn[2].assign(Vn[1]):Vn[1].assign(Vn[2])),Vn[3].x<Vn[2].x&&(Vn[3].y<Vn[0].y?Vn[3].assign(Vn[2]):Vn[2].assign(Vn[3])),E[2].x-=x/2,Vn[2].x-=x/2),dc(this,Vt),dc(this,qt),a.Yo=E,a.kp=Vn,a.la.h(_e,ct),a.Da.h(Lt,Gt)}break;default:Nt("Unhandled compaction value "+a.compaction.toString())}}};function cx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=bd(x));var E=Ty(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=qu(y),x=b===90||b===270;var te=0;E=y.children;for(var ne=E.length,ae=0;ae<ne;ae++){var fe=E[ae];te=Math.max(te,x?fe.Da.width:fe.Da.height)}var _e=y.alignment,Te=_e===Yc,je=_e===Xc;ae=bd(_e);var Ve=Math.max(0,y.breadthLimit);fe=a.computeLayerSpacing(y);var Qe=y.nodeSpacing,it=a.computeNodeIndent(y),ct=Te||je?0:it/2,Dt=y.rowSpacing,Lt=0;(Te||je||y.hm||y.im&&y.maxGenerationCount===1)&&(Lt=Math.max(0,y.rowIndent)),Te=y.width;var Gt=y.height,Zt=0,Vt=0,qt=0,yn=0,ii=0,di=0,ui=0,Vn=0,In=0,er=0;if(ae&&!Kg(_e)&&135<b&&E.reverse(),Kg(_e))if(1<ne)for(var Vi=0;Vi<ne;Vi++){var io=E[Vi],Eo=io.Da;Vi%2===0&&Vi!==ne-1?In=Math.max(In,(x?Eo.width:Eo.height)+a.computeBusNodeSpacing(io)-Qe):Vi%2!==0&&(er=Math.max(er,(x?Eo.width:Eo.height)+a.computeBusNodeSpacing(io)-Qe))}else ne===1&&(In=x?E[0].Da.width:E[0].Da.height);if(ae)switch(_e){case Hh:case Jc:Vt=135>b?hx(a,y,E,In,Zt,Vt):dx(a,y,E,In,Zt,Vt),In=Vt.x,Zt=Vt.width,Vt=Vt.height;break;case Uh:for(Ve=0;Ve<ne;Ve++)ct=E[Ve],qt=ct.Da,er=ui===0?0:Dt,x?(ct.S.h(te-qt.width,ii+er),Zt=Math.max(Zt,qt.width),Vt=Math.max(Vt,ii+er+qt.height),ii+=er+qt.height):(ct.S.h(yn+er,te-qt.height),Zt=Math.max(Zt,yn+er+qt.width),Vt=Math.max(Vt,qt.height),yn+=er+qt.width),ui++;break;case fh:for(te=0;te<ne;te++)Ve=E[te],ct=Ve.Da,qt=ui===0?0:Dt,x?(Ve.S.h(Qe/2+y.focus.x,ii+qt),Zt=Math.max(Zt,ct.width),Vt=Math.max(Vt,ii+qt+ct.height),ii+=qt+ct.height):(Ve.S.h(yn+qt,Qe/2+y.focus.y),Zt=Math.max(Zt,yn+qt+ct.width),Vt=Math.max(Vt,ct.height),yn+=qt+ct.width),ui++}else for(er=0;er<ne;er++)Vi=E[er],io=Vi.Da,x?(0<Ve&&0<ui&&yn+Qe+io.width>Ve&&(yn<te&&af(y,_e,te-yn,0,Vn,er-1),di++,ui=0,Vn=er,qt=Vt,yn=0,ii=135<b?-Vt-Dt:Vt+Dt),Eo=ui===0?ct:Qe,R0(a,Vi,0,ii),Vi.S.h(yn+Eo,ii),Zt=Math.max(Zt,yn+Eo+io.width),Vt=Math.max(Vt,qt+(di===0?0:Dt)+io.height),yn+=Eo+io.width):(0<Ve&&0<ui&&ii+Qe+io.height>Ve&&(ii<te&&af(y,_e,0,te-ii,Vn,er-1),di++,ui=0,Vn=er,qt=Zt,ii=0,yn=135<b?-Zt-Dt:Zt+Dt),Eo=ui===0?ct:Qe,R0(a,Vi,yn,0),Vi.S.h(yn,ii+Eo),Vt=Math.max(Vt,ii+Eo+io.height),Zt=Math.max(Zt,qt+(di===0?0:Dt)+io.width),ii+=Eo+io.height),ui++;switch(0<di&&(x?(Vt+=Math.max(0,fe),yn<Zt&&af(y,_e,Zt-yn,0,Vn,ne-1),0<Lt&&(je||Bf(y,Lt,0,0,ne-1),Zt+=Lt)):(Zt+=Math.max(0,fe),ii<Vt&&af(y,_e,0,Vt-ii,Vn,ne-1),0<Lt&&(je||Bf(y,0,Lt,0,ne-1),Vt+=Lt))),Lt=je=0,_e){case Ip:x?je+=Zt/2-y.focus.x-it/2:Lt+=Vt/2-y.focus.y-it/2;break;case jf:0<di?x?je+=Zt/2-y.focus.x-it/2:Lt+=Vt/2-y.focus.y-it/2:x?(a=E[0].S.x+E[0].la.x,je+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-it/2):(a=E[0].S.y+E[0].la.y,Lt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-it/2);break;case Yc:x?(je-=it,Zt+=it):(Lt-=it,Vt+=it);break;case Xc:x?(je+=Zt-y.width+it,Zt+=it):(Lt+=Vt-y.height+it,Vt+=it);break;case Hh:case Jc:x?1<ne?je+=In+Qe/2-y.focus.x:je+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Lt+=In+Qe/2-y.focus.y:Lt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Uh:x?je+=Zt+Qe/2-y.focus.x:Lt+=Vt+Qe/2-y.focus.y;break;case fh:break;default:a=a.customAlignment(y,je,Lt,Zt,Vt),je=a[0],Lt=a[1],Zt=a[2],Vt=a[3]}for(a=0;a<ne;a++)it=E[a],x?it.S.h(it.S.x+it.la.x-je,it.S.y+(135<b?(ae?-Vt:-it.Da.height)+it.la.y-fe:Gt+fe+it.la.y)):it.S.h(it.S.x+(135<b?(ae?-Zt:-it.Da.width)+it.la.x-fe:Te+fe+it.la.x),it.S.y+it.la.y-Lt);x?(Zt=ky(y,Zt,je),0>je&&(je=0),135<b&&(Lt+=Vt+fe),Vt=Math.max(Math.max(Vt,Gt),Vt+Gt+fe)):(135<b&&(je+=Zt+fe),Zt=Math.max(Math.max(Zt,Te),Zt+Te+fe),Vt=Ay(y,Vt,Lt),0>Lt&&(Lt=0)),y.la.h(je,Lt),y.Da.h(Zt,Vt)}}kr.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function hx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new kn(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new kn(b,0,E,te);for(var ae=y.nodeSpacing,fe=y.rowSpacing,_e=qu(y)===90,Te=0,je=0,Ve=0,Qe=0;Qe<ne;Qe++)if(!(Qe%2!==0||1<ne&&Qe===ne-1)){var it=x[Qe],ct=it.Da,Dt=Te===0?0:fe;if(_e){var Lt=a.computeBusNodeSpacing(it)-ae;it.S.h(b-(ct.width+Lt),Ve+Dt),E=Math.max(E,ct.width+Lt),te=Math.max(te,Ve+Dt+ct.height),Ve+=Dt+ct.height}else Lt=a.computeBusNodeSpacing(it)-ae,it.S.h(je+Dt,b-(ct.height+Lt)),te=Math.max(te,ct.height+Lt),E=Math.max(E,je+Dt+ct.width),je+=Dt+ct.width;Te++}for(Te=0,it=je,Qe=Ve,_e?(je=b+ae,Ve=0):(je=0,Ve=b+ae),ct=0;ct<ne;ct++)if(ct%2!==0){Dt=x[ct],Lt=Dt.Da;var Gt=Te===0?0:fe;if(_e){var Zt=a.computeBusNodeSpacing(Dt)-ae;Dt.S.h(je+Zt,Ve+Gt),E=Math.max(E,je+Lt.width+Zt),te=Math.max(te,Ve+Gt+Lt.height),Ve+=Gt+Lt.height}else Zt=a.computeBusNodeSpacing(Dt)-ae,Dt.S.h(je+Gt,Ve+Zt),E=Math.max(E,je+Gt+Lt.width),te=Math.max(te,Ve+Lt.height+Zt),je+=Gt+Lt.width;Te++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,_e?Math.max(Math.abs(Qe),Math.abs(Ve)):Math.max(Math.abs(it),Math.abs(je))),_e?(x.S.h(b+ae/2-x.focus.x-x.la.x,te+a),_e=b+ae/2-x.focus.x-x.la.x,E=Math.max(E,_e+ne.width),0>_e&&(E-=_e),te=Math.max(te,Math.max(Qe,Ve)+a+ne.height),0>x.S.x&&(b=D0(y,x.S.x,!1,b,ae))):(x.S.h(E+a,b+ae/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(it,je)+a+ne.width),Ve=b+ae/2-x.focus.y-x.la.y,te=Math.max(te,Ve+ne.height),0>Ve&&(te-=Ve),0>x.S.y&&(b=D0(y,x.S.y,!0,b,ae)))),new kn(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new kn(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new kn(b,0,E,te);for(var ae=y.nodeSpacing,fe=y.rowSpacing,_e=qu(y)===270,Te=0,je=0,Ve=0,Qe=0;Qe<ne;Qe++)if(!(Qe%2!==0||1<ne&&Qe===ne-1)){var it=x[Qe],ct=it.Da,Dt=Te===0?0:fe;if(_e){var Lt=a.computeBusNodeSpacing(it)-ae;Ve-=Dt+ct.height,it.S.h(b-(ct.width+Lt),Ve),E=Math.max(E,ct.width+Lt),te=Math.max(te,Math.abs(Ve))}else Lt=a.computeBusNodeSpacing(it)-ae,je-=Dt+ct.width,it.S.h(je,b-(ct.height+Lt)),te=Math.max(te,ct.height+Lt),E=Math.max(E,Math.abs(je));Te++}for(Te=0,it=je,Qe=Ve,_e?(je=b+ae,Ve=0):(je=0,Ve=b+ae),ct=0;ct<ne;ct++)if(ct%2!==0){Dt=x[ct],Lt=Dt.Da;var Gt=Te===0?0:fe;if(_e){var Zt=a.computeBusNodeSpacing(Dt)-ae;Ve-=Gt+Lt.height,Dt.S.h(je+Zt,Ve),E=Math.max(E,je+Lt.width+Zt),te=Math.max(te,Math.abs(Ve))}else Zt=a.computeBusNodeSpacing(Dt)-ae,je-=Gt+Lt.width,Dt.S.h(je,Ve+Zt),te=Math.max(te,Ve+Lt.height+Zt),E=Math.max(E,Math.abs(je));Te++}for(1<ne&&ne%2===1&&(fe=x[ne-1],Te=fe.Da,a=a.computeBusLastRowSpacing(fe,_e?Math.max(Math.abs(Qe),Math.abs(Ve)):Math.max(Math.abs(it),Math.abs(je))),_e?(fe.S.h(b+ae/2-fe.focus.x-fe.la.x,-te-Te.height-a),je=b+ae/2-fe.focus.x-fe.la.x,E=Math.max(E,je+Te.width),0>je&&(E-=je),te=Math.max(te,Math.abs(Math.min(Qe,Ve))+a+Te.height),0>fe.S.x&&(b=D0(y,fe.S.x,!1,b,ae))):(fe.S.h(-E-Te.width-a,b+ae/2-fe.focus.y-fe.la.y),E=Math.max(E,Math.abs(Math.min(it,je))+a+Te.width),Ve=b+ae/2-fe.focus.y-fe.la.y,te=Math.max(te,Ve+Te.height),0>Ve&&(te-=Ve),0>fe.S.y&&(b=D0(y,fe.S.y,!0,b,ae)))),y=0;y<ne;y++)ae=x[y],_e?ae.S.h(ae.S.x,ae.S.y+te):ae.S.h(ae.S.x+E,ae.S.y);return new kn(b,0,E,te)}kr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},kr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function D0(a,y,x,b,E){a=a.children;for(var te=a.length,ne=0;ne<te;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[te-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function ky(a,y,x){switch(a.alignment){case jf:case Ip:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Yc:return a.width>y?a.width:y;case Xc:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Hh:case Jc:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Uh:return a.width-a.focus.x+a.nodeSpacing/2+y;case fh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case jf:case Ip:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Yc:return a.height>y?a.height:y;case Xc:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Hh:case Jc:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Uh:return a.height-a.focus.y+a.nodeSpacing/2+y;case fh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a){case Ip:y/=2,x/=2;break;case jf:y/=2,x/=2;break;case Yc:x=y=0;break;case Xc:break;default:Nt("Unhandled alignment value "+a.toString())}return new Mt(y,x)}function af(a,y,x,b,E,te){y=Ny(y,x,b),Bf(a,y.x,y.y,E,te)}function Bf(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var te=a[b].S;te.x+=y,te.y+=x}}function R0(a,y,x,b){var E=y.parent;switch(a.ud){case $c:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Ff:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Nt("Unhandled path value "+a.ud.toString())}}function B0(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function fx(a,y,x,b,E,te,ne,ae){var fe=qu(y),_e=fe===90||fe===270,Te=y.nodeSpacing;y=b;var je=E;b=te;var Ve=ne,Qe=x.Yo,it=x.kp;ne=x.Da;var ct=_e?Math.max(Ve,ne.height):Math.max(b,ne.width);if((Qe===null||fe!==qu(x))&&(Qe=Tl(a,2),it=Tl(a,2),_e?(Qe[0].h(0,0),Qe[1].h(0,ne.height),it[0].h(ne.width,0),it[1].h(it[0].x,Qe[1].y)):(Qe[0].h(0,0),Qe[1].h(ne.width,0),it[0].h(0,ne.height),it[1].h(Qe[1].x,it[0].y))),_e){if(Ve=9999999,!(je===null||2>je.length||Qe===null||2>Qe.length))for(E=x=0;x<je.length&&E<Qe.length;){te=je[x];var Dt=Qe[E];fe=Dt.x,_e=Dt.y,fe+=b;var Lt=te;x+1<je.length&&(Lt=je[x+1]);var Gt=Dt;Dt=Gt.x,Gt=Gt.y,E+1<Qe.length&&(Gt=Qe[E+1],Dt=Gt.x,Gt=Gt.y,Dt+=b);var Zt=Ve;te.y===_e?Zt=fe-te.x:te.y>_e&&te.y<Gt?Zt=fe+(te.y-_e)/(Gt-_e)*(Dt-fe)-te.x:_e>te.y&&_e<Lt.y&&(Zt=fe-(te.x+(_e-te.y)/(Lt.y-te.y)*(Lt.x-te.x))),Zt<Ve&&(Ve=Zt),Lt.y<=te.y?x++:Gt<=_e?E++:(Lt.y<=Gt&&x++,Gt<=Lt.y&&E++)}if(Ve=b-Ve,Ve+=Te,x=Qe,E=Ve,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Te=Tl(a,y.length+x.length),b=te=fe=0;te<x.length&&x[te].y<y[0].y;)_e=x[te++],Te[b++].h(_e.x+E,_e.y);for(;fe<y.length;)_e=y[fe++],Te[b++].h(_e.x,_e.y);for(fe=y[y.length-1].y;te<x.length&&x[te].y<=fe;)te++;for(;te<x.length&&x[te].y>fe;)_e=x[te++],Te[b++].h(_e.x+E,_e.y);for(x=Tl(a,b),fe=0;fe<b;fe++)x[fe].assign(Te[fe]);dc(a,Te),b=x}if(te=it,fe=Ve,je===null||2>je.length||te===null||2>te.length)E=null;else{for(Te=Tl(a,je.length+te.length),E=_e=x=0;x<je.length&&je[x].y<te[0].y;)Lt=je[x++],Te[E++].h(Lt.x,Lt.y);for(;_e<te.length;)Lt=te[_e++],Te[E++].h(Lt.x+fe,Lt.y);for(te=te[te.length-1].y;x<je.length&&je[x].y<=te;)x++;for(;x<je.length&&je[x].y>te;)fe=je[x++],Te[E++].h(fe.x,fe.y);for(te=Tl(a,E),x=0;x<E;x++)te[x].assign(Te[x]);dc(a,Te),E=te}return te=Math.max(0,Ve)+ne.width,ne=ct,dc(a,y),dc(a,Qe),dc(a,je),dc(a,it),ae[0]=b,ae[1]=E,new kn(Ve,0,te,ne)}if(b=9999999,!(je===null||2>je.length||Qe===null||2>Qe.length))for(E=x=0;x<je.length&&E<Qe.length;)te=je[x],Dt=Qe[E],fe=Dt.x,_e=Dt.y,_e+=Ve,Lt=te,x+1<je.length&&(Lt=je[x+1]),Gt=Dt,Dt=Gt.x,Gt=Gt.y,E+1<Qe.length&&(Gt=Qe[E+1],Dt=Gt.x,Gt=Gt.y,Gt+=Ve),Zt=b,te.x===fe?Zt=_e-te.y:te.x>fe&&te.x<Dt?Zt=_e+(te.x-fe)/(Dt-fe)*(Gt-_e)-te.y:fe>te.x&&fe<Lt.x&&(Zt=_e-(te.y+(fe-te.x)/(Lt.x-te.x)*(Lt.y-te.y))),Zt<b&&(b=Zt),Lt.x<=te.x?x++:Dt<=fe?E++:(Lt.x<=Dt&&x++,Dt<=Lt.x&&E++);if(Ve-=b,Ve+=Te,x=Qe,E=Ve,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Te=Tl(a,y.length+x.length),b=te=fe=0;te<x.length&&x[te].x<y[0].x;)_e=x[te++],Te[b++].h(_e.x,_e.y+E);for(;fe<y.length;)_e=y[fe++],Te[b++].h(_e.x,_e.y);for(fe=y[y.length-1].x;te<x.length&&x[te].x<=fe;)te++;for(;te<x.length&&x[te].x>fe;)_e=x[te++],Te[b++].h(_e.x,_e.y+E);for(x=Tl(a,b),fe=0;fe<b;fe++)x[fe].assign(Te[fe]);dc(a,Te),b=x}if(te=it,fe=Ve,je===null||2>je.length||te===null||2>te.length)E=null;else{for(Te=Tl(a,je.length+te.length),E=_e=x=0;x<je.length&&je[x].x<te[0].x;)Lt=je[x++],Te[E++].h(Lt.x,Lt.y);for(;_e<te.length;)Lt=te[_e++],Te[E++].h(Lt.x,Lt.y+fe);for(te=te[te.length-1].x;x<je.length&&je[x].x<=te;)x++;for(;x<je.length&&je[x].x>te;)fe=je[x++],Te[E++].h(fe.x,fe.y);for(te=Tl(a,E),x=0;x<E;x++)te[x].assign(Te[x]);dc(a,Te),E=te}return te=ct,ne=Math.max(0,Ve)+ne.height,dc(a,y),dc(a,Qe),dc(a,je),dc(a,it),ae[0]=b,ae[1]=E,new kn(Ve,0,te,ne)}function Tl(a,y){if(a=a.ru[y],a!==void 0&&(a=a.pop(),a!==void 0))return a;a=[];for(var x=0;x<y;x++)a[x]=new Mt;return a}function dc(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}kr.prototype.arrangeTrees=function(){if(this.Rb===U0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Fu){var x=y.node;if(x!==null){var b=x.position;x=b.x,b=b.y,isFinite(x)||(x=0),isFinite(b)||(b=0),Oy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Fu&&a.push(x);switch(this.sorting){case Op:break;case Vg:a.reverse();break;case $g:a.sort(this.comparer);break;case Yg:a.sort(this.comparer),a.reverse();break;default:Nt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Oy(this,E,y+E.la.x,x+E.la.y),this.Rb){case H0:x+=E.Da.height+this.$d.height;break;case By:y+=E.Da.width+this.$d.width;break;default:Nt("Unhandled arrangement value "+this.Rb.toString())}}}};function Oy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,te=0;te<E;te++){var ne=y[te];Oy(a,ne,x+ne.S.x,b+ne.S.y)}}}kr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},kr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},kr.prototype.Gu=function(){if(this.layerStyle===G0){for(var a=this.$v,y=[],x=null,b=this.network.vertexes.iterator;b.next();){var E=b.value;x===null?x=E.bounds.copy():x.ed(E.bounds);var te=y[E.level];te===void 0?te=this.computeLayerSpacing(E):te=Math.max(te,this.computeLayerSpacing(E)),y[E.level]=te}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new Mt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Mt(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,te=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)te+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var ae=a[ne]+y[ne];this.angle===270?(te-=ae,E.push(new kn(0,te,x,ae))):this.angle===90?(E.push(new kn(0,te,x,ae)),te+=ae):this.angle===180?(te-=ae,E.push(new kn(te,0,ae,x))):(E.push(new kn(te,0,ae,x)),te+=ae)}this.commitLayers(E,b)}},kr.prototype.commitLayers=function(){},kr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},kr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Fu&&px(this,y)}};function px(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)px(a,y[b])}}kr.prototype.setPortSpots=function(a){var y=a.alignment;if(bd(y)){var x=this.ud===$c,b=qu(a);switch(b){case 0:var E=Zs;break;case 90:E=Ks;break;case 180:E=ks;break;default:E=bs}var te=a.children,ne=te.length;switch(y){case Hh:case Jc:for(y=0;y<ne;y++){var ae=te[y];if(ae=(x?ae.sourceEdges:ae.destinationEdges).first(),ae!==null&&(ae=ae.link,ae!==null)){var fe=b===90||b===270?ks:bs;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:fe=ks;break;case 90:fe=bs;break;case 180:fe=Zs;break;default:fe=Ks}else y%2===0&&(fe=b===90||b===270?Zs:Ks);x?(a.setsPortSpot&&(ae.fromSpot=E),a.setsChildPortSpot&&(ae.toSpot=fe)):(a.setsPortSpot&&(ae.fromSpot=fe),a.setsChildPortSpot&&(ae.toSpot=E))}}break;case Uh:for(b=b===90||b===270?Zs:Ks,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)));break;case fh:for(b=b===90||b===270?ks:bs,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=qu(a),this.ud===$c){for(E=a.destinationEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.fromSpot=Zs;break;case 90:b.fromSpot=Ks;break;case 180:b.fromSpot=ks;break;default:b.fromSpot=bs}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=ks;break;case 90:b.toSpot=bs;break;case 180:b.toSpot=Zs;break;default:b.toSpot=Ks}else b.toSpot=a.childPortSpot}}else for(E=a.sourceEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.toSpot=Zs;break;case 90:b.toSpot=Ks;break;case 180:b.toSpot=ks;break;default:b.toSpot=bs}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=ks;break;case 90:b.fromSpot=bs;break;case 180:b.fromSpot=Zs;break;default:b.fromSpot=Ks}else b.fromSpot=a.childPortSpot}};function qu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}kr.prototype.computeLayerSpacing=function(a){var y=qu(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},kr.prototype.computeNodeIndent=function(a){var y=qu(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var b=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*b:a.height*b}return x=Math.max(0,x)},Ye.Object.defineProperties(kr.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==z0&&a!==Dy&&a!==Iy&&a!==Ry||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Fy&&a!==jy&&a!==G0||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==H0&&a!==By&&a!==U0||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Op&&a!==Vg&&a!==$g&&!Yg||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):Nt("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==j0&&a!==Xg||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot=a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==Op&&a!==Vg&&a!==$g&&!Yg||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==j0&&a!==Xg||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}});var F0=new En(kr,"PathDefault",-1),$c=new En(kr,"PathDestination",0),Ff=new En(kr,"PathSource",1),Op=new En(kr,"SortingForwards",10),Vg=new En(kr,"SortingReverse",11),$g=new En(kr,"SortingAscending",12),Yg=new En(kr,"SortingDescending",13),Ip=new En(kr,"AlignmentCenterSubtrees",20),jf=new En(kr,"AlignmentCenterChildren",21),Yc=new En(kr,"AlignmentStart",22),Xc=new En(kr,"AlignmentEnd",23),Hh=new En(kr,"AlignmentBus",24),Jc=new En(kr,"AlignmentBusBranching",25),Uh=new En(kr,"AlignmentTopLeftBus",26),fh=new En(kr,"AlignmentBottomRightBus",27),j0=new En(kr,"CompactionNone",30),Xg=new En(kr,"CompactionBlock",31),z0=new En(kr,"StyleLayered",40),Iy=new En(kr,"StyleLastParents",41),Dy=new En(kr,"StyleAlternating",42),Ry=new En(kr,"StyleRootOnly",43),H0=new En(kr,"ArrangementVertical",50),By=new En(kr,"ArrangementHorizontal",51),U0=new En(kr,"ArrangementFixedRoots",52),Fy=new En(kr,"LayerIndividual",60),jy=new En(kr,"LayerSiblings",61),G0=new En(kr,"LayerUniform",62);kr.className="TreeLayout",kr.PathDefault=F0,kr.PathDestination=$c,kr.PathSource=Ff,kr.SortingForwards=Op,kr.SortingReverse=Vg,kr.SortingAscending=$g,kr.SortingDescending=Yg,kr.AlignmentCenterSubtrees=Ip,kr.AlignmentCenterChildren=jf,kr.AlignmentStart=Yc,kr.AlignmentEnd=Xc,kr.AlignmentBus=Hh,kr.AlignmentBusBranching=Jc,kr.AlignmentTopLeftBus=Uh,kr.AlignmentBottomRightBus=fh,kr.CompactionNone=j0,kr.CompactionBlock=Xg,kr.StyleLayered=z0,kr.StyleLastParents=Iy,kr.StyleAlternating=Dy,kr.StyleRootOnly=Ry,kr.ArrangementVertical=H0,kr.ArrangementHorizontal=By,kr.ArrangementFixedRoots=U0,kr.LayerIndividual=Fy,kr.LayerSiblings=jy,kr.LayerUniform=G0;function zf(a){ko.call(this,a)}qe(zf,ko),zf.prototype.createVertex=function(){return new Fu(this)},zf.prototype.createEdge=function(){return new Dp(this)},zf.className="TreeNetwork";function Fu(a){aa.call(this,a),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new Mt(0,0),this.Da=new Xn(0,0),this.la=new Mt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Op,this.hd=oy,this.Kb=0,this.Jb=jf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Xg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=oo,this.wr=!0,this.Dp=oo}qe(Fu,aa),Fu.prototype.copyInheritedPropertiesFrom=function(a){a!==null&&(this.nd=a.sorting,this.hd=a.comparer,this.Kb=a.angle,this.Jb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)},Ye.Object.defineProperties(Fu.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.u=a}}},level:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},descendantCount:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},maxChildrenCount:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},maxGenerationCount:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a)}},comments:{get:function(){return this.td},set:function(a){if(this.td!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.td=a}}},sorting:{get:function(){return this.nd},set:function(a){this.nd!==a&&(this.nd=a)}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a)}},angle:{get:function(){return this.Kb},set:function(a){this.Kb!==a&&(this.Kb=a)}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a)}},nodeIndent:{get:function(){return this.Uq},set:function(a){this.Uq!==a&&(this.Uq=a)}},nodeIndentPastParent:{get:function(){return this.Vq},set:function(a){this.Vq!==a&&(this.Vq=a)}},nodeSpacing:{get:function(){return this.Wq},set:function(a){this.Wq!==a&&(this.Wq=a)}},layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&(this.ie=a)}},layerSpacingParentOverlap:{get:function(){return this.Aq},set:function(a){this.Aq!==a&&(this.Aq=a)}},compaction:{get:function(){return this.Hp},set:function(a){this.Hp!==a&&(this.Hp=a)}},breadthLimit:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(this.Ap=a)}},rowSpacing:{get:function(){return this.nr},set:function(a){this.nr!==a&&(this.nr=a)}},rowIndent:{get:function(){return this.mr},set:function(a){this.mr!==a&&(this.mr=a)}},commentSpacing:{get:function(){return this.Gp},set:function(a){this.Gp!==a&&(this.Gp=a)}},commentMargin:{get:function(){return this.Fp},set:function(a){this.Fp!==a&&(this.Fp=a)}},setsPortSpot:{get:function(){return this.xr},set:function(a){this.xr!==a&&(this.xr=a)}},portSpot:{get:function(){return this.dr},set:function(a){this.dr.D(a)||(this.dr=a)}},setsChildPortSpot:{get:function(){return this.wr},set:function(a){this.wr!==a&&(this.wr=a)}},childPortSpot:{get:function(){return this.Dp},set:function(a){this.Dp.D(a)||(this.Dp=a)}},childrenCount:{get:function(){return this.children.length}},relativePosition:{get:function(){return this.S},set:function(a){this.S.set(a)}},subtreeSize:{get:function(){return this.Da},set:function(a){this.Da.set(a)}},subtreeOffset:{get:function(){return this.la},set:function(a){this.la.set(a)}}}),Fu.className="TreeVertex";function Dp(a){Gl.call(this,a),this.$t=new Mt(0,0)}qe(Dp,Gl),Dp.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case $c:x=this.fromVertex,b=this.toVertex;break;case Ff:x=this.toVertex,b=this.fromVertex;break;default:Nt("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var te=qu(x),ne=y.computeLayerSpacing(x),ae=x.rowSpacing;a.vg();var fe=a.curve===ou,_e=a.isOrthogonal,Te;if(a.uh(),_e||fe){for(Te=2;4<a.pointsCount;)a.pv(2);var je=a.i(1),Ve=a.i(2)}else{for(Te=1;3<a.pointsCount;)a.pv(1);je=a.i(0),Ve=a.i(a.pointsCount-1)}var Qe=a.i(a.pointsCount-1);te===0?(x.alignment===Xc?(te=b.bottom+E.y,E.y===0&&je.y>Qe.y+x.rowIndent&&(te=Math.min(te,Math.max(je.y,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.top+E.y,E.y===0&&je.y<Qe.y-x.rowIndent&&(te=Math.max(te,Math.min(je.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,fe?(a.m(Te,je.x,te),Te++,a.m(Te,b.right+ne,te),Te++,a.m(Te,b.right+ne+(E.x-ae)/3,te),Te++,a.m(Te,b.right+ne+2*(E.x-ae)/3,te),Te++,a.m(Te,b.right+ne+(E.x-ae),te),Te++,a.m(Te,Ve.x,te)):(_e&&(a.m(Te,b.right+ne/2,je.y),Te++),a.m(Te,b.right+ne/2,te),Te++,a.m(Te,b.right+ne+E.x-(_e?ae/2:ae),te),Te++,_e&&a.m(Te,a.i(Te-1).x,Ve.y))):te===90?(x.alignment===Xc?(te=b.right+E.x,E.x===0&&je.x>Qe.x+x.rowIndent&&(te=Math.min(te,Math.max(je.x,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.left+E.x,E.x===0&&je.x<Qe.x-x.rowIndent&&(te=Math.max(te,Math.min(je.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,fe?(a.m(Te,te,je.y),Te++,a.m(Te,te,b.bottom+ne),Te++,a.m(Te,te,b.bottom+ne+(E.y-ae)/3),Te++,a.m(Te,te,b.bottom+ne+2*(E.y-ae)/3),Te++,a.m(Te,te,b.bottom+ne+(E.y-ae)),Te++,a.m(Te,te,Ve.y)):(_e&&(a.m(Te,je.x,b.bottom+ne/2),Te++),a.m(Te,te,b.bottom+ne/2),Te++,a.m(Te,te,b.bottom+ne+E.y-(_e?ae/2:ae)),Te++,_e&&a.m(Te,Ve.x,a.i(Te-1).y))):te===180?(x.alignment===Xc?(te=b.bottom+E.y,E.y===0&&je.y>Qe.y+x.rowIndent&&(te=Math.min(te,Math.max(je.y,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.top+E.y,E.y===0&&je.y<Qe.y-x.rowIndent&&(te=Math.max(te,Math.min(je.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,fe?(a.m(Te,je.x,te),Te++,a.m(Te,b.left-ne,te),Te++,a.m(Te,b.left-ne+(E.x+ae)/3,te),Te++,a.m(Te,b.left-ne+2*(E.x+ae)/3,te),Te++,a.m(Te,b.left-ne+(E.x+ae),te),Te++,a.m(Te,Ve.x,te)):(_e&&(a.m(Te,b.left-ne/2,je.y),Te++),a.m(Te,b.left-ne/2,te),Te++,a.m(Te,b.left-ne+E.x+(_e?ae/2:ae),te),Te++,_e&&a.m(Te,a.i(Te-1).x,Ve.y))):te===270?(x.alignment===Xc?(te=b.right+E.x,E.x===0&&je.x>Qe.x+x.rowIndent&&(te=Math.min(te,Math.max(je.x,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.left+E.x,E.x===0&&je.x<Qe.x-x.rowIndent&&(te=Math.max(te,Math.min(je.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,fe?(a.m(Te,te,je.y),Te++,a.m(Te,te,b.top-ne),Te++,a.m(Te,te,b.top-ne+(E.y+ae)/3),Te++,a.m(Te,te,b.top-ne+2*(E.y+ae)/3),Te++,a.m(Te,te,b.top-ne+(E.y+ae)),Te++,a.m(Te,te,Ve.y)):(_e&&(a.m(Te,je.x,b.top-ne/2),Te++),a.m(Te,te,b.top-ne/2),Te++,a.m(Te,te,b.top-ne+E.y+(_e?ae/2:ae)),Te++,_e&&a.m(Te,Ve.x,a.i(Te-1).y))):Nt("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=qu(x),y!==qu(E)&&(ne=b.computeLayerSpacing(x),ae=x.bounds,x=E.bounds,y===0&&x.left-ae.right<ne+1||y===90&&x.top-ae.bottom<ne+1||y===180&&ae.left-x.right<ne+1||y===270&&ae.top-x.bottom<ne+1||(a.vg(),x=a.curve===ou,E=a.isOrthogonal,b=bd(this.fromVertex.alignment),a.uh(),y===0?(y=ae.right+ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=ae.bottom+ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=ae.left-ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=ae.top-ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},Ye.Object.defineProperties(Dp.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),Dp.className="TreeEdge",Wo.prototype.initializeStandardTools=function(){this.gb("Action",new Qn,this.mouseDownTools),this.gb("Relinking",new Zn,this.mouseDownTools),this.gb("LinkReshaping",new Kn,this.mouseDownTools),this.gb("Rotating",new Ai,this.mouseDownTools),this.gb("Resizing",new ki,this.mouseDownTools),this.gb("Linking",new xn,this.mouseMoveTools),this.gb("Dragging",new ns,this.mouseMoveTools),this.gb("DragSelecting",new Ei,this.mouseMoveTools),this.gb("Panning",new bi,this.mouseMoveTools),this.gb("ContextMenu",new cr,this.mouseUpTools),this.gb("TextEditing",new Tr,this.mouseUpTools),this.gb("ClickCreating",new ji,this.mouseUpTools),this.gb("ClickSelecting",new ur,this.mouseUpTools)},kc("Horizontal",new ym),kc("Spot",new xm),kc("Table",new bm),kc("Viewbox",new _m),kc("TableRow",new Cm),kc("TableColumn",new Pm),kc("Graduated",new dg),kc("Grid",new hg),rp.add("GraphLinksModel",fa),rp.add("TreeModel",xu);var W0=_t.go,zy={get licenseKey(){return vn.licenseKey},set licenseKey(a){vn.licenseKey=a},get version(){return vn.version},Group:ir,EnumValue:En,List:Rn,Set:Nn,Map:ci,Point:Mt,Size:Xn,Rect:kn,Margin:Li,Spot:vi,Geometry:Yn,PathFigure:Vs,PathSegment:Vr,InputEvent:Ea,DiagramEvent:Pc,ChangedEvent:Go,Model:xi,GraphLinksModel:zr,TreeModel:ll,Binding:Hs,Transaction:Bs,UndoManager:Fo,CommandHandler:It,Tool:Gr,DraggingTool:ns,DraggingInfo:ah,DraggingOptions:pe,LinkingBaseTool:Et,LinkingTool:xn,RelinkingTool:Zn,LinkReshapingTool:Kn,ResizingTool:ki,RotatingTool:Ai,ClickSelectingTool:ur,ActionTool:Qn,ClickCreatingTool:ji,HTMLInfo:Ji,ContextMenuTool:cr,DragSelectingTool:Ei,PanningTool:bi,TextEditingTool:Tr,ToolManager:Wo,Animation:gs,AnimationManager:Mo,AnimationTrigger:zl,Layer:os,Diagram:vn,Palette:Fe,Overview:Ue,Brush:po,GraphObject:nn,Panel:Wn,RowColumnDefinition:ta,Shape:gr,TextBlock:To,Picture:vl,Part:Mi,Adornment:qr,Node:oi,Link:$n,Placeholder:rl,Layout:es,LayoutNetwork:ko,LayoutVertex:aa,LayoutEdge:Gl,GridLayout:Pa,PanelLayout:sa,CircularLayout:hs,CircularNetwork:kp,CircularVertex:zg,CircularEdge:P0,ForceDirectedLayout:Aa,ForceDirectedNetwork:Rf,ForceDirectedVertex:Hg,ForceDirectedEdge:Ug,LayeredDigraphLayout:yo,LayeredDigraphNetwork:Np,LayeredDigraphVertex:bu,LayeredDigraphEdge:Zg,TreeLayout:kr,TreeNetwork:zf,TreeVertex:Fu,TreeEdge:Dp};typeof W0=="object"&&W0.version&&Dn("WARNING: a `go` object on the root object is already defined. "+("Debug"in W0?"debug ":"")+"version: "+W0.version+", replaced with version: "+zy.version),vn.prototype.go=zy,_t.go=zy,typeof _n.exports=="object"&&(_n.exports=typeof Ee.g!="undefined"?Ee.g.go:self.go)}();var Me=typeof Ee.g!="undefined"?Ee.g.go:self.go;const me=typeof Ee.g!="undefined"?Ee.g.go:self.go,Be=me.Group,ke=me.EnumValue,Ce=me.List,Le=me.Set,he=me.Map,ye=me.Point,xe=me.Size,ge=me.Rect,le=me.Margin,ve=me.Spot,de=me.Geometry,ce=me.PathFigure,z=me.PathSegment,ee=me.InputEvent,oe=me.DiagramEvent,ie=me.ChangedEvent,se=me.Model,ue=me.GraphLinksModel,Se=me.TreeModel,we=me.Binding,Pe=me.Transaction,Ae=me.UndoManager,De=me.CommandHandler,ze=me.Tool,Ze=me.DraggingTool,Xe=me.DraggingInfo,Ge=me.LinkingBaseTool,ft=me.LinkingTool,at=me.RelinkingTool,Ct=me.LinkReshapingTool,et=me.ResizingTool,yt=me.RotatingTool,st=me.ClickSelectingTool,zt=me.ActionTool,lt=me.ClickCreatingTool,tt=me.HTMLInfo,ut=me.ContextMenuTool,mt=me.DragSelectingTool,Pt=me.PanningTool,gt=me.TextEditingTool,Ft=me.ToolManager,Ht=me.Animation,hn=me.AnimationManager,Qt=me.AnimationTrigger,bn=me.Layer,Wt=me.Diagram,Kt=me.Palette,Jt=me.Overview,Yt=me.Brush,kt=me.GraphObject,pt=me.Panel,Bt=me.RowColumnDefinition,xt=me.Shape,vt=me.TextBlock,nt=me.TextBlockMetrics,He=me.Picture,Ie=me.Part,We=me.Adornment,Oe=me.Node,be=me.Link,Ne=me.Placeholder,$e=me.Layout,dt=me.LayoutNetwork,Je=me.LayoutVertex,At=me.LayoutEdge,tn=me.GridLayout,pn=me.PanelLayout,ln=me.CircularLayout,gn=me.CircularNetwork,Hn=me.CircularVertex,An=me.CircularEdge,qn=me.ForceDirectedLayout,ai=me.ForceDirectedNetwork,Ti=me.ForceDirectedVertex,Ci=me.ForceDirectedEdge,$i=me.LayeredDigraphLayout,or=me.LayeredDigraphNetwork,lr=me.LayeredDigraphVertex,qi=me.LayeredDigraphEdge,Fr=me.TreeLayout,Mr=me.TreeNetwork,yi=me.TreeVertex,dr=me.TreeEdge,Zi=me.version},24334:function(_n,en,Ee){var Me,me;(function(Be,ke){_n.exports=ke(Be)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Ee.g!="undefined"?Ee.g:this,function(Be){"use strict";Be=Be||{};var ke=Be.Base64,Ce="2.6.4",Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",he=function(at){for(var Ct={},et=0,yt=at.length;et<yt;et++)Ct[at.charAt(et)]=et;return Ct}(Le),ye=String.fromCharCode,xe=function(at){if(at.length<2){var Ct=at.charCodeAt(0);return Ct<128?at:Ct<2048?ye(192|Ct>>>6)+ye(128|Ct&63):ye(224|Ct>>>12&15)+ye(128|Ct>>>6&63)+ye(128|Ct&63)}else{var Ct=65536+(at.charCodeAt(0)-55296)*1024+(at.charCodeAt(1)-56320);return ye(240|Ct>>>18&7)+ye(128|Ct>>>12&63)+ye(128|Ct>>>6&63)+ye(128|Ct&63)}},ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,le=function(at){return at.replace(ge,xe)},ve=function(at){var Ct=[0,2,1][at.length%3],et=at.charCodeAt(0)<<16|(at.length>1?at.charCodeAt(1):0)<<8|(at.length>2?at.charCodeAt(2):0),yt=[Le.charAt(et>>>18),Le.charAt(et>>>12&63),Ct>=2?"=":Le.charAt(et>>>6&63),Ct>=1?"=":Le.charAt(et&63)];return yt.join("")},de=Be.btoa&&typeof Be.btoa=="function"?function(at){return Be.btoa(at)}:function(at){if(at.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return at.replace(/[\s\S]{1,3}/g,ve)},ce=function(at){return de(le(String(at)))},z=function(at){return at.replace(/[+\/]/g,function(Ct){return Ct=="+"?"-":"_"}).replace(/=/g,"")},ee=function(at,Ct){return Ct?z(ce(at)):ce(at)},oe=function(at){return ee(at,!0)},ie;Be.Uint8Array&&(ie=function(at,Ct){for(var et="",yt=0,st=at.length;yt<st;yt+=3){var zt=at[yt],lt=at[yt+1],tt=at[yt+2],ut=zt<<16|lt<<8|tt;et+=Le.charAt(ut>>>18)+Le.charAt(ut>>>12&63)+(typeof lt!="undefined"?Le.charAt(ut>>>6&63):"=")+(typeof tt!="undefined"?Le.charAt(ut&63):"=")}return Ct?z(et):et});var se=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=function(at){switch(at.length){case 4:var Ct=(7&at.charCodeAt(0))<<18|(63&at.charCodeAt(1))<<12|(63&at.charCodeAt(2))<<6|63&at.charCodeAt(3),et=Ct-65536;return ye((et>>>10)+55296)+ye((et&1023)+56320);case 3:return ye((15&at.charCodeAt(0))<<12|(63&at.charCodeAt(1))<<6|63&at.charCodeAt(2));default:return ye((31&at.charCodeAt(0))<<6|63&at.charCodeAt(1))}},Se=function(at){return at.replace(se,ue)},we=function(at){var Ct=at.length,et=Ct%4,yt=(Ct>0?he[at.charAt(0)]<<18:0)|(Ct>1?he[at.charAt(1)]<<12:0)|(Ct>2?he[at.charAt(2)]<<6:0)|(Ct>3?he[at.charAt(3)]:0),st=[ye(yt>>>16),ye(yt>>>8&255),ye(yt&255)];return st.length-=[0,0,2,1][et],st.join("")},Pe=Be.atob&&typeof Be.atob=="function"?function(at){return Be.atob(at)}:function(at){return at.replace(/\S{1,4}/g,we)},Ae=function(at){return Pe(String(at).replace(/[^A-Za-z0-9\+\/]/g,""))},De=function(at){return Se(Pe(at))},ze=function(at){return String(at).replace(/[-_]/g,function(Ct){return Ct=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ze=function(at){return De(ze(at))},Xe;Be.Uint8Array&&(Xe=function(at){return Uint8Array.from(Ae(ze(at)),function(Ct){return Ct.charCodeAt(0)})});var Ge=function(){var at=Be.Base64;return Be.Base64=ke,at};if(Be.Base64={VERSION:Ce,atob:Ae,btoa:de,fromBase64:Ze,toBase64:ee,utob:le,encode:ee,encodeURI:oe,btou:Se,decode:Ze,noConflict:Ge,fromUint8Array:ie,toUint8Array:Xe},typeof Object.defineProperty=="function"){var ft=function(at){return{value:at,enumerable:!1,writable:!0,configurable:!0}};Be.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ft(function(){return Ze(this)})),Object.defineProperty(String.prototype,"toBase64",ft(function(at){return ee(this,at)})),Object.defineProperty(String.prototype,"toBase64URI",ft(function(){return ee(this,!0)}))}}return Be.Meteor&&(Base64=Be.Base64),_n.exports?_n.exports.Base64=Be.Base64:(Me=[],me=function(){return Be.Base64}.apply(en,Me),me!==void 0&&(_n.exports=me)),{Base64:Be.Base64}})},17115:function(_n,en,Ee){"use strict";Ee.d(en,{ZP:function(){return he}});var Me=Ee(52487),me=Ee(59301),Be=Ee(47273),ke=0,Ce=(0,Be.Z)();function Le(){var ye;return Ce?(ye=ke,ke+=1):ye="TEST_OR_SSR",ye}function he(ye){var xe=me.useState(),ge=(0,Me.Z)(xe,2),le=ge[0],ve=ge[1];return me.useEffect(function(){ve("rc_select_".concat(Le()))},[]),ye||le}},77861:function(_n,en,Ee){"use strict";Ee.d(en,{Ac:function(){return $e},Xo:function(){return Ci},Wx:function(){return or},ZP:function(){return Ot},lk:function(){return Se}});var Me=Ee(72308),me=Ee(80702),Be=Ee(49618),ke=Ee(77321),Ce=Ee(52487),Le=Ee(74416),he=Ee(62853),ye=Ee(18929),xe=Ee(48736),ge=Ee(59301),le=Ee(92310),ve=Ee.n(le),de=Ee(34280),ce=Ee(49658),z=Ee(10228),ee=Ee(8654),oe=function(_t){var dn=_t.className,Pn=_t.customizeIcon,mn=_t.customizeIconProps,sn=_t.onMouseDown,Nt=_t.onClick,un=_t.children,Ln;return typeof Pn=="function"?Ln=Pn(mn):Ln=Pn,ge.createElement("span",{className:dn,onMouseDown:function($t){$t.preventDefault(),sn&&sn($t)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Nt,"aria-hidden":!0},Ln!==void 0?Ln:ge.createElement("span",{className:ve()(dn.split(/\s+/).map(function(Dn){return"".concat(Dn,"-icon")}))},un))},ie=oe;function se(Tt,_t,dn,Pn,mn){var sn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Nt=arguments.length>6?arguments[6]:void 0,un=arguments.length>7?arguments[7]:void 0,Ln=ge.useMemo(function(){if((0,he.Z)(Pn)==="object")return Pn.clearIcon;if(mn)return mn},[Pn,mn]),Dn=ge.useMemo(function(){return!!(!sn&&Pn&&(dn.length||Nt)&&!(un==="combobox"&&Nt===""))},[Pn,sn,dn.length,Nt,un]);return{allowClear:Dn,clearIcon:ge.createElement(ie,{className:"".concat(Tt,"-clear"),onMouseDown:_t,customizeIcon:Ln},"\xD7")}}var ue=ge.createContext(null);function Se(){return ge.useContext(ue)}function we(){var Tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,_t=ge.useState(!1),dn=(0,Ce.Z)(_t,2),Pn=dn[0],mn=dn[1],sn=ge.useRef(null),Nt=function(){window.clearTimeout(sn.current)};ge.useEffect(function(){return Nt},[]);var un=function(Dn,$t){Nt(),sn.current=window.setTimeout(function(){mn(Dn),$t&&$t()},Tt)};return[Pn,un,Nt]}function Pe(){var Tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,_t=ge.useRef(null),dn=ge.useRef(null);ge.useEffect(function(){return function(){window.clearTimeout(dn.current)}},[]);function Pn(mn){(mn||_t.current===null)&&(_t.current=mn),window.clearTimeout(dn.current),dn.current=window.setTimeout(function(){_t.current=null},Tt)}return[function(){return _t.current},Pn]}function Ae(Tt,_t,dn,Pn){var mn=ge.useRef(null);mn.current={open:_t,triggerOpen:dn,customizedTrigger:Pn},ge.useEffect(function(){function sn(Nt){var un;if(!((un=mn.current)!==null&&un!==void 0&&un.customizedTrigger)){var Ln=Nt.target;Ln.shadowRoot&&Nt.composed&&(Ln=Nt.composedPath()[0]||Ln),mn.current.open&&Tt().filter(function(Dn){return Dn}).every(function(Dn){return!Dn.contains(Ln)&&Dn!==Ln})&&mn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",sn),function(){return window.removeEventListener("mousedown",sn)}},[])}var De=Ee(26112),ze=Ee(11780),Ze=function(_t,dn){var Pn,mn,sn=_t.prefixCls,Nt=_t.id,un=_t.inputElement,Ln=_t.disabled,Dn=_t.tabIndex,$t=_t.autoFocus,rn=_t.autoComplete,jn=_t.editable,On=_t.activeDescendantId,ei=_t.value,Gn=_t.maxLength,ti=_t.onKeyDown,Bn=_t.onMouseDown,li=_t.onChange,Di=_t.onPaste,Ri=_t.onCompositionStart,Mn=_t.onCompositionEnd,Xi=_t.open,Nr=_t.attrs,zi=un||ge.createElement("input",null),En=zi,Jn=En.ref,fi=En.props,Si=fi.onKeyDown,hi=fi.onChange,Oi=fi.onMouseDown,tr=fi.onCompositionStart,Fi=fi.onCompositionEnd,Hi=fi.style;return(0,xe.Kp)(!("maxLength"in zi.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),zi=ge.cloneElement(zi,(0,ke.Z)((0,ke.Z)((0,ke.Z)({type:"search"},fi),{},{id:Nt,ref:(0,ee.sQ)(dn,Jn),disabled:Ln,tabIndex:Dn,autoComplete:rn||"off",autoFocus:$t,className:ve()("".concat(sn,"-selection-search-input"),(Pn=zi)===null||Pn===void 0||(mn=Pn.props)===null||mn===void 0?void 0:mn.className),role:"combobox","aria-label":"Search","aria-expanded":Xi||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Nt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Nt,"_list"),"aria-activedescendant":Xi?On:void 0},Nr),{},{value:jn?ei:"",maxLength:Gn,readOnly:!jn,unselectable:jn?null:"on",style:(0,ke.Z)((0,ke.Z)({},Hi),{},{opacity:jn?null:0}),onKeyDown:function(Rn){ti(Rn),Si&&Si(Rn)},onMouseDown:function(Rn){Bn(Rn),Oi&&Oi(Rn)},onChange:function(Rn){li(Rn),hi&&hi(Rn)},onCompositionStart:function(Rn){Ri(Rn),tr&&tr(Rn)},onCompositionEnd:function(Rn){Mn(Rn),Fi&&Fi(Rn)},onPaste:Di})),zi},Xe=ge.forwardRef(Ze);Xe.displayName="Input";var Ge=Xe;function ft(Tt){return Array.isArray(Tt)?Tt:Tt!==void 0?[Tt]:[]}var at=typeof window!="undefined"&&window.document&&window.document.documentElement,Ct=at;function et(Tt){return Tt!=null}function yt(Tt){return!Tt&&Tt!==0}function st(Tt){return["string","number"].includes((0,he.Z)(Tt))}function zt(Tt){var _t=void 0;return Tt&&(st(Tt.title)?_t=Tt.title.toString():st(Tt.label)&&(_t=Tt.label.toString())),_t}function lt(Tt,_t){Ct?ge.useLayoutEffect(Tt,_t):ge.useEffect(Tt,_t)}function tt(Tt){var _t;return(_t=Tt.key)!==null&&_t!==void 0?_t:Tt.value}var ut=function(_t){_t.preventDefault(),_t.stopPropagation()},mt=function(_t){var dn=_t.id,Pn=_t.prefixCls,mn=_t.values,sn=_t.open,Nt=_t.searchValue,un=_t.autoClearSearchValue,Ln=_t.inputRef,Dn=_t.placeholder,$t=_t.disabled,rn=_t.mode,jn=_t.showSearch,On=_t.autoFocus,ei=_t.autoComplete,Gn=_t.activeDescendantId,ti=_t.tabIndex,Bn=_t.removeIcon,li=_t.maxTagCount,Di=_t.maxTagTextLength,Ri=_t.maxTagPlaceholder,Mn=Ri===void 0?function(Ur){return"+ ".concat(Ur.length," ...")}:Ri,Xi=_t.tagRender,Nr=_t.onToggleOpen,zi=_t.onRemove,En=_t.onInputChange,Jn=_t.onInputPaste,fi=_t.onInputKeyDown,Si=_t.onInputMouseDown,hi=_t.onInputCompositionStart,Oi=_t.onInputCompositionEnd,tr=ge.useRef(null),Fi=(0,ge.useState)(0),Hi=(0,Ce.Z)(Fi,2),mr=Hi[0],Rn=Hi[1],Br=(0,ge.useState)(!1),Nn=(0,Ce.Z)(Br,2),vr=Nn[0],So=Nn[1],Dr="".concat(Pn,"-selection"),Co=sn||rn==="multiple"&&un===!1||rn==="tags"?Nt:"",ho=rn==="tags"||rn==="multiple"&&un===!1||jn&&(sn||vr);lt(function(){Rn(tr.current.scrollWidth)},[Co]);function Yi(Ur,Hr,ts,Ao,ss){return ge.createElement("span",{className:ve()("".concat(Dr,"-item"),(0,Be.Z)({},"".concat(Dr,"-item-disabled"),ts)),title:zt(Ur)},ge.createElement("span",{className:"".concat(Dr,"-item-content")},Hr),Ao&&ge.createElement(ie,{className:"".concat(Dr,"-item-remove"),onMouseDown:ut,onClick:ss,customizeIcon:Bn},"\xD7"))}function Ui(Ur,Hr,ts,Ao,ss){var _r=function(Kr){ut(Kr),Nr(!sn)};return ge.createElement("span",{onMouseDown:_r},Xi({label:Hr,value:Ur,disabled:ts,closable:Ao,onClose:ss}))}function hr(Ur){var Hr=Ur.disabled,ts=Ur.label,Ao=Ur.value,ss=!$t&&!Hr,_r=ts;if(typeof Di=="number"&&(typeof ts=="string"||typeof ts=="number")){var fr=String(_r);fr.length>Di&&(_r="".concat(fr.slice(0,Di),"..."))}var Kr=function(eo){eo&&eo.stopPropagation(),zi(Ur)};return typeof Xi=="function"?Ui(Ao,_r,Hr,ss,Kr):Yi(Ur,_r,Hr,ss,Kr)}function Pr(Ur){var Hr=typeof Mn=="function"?Mn(Ur):Mn;return Yi({title:Hr},Hr,!1)}var ci=ge.createElement("div",{className:"".concat(Dr,"-search"),style:{width:mr},onFocus:function(){So(!0)},onBlur:function(){So(!1)}},ge.createElement(Ge,{ref:Ln,open:sn,prefixCls:Pn,id:dn,inputElement:null,disabled:$t,autoFocus:On,autoComplete:ei,editable:ho,activeDescendantId:Gn,value:Co,onKeyDown:fi,onMouseDown:Si,onChange:En,onPaste:Jn,onCompositionStart:hi,onCompositionEnd:Oi,tabIndex:ti,attrs:(0,De.Z)(_t,!0)}),ge.createElement("span",{ref:tr,className:"".concat(Dr,"-search-mirror"),"aria-hidden":!0},Co,"\xA0")),Mt=ge.createElement(ze.Z,{prefixCls:"".concat(Dr,"-overflow"),data:mn,renderItem:hr,renderRest:Pr,suffix:ci,itemKey:tt,maxCount:li});return ge.createElement(ge.Fragment,null,Mt,!mn.length&&!Co&&ge.createElement("span",{className:"".concat(Dr,"-placeholder")},Dn))},Pt=mt,gt=function(_t){var dn=_t.inputElement,Pn=_t.prefixCls,mn=_t.id,sn=_t.inputRef,Nt=_t.disabled,un=_t.autoFocus,Ln=_t.autoComplete,Dn=_t.activeDescendantId,$t=_t.mode,rn=_t.open,jn=_t.values,On=_t.placeholder,ei=_t.tabIndex,Gn=_t.showSearch,ti=_t.searchValue,Bn=_t.activeValue,li=_t.maxLength,Di=_t.onInputKeyDown,Ri=_t.onInputMouseDown,Mn=_t.onInputChange,Xi=_t.onInputPaste,Nr=_t.onInputCompositionStart,zi=_t.onInputCompositionEnd,En=_t.title,Jn=ge.useState(!1),fi=(0,Ce.Z)(Jn,2),Si=fi[0],hi=fi[1],Oi=$t==="combobox",tr=Oi||Gn,Fi=jn[0],Hi=ti||"";Oi&&Bn&&!Si&&(Hi=Bn),ge.useEffect(function(){Oi&&hi(!1)},[Oi,Bn]);var mr=$t!=="combobox"&&!rn&&!Gn?!1:!!Hi,Rn=En===void 0?zt(Fi):En,Br=function(){if(Fi)return null;var vr=mr?{visibility:"hidden"}:void 0;return ge.createElement("span",{className:"".concat(Pn,"-selection-placeholder"),style:vr},On)};return ge.createElement(ge.Fragment,null,ge.createElement("span",{className:"".concat(Pn,"-selection-search")},ge.createElement(Ge,{ref:sn,prefixCls:Pn,id:mn,open:rn,inputElement:dn,disabled:Nt,autoFocus:un,autoComplete:Ln,editable:tr,activeDescendantId:Dn,value:Hi,onKeyDown:Di,onMouseDown:Ri,onChange:function(vr){hi(!0),Mn(vr)},onPaste:Xi,onCompositionStart:Nr,onCompositionEnd:zi,tabIndex:ei,attrs:(0,De.Z)(_t,!0),maxLength:Oi?li:void 0})),!Oi&&Fi?ge.createElement("span",{className:"".concat(Pn,"-selection-item"),title:Rn,style:mr?{visibility:"hidden"}:void 0},Fi.label):null,Br())},Ft=gt;function Ht(Tt){return![z.Z.ESC,z.Z.SHIFT,z.Z.BACKSPACE,z.Z.TAB,z.Z.WIN_KEY,z.Z.ALT,z.Z.META,z.Z.WIN_KEY_RIGHT,z.Z.CTRL,z.Z.SEMICOLON,z.Z.EQUALS,z.Z.CAPS_LOCK,z.Z.CONTEXT_MENU,z.Z.F1,z.Z.F2,z.Z.F3,z.Z.F4,z.Z.F5,z.Z.F6,z.Z.F7,z.Z.F8,z.Z.F9,z.Z.F10,z.Z.F11,z.Z.F12].includes(Tt)}var hn=function(_t,dn){var Pn=(0,ge.useRef)(null),mn=(0,ge.useRef)(!1),sn=_t.prefixCls,Nt=_t.open,un=_t.mode,Ln=_t.showSearch,Dn=_t.tokenWithEnter,$t=_t.autoClearSearchValue,rn=_t.onSearch,jn=_t.onSearchSubmit,On=_t.onToggleOpen,ei=_t.onInputKeyDown,Gn=_t.domRef;ge.useImperativeHandle(dn,function(){return{focus:function(){Pn.current.focus()},blur:function(){Pn.current.blur()}}});var ti=Pe(0),Bn=(0,Ce.Z)(ti,2),li=Bn[0],Di=Bn[1],Ri=function(Hi){var mr=Hi.which;(mr===z.Z.UP||mr===z.Z.DOWN)&&Hi.preventDefault(),ei&&ei(Hi),mr===z.Z.ENTER&&un==="tags"&&!mn.current&&!Nt&&(jn==null||jn(Hi.target.value)),Ht(mr)&&On(!0)},Mn=function(){Di(!0)},Xi=(0,ge.useRef)(null),Nr=function(Hi){rn(Hi,!0,mn.current)!==!1&&On(!0)},zi=function(){mn.current=!0},En=function(Hi){mn.current=!1,un!=="combobox"&&Nr(Hi.target.value)},Jn=function(Hi){var mr=Hi.target.value;if(Dn&&Xi.current&&/[\r\n]/.test(Xi.current)){var Rn=Xi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");mr=mr.replace(Rn,Xi.current)}Xi.current=null,Nr(mr)},fi=function(Hi){var mr=Hi.clipboardData,Rn=mr.getData("text");Xi.current=Rn},Si=function(Hi){var mr=Hi.target;if(mr!==Pn.current){var Rn=document.body.style.msTouchAction!==void 0;Rn?setTimeout(function(){Pn.current.focus()}):Pn.current.focus()}},hi=function(Hi){var mr=li();Hi.target!==Pn.current&&!mr&&un!=="combobox"&&Hi.preventDefault(),(un!=="combobox"&&(!Ln||!mr)||!Nt)&&(Nt&&$t!==!1&&rn("",!0,!1),On())},Oi={inputRef:Pn,onInputKeyDown:Ri,onInputMouseDown:Mn,onInputChange:Jn,onInputPaste:fi,onInputCompositionStart:zi,onInputCompositionEnd:En},tr=un==="multiple"||un==="tags"?ge.createElement(Pt,(0,Me.Z)({},_t,Oi)):ge.createElement(Ft,(0,Me.Z)({},_t,Oi));return ge.createElement("div",{ref:Gn,className:"".concat(sn,"-selector"),onClick:Si,onMouseDown:hi},tr)},Qt=ge.forwardRef(hn);Qt.displayName="Selector";var bn=Qt,Wt=Ee(35593),Kt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Jt=function(_t){var dn=_t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"}}},Yt=function(_t,dn){var Pn=_t.prefixCls,mn=_t.disabled,sn=_t.visible,Nt=_t.children,un=_t.popupElement,Ln=_t.animation,Dn=_t.transitionName,$t=_t.dropdownStyle,rn=_t.dropdownClassName,jn=_t.direction,On=jn===void 0?"ltr":jn,ei=_t.placement,Gn=_t.builtinPlacements,ti=_t.dropdownMatchSelectWidth,Bn=_t.dropdownRender,li=_t.dropdownAlign,Di=_t.getPopupContainer,Ri=_t.empty,Mn=_t.getTriggerDOMNode,Xi=_t.onPopupVisibleChange,Nr=_t.onPopupMouseEnter,zi=(0,Le.Z)(_t,Kt),En="".concat(Pn,"-dropdown"),Jn=un;Bn&&(Jn=Bn(un));var fi=ge.useMemo(function(){return Gn||Jt(ti)},[Gn,ti]),Si=Ln?"".concat(En,"-").concat(Ln):Dn,hi=typeof ti=="number",Oi=ge.useMemo(function(){return hi?null:ti===!1?"minWidth":"width"},[ti,hi]),tr=$t;hi&&(tr=(0,ke.Z)((0,ke.Z)({},tr),{},{width:ti}));var Fi=ge.useRef(null);return ge.useImperativeHandle(dn,function(){return{getPopupElement:function(){return Fi.current}}}),ge.createElement(Wt.Z,(0,Me.Z)({},zi,{showAction:Xi?["click"]:[],hideAction:Xi?["click"]:[],popupPlacement:ei||(On==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:fi,prefixCls:En,popupTransitionName:Si,popup:ge.createElement("div",{ref:Fi,onMouseEnter:Nr},Jn),stretch:Oi,popupAlign:li,popupVisible:sn,getPopupContainer:Di,popupClassName:ve()(rn,(0,Be.Z)({},"".concat(En,"-empty"),Ri)),popupStyle:tr,getTriggerDOMNode:Mn,onPopupVisibleChange:Xi}),Nt)},kt=ge.forwardRef(Yt);kt.displayName="SelectTrigger";var pt=kt,Bt=Ee(68413);function xt(Tt,_t){var dn=Tt.key,Pn;return"value"in Tt&&(Pn=Tt.value),dn!=null?dn:Pn!==void 0?Pn:"rc-index-key-".concat(_t)}function vt(Tt,_t){var dn=Tt||{},Pn=dn.label,mn=dn.value,sn=dn.options,Nt=dn.groupLabel,un=Pn||(_t?"children":"label");return{label:un,value:mn||"value",options:sn||"options",groupLabel:Nt||un}}function nt(Tt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dn=_t.fieldNames,Pn=_t.childrenAsData,mn=[],sn=vt(dn,!1),Nt=sn.label,un=sn.value,Ln=sn.options,Dn=sn.groupLabel;function $t(rn,jn){rn.forEach(function(On){if(jn||!(Ln in On)){var ei=On[un];mn.push({key:xt(On,mn.length),groupOption:jn,data:On,label:On[Nt],value:ei})}else{var Gn=On[Dn];Gn===void 0&&Pn&&(Gn=On.label),mn.push({key:xt(On,mn.length),group:!0,data:On,label:Gn}),$t(On[Ln],!0)}})}return $t(Tt,!1),mn}function He(Tt){var _t=(0,ke.Z)({},Tt);return"props"in _t||Object.defineProperty(_t,"props",{get:function(){return(0,xe.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),_t}}),_t}function Ie(Tt,_t){if(!_t||!_t.length)return null;var dn=!1;function Pn(sn,Nt){var un=(0,Bt.Z)(Nt),Ln=un[0],Dn=un.slice(1);if(!Ln)return[sn];var $t=sn.split(Ln);return dn=dn||$t.length>1,$t.reduce(function(rn,jn){return[].concat((0,me.Z)(rn),(0,me.Z)(Pn(jn,Dn)))},[]).filter(function(rn){return rn})}var mn=Pn(Tt,_t);return dn?mn:null}var We=["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"],Oe=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function be(Tt){return Tt==="tags"||Tt==="multiple"}var Ne=ge.forwardRef(function(Tt,_t){var dn,Pn,mn=Tt.id,sn=Tt.prefixCls,Nt=Tt.className,un=Tt.showSearch,Ln=Tt.tagRender,Dn=Tt.direction,$t=Tt.omitDomProps,rn=Tt.displayValues,jn=Tt.onDisplayValuesChange,On=Tt.emptyOptions,ei=Tt.notFoundContent,Gn=ei===void 0?"Not Found":ei,ti=Tt.onClear,Bn=Tt.mode,li=Tt.disabled,Di=Tt.loading,Ri=Tt.getInputElement,Mn=Tt.getRawInputElement,Xi=Tt.open,Nr=Tt.defaultOpen,zi=Tt.onDropdownVisibleChange,En=Tt.activeValue,Jn=Tt.onActiveValueChange,fi=Tt.activeDescendantId,Si=Tt.searchValue,hi=Tt.autoClearSearchValue,Oi=Tt.onSearch,tr=Tt.onSearchSplit,Fi=Tt.tokenSeparators,Hi=Tt.allowClear,mr=Tt.suffixIcon,Rn=Tt.clearIcon,Br=Tt.OptionList,Nn=Tt.animation,vr=Tt.transitionName,So=Tt.dropdownStyle,Dr=Tt.dropdownClassName,Co=Tt.dropdownMatchSelectWidth,ho=Tt.dropdownRender,Yi=Tt.dropdownAlign,Ui=Tt.placement,hr=Tt.builtinPlacements,Pr=Tt.getPopupContainer,ci=Tt.showAction,Mt=ci===void 0?[]:ci,Ur=Tt.onFocus,Hr=Tt.onBlur,ts=Tt.onKeyUp,Ao=Tt.onKeyDown,ss=Tt.onMouseDown,_r=(0,Le.Z)(Tt,We),fr=be(Bn),Kr=(un!==void 0?un:fr)||Bn==="combobox",pr=(0,ke.Z)({},_r);Oe.forEach(function(oo){delete pr[oo]}),$t==null||$t.forEach(function(oo){delete pr[oo]});var eo=ge.useState(!1),Yo=(0,Ce.Z)(eo,2),sr=Yo[0],Ki=Yo[1];ge.useEffect(function(){Ki((0,ce.Z)())},[]);var Xn=ge.useRef(null),ar=ge.useRef(null),to=ge.useRef(null),Ro=ge.useRef(null),Bo=ge.useRef(null),Xo=we(),as=(0,Ce.Z)(Xo,3),Ho=as[0],ia=as[1],_s=as[2];ge.useImperativeHandle(_t,function(){var oo,Uo;return{focus:(oo=Ro.current)===null||oo===void 0?void 0:oo.focus,blur:(Uo=Ro.current)===null||Uo===void 0?void 0:Uo.blur,scrollTo:function(ra){var Ds;return(Ds=Bo.current)===null||Ds===void 0?void 0:Ds.scrollTo(ra)}}});var la=ge.useMemo(function(){var oo;if(Bn!=="combobox")return Si;var Uo=(oo=rn[0])===null||oo===void 0?void 0:oo.value;return typeof Uo=="string"||typeof Uo=="number"?String(Uo):""},[Si,Bn,rn]),kn=Bn==="combobox"&&typeof Ri=="function"&&Ri()||null,Is=typeof Mn=="function"&&Mn(),Pu=(0,ee.x1)(ar,Is==null||(dn=Is.props)===null||dn===void 0?void 0:dn.ref),Ua=ge.useState(!1),Sa=(0,Ce.Z)(Ua,2),us=Sa[0],Ws=Sa[1];(0,de.Z)(function(){Ws(!0)},[]);var _o=(0,ye.Z)(!1,{defaultValue:Nr,value:Xi}),No=(0,Ce.Z)(_o,2),Lo=No[0],ua=No[1],br=us?Lo:!1,uo=!Gn&&On;(li||uo&&br&&Bn==="combobox")&&(br=!1);var Yr=uo?!1:br,Li=ge.useCallback(function(oo){var Uo=oo!==void 0?oo:!br;li||(ua(Uo),br!==Uo&&(zi==null||zi(Uo)))},[li,br,ua,zi]),Es=ge.useMemo(function(){return(Fi||[]).some(function(oo){return[`
|
|
|
`,`\r
|
|
|
`].includes(oo)})},[Fi]),Ls=function(Uo,ka,ra){var Ds=!0,bs=Uo;Jn==null||Jn(null);var ks=ra?null:Ie(Uo,Fi);return Bn!=="combobox"&&ks&&(bs="",tr==null||tr(ks),Li(!1),Ds=!1),Oi&&la!==bs&&Oi(bs,{source:ka?"typing":"effect"}),Ds},xa=function(Uo){!Uo||!Uo.trim()||Oi(Uo,{source:"submit"})};ge.useEffect(function(){!br&&!fr&&Bn!=="combobox"&&Ls("",!1,!1)},[br]),ge.useEffect(function(){Lo&&li&&ua(!1),li&&ia(!1)},[li]);var xl=Pe(),Il=(0,Ce.Z)(xl,2),vi=Il[0],ms=Il[1],Xs=function(Uo){var ka=vi(),ra=Uo.which;if(ra===z.Z.ENTER&&(Bn!=="combobox"&&Uo.preventDefault(),br||Li(!0)),ms(!!la),ra===z.Z.BACKSPACE&&!ka&&fr&&!la&&rn.length){for(var Ds=(0,me.Z)(rn),bs=null,ks=Ds.length-1;ks>=0;ks-=1){var Zs=Ds[ks];if(!Zs.disabled){Ds.splice(ks,1),bs=Zs;break}}bs&&jn(Ds,{type:"remove",values:[bs]})}for(var Ks=arguments.length,Yl=new Array(Ks>1?Ks-1:0),Bl=1;Bl<Ks;Bl++)Yl[Bl-1]=arguments[Bl];if(br&&Bo.current){var Rs;(Rs=Bo.current).onKeyDown.apply(Rs,[Uo].concat(Yl))}Ao==null||Ao.apply(void 0,[Uo].concat(Yl))},qa=function(Uo){for(var ka=arguments.length,ra=new Array(ka>1?ka-1:0),Ds=1;Ds<ka;Ds++)ra[Ds-1]=arguments[Ds];if(br&&Bo.current){var bs;(bs=Bo.current).onKeyUp.apply(bs,[Uo].concat(ra))}ts==null||ts.apply(void 0,[Uo].concat(ra))},wl=function(Uo){var ka=rn.filter(function(ra){return ra!==Uo});jn(ka,{type:"remove",values:[Uo]})},Dl=ge.useRef(!1),jr=function(){ia(!0),li||(Ur&&!Dl.current&&Ur.apply(void 0,arguments),Mt.includes("focus")&&Li(!0)),Dl.current=!0},nc=function(){ia(!1,function(){Dl.current=!1,Li(!1)}),!li&&(la&&(Bn==="tags"?Oi(la,{source:"submit"}):Bn==="multiple"&&Oi("",{source:"blur"})),Hr&&Hr.apply(void 0,arguments))},Ia=[];ge.useEffect(function(){return function(){Ia.forEach(function(oo){return clearTimeout(oo)}),Ia.splice(0,Ia.length)}},[]);var Ga=function(Uo){var ka,ra=Uo.target,Ds=(ka=to.current)===null||ka===void 0?void 0:ka.getPopupElement();if(Ds&&Ds.contains(ra)){var bs=setTimeout(function(){var Yl=Ia.indexOf(bs);if(Yl!==-1&&Ia.splice(Yl,1),_s(),!sr&&!Ds.contains(document.activeElement)){var Bl;(Bl=Ro.current)===null||Bl===void 0||Bl.focus()}});Ia.push(bs)}for(var ks=arguments.length,Zs=new Array(ks>1?ks-1:0),Ks=1;Ks<ks;Ks++)Zs[Ks-1]=arguments[Ks];ss==null||ss.apply(void 0,[Uo].concat(Zs))},Na=ge.useState({}),$l=(0,Ce.Z)(Na,2),_u=$l[1];function Wa(){_u({})}var Za;Is&&(Za=function(Uo){Li(Uo)}),Ae(function(){var oo;return[Xn.current,(oo=to.current)===null||oo===void 0?void 0:oo.getPopupElement()]},Yr,Li,!!Is);var Uu=ge.useMemo(function(){return(0,ke.Z)((0,ke.Z)({},Tt),{},{notFoundContent:Gn,open:br,triggerOpen:Yr,id:mn,showSearch:Kr,multiple:fr,toggleOpen:Li})},[Tt,Gn,Yr,br,mn,Kr,fr,Li]),yc=!!mr||Di,Eu;yc&&(Eu=ge.createElement(ie,{className:ve()("".concat(sn,"-arrow"),(0,Be.Z)({},"".concat(sn,"-arrow-loading"),Di)),customizeIcon:mr,customizeIconProps:{loading:Di,searchValue:la,open:br,focused:Ho,showSearch:Kr}}));var Rl=function(){var Uo;ti==null||ti(),(Uo=Ro.current)===null||Uo===void 0||Uo.focus(),jn([],{type:"clear",values:rn}),Ls("",!1,!1)},Sc=se(sn,Rl,rn,Hi,Rn,li,la,Bn),Gu=Sc.allowClear,Lu=Sc.clearIcon,bl=ge.createElement(Br,{ref:Bo}),th=ve()(sn,Nt,(Pn={},(0,Be.Z)(Pn,"".concat(sn,"-focused"),Ho),(0,Be.Z)(Pn,"".concat(sn,"-multiple"),fr),(0,Be.Z)(Pn,"".concat(sn,"-single"),!fr),(0,Be.Z)(Pn,"".concat(sn,"-allow-clear"),Hi),(0,Be.Z)(Pn,"".concat(sn,"-show-arrow"),yc),(0,Be.Z)(Pn,"".concat(sn,"-disabled"),li),(0,Be.Z)(Pn,"".concat(sn,"-loading"),Di),(0,Be.Z)(Pn,"".concat(sn,"-open"),br),(0,Be.Z)(Pn,"".concat(sn,"-customize-input"),kn),(0,Be.Z)(Pn,"".concat(sn,"-show-search"),Kr),Pn)),xc=ge.createElement(pt,{ref:to,disabled:li,prefixCls:sn,visible:Yr,popupElement:bl,animation:Nn,transitionName:vr,dropdownStyle:So,dropdownClassName:Dr,direction:Dn,dropdownMatchSelectWidth:Co,dropdownRender:ho,dropdownAlign:Yi,placement:Ui,builtinPlacements:hr,getPopupContainer:Pr,empty:On,getTriggerDOMNode:function(){return ar.current},onPopupVisibleChange:Za,onPopupMouseEnter:Wa},Is?ge.cloneElement(Is,{ref:Pu}):ge.createElement(bn,(0,Me.Z)({},Tt,{domRef:ar,prefixCls:sn,inputElement:kn,ref:Ro,id:mn,showSearch:Kr,autoClearSearchValue:hi,mode:Bn,activeDescendantId:fi,tagRender:Ln,values:rn,open:br,onToggleOpen:Li,activeValue:En,searchValue:la,onSearch:Ls,onSearchSubmit:xa,onRemove:wl,tokenWithEnter:Es}))),lu;return Is?lu=xc:lu=ge.createElement("div",(0,Me.Z)({className:th},pr,{ref:Xn,onMouseDown:Ga,onKeyDown:Xs,onKeyUp:qa,onFocus:jr,onBlur:nc}),Ho&&!br&&ge.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(rn.map(function(oo){var Uo=oo.label,ka=oo.value;return["number","string"].includes((0,he.Z)(Uo))?Uo:ka}).join(", "))),xc,Eu,Gu&&Lu),ge.createElement(ue.Provider,{value:Uu},lu)}),$e=Ne,dt=function(Tt,_t){var dn=ge.useRef({values:new Map,options:new Map}),Pn=ge.useMemo(function(){var sn=dn.current,Nt=sn.values,un=sn.options,Ln=Tt.map(function(rn){if(rn.label===void 0){var jn;return(0,ke.Z)((0,ke.Z)({},rn),{},{label:(jn=Nt.get(rn.value))===null||jn===void 0?void 0:jn.label})}return rn}),Dn=new Map,$t=new Map;return Ln.forEach(function(rn){Dn.set(rn.value,rn),$t.set(rn.value,_t.get(rn.value)||un.get(rn.value))}),dn.current.values=Dn,dn.current.options=$t,Ln},[Tt,_t]),mn=ge.useCallback(function(sn){return _t.get(sn)||dn.current.options.get(sn)},[_t]);return[Pn,mn]};function Je(Tt,_t){return ft(Tt).join("").toUpperCase().includes(_t)}var At=function(Tt,_t,dn,Pn,mn){return ge.useMemo(function(){if(!dn||Pn===!1)return Tt;var sn=_t.options,Nt=_t.label,un=_t.value,Ln=[],Dn=typeof Pn=="function",$t=dn.toUpperCase(),rn=Dn?Pn:function(On,ei){return mn?Je(ei[mn],$t):ei[sn]?Je(ei[Nt!=="children"?Nt:"label"],$t):Je(ei[un],$t)},jn=Dn?function(On){return He(On)}:function(On){return On};return Tt.forEach(function(On){if(On[sn]){var ei=rn(dn,jn(On));if(ei)Ln.push(On);else{var Gn=On[sn].filter(function(ti){return rn(dn,jn(ti))});Gn.length&&Ln.push((0,ke.Z)((0,ke.Z)({},On),{},(0,Be.Z)({},sn,Gn)))}return}rn(dn,jn(On))&&Ln.push(On)}),Ln},[Tt,Pn,mn,dn,_t])},tn=Ee(17115),pn=Ee(11592),ln=["children","value"],gn=["children"];function Hn(Tt){var _t=Tt,dn=_t.key,Pn=_t.props,mn=Pn.children,sn=Pn.value,Nt=(0,Le.Z)(Pn,ln);return(0,ke.Z)({key:dn,value:sn!==void 0?sn:dn,children:mn},Nt)}function An(Tt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,pn.Z)(Tt).map(function(dn,Pn){if(!ge.isValidElement(dn)||!dn.type)return null;var mn=dn,sn=mn.type.isSelectOptGroup,Nt=mn.key,un=mn.props,Ln=un.children,Dn=(0,Le.Z)(un,gn);return _t||!sn?Hn(dn):(0,ke.Z)((0,ke.Z)({key:"__RC_SELECT_GRP__".concat(Nt===null?Pn:Nt,"__"),label:Nt},Dn),{},{options:An(Ln)})}).filter(function(dn){return dn})}function qn(Tt,_t,dn,Pn,mn){return ge.useMemo(function(){var sn=Tt,Nt=!Tt;Nt&&(sn=An(_t));var un=new Map,Ln=new Map,Dn=function(jn,On,ei){ei&&typeof ei=="string"&&jn.set(On[ei],On)};function $t(rn){for(var jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,On=0;On<rn.length;On+=1){var ei=rn[On];!ei[dn.options]||jn?(un.set(ei[dn.value],ei),Dn(Ln,ei,dn.label),Dn(Ln,ei,Pn),Dn(Ln,ei,mn)):$t(ei[dn.options],!0)}}return $t(sn),{options:sn,valueOptions:un,labelOptions:Ln}},[Tt,_t,dn,Pn,mn])}function ai(Tt){var _t=ge.useRef();_t.current=Tt;var dn=ge.useCallback(function(){return _t.current.apply(_t,arguments)},[]);return dn}var Ti=function(){return null};Ti.isSelectOptGroup=!0;var Ci=Ti,$i=function(){return null};$i.isSelectOption=!0;var or=$i,lr=Ee(80547),qi=Ee(2738),Fr=Ee(45680),Mr=ge.createContext(null),yi=Mr;function dr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Zi=["disabled","title","children","style","className"];function rt(Tt){return typeof Tt=="string"||typeof Tt=="number"}var Ir=function(_t,dn){var Pn=Se(),mn=Pn.prefixCls,sn=Pn.id,Nt=Pn.open,un=Pn.multiple,Ln=Pn.mode,Dn=Pn.searchValue,$t=Pn.toggleOpen,rn=Pn.notFoundContent,jn=Pn.onPopupScroll,On=ge.useContext(yi),ei=On.flattenOptions,Gn=On.onActiveValue,ti=On.defaultActiveFirstOption,Bn=On.onSelect,li=On.menuItemSelectedIcon,Di=On.rawValues,Ri=On.fieldNames,Mn=On.virtual,Xi=On.direction,Nr=On.listHeight,zi=On.listItemHeight,En="".concat(mn,"-item"),Jn=(0,lr.Z)(function(){return ei},[Nt,ei],function(Yi,Ui){return Ui[0]&&Yi[1]!==Ui[1]}),fi=ge.useRef(null),Si=function(Ui){Ui.preventDefault()},hi=function(Ui){fi.current&&fi.current.scrollTo(typeof Ui=="number"?{index:Ui}:Ui)},Oi=function(Ui){for(var hr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Pr=Jn.length,ci=0;ci<Pr;ci+=1){var Mt=(Ui+ci*hr+Pr)%Pr,Ur=Jn[Mt],Hr=Ur.group,ts=Ur.data;if(!Hr&&!ts.disabled)return Mt}return-1},tr=ge.useState(function(){return Oi(0)}),Fi=(0,Ce.Z)(tr,2),Hi=Fi[0],mr=Fi[1],Rn=function(Ui){var hr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;mr(Ui);var Pr={source:hr?"keyboard":"mouse"},ci=Jn[Ui];if(!ci){Gn(null,-1,Pr);return}Gn(ci.value,Ui,Pr)};(0,ge.useEffect)(function(){Rn(ti!==!1?Oi(0):-1)},[Jn.length,Dn]);var Br=ge.useCallback(function(Yi){return Di.has(Yi)&&Ln!=="combobox"},[Ln,(0,me.Z)(Di).toString(),Di.size]);(0,ge.useEffect)(function(){var Yi=setTimeout(function(){if(!un&&Nt&&Di.size===1){var hr=Array.from(Di)[0],Pr=Jn.findIndex(function(ci){var Mt=ci.data;return Mt.value===hr});Pr!==-1&&(Rn(Pr),hi(Pr))}});if(Nt){var Ui;(Ui=fi.current)===null||Ui===void 0||Ui.scrollTo(void 0)}return function(){return clearTimeout(Yi)}},[Nt,Dn,ei.length]);var Nn=function(Ui){Ui!==void 0&&Bn(Ui,{selected:!Di.has(Ui)}),un||$t(!1)};if(ge.useImperativeHandle(dn,function(){return{onKeyDown:function(Ui){var hr=Ui.which,Pr=Ui.ctrlKey;switch(hr){case z.Z.N:case z.Z.P:case z.Z.UP:case z.Z.DOWN:{var ci=0;if(hr===z.Z.UP?ci=-1:hr===z.Z.DOWN?ci=1:dr()&&Pr&&(hr===z.Z.N?ci=1:hr===z.Z.P&&(ci=-1)),ci!==0){var Mt=Oi(Hi+ci,ci);hi(Mt),Rn(Mt,!0)}break}case z.Z.ENTER:{var Ur=Jn[Hi];Ur&&!Ur.data.disabled?Nn(Ur.value):Nn(void 0),Nt&&Ui.preventDefault();break}case z.Z.ESC:$t(!1),Nt&&Ui.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ui){hi(Ui)}}}),Jn.length===0)return ge.createElement("div",{role:"listbox",id:"".concat(sn,"_list"),className:"".concat(En,"-empty"),onMouseDown:Si},rn);var vr=Object.keys(Ri).map(function(Yi){return Ri[Yi]}),So=function(Ui){return Ui.label};function Dr(Yi,Ui){var hr=Yi.group;return{role:hr?"presentation":"option",id:"".concat(sn,"_list_").concat(Ui)}}var Co=function(Ui){var hr=Jn[Ui];if(!hr)return null;var Pr=hr.data||{},ci=Pr.value,Mt=hr.group,Ur=(0,De.Z)(Pr,!0),Hr=So(hr);return hr?ge.createElement("div",(0,Me.Z)({"aria-label":typeof Hr=="string"&&!Mt?Hr:null},Ur,{key:Ui},Dr(hr,Ui),{"aria-selected":Br(ci)}),ci):null},ho={role:"listbox",id:"".concat(sn,"_list")};return ge.createElement(ge.Fragment,null,Mn&&ge.createElement("div",(0,Me.Z)({},ho,{style:{height:0,width:0,overflow:"hidden"}}),Co(Hi-1),Co(Hi),Co(Hi+1)),ge.createElement(Fr.Z,{itemKey:"key",ref:fi,data:Jn,height:Nr,itemHeight:zi,fullHeight:!1,onMouseDown:Si,onScroll:jn,virtual:Mn,direction:Xi,innerProps:Mn?null:ho},function(Yi,Ui){var hr,Pr=Yi.group,ci=Yi.groupOption,Mt=Yi.data,Ur=Yi.label,Hr=Yi.value,ts=Mt.key;if(Pr){var Ao,ss=(Ao=Mt.title)!==null&&Ao!==void 0?Ao:rt(Ur)?Ur.toString():void 0;return ge.createElement("div",{className:ve()(En,"".concat(En,"-group")),title:ss},Ur!==void 0?Ur:ts)}var _r=Mt.disabled,fr=Mt.title,Kr=Mt.children,pr=Mt.style,eo=Mt.className,Yo=(0,Le.Z)(Mt,Zi),sr=(0,qi.Z)(Yo,vr),Ki=Br(Hr),Xn="".concat(En,"-option"),ar=ve()(En,Xn,eo,(hr={},(0,Be.Z)(hr,"".concat(Xn,"-grouped"),ci),(0,Be.Z)(hr,"".concat(Xn,"-active"),Hi===Ui&&!_r),(0,Be.Z)(hr,"".concat(Xn,"-disabled"),_r),(0,Be.Z)(hr,"".concat(Xn,"-selected"),Ki),hr)),to=So(Yi),Ro=!li||typeof li=="function"||Ki,Bo=typeof to=="number"?to:to||Hr,Xo=rt(Bo)?Bo.toString():void 0;return fr!==void 0&&(Xo=fr),ge.createElement("div",(0,Me.Z)({},(0,De.Z)(sr),Mn?{}:Dr(Yi,Ui),{"aria-selected":Ki,className:ar,title:Xo,onMouseMove:function(){Hi===Ui||_r||Rn(Ui)},onClick:function(){_r||Nn(Hr)},style:pr}),ge.createElement("div",{className:"".concat(Xn,"-content")},Bo),ge.isValidElement(li)||Ki,Ro&&ge.createElement(ie,{className:"".concat(En,"-option-state"),customizeIcon:li,customizeIconProps:{isSelected:Ki}},Ki?"\u2713":null))}))},Ar=ge.forwardRef(Ir);Ar.displayName="OptionList";var $r=Ar;function co(Tt){var _t=Tt.mode,dn=Tt.options,Pn=Tt.children,mn=Tt.backfill,sn=Tt.allowClear,Nt=Tt.placeholder,un=Tt.getInputElement,Ln=Tt.showSearch,Dn=Tt.onSearch,$t=Tt.defaultOpen,rn=Tt.autoFocus,jn=Tt.labelInValue,On=Tt.value,ei=Tt.inputValue,Gn=Tt.optionLabelProp,ti=isMultiple(_t),Bn=Ln!==void 0?Ln:ti||_t==="combobox",li=dn||convertChildrenToData(Pn);if(warning(_t!=="tags"||li.every(function(Xi){return!Xi.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),_t==="tags"||_t==="combobox"){var Di=li.some(function(Xi){return Xi.options?Xi.options.some(function(Nr){return typeof("value"in Nr?Nr.value:Nr.key)=="number"}):typeof("value"in Xi?Xi.value:Xi.key)=="number"});warning(!Di,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(_t!=="combobox"||!Gn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(_t==="combobox"||!mn,"`backfill` only works with `combobox` mode."),warning(_t==="combobox"||!un,"`getInputElement` only work with `combobox` mode."),noteOnce(_t!=="combobox"||!un||!sn||!Nt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Dn&&!Bn&&_t!=="combobox"&&_t!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!$t||rn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),On!=null){var Ri=toArray(On);warning(!jn||Ri.every(function(Xi){return _typeof(Xi)==="object"&&("key"in Xi||"value"in Xi)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ti||Array.isArray(On),"`value` should be array when `mode` is `multiple` or `tags`")}if(Pn){var Mn=null;toNodeArray(Pn).some(function(Xi){if(!React.isValidElement(Xi)||!Xi.type)return!1;var Nr=Xi,zi=Nr.type;if(zi.isSelectOption)return!1;if(zi.isSelectOptGroup){var En=toNodeArray(Xi.props.children).every(function(Jn){return!React.isValidElement(Jn)||!Xi.type||Jn.type.isSelectOption?!0:(Mn=Jn.type,!1)});return!En}return Mn=zi,!0}),Mn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Mn.displayName||Mn.name||Mn,"`.")),warning(ei===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function mo(Tt,_t){if(Tt){var dn=function Pn(mn){for(var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt=0;Nt<mn.length;Nt++){var un=mn[Nt];if(un[_t==null?void 0:_t.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!sn&&Array.isArray(un[_t==null?void 0:_t.options])&&Pn(un[_t==null?void 0:_t.options],!0))break}};dn(Tt)}}var no=null,lo=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],ri=["inputValue"];function Ke(Tt){return!Tt||(0,he.Z)(Tt)!=="object"}var qe=ge.forwardRef(function(Tt,_t){var dn=Tt.id,Pn=Tt.mode,mn=Tt.prefixCls,sn=mn===void 0?"rc-select":mn,Nt=Tt.backfill,un=Tt.fieldNames,Ln=Tt.inputValue,Dn=Tt.searchValue,$t=Tt.onSearch,rn=Tt.autoClearSearchValue,jn=rn===void 0?!0:rn,On=Tt.onSelect,ei=Tt.onDeselect,Gn=Tt.dropdownMatchSelectWidth,ti=Gn===void 0?!0:Gn,Bn=Tt.filterOption,li=Tt.filterSort,Di=Tt.optionFilterProp,Ri=Tt.optionLabelProp,Mn=Tt.options,Xi=Tt.children,Nr=Tt.defaultActiveFirstOption,zi=Tt.menuItemSelectedIcon,En=Tt.virtual,Jn=Tt.direction,fi=Tt.listHeight,Si=fi===void 0?200:fi,hi=Tt.listItemHeight,Oi=hi===void 0?20:hi,tr=Tt.value,Fi=Tt.defaultValue,Hi=Tt.labelInValue,mr=Tt.onChange,Rn=(0,Le.Z)(Tt,lo),Br=(0,tn.ZP)(dn),Nn=be(Pn),vr=!!(!Mn&&Xi),So=ge.useMemo(function(){return Bn===void 0&&Pn==="combobox"?!1:Bn},[Bn,Pn]),Dr=ge.useMemo(function(){return vt(un,vr)},[JSON.stringify(un),vr]),Co=(0,ye.Z)("",{value:Dn!==void 0?Dn:Ln,postState:function(uo){return uo||""}}),ho=(0,Ce.Z)(Co,2),Yi=ho[0],Ui=ho[1],hr=qn(Mn,Xi,Dr,Di,Ri),Pr=hr.valueOptions,ci=hr.labelOptions,Mt=hr.options,Ur=ge.useCallback(function(br){var uo=ft(br);return uo.map(function(Yr){var Li,Es,Ls,xa,xl;if(Ke(Yr))Li=Yr;else{var Il;Ls=Yr.key,Es=Yr.label,Li=(Il=Yr.value)!==null&&Il!==void 0?Il:Ls}var vi=Pr.get(Li);if(vi){var ms;if(Es===void 0&&(Es=vi==null?void 0:vi[Ri||Dr.label]),Ls===void 0&&(Ls=(ms=vi==null?void 0:vi.key)!==null&&ms!==void 0?ms:Li),xa=vi==null?void 0:vi.disabled,xl=vi==null?void 0:vi.title,0)var Xs}return{label:Es,value:Li,key:Ls,disabled:xa,title:xl}})},[Dr,Ri,Pr]),Hr=(0,ye.Z)(Fi,{value:tr}),ts=(0,Ce.Z)(Hr,2),Ao=ts[0],ss=ts[1],_r=ge.useMemo(function(){var br,uo=Ur(Ao);return Pn==="combobox"&&yt((br=uo[0])===null||br===void 0?void 0:br.value)?[]:uo},[Ao,Ur,Pn]),fr=dt(_r,Pr),Kr=(0,Ce.Z)(fr,2),pr=Kr[0],eo=Kr[1],Yo=ge.useMemo(function(){if(!Pn&&pr.length===1){var br=pr[0];if(br.value===null&&(br.label===null||br.label===void 0))return[]}return pr.map(function(uo){var Yr;return(0,ke.Z)((0,ke.Z)({},uo),{},{label:(Yr=uo.label)!==null&&Yr!==void 0?Yr:uo.value})})},[Pn,pr]),sr=ge.useMemo(function(){return new Set(pr.map(function(br){return br.value}))},[pr]);ge.useEffect(function(){if(Pn==="combobox"){var br,uo=(br=pr[0])===null||br===void 0?void 0:br.value;Ui(et(uo)?String(uo):"")}},[pr]);var Ki=ai(function(br,uo){var Yr,Li=uo!=null?uo:br;return Yr={},(0,Be.Z)(Yr,Dr.value,br),(0,Be.Z)(Yr,Dr.label,Li),Yr}),Xn=ge.useMemo(function(){if(Pn!=="tags")return Mt;var br=(0,me.Z)(Mt),uo=function(Li){return Pr.has(Li)};return(0,me.Z)(pr).sort(function(Yr,Li){return Yr.value<Li.value?-1:1}).forEach(function(Yr){var Li=Yr.value;uo(Li)||br.push(Ki(Li,Yr.label))}),br},[Ki,Mt,Pr,pr,Pn]),ar=At(Xn,Dr,Yi,So,Di),to=ge.useMemo(function(){return Pn!=="tags"||!Yi||ar.some(function(br){return br[Di||"value"]===Yi})||ar.some(function(br){return br[Dr.value]===Yi})?ar:[Ki(Yi)].concat((0,me.Z)(ar))},[Ki,Di,Pn,ar,Yi,Dr]),Ro=ge.useMemo(function(){return li?(0,me.Z)(to).sort(function(br,uo){return li(br,uo)}):to},[to,li]),Bo=ge.useMemo(function(){return nt(Ro,{fieldNames:Dr,childrenAsData:vr})},[Ro,Dr,vr]),Xo=function(uo){var Yr=Ur(uo);if(ss(Yr),mr&&(Yr.length!==pr.length||Yr.some(function(Ls,xa){var xl;return((xl=pr[xa])===null||xl===void 0?void 0:xl.value)!==(Ls==null?void 0:Ls.value)}))){var Li=Hi?Yr:Yr.map(function(Ls){return Ls.value}),Es=Yr.map(function(Ls){return He(eo(Ls.value))});mr(Nn?Li:Li[0],Nn?Es:Es[0])}},as=ge.useState(null),Ho=(0,Ce.Z)(as,2),ia=Ho[0],_s=Ho[1],la=ge.useState(0),kn=(0,Ce.Z)(la,2),Is=kn[0],Pu=kn[1],Ua=Nr!==void 0?Nr:Pn!=="combobox",Sa=ge.useCallback(function(br,uo){var Yr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Li=Yr.source,Es=Li===void 0?"keyboard":Li;Pu(uo),Nt&&Pn==="combobox"&&br!==null&&Es==="keyboard"&&_s(String(br))},[Nt,Pn]),us=function(uo,Yr,Li){var Es=function(){var Dl,jr=eo(uo);return[Hi?{label:jr==null?void 0:jr[Dr.label],value:uo,key:(Dl=jr==null?void 0:jr.key)!==null&&Dl!==void 0?Dl:uo}:uo,He(jr)]};if(Yr&&On){var Ls=Es(),xa=(0,Ce.Z)(Ls,2),xl=xa[0],Il=xa[1];On(xl,Il)}else if(!Yr&&ei&&Li!=="clear"){var vi=Es(),ms=(0,Ce.Z)(vi,2),Xs=ms[0],qa=ms[1];ei(Xs,qa)}},Ws=ai(function(br,uo){var Yr,Li=Nn?uo.selected:!0;Li?Yr=Nn?[].concat((0,me.Z)(pr),[br]):[br]:Yr=pr.filter(function(Es){return Es.value!==br}),Xo(Yr),us(br,Li),Pn==="combobox"?_s(""):(!be||jn)&&(Ui(""),_s(""))}),_o=function(uo,Yr){Xo(uo);var Li=Yr.type,Es=Yr.values;(Li==="remove"||Li==="clear")&&Es.forEach(function(Ls){us(Ls.value,!1,Li)})},No=function(uo,Yr){if(Ui(uo),_s(null),Yr.source==="submit"){var Li=(uo||"").trim();if(Li){var Es=Array.from(new Set([].concat((0,me.Z)(sr),[Li])));Xo(Es),us(Li,!0),Ui("")}return}Yr.source!=="blur"&&(Pn==="combobox"&&Xo(uo),$t==null||$t(uo))},Lo=function(uo){var Yr=uo;Pn!=="tags"&&(Yr=uo.map(function(Es){var Ls=ci.get(Es);return Ls==null?void 0:Ls.value}).filter(function(Es){return Es!==void 0}));var Li=Array.from(new Set([].concat((0,me.Z)(sr),(0,me.Z)(Yr))));Xo(Li),Li.forEach(function(Es){us(Es,!0)})},ua=ge.useMemo(function(){var br=En!==!1&&ti!==!1;return(0,ke.Z)((0,ke.Z)({},hr),{},{flattenOptions:Bo,onActiveValue:Sa,defaultActiveFirstOption:Ua,onSelect:Ws,menuItemSelectedIcon:zi,rawValues:sr,fieldNames:Dr,virtual:br,direction:Jn,listHeight:Si,listItemHeight:Oi,childrenAsData:vr})},[hr,Bo,Sa,Ua,Ws,zi,sr,Dr,En,ti,Si,Oi,vr]);return ge.createElement(yi.Provider,{value:ua},ge.createElement($e,(0,Me.Z)({},Rn,{id:Br,prefixCls:sn,ref:_t,omitDomProps:ri,mode:Pn,displayValues:Yo,onDisplayValuesChange:_o,direction:Jn,searchValue:Yi,onSearch:No,autoClearSearchValue:jn,onSearchSplit:Lo,dropdownMatchSelectWidth:ti,OptionList:$r,emptyOptions:!Bo.length,activeValue:ia,activeDescendantId:"".concat(Br,"_list_").concat(Is)})))}),Ye=qe;Ye.Option=or,Ye.OptGroup=Ci;var St=Ye,Ot=St},9296:function(_n,en,Ee){"use strict";Ee.r(en),Ee.d(en,{ResizableTextArea:function(){return Xe},default:function(){return yt}});var Me=Ee(72308),me=Ee(77321),Be=Ee(49618),ke=Ee(62853),Ce=Ee(52487),Le=Ee(74416),he=Ee(80702),ye=Ee(92310),xe=Ee.n(ye),ge=Ee(93681),le=Ee(5643),ve=Ee(18929),de=Ee(59301),ce=Ee(29301),z=Ee(34280),ee=Ee(16089),oe=`
|
|
|
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;
|
|
|
`,ie=["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"],se={},ue;function Se(st){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=st.getAttribute("id")||st.getAttribute("data-reactid")||st.getAttribute("name");if(zt&&se[lt])return se[lt];var tt=window.getComputedStyle(st),ut=tt.getPropertyValue("box-sizing")||tt.getPropertyValue("-moz-box-sizing")||tt.getPropertyValue("-webkit-box-sizing"),mt=parseFloat(tt.getPropertyValue("padding-bottom"))+parseFloat(tt.getPropertyValue("padding-top")),Pt=parseFloat(tt.getPropertyValue("border-bottom-width"))+parseFloat(tt.getPropertyValue("border-top-width")),gt=ie.map(function(Ht){return"".concat(Ht,":").concat(tt.getPropertyValue(Ht))}).join(";"),Ft={sizingStyle:gt,paddingSize:mt,borderSize:Pt,boxSizing:ut};return zt&<&&(se[lt]=Ft),Ft}function we(st){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ue||(ue=document.createElement("textarea"),ue.setAttribute("tab-index","-1"),ue.setAttribute("aria-hidden","true"),document.body.appendChild(ue)),st.getAttribute("wrap")?ue.setAttribute("wrap",st.getAttribute("wrap")):ue.removeAttribute("wrap");var ut=Se(st,zt),mt=ut.paddingSize,Pt=ut.borderSize,gt=ut.boxSizing,Ft=ut.sizingStyle;ue.setAttribute("style","".concat(Ft,";").concat(oe)),ue.value=st.value||st.placeholder||"";var Ht=void 0,hn=void 0,Qt,bn=ue.scrollHeight;if(gt==="border-box"?bn+=Pt:gt==="content-box"&&(bn-=mt),lt!==null||tt!==null){ue.value=" ";var Wt=ue.scrollHeight-mt;lt!==null&&(Ht=Wt*lt,gt==="border-box"&&(Ht=Ht+mt+Pt),bn=Math.max(Ht,bn)),tt!==null&&(hn=Wt*tt,gt==="border-box"&&(hn=hn+mt+Pt),Qt=bn>hn?"":"hidden",bn=Math.min(hn,bn))}var Kt={height:bn,overflowY:Qt,resize:"none"};return Ht&&(Kt.minHeight=Ht),hn&&(Kt.maxHeight=hn),Kt}var Pe=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ae=0,De=1,ze=2,Ze=de.forwardRef(function(st,zt){var lt=st,tt=lt.prefixCls,ut=lt.onPressEnter,mt=lt.defaultValue,Pt=lt.value,gt=lt.autoSize,Ft=lt.onResize,Ht=lt.className,hn=lt.style,Qt=lt.disabled,bn=lt.onChange,Wt=lt.onInternalAutoSize,Kt=(0,Le.Z)(lt,Pe),Jt=(0,ve.Z)(mt,{value:Pt,postState:function(Ci){return Ci!=null?Ci:""}}),Yt=(0,Ce.Z)(Jt,2),kt=Yt[0],pt=Yt[1],Bt=function(Ci){pt(Ci.target.value),bn==null||bn(Ci)},xt=de.useRef();de.useImperativeHandle(zt,function(){return{textArea:xt.current}});var vt=de.useMemo(function(){return gt&&(0,ke.Z)(gt)==="object"?[gt.minRows,gt.maxRows]:[]},[gt]),nt=(0,Ce.Z)(vt,2),He=nt[0],Ie=nt[1],We=!!gt,Oe=function(){try{if(document.activeElement===xt.current){var Ci=xt.current,$i=Ci.selectionStart,or=Ci.selectionEnd,lr=Ci.scrollTop;xt.current.setSelectionRange($i,or),xt.current.scrollTop=lr}}catch(qi){}},be=de.useState(ze),Ne=(0,Ce.Z)(be,2),$e=Ne[0],dt=Ne[1],Je=de.useState(),At=(0,Ce.Z)(Je,2),tn=At[0],pn=At[1],ln=function(){dt(Ae)};(0,z.Z)(function(){We&&ln()},[Pt,He,Ie,We]),(0,z.Z)(function(){if($e===Ae)dt(De);else if($e===De){var Ti=we(xt.current,!1,He,Ie);dt(ze),pn(Ti)}else Oe()},[$e]);var gn=de.useRef(),Hn=function(){ee.Z.cancel(gn.current)},An=function(Ci){$e===ze&&(Ft==null||Ft(Ci),gt&&(Hn(),gn.current=(0,ee.Z)(function(){ln()})))};de.useEffect(function(){return Hn},[]);var qn=We?tn:null,ai=(0,me.Z)((0,me.Z)({},hn),qn);return($e===Ae||$e===De)&&(ai.overflowY="hidden",ai.overflowX="hidden"),de.createElement(ce.Z,{onResize:An,disabled:!(gt||Ft)},de.createElement("textarea",(0,Me.Z)({},Kt,{ref:xt,style:ai,className:xe()(tt,Ht,(0,Be.Z)({},"".concat(tt,"-disabled"),Qt)),disabled:Qt,value:kt,onChange:Bt})))}),Xe=Ze,Ge=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function ft(st,zt){return(0,he.Z)(st||"").slice(0,zt).join("")}function at(st,zt,lt,tt){var ut=lt;return st?ut=ft(lt,tt):(0,he.Z)(zt||"").length<lt.length&&(0,he.Z)(lt||"").length>tt&&(ut=zt),ut}var Ct=de.forwardRef(function(st,zt){var lt,tt=st.defaultValue,ut=st.value,mt=st.onFocus,Pt=st.onBlur,gt=st.onChange,Ft=st.allowClear,Ht=st.maxLength,hn=st.onCompositionStart,Qt=st.onCompositionEnd,bn=st.suffix,Wt=st.prefixCls,Kt=Wt===void 0?"rc-textarea":Wt,Jt=st.classes,Yt=st.showCount,kt=st.className,pt=st.style,Bt=st.disabled,xt=st.hidden,vt=st.classNames,nt=st.styles,He=st.onResize,Ie=(0,Le.Z)(st,Ge),We=(0,ve.Z)(tt,{value:ut,defaultValue:tt}),Oe=(0,Ce.Z)(We,2),be=Oe[0],Ne=Oe[1],$e=(0,de.useRef)(null),dt=de.useState(!1),Je=(0,Ce.Z)(dt,2),At=Je[0],tn=Je[1],pn=de.useState(!1),ln=(0,Ce.Z)(pn,2),gn=ln[0],Hn=ln[1],An=de.useRef(),qn=de.useRef(0),ai=de.useState(null),Ti=(0,Ce.Z)(ai,2),Ci=Ti[0],$i=Ti[1],or=function(){var Ke;(Ke=$e.current)===null||Ke===void 0||Ke.textArea.focus()};(0,de.useImperativeHandle)(zt,function(){return{resizableTextArea:$e.current,focus:or,blur:function(){var Ke;(Ke=$e.current)===null||Ke===void 0||Ke.textArea.blur()}}}),(0,de.useEffect)(function(){tn(function(ri){return!Bt&&ri})},[Bt]);var lr=Number(Ht)>0,qi=function(Ke){Hn(!0),An.current=be,qn.current=Ke.currentTarget.selectionStart,hn==null||hn(Ke)},Fr=function(Ke){Hn(!1);var qe=Ke.currentTarget.value;if(lr){var Ye,St=qn.current>=Ht+1||qn.current===((Ye=An.current)===null||Ye===void 0?void 0:Ye.length);qe=at(St,An.current,qe,Ht)}qe!==be&&(Ne(qe),(0,le.rJ)(Ke.currentTarget,Ke,gt,qe)),Qt==null||Qt(Ke)},Mr=function(Ke){var qe=Ke.target.value;if(!gn&&lr){var Ye=Ke.target.selectionStart>=Ht+1||Ke.target.selectionStart===qe.length||!Ke.target.selectionStart;qe=at(Ye,be,qe,Ht)}Ne(qe),(0,le.rJ)(Ke.currentTarget,Ke,gt,qe)},yi=function(Ke){var qe=Ie.onPressEnter,Ye=Ie.onKeyDown;Ke.key==="Enter"&&qe&&qe(Ke),Ye==null||Ye(Ke)},dr=function(Ke){tn(!0),mt==null||mt(Ke)},Zi=function(Ke){tn(!1),Pt==null||Pt(Ke)},rt=function(Ke){var qe;Ne(""),or(),(0,le.rJ)((qe=$e.current)===null||qe===void 0?void 0:qe.textArea,Ke,gt)},Ir=(0,le.D7)(be);!gn&&lr&&ut==null&&(Ir=ft(Ir,Ht));var Ar=bn,$r;if(Yt){var co=(0,he.Z)(Ir).length;(0,ke.Z)(Yt)==="object"?$r=Yt.formatter({value:Ir,count:co,maxLength:Ht}):$r="".concat(co).concat(lr?" / ".concat(Ht):""),Ar=de.createElement(de.Fragment,null,Ar,de.createElement("span",{className:xe()("".concat(Kt,"-data-count"),vt==null?void 0:vt.count),style:nt==null?void 0:nt.count},$r))}var mo=function(Ke){var qe;He==null||He(Ke),(qe=$e.current)!==null&&qe!==void 0&&qe.textArea.style.height&&$i(!0)},no=!Ie.autoSize&&!Yt&&!Ft,lo=de.createElement(ge.BaseInput,{value:Ir,allowClear:Ft,handleReset:rt,suffix:Ar,prefixCls:Kt,classes:{affixWrapper:xe()(Jt==null?void 0:Jt.affixWrapper,(lt={},(0,Be.Z)(lt,"".concat(Kt,"-show-count"),Yt),(0,Be.Z)(lt,"".concat(Kt,"-textarea-allow-clear"),Ft),lt))},disabled:Bt,focused:At,className:kt,style:(0,me.Z)((0,me.Z)({},pt),Ci&&!no?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof $r=="string"?$r:void 0}},hidden:xt,inputElement:de.createElement(Xe,(0,Me.Z)({},Ie,{onKeyDown:yi,onChange:Mr,onFocus:dr,onBlur:Zi,onCompositionStart:qi,onCompositionEnd:Fr,className:vt==null?void 0:vt.textarea,style:(0,me.Z)((0,me.Z)({},nt==null?void 0:nt.textarea),{},{resize:pt==null?void 0:pt.resize}),disabled:Bt,prefixCls:Kt,onResize:mo,ref:$e}))});return lo}),et=Ct,yt=et},39417:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return De}});var Me=Ee(72308),me=Ee(49618),Be=Ee(74416),ke=Ee(77321),Ce=Ee(96949),Le=Ee(55090),he=Ee(80237),ye=Ee(77205),xe=Ee(38793),ge=Ee(92310),le=Ee.n(ge),ve=Ee(26112),de=Ee(59301),ce=Ee(39378),z=function(Ze){for(var Xe=Ze.prefixCls,Ge=Ze.level,ft=Ze.isStart,at=Ze.isEnd,Ct="".concat(Xe,"-indent-unit"),et=[],yt=0;yt<Ge;yt+=1){var st;et.push(de.createElement("span",{key:yt,className:le()(Ct,(st={},(0,me.Z)(st,"".concat(Ct,"-start"),ft[yt]),(0,me.Z)(st,"".concat(Ct,"-end"),at[yt]),st))}))}return de.createElement("span",{"aria-hidden":"true",className:"".concat(Xe,"-indent")},et)},ee=de.memo(z),oe=Ee(67841),ie=Ee(71430),se=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ue="open",Se="close",we="---",Pe=function(ze){(0,ye.Z)(Xe,ze);var Ze=(0,xe.Z)(Xe);function Xe(){var Ge;(0,Ce.Z)(this,Xe);for(var ft=arguments.length,at=new Array(ft),Ct=0;Ct<ft;Ct++)at[Ct]=arguments[Ct];return Ge=Ze.call.apply(Ze,[this].concat(at)),Ge.state={dragNodeHighlight:!1},Ge.selectHandle=void 0,Ge.cacheIndent=void 0,Ge.onSelectorClick=function(et){var yt=Ge.props.context.onNodeClick;yt(et,(0,ie.F)(Ge.props)),Ge.isSelectable()?Ge.onSelect(et):Ge.onCheck(et)},Ge.onSelectorDoubleClick=function(et){var yt=Ge.props.context.onNodeDoubleClick;yt(et,(0,ie.F)(Ge.props))},Ge.onSelect=function(et){if(!Ge.isDisabled()){var yt=Ge.props.context.onNodeSelect;yt(et,(0,ie.F)(Ge.props))}},Ge.onCheck=function(et){if(!Ge.isDisabled()){var yt=Ge.props,st=yt.disableCheckbox,zt=yt.checked,lt=Ge.props.context.onNodeCheck;if(!(!Ge.isCheckable()||st)){var tt=!zt;lt(et,(0,ie.F)(Ge.props),tt)}}},Ge.onMouseEnter=function(et){var yt=Ge.props.context.onNodeMouseEnter;yt(et,(0,ie.F)(Ge.props))},Ge.onMouseLeave=function(et){var yt=Ge.props.context.onNodeMouseLeave;yt(et,(0,ie.F)(Ge.props))},Ge.onContextMenu=function(et){var yt=Ge.props.context.onNodeContextMenu;yt(et,(0,ie.F)(Ge.props))},Ge.onDragStart=function(et){var yt=Ge.props.context.onNodeDragStart;et.stopPropagation(),Ge.setState({dragNodeHighlight:!0}),yt(et,(0,he.Z)(Ge));try{et.dataTransfer.setData("text/plain","")}catch(st){}},Ge.onDragEnter=function(et){var yt=Ge.props.context.onNodeDragEnter;et.preventDefault(),et.stopPropagation(),yt(et,(0,he.Z)(Ge))},Ge.onDragOver=function(et){var yt=Ge.props.context.onNodeDragOver;et.preventDefault(),et.stopPropagation(),yt(et,(0,he.Z)(Ge))},Ge.onDragLeave=function(et){var yt=Ge.props.context.onNodeDragLeave;et.stopPropagation(),yt(et,(0,he.Z)(Ge))},Ge.onDragEnd=function(et){var yt=Ge.props.context.onNodeDragEnd;et.stopPropagation(),Ge.setState({dragNodeHighlight:!1}),yt(et,(0,he.Z)(Ge))},Ge.onDrop=function(et){var yt=Ge.props.context.onNodeDrop;et.preventDefault(),et.stopPropagation(),Ge.setState({dragNodeHighlight:!1}),yt(et,(0,he.Z)(Ge))},Ge.onExpand=function(et){var yt=Ge.props,st=yt.loading,zt=yt.context.onNodeExpand;st||zt(et,(0,ie.F)(Ge.props))},Ge.setSelectHandle=function(et){Ge.selectHandle=et},Ge.getNodeState=function(){var et=Ge.props.expanded;return Ge.isLeaf()?null:et?ue:Se},Ge.hasChildren=function(){var et=Ge.props.eventKey,yt=Ge.props.context.keyEntities,st=(0,oe.Z)(yt,et)||{},zt=st.children;return!!(zt||[]).length},Ge.isLeaf=function(){var et=Ge.props,yt=et.isLeaf,st=et.loaded,zt=Ge.props.context.loadData,lt=Ge.hasChildren();return yt===!1?!1:yt||!zt&&!lt||zt&&st&&!lt},Ge.isDisabled=function(){var et=Ge.props.disabled,yt=Ge.props.context.disabled;return!!(yt||et)},Ge.isCheckable=function(){var et=Ge.props.checkable,yt=Ge.props.context.checkable;return!yt||et===!1?!1:yt},Ge.syncLoadData=function(et){var yt=et.expanded,st=et.loading,zt=et.loaded,lt=Ge.props.context,tt=lt.loadData,ut=lt.onNodeLoad;st||tt&&yt&&!Ge.isLeaf()&&!Ge.hasChildren()&&!zt&&ut((0,ie.F)(Ge.props))},Ge.isDraggable=function(){var et=Ge.props,yt=et.data,st=et.context.draggable;return!!(st&&(!st.nodeDraggable||st.nodeDraggable(yt)))},Ge.renderDragHandler=function(){var et=Ge.props.context,yt=et.draggable,st=et.prefixCls;return yt!=null&&yt.icon?de.createElement("span",{className:"".concat(st,"-draggable-icon")},yt.icon):null},Ge.renderSwitcherIconDom=function(et){var yt=Ge.props.switcherIcon,st=Ge.props.context.switcherIcon,zt=yt||st;return typeof zt=="function"?zt((0,ke.Z)((0,ke.Z)({},Ge.props),{},{isLeaf:et})):zt},Ge.renderSwitcher=function(){var et=Ge.props.expanded,yt=Ge.props.context.prefixCls;if(Ge.isLeaf()){var st=Ge.renderSwitcherIconDom(!0);return st!==!1?de.createElement("span",{className:le()("".concat(yt,"-switcher"),"".concat(yt,"-switcher-noop"))},st):null}var zt=le()("".concat(yt,"-switcher"),"".concat(yt,"-switcher_").concat(et?ue:Se)),lt=Ge.renderSwitcherIconDom(!1);return lt!==!1?de.createElement("span",{onClick:Ge.onExpand,className:zt},lt):null},Ge.renderCheckbox=function(){var et=Ge.props,yt=et.checked,st=et.halfChecked,zt=et.disableCheckbox,lt=Ge.props.context.prefixCls,tt=Ge.isDisabled(),ut=Ge.isCheckable();if(!ut)return null;var mt=typeof ut!="boolean"?ut:null;return de.createElement("span",{className:le()("".concat(lt,"-checkbox"),yt&&"".concat(lt,"-checkbox-checked"),!yt&&st&&"".concat(lt,"-checkbox-indeterminate"),(tt||zt)&&"".concat(lt,"-checkbox-disabled")),onClick:Ge.onCheck},mt)},Ge.renderIcon=function(){var et=Ge.props.loading,yt=Ge.props.context.prefixCls;return de.createElement("span",{className:le()("".concat(yt,"-iconEle"),"".concat(yt,"-icon__").concat(Ge.getNodeState()||"docu"),et&&"".concat(yt,"-icon_loading"))})},Ge.renderSelector=function(){var et=Ge.state.dragNodeHighlight,yt=Ge.props,st=yt.title,zt=st===void 0?we:st,lt=yt.selected,tt=yt.icon,ut=yt.loading,mt=yt.data,Pt=Ge.props.context,gt=Pt.prefixCls,Ft=Pt.showIcon,Ht=Pt.icon,hn=Pt.loadData,Qt=Pt.titleRender,bn=Ge.isDisabled(),Wt="".concat(gt,"-node-content-wrapper"),Kt;if(Ft){var Jt=tt||Ht;Kt=Jt?de.createElement("span",{className:le()("".concat(gt,"-iconEle"),"".concat(gt,"-icon__customize"))},typeof Jt=="function"?Jt(Ge.props):Jt):Ge.renderIcon()}else hn&&ut&&(Kt=Ge.renderIcon());var Yt;typeof zt=="function"?Yt=zt(mt):Qt?Yt=Qt(mt):Yt=zt;var kt=de.createElement("span",{className:"".concat(gt,"-title")},Yt);return de.createElement("span",{ref:Ge.setSelectHandle,title:typeof zt=="string"?zt:"",className:le()("".concat(Wt),"".concat(Wt,"-").concat(Ge.getNodeState()||"normal"),!bn&&(lt||et)&&"".concat(gt,"-node-selected")),onMouseEnter:Ge.onMouseEnter,onMouseLeave:Ge.onMouseLeave,onContextMenu:Ge.onContextMenu,onClick:Ge.onSelectorClick,onDoubleClick:Ge.onSelectorDoubleClick},Kt,kt,Ge.renderDropIndicator())},Ge.renderDropIndicator=function(){var et=Ge.props,yt=et.disabled,st=et.eventKey,zt=Ge.props.context,lt=zt.draggable,tt=zt.dropLevelOffset,ut=zt.dropPosition,mt=zt.prefixCls,Pt=zt.indent,gt=zt.dropIndicatorRender,Ft=zt.dragOverNodeKey,Ht=zt.direction,hn=!!lt,Qt=!yt&&hn&&Ft===st,bn=Pt!=null?Pt:Ge.cacheIndent;return Ge.cacheIndent=Pt,Qt?gt({dropPosition:ut,dropLevelOffset:tt,indent:bn,prefixCls:mt,direction:Ht}):null},Ge}return(0,Le.Z)(Xe,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var ft=this.props.selectable,at=this.props.context.selectable;return typeof ft=="boolean"?ft:at}},{key:"render",value:function(){var ft,at=this.props,Ct=at.eventKey,et=at.className,yt=at.style,st=at.dragOver,zt=at.dragOverGapTop,lt=at.dragOverGapBottom,tt=at.isLeaf,ut=at.isStart,mt=at.isEnd,Pt=at.expanded,gt=at.selected,Ft=at.checked,Ht=at.halfChecked,hn=at.loading,Qt=at.domRef,bn=at.active,Wt=at.data,Kt=at.onMouseMove,Jt=at.selectable,Yt=(0,Be.Z)(at,se),kt=this.props.context,pt=kt.prefixCls,Bt=kt.filterTreeNode,xt=kt.keyEntities,vt=kt.dropContainerKey,nt=kt.dropTargetKey,He=kt.draggingNodeKey,Ie=this.isDisabled(),We=(0,ve.Z)(Yt,{aria:!0,data:!0}),Oe=(0,oe.Z)(xt,Ct)||{},be=Oe.level,Ne=mt[mt.length-1],$e=this.isDraggable(),dt=!Ie&&$e,Je=He===Ct,At=Jt!==void 0?{"aria-selected":!!Jt}:void 0;return de.createElement("div",(0,Me.Z)({ref:Qt,className:le()(et,"".concat(pt,"-treenode"),(ft={},(0,me.Z)(ft,"".concat(pt,"-treenode-disabled"),Ie),(0,me.Z)(ft,"".concat(pt,"-treenode-switcher-").concat(Pt?"open":"close"),!tt),(0,me.Z)(ft,"".concat(pt,"-treenode-checkbox-checked"),Ft),(0,me.Z)(ft,"".concat(pt,"-treenode-checkbox-indeterminate"),Ht),(0,me.Z)(ft,"".concat(pt,"-treenode-selected"),gt),(0,me.Z)(ft,"".concat(pt,"-treenode-loading"),hn),(0,me.Z)(ft,"".concat(pt,"-treenode-active"),bn),(0,me.Z)(ft,"".concat(pt,"-treenode-leaf-last"),Ne),(0,me.Z)(ft,"".concat(pt,"-treenode-draggable"),$e),(0,me.Z)(ft,"dragging",Je),(0,me.Z)(ft,"drop-target",nt===Ct),(0,me.Z)(ft,"drop-container",vt===Ct),(0,me.Z)(ft,"drag-over",!Ie&&st),(0,me.Z)(ft,"drag-over-gap-top",!Ie&&zt),(0,me.Z)(ft,"drag-over-gap-bottom",!Ie&<),(0,me.Z)(ft,"filter-node",Bt&&Bt((0,ie.F)(this.props))),ft)),style:yt,draggable:dt,"aria-grabbed":Je,onDragStart:dt?this.onDragStart:void 0,onDragEnter:$e?this.onDragEnter:void 0,onDragOver:$e?this.onDragOver:void 0,onDragLeave:$e?this.onDragLeave:void 0,onDrop:$e?this.onDrop:void 0,onDragEnd:$e?this.onDragEnd:void 0,onMouseMove:Kt},At,We),de.createElement(ee,{prefixCls:pt,level:be,isStart:ut,isEnd:mt}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),Xe}(de.Component),Ae=function(Ze){return de.createElement(ce.k.Consumer,null,function(Xe){return de.createElement(Pe,(0,Me.Z)({},Ze,{context:Xe}))})};Ae.displayName="TreeNode",Ae.isTreeNode=1;var De=Ae},39378:function(_n,en,Ee){"use strict";Ee.d(en,{k:function(){return me}});var Me=Ee(59301),me=Me.createContext(null)},54844:function(_n,en,Ee){"use strict";Ee.d(en,{O:function(){return De.Z},Z:function(){return kt}});var Me=Ee(72308),me=Ee(49618),Be=Ee(62853),ke=Ee(77321),Ce=Ee(80702),Le=Ee(96949),he=Ee(55090),ye=Ee(80237),xe=Ee(77205),ge=Ee(38793),le=Ee(92310),ve=Ee.n(le),de=Ee(10228),ce=Ee(26112),z=Ee(48736),ee=Ee(59301),oe=Ee(39378);function ie(pt){var Bt=pt.dropPosition,xt=pt.dropLevelOffset,vt=pt.indent,nt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Bt){case-1:nt.top=0,nt.left=-xt*vt;break;case 1:nt.bottom=0,nt.left=-xt*vt;break;case 0:nt.bottom=0,nt.left=vt;break}return ee.createElement("div",{style:nt})}function se(pt){if(pt==null)throw new TypeError("Cannot destructure "+pt)}var ue=Ee(52487),Se=Ee(74416),we=Ee(34280),Pe=Ee(45680),Ae=Ee(77900),De=Ee(39417);function ze(pt,Bt){var xt=ee.useState(!1),vt=(0,ue.Z)(xt,2),nt=vt[0],He=vt[1];ee.useLayoutEffect(function(){if(nt)return pt(),function(){Bt()}},[nt]),ee.useLayoutEffect(function(){return He(!0),function(){He(!1)}},[])}var Ze=Ee(71430),Xe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ge=function(Bt,xt){var vt=Bt.className,nt=Bt.style,He=Bt.motion,Ie=Bt.motionNodes,We=Bt.motionType,Oe=Bt.onMotionStart,be=Bt.onMotionEnd,Ne=Bt.active,$e=Bt.treeNodeRequiredProps,dt=(0,Se.Z)(Bt,Xe),Je=ee.useState(!0),At=(0,ue.Z)(Je,2),tn=At[0],pn=At[1],ln=ee.useContext(oe.k),gn=ln.prefixCls,Hn=Ie&&We!=="hide";(0,we.Z)(function(){Ie&&Hn!==tn&&pn(Hn)},[Ie]);var An=function(){Ie&&Oe()},qn=ee.useRef(!1),ai=function(){Ie&&!qn.current&&(qn.current=!0,be())};ze(An,ai);var Ti=function($i){Hn===$i&&ai()};return Ie?ee.createElement(Ae.default,(0,Me.Z)({ref:xt,visible:tn},He,{motionAppear:We==="show",onVisibleChanged:Ti}),function(Ci,$i){var or=Ci.className,lr=Ci.style;return ee.createElement("div",{ref:$i,className:ve()("".concat(gn,"-treenode-motion"),or),style:lr},Ie.map(function(qi){var Fr=(0,Me.Z)({},(se(qi.data),qi.data)),Mr=qi.title,yi=qi.key,dr=qi.isStart,Zi=qi.isEnd;delete Fr.children;var rt=(0,Ze.H8)(yi,$e);return ee.createElement(De.Z,(0,Me.Z)({},Fr,rt,{title:Mr,active:Ne,data:qi.data,key:yi,isStart:dr,isEnd:Zi}))}))}):ee.createElement(De.Z,(0,Me.Z)({domRef:xt,className:vt,style:nt},dt,{active:Ne}))};Ge.displayName="MotionTreeNode";var ft=ee.forwardRef(Ge),at=ft;function Ct(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],xt=pt.length,vt=Bt.length;if(Math.abs(xt-vt)!==1)return{add:!1,key:null};function nt(He,Ie){var We=new Map;He.forEach(function(be){We.set(be,!0)});var Oe=Ie.filter(function(be){return!We.has(be)});return Oe.length===1?Oe[0]:null}return xt<vt?{add:!0,key:nt(pt,Bt)}:{add:!1,key:nt(Bt,pt)}}function et(pt,Bt,xt){var vt=pt.findIndex(function(We){return We.key===xt}),nt=pt[vt+1],He=Bt.findIndex(function(We){return We.key===xt});if(nt){var Ie=Bt.findIndex(function(We){return We.key===nt.key});return Bt.slice(He+1,Ie)}return Bt.slice(He+1)}var yt=["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"],st={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},zt=function(){},lt="RC_TREE_MOTION_".concat(Math.random()),tt={key:lt},ut={key:lt,level:0,index:0,pos:"0",node:tt,nodes:[tt]},mt={parent:null,children:[],pos:ut.pos,data:tt,title:null,key:lt,isStart:[],isEnd:[]};function Pt(pt,Bt,xt,vt){return Bt===!1||!xt?pt:pt.slice(0,Math.ceil(xt/vt)+1)}function gt(pt){var Bt=pt.key,xt=pt.pos;return(0,Ze.km)(Bt,xt)}function Ft(pt){for(var Bt=String(pt.data.key),xt=pt;xt.parent;)xt=xt.parent,Bt="".concat(xt.data.key," > ").concat(Bt);return Bt}var Ht=ee.forwardRef(function(pt,Bt){var xt=pt.prefixCls,vt=pt.data,nt=pt.selectable,He=pt.checkable,Ie=pt.expandedKeys,We=pt.selectedKeys,Oe=pt.checkedKeys,be=pt.loadedKeys,Ne=pt.loadingKeys,$e=pt.halfCheckedKeys,dt=pt.keyEntities,Je=pt.disabled,At=pt.dragging,tn=pt.dragOverNodeKey,pn=pt.dropPosition,ln=pt.motion,gn=pt.height,Hn=pt.itemHeight,An=pt.virtual,qn=pt.focusable,ai=pt.activeItem,Ti=pt.focused,Ci=pt.tabIndex,$i=pt.onKeyDown,or=pt.onFocus,lr=pt.onBlur,qi=pt.onActiveChange,Fr=pt.onListChangeStart,Mr=pt.onListChangeEnd,yi=(0,Se.Z)(pt,yt),dr=ee.useRef(null),Zi=ee.useRef(null);ee.useImperativeHandle(Bt,function(){return{scrollTo:function(rn){dr.current.scrollTo(rn)},getIndentWidth:function(){return Zi.current.offsetWidth}}});var rt=ee.useState(Ie),Ir=(0,ue.Z)(rt,2),Ar=Ir[0],$r=Ir[1],co=ee.useState(vt),mo=(0,ue.Z)(co,2),no=mo[0],lo=mo[1],ri=ee.useState(vt),Ke=(0,ue.Z)(ri,2),qe=Ke[0],Ye=Ke[1],St=ee.useState([]),Ot=(0,ue.Z)(St,2),Tt=Ot[0],_t=Ot[1],dn=ee.useState(null),Pn=(0,ue.Z)(dn,2),mn=Pn[0],sn=Pn[1],Nt=ee.useRef(vt);Nt.current=vt;function un(){var $t=Nt.current;lo($t),Ye($t),_t([]),sn(null),Mr()}(0,we.Z)(function(){$r(Ie);var $t=Ct(Ar,Ie);if($t.key!==null)if($t.add){var rn=no.findIndex(function(Bn){var li=Bn.key;return li===$t.key}),jn=Pt(et(no,vt,$t.key),An,gn,Hn),On=no.slice();On.splice(rn+1,0,mt),Ye(On),_t(jn),sn("show")}else{var ei=vt.findIndex(function(Bn){var li=Bn.key;return li===$t.key}),Gn=Pt(et(vt,no,$t.key),An,gn,Hn),ti=vt.slice();ti.splice(ei+1,0,mt),Ye(ti),_t(Gn),sn("hide")}else no!==vt&&(lo(vt),Ye(vt))},[Ie,vt]),ee.useEffect(function(){At||un()},[At]);var Ln=ln?qe:vt,Dn={expandedKeys:Ie,selectedKeys:We,loadedKeys:be,loadingKeys:Ne,checkedKeys:Oe,halfCheckedKeys:$e,dragOverNodeKey:tn,dropPosition:pn,keyEntities:dt};return ee.createElement(ee.Fragment,null,Ti&&ai&&ee.createElement("span",{style:st,"aria-live":"assertive"},Ft(ai)),ee.createElement("div",null,ee.createElement("input",{style:st,disabled:qn===!1||Je,tabIndex:qn!==!1?Ci:null,onKeyDown:$i,onFocus:or,onBlur:lr,value:"",onChange:zt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(xt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(xt,"-indent")},ee.createElement("div",{ref:Zi,className:"".concat(xt,"-indent-unit")}))),ee.createElement(Pe.Z,(0,Me.Z)({},yi,{data:Ln,itemKey:gt,height:gn,fullHeight:!1,virtual:An,itemHeight:Hn,prefixCls:"".concat(xt,"-list"),ref:dr,onVisibleChange:function(rn,jn){var On=new Set(rn),ei=jn.filter(function(Gn){return!On.has(Gn)});ei.some(function(Gn){return gt(Gn)===lt})&&un()}}),function($t){var rn=$t.pos,jn=(0,Me.Z)({},(se($t.data),$t.data)),On=$t.title,ei=$t.key,Gn=$t.isStart,ti=$t.isEnd,Bn=(0,Ze.km)(ei,rn);delete jn.key,delete jn.children;var li=(0,Ze.H8)(Bn,Dn);return ee.createElement(at,(0,Me.Z)({},jn,li,{title:On,active:!!ai&&ei===ai.key,pos:rn,data:$t.data,isStart:Gn,isEnd:ti,motion:ln,motionNodes:ei===lt?Tt:null,motionType:mn,onMotionStart:Fr,onMotionEnd:un,treeNodeRequiredProps:Dn,onMouseMove:function(){qi(null)}}))}))});Ht.displayName="NodeList";var hn=Ht,Qt=Ee(35654),bn=Ee(90782),Wt=Ee(67841),Kt=10,Jt=function(pt){(0,xe.Z)(xt,pt);var Bt=(0,ge.Z)(xt);function xt(){var vt;(0,Le.Z)(this,xt);for(var nt=arguments.length,He=new Array(nt),Ie=0;Ie<nt;Ie++)He[Ie]=arguments[Ie];return vt=Bt.call.apply(Bt,[this].concat(He)),vt.destroyed=!1,vt.delayedDragEnterLogic=void 0,vt.loadingRetryTimes={},vt.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,Ze.w$)()},vt.dragStartMousePosition=null,vt.dragNode=void 0,vt.currentMouseOverDroppableNodeKey=null,vt.listRef=ee.createRef(),vt.onNodeDragStart=function(We,Oe){var be=vt.state,Ne=be.expandedKeys,$e=be.keyEntities,dt=vt.props.onDragStart,Je=Oe.props.eventKey;vt.dragNode=Oe,vt.dragStartMousePosition={x:We.clientX,y:We.clientY};var At=(0,Qt._5)(Ne,Je);vt.setState({draggingNodeKey:Je,dragChildrenKeys:(0,Qt.wA)(Je,$e),indent:vt.listRef.current.getIndentWidth()}),vt.setExpandedKeys(At),window.addEventListener("dragend",vt.onWindowDragEnd),dt==null||dt({event:We,node:(0,Ze.F)(Oe.props)})},vt.onNodeDragEnter=function(We,Oe){var be=vt.state,Ne=be.expandedKeys,$e=be.keyEntities,dt=be.dragChildrenKeys,Je=be.flattenNodes,At=be.indent,tn=vt.props,pn=tn.onDragEnter,ln=tn.onExpand,gn=tn.allowDrop,Hn=tn.direction,An=Oe.props,qn=An.pos,ai=An.eventKey,Ti=(0,ye.Z)(vt),Ci=Ti.dragNode;if(vt.currentMouseOverDroppableNodeKey!==ai&&(vt.currentMouseOverDroppableNodeKey=ai),!Ci){vt.resetDragState();return}var $i=(0,Qt.OM)(We,Ci,Oe,At,vt.dragStartMousePosition,gn,Je,$e,Ne,Hn),or=$i.dropPosition,lr=$i.dropLevelOffset,qi=$i.dropTargetKey,Fr=$i.dropContainerKey,Mr=$i.dropTargetPos,yi=$i.dropAllowed,dr=$i.dragOverNodeKey;if(dt.indexOf(qi)!==-1||!yi){vt.resetDragState();return}if(vt.delayedDragEnterLogic||(vt.delayedDragEnterLogic={}),Object.keys(vt.delayedDragEnterLogic).forEach(function(Zi){clearTimeout(vt.delayedDragEnterLogic[Zi])}),Ci.props.eventKey!==Oe.props.eventKey&&(We.persist(),vt.delayedDragEnterLogic[qn]=window.setTimeout(function(){if(vt.state.draggingNodeKey!==null){var Zi=(0,Ce.Z)(Ne),rt=(0,Wt.Z)($e,Oe.props.eventKey);rt&&(rt.children||[]).length&&(Zi=(0,Qt.L0)(Ne,Oe.props.eventKey)),"expandedKeys"in vt.props||vt.setExpandedKeys(Zi),ln==null||ln(Zi,{node:(0,Ze.F)(Oe.props),expanded:!0,nativeEvent:We.nativeEvent})}},800)),Ci.props.eventKey===qi&&lr===0){vt.resetDragState();return}vt.setState({dragOverNodeKey:dr,dropPosition:or,dropLevelOffset:lr,dropTargetKey:qi,dropContainerKey:Fr,dropTargetPos:Mr,dropAllowed:yi}),pn==null||pn({event:We,node:(0,Ze.F)(Oe.props),expandedKeys:Ne})},vt.onNodeDragOver=function(We,Oe){var be=vt.state,Ne=be.dragChildrenKeys,$e=be.flattenNodes,dt=be.keyEntities,Je=be.expandedKeys,At=be.indent,tn=vt.props,pn=tn.onDragOver,ln=tn.allowDrop,gn=tn.direction,Hn=(0,ye.Z)(vt),An=Hn.dragNode;if(An){var qn=(0,Qt.OM)(We,An,Oe,At,vt.dragStartMousePosition,ln,$e,dt,Je,gn),ai=qn.dropPosition,Ti=qn.dropLevelOffset,Ci=qn.dropTargetKey,$i=qn.dropContainerKey,or=qn.dropAllowed,lr=qn.dropTargetPos,qi=qn.dragOverNodeKey;Ne.indexOf(Ci)!==-1||!or||(An.props.eventKey===Ci&&Ti===0?vt.state.dropPosition===null&&vt.state.dropLevelOffset===null&&vt.state.dropTargetKey===null&&vt.state.dropContainerKey===null&&vt.state.dropTargetPos===null&&vt.state.dropAllowed===!1&&vt.state.dragOverNodeKey===null||vt.resetDragState():ai===vt.state.dropPosition&&Ti===vt.state.dropLevelOffset&&Ci===vt.state.dropTargetKey&&$i===vt.state.dropContainerKey&&lr===vt.state.dropTargetPos&&or===vt.state.dropAllowed&&qi===vt.state.dragOverNodeKey||vt.setState({dropPosition:ai,dropLevelOffset:Ti,dropTargetKey:Ci,dropContainerKey:$i,dropTargetPos:lr,dropAllowed:or,dragOverNodeKey:qi}),pn==null||pn({event:We,node:(0,Ze.F)(Oe.props)}))}},vt.onNodeDragLeave=function(We,Oe){vt.currentMouseOverDroppableNodeKey===Oe.props.eventKey&&!We.currentTarget.contains(We.relatedTarget)&&(vt.resetDragState(),vt.currentMouseOverDroppableNodeKey=null);var be=vt.props.onDragLeave;be==null||be({event:We,node:(0,Ze.F)(Oe.props)})},vt.onWindowDragEnd=function(We){vt.onNodeDragEnd(We,null,!0),window.removeEventListener("dragend",vt.onWindowDragEnd)},vt.onNodeDragEnd=function(We,Oe){var be=vt.props.onDragEnd;vt.setState({dragOverNodeKey:null}),vt.cleanDragState(),be==null||be({event:We,node:(0,Ze.F)(Oe.props)}),vt.dragNode=null,window.removeEventListener("dragend",vt.onWindowDragEnd)},vt.onNodeDrop=function(We,Oe){var be,Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$e=vt.state,dt=$e.dragChildrenKeys,Je=$e.dropPosition,At=$e.dropTargetKey,tn=$e.dropTargetPos,pn=$e.dropAllowed;if(pn){var ln=vt.props.onDrop;if(vt.setState({dragOverNodeKey:null}),vt.cleanDragState(),At!==null){var gn=(0,ke.Z)((0,ke.Z)({},(0,Ze.H8)(At,vt.getTreeNodeRequiredProps())),{},{active:((be=vt.getActiveItem())===null||be===void 0?void 0:be.key)===At,data:(0,Wt.Z)(vt.state.keyEntities,At).node}),Hn=dt.indexOf(At)!==-1;(0,z.ZP)(!Hn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var An=(0,Qt.yx)(tn),qn={event:We,node:(0,Ze.F)(gn),dragNode:vt.dragNode?(0,Ze.F)(vt.dragNode.props):null,dragNodesKeys:[vt.dragNode.props.eventKey].concat(dt),dropToGap:Je!==0,dropPosition:Je+Number(An[An.length-1])};Ne||ln==null||ln(qn),vt.dragNode=null}}},vt.cleanDragState=function(){var We=vt.state.draggingNodeKey;We!==null&&vt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),vt.dragStartMousePosition=null,vt.currentMouseOverDroppableNodeKey=null},vt.triggerExpandActionExpand=function(We,Oe){var be=vt.state,Ne=be.expandedKeys,$e=be.flattenNodes,dt=Oe.expanded,Je=Oe.key,At=Oe.isLeaf;if(!(At||We.shiftKey||We.metaKey||We.ctrlKey)){var tn=$e.filter(function(ln){return ln.key===Je})[0],pn=(0,Ze.F)((0,ke.Z)((0,ke.Z)({},(0,Ze.H8)(Je,vt.getTreeNodeRequiredProps())),{},{data:tn.data}));vt.setExpandedKeys(dt?(0,Qt._5)(Ne,Je):(0,Qt.L0)(Ne,Je)),vt.onNodeExpand(We,pn)}},vt.onNodeClick=function(We,Oe){var be=vt.props,Ne=be.onClick,$e=be.expandAction;$e==="click"&&vt.triggerExpandActionExpand(We,Oe),Ne==null||Ne(We,Oe)},vt.onNodeDoubleClick=function(We,Oe){var be=vt.props,Ne=be.onDoubleClick,$e=be.expandAction;$e==="doubleClick"&&vt.triggerExpandActionExpand(We,Oe),Ne==null||Ne(We,Oe)},vt.onNodeSelect=function(We,Oe){var be=vt.state.selectedKeys,Ne=vt.state,$e=Ne.keyEntities,dt=Ne.fieldNames,Je=vt.props,At=Je.onSelect,tn=Je.multiple,pn=Oe.selected,ln=Oe[dt.key],gn=!pn;gn?tn?be=(0,Qt.L0)(be,ln):be=[ln]:be=(0,Qt._5)(be,ln);var Hn=be.map(function(An){var qn=(0,Wt.Z)($e,An);return qn?qn.node:null}).filter(function(An){return An});vt.setUncontrolledState({selectedKeys:be}),At==null||At(be,{event:"select",selected:gn,node:Oe,selectedNodes:Hn,nativeEvent:We.nativeEvent})},vt.onNodeCheck=function(We,Oe,be){var Ne=vt.state,$e=Ne.keyEntities,dt=Ne.checkedKeys,Je=Ne.halfCheckedKeys,At=vt.props,tn=At.checkStrictly,pn=At.onCheck,ln=Oe.key,gn,Hn={event:"check",node:Oe,checked:be,nativeEvent:We.nativeEvent};if(tn){var An=be?(0,Qt.L0)(dt,ln):(0,Qt._5)(dt,ln),qn=(0,Qt._5)(Je,ln);gn={checked:An,halfChecked:qn},Hn.checkedNodes=An.map(function(lr){return(0,Wt.Z)($e,lr)}).filter(function(lr){return lr}).map(function(lr){return lr.node}),vt.setUncontrolledState({checkedKeys:An})}else{var ai=(0,bn.S)([].concat((0,Ce.Z)(dt),[ln]),!0,$e),Ti=ai.checkedKeys,Ci=ai.halfCheckedKeys;if(!be){var $i=new Set(Ti);$i.delete(ln);var or=(0,bn.S)(Array.from($i),{checked:!1,halfCheckedKeys:Ci},$e);Ti=or.checkedKeys,Ci=or.halfCheckedKeys}gn=Ti,Hn.checkedNodes=[],Hn.checkedNodesPositions=[],Hn.halfCheckedKeys=Ci,Ti.forEach(function(lr){var qi=(0,Wt.Z)($e,lr);if(qi){var Fr=qi.node,Mr=qi.pos;Hn.checkedNodes.push(Fr),Hn.checkedNodesPositions.push({node:Fr,pos:Mr})}}),vt.setUncontrolledState({checkedKeys:Ti},!1,{halfCheckedKeys:Ci})}pn==null||pn(gn,Hn)},vt.onNodeLoad=function(We){var Oe=We.key,be=new Promise(function(Ne,$e){vt.setState(function(dt){var Je=dt.loadedKeys,At=Je===void 0?[]:Je,tn=dt.loadingKeys,pn=tn===void 0?[]:tn,ln=vt.props,gn=ln.loadData,Hn=ln.onLoad;if(!gn||At.indexOf(Oe)!==-1||pn.indexOf(Oe)!==-1)return null;var An=gn(We);return An.then(function(){var qn=vt.state.loadedKeys,ai=(0,Qt.L0)(qn,Oe);Hn==null||Hn(ai,{event:"load",node:We}),vt.setUncontrolledState({loadedKeys:ai}),vt.setState(function(Ti){return{loadingKeys:(0,Qt._5)(Ti.loadingKeys,Oe)}}),Ne()}).catch(function(qn){if(vt.setState(function(Ti){return{loadingKeys:(0,Qt._5)(Ti.loadingKeys,Oe)}}),vt.loadingRetryTimes[Oe]=(vt.loadingRetryTimes[Oe]||0)+1,vt.loadingRetryTimes[Oe]>=Kt){var ai=vt.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),vt.setUncontrolledState({loadedKeys:(0,Qt.L0)(ai,Oe)}),Ne()}$e(qn)}),{loadingKeys:(0,Qt.L0)(pn,Oe)}})});return be.catch(function(){}),be},vt.onNodeMouseEnter=function(We,Oe){var be=vt.props.onMouseEnter;be==null||be({event:We,node:Oe})},vt.onNodeMouseLeave=function(We,Oe){var be=vt.props.onMouseLeave;be==null||be({event:We,node:Oe})},vt.onNodeContextMenu=function(We,Oe){var be=vt.props.onRightClick;be&&(We.preventDefault(),be({event:We,node:Oe}))},vt.onFocus=function(){var We=vt.props.onFocus;vt.setState({focused:!0});for(var Oe=arguments.length,be=new Array(Oe),Ne=0;Ne<Oe;Ne++)be[Ne]=arguments[Ne];We==null||We.apply(void 0,be)},vt.onBlur=function(){var We=vt.props.onBlur;vt.setState({focused:!1}),vt.onActiveChange(null);for(var Oe=arguments.length,be=new Array(Oe),Ne=0;Ne<Oe;Ne++)be[Ne]=arguments[Ne];We==null||We.apply(void 0,be)},vt.getTreeNodeRequiredProps=function(){var We=vt.state,Oe=We.expandedKeys,be=We.selectedKeys,Ne=We.loadedKeys,$e=We.loadingKeys,dt=We.checkedKeys,Je=We.halfCheckedKeys,At=We.dragOverNodeKey,tn=We.dropPosition,pn=We.keyEntities;return{expandedKeys:Oe||[],selectedKeys:be||[],loadedKeys:Ne||[],loadingKeys:$e||[],checkedKeys:dt||[],halfCheckedKeys:Je||[],dragOverNodeKey:At,dropPosition:tn,keyEntities:pn}},vt.setExpandedKeys=function(We){var Oe=vt.state,be=Oe.treeData,Ne=Oe.fieldNames,$e=(0,Ze.oH)(be,We,Ne);vt.setUncontrolledState({expandedKeys:We,flattenNodes:$e},!0)},vt.onNodeExpand=function(We,Oe){var be=vt.state.expandedKeys,Ne=vt.state,$e=Ne.listChanging,dt=Ne.fieldNames,Je=vt.props,At=Je.onExpand,tn=Je.loadData,pn=Oe.expanded,ln=Oe[dt.key];if(!$e){var gn=be.indexOf(ln),Hn=!pn;if((0,z.ZP)(pn&&gn!==-1||!pn&&gn===-1,"Expand state not sync with index check"),Hn?be=(0,Qt.L0)(be,ln):be=(0,Qt._5)(be,ln),vt.setExpandedKeys(be),At==null||At(be,{node:Oe,expanded:Hn,nativeEvent:We.nativeEvent}),Hn&&tn){var An=vt.onNodeLoad(Oe);An&&An.then(function(){var qn=(0,Ze.oH)(vt.state.treeData,be,dt);vt.setUncontrolledState({flattenNodes:qn})}).catch(function(){var qn=vt.state.expandedKeys,ai=(0,Qt._5)(qn,ln);vt.setExpandedKeys(ai)})}}},vt.onListChangeStart=function(){vt.setUncontrolledState({listChanging:!0})},vt.onListChangeEnd=function(){setTimeout(function(){vt.setUncontrolledState({listChanging:!1})})},vt.onActiveChange=function(We){var Oe=vt.state.activeKey,be=vt.props.onActiveChange;Oe!==We&&(vt.setState({activeKey:We}),We!==null&&vt.scrollTo({key:We}),be==null||be(We))},vt.getActiveItem=function(){var We=vt.state,Oe=We.activeKey,be=We.flattenNodes;return Oe===null?null:be.find(function(Ne){var $e=Ne.key;return $e===Oe})||null},vt.offsetActiveKey=function(We){var Oe=vt.state,be=Oe.flattenNodes,Ne=Oe.activeKey,$e=be.findIndex(function(At){var tn=At.key;return tn===Ne});$e===-1&&We<0&&($e=be.length),$e=($e+We+be.length)%be.length;var dt=be[$e];if(dt){var Je=dt.key;vt.onActiveChange(Je)}else vt.onActiveChange(null)},vt.onKeyDown=function(We){var Oe=vt.state,be=Oe.activeKey,Ne=Oe.expandedKeys,$e=Oe.checkedKeys,dt=Oe.fieldNames,Je=vt.props,At=Je.onKeyDown,tn=Je.checkable,pn=Je.selectable;switch(We.which){case de.Z.UP:{vt.offsetActiveKey(-1),We.preventDefault();break}case de.Z.DOWN:{vt.offsetActiveKey(1),We.preventDefault();break}}var ln=vt.getActiveItem();if(ln&&ln.data){var gn=vt.getTreeNodeRequiredProps(),Hn=ln.data.isLeaf===!1||!!(ln.data[dt.children]||[]).length,An=(0,Ze.F)((0,ke.Z)((0,ke.Z)({},(0,Ze.H8)(be,gn)),{},{data:ln.data,active:!0}));switch(We.which){case de.Z.LEFT:{Hn&&Ne.includes(be)?vt.onNodeExpand({},An):ln.parent&&vt.onActiveChange(ln.parent.key),We.preventDefault();break}case de.Z.RIGHT:{Hn&&!Ne.includes(be)?vt.onNodeExpand({},An):ln.children&&ln.children.length&&vt.onActiveChange(ln.children[0].key),We.preventDefault();break}case de.Z.ENTER:case de.Z.SPACE:{tn&&!An.disabled&&An.checkable!==!1&&!An.disableCheckbox?vt.onNodeCheck({},An,!$e.includes(be)):!tn&&pn&&!An.disabled&&An.selectable!==!1&&vt.onNodeSelect({},An);break}}}At==null||At(We)},vt.setUncontrolledState=function(We){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!vt.destroyed){var Ne=!1,$e=!0,dt={};Object.keys(We).forEach(function(Je){if(Je in vt.props){$e=!1;return}Ne=!0,dt[Je]=We[Je]}),Ne&&(!Oe||$e)&&vt.setState((0,ke.Z)((0,ke.Z)({},dt),be))}},vt.scrollTo=function(We){vt.listRef.current.scrollTo(We)},vt}return(0,he.Z)(xt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var nt=this.props.activeKey;nt!==void 0&&nt!==this.state.activeKey&&(this.setState({activeKey:nt}),nt!==null&&this.scrollTo({key:nt}))}},{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 nt,He=this.state,Ie=He.focused,We=He.flattenNodes,Oe=He.keyEntities,be=He.draggingNodeKey,Ne=He.activeKey,$e=He.dropLevelOffset,dt=He.dropContainerKey,Je=He.dropTargetKey,At=He.dropPosition,tn=He.dragOverNodeKey,pn=He.indent,ln=this.props,gn=ln.prefixCls,Hn=ln.className,An=ln.style,qn=ln.showLine,ai=ln.focusable,Ti=ln.tabIndex,Ci=Ti===void 0?0:Ti,$i=ln.selectable,or=ln.showIcon,lr=ln.icon,qi=ln.switcherIcon,Fr=ln.draggable,Mr=ln.checkable,yi=ln.checkStrictly,dr=ln.disabled,Zi=ln.motion,rt=ln.loadData,Ir=ln.filterTreeNode,Ar=ln.height,$r=ln.itemHeight,co=ln.virtual,mo=ln.titleRender,no=ln.dropIndicatorRender,lo=ln.onContextMenu,ri=ln.onScroll,Ke=ln.direction,qe=ln.rootClassName,Ye=ln.rootStyle,St=(0,ce.Z)(this.props,{aria:!0,data:!0}),Ot;return Fr&&((0,Be.Z)(Fr)==="object"?Ot=Fr:typeof Fr=="function"?Ot={nodeDraggable:Fr}:Ot={}),ee.createElement(oe.k.Provider,{value:{prefixCls:gn,selectable:$i,showIcon:or,icon:lr,switcherIcon:qi,draggable:Ot,draggingNodeKey:be,checkable:Mr,checkStrictly:yi,disabled:dr,keyEntities:Oe,dropLevelOffset:$e,dropContainerKey:dt,dropTargetKey:Je,dropPosition:At,dragOverNodeKey:tn,indent:pn,direction:Ke,dropIndicatorRender:no,loadData:rt,filterTreeNode:Ir,titleRender:mo,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}},ee.createElement("div",{role:"tree",className:ve()(gn,Hn,qe,(nt={},(0,me.Z)(nt,"".concat(gn,"-show-line"),qn),(0,me.Z)(nt,"".concat(gn,"-focused"),Ie),(0,me.Z)(nt,"".concat(gn,"-active-focused"),Ne!==null),nt)),style:Ye},ee.createElement(hn,(0,Me.Z)({ref:this.listRef,prefixCls:gn,style:An,data:We,disabled:dr,selectable:$i,checkable:!!Mr,motion:Zi,dragging:be!==null,height:Ar,itemHeight:$r,virtual:co,focusable:ai,focused:Ie,tabIndex:Ci,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:lo,onScroll:ri},this.getTreeNodeRequiredProps(),St))))}}],[{key:"getDerivedStateFromProps",value:function(nt,He){var Ie=He.prevProps,We={prevProps:nt};function Oe(ai){return!Ie&&ai in nt||Ie&&Ie[ai]!==nt[ai]}var be,Ne=He.fieldNames;if(Oe("fieldNames")&&(Ne=(0,Ze.w$)(nt.fieldNames),We.fieldNames=Ne),Oe("treeData")?be=nt.treeData:Oe("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),be=(0,Ze.zn)(nt.children)),be){We.treeData=be;var $e=(0,Ze.I8)(be,{fieldNames:Ne});We.keyEntities=(0,ke.Z)((0,me.Z)({},lt,ut),$e.keyEntities)}var dt=We.keyEntities||He.keyEntities;if(Oe("expandedKeys")||Ie&&Oe("autoExpandParent"))We.expandedKeys=nt.autoExpandParent||!Ie&&nt.defaultExpandParent?(0,Qt.r7)(nt.expandedKeys,dt):nt.expandedKeys;else if(!Ie&&nt.defaultExpandAll){var Je=(0,ke.Z)({},dt);delete Je[lt],We.expandedKeys=Object.keys(Je).map(function(ai){return Je[ai].key})}else!Ie&&nt.defaultExpandedKeys&&(We.expandedKeys=nt.autoExpandParent||nt.defaultExpandParent?(0,Qt.r7)(nt.defaultExpandedKeys,dt):nt.defaultExpandedKeys);if(We.expandedKeys||delete We.expandedKeys,be||We.expandedKeys){var At=(0,Ze.oH)(be||He.treeData,We.expandedKeys||He.expandedKeys,Ne);We.flattenNodes=At}if(nt.selectable&&(Oe("selectedKeys")?We.selectedKeys=(0,Qt.BT)(nt.selectedKeys,nt):!Ie&&nt.defaultSelectedKeys&&(We.selectedKeys=(0,Qt.BT)(nt.defaultSelectedKeys,nt))),nt.checkable){var tn;if(Oe("checkedKeys")?tn=(0,Qt.E6)(nt.checkedKeys)||{}:!Ie&&nt.defaultCheckedKeys?tn=(0,Qt.E6)(nt.defaultCheckedKeys)||{}:be&&(tn=(0,Qt.E6)(nt.checkedKeys)||{checkedKeys:He.checkedKeys,halfCheckedKeys:He.halfCheckedKeys}),tn){var pn=tn,ln=pn.checkedKeys,gn=ln===void 0?[]:ln,Hn=pn.halfCheckedKeys,An=Hn===void 0?[]:Hn;if(!nt.checkStrictly){var qn=(0,bn.S)(gn,!0,dt);gn=qn.checkedKeys,An=qn.halfCheckedKeys}We.checkedKeys=gn,We.halfCheckedKeys=An}}return Oe("loadedKeys")&&(We.loadedKeys=nt.loadedKeys),We}}]),xt}(ee.Component);Jt.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:ie,allowDrop:function(){return!0},expandAction:!1},Jt.TreeNode=De.Z;var Yt=Jt,kt=Yt},35654:function(_n,en,Ee){"use strict";Ee.d(en,{BT:function(){return ee},E6:function(){return se},L0:function(){return ge},OM:function(){return z},_5:function(){return xe},r7:function(){return ue},wA:function(){return ve},yx:function(){return le}});var Me=Ee(80702),me=Ee(62853),Be=Ee(48736),ke=Ee(59301),Ce=Ee(39417),Le=Ee(67841),he=Ee(71430),ye=null;function xe(Se,we){if(!Se)return[];var Pe=Se.slice(),Ae=Pe.indexOf(we);return Ae>=0&&Pe.splice(Ae,1),Pe}function ge(Se,we){var Pe=(Se||[]).slice();return Pe.indexOf(we)===-1&&Pe.push(we),Pe}function le(Se){return Se.split("-")}function ve(Se,we){var Pe=[],Ae=(0,Le.Z)(we,Se);function De(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ze.forEach(function(Ze){var Xe=Ze.key,Ge=Ze.children;Pe.push(Xe),De(Ge)})}return De(Ae.children),Pe}function de(Se){if(Se.parent){var we=le(Se.pos);return Number(we[we.length-1])===Se.parent.children.length-1}return!1}function ce(Se){var we=le(Se.pos);return Number(we[we.length-1])===0}function z(Se,we,Pe,Ae,De,ze,Ze,Xe,Ge,ft){var at,Ct=Se.clientX,et=Se.clientY,yt=Se.target.getBoundingClientRect(),st=yt.top,zt=yt.height,lt=(ft==="rtl"?-1:1)*(((De==null?void 0:De.x)||0)-Ct),tt=(lt-12)/Ae,ut=(0,Le.Z)(Xe,Pe.props.eventKey);if(et<st+zt/2){var mt=Ze.findIndex(function(kt){return kt.key===ut.key}),Pt=mt<=0?0:mt-1,gt=Ze[Pt].key;ut=(0,Le.Z)(Xe,gt)}var Ft=ut.key,Ht=ut,hn=ut.key,Qt=0,bn=0;if(!Ge.includes(Ft))for(var Wt=0;Wt<tt&&de(ut);Wt+=1)ut=ut.parent,bn+=1;var Kt=we.props.data,Jt=ut.node,Yt=!0;return ce(ut)&&ut.level===0&&et<st+zt/2&&ze({dragNode:Kt,dropNode:Jt,dropPosition:-1})&&ut.key===Pe.props.eventKey?Qt=-1:(Ht.children||[]).length&&Ge.includes(hn)?ze({dragNode:Kt,dropNode:Jt,dropPosition:0})?Qt=0:Yt=!1:bn===0?tt>-1.5?ze({dragNode:Kt,dropNode:Jt,dropPosition:1})?Qt=1:Yt=!1:ze({dragNode:Kt,dropNode:Jt,dropPosition:0})?Qt=0:ze({dragNode:Kt,dropNode:Jt,dropPosition:1})?Qt=1:Yt=!1:ze({dragNode:Kt,dropNode:Jt,dropPosition:1})?Qt=1:Yt=!1,{dropPosition:Qt,dropLevelOffset:bn,dropTargetKey:ut.key,dropTargetPos:ut.pos,dragOverNodeKey:hn,dropContainerKey:Qt===0?null:((at=ut.parent)===null||at===void 0?void 0:at.key)||null,dropAllowed:Yt}}function ee(Se,we){if(Se){var Pe=we.multiple;return Pe?Se.slice():Se.length?[Se[0]]:Se}}var oe=function(we){return we};function ie(Se,we){if(!Se)return[];var Pe=we||{},Ae=Pe.processProps,De=Ae===void 0?oe:Ae,ze=Array.isArray(Se)?Se:[Se];return ze.map(function(Ze){var Xe=Ze.children,Ge=_objectWithoutProperties(Ze,ye),ft=ie(Xe,we);return React.createElement(TreeNode,_extends({key:Ge.key},De(Ge)),ft)})}function se(Se){if(!Se)return null;var we;if(Array.isArray(Se))we={checkedKeys:Se,halfCheckedKeys:void 0};else if((0,me.Z)(Se)==="object")we={checkedKeys:Se.checked||void 0,halfCheckedKeys:Se.halfChecked||void 0};else return(0,Be.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return we}function ue(Se,we){var Pe=new Set;function Ae(De){if(!Pe.has(De)){var ze=(0,Le.Z)(we,De);if(ze){Pe.add(De);var Ze=ze.parent,Xe=ze.node;Xe.disabled||Ze&&Ae(Ze.key)}}}return(Se||[]).forEach(function(De){Ae(De)}),(0,Me.Z)(Pe)}},90782:function(_n,en,Ee){"use strict";Ee.d(en,{S:function(){return he}});var Me=Ee(48736),me=Ee(67841);function Be(ye,xe){var ge=new Set;return ye.forEach(function(le){xe.has(le)||ge.add(le)}),ge}function ke(ye){var xe=ye||{},ge=xe.disabled,le=xe.disableCheckbox,ve=xe.checkable;return!!(ge||le)||ve===!1}function Ce(ye,xe,ge,le){for(var ve=new Set(ye),de=new Set,ce=0;ce<=ge;ce+=1){var z=xe.get(ce)||new Set;z.forEach(function(se){var ue=se.key,Se=se.node,we=se.children,Pe=we===void 0?[]:we;ve.has(ue)&&!le(Se)&&Pe.filter(function(Ae){return!le(Ae.node)}).forEach(function(Ae){ve.add(Ae.key)})})}for(var ee=new Set,oe=ge;oe>=0;oe-=1){var ie=xe.get(oe)||new Set;ie.forEach(function(se){var ue=se.parent,Se=se.node;if(!(le(Se)||!se.parent||ee.has(se.parent.key))){if(le(se.parent.node)){ee.add(ue.key);return}var we=!0,Pe=!1;(ue.children||[]).filter(function(Ae){return!le(Ae.node)}).forEach(function(Ae){var De=Ae.key,ze=ve.has(De);we&&!ze&&(we=!1),!Pe&&(ze||de.has(De))&&(Pe=!0)}),we&&ve.add(ue.key),Pe&&de.add(ue.key),ee.add(ue.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(Be(de,ve))}}function Le(ye,xe,ge,le,ve){for(var de=new Set(ye),ce=new Set(xe),z=0;z<=le;z+=1){var ee=ge.get(z)||new Set;ee.forEach(function(ue){var Se=ue.key,we=ue.node,Pe=ue.children,Ae=Pe===void 0?[]:Pe;!de.has(Se)&&!ce.has(Se)&&!ve(we)&&Ae.filter(function(De){return!ve(De.node)}).forEach(function(De){de.delete(De.key)})})}ce=new Set;for(var oe=new Set,ie=le;ie>=0;ie-=1){var se=ge.get(ie)||new Set;se.forEach(function(ue){var Se=ue.parent,we=ue.node;if(!(ve(we)||!ue.parent||oe.has(ue.parent.key))){if(ve(ue.parent.node)){oe.add(Se.key);return}var Pe=!0,Ae=!1;(Se.children||[]).filter(function(De){return!ve(De.node)}).forEach(function(De){var ze=De.key,Ze=de.has(ze);Pe&&!Ze&&(Pe=!1),!Ae&&(Ze||ce.has(ze))&&(Ae=!0)}),Pe||de.delete(Se.key),Ae&&ce.add(Se.key),oe.add(Se.key)}})}return{checkedKeys:Array.from(de),halfCheckedKeys:Array.from(Be(ce,de))}}function he(ye,xe,ge,le){var ve=[],de;le?de=le:de=ke;var ce=new Set(ye.filter(function(ie){var se=!!(0,me.Z)(ge,ie);return se||ve.push(ie),se})),z=new Map,ee=0;Object.keys(ge).forEach(function(ie){var se=ge[ie],ue=se.level,Se=z.get(ue);Se||(Se=new Set,z.set(ue,Se)),Se.add(se),ee=Math.max(ee,ue)}),(0,Me.ZP)(!ve.length,"Tree missing follow keys: ".concat(ve.slice(0,100).map(function(ie){return"'".concat(ie,"'")}).join(", ")));var oe;return xe===!0?oe=Ce(ce,z,ee,de):oe=Le(ce,xe.halfCheckedKeys,z,ee,de),oe}},67841:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return Me}});function Me(me,Be){return me[Be]}},71430:function(_n,en,Ee){"use strict";Ee.d(en,{F:function(){return ue},H8:function(){return se},I8:function(){return ie},km:function(){return ve},oH:function(){return ee},w$:function(){return de},zn:function(){return z}});var Me=Ee(62853),me=Ee(80702),Be=Ee(77321),ke=Ee(74416),Ce=Ee(11592),Le=Ee(2738),he=Ee(48736),ye=Ee(67841),xe=["children"];function ge(Se,we){return"".concat(Se,"-").concat(we)}function le(Se){return Se&&Se.type&&Se.type.isTreeNode}function ve(Se,we){return Se!=null?Se:we}function de(Se){var we=Se||{},Pe=we.title,Ae=we._title,De=we.key,ze=we.children,Ze=Pe||"title";return{title:Ze,_title:Ae||[Ze],key:De||"key",children:ze||"children"}}function ce(Se,we){var Pe=new Map;function Ae(De){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(De||[]).forEach(function(Ze){var Xe=Ze[we.key],Ge=Ze[we.children];warning(Xe!=null,"Tree node must have a certain key: [".concat(ze).concat(Xe,"]"));var ft=String(Xe);warning(!Pe.has(ft)||Xe===null||Xe===void 0,"Same 'key' exist in the Tree: ".concat(ft)),Pe.set(ft,!0),Ae(Ge,"".concat(ze).concat(ft," > "))})}Ae(Se)}function z(Se){function we(Pe){var Ae=(0,Ce.Z)(Pe);return Ae.map(function(De){if(!le(De))return(0,he.ZP)(!De,"Tree/TreeNode can only accept TreeNode as children."),null;var ze=De.key,Ze=De.props,Xe=Ze.children,Ge=(0,ke.Z)(Ze,xe),ft=(0,Be.Z)({key:ze},Ge),at=we(Xe);return at.length&&(ft.children=at),ft}).filter(function(De){return De})}return we(Se)}function ee(Se,we,Pe){var Ae=de(Pe),De=Ae._title,ze=Ae.key,Ze=Ae.children,Xe=new Set(we===!0?[]:we),Ge=[];function ft(at){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return at.map(function(et,yt){for(var st=ge(Ct?Ct.pos:"0",yt),zt=ve(et[ze],st),lt,tt=0;tt<De.length;tt+=1){var ut=De[tt];if(et[ut]!==void 0){lt=et[ut];break}}var mt=(0,Be.Z)((0,Be.Z)({},(0,Le.Z)(et,[].concat((0,me.Z)(De),[ze,Ze]))),{},{title:lt,key:zt,parent:Ct,pos:st,children:null,data:et,isStart:[].concat((0,me.Z)(Ct?Ct.isStart:[]),[yt===0]),isEnd:[].concat((0,me.Z)(Ct?Ct.isEnd:[]),[yt===at.length-1])});return Ge.push(mt),we===!0||Xe.has(zt)?mt.children=ft(et[Ze]||[],mt):mt.children=[],mt})}return ft(Se),Ge}function oe(Se,we,Pe){var Ae={};(0,Me.Z)(Pe)==="object"?Ae=Pe:Ae={externalGetKey:Pe},Ae=Ae||{};var De=Ae,ze=De.childrenPropName,Ze=De.externalGetKey,Xe=De.fieldNames,Ge=de(Xe),ft=Ge.key,at=Ge.children,Ct=ze||at,et;Ze?typeof Ze=="string"?et=function(zt){return zt[Ze]}:typeof Ze=="function"&&(et=function(zt){return Ze(zt)}):et=function(zt,lt){return ve(zt[ft],lt)};function yt(st,zt,lt,tt){var ut=st?st[Ct]:Se,mt=st?ge(lt.pos,zt):"0",Pt=st?[].concat((0,me.Z)(tt),[st]):[];if(st){var gt=et(st,mt),Ft={node:st,index:zt,pos:mt,key:gt,parentPos:lt.node?lt.pos:null,level:lt.level+1,nodes:Pt};we(Ft)}ut&&ut.forEach(function(Ht,hn){yt(Ht,hn,{node:st,pos:mt,level:lt?lt.level+1:-1},Pt)})}yt(null)}function ie(Se){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pe=we.initWrapper,Ae=we.processEntity,De=we.onProcessFinished,ze=we.externalGetKey,Ze=we.childrenPropName,Xe=we.fieldNames,Ge=arguments.length>2?arguments[2]:void 0,ft=ze||Ge,at={},Ct={},et={posEntities:at,keyEntities:Ct};return Pe&&(et=Pe(et)||et),oe(Se,function(yt){var st=yt.node,zt=yt.index,lt=yt.pos,tt=yt.key,ut=yt.parentPos,mt=yt.level,Pt=yt.nodes,gt={node:st,nodes:Pt,index:zt,key:tt,pos:lt,level:mt},Ft=ve(tt,lt);at[lt]=gt,Ct[Ft]=gt,gt.parent=at[ut],gt.parent&&(gt.parent.children=gt.parent.children||[],gt.parent.children.push(gt)),Ae&&Ae(gt,et)},{externalGetKey:ft,childrenPropName:Ze,fieldNames:Xe}),De&&De(et),et}function se(Se,we){var Pe=we.expandedKeys,Ae=we.selectedKeys,De=we.loadedKeys,ze=we.loadingKeys,Ze=we.checkedKeys,Xe=we.halfCheckedKeys,Ge=we.dragOverNodeKey,ft=we.dropPosition,at=we.keyEntities,Ct=(0,ye.Z)(at,Se),et={eventKey:Se,expanded:Pe.indexOf(Se)!==-1,selected:Ae.indexOf(Se)!==-1,loaded:De.indexOf(Se)!==-1,loading:ze.indexOf(Se)!==-1,checked:Ze.indexOf(Se)!==-1,halfChecked:Xe.indexOf(Se)!==-1,pos:String(Ct?Ct.pos:""),dragOver:Ge===Se&&ft===0,dragOverGapTop:Ge===Se&&ft===-1,dragOverGapBottom:Ge===Se&&ft===1};return et}function ue(Se){var we=Se.data,Pe=Se.expanded,Ae=Se.selected,De=Se.checked,ze=Se.loaded,Ze=Se.loading,Xe=Se.halfChecked,Ge=Se.dragOver,ft=Se.dragOverGapTop,at=Se.dragOverGapBottom,Ct=Se.pos,et=Se.active,yt=Se.eventKey,st=(0,Be.Z)((0,Be.Z)({},we),{},{expanded:Pe,selected:Ae,checked:De,loaded:ze,loading:Ze,halfChecked:Xe,dragOver:Ge,dragOverGapTop:ft,dragOverGapBottom:at,pos:Ct,active:et,key:yt});return"props"in st||Object.defineProperty(st,"props",{get:function(){return(0,he.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Se}}),st}},8224:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return me}});var Me=Ee(4676);function me(Be,ke,Ce,Le){var he=Me.unstable_batchedUpdates?function(xe){Me.unstable_batchedUpdates(Ce,xe)}:Ce;return Be!=null&&Be.addEventListener&&Be.addEventListener(ke,he,Le),{remove:function(){Be!=null&&Be.removeEventListener&&Be.removeEventListener(ke,he,Le)}}}},55468:function(_n,en,Ee){"use strict";Ee.d(en,{g1:function(){return le},os:function(){return de}});var Me=/margin|padding|width|height|max|min|offset/,me={left:!0,top:!0},Be={cssFloat:1,styleFloat:1,float:1};function ke(ce){return ce.nodeType===1?ce.ownerDocument.defaultView.getComputedStyle(ce,null):{}}function Ce(ce,z,ee){if(z=z.toLowerCase(),ee==="auto"){if(z==="height")return ce.offsetHeight;if(z==="width")return ce.offsetWidth}return z in me||(me[z]=Me.test(z)),me[z]?parseFloat(ee)||0:ee}function Le(ce,z){var ee=arguments.length,oe=ke(ce);return z=Be[z]?"cssFloat"in ce.style?"cssFloat":"styleFloat":z,ee===1?oe:Ce(ce,z,oe[z]||ce.style[z])}function he(ce,z,ee){var oe=arguments.length;if(z=Be[z]?"cssFloat"in ce.style?"cssFloat":"styleFloat":z,oe===3)return typeof ee=="number"&&Me.test(z)&&(ee="".concat(ee,"px")),ce.style[z]=ee,ee;for(var ie in z)z.hasOwnProperty(ie)&&he(ce,ie,z[ie]);return ke(ce)}function ye(ce){return ce===document.body?document.documentElement.clientWidth:ce.offsetWidth}function xe(ce){return ce===document.body?window.innerHeight||document.documentElement.clientHeight:ce.offsetHeight}function ge(){var ce=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),z=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:ce,height:z}}function le(){var ce=document.documentElement.clientWidth,z=window.innerHeight||document.documentElement.clientHeight;return{width:ce,height:z}}function ve(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function de(ce){var z=ce.getBoundingClientRect(),ee=document.documentElement;return{left:z.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:z.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24514:function(_n,en,Ee){"use strict";Ee.d(en,{G:function(){return ke}});var Me=Ee(47273),me=function(Le){if((0,Me.Z)()&&window.document.documentElement){var he=Array.isArray(Le)?Le:[Le],ye=window.document.documentElement;return he.some(function(xe){return xe in ye.style})}return!1},Be=function(Le,he){if(!me(Le))return!1;var ye=document.createElement("div"),xe=ye.style[Le];return ye.style[Le]=he,ye.style[Le]!==xe};function ke(Ce,Le){return!Array.isArray(Ce)&&Le!==void 0?Be(Ce,Le):me(Ce)}},45680:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return Jt}});var Me=Ee(72308),me=Ee(62853),Be=Ee(77321),ke=Ee(49618),Ce=Ee(52487),Le=Ee(74416),he=Ee(92310),ye=Ee.n(he),xe=Ee(29301),ge=Ee(70425),le=Ee(34280),ve=Ee(59301),de=Ee(4676),ce=ve.forwardRef(function(Yt,kt){var pt=Yt.height,Bt=Yt.offsetY,xt=Yt.offsetX,vt=Yt.children,nt=Yt.prefixCls,He=Yt.onInnerResize,Ie=Yt.innerProps,We=Yt.rtl,Oe=Yt.extra,be={},Ne={display:"flex",flexDirection:"column"};return Bt!==void 0&&(be={height:pt,position:"relative",overflow:"hidden"},Ne=(0,Be.Z)((0,Be.Z)({},Ne),{},(0,ke.Z)((0,ke.Z)((0,ke.Z)((0,ke.Z)((0,ke.Z)({transform:"translateY(".concat(Bt,"px)")},We?"marginRight":"marginLeft",-xt),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:be},ve.createElement(xe.Z,{onResize:function(dt){var Je=dt.offsetHeight;Je&&He&&He()}},ve.createElement("div",(0,Me.Z)({style:Ne,className:ye()((0,ke.Z)({},"".concat(nt,"-holder-inner"),nt)),ref:kt},Ie),vt,Oe)))});ce.displayName="Filler";var z=ce;function ee(Yt){var kt=Yt.children,pt=Yt.setRef,Bt=ve.useCallback(function(xt){pt(xt)},[]);return ve.cloneElement(kt,{ref:Bt})}function oe(Yt,kt,pt,Bt,xt,vt,nt,He){var Ie=He.getKey;return Yt.slice(kt,pt+1).map(function(We,Oe){var be=kt+Oe,Ne=nt(We,be,{style:{width:Bt},offsetX:xt}),$e=Ie(We);return ve.createElement(ee,{key:$e,setRef:function(Je){return vt(We,Je)}},Ne)})}function ie(Yt,kt,pt,Bt){var xt=pt-Yt,vt=kt-pt,nt=Math.min(xt,vt)*2;if(Bt<=nt){var He=Math.floor(Bt/2);return Bt%2?pt+He+1:pt-He}return xt>vt?pt-(Bt-vt):pt+(Bt-xt)}function se(Yt,kt,pt){var Bt=Yt.length,xt=kt.length,vt,nt;if(Bt===0&&xt===0)return null;Bt<xt?(vt=Yt,nt=kt):(vt=kt,nt=Yt);var He={__EMPTY_ITEM__:!0};function Ie(dt){return dt!==void 0?pt(dt):He}for(var We=null,Oe=Math.abs(Bt-xt)!==1,be=0;be<nt.length;be+=1){var Ne=Ie(vt[be]),$e=Ie(nt[be]);if(Ne!==$e){We=be,Oe=Oe||Ne!==Ie(nt[be+1]);break}}return We===null?null:{index:We,multiple:Oe}}function ue(Yt,kt,pt){var Bt=ve.useState(Yt),xt=(0,Ce.Z)(Bt,2),vt=xt[0],nt=xt[1],He=ve.useState(null),Ie=(0,Ce.Z)(He,2),We=Ie[0],Oe=Ie[1];return ve.useEffect(function(){var be=se(vt||[],Yt||[],kt);(be==null?void 0:be.index)!==void 0&&(pt==null||pt(be.index),Oe(Yt[be.index])),nt(Yt)},[Yt]),[We]}var Se=Ee(16089),we=(typeof navigator=="undefined"?"undefined":(0,me.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Pe=we,Ae=function(Yt,kt,pt,Bt){var xt=(0,ve.useRef)(!1),vt=(0,ve.useRef)(null);function nt(){clearTimeout(vt.current),xt.current=!0,vt.current=setTimeout(function(){xt.current=!1},50)}var He=(0,ve.useRef)({top:Yt,bottom:kt,left:pt,right:Bt});return He.current.top=Yt,He.current.bottom=kt,He.current.left=pt,He.current.right=Bt,function(Ie,We){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,be=Ie?We<0&&He.current.left||We>0&&He.current.right:We<0&&He.current.top||We>0&&He.current.bottom;return Oe&&be?(clearTimeout(vt.current),xt.current=!1):(!be||xt.current)&&nt(),!xt.current&&be}};function De(Yt,kt,pt,Bt,xt,vt,nt){var He=(0,ve.useRef)(0),Ie=(0,ve.useRef)(null),We=(0,ve.useRef)(null),Oe=(0,ve.useRef)(!1),be=Ae(kt,pt,Bt,xt);function Ne(pn,ln){if(Se.Z.cancel(Ie.current),!be(!1,ln)){var gn=pn;if(!gn._virtualHandled)gn._virtualHandled=!0;else return;He.current+=ln,We.current=ln,Pe||gn.preventDefault(),Ie.current=(0,Se.Z)(function(){var Hn=Oe.current?10:1;nt(He.current*Hn,!1),He.current=0})}}function $e(pn,ln){nt(ln,!0),Pe||pn.preventDefault()}var dt=(0,ve.useRef)(null),Je=(0,ve.useRef)(null);function At(pn){if(Yt){Se.Z.cancel(Je.current),Je.current=(0,Se.Z)(function(){dt.current=null},2);var ln=pn.deltaX,gn=pn.deltaY,Hn=pn.shiftKey,An=ln,qn=gn;(dt.current==="sx"||!dt.current&&Hn&&gn&&!ln)&&(An=gn,qn=0,dt.current="sx");var ai=Math.abs(An),Ti=Math.abs(qn);dt.current===null&&(dt.current=vt&&ai>Ti?"x":"y"),dt.current==="y"?Ne(pn,qn):$e(pn,An)}}function tn(pn){Yt&&(Oe.current=pn.detail===We.current)}return[At,tn]}function ze(Yt,kt,pt,Bt){var xt=ve.useMemo(function(){return[new Map,[]]},[Yt,pt.id,Bt]),vt=(0,Ce.Z)(xt,2),nt=vt[0],He=vt[1],Ie=function(Oe){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oe,Ne=nt.get(Oe),$e=nt.get(be);if(Ne===void 0||$e===void 0)for(var dt=Yt.length,Je=He.length;Je<dt;Je+=1){var At,tn=Yt[Je],pn=kt(tn);nt.set(pn,Je);var ln=(At=pt.get(pn))!==null&&At!==void 0?At:Bt;if(He[Je]=(He[Je-1]||0)+ln,pn===Oe&&(Ne=Je),pn===be&&($e=Je),Ne!==void 0&&$e!==void 0)break}return{top:He[Ne-1]||0,bottom:He[$e]}};return Ie}var Ze=Ee(96949),Xe=Ee(55090),Ge=function(){function Yt(){(0,Ze.Z)(this,Yt),(0,ke.Z)(this,"maps",void 0),(0,ke.Z)(this,"id",0),(0,ke.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Xe.Z)(Yt,[{key:"set",value:function(pt,Bt){this.maps[pt]=Bt,this.id+=1,this.diffKeys.add(pt)}},{key:"get",value:function(pt){return this.maps[pt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Yt}(),ft=Ge;function at(Yt){var kt=parseFloat(Yt);return isNaN(kt)?0:kt}function Ct(Yt,kt,pt){var Bt=ve.useState(0),xt=(0,Ce.Z)(Bt,2),vt=xt[0],nt=xt[1],He=(0,ve.useRef)(new Map),Ie=(0,ve.useRef)(new ft),We=(0,ve.useRef)(0);function Oe(){We.current+=1}function be(){var $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Oe();var dt=function(){var tn=!1;He.current.forEach(function(pn,ln){if(pn&&pn.offsetParent){var gn=pn.offsetHeight,Hn=getComputedStyle(pn),An=Hn.marginTop,qn=Hn.marginBottom,ai=at(An),Ti=at(qn),Ci=gn+ai+Ti;Ie.current.get(ln)!==Ci&&(Ie.current.set(ln,Ci),tn=!0)}}),tn&&nt(function(pn){return pn+1})};if($e)dt();else{We.current+=1;var Je=We.current;Promise.resolve().then(function(){Je===We.current&&dt()})}}function Ne($e,dt){var Je=Yt($e),At=He.current.get(Je);dt?(He.current.set(Je,dt),be()):He.current.delete(Je),!At!=!dt&&(dt?kt==null||kt($e):pt==null||pt($e))}return(0,ve.useEffect)(function(){return Oe},[]),[Ne,be,Ie.current,vt]}var et=14/15;function yt(Yt,kt,pt){var Bt=(0,ve.useRef)(!1),xt=(0,ve.useRef)(0),vt=(0,ve.useRef)(0),nt=(0,ve.useRef)(null),He=(0,ve.useRef)(null),Ie,We=function($e){if(Bt.current){var dt=Math.ceil($e.touches[0].pageX),Je=Math.ceil($e.touches[0].pageY),At=xt.current-dt,tn=vt.current-Je,pn=Math.abs(At)>Math.abs(tn);pn?xt.current=dt:vt.current=Je;var ln=pt(pn,pn?At:tn,!1,$e);ln&&$e.preventDefault(),clearInterval(He.current),ln&&(He.current=setInterval(function(){pn?At*=et:tn*=et;var gn=Math.floor(pn?At:tn);(!pt(pn,gn,!0)||Math.abs(gn)<=.1)&&clearInterval(He.current)},16))}},Oe=function(){Bt.current=!1,Ie()},be=function($e){Ie(),$e.touches.length===1&&!Bt.current&&(Bt.current=!0,xt.current=Math.ceil($e.touches[0].pageX),vt.current=Math.ceil($e.touches[0].pageY),nt.current=$e.target,nt.current.addEventListener("touchmove",We,{passive:!1}),nt.current.addEventListener("touchend",Oe,{passive:!0}))};Ie=function(){nt.current&&(nt.current.removeEventListener("touchmove",We),nt.current.removeEventListener("touchend",Oe))},(0,le.Z)(function(){return Yt&&kt.current.addEventListener("touchstart",be,{passive:!0}),function(){var Ne;(Ne=kt.current)===null||Ne===void 0||Ne.removeEventListener("touchstart",be),Ie(),clearInterval(He.current)}},[Yt])}function st(Yt){return Math.floor(Math.pow(Yt,.5))}function zt(Yt,kt){var pt="touches"in Yt?Yt.touches[0]:Yt;return pt[kt?"pageX":"pageY"]-window[kt?"scrollX":"scrollY"]}function lt(Yt,kt,pt){ve.useEffect(function(){var Bt=kt.current;if(Yt&&Bt){var xt=!1,vt,nt,He=function(){Se.Z.cancel(vt)},Ie=function Ne(){He(),vt=(0,Se.Z)(function(){pt(nt),Ne()})},We=function($e){if(!($e.target.draggable||$e.button!==0)){var dt=$e;dt._virtualHandled||(dt._virtualHandled=!0,xt=!0)}},Oe=function(){xt=!1,He()},be=function($e){if(xt){var dt=zt($e,!1),Je=Bt.getBoundingClientRect(),At=Je.top,tn=Je.bottom;if(dt<=At){var pn=At-dt;nt=-st(pn),Ie()}else if(dt>=tn){var ln=dt-tn;nt=st(ln),Ie()}else He()}};return Bt.addEventListener("mousedown",We),Bt.ownerDocument.addEventListener("mouseup",Oe),Bt.ownerDocument.addEventListener("mousemove",be),function(){Bt.removeEventListener("mousedown",We),Bt.ownerDocument.removeEventListener("mouseup",Oe),Bt.ownerDocument.removeEventListener("mousemove",be),He()}}},[Yt])}var tt=10;function ut(Yt,kt,pt,Bt,xt,vt,nt,He){var Ie=ve.useRef(),We=ve.useState(null),Oe=(0,Ce.Z)(We,2),be=Oe[0],Ne=Oe[1];return(0,le.Z)(function(){if(be&&be.times<tt){if(!Yt.current){Ne(function(Zi){return(0,Be.Z)({},Zi)});return}vt();var $e=be.targetAlign,dt=be.originAlign,Je=be.index,At=be.offset,tn=Yt.current.clientHeight,pn=!1,ln=$e,gn=null;if(tn){for(var Hn=$e||dt,An=0,qn=0,ai=0,Ti=Math.min(kt.length-1,Je),Ci=0;Ci<=Ti;Ci+=1){var $i=xt(kt[Ci]);qn=An;var or=pt.get($i);ai=qn+(or===void 0?Bt:or),An=ai}for(var lr=Hn==="top"?At:tn-At,qi=Ti;qi>=0;qi-=1){var Fr=xt(kt[qi]),Mr=pt.get(Fr);if(Mr===void 0){pn=!0;break}if(lr-=Mr,lr<=0)break}switch(Hn){case"top":gn=qn-At;break;case"bottom":gn=ai-tn+At;break;default:{var yi=Yt.current.scrollTop,dr=yi+tn;qn<yi?ln="top":ai>dr&&(ln="bottom")}}gn!==null&&nt(gn),gn!==be.lastTop&&(pn=!0)}pn&&Ne((0,Be.Z)((0,Be.Z)({},be),{},{times:be.times+1,targetAlign:ln,lastTop:gn}))}},[be,Yt.current]),function($e){if($e==null){He();return}if(Se.Z.cancel(Ie.current),typeof $e=="number")nt($e);else if($e&&(0,me.Z)($e)==="object"){var dt,Je=$e.align;"index"in $e?dt=$e.index:dt=kt.findIndex(function(pn){return xt(pn)===$e.key});var At=$e.offset,tn=At===void 0?0:At;Ne({times:0,index:dt,offset:tn,originAlign:Je})}}}var mt=ve.forwardRef(function(Yt,kt){var pt=Yt.prefixCls,Bt=Yt.rtl,xt=Yt.scrollOffset,vt=Yt.scrollRange,nt=Yt.onStartMove,He=Yt.onStopMove,Ie=Yt.onScroll,We=Yt.horizontal,Oe=Yt.spinSize,be=Yt.containerSize,Ne=Yt.style,$e=Yt.thumbStyle,dt=Yt.showScrollBar,Je=ve.useState(!1),At=(0,Ce.Z)(Je,2),tn=At[0],pn=At[1],ln=ve.useState(null),gn=(0,Ce.Z)(ln,2),Hn=gn[0],An=gn[1],qn=ve.useState(null),ai=(0,Ce.Z)(qn,2),Ti=ai[0],Ci=ai[1],$i=!Bt,or=ve.useRef(),lr=ve.useRef(),qi=ve.useState(dt),Fr=(0,Ce.Z)(qi,2),Mr=Fr[0],yi=Fr[1],dr=ve.useRef(),Zi=function(){dt===!0||dt===!1||(clearTimeout(dr.current),yi(!0),dr.current=setTimeout(function(){yi(!1)},3e3))},rt=vt-be||0,Ir=be-Oe||0,Ar=ve.useMemo(function(){if(xt===0||rt===0)return 0;var Ye=xt/rt;return Ye*Ir},[xt,rt,Ir]),$r=function(St){St.stopPropagation(),St.preventDefault()},co=ve.useRef({top:Ar,dragging:tn,pageY:Hn,startTop:Ti});co.current={top:Ar,dragging:tn,pageY:Hn,startTop:Ti};var mo=function(St){pn(!0),An(zt(St,We)),Ci(co.current.top),nt(),St.stopPropagation(),St.preventDefault()};ve.useEffect(function(){var Ye=function(_t){_t.preventDefault()},St=or.current,Ot=lr.current;return St.addEventListener("touchstart",Ye,{passive:!1}),Ot.addEventListener("touchstart",mo,{passive:!1}),function(){St.removeEventListener("touchstart",Ye),Ot.removeEventListener("touchstart",mo)}},[]);var no=ve.useRef();no.current=rt;var lo=ve.useRef();lo.current=Ir,ve.useEffect(function(){if(tn){var Ye,St=function(_t){var dn=co.current,Pn=dn.dragging,mn=dn.pageY,sn=dn.startTop;Se.Z.cancel(Ye);var Nt=or.current.getBoundingClientRect(),un=be/(We?Nt.width:Nt.height);if(Pn){var Ln=(zt(_t,We)-mn)*un,Dn=sn;!$i&&We?Dn-=Ln:Dn+=Ln;var $t=no.current,rn=lo.current,jn=rn?Dn/rn:0,On=Math.ceil(jn*$t);On=Math.max(On,0),On=Math.min(On,$t),Ye=(0,Se.Z)(function(){Ie(On,We)})}},Ot=function(){pn(!1),He()};return window.addEventListener("mousemove",St,{passive:!0}),window.addEventListener("touchmove",St,{passive:!0}),window.addEventListener("mouseup",Ot,{passive:!0}),window.addEventListener("touchend",Ot,{passive:!0}),function(){window.removeEventListener("mousemove",St),window.removeEventListener("touchmove",St),window.removeEventListener("mouseup",Ot),window.removeEventListener("touchend",Ot),Se.Z.cancel(Ye)}}},[tn]),ve.useEffect(function(){return Zi(),function(){clearTimeout(dr.current)}},[xt]),ve.useImperativeHandle(kt,function(){return{delayHidden:Zi}});var ri="".concat(pt,"-scrollbar"),Ke={position:"absolute",visibility:Mr?null:"hidden"},qe={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return We?(Ke.height=8,Ke.left=0,Ke.right=0,Ke.bottom=0,qe.height="100%",qe.width=Oe,$i?qe.left=Ar:qe.right=Ar):(Ke.width=8,Ke.top=0,Ke.bottom=0,$i?Ke.right=0:Ke.left=0,qe.width="100%",qe.height=Oe,qe.top=Ar),ve.createElement("div",{ref:or,className:ye()(ri,(0,ke.Z)((0,ke.Z)((0,ke.Z)({},"".concat(ri,"-horizontal"),We),"".concat(ri,"-vertical"),!We),"".concat(ri,"-visible"),Mr)),style:(0,Be.Z)((0,Be.Z)({},Ke),Ne),onMouseDown:$r,onMouseMove:Zi},ve.createElement("div",{ref:lr,className:ye()("".concat(ri,"-thumb"),(0,ke.Z)({},"".concat(ri,"-thumb-moving"),tn)),style:(0,Be.Z)((0,Be.Z)({},qe),$e),onMouseDown:mo}))}),Pt=mt,gt=20;function Ft(){var Yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,pt=Yt/kt*Yt;return isNaN(pt)&&(pt=0),pt=Math.max(pt,gt),Math.floor(pt)}var Ht=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],hn=[],Qt={overflowY:"auto",overflowAnchor:"none"};function bn(Yt,kt){var pt=Yt.prefixCls,Bt=pt===void 0?"rc-virtual-list":pt,xt=Yt.className,vt=Yt.height,nt=Yt.itemHeight,He=Yt.fullHeight,Ie=He===void 0?!0:He,We=Yt.style,Oe=Yt.data,be=Yt.children,Ne=Yt.itemKey,$e=Yt.virtual,dt=Yt.direction,Je=Yt.scrollWidth,At=Yt.component,tn=At===void 0?"div":At,pn=Yt.onScroll,ln=Yt.onVirtualScroll,gn=Yt.onVisibleChange,Hn=Yt.innerProps,An=Yt.extraRender,qn=Yt.styles,ai=Yt.showScrollBar,Ti=ai===void 0?"optional":ai,Ci=(0,Le.Z)(Yt,Ht),$i=ve.useCallback(function(_r){return typeof Ne=="function"?Ne(_r):_r==null?void 0:_r[Ne]},[Ne]),or=Ct($i,null,null),lr=(0,Ce.Z)(or,4),qi=lr[0],Fr=lr[1],Mr=lr[2],yi=lr[3],dr=!!($e!==!1&&vt&&nt),Zi=ve.useMemo(function(){return Object.values(Mr.maps).reduce(function(_r,fr){return _r+fr},0)},[Mr.id,Mr.maps]),rt=dr&&Oe&&(Math.max(nt*Oe.length,Zi)>vt||!!Je),Ir=dt==="rtl",Ar=ye()(Bt,(0,ke.Z)({},"".concat(Bt,"-rtl"),Ir),xt),$r=Oe||hn,co=(0,ve.useRef)(),mo=(0,ve.useRef)(),no=(0,ve.useRef)(),lo=(0,ve.useState)(0),ri=(0,Ce.Z)(lo,2),Ke=ri[0],qe=ri[1],Ye=(0,ve.useState)(0),St=(0,Ce.Z)(Ye,2),Ot=St[0],Tt=St[1],_t=(0,ve.useState)(!1),dn=(0,Ce.Z)(_t,2),Pn=dn[0],mn=dn[1],sn=function(){mn(!0)},Nt=function(){mn(!1)},un={getKey:$i};function Ln(_r){qe(function(fr){var Kr;typeof _r=="function"?Kr=_r(fr):Kr=_r;var pr=Oi(Kr);return co.current.scrollTop=pr,pr})}var Dn=(0,ve.useRef)({start:0,end:$r.length}),$t=(0,ve.useRef)(),rn=ue($r,$i),jn=(0,Ce.Z)(rn,1),On=jn[0];$t.current=On;var ei=ve.useMemo(function(){if(!dr)return{scrollHeight:void 0,start:0,end:$r.length-1,offset:void 0};if(!rt){var _r;return{scrollHeight:((_r=mo.current)===null||_r===void 0?void 0:_r.offsetHeight)||0,start:0,end:$r.length-1,offset:void 0}}for(var fr=0,Kr,pr,eo,Yo=$r.length,sr=0;sr<Yo;sr+=1){var Ki=$r[sr],Xn=$i(Ki),ar=Mr.get(Xn),to=fr+(ar===void 0?nt:ar);to>=Ke&&Kr===void 0&&(Kr=sr,pr=fr),to>Ke+vt&&eo===void 0&&(eo=sr),fr=to}return Kr===void 0&&(Kr=0,pr=0,eo=Math.ceil(vt/nt)),eo===void 0&&(eo=$r.length-1),eo=Math.min(eo+1,$r.length-1),{scrollHeight:fr,start:Kr,end:eo,offset:pr}},[rt,dr,Ke,$r,yi,vt]),Gn=ei.scrollHeight,ti=ei.start,Bn=ei.end,li=ei.offset;Dn.current.start=ti,Dn.current.end=Bn,ve.useLayoutEffect(function(){var _r=Mr.getRecord();if(_r.size===1){var fr=Array.from(_r)[0],Kr=$r[ti];if(Kr){var pr=$i(Kr);if(pr===fr){var eo=Mr.get(fr),Yo=eo-nt;Ln(function(sr){return sr+Yo})}}}Mr.resetRecord()},[Gn]);var Di=ve.useState({width:0,height:vt}),Ri=(0,Ce.Z)(Di,2),Mn=Ri[0],Xi=Ri[1],Nr=function(fr){Xi({width:fr.offsetWidth,height:fr.offsetHeight})},zi=(0,ve.useRef)(),En=(0,ve.useRef)(),Jn=ve.useMemo(function(){return Ft(Mn.width,Je)},[Mn.width,Je]),fi=ve.useMemo(function(){return Ft(Mn.height,Gn)},[Mn.height,Gn]),Si=Gn-vt,hi=(0,ve.useRef)(Si);hi.current=Si;function Oi(_r){var fr=_r;return Number.isNaN(hi.current)||(fr=Math.min(fr,hi.current)),fr=Math.max(fr,0),fr}var tr=Ke<=0,Fi=Ke>=Si,Hi=Ot<=0,mr=Ot>=Je,Rn=Ae(tr,Fi,Hi,mr),Br=function(){return{x:Ir?-Ot:Ot,y:Ke}},Nn=(0,ve.useRef)(Br()),vr=(0,ge.useEvent)(function(_r){if(ln){var fr=(0,Be.Z)((0,Be.Z)({},Br()),_r);(Nn.current.x!==fr.x||Nn.current.y!==fr.y)&&(ln(fr),Nn.current=fr)}});function So(_r,fr){var Kr=_r;fr?((0,de.flushSync)(function(){Tt(Kr)}),vr()):Ln(Kr)}function Dr(_r){var fr=_r.currentTarget.scrollTop;fr!==Ke&&Ln(fr),pn==null||pn(_r),vr()}var Co=function(fr){var Kr=fr,pr=Je?Je-Mn.width:0;return Kr=Math.max(Kr,0),Kr=Math.min(Kr,pr),Kr},ho=(0,ge.useEvent)(function(_r,fr){fr?((0,de.flushSync)(function(){Tt(function(Kr){var pr=Kr+(Ir?-_r:_r);return Co(pr)})}),vr()):Ln(function(Kr){var pr=Kr+_r;return pr})}),Yi=De(dr,tr,Fi,Hi,mr,!!Je,ho),Ui=(0,Ce.Z)(Yi,2),hr=Ui[0],Pr=Ui[1];yt(dr,co,function(_r,fr,Kr,pr){var eo=pr;return Rn(_r,fr,Kr)?!1:!eo||!eo._virtualHandled?(eo&&(eo._virtualHandled=!0),hr({preventDefault:function(){},deltaX:_r?fr:0,deltaY:_r?0:fr}),!0):!1}),lt(rt,co,function(_r){Ln(function(fr){return fr+_r})}),(0,le.Z)(function(){function _r(Kr){var pr=tr&&Kr.detail<0,eo=Fi&&Kr.detail>0;dr&&!pr&&!eo&&Kr.preventDefault()}var fr=co.current;return fr.addEventListener("wheel",hr,{passive:!1}),fr.addEventListener("DOMMouseScroll",Pr,{passive:!0}),fr.addEventListener("MozMousePixelScroll",_r,{passive:!1}),function(){fr.removeEventListener("wheel",hr),fr.removeEventListener("DOMMouseScroll",Pr),fr.removeEventListener("MozMousePixelScroll",_r)}},[dr,tr,Fi]),(0,le.Z)(function(){if(Je){var _r=Co(Ot);Tt(_r),vr({x:_r})}},[Mn.width,Je]);var ci=function(){var fr,Kr;(fr=zi.current)===null||fr===void 0||fr.delayHidden(),(Kr=En.current)===null||Kr===void 0||Kr.delayHidden()},Mt=ut(co,$r,Mr,nt,$i,function(){return Fr(!0)},Ln,ci);ve.useImperativeHandle(kt,function(){return{nativeElement:no.current,getScrollInfo:Br,scrollTo:function(fr){function Kr(pr){return pr&&(0,me.Z)(pr)==="object"&&("left"in pr||"top"in pr)}Kr(fr)?(fr.left!==void 0&&Tt(Co(fr.left)),Mt(fr.top)):Mt(fr)}}}),(0,le.Z)(function(){if(gn){var _r=$r.slice(ti,Bn+1);gn(_r,$r)}},[ti,Bn,$r]);var Ur=ze($r,$i,Mr,nt),Hr=An==null?void 0:An({start:ti,end:Bn,virtual:rt,offsetX:Ot,offsetY:li,rtl:Ir,getSize:Ur}),ts=oe($r,ti,Bn,Je,Ot,qi,be,un),Ao=null;vt&&(Ao=(0,Be.Z)((0,ke.Z)({},Ie?"height":"maxHeight",vt),Qt),dr&&(Ao.overflowY="hidden",Je&&(Ao.overflowX="hidden"),Pn&&(Ao.pointerEvents="none")));var ss={};return Ir&&(ss.dir="rtl"),ve.createElement("div",(0,Me.Z)({ref:no,style:(0,Be.Z)((0,Be.Z)({},We),{},{position:"relative"}),className:Ar},ss,Ci),ve.createElement(xe.Z,{onResize:Nr},ve.createElement(tn,{className:"".concat(Bt,"-holder"),style:Ao,ref:co,onScroll:Dr,onMouseEnter:ci},ve.createElement(z,{prefixCls:Bt,height:Gn,offsetX:Ot,offsetY:li,scrollWidth:Je,onInnerResize:Fr,ref:mo,innerProps:Hn,rtl:Ir,extra:Hr},ts))),rt&&Gn>vt&&ve.createElement(Pt,{ref:zi,prefixCls:Bt,scrollOffset:Ke,scrollRange:Gn,rtl:Ir,onScroll:So,onStartMove:sn,onStopMove:Nt,spinSize:fi,containerSize:Mn.height,style:qn==null?void 0:qn.verticalScrollBar,thumbStyle:qn==null?void 0:qn.verticalScrollBarThumb,showScrollBar:Ti}),rt&&Je>Mn.width&&ve.createElement(Pt,{ref:En,prefixCls:Bt,scrollOffset:Ot,scrollRange:Je,rtl:Ir,onScroll:So,onStartMove:sn,onStopMove:Nt,spinSize:Jn,containerSize:Mn.width,horizontal:!0,style:qn==null?void 0:qn.horizontalScrollBar,thumbStyle:qn==null?void 0:qn.horizontalScrollBarThumb,showScrollBar:Ti}))}var Wt=ve.forwardRef(bn);Wt.displayName="List";var Kt=Wt,Jt=Kt},7062:function(_n,en,Ee){var Me=Ee(19637),me=Ee(97573),Be=[Ee(96627)];_n.exports=Me.createStore(me,Be)},96627:function(_n,en,Ee){_n.exports=Me;function Me(){return Ee(42424),{}}},42424: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(_n){return _n<10?"0"+_n:_n}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(_n){return rx_escapable.lastIndex=0,rx_escapable.test(_n)?'"'+_n.replace(rx_escapable,function(en){var Ee=meta[en];return typeof Ee=="string"?Ee:"\\u"+("0000"+en.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+_n+'"'}function str(_n,en){var Ee,Me,me,Be,ke=gap,Ce,Le=en[_n];switch(Le&&typeof Le=="object"&&typeof Le.toJSON=="function"&&(Le=Le.toJSON(_n)),typeof rep=="function"&&(Le=rep.call(en,_n,Le)),typeof Le){case"string":return quote(Le);case"number":return isFinite(Le)?String(Le):"null";case"boolean":case"null":return String(Le);case"object":if(!Le)return"null";if(gap+=indent,Ce=[],Object.prototype.toString.apply(Le)==="[object Array]"){for(Be=Le.length,Ee=0;Ee<Be;Ee+=1)Ce[Ee]=str(Ee,Le)||"null";return me=Ce.length===0?"[]":gap?`[
|
|
|
`+gap+Ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+ke+"]":"["+Ce.join(",")+"]",gap=ke,me}if(rep&&typeof rep=="object")for(Be=rep.length,Ee=0;Ee<Be;Ee+=1)typeof rep[Ee]=="string"&&(Me=rep[Ee],me=str(Me,Le),me&&Ce.push(quote(Me)+(gap?": ":":")+me));else for(Me in Le)Object.prototype.hasOwnProperty.call(Le,Me)&&(me=str(Me,Le),me&&Ce.push(quote(Me)+(gap?": ":":")+me));return me=Ce.length===0?"{}":gap?`{
|
|
|
`+gap+Ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+ke+"}":"{"+Ce.join(",")+"}",gap=ke,me}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(_n,en,Ee){var Me;if(gap="",indent="",typeof Ee=="number")for(Me=0;Me<Ee;Me+=1)indent+=" ";else typeof Ee=="string"&&(indent=Ee);if(rep=en,en&&typeof en!="function"&&(typeof en!="object"||typeof en.length!="number"))throw new Error("JSON.stringify");return str("",{"":_n})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(_n,en){var Ee,Me,me=_n[en];if(me&&typeof me=="object")for(Ee in me)Object.prototype.hasOwnProperty.call(me,Ee)&&(Me=walk(me,Ee),Me!==void 0?me[Ee]=Me:delete me[Ee]);return reviver.call(_n,en,me)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(_n){return"\\u"+("0000"+_n.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")})}()},19637:function(_n,en,Ee){var Me=Ee(67039),me=Me.slice,Be=Me.pluck,ke=Me.each,Ce=Me.bind,Le=Me.create,he=Me.isList,ye=Me.isFunction,xe=Me.isObject;_n.exports={createStore:ve};var ge={version:"2.0.12",enabled:!1,get:function(de,ce){var z=this.storage.read(this._namespacePrefix+de);return this._deserialize(z,ce)},set:function(de,ce){return ce===void 0?this.remove(de):(this.storage.write(this._namespacePrefix+de,this._serialize(ce)),ce)},remove:function(de){this.storage.remove(this._namespacePrefix+de)},each:function(de){var ce=this;this.storage.each(function(z,ee){de.call(ce,ce._deserialize(z),(ee||"").replace(ce._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(de){return this._namespacePrefix=="__storejs_"+de+"_"},createStore:function(){return ve.apply(this,arguments)},addPlugin:function(de){this._addPlugin(de)},namespace:function(de){return ve(this.storage,this.plugins,de)}};function le(){var de=typeof console=="undefined"?null:console;if(de){var ce=de.warn?de.warn:de.log;ce.apply(de,arguments)}}function ve(de,ce,z){z||(z=""),de&&!he(de)&&(de=[de]),ce&&!he(ce)&&(ce=[ce]);var ee=z?"__storejs_"+z+"_":"",oe=z?new RegExp("^"+ee):null,ie=/^[a-zA-Z0-9_\-]*$/;if(!ie.test(z))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var se={_namespacePrefix:ee,_namespaceRegexp:oe,_testStorage:function(Se){try{var we="__storejs__test__";Se.write(we,we);var Pe=Se.read(we)===we;return Se.remove(we),Pe}catch(Ae){return!1}},_assignPluginFnProp:function(Se,we){var Pe=this[we];this[we]=function(){var De=me(arguments,0),ze=this;function Ze(){if(Pe)return ke(arguments,function(Ge,ft){De[ft]=Ge}),Pe.apply(ze,De)}var Xe=[Ze].concat(De);return Se.apply(ze,Xe)}},_serialize:function(Se){return JSON.stringify(Se)},_deserialize:function(Se,we){if(!Se)return we;var Pe="";try{Pe=JSON.parse(Se)}catch(Ae){Pe=Se}return Pe!==void 0?Pe:we},_addStorage:function(Se){this.enabled||this._testStorage(Se)&&(this.storage=Se,this.enabled=!0)},_addPlugin:function(Se){var we=this;if(he(Se)){ke(Se,function(De){we._addPlugin(De)});return}var Pe=Be(this.plugins,function(De){return Se===De});if(!Pe){if(this.plugins.push(Se),!ye(Se))throw new Error("Plugins must be function values that return objects");var Ae=Se.call(this);if(!xe(Ae))throw new Error("Plugins must return an object of function properties");ke(Ae,function(De,ze){if(!ye(De))throw new Error("Bad plugin property: "+ze+" from plugin "+Se.name+". Plugins should only return functions.");we._assignPluginFnProp(De,ze)})}},addStorage:function(Se){le("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(Se)}},ue=Le(se,ge,{plugins:[]});return ue.raw={},ke(ue,function(Se,we){ye(Se)&&(ue.raw[we]=Ce(ue,Se))}),ke(de,function(Se){ue._addStorage(Se)}),ke(ce,function(Se){ue._addPlugin(Se)}),ue}},67039:function(_n,en,Ee){var Me=Ce(),me=Le(),Be=he(),ke=typeof window!="undefined"?window:Ee.g;_n.exports={assign:Me,create:me,trim:Be,bind:ye,slice:xe,each:ge,map:le,pluck:ve,isList:de,isFunction:ce,isObject:z,Global:ke};function Ce(){return Object.assign?Object.assign:function(oe,ie,se,ue){for(var Se=1;Se<arguments.length;Se++)ge(Object(arguments[Se]),function(we,Pe){oe[Pe]=we});return oe}}function Le(){if(Object.create)return function(ie,se,ue,Se){var we=xe(arguments,1);return Me.apply(this,[Object.create(ie)].concat(we))};{let oe=function(){};var ee=oe;return function(se,ue,Se,we){var Pe=xe(arguments,1);return oe.prototype=se,Me.apply(this,[new oe].concat(Pe))}}}function he(){return String.prototype.trim?function(oe){return String.prototype.trim.call(oe)}:function(oe){return oe.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function ye(ee,oe){return function(){return oe.apply(ee,Array.prototype.slice.call(arguments,0))}}function xe(ee,oe){return Array.prototype.slice.call(ee,oe||0)}function ge(ee,oe){ve(ee,function(ie,se){return oe(ie,se),!1})}function le(ee,oe){var ie=de(ee)?[]:{};return ve(ee,function(se,ue){return ie[ue]=oe(se,ue),!1}),ie}function ve(ee,oe){if(de(ee)){for(var ie=0;ie<ee.length;ie++)if(oe(ee[ie],ie))return ee[ie]}else for(var se in ee)if(ee.hasOwnProperty(se)&&oe(ee[se],se))return ee[se]}function de(ee){return ee!=null&&typeof ee!="function"&&typeof ee.length=="number"}function ce(ee){return ee&&{}.toString.call(ee)==="[object Function]"}function z(ee){return ee&&{}.toString.call(ee)==="[object Object]"}},97573:function(_n,en,Ee){_n.exports=[Ee(52496),Ee(16436),Ee(76673),Ee(35701),Ee(65578),Ee(65300)]},35701:function(_n,en,Ee){var Me=Ee(67039),me=Me.Global,Be=Me.trim;_n.exports={name:"cookieStorage",read:Ce,write:he,each:Le,remove:ye,clearAll:xe};var ke=me.document;function Ce(le){if(!le||!ge(le))return null;var ve="(?:^|.*;\\s*)"+escape(le).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(ke.cookie.replace(new RegExp(ve),"$1"))}function Le(le){for(var ve=ke.cookie.split(/; ?/g),de=ve.length-1;de>=0;de--)if(Be(ve[de])){var ce=ve[de].split("="),z=unescape(ce[0]),ee=unescape(ce[1]);le(ee,z)}}function he(le,ve){le&&(ke.cookie=escape(le)+"="+escape(ve)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ye(le){!le||!ge(le)||(ke.cookie=escape(le)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function xe(){Le(function(le,ve){ye(ve)})}function ge(le){return new RegExp("(?:^|;\\s*)"+escape(le).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(ke.cookie)}},52496:function(_n,en,Ee){var Me=Ee(67039),me=Me.Global;_n.exports={name:"localStorage",read:ke,write:Ce,each:Le,remove:he,clearAll:ye};function Be(){return me.localStorage}function ke(xe){return Be().getItem(xe)}function Ce(xe,ge){return Be().setItem(xe,ge)}function Le(xe){for(var ge=Be().length-1;ge>=0;ge--){var le=Be().key(ge);xe(ke(le),le)}}function he(xe){return Be().removeItem(xe)}function ye(){return Be().clear()}},65300:function(_n){_n.exports={name:"memoryStorage",read:Ee,write:Me,each:me,remove:Be,clearAll:ke};var en={};function Ee(Ce){return en[Ce]}function Me(Ce,Le){en[Ce]=Le}function me(Ce){for(var Le in en)en.hasOwnProperty(Le)&&Ce(en[Le],Le)}function Be(Ce){delete en[Ce]}function ke(Ce){en={}}},16436:function(_n,en,Ee){var Me=Ee(67039),me=Me.Global;_n.exports={name:"oldFF-globalStorage",read:ke,write:Ce,each:Le,remove:he,clearAll:ye};var Be=me.globalStorage;function ke(xe){return Be[xe]}function Ce(xe,ge){Be[xe]=ge}function Le(xe){for(var ge=Be.length-1;ge>=0;ge--){var le=Be.key(ge);xe(Be[le],le)}}function he(xe){return Be.removeItem(xe)}function ye(){Le(function(xe,ge){delete Be[xe]})}},76673:function(_n,en,Ee){var Me=Ee(67039),me=Me.Global;_n.exports={name:"oldIE-userDataStorage",write:he,read:ye,each:xe,remove:ge,clearAll:le};var Be="storejs",ke=me.document,Ce=ce(),Le=(me.navigator?me.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function he(z,ee){if(!Le){var oe=de(z);Ce(function(ie){ie.setAttribute(oe,ee),ie.save(Be)})}}function ye(z){if(!Le){var ee=de(z),oe=null;return Ce(function(ie){oe=ie.getAttribute(ee)}),oe}}function xe(z){Ce(function(ee){for(var oe=ee.XMLDocument.documentElement.attributes,ie=oe.length-1;ie>=0;ie--){var se=oe[ie];z(ee.getAttribute(se.name),se.name)}})}function ge(z){var ee=de(z);Ce(function(oe){oe.removeAttribute(ee),oe.save(Be)})}function le(){Ce(function(z){var ee=z.XMLDocument.documentElement.attributes;z.load(Be);for(var oe=ee.length-1;oe>=0;oe--)z.removeAttribute(ee[oe].name);z.save(Be)})}var ve=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function de(z){return z.replace(/^\d/,"___$&").replace(ve,"___")}function ce(){if(!ke||!ke.documentElement||!ke.documentElement.addBehavior)return null;var z="script",ee,oe,ie;try{oe=new ActiveXObject("htmlfile"),oe.open(),oe.write("<"+z+">document.w=window</"+z+'><iframe src="/favicon.ico"></iframe>'),oe.close(),ee=oe.w.frames[0].document,ie=ee.createElement("div")}catch(se){ie=ke.createElement("div"),ee=ke.body}return function(se){var ue=[].slice.call(arguments,0);ue.unshift(ie),ee.appendChild(ie),ie.addBehavior("#default#userData"),ie.load(Be),se.apply(this,ue),ee.removeChild(ie)}}},65578:function(_n,en,Ee){var Me=Ee(67039),me=Me.Global;_n.exports={name:"sessionStorage",read:ke,write:Ce,each:Le,remove:he,clearAll:ye};function Be(){return me.sessionStorage}function ke(xe){return Be().getItem(xe)}function Ce(xe,ge){return Be().setItem(xe,ge)}function Le(xe){for(var ge=Be().length-1;ge>=0;ge--){var le=Be().key(ge);xe(ke(le),le)}}function he(xe){return Be().removeItem(xe)}function ye(){return Be().clear()}},82059:function(_n){var en=arguments[3],Ee=arguments[4],Me=arguments[5],me=JSON.stringify;_n.exports=function(Be,ke){for(var Ce,Le=Object.keys(Me),he=0,ye=Le.length;he<ye;he++){var xe=Le[he],ge=Me[xe].exports;if(ge===Be||ge&&ge.default===Be){Ce=xe;break}}if(!Ce){Ce=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var le={},he=0,ye=Le.length;he<ye;he++){var xe=Le[he];le[xe]=xe}Ee[Ce]=["function(require,module,exports){"+Be+"(self); }",le]}var ve=Math.floor(Math.pow(16,8)*Math.random()).toString(16),de={};de[Ce]=Ce,Ee[ve]=["function(require,module,exports){var f = require("+me(Ce)+");(f.default ? f.default : f)(self);}",de];var ce={};z(ve);function z(Se){ce[Se]=!0;for(var we in Ee[Se][1]){var Pe=Ee[Se][1][we];ce[Pe]||z(Pe)}}var ee="("+en+")({"+Object.keys(ce).map(function(Se){return me(Se)+":["+Ee[Se][0]+","+me(Ee[Se][1])+"]"}).join(",")+"},{},["+me(ve)+"])",oe=window.URL||window.webkitURL||window.mozURL||window.msURL,ie=new Blob([ee],{type:"text/javascript"});if(ke&&ke.bare)return ie;var se=oe.createObjectURL(ie),ue=new Worker(se);return ue.objectURL=se,ue}},34376:function(_n){(function(en,Ee){if(1)_n.exports=Ee();else var Me,me})(window,function(){return function(en){var Ee={};function Me(me){if(Ee[me])return Ee[me].exports;var Be=Ee[me]={i:me,l:!1,exports:{}};return en[me].call(Be.exports,Be,Be.exports,Me),Be.l=!0,Be.exports}return Me.m=en,Me.c=Ee,Me.d=function(me,Be,ke){Me.o(me,Be)||Object.defineProperty(me,Be,{enumerable:!0,get:ke})},Me.r=function(me){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(me,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(me,"__esModule",{value:!0})},Me.t=function(me,Be){if(1&Be&&(me=Me(me)),8&Be||4&Be&&typeof me=="object"&&me&&me.__esModule)return me;var ke=Object.create(null);if(Me.r(ke),Object.defineProperty(ke,"default",{enumerable:!0,value:me}),2&Be&&typeof me!="string")for(var Ce in me)Me.d(ke,Ce,function(Le){return me[Le]}.bind(null,Ce));return ke},Me.n=function(me){var Be=me&&me.__esModule?function(){return me.default}:function(){return me};return Me.d(Be,"a",Be),Be},Me.o=function(me,Be){return Object.prototype.hasOwnProperty.call(me,Be)},Me.p="",Me(Me.s=34)}([function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.forwardEvent=Ee.EventEmitter=void 0;var me=function(){function Be(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Be.prototype,"event",{get:function(){var ke=this;return this._event||(this._event=function(Ce){return ke._listeners.push(Ce),{dispose:function(){if(!ke._disposed){for(var Le=0;Le<ke._listeners.length;Le++)if(ke._listeners[Le]===Ce)return void ke._listeners.splice(Le,1)}}}}),this._event},enumerable:!1,configurable:!0}),Be.prototype.fire=function(ke,Ce){for(var Le=[],he=0;he<this._listeners.length;he++)Le.push(this._listeners[he]);for(he=0;he<Le.length;he++)Le[he].call(void 0,ke,Ce)},Be.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Be}();Ee.EventEmitter=me,Ee.forwardEvent=function(Be,ke){return Be(function(Ce){return ke.fire(Ce)})}},function(en,Ee,Me){"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 me=Me(14);Ee.IBufferService=me.createDecorator("BufferService"),Ee.ICoreMouseService=me.createDecorator("CoreMouseService"),Ee.ICoreService=me.createDecorator("CoreService"),Ee.ICharsetService=me.createDecorator("CharsetService"),Ee.IDirtyRowService=me.createDecorator("DirtyRowService"),Ee.IInstantiationService=me.createDecorator("InstantiationService"),Ee.ILogService=me.createDecorator("LogService"),Ee.IOptionsService=me.createDecorator("OptionsService"),Ee.IUnicodeService=me.createDecorator("UnicodeService")},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getDisposeArrayDisposable=Ee.disposeArray=Ee.Disposable=void 0;var me=function(){function ke(){this._disposables=[],this._isDisposed=!1}return ke.prototype.dispose=function(){this._isDisposed=!0;for(var Ce=0,Le=this._disposables;Ce<Le.length;Ce++)Le[Ce].dispose();this._disposables.length=0},ke.prototype.register=function(Ce){return this._disposables.push(Ce),Ce},ke.prototype.unregister=function(Ce){var Le=this._disposables.indexOf(Ce);Le!==-1&&this._disposables.splice(Le,1)},ke}();function Be(ke){for(var Ce=0,Le=ke;Ce<Le.length;Ce++)Le[Ce].dispose();ke.length=0}Ee.Disposable=me,Ee.disposeArray=Be,Ee.getDisposeArrayDisposable=function(ke){return{dispose:function(){return Be(ke)}}}},function(en,Ee,Me){"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(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ye,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,le){ge.__proto__=le}||function(ge,le){for(var ve in le)le.hasOwnProperty(ve)&&(ge[ve]=le[ve])})(ye,xe)},function(ye,xe){function ge(){this.constructor=ye}me(ye,xe),ye.prototype=xe===null?Object.create(xe):(ge.prototype=xe.prototype,new ge)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CellData=void 0;var ke=Me(8),Ce=Me(3),Le=Me(6),he=function(ye){function xe(){var ge=ye!==null&&ye.apply(this,arguments)||this;return ge.content=0,ge.fg=0,ge.bg=0,ge.extended=new Le.ExtendedAttrs,ge.combinedData="",ge}return Be(xe,ye),xe.fromCharData=function(ge){var le=new xe;return le.setFromCharData(ge),le},xe.prototype.isCombined=function(){return 2097152&this.content},xe.prototype.getWidth=function(){return this.content>>22},xe.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?ke.stringFromCodePoint(2097151&this.content):""},xe.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},xe.prototype.setFromCharData=function(ge){this.fg=ge[Ce.CHAR_DATA_ATTR_INDEX],this.bg=0;var le=!1;if(ge[Ce.CHAR_DATA_CHAR_INDEX].length>2)le=!0;else if(ge[Ce.CHAR_DATA_CHAR_INDEX].length===2){var ve=ge[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=ve&&ve<=56319){var de=ge[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=de&&de<=57343?this.content=1024*(ve-55296)+de-56320+65536|ge[Ce.CHAR_DATA_WIDTH_INDEX]<<22:le=!0}else le=!0}else this.content=ge[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|ge[Ce.CHAR_DATA_WIDTH_INDEX]<<22;le&&(this.combinedData=ge[Ce.CHAR_DATA_CHAR_INDEX],this.content=2097152|ge[Ce.CHAR_DATA_WIDTH_INDEX]<<22)},xe.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},xe}(Le.AttributeData);Ee.CellData=he},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ISoundService=Ee.ISelectionService=Ee.IRenderService=Ee.IMouseService=Ee.ICoreBrowserService=Ee.ICharSizeService=void 0;var me=Me(14);Ee.ICharSizeService=me.createDecorator("CharSizeService"),Ee.ICoreBrowserService=me.createDecorator("CoreBrowserService"),Ee.IMouseService=me.createDecorator("MouseService"),Ee.IRenderService=me.createDecorator("RenderService"),Ee.ISelectionService=me.createDecorator("SelectionService"),Ee.ISoundService=me.createDecorator("SoundService")},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ExtendedAttrs=Ee.AttributeData=void 0;var me=function(){function ke(){this.fg=0,this.bg=0,this.extended=new Be}return ke.toColorRGB=function(Ce){return[Ce>>>16&255,Ce>>>8&255,255&Ce]},ke.fromColorRGB=function(Ce){return(255&Ce[0])<<16|(255&Ce[1])<<8|255&Ce[2]},ke.prototype.clone=function(){var Ce=new ke;return Ce.fg=this.fg,Ce.bg=this.bg,Ce.extended=this.extended.clone(),Ce},ke.prototype.isInverse=function(){return 67108864&this.fg},ke.prototype.isBold=function(){return 134217728&this.fg},ke.prototype.isUnderline=function(){return 268435456&this.fg},ke.prototype.isBlink=function(){return 536870912&this.fg},ke.prototype.isInvisible=function(){return 1073741824&this.fg},ke.prototype.isItalic=function(){return 67108864&this.bg},ke.prototype.isDim=function(){return 134217728&this.bg},ke.prototype.getFgColorMode=function(){return 50331648&this.fg},ke.prototype.getBgColorMode=function(){return 50331648&this.bg},ke.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},ke.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},ke.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},ke.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},ke.prototype.isFgDefault=function(){return(50331648&this.fg)==0},ke.prototype.isBgDefault=function(){return(50331648&this.bg)==0},ke.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},ke.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},ke.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},ke.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},ke.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},ke.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()},ke.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},ke.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},ke.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},ke.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},ke.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},ke}();Ee.AttributeData=me;var Be=function(){function ke(Ce,Le){Ce===void 0&&(Ce=0),Le===void 0&&(Le=-1),this.underlineStyle=Ce,this.underlineColor=Le}return ke.prototype.clone=function(){return new ke(this.underlineStyle,this.underlineColor)},ke.prototype.isEmpty=function(){return this.underlineStyle===0},ke}();Ee.ExtendedAttrs=Be},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.addDisposableDomListener=void 0,Ee.addDisposableDomListener=function(me,Be,ke,Ce){me.addEventListener(Be,ke,Ce);var Le=!1;return{dispose:function(){Le||(Le=!0,me.removeEventListener(Be,ke,Ce))}}}},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Utf8ToUtf32=Ee.StringToUtf32=Ee.utf32ToString=Ee.stringFromCodePoint=void 0,Ee.stringFromCodePoint=function(ke){return ke>65535?(ke-=65536,String.fromCharCode(55296+(ke>>10))+String.fromCharCode(ke%1024+56320)):String.fromCharCode(ke)},Ee.utf32ToString=function(ke,Ce,Le){Ce===void 0&&(Ce=0),Le===void 0&&(Le=ke.length);for(var he="",ye=Ce;ye<Le;++ye){var xe=ke[ye];xe>65535?(xe-=65536,he+=String.fromCharCode(55296+(xe>>10))+String.fromCharCode(xe%1024+56320)):he+=String.fromCharCode(xe)}return he};var me=function(){function ke(){this._interim=0}return ke.prototype.clear=function(){this._interim=0},ke.prototype.decode=function(Ce,Le){var he=Ce.length;if(!he)return 0;var ye=0,xe=0;this._interim&&(56320<=(ve=Ce.charCodeAt(xe++))&&ve<=57343?Le[ye++]=1024*(this._interim-55296)+ve-56320+65536:(Le[ye++]=this._interim,Le[ye++]=ve),this._interim=0);for(var ge=xe;ge<he;++ge){var le=Ce.charCodeAt(ge);if(55296<=le&&le<=56319){if(++ge>=he)return this._interim=le,ye;var ve;56320<=(ve=Ce.charCodeAt(ge))&&ve<=57343?Le[ye++]=1024*(le-55296)+ve-56320+65536:(Le[ye++]=le,Le[ye++]=ve)}else Le[ye++]=le}return ye},ke}();Ee.StringToUtf32=me;var Be=function(){function ke(){this.interim=new Uint8Array(3)}return ke.prototype.clear=function(){this.interim.fill(0)},ke.prototype.decode=function(Ce,Le){var he=Ce.length;if(!he)return 0;var ye,xe,ge,le,ve=0,de=0,ce=0;if(this.interim[0]){var z=!1,ee=this.interim[0];ee&=(224&ee)==192?31:(240&ee)==224?15:7;for(var oe=0,ie=void 0;(ie=63&this.interim[++oe])&&oe<4;)ee<<=6,ee|=ie;for(var se=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,ue=se-oe;ce<ue;){if(ce>=he)return 0;if((192&(ie=Ce[ce++]))!=128){ce--,z=!0;break}this.interim[oe++]=ie,ee<<=6,ee|=63&ie}z||(se===2?ee<128?ce--:Le[ve++]=ee:se===3?ee<2048||ee>=55296&&ee<=57343||(Le[ve++]=ee):ee<65536||ee>1114111||(Le[ve++]=ee)),this.interim.fill(0)}for(var Se=he-4,we=ce;we<he;){for(;!(!(we<Se)||128&(ye=Ce[we])||128&(xe=Ce[we+1])||128&(ge=Ce[we+2])||128&(le=Ce[we+3]));)Le[ve++]=ye,Le[ve++]=xe,Le[ve++]=ge,Le[ve++]=le,we+=4;if((ye=Ce[we++])<128)Le[ve++]=ye;else if((224&ye)==192){if(we>=he)return this.interim[0]=ye,ve;if((192&(xe=Ce[we++]))!=128){we--;continue}if((de=(31&ye)<<6|63&xe)<128){we--;continue}Le[ve++]=de}else if((240&ye)==224){if(we>=he)return this.interim[0]=ye,ve;if((192&(xe=Ce[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=ye,this.interim[1]=xe,ve;if((192&(ge=Ce[we++]))!=128){we--;continue}if((de=(15&ye)<<12|(63&xe)<<6|63&ge)<2048||de>=55296&&de<=57343)continue;Le[ve++]=de}else if((248&ye)==240){if(we>=he)return this.interim[0]=ye,ve;if((192&(xe=Ce[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=ye,this.interim[1]=xe,ve;if((192&(ge=Ce[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=ye,this.interim[1]=xe,this.interim[2]=ge,ve;if((192&(le=Ce[we++]))!=128){we--;continue}if((de=(7&ye)<<18|(63&xe)<<12|(63&ge)<<6|63&le)<65536||de>1114111)continue;Le[ve++]=de}}return ve},ke}();Ee.Utf8ToUtf32=Be},function(en,Ee,Me){"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(en,Ee,Me){"use strict";var me,Be,ke,Ce;function Le(ye){var xe=ye.toString(16);return xe.length<2?"0"+xe:xe}function he(ye,xe){return ye<xe?(xe+.05)/(ye+.05):(ye+.05)/(xe+.05)}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.contrastRatio=Ee.toPaddedHex=Ee.rgba=Ee.rgb=Ee.css=Ee.color=Ee.channels=void 0,function(ye){ye.toCss=function(xe,ge,le,ve){return ve!==void 0?"#"+Le(xe)+Le(ge)+Le(le)+Le(ve):"#"+Le(xe)+Le(ge)+Le(le)},ye.toRgba=function(xe,ge,le,ve){return ve===void 0&&(ve=255),(xe<<24|ge<<16|le<<8|ve)>>>0}}(me=Ee.channels||(Ee.channels={})),(Be=Ee.color||(Ee.color={})).blend=function(ye,xe){var ge=(255&xe.rgba)/255;if(ge===1)return{css:xe.css,rgba:xe.rgba};var le=xe.rgba>>24&255,ve=xe.rgba>>16&255,de=xe.rgba>>8&255,ce=ye.rgba>>24&255,z=ye.rgba>>16&255,ee=ye.rgba>>8&255,oe=ce+Math.round((le-ce)*ge),ie=z+Math.round((ve-z)*ge),se=ee+Math.round((de-ee)*ge);return{css:me.toCss(oe,ie,se),rgba:me.toRgba(oe,ie,se)}},Be.isOpaque=function(ye){return(255&ye.rgba)==255},Be.ensureContrastRatio=function(ye,xe,ge){var le=Ce.ensureContrastRatio(ye.rgba,xe.rgba,ge);if(le)return Ce.toColor(le>>24&255,le>>16&255,le>>8&255)},Be.opaque=function(ye){var xe=(255|ye.rgba)>>>0,ge=Ce.toChannels(xe),le=ge[0],ve=ge[1],de=ge[2];return{css:me.toCss(le,ve,de),rgba:xe}},Be.opacity=function(ye,xe){var ge=Math.round(255*xe),le=Ce.toChannels(ye.rgba),ve=le[0],de=le[1],ce=le[2];return{css:me.toCss(ve,de,ce,ge),rgba:me.toRgba(ve,de,ce,ge)}},(Ee.css||(Ee.css={})).toColor=function(ye){switch(ye.length){case 7:return{css:ye,rgba:(parseInt(ye.slice(1),16)<<8|255)>>>0};case 9:return{css:ye,rgba:parseInt(ye.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(ye){function xe(ge,le,ve){var de=ge/255,ce=le/255,z=ve/255;return .2126*(de<=.03928?de/12.92:Math.pow((de+.055)/1.055,2.4))+.7152*(ce<=.03928?ce/12.92:Math.pow((ce+.055)/1.055,2.4))+.0722*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))}ye.relativeLuminance=function(ge){return xe(ge>>16&255,ge>>8&255,255&ge)},ye.relativeLuminance2=xe}(ke=Ee.rgb||(Ee.rgb={})),function(ye){function xe(le,ve,de){for(var ce=le>>24&255,z=le>>16&255,ee=le>>8&255,oe=ve>>24&255,ie=ve>>16&255,se=ve>>8&255,ue=he(ke.relativeLuminance2(oe,se,ie),ke.relativeLuminance2(ce,z,ee));ue<de&&(oe>0||ie>0||se>0);)oe-=Math.max(0,Math.ceil(.1*oe)),ie-=Math.max(0,Math.ceil(.1*ie)),se-=Math.max(0,Math.ceil(.1*se)),ue=he(ke.relativeLuminance2(oe,se,ie),ke.relativeLuminance2(ce,z,ee));return(oe<<24|ie<<16|se<<8|255)>>>0}function ge(le,ve,de){for(var ce=le>>24&255,z=le>>16&255,ee=le>>8&255,oe=ve>>24&255,ie=ve>>16&255,se=ve>>8&255,ue=he(ke.relativeLuminance2(oe,se,ie),ke.relativeLuminance2(ce,z,ee));ue<de&&(oe<255||ie<255||se<255);)oe=Math.min(255,oe+Math.ceil(.1*(255-oe))),ie=Math.min(255,ie+Math.ceil(.1*(255-ie))),se=Math.min(255,se+Math.ceil(.1*(255-se))),ue=he(ke.relativeLuminance2(oe,se,ie),ke.relativeLuminance2(ce,z,ee));return(oe<<24|ie<<16|se<<8|255)>>>0}ye.ensureContrastRatio=function(le,ve,de){var ce=ke.relativeLuminance(le>>8),z=ke.relativeLuminance(ve>>8);if(he(ce,z)<de)return z<ce?xe(le,ve,de):ge(le,ve,de)},ye.reduceLuminance=xe,ye.increaseLuminance=ge,ye.toChannels=function(le){return[le>>24&255,le>>16&255,le>>8&255,255&le]},ye.toColor=function(le,ve,de){return{css:me.toCss(le,ve,de),rgba:me.toRgba(le,ve,de)}}}(Ce=Ee.rgba||(Ee.rgba={})),Ee.toPaddedHex=Le,Ee.contrastRatio=he},function(en,Ee,Me){"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 me=typeof navigator=="undefined",Be=me?"node":navigator.userAgent,ke=me?"node":navigator.platform;function Ce(Le,he){return Le.indexOf(he)>=0}Ee.isFirefox=!!~Be.indexOf("Firefox"),Ee.isSafari=/^((?!chrome|android).)*safari/i.test(Be),Ee.isMac=Ce(["Macintosh","MacIntel","MacPPC","Mac68K"],ke),Ee.isIpad=ke==="iPad",Ee.isIphone=ke==="iPhone",Ee.isWindows=Ce(["Windows","Win16","Win32","WinCE"],ke),Ee.isLinux=ke.indexOf("Linux")>=0},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.C1=Ee.C0=void 0,function(me){me.NUL="\0",me.SOH="",me.STX="",me.ETX="",me.EOT="",me.ENQ="",me.ACK="",me.BEL="\x07",me.BS="\b",me.HT=" ",me.LF=`
|
|
|
`,me.VT="\v",me.FF="\f",me.CR="\r",me.SO="",me.SI="",me.DLE="",me.DC1="",me.DC2="",me.DC3="",me.DC4="",me.NAK="",me.SYN="",me.ETB="",me.CAN="",me.EM="",me.SUB="",me.ESC="\x1B",me.FS="",me.GS="",me.RS="",me.US="",me.SP=" ",me.DEL="\x7F"}(Ee.C0||(Ee.C0={})),function(me){me.PAD="\x80",me.HOP="\x81",me.BPH="\x82",me.NBH="\x83",me.IND="\x84",me.NEL="\x85",me.SSA="\x86",me.ESA="\x87",me.HTS="\x88",me.HTJ="\x89",me.VTS="\x8A",me.PLD="\x8B",me.PLU="\x8C",me.RI="\x8D",me.SS2="\x8E",me.SS3="\x8F",me.DCS="\x90",me.PU1="\x91",me.PU2="\x92",me.STS="\x93",me.CCH="\x94",me.MW="\x95",me.SPA="\x96",me.EPA="\x97",me.SOS="\x98",me.SGCI="\x99",me.SCI="\x9A",me.CSI="\x9B",me.ST="\x9C",me.OSC="\x9D",me.PM="\x9E",me.APC="\x9F"}(Ee.C1||(Ee.C1={}))},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BaseRenderLayer=void 0;var me=Me(3),Be=Me(9),ke=Me(25),Ce=Me(6),Le=Me(28),he=Me(10),ye=Me(17),xe=function(){function ge(le,ve,de,ce,z,ee,oe,ie){this._container=le,this._alpha=ce,this._colors=z,this._rendererId=ee,this._bufferService=oe,this._optionsService=ie,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-"+ve+"-layer"),this._canvas.style.zIndex=de.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return ge.prototype.dispose=function(){var le;ye.removeElementFromParent(this._canvas),(le=this._charAtlas)===null||le===void 0||le.dispose()},ge.prototype._initCanvas=function(){this._ctx=Le.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},ge.prototype.onOptionsChanged=function(){},ge.prototype.onBlur=function(){},ge.prototype.onFocus=function(){},ge.prototype.onCursorMove=function(){},ge.prototype.onGridChanged=function(le,ve){},ge.prototype.onSelectionChanged=function(le,ve,de){de===void 0&&(de=!1)},ge.prototype.setColors=function(le){this._refreshCharAtlas(le)},ge.prototype._setTransparency=function(le){if(le!==this._alpha){var ve=this._canvas;this._alpha=le,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,ve),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},ge.prototype._refreshCharAtlas=function(le){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=ke.acquireCharAtlas(this._optionsService.options,this._rendererId,le,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},ge.prototype.resize=function(le){this._scaledCellWidth=le.scaledCellWidth,this._scaledCellHeight=le.scaledCellHeight,this._scaledCharWidth=le.scaledCharWidth,this._scaledCharHeight=le.scaledCharHeight,this._scaledCharLeft=le.scaledCharLeft,this._scaledCharTop=le.scaledCharTop,this._canvas.width=le.scaledCanvasWidth,this._canvas.height=le.scaledCanvasHeight,this._canvas.style.width=le.canvasWidth+"px",this._canvas.style.height=le.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},ge.prototype._fillCells=function(le,ve,de,ce){this._ctx.fillRect(le*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ce*this._scaledCellHeight)},ge.prototype._fillBottomLineAtCells=function(le,ve,de){de===void 0&&(de=1),this._ctx.fillRect(le*this._scaledCellWidth,(ve+1)*this._scaledCellHeight-window.devicePixelRatio-1,de*this._scaledCellWidth,window.devicePixelRatio)},ge.prototype._fillLeftLineAtCell=function(le,ve,de){this._ctx.fillRect(le*this._scaledCellWidth,ve*this._scaledCellHeight,window.devicePixelRatio*de,this._scaledCellHeight)},ge.prototype._strokeRectAtCell=function(le,ve,de,ce){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(le*this._scaledCellWidth+window.devicePixelRatio/2,ve*this._scaledCellHeight+window.devicePixelRatio/2,de*this._scaledCellWidth-window.devicePixelRatio,ce*this._scaledCellHeight-window.devicePixelRatio)},ge.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))},ge.prototype._clearCells=function(le,ve,de,ce){this._alpha?this._ctx.clearRect(le*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ce*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(le*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ce*this._scaledCellHeight))},ge.prototype._fillCharTrueColor=function(le,ve,de){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(de),this._ctx.fillText(le.getChars(),ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},ge.prototype._drawChars=function(le,ve,de){var ce,z,ee=this._getContrastColor(le);ee||le.isFgRGB()||le.isBgRGB()?this._drawUncachedChars(le,ve,de,ee):(le.isInverse()?(ce=le.isBgDefault()?Be.INVERTED_DEFAULT_COLOR:le.getBgColor(),z=le.isFgDefault()?Be.INVERTED_DEFAULT_COLOR:le.getFgColor()):(z=le.isBgDefault()?me.DEFAULT_COLOR:le.getBgColor(),ce=le.isFgDefault()?me.DEFAULT_COLOR:le.getFgColor()),ce+=this._optionsService.options.drawBoldTextInBrightColors&&le.isBold()&&ce<8?8:0,this._currentGlyphIdentifier.chars=le.getChars()||me.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=le.getCode()||me.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=z,this._currentGlyphIdentifier.fg=ce,this._currentGlyphIdentifier.bold=!!le.isBold(),this._currentGlyphIdentifier.dim=!!le.isDim(),this._currentGlyphIdentifier.italic=!!le.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(le,ve,de))},ge.prototype._drawUncachedChars=function(le,ve,de,ce){if(this._ctx.save(),this._ctx.font=this._getFont(!!le.isBold(),!!le.isItalic()),this._ctx.textBaseline="middle",le.isInverse())if(ce)this._ctx.fillStyle=ce.css;else if(le.isBgDefault())this._ctx.fillStyle=he.color.opaque(this._colors.background).css;else if(le.isBgRGB())this._ctx.fillStyle="rgb("+Ce.AttributeData.toColorRGB(le.getBgColor()).join(",")+")";else{var z=le.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&le.isBold()&&z<8&&(z+=8),this._ctx.fillStyle=this._colors.ansi[z].css}else if(ce)this._ctx.fillStyle=ce.css;else if(le.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(le.isFgRGB())this._ctx.fillStyle="rgb("+Ce.AttributeData.toColorRGB(le.getFgColor()).join(",")+")";else{var ee=le.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&le.isBold()&&ee<8&&(ee+=8),this._ctx.fillStyle=this._colors.ansi[ee].css}this._clipRow(de),le.isDim()&&(this._ctx.globalAlpha=Be.DIM_OPACITY),this._ctx.fillText(le.getChars(),ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},ge.prototype._clipRow=function(le){this._ctx.beginPath(),this._ctx.rect(0,le*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},ge.prototype._getFont=function(le,ve){return(ve?"italic":"")+" "+(le?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},ge.prototype._getContrastColor=function(le){if(this._optionsService.options.minimumContrastRatio!==1){var ve=this._colors.contrastCache.getColor(le.bg,le.fg);if(ve!==void 0)return ve||void 0;var de=le.getFgColor(),ce=le.getFgColorMode(),z=le.getBgColor(),ee=le.getBgColorMode(),oe=!!le.isInverse(),ie=!!le.isInverse();if(oe){var se=de;de=z,z=se;var ue=ce;ce=ee,ee=ue}var Se=this._resolveBackgroundRgba(ee,z,oe),we=this._resolveForegroundRgba(ce,de,oe,ie),Pe=he.rgba.ensureContrastRatio(Se,we,this._optionsService.options.minimumContrastRatio);if(Pe){var Ae={css:he.channels.toCss(Pe>>24&255,Pe>>16&255,Pe>>8&255),rgba:Pe};return this._colors.contrastCache.setColor(le.bg,le.fg,Ae),Ae}this._colors.contrastCache.setColor(le.bg,le.fg,null)}},ge.prototype._resolveBackgroundRgba=function(le,ve,de){switch(le){case 16777216:case 33554432:return this._colors.ansi[ve].rgba;case 50331648:return ve<<8;case 0:default:return de?this._colors.foreground.rgba:this._colors.background.rgba}},ge.prototype._resolveForegroundRgba=function(le,ve,de,ce){switch(le){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&ce&&ve<8&&(ve+=8),this._colors.ansi[ve].rgba;case 50331648:return ve<<8;case 0:default:return de?this._colors.background.rgba:this._colors.foreground.rgba}},ge}();Ee.BaseRenderLayer=xe},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.createDecorator=Ee.getServiceDependencies=Ee.serviceRegistry=void 0;function me(Be,ke,Ce){ke.di$target===ke?ke.di$dependencies.push({id:Be,index:Ce}):(ke.di$dependencies=[{id:Be,index:Ce}],ke.di$target=ke)}Ee.serviceRegistry=new Map,Ee.getServiceDependencies=function(Be){return Be.di$dependencies||[]},Ee.createDecorator=function(Be){if(Ee.serviceRegistry.has(Be))return Ee.serviceRegistry.get(Be);var ke=function(Ce,Le,he){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");me(ke,Ce,he)};return ke.toString=function(){return Be},Ee.serviceRegistry.set(Be,ke),ke}},function(en,Ee,Me){"use strict";function me(Be,ke,Ce,Le){if(Ce===void 0&&(Ce=0),Le===void 0&&(Le=Be.length),Ce>=Be.length)return Be;Ce=(Be.length+Ce)%Be.length,Le=Le>=Be.length?Be.length:(Be.length+Le)%Be.length;for(var he=Ce;he<Le;++he)Be[he]=ke;return Be}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.concat=Ee.fillFallback=Ee.fill=void 0,Ee.fill=function(Be,ke,Ce,Le){return Be.fill?Be.fill(ke,Ce,Le):me(Be,ke,Ce,Le)},Ee.fillFallback=me,Ee.concat=function(Be,ke){var Ce=new Be.constructor(Be.length+ke.length);return Ce.set(Be),Ce.set(ke,Be.length),Ce}},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferLine=Ee.DEFAULT_ATTR_DATA=void 0;var me=Me(8),Be=Me(3),ke=Me(4),Ce=Me(6);Ee.DEFAULT_ATTR_DATA=Object.freeze(new Ce.AttributeData);var Le=function(){function he(ye,xe,ge){ge===void 0&&(ge=!1),this.isWrapped=ge,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*ye);for(var le=xe||ke.CellData.fromCharData([0,Be.NULL_CELL_CHAR,Be.NULL_CELL_WIDTH,Be.NULL_CELL_CODE]),ve=0;ve<ye;++ve)this.setCell(ve,le);this.length=ye}return he.prototype.get=function(ye){var xe=this._data[3*ye+0],ge=2097151&xe;return[this._data[3*ye+1],2097152&xe?this._combined[ye]:ge?me.stringFromCodePoint(ge):"",xe>>22,2097152&xe?this._combined[ye].charCodeAt(this._combined[ye].length-1):ge]},he.prototype.set=function(ye,xe){this._data[3*ye+1]=xe[Be.CHAR_DATA_ATTR_INDEX],xe[Be.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[ye]=xe[1],this._data[3*ye+0]=2097152|ye|xe[Be.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*ye+0]=xe[Be.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|xe[Be.CHAR_DATA_WIDTH_INDEX]<<22},he.prototype.getWidth=function(ye){return this._data[3*ye+0]>>22},he.prototype.hasWidth=function(ye){return 12582912&this._data[3*ye+0]},he.prototype.getFg=function(ye){return this._data[3*ye+1]},he.prototype.getBg=function(ye){return this._data[3*ye+2]},he.prototype.hasContent=function(ye){return 4194303&this._data[3*ye+0]},he.prototype.getCodePoint=function(ye){var xe=this._data[3*ye+0];return 2097152&xe?this._combined[ye].charCodeAt(this._combined[ye].length-1):2097151&xe},he.prototype.isCombined=function(ye){return 2097152&this._data[3*ye+0]},he.prototype.getString=function(ye){var xe=this._data[3*ye+0];return 2097152&xe?this._combined[ye]:2097151&xe?me.stringFromCodePoint(2097151&xe):""},he.prototype.loadCell=function(ye,xe){var ge=3*ye;return xe.content=this._data[ge+0],xe.fg=this._data[ge+1],xe.bg=this._data[ge+2],2097152&xe.content&&(xe.combinedData=this._combined[ye]),268435456&xe.bg&&(xe.extended=this._extendedAttrs[ye]),xe},he.prototype.setCell=function(ye,xe){2097152&xe.content&&(this._combined[ye]=xe.combinedData),268435456&xe.bg&&(this._extendedAttrs[ye]=xe.extended),this._data[3*ye+0]=xe.content,this._data[3*ye+1]=xe.fg,this._data[3*ye+2]=xe.bg},he.prototype.setCellFromCodePoint=function(ye,xe,ge,le,ve,de){268435456&ve&&(this._extendedAttrs[ye]=de),this._data[3*ye+0]=xe|ge<<22,this._data[3*ye+1]=le,this._data[3*ye+2]=ve},he.prototype.addCodepointToCell=function(ye,xe){var ge=this._data[3*ye+0];2097152&ge?this._combined[ye]+=me.stringFromCodePoint(xe):(2097151&ge?(this._combined[ye]=me.stringFromCodePoint(2097151&ge)+me.stringFromCodePoint(xe),ge&=-2097152,ge|=2097152):ge=xe|1<<22,this._data[3*ye+0]=ge)},he.prototype.insertCells=function(ye,xe,ge,le){if((ye%=this.length)&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs),xe<this.length-ye){for(var ve=new ke.CellData,de=this.length-ye-xe-1;de>=0;--de)this.setCell(ye+xe+de,this.loadCell(ye+de,ve));for(de=0;de<xe;++de)this.setCell(ye+de,ge)}else for(de=ye;de<this.length;++de)this.setCell(de,ge);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs)},he.prototype.deleteCells=function(ye,xe,ge,le){if(ye%=this.length,xe<this.length-ye){for(var ve=new ke.CellData,de=0;de<this.length-ye-xe;++de)this.setCell(ye+de,this.loadCell(ye+xe+de,ve));for(de=this.length-xe;de<this.length;++de)this.setCell(de,ge)}else for(de=ye;de<this.length;++de)this.setCell(de,ge);ye&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs),this.getWidth(ye)!==0||this.hasContent(ye)||this.setCellFromCodePoint(ye,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs)},he.prototype.replaceCells=function(ye,xe,ge,le){for(ye&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs),xe<this.length&&this.getWidth(xe-1)===2&&this.setCellFromCodePoint(xe,0,1,(le==null?void 0:le.fg)||0,(le==null?void 0:le.bg)||0,(le==null?void 0:le.extended)||new Ce.ExtendedAttrs);ye<xe&&ye<this.length;)this.setCell(ye++,ge)},he.prototype.resize=function(ye,xe){if(ye!==this.length){if(ye>this.length){var ge=new Uint32Array(3*ye);this.length&&(3*ye<this._data.length?ge.set(this._data.subarray(0,3*ye)):ge.set(this._data)),this._data=ge;for(var le=this.length;le<ye;++le)this.setCell(le,xe)}else if(ye){(ge=new Uint32Array(3*ye)).set(this._data.subarray(0,3*ye)),this._data=ge;var ve=Object.keys(this._combined);for(le=0;le<ve.length;le++){var de=parseInt(ve[le],10);de>=ye&&delete this._combined[de]}}else this._data=new Uint32Array(0),this._combined={};this.length=ye}},he.prototype.fill=function(ye){this._combined={},this._extendedAttrs={};for(var xe=0;xe<this.length;++xe)this.setCell(xe,ye)},he.prototype.copyFrom=function(ye){for(var xe in this.length!==ye.length?this._data=new Uint32Array(ye._data):this._data.set(ye._data),this.length=ye.length,this._combined={},ye._combined)this._combined[xe]=ye._combined[xe];for(var xe in this._extendedAttrs={},ye._extendedAttrs)this._extendedAttrs[xe]=ye._extendedAttrs[xe];this.isWrapped=ye.isWrapped},he.prototype.clone=function(){var ye=new he(0);for(var xe in ye._data=new Uint32Array(this._data),ye.length=this.length,this._combined)ye._combined[xe]=this._combined[xe];for(var xe in this._extendedAttrs)ye._extendedAttrs[xe]=this._extendedAttrs[xe];return ye.isWrapped=this.isWrapped,ye},he.prototype.getTrimmedLength=function(){for(var ye=this.length-1;ye>=0;--ye)if(4194303&this._data[3*ye+0])return ye+(this._data[3*ye+0]>>22);return 0},he.prototype.copyCellsFrom=function(ye,xe,ge,le,ve){var de=ye._data;if(ve)for(var ce=le-1;ce>=0;ce--)for(var z=0;z<3;z++)this._data[3*(ge+ce)+z]=de[3*(xe+ce)+z];else for(ce=0;ce<le;ce++)for(z=0;z<3;z++)this._data[3*(ge+ce)+z]=de[3*(xe+ce)+z];var ee=Object.keys(ye._combined);for(z=0;z<ee.length;z++){var oe=parseInt(ee[z],10);oe>=xe&&(this._combined[oe-xe+ge]=ye._combined[oe])}},he.prototype.translateToString=function(ye,xe,ge){ye===void 0&&(ye=!1),xe===void 0&&(xe=0),ge===void 0&&(ge=this.length),ye&&(ge=Math.min(ge,this.getTrimmedLength()));for(var le="";xe<ge;){var ve=this._data[3*xe+0],de=2097151&ve;le+=2097152&ve?this._combined[xe]:de?me.stringFromCodePoint(de):Be.WHITESPACE_CELL_CHAR,xe+=ve>>22||1}return le},he}();Ee.BufferLine=Le},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.removeElementFromParent=void 0,Ee.removeElementFromParent=function(){for(var me,Be=[],ke=0;ke<arguments.length;ke++)Be[ke]=arguments[ke];for(var Ce=0,Le=Be;Ce<Le.length;Ce++){var he=Le[Ce];(me=he==null?void 0:he.parentElement)===null||me===void 0||me.removeChild(he)}}},function(en,Ee,Me){"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(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(we,Pe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ae,De){Ae.__proto__=De}||function(Ae,De){for(var ze in De)De.hasOwnProperty(ze)&&(Ae[ze]=De[ze])})(we,Pe)},function(we,Pe){function Ae(){this.constructor=we}me(we,Pe),we.prototype=Pe===null?Object.create(Pe):(Ae.prototype=Pe.prototype,new Ae)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InputHandler=Ee.WindowsOptionsReportType=void 0;var ke,Ce=Me(12),Le=Me(20),he=Me(39),ye=Me(2),xe=Me(15),ge=Me(8),le=Me(16),ve=Me(0),de=Me(3),ce=Me(4),z=Me(6),ee=Me(22),oe=Me(24),ie={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function se(we,Pe){if(we>24)return Pe.setWinLines||!1;switch(we){case 1:return!!Pe.restoreWin;case 2:return!!Pe.minimizeWin;case 3:return!!Pe.setWinPosition;case 4:return!!Pe.setWinSizePixels;case 5:return!!Pe.raiseWin;case 6:return!!Pe.lowerWin;case 7:return!!Pe.refreshWin;case 8:return!!Pe.setWinSizeChars;case 9:return!!Pe.maximizeWin;case 10:return!!Pe.fullscreenWin;case 11:return!!Pe.getWinState;case 13:return!!Pe.getWinPosition;case 14:return!!Pe.getWinSizePixels;case 15:return!!Pe.getScreenSizePixels;case 16:return!!Pe.getCellSizePixels;case 18:return!!Pe.getWinSizeChars;case 19:return!!Pe.getScreenSizeChars;case 20:return!!Pe.getIconTitle;case 21:return!!Pe.getWinTitle;case 22:return!!Pe.pushTitle;case 23:return!!Pe.popTitle;case 24:return!!Pe.setWinLines}return!1}(function(we){we[we.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",we[we.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(ke=Ee.WindowsOptionsReportType||(Ee.WindowsOptionsReportType={}));var ue=function(){function we(Pe,Ae,De,ze){this._bufferService=Pe,this._coreService=Ae,this._logService=De,this._optionsService=ze,this._data=new Uint32Array(0)}return we.prototype.hook=function(Pe){this._data=new Uint32Array(0)},we.prototype.put=function(Pe,Ae,De){this._data=xe.concat(this._data,Pe.subarray(Ae,De))},we.prototype.unhook=function(Pe){if(Pe){var Ae=ge.utf32ToString(this._data);switch(this._data=new Uint32Array(0),Ae){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 ze={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return ze-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+ze+" q"+Ce.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",Ae),this._coreService.triggerDataEvent(Ce.C0.ESC+"P0$r"+Ce.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},we}(),Se=function(we){function Pe(Ae,De,ze,Ze,Xe,Ge,ft,at,Ct){Ct===void 0&&(Ct=new he.EscapeSequenceParser);var et=we.call(this)||this;et._bufferService=Ae,et._charsetService=De,et._coreService=ze,et._dirtyRowService=Ze,et._logService=Xe,et._optionsService=Ge,et._coreMouseService=ft,et._unicodeService=at,et._parser=Ct,et._parseBuffer=new Uint32Array(4096),et._stringDecoder=new ge.StringToUtf32,et._utf8Decoder=new ge.Utf8ToUtf32,et._workCell=new ce.CellData,et._windowTitle="",et._iconName="",et._windowTitleStack=[],et._iconNameStack=[],et._curAttrData=le.DEFAULT_ATTR_DATA.clone(),et._eraseAttrDataInternal=le.DEFAULT_ATTR_DATA.clone(),et._onRequestBell=new ve.EventEmitter,et._onRequestRefreshRows=new ve.EventEmitter,et._onRequestReset=new ve.EventEmitter,et._onRequestScroll=new ve.EventEmitter,et._onRequestSyncScrollBar=new ve.EventEmitter,et._onRequestWindowsOptionsReport=new ve.EventEmitter,et._onA11yChar=new ve.EventEmitter,et._onA11yTab=new ve.EventEmitter,et._onCursorMove=new ve.EventEmitter,et._onLineFeed=new ve.EventEmitter,et._onScroll=new ve.EventEmitter,et._onTitleChange=new ve.EventEmitter,et.register(et._parser),et._parser.setCsiHandlerFallback(function(lt,tt){et._logService.debug("Unknown CSI code: ",{identifier:et._parser.identToString(lt),params:tt.toArray()})}),et._parser.setEscHandlerFallback(function(lt){et._logService.debug("Unknown ESC code: ",{identifier:et._parser.identToString(lt)})}),et._parser.setExecuteHandlerFallback(function(lt){et._logService.debug("Unknown EXECUTE code: ",{code:lt})}),et._parser.setOscHandlerFallback(function(lt,tt,ut){et._logService.debug("Unknown OSC code: ",{identifier:lt,action:tt,data:ut})}),et._parser.setDcsHandlerFallback(function(lt,tt,ut){tt==="HOOK"&&(ut=ut.toArray()),et._logService.debug("Unknown DCS code: ",{identifier:et._parser.identToString(lt),action:tt,payload:ut})}),et._parser.setPrintHandler(function(lt,tt,ut){return et.print(lt,tt,ut)}),et._parser.setCsiHandler({final:"@"},function(lt){return et.insertChars(lt)}),et._parser.setCsiHandler({intermediates:" ",final:"@"},function(lt){return et.scrollLeft(lt)}),et._parser.setCsiHandler({final:"A"},function(lt){return et.cursorUp(lt)}),et._parser.setCsiHandler({intermediates:" ",final:"A"},function(lt){return et.scrollRight(lt)}),et._parser.setCsiHandler({final:"B"},function(lt){return et.cursorDown(lt)}),et._parser.setCsiHandler({final:"C"},function(lt){return et.cursorForward(lt)}),et._parser.setCsiHandler({final:"D"},function(lt){return et.cursorBackward(lt)}),et._parser.setCsiHandler({final:"E"},function(lt){return et.cursorNextLine(lt)}),et._parser.setCsiHandler({final:"F"},function(lt){return et.cursorPrecedingLine(lt)}),et._parser.setCsiHandler({final:"G"},function(lt){return et.cursorCharAbsolute(lt)}),et._parser.setCsiHandler({final:"H"},function(lt){return et.cursorPosition(lt)}),et._parser.setCsiHandler({final:"I"},function(lt){return et.cursorForwardTab(lt)}),et._parser.setCsiHandler({final:"J"},function(lt){return et.eraseInDisplay(lt)}),et._parser.setCsiHandler({prefix:"?",final:"J"},function(lt){return et.eraseInDisplay(lt)}),et._parser.setCsiHandler({final:"K"},function(lt){return et.eraseInLine(lt)}),et._parser.setCsiHandler({prefix:"?",final:"K"},function(lt){return et.eraseInLine(lt)}),et._parser.setCsiHandler({final:"L"},function(lt){return et.insertLines(lt)}),et._parser.setCsiHandler({final:"M"},function(lt){return et.deleteLines(lt)}),et._parser.setCsiHandler({final:"P"},function(lt){return et.deleteChars(lt)}),et._parser.setCsiHandler({final:"S"},function(lt){return et.scrollUp(lt)}),et._parser.setCsiHandler({final:"T"},function(lt){return et.scrollDown(lt)}),et._parser.setCsiHandler({final:"X"},function(lt){return et.eraseChars(lt)}),et._parser.setCsiHandler({final:"Z"},function(lt){return et.cursorBackwardTab(lt)}),et._parser.setCsiHandler({final:"`"},function(lt){return et.charPosAbsolute(lt)}),et._parser.setCsiHandler({final:"a"},function(lt){return et.hPositionRelative(lt)}),et._parser.setCsiHandler({final:"b"},function(lt){return et.repeatPrecedingCharacter(lt)}),et._parser.setCsiHandler({final:"c"},function(lt){return et.sendDeviceAttributesPrimary(lt)}),et._parser.setCsiHandler({prefix:">",final:"c"},function(lt){return et.sendDeviceAttributesSecondary(lt)}),et._parser.setCsiHandler({final:"d"},function(lt){return et.linePosAbsolute(lt)}),et._parser.setCsiHandler({final:"e"},function(lt){return et.vPositionRelative(lt)}),et._parser.setCsiHandler({final:"f"},function(lt){return et.hVPosition(lt)}),et._parser.setCsiHandler({final:"g"},function(lt){return et.tabClear(lt)}),et._parser.setCsiHandler({final:"h"},function(lt){return et.setMode(lt)}),et._parser.setCsiHandler({prefix:"?",final:"h"},function(lt){return et.setModePrivate(lt)}),et._parser.setCsiHandler({final:"l"},function(lt){return et.resetMode(lt)}),et._parser.setCsiHandler({prefix:"?",final:"l"},function(lt){return et.resetModePrivate(lt)}),et._parser.setCsiHandler({final:"m"},function(lt){return et.charAttributes(lt)}),et._parser.setCsiHandler({final:"n"},function(lt){return et.deviceStatus(lt)}),et._parser.setCsiHandler({prefix:"?",final:"n"},function(lt){return et.deviceStatusPrivate(lt)}),et._parser.setCsiHandler({intermediates:"!",final:"p"},function(lt){return et.softReset(lt)}),et._parser.setCsiHandler({intermediates:" ",final:"q"},function(lt){return et.setCursorStyle(lt)}),et._parser.setCsiHandler({final:"r"},function(lt){return et.setScrollRegion(lt)}),et._parser.setCsiHandler({final:"s"},function(lt){return et.saveCursor(lt)}),et._parser.setCsiHandler({final:"t"},function(lt){return et.windowOptions(lt)}),et._parser.setCsiHandler({final:"u"},function(lt){return et.restoreCursor(lt)}),et._parser.setCsiHandler({intermediates:"'",final:"}"},function(lt){return et.insertColumns(lt)}),et._parser.setCsiHandler({intermediates:"'",final:"~"},function(lt){return et.deleteColumns(lt)}),et._parser.setExecuteHandler(Ce.C0.BEL,function(){return et.bell()}),et._parser.setExecuteHandler(Ce.C0.LF,function(){return et.lineFeed()}),et._parser.setExecuteHandler(Ce.C0.VT,function(){return et.lineFeed()}),et._parser.setExecuteHandler(Ce.C0.FF,function(){return et.lineFeed()}),et._parser.setExecuteHandler(Ce.C0.CR,function(){return et.carriageReturn()}),et._parser.setExecuteHandler(Ce.C0.BS,function(){return et.backspace()}),et._parser.setExecuteHandler(Ce.C0.HT,function(){return et.tab()}),et._parser.setExecuteHandler(Ce.C0.SO,function(){return et.shiftOut()}),et._parser.setExecuteHandler(Ce.C0.SI,function(){return et.shiftIn()}),et._parser.setExecuteHandler(Ce.C1.IND,function(){return et.index()}),et._parser.setExecuteHandler(Ce.C1.NEL,function(){return et.nextLine()}),et._parser.setExecuteHandler(Ce.C1.HTS,function(){return et.tabSet()}),et._parser.setOscHandler(0,new ee.OscHandler(function(lt){et.setTitle(lt),et.setIconName(lt)})),et._parser.setOscHandler(1,new ee.OscHandler(function(lt){return et.setIconName(lt)})),et._parser.setOscHandler(2,new ee.OscHandler(function(lt){return et.setTitle(lt)})),et._parser.setEscHandler({final:"7"},function(){return et.saveCursor()}),et._parser.setEscHandler({final:"8"},function(){return et.restoreCursor()}),et._parser.setEscHandler({final:"D"},function(){return et.index()}),et._parser.setEscHandler({final:"E"},function(){return et.nextLine()}),et._parser.setEscHandler({final:"H"},function(){return et.tabSet()}),et._parser.setEscHandler({final:"M"},function(){return et.reverseIndex()}),et._parser.setEscHandler({final:"="},function(){return et.keypadApplicationMode()}),et._parser.setEscHandler({final:">"},function(){return et.keypadNumericMode()}),et._parser.setEscHandler({final:"c"},function(){return et.fullReset()}),et._parser.setEscHandler({final:"n"},function(){return et.setgLevel(2)}),et._parser.setEscHandler({final:"o"},function(){return et.setgLevel(3)}),et._parser.setEscHandler({final:"|"},function(){return et.setgLevel(3)}),et._parser.setEscHandler({final:"}"},function(){return et.setgLevel(2)}),et._parser.setEscHandler({final:"~"},function(){return et.setgLevel(1)}),et._parser.setEscHandler({intermediates:"%",final:"@"},function(){return et.selectDefaultCharset()}),et._parser.setEscHandler({intermediates:"%",final:"G"},function(){return et.selectDefaultCharset()});var yt=function(lt){st._parser.setEscHandler({intermediates:"(",final:lt},function(){return et.selectCharset("("+lt)}),st._parser.setEscHandler({intermediates:")",final:lt},function(){return et.selectCharset(")"+lt)}),st._parser.setEscHandler({intermediates:"*",final:lt},function(){return et.selectCharset("*"+lt)}),st._parser.setEscHandler({intermediates:"+",final:lt},function(){return et.selectCharset("+"+lt)}),st._parser.setEscHandler({intermediates:"-",final:lt},function(){return et.selectCharset("-"+lt)}),st._parser.setEscHandler({intermediates:".",final:lt},function(){return et.selectCharset("."+lt)}),st._parser.setEscHandler({intermediates:"/",final:lt},function(){return et.selectCharset("/"+lt)})},st=this;for(var zt in Le.CHARSETS)yt(zt);return et._parser.setEscHandler({intermediates:"#",final:"8"},function(){return et.screenAlignmentPattern()}),et._parser.setErrorHandler(function(lt){return et._logService.error("Parsing error: ",lt),lt}),et._parser.setDcsHandler({intermediates:"$",final:"q"},new ue(et._bufferService,et._coreService,et._logService,et._optionsService)),et}return Be(Pe,we),Object.defineProperty(Pe.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Pe.prototype.dispose=function(){we.prototype.dispose.call(this)},Pe.prototype.parse=function(Ae){var De=this._bufferService.buffer,ze=De.x,Ze=De.y;if(this._logService.debug("parsing data",Ae),this._parseBuffer.length<Ae.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(Ae.length,131072))),this._dirtyRowService.clearRange(),Ae.length>131072)for(var Xe=0;Xe<Ae.length;Xe+=131072){var Ge=Xe+131072<Ae.length?Xe+131072:Ae.length,ft=typeof Ae=="string"?this._stringDecoder.decode(Ae.substring(Xe,Ge),this._parseBuffer):this._utf8Decoder.decode(Ae.subarray(Xe,Ge),this._parseBuffer);this._parser.parse(this._parseBuffer,ft)}else ft=typeof Ae=="string"?this._stringDecoder.decode(Ae,this._parseBuffer):this._utf8Decoder.decode(Ae,this._parseBuffer),this._parser.parse(this._parseBuffer,ft);(De=this._bufferService.buffer).x===ze&&De.y===Ze||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},Pe.prototype.print=function(Ae,De,ze){var Ze,Xe,Ge=this._bufferService.buffer,ft=this._charsetService.charset,at=this._optionsService.options.screenReaderMode,Ct=this._bufferService.cols,et=this._coreService.decPrivateModes.wraparound,yt=this._coreService.modes.insertMode,st=this._curAttrData,zt=Ge.lines.get(Ge.ybase+Ge.y);this._dirtyRowService.markDirty(Ge.y),Ge.x&&ze-De>0&&zt.getWidth(Ge.x-1)===2&&zt.setCellFromCodePoint(Ge.x-1,0,1,st.fg,st.bg,st.extended);for(var lt=De;lt<ze;++lt){if(Ze=Ae[lt],Xe=this._unicodeService.wcwidth(Ze),Ze<127&&ft){var tt=ft[String.fromCharCode(Ze)];tt&&(Ze=tt.charCodeAt(0))}if(at&&this._onA11yChar.fire(ge.stringFromCodePoint(Ze)),Xe||!Ge.x){if(Ge.x+Xe-1>=Ct){if(et){for(;Ge.x<Ct;)zt.setCellFromCodePoint(Ge.x++,0,1,st.fg,st.bg,st.extended);Ge.x=0,Ge.y++,Ge.y===Ge.scrollBottom+1?(Ge.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Ge.y>=this._bufferService.rows&&(Ge.y=this._bufferService.rows-1),Ge.lines.get(Ge.ybase+Ge.y).isWrapped=!0),zt=Ge.lines.get(Ge.ybase+Ge.y)}else if(Ge.x=Ct-1,Xe===2)continue}if(yt&&(zt.insertCells(Ge.x,Xe,Ge.getNullCell(st),st),zt.getWidth(Ct-1)===2&&zt.setCellFromCodePoint(Ct-1,de.NULL_CELL_CODE,de.NULL_CELL_WIDTH,st.fg,st.bg,st.extended)),zt.setCellFromCodePoint(Ge.x++,Ze,Xe,st.fg,st.bg,st.extended),Xe>0)for(;--Xe;)zt.setCellFromCodePoint(Ge.x++,0,0,st.fg,st.bg,st.extended)}else zt.getWidth(Ge.x-1)?zt.addCodepointToCell(Ge.x-1,Ze):zt.addCodepointToCell(Ge.x-2,Ze)}ze-De>0&&(zt.loadCell(Ge.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),Ge.x<Ct&&ze-De>0&&zt.getWidth(Ge.x)===0&&!zt.hasContent(Ge.x)&&zt.setCellFromCodePoint(Ge.x,0,1,st.fg,st.bg,st.extended),this._dirtyRowService.markDirty(Ge.y)},Pe.prototype.addCsiHandler=function(Ae,De){var ze=this;return Ae.final!=="t"||Ae.prefix||Ae.intermediates?this._parser.addCsiHandler(Ae,De):this._parser.addCsiHandler(Ae,function(Ze){return!se(Ze.params[0],ze._optionsService.options.windowOptions)||De(Ze)})},Pe.prototype.addDcsHandler=function(Ae,De){return this._parser.addDcsHandler(Ae,new oe.DcsHandler(De))},Pe.prototype.addEscHandler=function(Ae,De){return this._parser.addEscHandler(Ae,De)},Pe.prototype.addOscHandler=function(Ae,De){return this._parser.addOscHandler(Ae,new ee.OscHandler(De))},Pe.prototype.bell=function(){this._onRequestBell.fire()},Pe.prototype.lineFeed=function(){var Ae=this._bufferService.buffer;this._dirtyRowService.markDirty(Ae.y),this._optionsService.options.convertEol&&(Ae.x=0),Ae.y++,Ae.y===Ae.scrollBottom+1?(Ae.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ae.y>=this._bufferService.rows&&(Ae.y=this._bufferService.rows-1),Ae.x>=this._bufferService.cols&&Ae.x--,this._dirtyRowService.markDirty(Ae.y),this._onLineFeed.fire()},Pe.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},Pe.prototype.backspace=function(){var Ae,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&&(!((Ae=De.lines.get(De.ybase+De.y))===null||Ae===void 0)&&Ae.isWrapped)){De.lines.get(De.ybase+De.y).isWrapped=!1,De.y--,De.x=this._bufferService.cols-1;var ze=De.lines.get(De.ybase+De.y);ze.hasWidth(De.x)&&!ze.hasContent(De.x)&&De.x--}this._restrictCursor()},Pe.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var Ae=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-Ae)}},Pe.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},Pe.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},Pe.prototype._restrictCursor=function(Ae){Ae===void 0&&(Ae=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(Ae,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)},Pe.prototype._setCursor=function(Ae,De){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+De):(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=De),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype._moveCursor=function(Ae,De){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+Ae,this._bufferService.buffer.y+De)},Pe.prototype.cursorUp=function(Ae){var De=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;De>=0?this._moveCursor(0,-Math.min(De,Ae.params[0]||1)):this._moveCursor(0,-(Ae.params[0]||1))},Pe.prototype.cursorDown=function(Ae){var De=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;De>=0?this._moveCursor(0,Math.min(De,Ae.params[0]||1)):this._moveCursor(0,Ae.params[0]||1)},Pe.prototype.cursorForward=function(Ae){this._moveCursor(Ae.params[0]||1,0)},Pe.prototype.cursorBackward=function(Ae){this._moveCursor(-(Ae.params[0]||1),0)},Pe.prototype.cursorNextLine=function(Ae){this.cursorDown(Ae),this._bufferService.buffer.x=0},Pe.prototype.cursorPrecedingLine=function(Ae){this.cursorUp(Ae),this._bufferService.buffer.x=0},Pe.prototype.cursorCharAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},Pe.prototype.cursorPosition=function(Ae){this._setCursor(Ae.length>=2?(Ae.params[1]||1)-1:0,(Ae.params[0]||1)-1)},Pe.prototype.charPosAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},Pe.prototype.hPositionRelative=function(Ae){this._moveCursor(Ae.params[0]||1,0)},Pe.prototype.linePosAbsolute=function(Ae){this._setCursor(this._bufferService.buffer.x,(Ae.params[0]||1)-1)},Pe.prototype.vPositionRelative=function(Ae){this._moveCursor(0,Ae.params[0]||1)},Pe.prototype.hVPosition=function(Ae){this.cursorPosition(Ae)},Pe.prototype.tabClear=function(Ae){var De=Ae.params[0];De===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:De===3&&(this._bufferService.buffer.tabs={})},Pe.prototype.cursorForwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Ae.params[0]||1;De--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},Pe.prototype.cursorBackwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Ae.params[0]||1,ze=this._bufferService.buffer;De--;)ze.x=ze.prevStop()},Pe.prototype._eraseInBufferLine=function(Ae,De,ze,Ze){Ze===void 0&&(Ze=!1);var Xe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);Xe.replaceCells(De,ze,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ze&&(Xe.isWrapped=!1)},Pe.prototype._resetBufferLine=function(Ae){var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);De.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),De.isWrapped=!1},Pe.prototype.eraseInDisplay=function(Ae){var De;switch(this._restrictCursor(),Ae.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 ze=this._bufferService.buffer.lines.length-this._bufferService.rows;ze>0&&(this._bufferService.buffer.lines.trimStart(ze),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-ze,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-ze,0),this._onScroll.fire(0))}},Pe.prototype.eraseInLine=function(Ae){switch(this._restrictCursor(),Ae.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)},Pe.prototype.insertLines=function(Ae){this._restrictCursor();var De=Ae.params[0]||1,ze=this._bufferService.buffer;if(!(ze.y>ze.scrollBottom||ze.y<ze.scrollTop)){for(var Ze=ze.ybase+ze.y,Xe=this._bufferService.rows-1-ze.scrollBottom,Ge=this._bufferService.rows-1+ze.ybase-Xe+1;De--;)ze.lines.splice(Ge-1,1),ze.lines.splice(Ze,0,ze.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(ze.y,ze.scrollBottom),ze.x=0}},Pe.prototype.deleteLines=function(Ae){this._restrictCursor();var De=Ae.params[0]||1,ze=this._bufferService.buffer;if(!(ze.y>ze.scrollBottom||ze.y<ze.scrollTop)){var Ze,Xe=ze.ybase+ze.y;for(Ze=this._bufferService.rows-1-ze.scrollBottom,Ze=this._bufferService.rows-1+ze.ybase-Ze;De--;)ze.lines.splice(Xe,1),ze.lines.splice(Ze,0,ze.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(ze.y,ze.scrollBottom),ze.x=0}},Pe.prototype.insertChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.insertCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.deleteChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.deleteCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.scrollUp=function(Ae){for(var De=Ae.params[0]||1,ze=this._bufferService.buffer;De--;)ze.lines.splice(ze.ybase+ze.scrollTop,1),ze.lines.splice(ze.ybase+ze.scrollBottom,0,ze.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(ze.scrollTop,ze.scrollBottom)},Pe.prototype.scrollDown=function(Ae){for(var De=Ae.params[0]||1,ze=this._bufferService.buffer;De--;)ze.lines.splice(ze.ybase+ze.scrollBottom,1),ze.lines.splice(ze.ybase+ze.scrollTop,0,ze.getBlankLine(le.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(ze.scrollTop,ze.scrollBottom)},Pe.prototype.scrollLeft=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ze=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var Xe=De.lines.get(De.ybase+Ze);Xe.deleteCells(0,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Xe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.scrollRight=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ze=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var Xe=De.lines.get(De.ybase+Ze);Xe.insertCells(0,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Xe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.insertColumns=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ze=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var Xe=this._bufferService.buffer.lines.get(De.ybase+Ze);Xe.insertCells(De.x,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Xe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.deleteColumns=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ze=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var Xe=De.lines.get(De.ybase+Ze);Xe.deleteCells(De.x,ze,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Xe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.eraseChars=function(Ae){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+(Ae.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.repeatPrecedingCharacter=function(Ae){if(this._parser.precedingCodepoint){for(var De=Ae.params[0]||1,ze=new Uint32Array(De),Ze=0;Ze<De;++Ze)ze[Ze]=this._parser.precedingCodepoint;this.print(ze,0,ze.length)}},Pe.prototype.sendDeviceAttributesPrimary=function(Ae){Ae.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"))},Pe.prototype.sendDeviceAttributesSecondary=function(Ae){Ae.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(Ae.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[>83;40003;0c"))},Pe.prototype._is=function(Ae){return(this._optionsService.options.termName+"").indexOf(Ae)===0},Pe.prototype.setMode=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!0}},Pe.prototype.setModePrivate=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,Le.DEFAULT_CHARSET),this._charsetService.setgCharset(1,Le.DEFAULT_CHARSET),this._charsetService.setgCharset(2,Le.DEFAULT_CHARSET),this._charsetService.setgCharset(3,Le.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}},Pe.prototype.resetMode=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!1}},Pe.prototype.resetModePrivate=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.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(),Ae.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}},Pe.prototype._updateAttrColor=function(Ae,De,ze,Ze,Xe){return De===2?(Ae|=50331648,Ae&=-16777216,Ae|=z.AttributeData.fromColorRGB([ze,Ze,Xe])):De===5&&(Ae&=-50331904,Ae|=33554432|255&ze),Ae},Pe.prototype._extractColor=function(Ae,De,ze){var Ze=[0,0,-1,0,0,0],Xe=0,Ge=0;do{if(Ze[Ge+Xe]=Ae.params[De+Ge],Ae.hasSubParams(De+Ge)){var ft=Ae.getSubParams(De+Ge),at=0;do Ze[1]===5&&(Xe=1),Ze[Ge+at+1+Xe]=ft[at];while(++at<ft.length&&at+Ge+1+Xe<Ze.length);break}if(Ze[1]===5&&Ge+Xe>=2||Ze[1]===2&&Ge+Xe>=5)break;Ze[1]&&(Xe=1)}while(++Ge+De<Ae.length&&Ge+Xe<Ze.length);for(at=2;at<Ze.length;++at)Ze[at]===-1&&(Ze[at]=0);switch(Ze[0]){case 38:ze.fg=this._updateAttrColor(ze.fg,Ze[1],Ze[3],Ze[4],Ze[5]);break;case 48:ze.bg=this._updateAttrColor(ze.bg,Ze[1],Ze[3],Ze[4],Ze[5]);break;case 58:ze.extended=ze.extended.clone(),ze.extended.underlineColor=this._updateAttrColor(ze.extended.underlineColor,Ze[1],Ze[3],Ze[4],Ze[5])}return Ge},Pe.prototype._processUnderline=function(Ae,De){De.extended=De.extended.clone(),(!~Ae||Ae>5)&&(Ae=1),De.extended.underlineStyle=Ae,De.fg|=268435456,Ae===0&&(De.fg&=-268435457),De.updateExtended()},Pe.prototype.charAttributes=function(Ae){if(Ae.length===1&&Ae.params[0]===0)return this._curAttrData.fg=le.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=le.DEFAULT_ATTR_DATA.bg);for(var De,ze=Ae.length,Ze=this._curAttrData,Xe=0;Xe<ze;Xe++)(De=Ae.params[Xe])>=30&&De<=37?(Ze.fg&=-50331904,Ze.fg|=16777216|De-30):De>=40&&De<=47?(Ze.bg&=-50331904,Ze.bg|=16777216|De-40):De>=90&&De<=97?(Ze.fg&=-50331904,Ze.fg|=16777224|De-90):De>=100&&De<=107?(Ze.bg&=-50331904,Ze.bg|=16777224|De-100):De===0?(Ze.fg=le.DEFAULT_ATTR_DATA.fg,Ze.bg=le.DEFAULT_ATTR_DATA.bg):De===1?Ze.fg|=134217728:De===3?Ze.bg|=67108864:De===4?(Ze.fg|=268435456,this._processUnderline(Ae.hasSubParams(Xe)?Ae.getSubParams(Xe)[0]:1,Ze)):De===5?Ze.fg|=536870912:De===7?Ze.fg|=67108864:De===8?Ze.fg|=1073741824:De===2?Ze.bg|=134217728:De===21?this._processUnderline(2,Ze):De===22?(Ze.fg&=-134217729,Ze.bg&=-134217729):De===23?Ze.bg&=-67108865:De===24?Ze.fg&=-268435457:De===25?Ze.fg&=-536870913:De===27?Ze.fg&=-67108865:De===28?Ze.fg&=-1073741825:De===39?(Ze.fg&=-67108864,Ze.fg|=16777215&le.DEFAULT_ATTR_DATA.fg):De===49?(Ze.bg&=-67108864,Ze.bg|=16777215&le.DEFAULT_ATTR_DATA.bg):De===38||De===48||De===58?Xe+=this._extractColor(Ae,Xe,Ze):De===59?(Ze.extended=Ze.extended.clone(),Ze.extended.underlineColor=-1,Ze.updateExtended()):De===100?(Ze.fg&=-67108864,Ze.fg|=16777215&le.DEFAULT_ATTR_DATA.fg,Ze.bg&=-67108864,Ze.bg|=16777215&le.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",De)},Pe.prototype.deviceStatus=function(Ae){switch(Ae.params[0]){case 5:this._coreService.triggerDataEvent(Ce.C0.ESC+"[0n");break;case 6:var De=this._bufferService.buffer.y+1,ze=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"["+De+";"+ze+"R")}},Pe.prototype.deviceStatusPrivate=function(Ae){switch(Ae.params[0]){case 6:var De=this._bufferService.buffer.y+1,ze=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"[?"+De+";"+ze+"R")}},Pe.prototype.softReset=function(Ae){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=le.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},Pe.prototype.setCursorStyle=function(Ae){var De=Ae.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 ze=De%2==1;this._optionsService.options.cursorBlink=ze},Pe.prototype.setScrollRegion=function(Ae){var De,ze=Ae.params[0]||1;(Ae.length<2||(De=Ae.params[1])>this._bufferService.rows||De===0)&&(De=this._bufferService.rows),De>ze&&(this._bufferService.buffer.scrollTop=ze-1,this._bufferService.buffer.scrollBottom=De-1,this._setCursor(0,0))},Pe.prototype.windowOptions=function(Ae){if(se(Ae.params[0],this._optionsService.options.windowOptions)){var De=Ae.length>1?Ae.params[1]:0;switch(Ae.params[0]){case 14:De!==2&&this._onRequestWindowsOptionsReport.fire(ke.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(ke.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())}}},Pe.prototype.saveCursor=function(Ae){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},Pe.prototype.restoreCursor=function(Ae){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()},Pe.prototype.setTitle=function(Ae){this._windowTitle=Ae,this._onTitleChange.fire(Ae)},Pe.prototype.setIconName=function(Ae){this._iconName=Ae},Pe.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},Pe.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},Pe.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},Pe.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,Le.DEFAULT_CHARSET)},Pe.prototype.selectCharset=function(Ae){Ae.length===2?Ae[0]!=="/"&&this._charsetService.setgCharset(ie[Ae[0]],Le.CHARSETS[Ae[1]]||Le.DEFAULT_CHARSET):this.selectDefaultCharset()},Pe.prototype.index=function(){this._restrictCursor();var Ae=this._bufferService.buffer;this._bufferService.buffer.y++,Ae.y===Ae.scrollBottom+1?(Ae.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ae.y>=this._bufferService.rows&&(Ae.y=this._bufferService.rows-1),this._restrictCursor()},Pe.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},Pe.prototype.reverseIndex=function(){this._restrictCursor();var Ae=this._bufferService.buffer;if(Ae.y===Ae.scrollTop){var De=Ae.scrollBottom-Ae.scrollTop;Ae.lines.shiftElements(Ae.ybase+Ae.y,De,1),Ae.lines.set(Ae.ybase+Ae.y,Ae.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom)}else Ae.y--,this._restrictCursor()},Pe.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},Pe.prototype.reset=function(){this._curAttrData=le.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=le.DEFAULT_ATTR_DATA.clone()},Pe.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},Pe.prototype.setgLevel=function(Ae){this._charsetService.setgLevel(Ae)},Pe.prototype.screenAlignmentPattern=function(){var Ae=new ce.CellData;Ae.content=1<<22|69,Ae.fg=this._curAttrData.fg,Ae.bg=this._curAttrData.bg;var De=this._bufferService.buffer;this._setCursor(0,0);for(var ze=0;ze<this._bufferService.rows;++ze){var Ze=De.ybase+De.y+ze,Xe=De.lines.get(Ze);Xe&&(Xe.fill(Ae),Xe.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},Pe}(ye.Disposable);Ee.InputHandler=Se},function(en,Ee,Me){"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(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Params=void 0;var me=function(){function Be(ke,Ce){if(ke===void 0&&(ke=32),Ce===void 0&&(Ce=32),this.maxLength=ke,this.maxSubParamsLength=Ce,Ce>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(ke),this.length=0,this._subParams=new Int32Array(Ce),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(ke),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Be.fromArray=function(ke){var Ce=new Be;if(!ke.length)return Ce;for(var Le=ke[0]instanceof Array?1:0;Le<ke.length;++Le){var he=ke[Le];if(he instanceof Array)for(var ye=0;ye<he.length;++ye)Ce.addSubParam(he[ye]);else Ce.addParam(he)}return Ce},Be.prototype.clone=function(){var ke=new Be(this.maxLength,this.maxSubParamsLength);return ke.params.set(this.params),ke.length=this.length,ke._subParams.set(this._subParams),ke._subParamsLength=this._subParamsLength,ke._subParamsIdx.set(this._subParamsIdx),ke._rejectDigits=this._rejectDigits,ke._rejectSubDigits=this._rejectSubDigits,ke._digitIsSub=this._digitIsSub,ke},Be.prototype.toArray=function(){for(var ke=[],Ce=0;Ce<this.length;++Ce){ke.push(this.params[Ce]);var Le=this._subParamsIdx[Ce]>>8,he=255&this._subParamsIdx[Ce];he-Le>0&&ke.push(Array.prototype.slice.call(this._subParams,Le,he))}return ke},Be.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Be.prototype.addParam=function(ke){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(ke<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=ke>2147483647?2147483647:ke}},Be.prototype.addSubParam=function(ke){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(ke<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=ke>2147483647?2147483647:ke,this._subParamsIdx[this.length-1]++}},Be.prototype.hasSubParams=function(ke){return(255&this._subParamsIdx[ke])-(this._subParamsIdx[ke]>>8)>0},Be.prototype.getSubParams=function(ke){var Ce=this._subParamsIdx[ke]>>8,Le=255&this._subParamsIdx[ke];return Le-Ce>0?this._subParams.subarray(Ce,Le):null},Be.prototype.getSubParamsAll=function(){for(var ke={},Ce=0;Ce<this.length;++Ce){var Le=this._subParamsIdx[Ce]>>8,he=255&this._subParamsIdx[Ce];he-Le>0&&(ke[Ce]=this._subParams.slice(Le,he))}return ke},Be.prototype.addDigit=function(ke){var Ce;if(!(this._rejectDigits||!(Ce=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var Le=this._digitIsSub?this._subParams:this.params,he=Le[Ce-1];Le[Ce-1]=~he?Math.min(10*he+ke,2147483647):ke}},Be}();Ee.Params=me},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.OscHandler=Ee.OscParser=void 0;var me=Me(23),Be=Me(8),ke=function(){function Le(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return Le.prototype.addHandler=function(he,ye){this._handlers[he]===void 0&&(this._handlers[he]=[]);var xe=this._handlers[he];return xe.push(ye),{dispose:function(){var ge=xe.indexOf(ye);ge!==-1&&xe.splice(ge,1)}}},Le.prototype.setHandler=function(he,ye){this._handlers[he]=[ye]},Le.prototype.clearHandler=function(he){this._handlers[he]&&delete this._handlers[he]},Le.prototype.setHandlerFallback=function(he){this._handlerFb=he},Le.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},Le.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},Le.prototype._start=function(){var he=this._handlers[this._id];if(he)for(var ye=he.length-1;ye>=0;ye--)he[ye].start();else this._handlerFb(this._id,"START")},Le.prototype._put=function(he,ye,xe){var ge=this._handlers[this._id];if(ge)for(var le=ge.length-1;le>=0;le--)ge[le].put(he,ye,xe);else this._handlerFb(this._id,"PUT",Be.utf32ToString(he,ye,xe))},Le.prototype._end=function(he){var ye=this._handlers[this._id];if(ye){for(var xe=ye.length-1;xe>=0&&ye[xe].end(he)===!1;xe--);for(xe--;xe>=0;xe--)ye[xe].end(!1)}else this._handlerFb(this._id,"END",he)},Le.prototype.start=function(){this.reset(),this._id=-1,this._state=1},Le.prototype.put=function(he,ye,xe){if(this._state!==3){if(this._state===1)for(;ye<xe;){var ge=he[ye++];if(ge===59){this._state=2,this._start();break}if(ge<48||57<ge)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+ge-48}this._state===2&&xe-ye>0&&this._put(he,ye,xe)}},Le.prototype.end=function(he){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(he)),this._id=-1,this._state=0)},Le}();Ee.OscParser=ke;var Ce=function(){function Le(he){this._handler=he,this._data="",this._hitLimit=!1}return Le.prototype.start=function(){this._data="",this._hitLimit=!1},Le.prototype.put=function(he,ye,xe){this._hitLimit||(this._data+=Be.utf32ToString(he,ye,xe),this._data.length>me.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},Le.prototype.end=function(he){var ye;return this._hitLimit?ye=!1:he&&(ye=this._handler(this._data)),this._data="",this._hitLimit=!1,ye},Le}();Ee.OscHandler=Ce},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.PAYLOAD_LIMIT=void 0,Ee.PAYLOAD_LIMIT=1e7},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DcsHandler=Ee.DcsParser=void 0;var me=Me(8),Be=Me(21),ke=Me(23),Ce=[],Le=function(){function ye(){this._handlers=Object.create(null),this._active=Ce,this._ident=0,this._handlerFb=function(){}}return ye.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},ye.prototype.addHandler=function(xe,ge){this._handlers[xe]===void 0&&(this._handlers[xe]=[]);var le=this._handlers[xe];return le.push(ge),{dispose:function(){var ve=le.indexOf(ge);ve!==-1&&le.splice(ve,1)}}},ye.prototype.setHandler=function(xe,ge){this._handlers[xe]=[ge]},ye.prototype.clearHandler=function(xe){this._handlers[xe]&&delete this._handlers[xe]},ye.prototype.setHandlerFallback=function(xe){this._handlerFb=xe},ye.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=Ce,this._ident=0},ye.prototype.hook=function(xe,ge){if(this.reset(),this._ident=xe,this._active=this._handlers[xe]||Ce,this._active.length)for(var le=this._active.length-1;le>=0;le--)this._active[le].hook(ge);else this._handlerFb(this._ident,"HOOK",ge)},ye.prototype.put=function(xe,ge,le){if(this._active.length)for(var ve=this._active.length-1;ve>=0;ve--)this._active[ve].put(xe,ge,le);else this._handlerFb(this._ident,"PUT",me.utf32ToString(xe,ge,le))},ye.prototype.unhook=function(xe){if(this._active.length){for(var ge=this._active.length-1;ge>=0&&this._active[ge].unhook(xe)===!1;ge--);for(ge--;ge>=0;ge--)this._active[ge].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",xe);this._active=Ce,this._ident=0},ye}();Ee.DcsParser=Le;var he=function(){function ye(xe){this._handler=xe,this._data="",this._hitLimit=!1}return ye.prototype.hook=function(xe){this._params=xe.clone(),this._data="",this._hitLimit=!1},ye.prototype.put=function(xe,ge,le){this._hitLimit||(this._data+=me.utf32ToString(xe,ge,le),this._data.length>ke.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},ye.prototype.unhook=function(xe){var ge;return this._hitLimit?ge=!1:xe&&(ge=this._handler(this._data,this._params||new Be.Params)),this._params=void 0,this._data="",this._hitLimit=!1,ge},ye}();Ee.DcsHandler=he},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.removeTerminalFromCache=Ee.acquireCharAtlas=void 0;var me=Me(26),Be=Me(43),ke=[];Ee.acquireCharAtlas=function(Ce,Le,he,ye,xe){for(var ge=me.generateConfig(ye,xe,Ce,he),le=0;le<ke.length;le++){var ve=(de=ke[le]).ownedBy.indexOf(Le);if(ve>=0){if(me.configEquals(de.config,ge))return de.atlas;de.ownedBy.length===1?(de.atlas.dispose(),ke.splice(le,1)):de.ownedBy.splice(ve,1);break}}for(le=0;le<ke.length;le++){var de=ke[le];if(me.configEquals(de.config,ge))return de.ownedBy.push(Le),de.atlas}var ce={atlas:new Be.DynamicCharAtlas(document,ge),config:ge,ownedBy:[Le]};return ke.push(ce),ce.atlas},Ee.removeTerminalFromCache=function(Ce){for(var Le=0;Le<ke.length;Le++){var he=ke[Le].ownedBy.indexOf(Ce);if(he!==-1){ke[Le].ownedBy.length===1?(ke[Le].atlas.dispose(),ke.splice(Le,1)):ke[Le].ownedBy.splice(he,1);break}}}},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.is256Color=Ee.configEquals=Ee.generateConfig=void 0;var me=Me(3);Ee.generateConfig=function(Be,ke,Ce,Le){var he={foreground:Le.foreground,background:Le.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:Le.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Be,scaledCharHeight:ke,fontFamily:Ce.fontFamily,fontSize:Ce.fontSize,fontWeight:Ce.fontWeight,fontWeightBold:Ce.fontWeightBold,allowTransparency:Ce.allowTransparency,colors:he}},Ee.configEquals=function(Be,ke){for(var Ce=0;Ce<Be.colors.ansi.length;Ce++)if(Be.colors.ansi[Ce].rgba!==ke.colors.ansi[Ce].rgba)return!1;return Be.devicePixelRatio===ke.devicePixelRatio&&Be.fontFamily===ke.fontFamily&&Be.fontSize===ke.fontSize&&Be.fontWeight===ke.fontWeight&&Be.fontWeightBold===ke.fontWeightBold&&Be.allowTransparency===ke.allowTransparency&&Be.scaledCharWidth===ke.scaledCharWidth&&Be.scaledCharHeight===ke.scaledCharHeight&&Be.colors.foreground===ke.colors.foreground&&Be.colors.background===ke.colors.background},Ee.is256Color=function(Be){return Be<me.DEFAULT_COLOR}},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ColorManager=Ee.DEFAULT_ANSI_COLORS=void 0;var me=Me(10),Be=Me(45),ke=me.css.toColor("#ffffff"),Ce=me.css.toColor("#000000"),Le=me.css.toColor("#ffffff"),he=me.css.toColor("#000000"),ye={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};Ee.DEFAULT_ANSI_COLORS=function(){for(var ge=[me.css.toColor("#2e3436"),me.css.toColor("#cc0000"),me.css.toColor("#4e9a06"),me.css.toColor("#c4a000"),me.css.toColor("#3465a4"),me.css.toColor("#75507b"),me.css.toColor("#06989a"),me.css.toColor("#d3d7cf"),me.css.toColor("#555753"),me.css.toColor("#ef2929"),me.css.toColor("#8ae234"),me.css.toColor("#fce94f"),me.css.toColor("#729fcf"),me.css.toColor("#ad7fa8"),me.css.toColor("#34e2e2"),me.css.toColor("#eeeeec")],le=[0,95,135,175,215,255],ve=0;ve<216;ve++){var de=le[ve/36%6|0],ce=le[ve/6%6|0],z=le[ve%6];ge.push({css:me.channels.toCss(de,ce,z),rgba:me.channels.toRgba(de,ce,z)})}for(ve=0;ve<24;ve++){var ee=8+10*ve;ge.push({css:me.channels.toCss(ee,ee,ee),rgba:me.channels.toRgba(ee,ee,ee)})}return ge}();var xe=function(){function ge(le,ve){this.allowTransparency=ve;var de=le.createElement("canvas");de.width=1,de.height=1;var ce=de.getContext("2d");if(!ce)throw new Error("Could not get rendering context");this._ctx=ce,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new Be.ColorContrastCache,this.colors={foreground:ke,background:Ce,cursor:Le,cursorAccent:he,selectionTransparent:ye,selectionOpaque:me.color.blend(Ce,ye),ansi:Ee.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return ge.prototype.onOptionsChange=function(le){le==="minimumContrastRatio"&&this._contrastCache.clear()},ge.prototype.setTheme=function(le){le===void 0&&(le={}),this.colors.foreground=this._parseColor(le.foreground,ke),this.colors.background=this._parseColor(le.background,Ce),this.colors.cursor=this._parseColor(le.cursor,Le,!0),this.colors.cursorAccent=this._parseColor(le.cursorAccent,he,!0),this.colors.selectionTransparent=this._parseColor(le.selection,ye,!0),this.colors.selectionOpaque=me.color.blend(this.colors.background,this.colors.selectionTransparent),me.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=me.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(le.black,Ee.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(le.red,Ee.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(le.green,Ee.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(le.yellow,Ee.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(le.blue,Ee.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(le.magenta,Ee.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(le.cyan,Ee.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(le.white,Ee.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(le.brightBlack,Ee.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(le.brightRed,Ee.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(le.brightGreen,Ee.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(le.brightYellow,Ee.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(le.brightBlue,Ee.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(le.brightMagenta,Ee.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(le.brightCyan,Ee.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(le.brightWhite,Ee.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},ge.prototype._parseColor=function(le,ve,de){if(de===void 0&&(de=this.allowTransparency),le===void 0)return ve;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=le,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+le+" is invalid using fallback "+ve.css),ve;this._ctx.fillRect(0,0,1,1);var ce=this._ctx.getImageData(0,0,1,1).data;if(ce[3]!==255){if(!de)return console.warn("Color: "+le+" is using transparency, but allowTransparency is false. Using fallback "+ve.css+"."),ve;var z=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(Se){return Number(Se)}),ee=z[0],oe=z[1],ie=z[2],se=z[3],ue=Math.round(255*se);return{rgba:me.channels.toRgba(ee,oe,ie,ue),css:le}}return{css:this._ctx.fillStyle,rgba:me.channels.toRgba(ce[0],ce[1],ce[2],ce[3])}},ge}();Ee.ColorManager=xe},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.throwIfFalsy=void 0,Ee.throwIfFalsy=function(me){if(!me)throw new Error("value must not be falsy");return me}},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(xe,ge){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ve){le.__proto__=ve}||function(le,ve){for(var de in ve)ve.hasOwnProperty(de)&&(le[de]=ve[de])})(xe,ge)},function(xe,ge){function le(){this.constructor=xe}me(xe,ge),xe.prototype=ge===null?Object.create(ge):(le.prototype=ge.prototype,new le)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharacterJoinerRegistry=Ee.JoinedCellData=void 0;var ke=Me(6),Ce=Me(3),Le=Me(4),he=function(xe){function ge(le,ve,de){var ce=xe.call(this)||this;return ce.content=0,ce.combinedData="",ce.fg=le.fg,ce.bg=le.bg,ce.combinedData=ve,ce._width=de,ce}return Be(ge,xe),ge.prototype.isCombined=function(){return 2097152},ge.prototype.getWidth=function(){return this._width},ge.prototype.getChars=function(){return this.combinedData},ge.prototype.getCode=function(){return 2097151},ge.prototype.setFromCharData=function(le){throw new Error("not implemented")},ge.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},ge}(ke.AttributeData);Ee.JoinedCellData=he;var ye=function(){function xe(ge){this._bufferService=ge,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Le.CellData}return xe.prototype.registerCharacterJoiner=function(ge){var le={id:this._nextCharacterJoinerId++,handler:ge};return this._characterJoiners.push(le),le.id},xe.prototype.deregisterCharacterJoiner=function(ge){for(var le=0;le<this._characterJoiners.length;le++)if(this._characterJoiners[le].id===ge)return this._characterJoiners.splice(le,1),!0;return!1},xe.prototype.getJoinedCharacters=function(ge){if(this._characterJoiners.length===0)return[];var le=this._bufferService.buffer.lines.get(ge);if(!le||le.length===0)return[];for(var ve=[],de=le.translateToString(!0),ce=0,z=0,ee=0,oe=le.getFg(0),ie=le.getBg(0),se=0;se<le.getTrimmedLength();se++)if(le.loadCell(se,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==oe||this._workCell.bg!==ie){if(se-ce>1)for(var ue=this._getJoinedRanges(de,ee,z,le,ce),Se=0;Se<ue.length;Se++)ve.push(ue[Se]);ce=se,ee=z,oe=this._workCell.fg,ie=this._workCell.bg}z+=this._workCell.getChars().length||Ce.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-ce>1)for(ue=this._getJoinedRanges(de,ee,z,le,ce),Se=0;Se<ue.length;Se++)ve.push(ue[Se]);return ve},xe.prototype._getJoinedRanges=function(ge,le,ve,de,ce){for(var z=ge.substring(le,ve),ee=this._characterJoiners[0].handler(z),oe=1;oe<this._characterJoiners.length;oe++)for(var ie=this._characterJoiners[oe].handler(z),se=0;se<ie.length;se++)xe._mergeRanges(ee,ie[se]);return this._stringRangesToCellRanges(ee,de,ce),ee},xe.prototype._stringRangesToCellRanges=function(ge,le,ve){var de=0,ce=!1,z=0,ee=ge[de];if(ee){for(var oe=ve;oe<this._bufferService.cols;oe++){var ie=le.getWidth(oe),se=le.getString(oe).length||Ce.WHITESPACE_CELL_CHAR.length;if(ie!==0){if(!ce&&ee[0]<=z&&(ee[0]=oe,ce=!0),ee[1]<=z){if(ee[1]=oe,!(ee=ge[++de]))break;ee[0]<=z?(ee[0]=oe,ce=!0):ce=!1}z+=se}}ee&&(ee[1]=this._bufferService.cols)}},xe._mergeRanges=function(ge,le){for(var ve=!1,de=0;de<ge.length;de++){var ce=ge[de];if(ve){if(le[1]<=ce[0])return ge[de-1][1]=le[1],ge;if(le[1]<=ce[1])return ge[de-1][1]=Math.max(le[1],ce[1]),ge.splice(de,1),ge;ge.splice(de,1),de--}else{if(le[1]<=ce[0])return ge.splice(de,0,le),ge;if(le[1]<=ce[1])return ce[0]=Math.min(le[0],ce[0]),ge;le[0]<ce[1]&&(ce[0]=Math.min(le[0],ce[0]),ve=!0)}}return ve?ge[ge.length-1][1]=le[1]:ge.push(le),ge},xe}();Ee.CharacterJoinerRegistry=ye},function(en,Ee,Me){"use strict";function me(Be,ke){var Ce=ke.getBoundingClientRect();return[Be.clientX-Ce.left,Be.clientY-Ce.top]}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getRawByteCoords=Ee.getCoords=Ee.getCoordsRelativeToElement=void 0,Ee.getCoordsRelativeToElement=me,Ee.getCoords=function(Be,ke,Ce,Le,he,ye,xe,ge){if(he){var le=me(Be,ke);if(le)return le[0]=Math.ceil((le[0]+(ge?ye/2:0))/ye),le[1]=Math.ceil(le[1]/xe),le[0]=Math.min(Math.max(le[0],1),Ce+(ge?1:0)),le[1]=Math.min(Math.max(le[1],1),Le),le}},Ee.getRawByteCoords=function(Be){if(Be)return{x:Be[0]+32,y:Be[1]+32}}},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.RenderDebouncer=void 0;var me=function(){function Be(ke){this._renderCallback=ke}return Be.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Be.prototype.refresh=function(ke,Ce,Le){var he=this;this._rowCount=Le,ke=ke!==void 0?ke:0,Ce=Ce!==void 0?Ce:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,ke):ke,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,Ce):Ce,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return he._innerRefresh()}))},Be.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var ke=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(ke,Ce)}},Be}();Ee.RenderDebouncer=me},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Ce,Le){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,ye){he.__proto__=ye}||function(he,ye){for(var xe in ye)ye.hasOwnProperty(xe)&&(he[xe]=ye[xe])})(Ce,Le)},function(Ce,Le){function he(){this.constructor=Ce}me(Ce,Le),Ce.prototype=Le===null?Object.create(Le):(he.prototype=Le.prototype,new he)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ScreenDprMonitor=void 0;var ke=function(Ce){function Le(){var he=Ce!==null&&Ce.apply(this,arguments)||this;return he._currentDevicePixelRatio=window.devicePixelRatio,he}return Be(Le,Ce),Le.prototype.setListener=function(he){var ye=this;this._listener&&this.clearListener(),this._listener=he,this._outerListener=function(){ye._listener&&(ye._listener(window.devicePixelRatio,ye._currentDevicePixelRatio),ye._updateDpr())},this._updateDpr()},Le.prototype.dispose=function(){Ce.prototype.dispose.call(this),this.clearListener()},Le.prototype._updateDpr=function(){var he;this._outerListener&&((he=this._resolutionMediaMatchList)===null||he===void 0||he.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},Le.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)},Le}(Me(2).Disposable);Ee.ScreenDprMonitor=ke},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.clone=void 0,Ee.clone=function me(Be,ke){if(ke===void 0&&(ke=5),typeof Be!="object")return Be;var Ce=Array.isArray(Be)?[]:{};for(var Le in Be)Ce[Le]=ke<=1?Be[Le]:Be[Le]?me(Be[Le],ke-1):Be[Le];return Ce}},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Terminal=void 0;var me=Me(4),Be=Me(35),ke=Me(18),Ce=Me(0),Le=Me(83),he=function(){function de(ce){this._core=new Be.Terminal(ce),this._addonManager=new Le.AddonManager}return de.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(de.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new le(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"unicode",{get:function(){return this._checkProposedApi(),new ve(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"buffer",{get:function(){return this._checkProposedApi(),new xe(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),de.prototype.blur=function(){this._core.blur()},de.prototype.focus=function(){this._core.focus()},de.prototype.resize=function(ce,z){this._verifyIntegers(ce,z),this._core.resize(ce,z)},de.prototype.open=function(ce){this._core.open(ce)},de.prototype.attachCustomKeyEventHandler=function(ce){this._core.attachCustomKeyEventHandler(ce)},de.prototype.registerLinkMatcher=function(ce,z,ee){return this._checkProposedApi(),this._core.registerLinkMatcher(ce,z,ee)},de.prototype.deregisterLinkMatcher=function(ce){this._checkProposedApi(),this._core.deregisterLinkMatcher(ce)},de.prototype.registerLinkProvider=function(ce){return this._checkProposedApi(),this._core.registerLinkProvider(ce)},de.prototype.registerCharacterJoiner=function(ce){return this._checkProposedApi(),this._core.registerCharacterJoiner(ce)},de.prototype.deregisterCharacterJoiner=function(ce){this._checkProposedApi(),this._core.deregisterCharacterJoiner(ce)},de.prototype.registerMarker=function(ce){return this._checkProposedApi(),this._verifyIntegers(ce),this._core.addMarker(ce)},de.prototype.addMarker=function(ce){return this.registerMarker(ce)},de.prototype.hasSelection=function(){return this._core.hasSelection()},de.prototype.select=function(ce,z,ee){this._verifyIntegers(ce,z,ee),this._core.select(ce,z,ee)},de.prototype.getSelection=function(){return this._core.getSelection()},de.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},de.prototype.clearSelection=function(){this._core.clearSelection()},de.prototype.selectAll=function(){this._core.selectAll()},de.prototype.selectLines=function(ce,z){this._verifyIntegers(ce,z),this._core.selectLines(ce,z)},de.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},de.prototype.scrollLines=function(ce){this._verifyIntegers(ce),this._core.scrollLines(ce)},de.prototype.scrollPages=function(ce){this._verifyIntegers(ce),this._core.scrollPages(ce)},de.prototype.scrollToTop=function(){this._core.scrollToTop()},de.prototype.scrollToBottom=function(){this._core.scrollToBottom()},de.prototype.scrollToLine=function(ce){this._verifyIntegers(ce),this._core.scrollToLine(ce)},de.prototype.clear=function(){this._core.clear()},de.prototype.write=function(ce,z){this._core.write(ce,z)},de.prototype.writeUtf8=function(ce,z){this._core.write(ce,z)},de.prototype.writeln=function(ce,z){this._core.write(ce),this._core.write(`\r
|
|
|
`,z)},de.prototype.paste=function(ce){this._core.paste(ce)},de.prototype.getOption=function(ce){return this._core.optionsService.getOption(ce)},de.prototype.setOption=function(ce,z){this._core.optionsService.setOption(ce,z)},de.prototype.refresh=function(ce,z){this._verifyIntegers(ce,z),this._core.refresh(ce,z)},de.prototype.reset=function(){this._core.reset()},de.prototype.loadAddon=function(ce){return this._addonManager.loadAddon(this,ce)},Object.defineProperty(de,"strings",{get:function(){return ke},enumerable:!1,configurable:!0}),de.prototype._verifyIntegers=function(){for(var ce=[],z=0;z<arguments.length;z++)ce[z]=arguments[z];for(var ee=0,oe=ce;ee<oe.length;ee++){var ie=oe[ee];if(ie===1/0||isNaN(ie)||ie%1!=0)throw new Error("This API only accepts integers")}},de}();Ee.Terminal=he;var ye=function(){function de(ce,z){this._buffer=ce,this.type=z}return de.prototype.init=function(ce){return this._buffer=ce,this},Object.defineProperty(de.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),de.prototype.getLine=function(ce){var z=this._buffer.lines.get(ce);if(z)return new ge(z)},de.prototype.getNullCell=function(){return new me.CellData},de}(),xe=function(){function de(ce){var z=this;this._buffers=ce,this._onBufferChange=new Ce.EventEmitter,this._normal=new ye(this._buffers.normal,"normal"),this._alternate=new ye(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return z._onBufferChange.fire(z.active)})}return Object.defineProperty(de.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(de.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(de.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),de}(),ge=function(){function de(ce){this._line=ce}return Object.defineProperty(de.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),de.prototype.getCell=function(ce,z){if(!(ce<0||ce>=this._line.length))return z?(this._line.loadCell(ce,z),z):this._line.loadCell(ce,new me.CellData)},de.prototype.translateToString=function(ce,z,ee){return this._line.translateToString(ce,z,ee)},de}(),le=function(){function de(ce){this._core=ce}return de.prototype.registerCsiHandler=function(ce,z){return this._core.addCsiHandler(ce,function(ee){return z(ee.toArray())})},de.prototype.addCsiHandler=function(ce,z){return this.registerCsiHandler(ce,z)},de.prototype.registerDcsHandler=function(ce,z){return this._core.addDcsHandler(ce,function(ee,oe){return z(ee,oe.toArray())})},de.prototype.addDcsHandler=function(ce,z){return this.registerDcsHandler(ce,z)},de.prototype.registerEscHandler=function(ce,z){return this._core.addEscHandler(ce,z)},de.prototype.addEscHandler=function(ce,z){return this.registerEscHandler(ce,z)},de.prototype.registerOscHandler=function(ce,z){return this._core.addOscHandler(ce,z)},de.prototype.addOscHandler=function(ce,z){return this.registerOscHandler(ce,z)},de}(),ve=function(){function de(ce){this._core=ce}return de.prototype.register=function(ce){this._core.unicodeService.register(ce)},Object.defineProperty(de.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(ce){this._core.unicodeService.activeVersion=ce},enumerable:!1,configurable:!0}),de}()},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Ct,et){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(yt,st){yt.__proto__=st}||function(yt,st){for(var zt in st)st.hasOwnProperty(zt)&&(yt[zt]=st[zt])})(Ct,et)},function(Ct,et){function yt(){this.constructor=Ct}me(Ct,et),Ct.prototype=et===null?Object.create(et):(yt.prototype=et.prototype,new yt)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Terminal=void 0;var ke=Me(36),Ce=Me(37),Le=Me(38),he=Me(12),ye=Me(19),xe=Me(40),ge=Me(50),le=Me(51),ve=Me(11),de=Me(7),ce=Me(18),z=Me(54),ee=Me(55),oe=Me(56),ie=Me(57),se=Me(59),ue=Me(0),Se=Me(16),we=Me(27),Pe=Me(60),Ae=Me(5),De=Me(61),ze=Me(62),Ze=Me(63),Xe=Me(64),Ge=Me(65),ft=typeof window!="undefined"?window.document:null,at=function(Ct){function et(yt){yt===void 0&&(yt={});var st=Ct.call(this,yt)||this;return st.browser=ve,st._keyDownHandled=!1,st._onCursorMove=new ue.EventEmitter,st._onKey=new ue.EventEmitter,st._onRender=new ue.EventEmitter,st._onSelectionChange=new ue.EventEmitter,st._onTitleChange=new ue.EventEmitter,st._onFocus=new ue.EventEmitter,st._onBlur=new ue.EventEmitter,st._onA11yCharEmitter=new ue.EventEmitter,st._onA11yTabEmitter=new ue.EventEmitter,st._setup(),st.linkifier=st._instantiationService.createInstance(ge.Linkifier),st.linkifier2=st.register(st._instantiationService.createInstance(Ze.Linkifier2)),st.register(st._inputHandler.onRequestBell(function(){return st.bell()})),st.register(st._inputHandler.onRequestRefreshRows(function(zt,lt){return st.refresh(zt,lt)})),st.register(st._inputHandler.onRequestReset(function(){return st.reset()})),st.register(st._inputHandler.onRequestScroll(function(zt,lt){return st.scroll(zt,lt||void 0)})),st.register(st._inputHandler.onRequestWindowsOptionsReport(function(zt){return st._reportWindowsOptions(zt)})),st.register(ue.forwardEvent(st._inputHandler.onCursorMove,st._onCursorMove)),st.register(ue.forwardEvent(st._inputHandler.onTitleChange,st._onTitleChange)),st.register(ue.forwardEvent(st._inputHandler.onA11yChar,st._onA11yCharEmitter)),st.register(ue.forwardEvent(st._inputHandler.onA11yTab,st._onA11yTabEmitter)),st.register(st._bufferService.onResize(function(zt){return st._afterResize(zt.cols,zt.rows)})),st}return Be(et,Ct),Object.defineProperty(et.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(et.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),et.prototype.dispose=function(){var yt,st,zt;this._isDisposed||(Ct.prototype.dispose.call(this),(yt=this._renderService)===null||yt===void 0||yt.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(zt=(st=this.element)===null||st===void 0?void 0:st.parentNode)===null||zt===void 0||zt.removeChild(this.element))},et.prototype._setup=function(){Ct.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(et.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),et.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},et.prototype._updateOptions=function(yt){var st,zt,lt,tt;switch(Ct.prototype._updateOptions.call(this,yt),yt){case"fontFamily":case"fontSize":(st=this._renderService)===null||st===void 0||st.clear(),(zt=this._charSizeService)===null||zt===void 0||zt.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":(lt=this.viewport)===null||lt===void 0||lt.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)):((tt=this._accessibilityManager)===null||tt===void 0||tt.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},et.prototype._onTextAreaFocus=function(yt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(he.C0.ESC+"[I"),this.updateCursorStyle(yt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},et.prototype.blur=function(){var yt;return(yt=this.textarea)===null||yt===void 0?void 0:yt.blur()},et.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(he.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},et.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var yt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),st=this._bufferService.buffer.y*yt,zt=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=zt+"px",this.textarea.style.top=st+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=yt+"px",this.textarea.style.lineHeight=yt+"px",this.textarea.style.zIndex="-5"}},et.prototype._initGlobal=function(){var yt=this;this._bindKeys(),this.register(de.addDisposableDomListener(this.element,"copy",function(zt){yt.hasSelection()&&Le.copyHandler(zt,yt._selectionService)}));var st=function(zt){return Le.handlePasteEvent(zt,yt.textarea,yt._coreService)};this.register(de.addDisposableDomListener(this.textarea,"paste",st)),this.register(de.addDisposableDomListener(this.element,"paste",st)),ve.isFirefox?this.register(de.addDisposableDomListener(this.element,"mousedown",function(zt){zt.button===2&&Le.rightClickHandler(zt,yt.textarea,yt.screenElement,yt._selectionService,yt.options.rightClickSelectsWord)})):this.register(de.addDisposableDomListener(this.element,"contextmenu",function(zt){Le.rightClickHandler(zt,yt.textarea,yt.screenElement,yt._selectionService,yt.options.rightClickSelectsWord)})),ve.isLinux&&this.register(de.addDisposableDomListener(this.element,"auxclick",function(zt){zt.button===1&&Le.moveTextAreaUnderMouseCursor(zt,yt.textarea,yt.screenElement)}))},et.prototype._bindKeys=function(){var yt=this;this.register(de.addDisposableDomListener(this.textarea,"keyup",function(st){return yt._keyUp(st)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keydown",function(st){return yt._keyDown(st)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keypress",function(st){return yt._keyPress(st)},!0)),this.register(de.addDisposableDomListener(this.textarea,"compositionstart",function(){return yt._compositionHelper.compositionstart()})),this.register(de.addDisposableDomListener(this.textarea,"compositionupdate",function(st){return yt._compositionHelper.compositionupdate(st)})),this.register(de.addDisposableDomListener(this.textarea,"compositionend",function(){return yt._compositionHelper.compositionend()})),this.register(this.onRender(function(){return yt._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(st){return yt._queueLinkification(st.start,st.end)}))},et.prototype.open=function(yt){var st=this;if(!yt)throw new Error("Terminal requires a parent element.");ft.body.contains(yt)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=yt.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"),yt.appendChild(this.element);var zt=ft.createDocumentFragment();this._viewportElement=ft.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),zt.appendChild(this._viewportElement),this._viewportScrollArea=ft.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=ft.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=ft.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),zt.appendChild(this.screenElement),this.textarea=ft.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",ce.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(de.addDisposableDomListener(this.textarea,"focus",function(ut){return st._onTextAreaFocus(ut)})),this.register(de.addDisposableDomListener(this.textarea,"blur",function(){return st._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var lt=this._instantiationService.createInstance(Xe.CoreBrowserService,this.textarea);this._instantiationService.setService(Ae.ICoreBrowserService,lt),this._charSizeService=this._instantiationService.createInstance(De.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(Ae.ICharSizeService,this._charSizeService),this._compositionView=ft.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(ke.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(zt),this._theme=this.options.theme||this._theme,this._colorManager=new we.ColorManager(ft,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(ut){return st._colorManager.onOptionsChange(ut)})),this._colorManager.setTheme(this._theme);var tt=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(Pe.RenderService,tt,this.rows,this.screenElement)),this._instantiationService.setService(Ae.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(ut){return st._onRender.fire(ut)})),this.onResize(function(ut){return st._renderService.resize(ut.cols,ut.rows)}),this._soundService=this._instantiationService.createInstance(z.SoundService),this._instantiationService.setService(Ae.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(ze.MouseService),this._instantiationService.setService(Ae.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(Ce.Viewport,function(ut,mt){return st.scrollLines(ut,mt)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return st.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){st._renderService.onCursorMove(),st._syncTextArea()})),this.register(this.onResize(function(){return st._renderService.onResize(st.cols,st.rows)})),this.register(this.onBlur(function(){return st._renderService.onBlur()})),this.register(this.onFocus(function(){return st._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return st.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(le.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(Ae.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(ut){return st.scrollLines(ut.amount,ut.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return st._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(ut){return st._renderService.onSelectionChanged(ut.start,ut.end,ut.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(ut){st.textarea.value=ut,st.textarea.focus(),st.textarea.select()})),this.register(this.onScroll(function(){st.viewport.syncScrollArea(),st._selectionService.refresh()})),this.register(de.addDisposableDomListener(this._viewportElement,"scroll",function(){return st._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(ee.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return st._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(de.addDisposableDomListener(this.element,"mousedown",function(ut){return st._selectionService.onMouseDown(ut)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},et.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(xe.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(ie.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},et.prototype._setTheme=function(yt){var st,zt,lt;this._theme=yt,(st=this._colorManager)===null||st===void 0||st.setTheme(yt),(zt=this._renderService)===null||zt===void 0||zt.setColors(this._colorManager.colors),(lt=this.viewport)===null||lt===void 0||lt.onThemeChange(this._colorManager.colors)},et.prototype.bindMouse=function(){var yt=this,st=this,zt=this.element;function lt(Ft){var Ht,hn,Qt=st._mouseService.getRawByteCoords(Ft,st.screenElement,st.cols,st.rows);if(!Qt)return!1;switch(Ft.overrideType||Ft.type){case"mousemove":hn=32,Ft.buttons===void 0?(Ht=3,Ft.button!==void 0&&(Ht=Ft.button<3?Ft.button:3)):Ht=1&Ft.buttons?0:4&Ft.buttons?1:2&Ft.buttons?2:3;break;case"mouseup":hn=0,Ht=Ft.button<3?Ft.button:3;break;case"mousedown":hn=1,Ht=Ft.button<3?Ft.button:3;break;case"wheel":Ft.deltaY!==0&&(hn=Ft.deltaY<0?0:1),Ht=4;break;default:return!1}return!(hn===void 0||Ht===void 0||Ht>4)&&st._coreMouseService.triggerMouseEvent({col:Qt.x-33,row:Qt.y-33,button:Ht,action:hn,ctrl:Ft.ctrlKey,alt:Ft.altKey,shift:Ft.shiftKey})}var tt={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ut=function(Ft){return lt(Ft),Ft.buttons||(yt._document.removeEventListener("mouseup",tt.mouseup),tt.mousedrag&&yt._document.removeEventListener("mousemove",tt.mousedrag)),yt.cancel(Ft)},mt=function(Ft){return lt(Ft),Ft.preventDefault(),yt.cancel(Ft)},Pt=function(Ft){Ft.buttons&<(Ft)},gt=function(Ft){Ft.buttons||lt(Ft)};this.register(this._coreMouseService.onProtocolChange(function(Ft){Ft?(yt.optionsService.options.logLevel==="debug"&&yt._logService.debug("Binding to mouse events:",yt._coreMouseService.explainEvents(Ft)),yt.element.classList.add("enable-mouse-events"),yt._selectionService.disable()):(yt._logService.debug("Unbinding from mouse events."),yt.element.classList.remove("enable-mouse-events"),yt._selectionService.enable()),8&Ft?tt.mousemove||(zt.addEventListener("mousemove",gt),tt.mousemove=gt):(zt.removeEventListener("mousemove",tt.mousemove),tt.mousemove=null),16&Ft?tt.wheel||(zt.addEventListener("wheel",mt,{passive:!1}),tt.wheel=mt):(zt.removeEventListener("wheel",tt.wheel),tt.wheel=null),2&Ft?tt.mouseup||(tt.mouseup=ut):(yt._document.removeEventListener("mouseup",tt.mouseup),tt.mouseup=null),4&Ft?tt.mousedrag||(tt.mousedrag=Pt):(yt._document.removeEventListener("mousemove",tt.mousedrag),tt.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(de.addDisposableDomListener(zt,"mousedown",function(Ft){if(Ft.preventDefault(),yt.focus(),yt._coreMouseService.areMouseEventsActive&&!yt._selectionService.shouldForceSelection(Ft))return lt(Ft),tt.mouseup&&yt._document.addEventListener("mouseup",tt.mouseup),tt.mousedrag&&yt._document.addEventListener("mousemove",tt.mousedrag),yt.cancel(Ft)})),this.register(de.addDisposableDomListener(zt,"wheel",function(Ft){if(!tt.wheel){if(!yt.buffer.hasScrollback){var Ht=yt.viewport.getLinesScrolled(Ft);if(Ht===0)return;for(var hn=he.C0.ESC+(yt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Ft.deltaY<0?"A":"B"),Qt="",bn=0;bn<Math.abs(Ht);bn++)Qt+=hn;yt._coreService.triggerDataEvent(Qt,!0)}}},{passive:!0})),this.register(de.addDisposableDomListener(zt,"wheel",function(Ft){if(!tt.wheel)return yt.viewport.onWheel(Ft)?void 0:yt.cancel(Ft)},{passive:!1})),this.register(de.addDisposableDomListener(zt,"touchstart",function(Ft){if(!yt._coreMouseService.areMouseEventsActive)return yt.viewport.onTouchStart(Ft),yt.cancel(Ft)},{passive:!0})),this.register(de.addDisposableDomListener(zt,"touchmove",function(Ft){if(!yt._coreMouseService.areMouseEventsActive)return yt.viewport.onTouchMove(Ft)?void 0:yt.cancel(Ft)},{passive:!1}))},et.prototype.refresh=function(yt,st){var zt;(zt=this._renderService)===null||zt===void 0||zt.refreshRows(yt,st)},et.prototype._queueLinkification=function(yt,st){var zt;(zt=this.linkifier)===null||zt===void 0||zt.linkifyRows(yt,st)},et.prototype.updateCursorStyle=function(yt){this._selectionService&&this._selectionService.shouldColumnSelect(yt)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},et.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},et.prototype.scrollLines=function(yt,st){Ct.prototype.scrollLines.call(this,yt,st),this.refresh(0,this.rows-1)},et.prototype.paste=function(yt){Le.paste(yt,this.textarea,this._coreService)},et.prototype.attachCustomKeyEventHandler=function(yt){this._customKeyEventHandler=yt},et.prototype.registerLinkMatcher=function(yt,st,zt){var lt=this.linkifier.registerLinkMatcher(yt,st,zt);return this.refresh(0,this.rows-1),lt},et.prototype.deregisterLinkMatcher=function(yt){this.linkifier.deregisterLinkMatcher(yt)&&this.refresh(0,this.rows-1)},et.prototype.registerLinkProvider=function(yt){return this.linkifier2.registerLinkProvider(yt)},et.prototype.registerCharacterJoiner=function(yt){var st=this._renderService.registerCharacterJoiner(yt);return this.refresh(0,this.rows-1),st},et.prototype.deregisterCharacterJoiner=function(yt){this._renderService.deregisterCharacterJoiner(yt)&&this.refresh(0,this.rows-1)},Object.defineProperty(et.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),et.prototype.addMarker=function(yt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+yt)},et.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},et.prototype.select=function(yt,st,zt){this._selectionService.setSelection(yt,st,zt)},et.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},et.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]}},et.prototype.clearSelection=function(){var yt;(yt=this._selectionService)===null||yt===void 0||yt.clearSelection()},et.prototype.selectAll=function(){var yt;(yt=this._selectionService)===null||yt===void 0||yt.selectAll()},et.prototype.selectLines=function(yt,st){var zt;(zt=this._selectionService)===null||zt===void 0||zt.selectLines(yt,st)},et.prototype._keyDown=function(yt){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(yt)===!1)return!1;if(!this._compositionHelper.keydown(yt))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var st=se.evaluateKeyboardEvent(yt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(yt),st.type===3||st.type===2){var zt=this.rows-1;return this.scrollLines(st.type===2?-zt:zt),this.cancel(yt,!0)}return st.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,yt)||(st.cancel&&this.cancel(yt,!0),!st.key||(st.key!==he.C0.ETX&&st.key!==he.C0.CR||(this.textarea.value=""),this._onKey.fire({key:st.key,domEvent:yt}),this._showCursor(),this._coreService.triggerDataEvent(st.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(yt,!0)))},et.prototype._isThirdLevelShift=function(yt,st){var zt=yt.isMac&&!this.options.macOptionIsMeta&&st.altKey&&!st.ctrlKey&&!st.metaKey||yt.isWindows&&st.altKey&&st.ctrlKey&&!st.metaKey;return st.type==="keypress"?zt:zt&&(!st.keyCode||st.keyCode>47)},et.prototype._keyUp=function(yt){this._customKeyEventHandler&&this._customKeyEventHandler(yt)===!1||(function(st){return st.keyCode===16||st.keyCode===17||st.keyCode===18}(yt)||this.focus(),this.updateCursorStyle(yt))},et.prototype._keyPress=function(yt){var st;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(yt)===!1)return!1;if(this.cancel(yt),yt.charCode)st=yt.charCode;else if(yt.which===null||yt.which===void 0)st=yt.keyCode;else{if(yt.which===0||yt.charCode===0)return!1;st=yt.which}return!(!st||(yt.altKey||yt.ctrlKey||yt.metaKey)&&!this._isThirdLevelShift(this.browser,yt))&&(st=String.fromCharCode(st),this._onKey.fire({key:st,domEvent:yt}),this._showCursor(),this._coreService.triggerDataEvent(st,!0),!0)},et.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},et.prototype.resize=function(yt,st){yt!==this.cols||st!==this.rows?Ct.prototype.resize.call(this,yt,st):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},et.prototype._afterResize=function(yt,st){var zt,lt;(zt=this._charSizeService)===null||zt===void 0||zt.measure(),(lt=this.viewport)===null||lt===void 0||lt.syncScrollArea(!0)},et.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 yt=1;yt<this.rows;yt++)this.buffer.lines.push(this.buffer.getBlankLine(Se.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},et.prototype.reset=function(){var yt,st;this.options.rows=this.rows,this.options.cols=this.cols;var zt=this._customKeyEventHandler;this._setup(),Ct.prototype.reset.call(this),(yt=this._selectionService)===null||yt===void 0||yt.reset(),this._customKeyEventHandler=zt,this.refresh(0,this.rows-1),(st=this.viewport)===null||st===void 0||st.syncScrollArea()},et.prototype._reportWindowsOptions=function(yt){if(this._renderService)switch(yt){case ye.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var st=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),zt=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(he.C0.ESC+"[4;"+zt+";"+st+"t");break;case ye.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var lt=this._renderService.dimensions.scaledCellWidth.toFixed(0),tt=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(he.C0.ESC+"[6;"+tt+";"+lt+"t")}},et.prototype.cancel=function(yt,st){if(this.options.cancelEvents||st)return yt.preventDefault(),yt.stopPropagation(),!1},et.prototype._visualBell=function(){return!1},et.prototype._soundBell=function(){return this.options.bellStyle==="sound"},et}(Ge.CoreTerminal);Ee.Terminal=at},function(en,Ee,Me){"use strict";var me=this&&this.__decorate||function(he,ye,xe,ge){var le,ve=arguments.length,de=ve<3?ye:ge===null?ge=Object.getOwnPropertyDescriptor(ye,xe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(he,ye,xe,ge);else for(var ce=he.length-1;ce>=0;ce--)(le=he[ce])&&(de=(ve<3?le(de):ve>3?le(ye,xe,de):le(ye,xe))||de);return ve>3&&de&&Object.defineProperty(ye,xe,de),de},Be=this&&this.__param||function(he,ye){return function(xe,ge){ye(xe,ge,he)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CompositionHelper=void 0;var ke=Me(5),Ce=Me(1),Le=function(){function he(ye,xe,ge,le,ve,de){this._textarea=ye,this._compositionView=xe,this._bufferService=ge,this._optionsService=le,this._charSizeService=ve,this._coreService=de,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(he.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),he.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},he.prototype.compositionupdate=function(ye){var xe=this;this._compositionView.textContent=ye.data,this.updateCompositionElements(),setTimeout(function(){xe._compositionPosition.end=xe._textarea.value.length},0)},he.prototype.compositionend=function(){this._finalizeComposition(!0)},he.prototype.keydown=function(ye){if(this._isComposing||this._isSendingComposition){if(ye.keyCode===229||ye.keyCode===16||ye.keyCode===17||ye.keyCode===18)return!1;this._finalizeComposition(!1)}return ye.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},he.prototype._finalizeComposition=function(ye){var xe=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,ye){var ge={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(xe._isSendingComposition){xe._isSendingComposition=!1;var ve=void 0;ve=xe._isComposing?xe._textarea.value.substring(ge.start,ge.end):xe._textarea.value.substring(ge.start),xe._coreService.triggerDataEvent(ve,!0)}},0)}else{this._isSendingComposition=!1;var le=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(le,!0)}},he.prototype._handleAnyTextareaChanges=function(){var ye=this,xe=this._textarea.value;setTimeout(function(){if(!ye._isComposing){var ge=ye._textarea.value.replace(xe,"");ge.length>0&&ye._coreService.triggerDataEvent(ge,!0)}},0)},he.prototype.updateCompositionElements=function(ye){var xe=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var ge=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),le=this._bufferService.buffer.y*ge,ve=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=ve+"px",this._compositionView.style.top=le+"px",this._compositionView.style.height=ge+"px",this._compositionView.style.lineHeight=ge+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var de=this._compositionView.getBoundingClientRect();this._textarea.style.left=ve+"px",this._textarea.style.top=le+"px",this._textarea.style.width=de.width+"px",this._textarea.style.height=de.height+"px",this._textarea.style.lineHeight=de.height+"px"}ye||setTimeout(function(){return xe.updateCompositionElements(!0)},0)}},he=me([Be(2,Ce.IBufferService),Be(3,Ce.IOptionsService),Be(4,ke.ICharSizeService),Be(5,Ce.ICoreService)],he)}();Ee.CompositionHelper=Le},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),ke=this&&this.__decorate||function(le,ve,de,ce){var z,ee=arguments.length,oe=ee<3?ve:ce===null?ce=Object.getOwnPropertyDescriptor(ve,de):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(le,ve,de,ce);else for(var ie=le.length-1;ie>=0;ie--)(z=le[ie])&&(oe=(ee<3?z(oe):ee>3?z(ve,de,oe):z(ve,de))||oe);return ee>3&&oe&&Object.defineProperty(ve,de,oe),oe},Ce=this&&this.__param||function(le,ve){return function(de,ce){ve(de,ce,le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Viewport=void 0;var Le=Me(2),he=Me(7),ye=Me(5),xe=Me(1),ge=function(le){function ve(de,ce,z,ee,oe,ie,se){var ue=le.call(this)||this;return ue._scrollLines=de,ue._viewportElement=ce,ue._scrollArea=z,ue._bufferService=ee,ue._optionsService=oe,ue._charSizeService=ie,ue._renderService=se,ue.scrollBarWidth=0,ue._currentRowHeight=0,ue._lastRecordedBufferLength=0,ue._lastRecordedViewportHeight=0,ue._lastRecordedBufferHeight=0,ue._lastTouchY=0,ue._lastScrollTop=0,ue._wheelPartialScroll=0,ue._refreshAnimationFrame=null,ue._ignoreNextScrollEvent=!1,ue.scrollBarWidth=ue._viewportElement.offsetWidth-ue._scrollArea.offsetWidth||15,ue.register(he.addDisposableDomListener(ue._viewportElement,"scroll",ue._onScroll.bind(ue))),setTimeout(function(){return ue.syncScrollArea()},0),ue}return Be(ve,le),ve.prototype.onThemeChange=function(de){this._viewportElement.style.backgroundColor=de.background.css},ve.prototype._refresh=function(de){var ce=this;if(de)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return ce._innerRefresh()}))},ve.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var de=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==de&&(this._lastRecordedBufferHeight=de,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var ce=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==ce&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=ce),this._refreshAnimationFrame=null},ve.prototype.syncScrollArea=function(de){if(de===void 0&&(de=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(de);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var ce=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===ce&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(de)}else this._refresh(de)},ve.prototype._onScroll=function(de){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var ce=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(ce,!0)}},ve.prototype._bubbleScroll=function(de,ce){var z=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(ce<0&&this._viewportElement.scrollTop!==0||ce>0&&z<this._lastRecordedBufferHeight)||(de.cancelable&&de.preventDefault(),!1)},ve.prototype.onWheel=function(de){var ce=this._getPixelsScrolled(de);return ce!==0&&(this._viewportElement.scrollTop+=ce,this._bubbleScroll(de,ce))},ve.prototype._getPixelsScrolled=function(de){if(de.deltaY===0)return 0;var ce=this._applyScrollModifier(de.deltaY,de);return de.deltaMode===WheelEvent.DOM_DELTA_LINE?ce*=this._currentRowHeight:de.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ce*=this._currentRowHeight*this._bufferService.rows),ce},ve.prototype.getLinesScrolled=function(de){if(de.deltaY===0)return 0;var ce=this._applyScrollModifier(de.deltaY,de);return de.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(ce/=this._currentRowHeight+0,this._wheelPartialScroll+=ce,ce=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):de.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ce*=this._bufferService.rows),ce},ve.prototype._applyScrollModifier=function(de,ce){var z=this._optionsService.options.fastScrollModifier;return z==="alt"&&ce.altKey||z==="ctrl"&&ce.ctrlKey||z==="shift"&&ce.shiftKey?de*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:de*this._optionsService.options.scrollSensitivity},ve.prototype.onTouchStart=function(de){this._lastTouchY=de.touches[0].pageY},ve.prototype.onTouchMove=function(de){var ce=this._lastTouchY-de.touches[0].pageY;return this._lastTouchY=de.touches[0].pageY,ce!==0&&(this._viewportElement.scrollTop+=ce,this._bubbleScroll(de,ce))},ve=ke([Ce(3,xe.IBufferService),Ce(4,xe.IOptionsService),Ce(5,ye.ICharSizeService),Ce(6,ye.IRenderService)],ve)}(Le.Disposable);Ee.Viewport=ge},function(en,Ee,Me){"use strict";function me(Le){return Le.replace(/\r?\n/g,"\r")}function Be(Le,he){return he?"\x1B[200~"+Le+"\x1B[201~":Le}function ke(Le,he,ye){Le=Be(Le=me(Le),ye.decPrivateModes.bracketedPasteMode),ye.triggerDataEvent(Le,!0),he.value=""}function Ce(Le,he,ye){var xe=ye.getBoundingClientRect(),ge=Le.clientX-xe.left-10,le=Le.clientY-xe.top-10;he.style.width="20px",he.style.height="20px",he.style.left=ge+"px",he.style.top=le+"px",he.style.zIndex="1000",he.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=me,Ee.bracketTextForPaste=Be,Ee.copyHandler=function(Le,he){Le.clipboardData&&Le.clipboardData.setData("text/plain",he.selectionText),Le.preventDefault()},Ee.handlePasteEvent=function(Le,he,ye){Le.stopPropagation(),Le.clipboardData&&ke(Le.clipboardData.getData("text/plain"),he,ye)},Ee.paste=ke,Ee.moveTextAreaUnderMouseCursor=Ce,Ee.rightClickHandler=function(Le,he,ye,xe,ge){Ce(Le,he,ye),ge&&!xe.isClickInSelection(Le)&&xe.selectWordAtCursor(Le),he.value=xe.selectionText,he.select()}},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.EscapeSequenceParser=Ee.VT500_TRANSITION_TABLE=Ee.TransitionTable=void 0;var ke=Me(2),Ce=Me(15),Le=Me(21),he=Me(22),ye=Me(24),xe=function(){function le(ve){this.table=new Uint8Array(ve)}return le.prototype.setDefault=function(ve,de){Ce.fill(this.table,ve<<4|de)},le.prototype.add=function(ve,de,ce,z){this.table[de<<8|ve]=ce<<4|z},le.prototype.addMany=function(ve,de,ce,z){for(var ee=0;ee<ve.length;ee++)this.table[de<<8|ve[ee]]=ce<<4|z},le}();Ee.TransitionTable=xe,Ee.VT500_TRANSITION_TABLE=function(){var le=new xe(4095),ve=Array.apply(null,Array(256)).map(function(ie,se){return se}),de=function(ie,se){return ve.slice(ie,se)},ce=de(32,127),z=de(0,24);z.push(25),z.push.apply(z,de(28,32));var ee,oe=de(0,14);for(ee in le.setDefault(1,0),le.addMany(ce,0,2,0),oe)le.addMany([24,26,153,154],ee,3,0),le.addMany(de(128,144),ee,3,0),le.addMany(de(144,152),ee,3,0),le.add(156,ee,0,0),le.add(27,ee,11,1),le.add(157,ee,4,8),le.addMany([152,158,159],ee,0,7),le.add(155,ee,11,3),le.add(144,ee,11,9);return le.addMany(z,0,3,0),le.addMany(z,1,3,1),le.add(127,1,0,1),le.addMany(z,8,0,8),le.addMany(z,3,3,3),le.add(127,3,0,3),le.addMany(z,4,3,4),le.add(127,4,0,4),le.addMany(z,6,3,6),le.addMany(z,5,3,5),le.add(127,5,0,5),le.addMany(z,2,3,2),le.add(127,2,0,2),le.add(93,1,4,8),le.addMany(ce,8,5,8),le.add(127,8,5,8),le.addMany([156,27,24,26,7],8,6,0),le.addMany(de(28,32),8,0,8),le.addMany([88,94,95],1,0,7),le.addMany(ce,7,0,7),le.addMany(z,7,0,7),le.add(156,7,0,0),le.add(127,7,0,7),le.add(91,1,11,3),le.addMany(de(64,127),3,7,0),le.addMany(de(48,60),3,8,4),le.addMany([60,61,62,63],3,9,4),le.addMany(de(48,60),4,8,4),le.addMany(de(64,127),4,7,0),le.addMany([60,61,62,63],4,0,6),le.addMany(de(32,64),6,0,6),le.add(127,6,0,6),le.addMany(de(64,127),6,0,0),le.addMany(de(32,48),3,9,5),le.addMany(de(32,48),5,9,5),le.addMany(de(48,64),5,0,6),le.addMany(de(64,127),5,7,0),le.addMany(de(32,48),4,9,5),le.addMany(de(32,48),1,9,2),le.addMany(de(32,48),2,9,2),le.addMany(de(48,127),2,10,0),le.addMany(de(48,80),1,10,0),le.addMany(de(81,88),1,10,0),le.addMany([89,90,92],1,10,0),le.addMany(de(96,127),1,10,0),le.add(80,1,11,9),le.addMany(z,9,0,9),le.add(127,9,0,9),le.addMany(de(28,32),9,0,9),le.addMany(de(32,48),9,9,12),le.addMany(de(48,60),9,8,10),le.addMany([60,61,62,63],9,9,10),le.addMany(z,11,0,11),le.addMany(de(32,128),11,0,11),le.addMany(de(28,32),11,0,11),le.addMany(z,10,0,10),le.add(127,10,0,10),le.addMany(de(28,32),10,0,10),le.addMany(de(48,60),10,8,10),le.addMany([60,61,62,63],10,0,11),le.addMany(de(32,48),10,9,12),le.addMany(z,12,0,12),le.add(127,12,0,12),le.addMany(de(28,32),12,0,12),le.addMany(de(32,48),12,9,12),le.addMany(de(48,64),12,0,11),le.addMany(de(64,127),12,12,13),le.addMany(de(64,127),10,12,13),le.addMany(de(64,127),9,12,13),le.addMany(z,13,13,13),le.addMany(ce,13,13,13),le.add(127,13,0,13),le.addMany([27,156,24,26],13,14,0),le.add(160,0,2,0),le.add(160,8,5,8),le.add(160,6,0,6),le.add(160,11,0,11),le.add(160,13,13,13),le}();var ge=function(le){function ve(de){de===void 0&&(de=Ee.VT500_TRANSITION_TABLE);var ce=le.call(this)||this;return ce._transitions=de,ce.initialState=0,ce.currentState=ce.initialState,ce._params=new Le.Params,ce._params.addParam(0),ce._collect=0,ce.precedingCodepoint=0,ce._printHandlerFb=function(z,ee,oe){},ce._executeHandlerFb=function(z){},ce._csiHandlerFb=function(z,ee){},ce._escHandlerFb=function(z){},ce._errorHandlerFb=function(z){return z},ce._printHandler=ce._printHandlerFb,ce._executeHandlers=Object.create(null),ce._csiHandlers=Object.create(null),ce._escHandlers=Object.create(null),ce._oscParser=new he.OscParser,ce._dcsParser=new ye.DcsParser,ce._errorHandler=ce._errorHandlerFb,ce.setEscHandler({final:"\\"},function(){}),ce}return Be(ve,le),ve.prototype._identifier=function(de,ce){ce===void 0&&(ce=[64,126]);var z=0;if(de.prefix){if(de.prefix.length>1)throw new Error("only one byte as prefix supported");if((z=de.prefix.charCodeAt(0))&&60>z||z>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(de.intermediates){if(de.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var ee=0;ee<de.intermediates.length;++ee){var oe=de.intermediates.charCodeAt(ee);if(32>oe||oe>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");z<<=8,z|=oe}}if(de.final.length!==1)throw new Error("final must be a single byte");var ie=de.final.charCodeAt(0);if(ce[0]>ie||ie>ce[1])throw new Error("final must be in range "+ce[0]+" .. "+ce[1]);return z<<=8,z|=ie},ve.prototype.identToString=function(de){for(var ce=[];de;)ce.push(String.fromCharCode(255&de)),de>>=8;return ce.reverse().join("")},ve.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},ve.prototype.setPrintHandler=function(de){this._printHandler=de},ve.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},ve.prototype.addEscHandler=function(de,ce){var z=this._identifier(de,[48,126]);this._escHandlers[z]===void 0&&(this._escHandlers[z]=[]);var ee=this._escHandlers[z];return ee.push(ce),{dispose:function(){var oe=ee.indexOf(ce);oe!==-1&&ee.splice(oe,1)}}},ve.prototype.setEscHandler=function(de,ce){this._escHandlers[this._identifier(de,[48,126])]=[ce]},ve.prototype.clearEscHandler=function(de){this._escHandlers[this._identifier(de,[48,126])]&&delete this._escHandlers[this._identifier(de,[48,126])]},ve.prototype.setEscHandlerFallback=function(de){this._escHandlerFb=de},ve.prototype.setExecuteHandler=function(de,ce){this._executeHandlers[de.charCodeAt(0)]=ce},ve.prototype.clearExecuteHandler=function(de){this._executeHandlers[de.charCodeAt(0)]&&delete this._executeHandlers[de.charCodeAt(0)]},ve.prototype.setExecuteHandlerFallback=function(de){this._executeHandlerFb=de},ve.prototype.addCsiHandler=function(de,ce){var z=this._identifier(de);this._csiHandlers[z]===void 0&&(this._csiHandlers[z]=[]);var ee=this._csiHandlers[z];return ee.push(ce),{dispose:function(){var oe=ee.indexOf(ce);oe!==-1&&ee.splice(oe,1)}}},ve.prototype.setCsiHandler=function(de,ce){this._csiHandlers[this._identifier(de)]=[ce]},ve.prototype.clearCsiHandler=function(de){this._csiHandlers[this._identifier(de)]&&delete this._csiHandlers[this._identifier(de)]},ve.prototype.setCsiHandlerFallback=function(de){this._csiHandlerFb=de},ve.prototype.addDcsHandler=function(de,ce){return this._dcsParser.addHandler(this._identifier(de),ce)},ve.prototype.setDcsHandler=function(de,ce){this._dcsParser.setHandler(this._identifier(de),ce)},ve.prototype.clearDcsHandler=function(de){this._dcsParser.clearHandler(this._identifier(de))},ve.prototype.setDcsHandlerFallback=function(de){this._dcsParser.setHandlerFallback(de)},ve.prototype.addOscHandler=function(de,ce){return this._oscParser.addHandler(de,ce)},ve.prototype.setOscHandler=function(de,ce){this._oscParser.setHandler(de,ce)},ve.prototype.clearOscHandler=function(de){this._oscParser.clearHandler(de)},ve.prototype.setOscHandlerFallback=function(de){this._oscParser.setHandlerFallback(de)},ve.prototype.setErrorHandler=function(de){this._errorHandler=de},ve.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},ve.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},ve.prototype.parse=function(de,ce){for(var z=0,ee=0,oe=this.currentState,ie=this._oscParser,se=this._dcsParser,ue=this._collect,Se=this._params,we=this._transitions.table,Pe=0;Pe<ce;++Pe){switch((ee=we[oe<<8|((z=de[Pe])<160?z:160)])>>4){case 2:for(var Ae=Pe+1;;++Ae){if(Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ce||(z=de[Ae])<32||z>126&&z<160){this._printHandler(de,Pe,Ae),Pe=Ae-1;break}}break;case 3:this._executeHandlers[z]?this._executeHandlers[z]():this._executeHandlerFb(z),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:Pe,code:z,currentState:oe,collect:ue,params:Se,abort:!1}).abort)return;break;case 7:for(var De=this._csiHandlers[ue<<8|z],ze=De?De.length-1:-1;ze>=0&&De[ze](Se)===!1;ze--);ze<0&&this._csiHandlerFb(ue<<8|z,Se),this.precedingCodepoint=0;break;case 8:do switch(z){case 59:Se.addParam(0);break;case 58:Se.addSubParam(-1);break;default:Se.addDigit(z-48)}while(++Pe<ce&&(z=de[Pe])>47&&z<60);Pe--;break;case 9:ue<<=8,ue|=z;break;case 10:for(var Ze=this._escHandlers[ue<<8|z],Xe=Ze?Ze.length-1:-1;Xe>=0&&Ze[Xe]()===!1;Xe--);Xe<0&&this._escHandlerFb(ue<<8|z),this.precedingCodepoint=0;break;case 11:Se.reset(),Se.addParam(0),ue=0;break;case 12:se.hook(ue<<8|z,Se);break;case 13:for(var Ge=Pe+1;;++Ge)if(Ge>=ce||(z=de[Ge])===24||z===26||z===27||z>127&&z<160){se.put(de,Pe,Ge),Pe=Ge-1;break}break;case 14:se.unhook(z!==24&&z!==26),z===27&&(ee|=1),Se.reset(),Se.addParam(0),ue=0,this.precedingCodepoint=0;break;case 4:ie.start();break;case 5:for(var ft=Pe+1;;ft++)if(ft>=ce||(z=de[ft])<32||z>127&&z<=159){ie.put(de,Pe,ft),Pe=ft-1;break}break;case 6:ie.end(z!==24&&z!==26),z===27&&(ee|=1),Se.reset(),Se.addParam(0),ue=0,this.precedingCodepoint=0}oe=15&ee}this._collect=ue,this.currentState=oe},ve}(ke.Disposable);Ee.EscapeSequenceParser=ge},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ie,se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,Se){ue.__proto__=Se}||function(ue,Se){for(var we in Se)Se.hasOwnProperty(we)&&(ue[we]=Se[we])})(ie,se)},function(ie,se){function ue(){this.constructor=ie}me(ie,se),ie.prototype=se===null?Object.create(se):(ue.prototype=se.prototype,new ue)}),ke=this&&this.__decorate||function(ie,se,ue,Se){var we,Pe=arguments.length,Ae=Pe<3?se:Se===null?Se=Object.getOwnPropertyDescriptor(se,ue):Se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(ie,se,ue,Se);else for(var De=ie.length-1;De>=0;De--)(we=ie[De])&&(Ae=(Pe<3?we(Ae):Pe>3?we(se,ue,Ae):we(se,ue))||Ae);return Pe>3&&Ae&&Object.defineProperty(se,ue,Ae),Ae},Ce=this&&this.__param||function(ie,se){return function(ue,Se){se(ue,Se,ie)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Renderer=void 0;var Le=Me(41),he=Me(47),ye=Me(48),xe=Me(49),ge=Me(29),le=Me(2),ve=Me(5),de=Me(1),ce=Me(25),z=Me(0),ee=1,oe=function(ie){function se(ue,Se,we,Pe,Ae,De,ze,Ze,Xe){var Ge=ie.call(this)||this;Ge._colors=ue,Ge._screenElement=Se,Ge._bufferService=Ae,Ge._charSizeService=De,Ge._optionsService=ze,Ge._id=ee++,Ge._onRequestRedraw=new z.EventEmitter;var ft=Ge._optionsService.options.allowTransparency;return Ge._characterJoinerRegistry=new ge.CharacterJoinerRegistry(Ge._bufferService),Ge._renderLayers=[new Le.TextRenderLayer(Ge._screenElement,0,Ge._colors,Ge._characterJoinerRegistry,ft,Ge._id,Ge._bufferService,ze),new he.SelectionRenderLayer(Ge._screenElement,1,Ge._colors,Ge._id,Ge._bufferService,ze),new xe.LinkRenderLayer(Ge._screenElement,2,Ge._colors,Ge._id,we,Pe,Ge._bufferService,ze),new ye.CursorRenderLayer(Ge._screenElement,3,Ge._colors,Ge._id,Ge._onRequestRedraw,Ge._bufferService,ze,Ze,Xe)],Ge.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},Ge._devicePixelRatio=window.devicePixelRatio,Ge._updateDimensions(),Ge.onOptionsChanged(),Ge}return Be(se,ie),Object.defineProperty(se.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),se.prototype.dispose=function(){for(var ue=0,Se=this._renderLayers;ue<Se.length;ue++)Se[ue].dispose();ie.prototype.dispose.call(this),ce.removeTerminalFromCache(this._id)},se.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},se.prototype.setColors=function(ue){this._colors=ue;for(var Se=0,we=this._renderLayers;Se<we.length;Se++){var Pe=we[Se];Pe.setColors(this._colors),Pe.reset()}},se.prototype.onResize=function(ue,Se){this._updateDimensions();for(var we=0,Pe=this._renderLayers;we<Pe.length;we++)Pe[we].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},se.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},se.prototype.onBlur=function(){this._runOperation(function(ue){return ue.onBlur()})},se.prototype.onFocus=function(){this._runOperation(function(ue){return ue.onFocus()})},se.prototype.onSelectionChanged=function(ue,Se,we){we===void 0&&(we=!1),this._runOperation(function(Pe){return Pe.onSelectionChanged(ue,Se,we)})},se.prototype.onCursorMove=function(){this._runOperation(function(ue){return ue.onCursorMove()})},se.prototype.onOptionsChanged=function(){this._runOperation(function(ue){return ue.onOptionsChanged()})},se.prototype.clear=function(){this._runOperation(function(ue){return ue.reset()})},se.prototype._runOperation=function(ue){for(var Se=0,we=this._renderLayers;Se<we.length;Se++)ue(we[Se])},se.prototype.renderRows=function(ue,Se){for(var we=0,Pe=this._renderLayers;we<Pe.length;we++)Pe[we].onGridChanged(ue,Se)},se.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)},se.prototype.registerCharacterJoiner=function(ue){return this._characterJoinerRegistry.registerCharacterJoiner(ue)},se.prototype.deregisterCharacterJoiner=function(ue){return this._characterJoinerRegistry.deregisterCharacterJoiner(ue)},se=ke([Ce(4,de.IBufferService),Ce(5,ve.ICharSizeService),Ce(6,de.IOptionsService),Ce(7,de.ICoreService),Ce(8,ve.ICoreBrowserService)],se)}(le.Disposable);Ee.Renderer=oe},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.TextRenderLayer=void 0;var ke=Me(42),Ce=Me(13),Le=Me(6),he=Me(3),ye=Me(29),xe=Me(4),ge=function(le){function ve(de,ce,z,ee,oe,ie,se,ue){var Se=le.call(this,de,"text",ce,oe,z,ie,se,ue)||this;return Se._characterWidth=0,Se._characterFont="",Se._characterOverlapCache={},Se._workCell=new xe.CellData,Se._state=new ke.GridCache,Se._characterJoinerRegistry=ee,Se}return Be(ve,le),ve.prototype.resize=function(de){le.prototype.resize.call(this,de);var ce=this._getFont(!1,!1);this._characterWidth===de.scaledCharWidth&&this._characterFont===ce||(this._characterWidth=de.scaledCharWidth,this._characterFont=ce,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},ve.prototype.reset=function(){this._state.clear(),this._clearAll()},ve.prototype._forEachCell=function(de,ce,z,ee){for(var oe=de;oe<=ce;oe++)for(var ie=oe+this._bufferService.buffer.ydisp,se=this._bufferService.buffer.lines.get(ie),ue=z?z.getJoinedCharacters(ie):[],Se=0;Se<this._bufferService.cols;Se++){se.loadCell(Se,this._workCell);var we=this._workCell,Pe=!1,Ae=Se;if(we.getWidth()!==0){if(ue.length>0&&Se===ue[0][0]){Pe=!0;var De=ue.shift();we=new ye.JoinedCellData(this._workCell,se.translateToString(!0,De[0],De[1]),De[1]-De[0]),Ae=De[1]-1}!Pe&&this._isOverlapping(we)&&Ae<se.length-1&&se.getCodePoint(Ae+1)===he.NULL_CELL_CODE&&(we.content&=-12582913,we.content|=2<<22),ee(we,Se,oe),Se=Ae}}},ve.prototype._drawBackground=function(de,ce){var z=this,ee=this._ctx,oe=this._bufferService.cols,ie=0,se=0,ue=null;ee.save(),this._forEachCell(de,ce,null,function(Se,we,Pe){var Ae=null;Se.isInverse()?Ae=Se.isFgDefault()?z._colors.foreground.css:Se.isFgRGB()?"rgb("+Le.AttributeData.toColorRGB(Se.getFgColor()).join(",")+")":z._colors.ansi[Se.getFgColor()].css:Se.isBgRGB()?Ae="rgb("+Le.AttributeData.toColorRGB(Se.getBgColor()).join(",")+")":Se.isBgPalette()&&(Ae=z._colors.ansi[Se.getBgColor()].css),ue===null&&(ie=we,se=Pe),Pe!==se?(ee.fillStyle=ue||"",z._fillCells(ie,se,oe-ie,1),ie=we,se=Pe):ue!==Ae&&(ee.fillStyle=ue||"",z._fillCells(ie,se,we-ie,1),ie=we,se=Pe),ue=Ae}),ue!==null&&(ee.fillStyle=ue,this._fillCells(ie,se,oe-ie,1)),ee.restore()},ve.prototype._drawForeground=function(de,ce){var z=this;this._forEachCell(de,ce,this._characterJoinerRegistry,function(ee,oe,ie){if(!ee.isInvisible()&&(z._drawChars(ee,oe,ie),ee.isUnderline())){if(z._ctx.save(),ee.isInverse())if(ee.isBgDefault())z._ctx.fillStyle=z._colors.background.css;else if(ee.isBgRGB())z._ctx.fillStyle="rgb("+Le.AttributeData.toColorRGB(ee.getBgColor()).join(",")+")";else{var se=ee.getBgColor();z._optionsService.options.drawBoldTextInBrightColors&&ee.isBold()&&se<8&&(se+=8),z._ctx.fillStyle=z._colors.ansi[se].css}else if(ee.isFgDefault())z._ctx.fillStyle=z._colors.foreground.css;else if(ee.isFgRGB())z._ctx.fillStyle="rgb("+Le.AttributeData.toColorRGB(ee.getFgColor()).join(",")+")";else{var ue=ee.getFgColor();z._optionsService.options.drawBoldTextInBrightColors&&ee.isBold()&&ue<8&&(ue+=8),z._ctx.fillStyle=z._colors.ansi[ue].css}z._fillBottomLineAtCells(oe,ie,ee.getWidth()),z._ctx.restore()}})},ve.prototype.onGridChanged=function(de,ce){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,de,this._bufferService.cols,ce-de+1),this._drawBackground(de,ce),this._drawForeground(de,ce))},ve.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},ve.prototype._isOverlapping=function(de){if(de.getWidth()!==1||de.getCode()<256)return!1;var ce=de.getChars();if(this._characterOverlapCache.hasOwnProperty(ce))return this._characterOverlapCache[ce];this._ctx.save(),this._ctx.font=this._characterFont;var z=Math.floor(this._ctx.measureText(ce).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[ce]=z,z},ve}(Ce.BaseRenderLayer);Ee.TextRenderLayer=ge},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.GridCache=void 0;var me=function(){function Be(){this.cache=[]}return Be.prototype.resize=function(ke,Ce){for(var Le=0;Le<ke;Le++){this.cache.length<=Le&&this.cache.push([]);for(var he=this.cache[Le].length;he<Ce;he++)this.cache[Le].push(void 0);this.cache[Le].length=Ce}this.cache.length=ke},Be.prototype.clear=function(){for(var ke=0;ke<this.cache.length;ke++)for(var Ce=0;Ce<this.cache[ke].length;Ce++)this.cache[ke][Ce]=void 0},Be}();Ee.GridCache=me},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(z,ee){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ie){oe.__proto__=ie}||function(oe,ie){for(var se in ie)ie.hasOwnProperty(se)&&(oe[se]=ie[se])})(z,ee)},function(z,ee){function oe(){this.constructor=z}me(z,ee),z.prototype=ee===null?Object.create(ee):(oe.prototype=ee.prototype,new oe)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.NoneCharAtlas=Ee.DynamicCharAtlas=Ee.getGlyphCacheKey=void 0;var ke=Me(9),Ce=Me(44),Le=Me(27),he=Me(46),ye=Me(11),xe=Me(28),ge=Me(10),le={css:"rgba(0, 0, 0, 0)",rgba:0};function ve(z){return z.code<<21|z.bg<<12|z.fg<<3|(z.bold?0:4)+(z.dim?0:2)+(z.italic?0:1)}Ee.getGlyphCacheKey=ve;var de=function(z){function ee(oe,ie){var se=z.call(this)||this;se._config=ie,se._drawToCacheCount=0,se._glyphsWaitingOnBitmap=[],se._bitmapCommitTimeout=null,se._bitmap=null,se._cacheCanvas=oe.createElement("canvas"),se._cacheCanvas.width=1024,se._cacheCanvas.height=1024,se._cacheCtx=xe.throwIfFalsy(se._cacheCanvas.getContext("2d",{alpha:!0}));var ue=oe.createElement("canvas");ue.width=se._config.scaledCharWidth,ue.height=se._config.scaledCharHeight,se._tmpCtx=xe.throwIfFalsy(ue.getContext("2d",{alpha:se._config.allowTransparency})),se._width=Math.floor(1024/se._config.scaledCharWidth),se._height=Math.floor(1024/se._config.scaledCharHeight);var Se=se._width*se._height;return se._cacheMap=new he.LRUMap(Se),se._cacheMap.prealloc(Se),se}return Be(ee,z),ee.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},ee.prototype.beginFrame=function(){this._drawToCacheCount=0},ee.prototype.draw=function(oe,ie,se,ue){if(ie.code===32)return!0;if(!this._canCache(ie))return!1;var Se=ve(ie),we=this._cacheMap.get(Se);if(we!=null)return this._drawFromCache(oe,we,se,ue),!0;if(this._drawToCacheCount<100){var Pe=void 0;Pe=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var Ae=this._drawToCache(ie,Pe);return this._cacheMap.set(Se,Ae),this._drawFromCache(oe,Ae,se,ue),!0}return!1},ee.prototype._canCache=function(oe){return oe.code<256},ee.prototype._toCoordinateX=function(oe){return oe%this._width*this._config.scaledCharWidth},ee.prototype._toCoordinateY=function(oe){return Math.floor(oe/this._width)*this._config.scaledCharHeight},ee.prototype._drawFromCache=function(oe,ie,se,ue){if(!ie.isEmpty){var Se=this._toCoordinateX(ie.index),we=this._toCoordinateY(ie.index);oe.drawImage(ie.inBitmap?this._bitmap:this._cacheCanvas,Se,we,this._config.scaledCharWidth,this._config.scaledCharHeight,se,ue,this._config.scaledCharWidth,this._config.scaledCharHeight)}},ee.prototype._getColorFromAnsiIndex=function(oe){return oe<this._config.colors.ansi.length?this._config.colors.ansi[oe]:Le.DEFAULT_ANSI_COLORS[oe]},ee.prototype._getBackgroundColor=function(oe){return this._config.allowTransparency?le:oe.bg===ke.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:oe.bg<256?this._getColorFromAnsiIndex(oe.bg):this._config.colors.background},ee.prototype._getForegroundColor=function(oe){return oe.fg===ke.INVERTED_DEFAULT_COLOR?ge.color.opaque(this._config.colors.background):oe.fg<256?this._getColorFromAnsiIndex(oe.fg):this._config.colors.foreground},ee.prototype._drawToCache=function(oe,ie){this._drawToCacheCount++,this._tmpCtx.save();var se=this._getBackgroundColor(oe);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=se.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var ue=oe.bold?this._config.fontWeightBold:this._config.fontWeight,Se=oe.italic?"italic":"";this._tmpCtx.font=Se+" "+ue+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(oe).css,oe.dim&&(this._tmpCtx.globalAlpha=ke.DIM_OPACITY),this._tmpCtx.fillText(oe.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var we=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),Pe=!1;this._config.allowTransparency||(Pe=function(Ze,Xe){for(var Ge=!0,ft=Xe.rgba>>>24,at=Xe.rgba>>>16&255,Ct=Xe.rgba>>>8&255,et=0;et<Ze.data.length;et+=4)Ze.data[et]===ft&&Ze.data[et+1]===at&&Ze.data[et+2]===Ct?Ze.data[et+3]=0:Ge=!1;return Ge}(we,se));var Ae=this._toCoordinateX(ie),De=this._toCoordinateY(ie);this._cacheCtx.putImageData(we,Ae,De);var ze={index:ie,isEmpty:Pe,inBitmap:!1};return this._addGlyphToBitmap(ze),ze},ee.prototype._addGlyphToBitmap=function(oe){var ie=this;!("createImageBitmap"in window)||ye.isFirefox||ye.isSafari||(this._glyphsWaitingOnBitmap.push(oe),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return ie._generateBitmap()},100)))},ee.prototype._generateBitmap=function(){var oe=this,ie=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(se){oe._bitmap=se;for(var ue=0;ue<ie.length;ue++)ie[ue].inBitmap=!0}),this._bitmapCommitTimeout=null},ee}(Ce.BaseCharAtlas);Ee.DynamicCharAtlas=de;var ce=function(z){function ee(oe,ie){return z.call(this)||this}return Be(ee,z),ee.prototype.draw=function(oe,ie,se,ue){return!1},ee}(Ce.BaseCharAtlas);Ee.NoneCharAtlas=ce},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BaseCharAtlas=void 0;var me=function(){function Be(){this._didWarmUp=!1}return Be.prototype.dispose=function(){},Be.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Be.prototype._doWarmUp=function(){},Be.prototype.beginFrame=function(){},Be}();Ee.BaseCharAtlas=me},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ColorContrastCache=void 0;var me=function(){function Be(){this._color={},this._rgba={}}return Be.prototype.clear=function(){this._color={},this._rgba={}},Be.prototype.setCss=function(ke,Ce,Le){this._rgba[ke]||(this._rgba[ke]={}),this._rgba[ke][Ce]=Le},Be.prototype.getCss=function(ke,Ce){return this._rgba[ke]?this._rgba[ke][Ce]:void 0},Be.prototype.setColor=function(ke,Ce,Le){this._color[ke]||(this._color[ke]={}),this._color[ke][Ce]=Le},Be.prototype.getColor=function(ke,Ce){return this._color[ke]?this._color[ke][Ce]:void 0},Be}();Ee.ColorContrastCache=me},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LRUMap=void 0;var me=function(){function Be(ke){this.capacity=ke,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Be.prototype._unlinkNode=function(ke){var Ce=ke.prev,Le=ke.next;ke===this._head&&(this._head=Le),ke===this._tail&&(this._tail=Ce),Ce!==null&&(Ce.next=Le),Le!==null&&(Le.prev=Ce)},Be.prototype._appendNode=function(ke){var Ce=this._tail;Ce!==null&&(Ce.next=ke),ke.prev=Ce,ke.next=null,this._tail=ke,this._head===null&&(this._head=ke)},Be.prototype.prealloc=function(ke){for(var Ce=this._nodePool,Le=0;Le<ke;Le++)Ce.push({prev:null,next:null,key:null,value:null})},Be.prototype.get=function(ke){var Ce=this._map[ke];return Ce!==void 0?(this._unlinkNode(Ce),this._appendNode(Ce),Ce.value):null},Be.prototype.peekValue=function(ke){var Ce=this._map[ke];return Ce!==void 0?Ce.value:null},Be.prototype.peek=function(){var ke=this._head;return ke===null?null:ke.value},Be.prototype.set=function(ke,Ce){var Le=this._map[ke];if(Le!==void 0)Le=this._map[ke],this._unlinkNode(Le),Le.value=Ce;else if(this.size>=this.capacity)Le=this._head,this._unlinkNode(Le),delete this._map[Le.key],Le.key=ke,Le.value=Ce,this._map[ke]=Le;else{var he=this._nodePool;he.length>0?((Le=he.pop()).key=ke,Le.value=Ce):Le={prev:null,next:null,key:ke,value:Ce},this._map[ke]=Le,this.size++}this._appendNode(Le)},Be}();Ee.LRUMap=me},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Ce,Le){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,ye){he.__proto__=ye}||function(he,ye){for(var xe in ye)ye.hasOwnProperty(xe)&&(he[xe]=ye[xe])})(Ce,Le)},function(Ce,Le){function he(){this.constructor=Ce}me(Ce,Le),Ce.prototype=Le===null?Object.create(Le):(he.prototype=Le.prototype,new he)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionRenderLayer=void 0;var ke=function(Ce){function Le(he,ye,xe,ge,le,ve){var de=Ce.call(this,he,"selection",ye,!0,xe,ge,le,ve)||this;return de._clearState(),de}return Be(Le,Ce),Le.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},Le.prototype.resize=function(he){Ce.prototype.resize.call(this,he),this._clearState()},Le.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},Le.prototype.onSelectionChanged=function(he,ye,xe){if(this._didStateChange(he,ye,xe,this._bufferService.buffer.ydisp))if(this._clearAll(),he&&ye){var ge=he[1]-this._bufferService.buffer.ydisp,le=ye[1]-this._bufferService.buffer.ydisp,ve=Math.max(ge,0),de=Math.min(le,this._bufferService.rows-1);if(!(ve>=this._bufferService.rows||de<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,xe){var ce=he[0],z=ye[0]-ce,ee=de-ve+1;this._fillCells(ce,ve,z,ee)}else{ce=ge===ve?he[0]:0;var oe=ve===de?ye[0]:this._bufferService.cols;this._fillCells(ce,ve,oe-ce,1);var ie=Math.max(de-ve-1,0);if(this._fillCells(0,ve+1,this._bufferService.cols,ie),ve!==de){var se=le===de?ye[0]:this._bufferService.cols;this._fillCells(0,de,se,1)}}this._state.start=[he[0],he[1]],this._state.end=[ye[0],ye[1]],this._state.columnSelectMode=xe,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},Le.prototype._didStateChange=function(he,ye,xe,ge){return!this._areCoordinatesEqual(he,this._state.start)||!this._areCoordinatesEqual(ye,this._state.end)||xe!==this._state.columnSelectMode||ge!==this._state.ydisp},Le.prototype._areCoordinatesEqual=function(he,ye){return!(!he||!ye)&&he[0]===ye[0]&&he[1]===ye[1]},Le}(Me(13).BaseRenderLayer);Ee.SelectionRenderLayer=ke},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ye,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,le){ge.__proto__=le}||function(ge,le){for(var ve in le)le.hasOwnProperty(ve)&&(ge[ve]=le[ve])})(ye,xe)},function(ye,xe){function ge(){this.constructor=ye}me(ye,xe),ye.prototype=xe===null?Object.create(xe):(ge.prototype=xe.prototype,new ge)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CursorRenderLayer=void 0;var ke=Me(13),Ce=Me(4),Le=function(ye){function xe(ge,le,ve,de,ce,z,ee,oe,ie){var se=ye.call(this,ge,"cursor",le,!0,ve,de,z,ee)||this;return se._onRequestRedraw=ce,se._coreService=oe,se._coreBrowserService=ie,se._cell=new Ce.CellData,se._state={x:0,y:0,isFocused:!1,style:"",width:0},se._cursorRenderers={bar:se._renderBarCursor.bind(se),block:se._renderBlockCursor.bind(se),underline:se._renderUnderlineCursor.bind(se)},se}return Be(xe,ye),xe.prototype.resize=function(ge){ye.prototype.resize.call(this,ge),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},xe.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},xe.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},xe.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},xe.prototype.onOptionsChanged=function(){var ge,le=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new he(this._coreBrowserService.isFocused,function(){le._render(!0)})):((ge=this._cursorBlinkStateManager)===null||ge===void 0||ge.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},xe.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},xe.prototype.onGridChanged=function(ge,le){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},xe.prototype._render=function(ge){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var le=this._bufferService.buffer.ybase+this._bufferService.buffer.y,ve=le-this._bufferService.buffer.ydisp;if(ve<0||ve>=this._bufferService.rows)this._clearCursor();else{var de=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(le).loadCell(de,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var ce=this._optionsService.options.cursorStyle;return ce&&ce!=="block"?this._cursorRenderers[ce](de,ve,this._cell):this._renderBlurCursor(de,ve,this._cell),this._ctx.restore(),this._state.x=de,this._state.y=ve,this._state.isFocused=!1,this._state.style=ce,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===de&&this._state.y===ve&&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"](de,ve,this._cell),this._ctx.restore(),this._state.x=de,this._state.y=ve,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},xe.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})},xe.prototype._renderBarCursor=function(ge,le,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(ge,le,this._optionsService.options.cursorWidth),this._ctx.restore()},xe.prototype._renderBlockCursor=function(ge,le,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(ge,le,ve.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(ve,ge,le),this._ctx.restore()},xe.prototype._renderUnderlineCursor=function(ge,le,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(ge,le),this._ctx.restore()},xe.prototype._renderBlurCursor=function(ge,le,ve){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(ge,le,ve.getWidth(),1),this._ctx.restore()},xe}(ke.BaseRenderLayer);Ee.CursorRenderLayer=Le;var he=function(){function ye(xe,ge){this._renderCallback=ge,this.isCursorVisible=!0,xe&&this._restartInterval()}return Object.defineProperty(ye.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),ye.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)},ye.prototype.restartBlinkAnimation=function(){var xe=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){xe._renderCallback(),xe._animationFrame=void 0})))},ye.prototype._restartInterval=function(xe){var ge=this;xe===void 0&&(xe=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(ge._animationTimeRestarted){var le=600-(Date.now()-ge._animationTimeRestarted);if(ge._animationTimeRestarted=void 0,le>0)return void ge._restartInterval(le)}ge.isCursorVisible=!1,ge._animationFrame=window.requestAnimationFrame(function(){ge._renderCallback(),ge._animationFrame=void 0}),ge._blinkInterval=window.setInterval(function(){if(ge._animationTimeRestarted){var ve=600-(Date.now()-ge._animationTimeRestarted);return ge._animationTimeRestarted=void 0,void ge._restartInterval(ve)}ge.isCursorVisible=!ge.isCursorVisible,ge._animationFrame=window.requestAnimationFrame(function(){ge._renderCallback(),ge._animationFrame=void 0})},600)},xe)},ye.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)},ye.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},ye}()},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ye,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,le){ge.__proto__=le}||function(ge,le){for(var ve in le)le.hasOwnProperty(ve)&&(ge[ve]=le[ve])})(ye,xe)},function(ye,xe){function ge(){this.constructor=ye}me(ye,xe),ye.prototype=xe===null?Object.create(xe):(ge.prototype=xe.prototype,new ge)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LinkRenderLayer=void 0;var ke=Me(13),Ce=Me(9),Le=Me(26),he=function(ye){function xe(ge,le,ve,de,ce,z,ee,oe){var ie=ye.call(this,ge,"link",le,!0,ve,de,ee,oe)||this;return ce.onShowLinkUnderline(function(se){return ie._onShowLinkUnderline(se)}),ce.onHideLinkUnderline(function(se){return ie._onHideLinkUnderline(se)}),z.onShowLinkUnderline(function(se){return ie._onShowLinkUnderline(se)}),z.onHideLinkUnderline(function(se){return ie._onHideLinkUnderline(se)}),ie}return Be(xe,ye),xe.prototype.resize=function(ge){ye.prototype.resize.call(this,ge),this._state=void 0},xe.prototype.reset=function(){this._clearCurrentLink()},xe.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var ge=this._state.y2-this._state.y1-1;ge>0&&this._clearCells(0,this._state.y1+1,this._state.cols,ge),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},xe.prototype._onShowLinkUnderline=function(ge){if(ge.fg===Ce.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:ge.fg&&Le.is256Color(ge.fg)?this._ctx.fillStyle=this._colors.ansi[ge.fg].css:this._ctx.fillStyle=this._colors.foreground.css,ge.y1===ge.y2)this._fillBottomLineAtCells(ge.x1,ge.y1,ge.x2-ge.x1);else{this._fillBottomLineAtCells(ge.x1,ge.y1,ge.cols-ge.x1);for(var le=ge.y1+1;le<ge.y2;le++)this._fillBottomLineAtCells(0,le,ge.cols);this._fillBottomLineAtCells(0,ge.y2,ge.x2)}this._state=ge},xe.prototype._onHideLinkUnderline=function(ge){this._clearCurrentLink()},xe}(ke.BaseRenderLayer);Ee.LinkRenderLayer=he},function(en,Ee,Me){"use strict";var me=this&&this.__decorate||function(ye,xe,ge,le){var ve,de=arguments.length,ce=de<3?xe:le===null?le=Object.getOwnPropertyDescriptor(xe,ge):le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(ye,xe,ge,le);else for(var z=ye.length-1;z>=0;z--)(ve=ye[z])&&(ce=(de<3?ve(ce):de>3?ve(xe,ge,ce):ve(xe,ge))||ce);return de>3&&ce&&Object.defineProperty(xe,ge,ce),ce},Be=this&&this.__param||function(ye,xe){return function(ge,le){xe(ge,le,ye)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseZone=Ee.Linkifier=void 0;var ke=Me(0),Ce=Me(1),Le=function(){function ye(xe,ge,le){this._bufferService=xe,this._logService=ge,this._unicodeService=le,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new ke.EventEmitter,this._onHideLinkUnderline=new ke.EventEmitter,this._onLinkTooltip=new ke.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(ye.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),ye.prototype.attachToDom=function(xe,ge){this._element=xe,this._mouseZoneManager=ge},ye.prototype.linkifyRows=function(xe,ge){var le=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=xe,this._rowsToLinkify.end=ge):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,xe),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,ge)),this._mouseZoneManager.clearAll(xe,ge),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return le._linkifyRows()},ye._timeBeforeLatency))},ye.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var xe=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var ge=xe.ydisp+this._rowsToLinkify.start;if(!(ge>=xe.lines.length)){for(var le=xe.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,ve=Math.ceil(2e3/this._bufferService.cols),de=this._bufferService.buffer.iterator(!1,ge,le,ve,ve);de.hasNext();)for(var ce=de.next(),z=0;z<this._linkMatchers.length;z++)this._doLinkifyRow(ce.range.first,ce.content,this._linkMatchers[z]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},ye.prototype.registerLinkMatcher=function(xe,ge,le){if(le===void 0&&(le={}),!ge)throw new Error("handler must be defined");var ve={id:this._nextLinkMatcherId++,regex:xe,handler:ge,matchIndex:le.matchIndex,validationCallback:le.validationCallback,hoverTooltipCallback:le.tooltipCallback,hoverLeaveCallback:le.leaveCallback,willLinkActivate:le.willLinkActivate,priority:le.priority||0};return this._addLinkMatcherToList(ve),ve.id},ye.prototype._addLinkMatcherToList=function(xe){if(this._linkMatchers.length!==0){for(var ge=this._linkMatchers.length-1;ge>=0;ge--)if(xe.priority<=this._linkMatchers[ge].priority)return void this._linkMatchers.splice(ge+1,0,xe);this._linkMatchers.splice(0,0,xe)}else this._linkMatchers.push(xe)},ye.prototype.deregisterLinkMatcher=function(xe){for(var ge=0;ge<this._linkMatchers.length;ge++)if(this._linkMatchers[ge].id===xe)return this._linkMatchers.splice(ge,1),!0;return!1},ye.prototype._doLinkifyRow=function(xe,ge,le){for(var ve,de=this,ce=new RegExp(le.regex.source,(le.regex.flags||"")+"g"),z=-1,ee=function(){var ie=ve[typeof le.matchIndex!="number"?0:le.matchIndex];if(!ie)return oe._logService.debug("match found without corresponding matchIndex",ve,le),"break";if(z=ge.indexOf(ie,z+1),ce.lastIndex=z+ie.length,z<0)return"break";var se=oe._bufferService.buffer.stringIndexToBufferIndex(xe,z);if(se[0]<0)return"break";var ue=oe._bufferService.buffer.lines.get(se[0]);if(!ue)return"break";var Se=ue.getFg(se[1]),we=Se?Se>>9&511:void 0;le.validationCallback?le.validationCallback(ie,function(Pe){de._rowsTimeoutId||Pe&&de._addLink(se[1],se[0]-de._bufferService.buffer.ydisp,ie,le,we)}):oe._addLink(se[1],se[0]-oe._bufferService.buffer.ydisp,ie,le,we)},oe=this;(ve=ce.exec(ge))!==null&&ee()!=="break";);},ye.prototype._addLink=function(xe,ge,le,ve,de){var ce=this;if(this._mouseZoneManager&&this._element){var z=this._unicodeService.getStringCellWidth(le),ee=xe%this._bufferService.cols,oe=ge+Math.floor(xe/this._bufferService.cols),ie=(ee+z)%this._bufferService.cols,se=oe+Math.floor((ee+z)/this._bufferService.cols);ie===0&&(ie=this._bufferService.cols,se--),this._mouseZoneManager.add(new he(ee+1,oe+1,ie+1,se+1,function(ue){if(ve.handler)return ve.handler(ue,le);var Se=window.open();Se?(Se.opener=null,Se.location.href=le):console.warn("Opening link blocked as opener could not be cleared")},function(){ce._onShowLinkUnderline.fire(ce._createLinkHoverEvent(ee,oe,ie,se,de)),ce._element.classList.add("xterm-cursor-pointer")},function(ue){ce._onLinkTooltip.fire(ce._createLinkHoverEvent(ee,oe,ie,se,de)),ve.hoverTooltipCallback&&ve.hoverTooltipCallback(ue,le,{start:{x:ee,y:oe},end:{x:ie,y:se}})},function(){ce._onHideLinkUnderline.fire(ce._createLinkHoverEvent(ee,oe,ie,se,de)),ce._element.classList.remove("xterm-cursor-pointer"),ve.hoverLeaveCallback&&ve.hoverLeaveCallback()},function(ue){return!ve.willLinkActivate||ve.willLinkActivate(ue,le)}))}},ye.prototype._createLinkHoverEvent=function(xe,ge,le,ve,de){return{x1:xe,y1:ge,x2:le,y2:ve,cols:this._bufferService.cols,fg:de}},ye._timeBeforeLatency=200,ye=me([Be(0,Ce.IBufferService),Be(1,Ce.ILogService),Be(2,Ce.IUnicodeService)],ye)}();Ee.Linkifier=Le;var he=function(ye,xe,ge,le,ve,de,ce,z,ee){this.x1=ye,this.y1=xe,this.x2=ge,this.y2=le,this.clickCallback=ve,this.hoverCallback=de,this.tooltipCallback=ce,this.leaveCallback=z,this.willLinkActivate=ee};Ee.MouseZone=he},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ie,se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,Se){ue.__proto__=Se}||function(ue,Se){for(var we in Se)Se.hasOwnProperty(we)&&(ue[we]=Se[we])})(ie,se)},function(ie,se){function ue(){this.constructor=ie}me(ie,se),ie.prototype=se===null?Object.create(se):(ue.prototype=se.prototype,new ue)}),ke=this&&this.__decorate||function(ie,se,ue,Se){var we,Pe=arguments.length,Ae=Pe<3?se:Se===null?Se=Object.getOwnPropertyDescriptor(se,ue):Se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(ie,se,ue,Se);else for(var De=ie.length-1;De>=0;De--)(we=ie[De])&&(Ae=(Pe<3?we(Ae):Pe>3?we(se,ue,Ae):we(se,ue))||Ae);return Pe>3&&Ae&&Object.defineProperty(se,ue,Ae),Ae},Ce=this&&this.__param||function(ie,se){return function(ue,Se){se(ue,Se,ie)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionService=void 0;var Le=Me(11),he=Me(52),ye=Me(4),xe=Me(0),ge=Me(5),le=Me(1),ve=Me(30),de=Me(53),ce=Me(2),z="\xA0",ee=new RegExp(z,"g"),oe=function(ie){function se(ue,Se,we,Pe,Ae,De,ze){var Ze=ie.call(this)||this;return Ze._element=ue,Ze._screenElement=Se,Ze._bufferService=we,Ze._coreService=Pe,Ze._mouseService=Ae,Ze._optionsService=De,Ze._renderService=ze,Ze._dragScrollAmount=0,Ze._enabled=!0,Ze._workCell=new ye.CellData,Ze._mouseDownTimeStamp=0,Ze._onLinuxMouseSelection=Ze.register(new xe.EventEmitter),Ze._onRedrawRequest=Ze.register(new xe.EventEmitter),Ze._onSelectionChange=Ze.register(new xe.EventEmitter),Ze._onRequestScrollLines=Ze.register(new xe.EventEmitter),Ze._mouseMoveListener=function(Xe){return Ze._onMouseMove(Xe)},Ze._mouseUpListener=function(Xe){return Ze._onMouseUp(Xe)},Ze._coreService.onUserInput(function(){Ze.hasSelection&&Ze.clearSelection()}),Ze._trimListener=Ze._bufferService.buffer.lines.onTrim(function(Xe){return Ze._onTrim(Xe)}),Ze.register(Ze._bufferService.buffers.onBufferActivate(function(Xe){return Ze._onBufferActivate(Xe)})),Ze.enable(),Ze._model=new he.SelectionModel(Ze._bufferService),Ze._activeSelectionMode=0,Ze}return Be(se,ie),Object.defineProperty(se.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),se.prototype.dispose=function(){this._removeMouseDownListeners()},se.prototype.reset=function(){this.clearSelection()},se.prototype.disable=function(){this.clearSelection(),this._enabled=!1},se.prototype.enable=function(){this._enabled=!0},Object.defineProperty(se.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"hasSelection",{get:function(){var ue=this._model.finalSelectionStart,Se=this._model.finalSelectionEnd;return!(!ue||!Se)&&(ue[0]!==Se[0]||ue[1]!==Se[1])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"selectionText",{get:function(){var ue=this._model.finalSelectionStart,Se=this._model.finalSelectionEnd;if(!ue||!Se)return"";var we=this._bufferService.buffer,Pe=[];if(this._activeSelectionMode===3){if(ue[0]===Se[0])return"";for(var Ae=ue[1];Ae<=Se[1];Ae++){var De=we.translateBufferLineToString(Ae,!0,ue[0],Se[0]);Pe.push(De)}}else{var ze=ue[1]===Se[1]?Se[0]:void 0;for(Pe.push(we.translateBufferLineToString(ue[1],!0,ue[0],ze)),Ae=ue[1]+1;Ae<=Se[1]-1;Ae++){var Ze=we.lines.get(Ae);De=we.translateBufferLineToString(Ae,!0),Ze&&Ze.isWrapped?Pe[Pe.length-1]+=De:Pe.push(De)}ue[1]!==Se[1]&&(Ze=we.lines.get(Se[1]),De=we.translateBufferLineToString(Se[1],!0,0,Se[0]),Ze&&Ze.isWrapped?Pe[Pe.length-1]+=De:Pe.push(De))}return Pe.map(function(Xe){return Xe.replace(ee," ")}).join(Le.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),se.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},se.prototype.refresh=function(ue){var Se=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return Se._refresh()})),Le.isLinux&&ue&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},se.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},se.prototype.isClickInSelection=function(ue){var Se=this._getMouseBufferCoords(ue),we=this._model.finalSelectionStart,Pe=this._model.finalSelectionEnd;return!!(we&&Pe&&Se)&&this._areCoordsInSelection(Se,we,Pe)},se.prototype._areCoordsInSelection=function(ue,Se,we){return ue[1]>Se[1]&&ue[1]<we[1]||Se[1]===we[1]&&ue[1]===Se[1]&&ue[0]>=Se[0]&&ue[0]<we[0]||Se[1]<we[1]&&ue[1]===we[1]&&ue[0]<we[0]||Se[1]<we[1]&&ue[1]===Se[1]&&ue[0]>=Se[0]},se.prototype.selectWordAtCursor=function(ue){var Se=this._getMouseBufferCoords(ue);Se&&(this._selectWordAt(Se,!1),this._model.selectionEnd=void 0,this.refresh(!0))},se.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},se.prototype.selectLines=function(ue,Se){this._model.clearSelection(),ue=Math.max(ue,0),Se=Math.min(Se,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,ue],this._model.selectionEnd=[this._bufferService.cols,Se],this.refresh(),this._onSelectionChange.fire()},se.prototype._onTrim=function(ue){this._model.onTrim(ue)&&this.refresh()},se.prototype._getMouseBufferCoords=function(ue){var Se=this._mouseService.getCoords(ue,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(Se)return Se[0]--,Se[1]--,Se[1]+=this._bufferService.buffer.ydisp,Se},se.prototype._getMouseEventScrollAmount=function(ue){var Se=ve.getCoordsRelativeToElement(ue,this._screenElement)[1],we=this._renderService.dimensions.canvasHeight;return Se>=0&&Se<=we?0:(Se>we&&(Se-=we),Se=Math.min(Math.max(Se,-50),50),(Se/=50)/Math.abs(Se)+Math.round(14*Se))},se.prototype.shouldForceSelection=function(ue){return Le.isMac?ue.altKey&&this._optionsService.options.macOptionClickForcesSelection:ue.shiftKey},se.prototype.onMouseDown=function(ue){if(this._mouseDownTimeStamp=ue.timeStamp,(ue.button!==2||!this.hasSelection)&&ue.button===0){if(!this._enabled){if(!this.shouldForceSelection(ue))return;ue.stopPropagation()}ue.preventDefault(),this._dragScrollAmount=0,this._enabled&&ue.shiftKey?this._onIncrementalClick(ue):ue.detail===1?this._onSingleClick(ue):ue.detail===2?this._onDoubleClick(ue):ue.detail===3&&this._onTripleClick(ue),this._addMouseDownListeners(),this.refresh(!0)}},se.prototype._addMouseDownListeners=function(){var ue=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return ue._dragScroll()},50)},se.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},se.prototype._onIncrementalClick=function(ue){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(ue))},se.prototype._onSingleClick=function(ue){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(ue)?3:0,this._model.selectionStart=this._getMouseBufferCoords(ue),this._model.selectionStart){this._model.selectionEnd=void 0;var Se=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);Se&&Se.length!==this._model.selectionStart[0]&&Se.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},se.prototype._onDoubleClick=function(ue){var Se=this._getMouseBufferCoords(ue);Se&&(this._activeSelectionMode=1,this._selectWordAt(Se,!0))},se.prototype._onTripleClick=function(ue){var Se=this._getMouseBufferCoords(ue);Se&&(this._activeSelectionMode=2,this._selectLineAt(Se[1]))},se.prototype.shouldColumnSelect=function(ue){return ue.altKey&&!(Le.isMac&&this._optionsService.options.macOptionClickForcesSelection)},se.prototype._onMouseMove=function(ue){if(ue.stopImmediatePropagation(),this._model.selectionStart){var Se=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(ue),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(ue),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var we=this._bufferService.buffer;if(this._model.selectionEnd[1]<we.lines.length){var Pe=we.lines.get(this._model.selectionEnd[1]);Pe&&Pe.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}Se&&Se[0]===this._model.selectionEnd[0]&&Se[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},se.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var ue=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(ue.ydisp+this._bufferService.rows,ue.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=ue.ydisp),this.refresh()}},se.prototype._onMouseUp=function(ue){var Se=ue.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&Se<500&&ue.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var we=this._mouseService.getCoords(ue,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(we&&we[0]!==void 0&&we[1]!==void 0){var Pe=de.moveToCellSequence(we[0]-1,we[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(Pe,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},se.prototype._onBufferActivate=function(ue){var Se=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=ue.activeBuffer.lines.onTrim(function(we){return Se._onTrim(we)})},se.prototype._convertViewportColToCharacterIndex=function(ue,Se){for(var we=Se[0],Pe=0;Se[0]>=Pe;Pe++){var Ae=ue.loadCell(Pe,this._workCell).getChars().length;this._workCell.getWidth()===0?we--:Ae>1&&Se[0]!==Pe&&(we+=Ae-1)}return we},se.prototype.setSelection=function(ue,Se,we){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[ue,Se],this._model.selectionStartLength=we,this.refresh()},se.prototype._getWordAt=function(ue,Se,we,Pe){if(we===void 0&&(we=!0),Pe===void 0&&(Pe=!0),!(ue[0]>=this._bufferService.cols)){var Ae=this._bufferService.buffer,De=Ae.lines.get(ue[1]);if(De){var ze=Ae.translateBufferLineToString(ue[1],!1),Ze=this._convertViewportColToCharacterIndex(De,ue),Xe=Ze,Ge=ue[0]-Ze,ft=0,at=0,Ct=0,et=0;if(ze.charAt(Ze)===" "){for(;Ze>0&&ze.charAt(Ze-1)===" ";)Ze--;for(;Xe<ze.length&&ze.charAt(Xe+1)===" ";)Xe++}else{var yt=ue[0],st=ue[0];De.getWidth(yt)===0&&(ft++,yt--),De.getWidth(st)===2&&(at++,st++);var zt=De.getString(st).length;for(zt>1&&(et+=zt-1,Xe+=zt-1);yt>0&&Ze>0&&!this._isCharWordSeparator(De.loadCell(yt-1,this._workCell));){De.loadCell(yt-1,this._workCell);var lt=this._workCell.getChars().length;this._workCell.getWidth()===0?(ft++,yt--):lt>1&&(Ct+=lt-1,Ze-=lt-1),Ze--,yt--}for(;st<De.length&&Xe+1<ze.length&&!this._isCharWordSeparator(De.loadCell(st+1,this._workCell));){De.loadCell(st+1,this._workCell);var tt=this._workCell.getChars().length;this._workCell.getWidth()===2?(at++,st++):tt>1&&(et+=tt-1,Xe+=tt-1),Xe++,st++}}Xe++;var ut=Ze+Ge-ft+Ct,mt=Math.min(this._bufferService.cols,Xe-Ze+ft+at-Ct-et);if(Se||ze.slice(Ze,Xe).trim()!==""){if(we&&ut===0&&De.getCodePoint(0)!==32){var Pt=Ae.lines.get(ue[1]-1);if(Pt&&De.isWrapped&&Pt.getCodePoint(this._bufferService.cols-1)!==32){var gt=this._getWordAt([this._bufferService.cols-1,ue[1]-1],!1,!0,!1);if(gt){var Ft=this._bufferService.cols-gt.start;ut-=Ft,mt+=Ft}}}if(Pe&&ut+mt===this._bufferService.cols&&De.getCodePoint(this._bufferService.cols-1)!==32){var Ht=Ae.lines.get(ue[1]+1);if(Ht&&Ht.isWrapped&&Ht.getCodePoint(0)!==32){var hn=this._getWordAt([0,ue[1]+1],!1,!1,!0);hn&&(mt+=hn.length)}}return{start:ut,length:mt}}}}},se.prototype._selectWordAt=function(ue,Se){var we=this._getWordAt(ue,Se);if(we){for(;we.start<0;)we.start+=this._bufferService.cols,ue[1]--;this._model.selectionStart=[we.start,ue[1]],this._model.selectionStartLength=we.length}},se.prototype._selectToWordAt=function(ue){var Se=this._getWordAt(ue,!0);if(Se){for(var we=ue[1];Se.start<0;)Se.start+=this._bufferService.cols,we--;if(!this._model.areSelectionValuesReversed())for(;Se.start+Se.length>this._bufferService.cols;)Se.length-=this._bufferService.cols,we++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?Se.start:Se.start+Se.length,we]}},se.prototype._isCharWordSeparator=function(ue){return ue.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(ue.getChars())>=0},se.prototype._selectLineAt=function(ue){var Se=this._bufferService.buffer.getWrappedRangeForLine(ue);this._model.selectionStart=[0,Se.first],this._model.selectionEnd=[this._bufferService.cols,Se.last],this._model.selectionStartLength=0},se=ke([Ce(2,le.IBufferService),Ce(3,le.ICoreService),Ce(4,ge.IMouseService),Ce(5,le.IOptionsService),Ce(6,ge.IRenderService)],se)}(ce.Disposable);Ee.SelectionService=oe},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionModel=void 0;var me=function(){function Be(ke){this._bufferService=ke,this.isSelectAllActive=!1,this.selectionStartLength=0}return Be.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Be.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(Be.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 ke=this.selectionStart[0]+this.selectionStartLength;return ke>this._bufferService.cols?[ke%this._bufferService.cols,this.selectionStart[1]+Math.floor(ke/this._bufferService.cols)]:[ke,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}),Be.prototype.areSelectionValuesReversed=function(){var ke=this.selectionStart,Ce=this.selectionEnd;return!(!ke||!Ce)&&(ke[1]>Ce[1]||ke[1]===Ce[1]&&ke[0]>Ce[0])},Be.prototype.onTrim=function(ke){return this.selectionStart&&(this.selectionStart[1]-=ke),this.selectionEnd&&(this.selectionEnd[1]-=ke),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},Be}();Ee.SelectionModel=me},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.moveToCellSequence=void 0;var me=Me(12);function Be(xe,ge,le,ve){var de=xe-ke(le,xe),ce=ge-ke(le,ge);return ye(Math.abs(de-ce)-function(z,ee,oe){for(var ie=0,se=z-ke(oe,z),ue=ee-ke(oe,ee),Se=0;Se<Math.abs(se-ue);Se++){var we=Ce(z,ee)==="A"?-1:1,Pe=oe.buffer.lines.get(se+we*Se);Pe&&Pe.isWrapped&&ie++}return ie}(xe,ge,le),he(Ce(xe,ge),ve))}function ke(xe,ge){for(var le=0,ve=xe.buffer.lines.get(ge),de=ve&&ve.isWrapped;de&&ge>=0&&ge<xe.rows;)le++,de=(ve=xe.buffer.lines.get(--ge))&&ve.isWrapped;return le}function Ce(xe,ge){return xe>ge?"A":"B"}function Le(xe,ge,le,ve,de,ce){for(var z=xe,ee=ge,oe="";z!==le||ee!==ve;)z+=de?1:-1,de&&z>ce.cols-1?(oe+=ce.buffer.translateBufferLineToString(ee,!1,xe,z),z=0,xe=0,ee++):!de&&z<0&&(oe+=ce.buffer.translateBufferLineToString(ee,!1,0,xe+1),xe=z=ce.cols-1,ee--);return oe+ce.buffer.translateBufferLineToString(ee,!1,xe,z)}function he(xe,ge){var le=ge?"O":"[";return me.C0.ESC+le+xe}function ye(xe,ge){xe=Math.floor(xe);for(var le="",ve=0;ve<xe;ve++)le+=ge;return le}Ee.moveToCellSequence=function(xe,ge,le,ve){var de,ce=le.buffer.x,z=le.buffer.y;if(!le.buffer.hasScrollback)return function(oe,ie,se,ue,Se,we){return Be(ie,ue,Se,we).length===0?"":ye(Le(oe,ie,oe,ie-ke(Se,ie),!1,Se).length,he("D",we))}(ce,z,0,ge,le,ve)+Be(z,ge,le,ve)+function(oe,ie,se,ue,Se,we){var Pe;Pe=Be(ie,ue,Se,we).length>0?ue-ke(Se,ue):ie;var Ae=ue,De=function(ze,Ze,Xe,Ge,ft,at){var Ct;return Ct=Be(Xe,Ge,ft,at).length>0?Ge-ke(ft,Ge):Ze,ze<Xe&&Ct<=Ge||ze>=Xe&&Ct<Ge?"C":"D"}(oe,ie,se,ue,Se,we);return ye(Le(oe,Pe,se,Ae,De==="C",Se).length,he(De,we))}(ce,z,xe,ge,le,ve);if(z===ge)return de=ce>xe?"D":"C",ye(Math.abs(ce-xe),he(de,ve));de=z>ge?"D":"C";var ee=Math.abs(z-ge);return ye(function(oe,ie){return ie.cols-oe}(z>ge?xe:ce,le)+(ee-1)*le.cols+1+((z>ge?ce:xe)-1),he(de,ve))}},function(en,Ee,Me){"use strict";var me=this&&this.__decorate||function(Le,he,ye,xe){var ge,le=arguments.length,ve=le<3?he:xe===null?xe=Object.getOwnPropertyDescriptor(he,ye):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(Le,he,ye,xe);else for(var de=Le.length-1;de>=0;de--)(ge=Le[de])&&(ve=(le<3?ge(ve):le>3?ge(he,ye,ve):ge(he,ye))||ve);return le>3&&ve&&Object.defineProperty(he,ye,ve),ve},Be=this&&this.__param||function(Le,he){return function(ye,xe){he(ye,xe,Le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SoundService=void 0;var ke=Me(1),Ce=function(){function Le(he){this._optionsService=he}return Object.defineProperty(Le,"audioContext",{get:function(){if(!Le._audioContext){var he=window.AudioContext||window.webkitAudioContext;if(!he)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;Le._audioContext=new he}return Le._audioContext},enumerable:!1,configurable:!0}),Le.prototype.playBellSound=function(){var he=Le.audioContext;if(he){var ye=he.createBufferSource();he.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(xe){ye.buffer=xe,ye.connect(he.destination),ye.start(0)})}},Le.prototype._base64ToArrayBuffer=function(he){for(var ye=window.atob(he),xe=ye.length,ge=new Uint8Array(xe),le=0;le<xe;le++)ge[le]=ye.charCodeAt(le);return ge.buffer},Le.prototype._removeMimeType=function(he){return he.split(",")[1]},Le=me([Be(0,ke.IOptionsService)],Le)}();Ee.SoundService=Ce},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),ke=this&&this.__decorate||function(le,ve,de,ce){var z,ee=arguments.length,oe=ee<3?ve:ce===null?ce=Object.getOwnPropertyDescriptor(ve,de):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(le,ve,de,ce);else for(var ie=le.length-1;ie>=0;ie--)(z=le[ie])&&(oe=(ee<3?z(oe):ee>3?z(ve,de,oe):z(ve,de))||oe);return ee>3&&oe&&Object.defineProperty(ve,de,oe),oe},Ce=this&&this.__param||function(le,ve){return function(de,ce){ve(de,ce,le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseZoneManager=void 0;var Le=Me(2),he=Me(7),ye=Me(5),xe=Me(1),ge=function(le){function ve(de,ce,z,ee,oe,ie){var se=le.call(this)||this;return se._element=de,se._screenElement=ce,se._bufferService=z,se._mouseService=ee,se._selectionService=oe,se._optionsService=ie,se._zones=[],se._areZonesActive=!1,se._lastHoverCoords=[void 0,void 0],se._initialSelectionLength=0,se.register(he.addDisposableDomListener(se._element,"mousedown",function(ue){return se._onMouseDown(ue)})),se._mouseMoveListener=function(ue){return se._onMouseMove(ue)},se._mouseLeaveListener=function(ue){return se._onMouseLeave(ue)},se._clickListener=function(ue){return se._onClick(ue)},se}return Be(ve,le),ve.prototype.dispose=function(){le.prototype.dispose.call(this),this._deactivate()},ve.prototype.add=function(de){this._zones.push(de),this._zones.length===1&&this._activate()},ve.prototype.clearAll=function(de,ce){if(this._zones.length!==0){de&&ce||(de=0,ce=this._bufferService.rows-1);for(var z=0;z<this._zones.length;z++){var ee=this._zones[z];(ee.y1>de&&ee.y1<=ce+1||ee.y2>de&&ee.y2<=ce+1||ee.y1<de&&ee.y2>ce+1)&&(this._currentZone&&this._currentZone===ee&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(z--,1))}this._zones.length===0&&this._deactivate()}},ve.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))},ve.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))},ve.prototype._onMouseMove=function(de){this._lastHoverCoords[0]===de.pageX&&this._lastHoverCoords[1]===de.pageY||(this._onHover(de),this._lastHoverCoords=[de.pageX,de.pageY])},ve.prototype._onHover=function(de){var ce=this,z=this._findZoneEventAt(de);z!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),z&&(this._currentZone=z,z.hoverCallback&&z.hoverCallback(de),this._tooltipTimeout=window.setTimeout(function(){return ce._onTooltip(de)},this._optionsService.options.linkTooltipHoverDuration)))},ve.prototype._onTooltip=function(de){this._tooltipTimeout=void 0;var ce=this._findZoneEventAt(de);ce&&ce.tooltipCallback&&ce.tooltipCallback(de)},ve.prototype._onMouseDown=function(de){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var ce=this._findZoneEventAt(de);ce!=null&&ce.willLinkActivate(de)&&(de.preventDefault(),de.stopImmediatePropagation())}},ve.prototype._onMouseLeave=function(de){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},ve.prototype._onClick=function(de){var ce=this._findZoneEventAt(de),z=this._getSelectionLength();ce&&z===this._initialSelectionLength&&(ce.clickCallback(de),de.preventDefault(),de.stopImmediatePropagation())},ve.prototype._getSelectionLength=function(){var de=this._selectionService.selectionText;return de?de.length:0},ve.prototype._findZoneEventAt=function(de){var ce=this._mouseService.getCoords(de,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(ce)for(var z=ce[0],ee=ce[1],oe=0;oe<this._zones.length;oe++){var ie=this._zones[oe];if(ie.y1===ie.y2){if(ee===ie.y1&&z>=ie.x1&&z<ie.x2)return ie}else if(ee===ie.y1&&z>=ie.x1||ee===ie.y2&&z<ie.x2||ee>ie.y1&&ee<ie.y2)return ie}},ve=ke([Ce(2,xe.IBufferService),Ce(3,ye.IMouseService),Ce(4,ye.ISelectionService),Ce(5,xe.IOptionsService)],ve)}(Le.Disposable);Ee.MouseZoneManager=ge},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ve,de){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ce,z){ce.__proto__=z}||function(ce,z){for(var ee in z)z.hasOwnProperty(ee)&&(ce[ee]=z[ee])})(ve,de)},function(ve,de){function ce(){this.constructor=ve}me(ve,de),ve.prototype=de===null?Object.create(de):(ce.prototype=de.prototype,new ce)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.AccessibilityManager=void 0;var ke=Me(18),Ce=Me(11),Le=Me(31),he=Me(7),ye=Me(2),xe=Me(32),ge=Me(17),le=function(ve){function de(ce,z){var ee=ve.call(this)||this;ee._terminal=ce,ee._renderService=z,ee._liveRegionLineCount=0,ee._charsToConsume=[],ee._charsToAnnounce="",ee._accessibilityTreeRoot=document.createElement("div"),ee._accessibilityTreeRoot.classList.add("xterm-accessibility"),ee._rowContainer=document.createElement("div"),ee._rowContainer.classList.add("xterm-accessibility-tree"),ee._rowContainer.setAttribute("role","list"),ee._rowElements=[];for(var oe=0;oe<ee._terminal.rows;oe++)ee._rowElements[oe]=ee._createAccessibilityTreeNode(),ee._rowContainer.appendChild(ee._rowElements[oe]);if(ee._topBoundaryFocusListener=function(ie){return ee._onBoundaryFocus(ie,0)},ee._bottomBoundaryFocusListener=function(ie){return ee._onBoundaryFocus(ie,1)},ee._rowElements[0].addEventListener("focus",ee._topBoundaryFocusListener),ee._rowElements[ee._rowElements.length-1].addEventListener("focus",ee._bottomBoundaryFocusListener),ee._refreshRowsDimensions(),ee._accessibilityTreeRoot.appendChild(ee._rowContainer),ee._renderRowsDebouncer=new Le.RenderDebouncer(ee._renderRows.bind(ee)),ee._refreshRows(),ee._liveRegion=document.createElement("div"),ee._liveRegion.classList.add("live-region"),ee._liveRegion.setAttribute("aria-live","assertive"),ee._accessibilityTreeRoot.appendChild(ee._liveRegion),!ee._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return ee._terminal.element.insertAdjacentElement("afterbegin",ee._accessibilityTreeRoot),ee.register(ee._renderRowsDebouncer),ee.register(ee._terminal.onResize(function(ie){return ee._onResize(ie.rows)})),ee.register(ee._terminal.onRender(function(ie){return ee._refreshRows(ie.start,ie.end)})),ee.register(ee._terminal.onScroll(function(){return ee._refreshRows()})),ee.register(ee._terminal.onA11yChar(function(ie){return ee._onChar(ie)})),ee.register(ee._terminal.onLineFeed(function(){return ee._onChar(`
|
|
|
`)})),ee.register(ee._terminal.onA11yTab(function(ie){return ee._onTab(ie)})),ee.register(ee._terminal.onKey(function(ie){return ee._onKey(ie.key)})),ee.register(ee._terminal.onBlur(function(){return ee._clearLiveRegion()})),ee.register(ee._renderService.onDimensionsChange(function(){return ee._refreshRowsDimensions()})),ee._screenDprMonitor=new xe.ScreenDprMonitor,ee.register(ee._screenDprMonitor),ee._screenDprMonitor.setListener(function(){return ee._refreshRowsDimensions()}),ee.register(he.addDisposableDomListener(window,"resize",function(){return ee._refreshRowsDimensions()})),ee}return Be(de,ve),de.prototype.dispose=function(){ve.prototype.dispose.call(this),ge.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},de.prototype._onBoundaryFocus=function(ce,z){var ee=ce.target,oe=this._rowElements[z===0?1:this._rowElements.length-2];if(ee.getAttribute("aria-posinset")!==(z===0?"1":""+this._terminal.buffer.lines.length)&&ce.relatedTarget===oe){var ie,se;if(z===0?(ie=ee,se=this._rowElements.pop(),this._rowContainer.removeChild(se)):(ie=this._rowElements.shift(),se=ee,this._rowContainer.removeChild(ie)),ie.removeEventListener("focus",this._topBoundaryFocusListener),se.removeEventListener("focus",this._bottomBoundaryFocusListener),z===0){var ue=this._createAccessibilityTreeNode();this._rowElements.unshift(ue),this._rowContainer.insertAdjacentElement("afterbegin",ue)}else ue=this._createAccessibilityTreeNode(),this._rowElements.push(ue),this._rowContainer.appendChild(ue);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(z===0?-1:1),this._rowElements[z===0?1:this._rowElements.length-2].focus(),ce.preventDefault(),ce.stopImmediatePropagation()}},de.prototype._onResize=function(ce){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var z=this._rowContainer.children.length;z<this._terminal.rows;z++)this._rowElements[z]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[z]);for(;this._rowElements.length>ce;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},de.prototype._createAccessibilityTreeNode=function(){var ce=document.createElement("div");return ce.setAttribute("role","listitem"),ce.tabIndex=-1,this._refreshRowDimensions(ce),ce},de.prototype._onTab=function(ce){for(var z=0;z<ce;z++)this._onChar(" ")},de.prototype._onChar=function(ce){var z=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==ce&&(this._charsToAnnounce+=ce):this._charsToAnnounce+=ce,ce===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=ke.tooMuchOutput)),Ce.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){z._accessibilityTreeRoot.appendChild(z._liveRegion)},0))},de.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,Ce.isMac&&ge.removeElementFromParent(this._liveRegion)},de.prototype._onKey=function(ce){this._clearLiveRegion(),this._charsToConsume.push(ce)},de.prototype._refreshRows=function(ce,z){this._renderRowsDebouncer.refresh(ce,z,this._terminal.rows)},de.prototype._renderRows=function(ce,z){for(var ee=this._terminal.buffer,oe=ee.lines.length.toString(),ie=ce;ie<=z;ie++){var se=ee.translateBufferLineToString(ee.ydisp+ie,!0),ue=(ee.ydisp+ie+1).toString(),Se=this._rowElements[ie];Se&&(se.length===0?Se.innerHTML=" ":Se.textContent=se,Se.setAttribute("aria-posinset",ue),Se.setAttribute("aria-setsize",oe))}this._announceCharacters()},de.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var ce=0;ce<this._terminal.rows;ce++)this._refreshRowDimensions(this._rowElements[ce])}},de.prototype._refreshRowDimensions=function(ce){ce.style.height=this._renderService.dimensions.actualCellHeight+"px"},de.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},de}(ye.Disposable);Ee.AccessibilityManager=le},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ee,oe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ie,se){ie.__proto__=se}||function(ie,se){for(var ue in se)se.hasOwnProperty(ue)&&(ie[ue]=se[ue])})(ee,oe)},function(ee,oe){function ie(){this.constructor=ee}me(ee,oe),ee.prototype=oe===null?Object.create(oe):(ie.prototype=oe.prototype,new ie)}),ke=this&&this.__decorate||function(ee,oe,ie,se){var ue,Se=arguments.length,we=Se<3?oe:se===null?se=Object.getOwnPropertyDescriptor(oe,ie):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")we=Reflect.decorate(ee,oe,ie,se);else for(var Pe=ee.length-1;Pe>=0;Pe--)(ue=ee[Pe])&&(we=(Se<3?ue(we):Se>3?ue(oe,ie,we):ue(oe,ie))||we);return Se>3&&we&&Object.defineProperty(oe,ie,we),we},Ce=this&&this.__param||function(ee,oe){return function(ie,se){oe(ie,se,ee)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DomRenderer=void 0;var Le=Me(58),he=Me(9),ye=Me(2),xe=Me(5),ge=Me(1),le=Me(0),ve=Me(10),de=Me(17),ce=1,z=function(ee){function oe(ie,se,ue,Se,we,Pe,Ae,De,ze){var Ze=ee.call(this)||this;return Ze._colors=ie,Ze._element=se,Ze._screenElement=ue,Ze._viewportElement=Se,Ze._linkifier=we,Ze._linkifier2=Pe,Ze._charSizeService=Ae,Ze._optionsService=De,Ze._bufferService=ze,Ze._terminalClass=ce++,Ze._rowElements=[],Ze._rowContainer=document.createElement("div"),Ze._rowContainer.classList.add("xterm-rows"),Ze._rowContainer.style.lineHeight="normal",Ze._rowContainer.setAttribute("aria-hidden","true"),Ze._refreshRowElements(Ze._bufferService.cols,Ze._bufferService.rows),Ze._selectionContainer=document.createElement("div"),Ze._selectionContainer.classList.add("xterm-selection"),Ze._selectionContainer.setAttribute("aria-hidden","true"),Ze.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},Ze._updateDimensions(),Ze._injectCss(),Ze._rowFactory=new Le.DomRendererRowFactory(document,Ze._optionsService,Ze._colors),Ze._element.classList.add("xterm-dom-renderer-owner-"+Ze._terminalClass),Ze._screenElement.appendChild(Ze._rowContainer),Ze._screenElement.appendChild(Ze._selectionContainer),Ze._linkifier.onShowLinkUnderline(function(Xe){return Ze._onLinkHover(Xe)}),Ze._linkifier.onHideLinkUnderline(function(Xe){return Ze._onLinkLeave(Xe)}),Ze._linkifier2.onShowLinkUnderline(function(Xe){return Ze._onLinkHover(Xe)}),Ze._linkifier2.onHideLinkUnderline(function(Xe){return Ze._onLinkLeave(Xe)}),Ze}return Be(oe,ee),Object.defineProperty(oe.prototype,"onRequestRedraw",{get:function(){return new le.EventEmitter().event},enumerable:!1,configurable:!0}),oe.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),de.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),ee.prototype.dispose.call(this)},oe.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 ie=0,se=this._rowElements;ie<se.length;ie++){var ue=se[ie];ue.style.width=this.dimensions.canvasWidth+"px",ue.style.height=this.dimensions.actualCellHeight+"px",ue.style.lineHeight=this.dimensions.actualCellHeight+"px",ue.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var Se=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=Se,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},oe.prototype.setColors=function(ie){this._colors=ie,this._injectCss()},oe.prototype._injectCss=function(){var ie=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var se=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";se+=this._terminalSelector+" span:not(."+Le.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+Le.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+Le.ITALIC_CLASS+" { font-style: italic;}",se+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",se+="@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+"; }}",se+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+Le.CURSOR_CLASS+"."+Le.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+Le.CURSOR_CLASS+"."+Le.CURSOR_BLINK_CLASS+":not(."+Le.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+Le.CURSOR_CLASS+"."+Le.CURSOR_BLINK_CLASS+"."+Le.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+Le.CURSOR_CLASS+"."+Le.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+Le.CURSOR_CLASS+"."+Le.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+Le.CURSOR_CLASS+"."+Le.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",se+=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(ue,Se){se+=ie._terminalSelector+" .xterm-fg-"+Se+" { color: "+ue.css+"; }"+ie._terminalSelector+" .xterm-bg-"+Se+" { background-color: "+ue.css+"; }"}),se+=this._terminalSelector+" .xterm-fg-"+he.INVERTED_DEFAULT_COLOR+" { color: "+ve.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+he.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=se},oe.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},oe.prototype._refreshRowElements=function(ie,se){for(var ue=this._rowElements.length;ue<=se;ue++){var Se=document.createElement("div");this._rowContainer.appendChild(Se),this._rowElements.push(Se)}for(;this._rowElements.length>se;)this._rowContainer.removeChild(this._rowElements.pop())},oe.prototype.onResize=function(ie,se){this._refreshRowElements(ie,se),this._updateDimensions()},oe.prototype.onCharSizeChanged=function(){this._updateDimensions()},oe.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},oe.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},oe.prototype.onSelectionChanged=function(ie,se,ue){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(ie&&se){var Se=ie[1]-this._bufferService.buffer.ydisp,we=se[1]-this._bufferService.buffer.ydisp,Pe=Math.max(Se,0),Ae=Math.min(we,this._bufferService.rows-1);if(!(Pe>=this._bufferService.rows||Ae<0)){var De=document.createDocumentFragment();if(ue)De.appendChild(this._createSelectionElement(Pe,ie[0],se[0],Ae-Pe+1));else{var ze=Se===Pe?ie[0]:0,Ze=Pe===Ae?se[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(Pe,ze,Ze));var Xe=Ae-Pe-1;if(De.appendChild(this._createSelectionElement(Pe+1,0,this._bufferService.cols,Xe)),Pe!==Ae){var Ge=we===Ae?se[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(Ae,0,Ge))}}this._selectionContainer.appendChild(De)}}},oe.prototype._createSelectionElement=function(ie,se,ue,Se){Se===void 0&&(Se=1);var we=document.createElement("div");return we.style.height=Se*this.dimensions.actualCellHeight+"px",we.style.top=ie*this.dimensions.actualCellHeight+"px",we.style.left=se*this.dimensions.actualCellWidth+"px",we.style.width=this.dimensions.actualCellWidth*(ue-se)+"px",we},oe.prototype.onCursorMove=function(){},oe.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},oe.prototype.clear=function(){for(var ie=0,se=this._rowElements;ie<se.length;ie++)se[ie].innerHTML=""},oe.prototype.renderRows=function(ie,se){for(var ue=this._bufferService.buffer.ybase+this._bufferService.buffer.y,Se=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),we=this._optionsService.options.cursorBlink,Pe=ie;Pe<=se;Pe++){var Ae=this._rowElements[Pe];Ae.innerHTML="";var De=Pe+this._bufferService.buffer.ydisp,ze=this._bufferService.buffer.lines.get(De),Ze=this._optionsService.options.cursorStyle;Ae.appendChild(this._rowFactory.createRow(ze,De===ue,Ze,Se,we,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(oe.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),oe.prototype.registerCharacterJoiner=function(ie){return-1},oe.prototype.deregisterCharacterJoiner=function(ie){return!1},oe.prototype._onLinkHover=function(ie){this._setCellUnderline(ie.x1,ie.x2,ie.y1,ie.y2,ie.cols,!0)},oe.prototype._onLinkLeave=function(ie){this._setCellUnderline(ie.x1,ie.x2,ie.y1,ie.y2,ie.cols,!1)},oe.prototype._setCellUnderline=function(ie,se,ue,Se,we,Pe){for(;ie!==se||ue!==Se;){var Ae=this._rowElements[ue];if(!Ae)return;var De=Ae.children[ie];De&&(De.style.textDecoration=Pe?"underline":"none"),++ie>=we&&(ie=0,ue++)}},oe=ke([Ce(6,xe.ICharSizeService),Ce(7,ge.IOptionsService),Ce(8,ge.IBufferService)],oe)}(ye.Disposable);Ee.DomRenderer=z},function(en,Ee,Me){"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 me=Me(9),Be=Me(3),ke=Me(4),Ce=Me(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 Le=function(){function ye(xe,ge,le){this._document=xe,this._optionsService=ge,this._colors=le,this._workCell=new ke.CellData}return ye.prototype.setColors=function(xe){this._colors=xe},ye.prototype.createRow=function(xe,ge,le,ve,de,ce,z){for(var ee=this._document.createDocumentFragment(),oe=0,ie=Math.min(xe.length,z)-1;ie>=0;ie--)if(xe.loadCell(ie,this._workCell).getCode()!==Be.NULL_CELL_CODE||ge&&ie===ve){oe=ie+1;break}for(ie=0;ie<oe;ie++){xe.loadCell(ie,this._workCell);var se=this._workCell.getWidth();if(se!==0){var ue=this._document.createElement("span");if(se>1&&(ue.style.width=ce*se+"px"),ge&&ie===ve)switch(ue.classList.add(Ee.CURSOR_CLASS),de&&ue.classList.add(Ee.CURSOR_BLINK_CLASS),le){case"bar":ue.classList.add(Ee.CURSOR_STYLE_BAR_CLASS);break;case"underline":ue.classList.add(Ee.CURSOR_STYLE_UNDERLINE_CLASS);break;default:ue.classList.add(Ee.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&ue.classList.add(Ee.BOLD_CLASS),this._workCell.isItalic()&&ue.classList.add(Ee.ITALIC_CLASS),this._workCell.isDim()&&ue.classList.add(Ee.DIM_CLASS),this._workCell.isUnderline()&&ue.classList.add(Ee.UNDERLINE_CLASS),this._workCell.isInvisible()?ue.textContent=Be.WHITESPACE_CELL_CHAR:ue.textContent=this._workCell.getChars()||Be.WHITESPACE_CELL_CHAR;var Se=this._workCell.getFgColor(),we=this._workCell.getFgColorMode(),Pe=this._workCell.getBgColor(),Ae=this._workCell.getBgColorMode(),De=!!this._workCell.isInverse();if(De){var ze=Se;Se=Pe,Pe=ze;var Ze=we;we=Ae,Ae=Ze}switch(we){case 16777216:case 33554432:this._workCell.isBold()&&Se<8&&this._optionsService.options.drawBoldTextInBrightColors&&(Se+=8),this._applyMinimumContrast(ue,this._colors.background,this._colors.ansi[Se])||ue.classList.add("xterm-fg-"+Se);break;case 50331648:var Xe=Ce.rgba.toColor(Se>>16&255,Se>>8&255,255&Se);this._applyMinimumContrast(ue,this._colors.background,Xe)||this._addStyle(ue,"color:#"+he(Se.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(ue,this._colors.background,this._colors.foreground)||De&&ue.classList.add("xterm-fg-"+me.INVERTED_DEFAULT_COLOR)}switch(Ae){case 16777216:case 33554432:ue.classList.add("xterm-bg-"+Pe);break;case 50331648:this._addStyle(ue,"background-color:#"+he(Pe.toString(16),"0",6));break;case 0:default:De&&ue.classList.add("xterm-bg-"+me.INVERTED_DEFAULT_COLOR)}ee.appendChild(ue)}}return ee},ye.prototype._applyMinimumContrast=function(xe,ge,le){if(this._optionsService.options.minimumContrastRatio===1)return!1;var ve=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return ve===void 0&&(ve=Ce.color.ensureContrastRatio(ge,le,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,ve!=null?ve:null)),!!ve&&(this._addStyle(xe,"color:"+ve.css),!0)},ye.prototype._addStyle=function(xe,ge){xe.setAttribute("style",""+(xe.getAttribute("style")||"")+ge+";")},ye}();function he(ye,xe,ge){for(;ye.length<ge;)ye=xe+ye;return ye}Ee.DomRendererRowFactory=Le},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.evaluateKeyboardEvent=void 0;var me=Me(12),Be={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(ke,Ce,Le,he){var ye={type:0,cancel:!1,key:void 0},xe=(ke.shiftKey?1:0)|(ke.altKey?2:0)|(ke.ctrlKey?4:0)|(ke.metaKey?8:0);switch(ke.keyCode){case 0:ke.key==="UIKeyInputUpArrow"?ye.key=Ce?me.C0.ESC+"OA":me.C0.ESC+"[A":ke.key==="UIKeyInputLeftArrow"?ye.key=Ce?me.C0.ESC+"OD":me.C0.ESC+"[D":ke.key==="UIKeyInputRightArrow"?ye.key=Ce?me.C0.ESC+"OC":me.C0.ESC+"[C":ke.key==="UIKeyInputDownArrow"&&(ye.key=Ce?me.C0.ESC+"OB":me.C0.ESC+"[B");break;case 8:if(ke.shiftKey){ye.key=me.C0.BS;break}if(ke.altKey){ye.key=me.C0.ESC+me.C0.DEL;break}ye.key=me.C0.DEL;break;case 9:if(ke.shiftKey){ye.key=me.C0.ESC+"[Z";break}ye.key=me.C0.HT,ye.cancel=!0;break;case 13:ye.key=ke.altKey?me.C0.ESC+me.C0.CR:me.C0.CR,ye.cancel=!0;break;case 27:ye.key=me.C0.ESC,ke.altKey&&(ye.key=me.C0.ESC+me.C0.ESC),ye.cancel=!0;break;case 37:if(ke.metaKey)break;xe?(ye.key=me.C0.ESC+"[1;"+(xe+1)+"D",ye.key===me.C0.ESC+"[1;3D"&&(ye.key=me.C0.ESC+(Le?"b":"[1;5D"))):ye.key=Ce?me.C0.ESC+"OD":me.C0.ESC+"[D";break;case 39:if(ke.metaKey)break;xe?(ye.key=me.C0.ESC+"[1;"+(xe+1)+"C",ye.key===me.C0.ESC+"[1;3C"&&(ye.key=me.C0.ESC+(Le?"f":"[1;5C"))):ye.key=Ce?me.C0.ESC+"OC":me.C0.ESC+"[C";break;case 38:if(ke.metaKey)break;xe?(ye.key=me.C0.ESC+"[1;"+(xe+1)+"A",Le||ye.key!==me.C0.ESC+"[1;3A"||(ye.key=me.C0.ESC+"[1;5A")):ye.key=Ce?me.C0.ESC+"OA":me.C0.ESC+"[A";break;case 40:if(ke.metaKey)break;xe?(ye.key=me.C0.ESC+"[1;"+(xe+1)+"B",Le||ye.key!==me.C0.ESC+"[1;3B"||(ye.key=me.C0.ESC+"[1;5B")):ye.key=Ce?me.C0.ESC+"OB":me.C0.ESC+"[B";break;case 45:ke.shiftKey||ke.ctrlKey||(ye.key=me.C0.ESC+"[2~");break;case 46:ye.key=xe?me.C0.ESC+"[3;"+(xe+1)+"~":me.C0.ESC+"[3~";break;case 36:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"H":Ce?me.C0.ESC+"OH":me.C0.ESC+"[H";break;case 35:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"F":Ce?me.C0.ESC+"OF":me.C0.ESC+"[F";break;case 33:ke.shiftKey?ye.type=2:ye.key=me.C0.ESC+"[5~";break;case 34:ke.shiftKey?ye.type=3:ye.key=me.C0.ESC+"[6~";break;case 112:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"P":me.C0.ESC+"OP";break;case 113:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"Q":me.C0.ESC+"OQ";break;case 114:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"R":me.C0.ESC+"OR";break;case 115:ye.key=xe?me.C0.ESC+"[1;"+(xe+1)+"S":me.C0.ESC+"OS";break;case 116:ye.key=xe?me.C0.ESC+"[15;"+(xe+1)+"~":me.C0.ESC+"[15~";break;case 117:ye.key=xe?me.C0.ESC+"[17;"+(xe+1)+"~":me.C0.ESC+"[17~";break;case 118:ye.key=xe?me.C0.ESC+"[18;"+(xe+1)+"~":me.C0.ESC+"[18~";break;case 119:ye.key=xe?me.C0.ESC+"[19;"+(xe+1)+"~":me.C0.ESC+"[19~";break;case 120:ye.key=xe?me.C0.ESC+"[20;"+(xe+1)+"~":me.C0.ESC+"[20~";break;case 121:ye.key=xe?me.C0.ESC+"[21;"+(xe+1)+"~":me.C0.ESC+"[21~";break;case 122:ye.key=xe?me.C0.ESC+"[23;"+(xe+1)+"~":me.C0.ESC+"[23~";break;case 123:ye.key=xe?me.C0.ESC+"[24;"+(xe+1)+"~":me.C0.ESC+"[24~";break;default:if(!ke.ctrlKey||ke.shiftKey||ke.altKey||ke.metaKey)if(Le&&!he||!ke.altKey||ke.metaKey)Le&&!ke.altKey&&!ke.ctrlKey&&ke.metaKey?ke.keyCode===65&&(ye.type=1):ke.key&&!ke.ctrlKey&&!ke.altKey&&!ke.metaKey&&ke.keyCode>=48&&ke.key.length===1?ye.key=ke.key:ke.key&&ke.ctrlKey&&ke.key==="_"&&(ye.key=me.C0.US);else{var ge=Be[ke.keyCode],le=ge&&ge[ke.shiftKey?1:0];if(le)ye.key=me.C0.ESC+le;else if(ke.keyCode>=65&&ke.keyCode<=90){var ve=ke.ctrlKey?ke.keyCode-64:ke.keyCode+32;ye.key=me.C0.ESC+String.fromCharCode(ve)}}else ke.keyCode>=65&&ke.keyCode<=90?ye.key=String.fromCharCode(ke.keyCode-64):ke.keyCode===32?ye.key=me.C0.NUL:ke.keyCode>=51&&ke.keyCode<=55?ye.key=String.fromCharCode(ke.keyCode-51+27):ke.keyCode===56?ye.key=me.C0.DEL:ke.keyCode===219?ye.key=me.C0.ESC:ke.keyCode===220?ye.key=me.C0.FS:ke.keyCode===221&&(ye.key=me.C0.GS)}return ye}},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ce,z){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,oe){ee.__proto__=oe}||function(ee,oe){for(var ie in oe)oe.hasOwnProperty(ie)&&(ee[ie]=oe[ie])})(ce,z)},function(ce,z){function ee(){this.constructor=ce}me(ce,z),ce.prototype=z===null?Object.create(z):(ee.prototype=z.prototype,new ee)}),ke=this&&this.__decorate||function(ce,z,ee,oe){var ie,se=arguments.length,ue=se<3?z:oe===null?oe=Object.getOwnPropertyDescriptor(z,ee):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(ce,z,ee,oe);else for(var Se=ce.length-1;Se>=0;Se--)(ie=ce[Se])&&(ue=(se<3?ie(ue):se>3?ie(z,ee,ue):ie(z,ee))||ue);return se>3&&ue&&Object.defineProperty(z,ee,ue),ue},Ce=this&&this.__param||function(ce,z){return function(ee,oe){z(ee,oe,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.RenderService=void 0;var Le=Me(31),he=Me(0),ye=Me(2),xe=Me(32),ge=Me(7),le=Me(1),ve=Me(5),de=function(ce){function z(ee,oe,ie,se,ue,Se){var we=ce.call(this)||this;if(we._renderer=ee,we._rowCount=oe,we._isPaused=!1,we._needsFullRefresh=!1,we._isNextRenderRedrawOnly=!0,we._needsSelectionRefresh=!1,we._canvasWidth=0,we._canvasHeight=0,we._selectionState={start:void 0,end:void 0,columnSelectMode:!1},we._onDimensionsChange=new he.EventEmitter,we._onRender=new he.EventEmitter,we._onRefreshRequest=new he.EventEmitter,we.register({dispose:function(){return we._renderer.dispose()}}),we._renderDebouncer=new Le.RenderDebouncer(function(Ae,De){return we._renderRows(Ae,De)}),we.register(we._renderDebouncer),we._screenDprMonitor=new xe.ScreenDprMonitor,we._screenDprMonitor.setListener(function(){return we.onDevicePixelRatioChange()}),we.register(we._screenDprMonitor),we.register(Se.onResize(function(Ae){return we._fullRefresh()})),we.register(se.onOptionChange(function(){return we._renderer.onOptionsChanged()})),we.register(ue.onCharSizeChange(function(){return we.onCharSizeChanged()})),we._renderer.onRequestRedraw(function(Ae){return we.refreshRows(Ae.start,Ae.end,!0)}),we.register(ge.addDisposableDomListener(window,"resize",function(){return we.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var Pe=new IntersectionObserver(function(Ae){return we._onIntersectionChange(Ae[Ae.length-1])},{threshold:0});Pe.observe(ie),we.register({dispose:function(){return Pe.disconnect()}})}return we}return Be(z,ce),Object.defineProperty(z.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),z.prototype._onIntersectionChange=function(ee){this._isPaused=ee.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},z.prototype.refreshRows=function(ee,oe,ie){ie===void 0&&(ie=!1),this._isPaused?this._needsFullRefresh=!0:(ie||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(ee,oe,this._rowCount))},z.prototype._renderRows=function(ee,oe){this._renderer.renderRows(ee,oe),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:ee,end:oe}),this._isNextRenderRedrawOnly=!0},z.prototype.resize=function(ee,oe){this._rowCount=oe,this._fireOnCanvasResize()},z.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},z.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},z.prototype.dispose=function(){ce.prototype.dispose.call(this)},z.prototype.setRenderer=function(ee){var oe=this;this._renderer.dispose(),this._renderer=ee,this._renderer.onRequestRedraw(function(ie){return oe.refreshRows(ie.start,ie.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},z.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},z.prototype.setColors=function(ee){this._renderer.setColors(ee),this._fullRefresh()},z.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},z.prototype.onResize=function(ee,oe){this._renderer.onResize(ee,oe),this._fullRefresh()},z.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},z.prototype.onBlur=function(){this._renderer.onBlur()},z.prototype.onFocus=function(){this._renderer.onFocus()},z.prototype.onSelectionChanged=function(ee,oe,ie){this._selectionState.start=ee,this._selectionState.end=oe,this._selectionState.columnSelectMode=ie,this._renderer.onSelectionChanged(ee,oe,ie)},z.prototype.onCursorMove=function(){this._renderer.onCursorMove()},z.prototype.clear=function(){this._renderer.clear()},z.prototype.registerCharacterJoiner=function(ee){return this._renderer.registerCharacterJoiner(ee)},z.prototype.deregisterCharacterJoiner=function(ee){return this._renderer.deregisterCharacterJoiner(ee)},z=ke([Ce(3,le.IOptionsService),Ce(4,ve.ICharSizeService),Ce(5,le.IBufferService)],z)}(ye.Disposable);Ee.RenderService=de},function(en,Ee,Me){"use strict";var me=this&&this.__decorate||function(ye,xe,ge,le){var ve,de=arguments.length,ce=de<3?xe:le===null?le=Object.getOwnPropertyDescriptor(xe,ge):le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(ye,xe,ge,le);else for(var z=ye.length-1;z>=0;z--)(ve=ye[z])&&(ce=(de<3?ve(ce):de>3?ve(xe,ge,ce):ve(xe,ge))||ce);return de>3&&ce&&Object.defineProperty(xe,ge,ce),ce},Be=this&&this.__param||function(ye,xe){return function(ge,le){xe(ge,le,ye)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharSizeService=void 0;var ke=Me(1),Ce=Me(0),Le=function(){function ye(xe,ge,le){this._optionsService=le,this.width=0,this.height=0,this._onCharSizeChange=new Ce.EventEmitter,this._measureStrategy=new he(xe,ge,this._optionsService)}return Object.defineProperty(ye.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),ye.prototype.measure=function(){var xe=this._measureStrategy.measure();xe.width===this.width&&xe.height===this.height||(this.width=xe.width,this.height=xe.height,this._onCharSizeChange.fire())},ye=me([Be(2,ke.IOptionsService)],ye)}();Ee.CharSizeService=Le;var he=function(){function ye(xe,ge,le){this._document=xe,this._parentElement=ge,this._optionsService=le,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 ye.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var xe=this._measureElement.getBoundingClientRect();return xe.width!==0&&xe.height!==0&&(this._result.width=xe.width,this._result.height=Math.ceil(xe.height)),this._result},ye}()},function(en,Ee,Me){"use strict";var me=this&&this.__decorate||function(he,ye,xe,ge){var le,ve=arguments.length,de=ve<3?ye:ge===null?ge=Object.getOwnPropertyDescriptor(ye,xe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(he,ye,xe,ge);else for(var ce=he.length-1;ce>=0;ce--)(le=he[ce])&&(de=(ve<3?le(de):ve>3?le(ye,xe,de):le(ye,xe))||de);return ve>3&&de&&Object.defineProperty(ye,xe,de),de},Be=this&&this.__param||function(he,ye){return function(xe,ge){ye(xe,ge,he)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseService=void 0;var ke=Me(5),Ce=Me(30),Le=function(){function he(ye,xe){this._renderService=ye,this._charSizeService=xe}return he.prototype.getCoords=function(ye,xe,ge,le,ve){return Ce.getCoords(ye,xe,ge,le,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,ve)},he.prototype.getRawByteCoords=function(ye,xe,ge,le){var ve=this.getCoords(ye,xe,ge,le);return Ce.getRawByteCoords(ve)},he=me([Be(0,ke.IRenderService),Be(1,ke.ICharSizeService)],he)}();Ee.MouseService=Le},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),ke=this&&this.__decorate||function(le,ve,de,ce){var z,ee=arguments.length,oe=ee<3?ve:ce===null?ce=Object.getOwnPropertyDescriptor(ve,de):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(le,ve,de,ce);else for(var ie=le.length-1;ie>=0;ie--)(z=le[ie])&&(oe=(ee<3?z(oe):ee>3?z(ve,de,oe):z(ve,de))||oe);return ee>3&&oe&&Object.defineProperty(ve,de,oe),oe},Ce=this&&this.__param||function(le,ve){return function(de,ce){ve(de,ce,le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Linkifier2=void 0;var Le=Me(1),he=Me(0),ye=Me(2),xe=Me(7),ge=function(le){function ve(de){var ce=le.call(this)||this;return ce._bufferService=de,ce._linkProviders=[],ce._linkCacheDisposables=[],ce._isMouseOut=!0,ce._activeLine=-1,ce._onShowLinkUnderline=ce.register(new he.EventEmitter),ce._onHideLinkUnderline=ce.register(new he.EventEmitter),ce.register(ye.getDisposeArrayDisposable(ce._linkCacheDisposables)),ce}return Be(ve,le),Object.defineProperty(ve.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),ve.prototype.registerLinkProvider=function(de){var ce=this;return this._linkProviders.push(de),{dispose:function(){var z=ce._linkProviders.indexOf(de);z!==-1&&ce._linkProviders.splice(z,1)}}},ve.prototype.attachToDom=function(de,ce,z){var ee=this;this._element=de,this._mouseService=ce,this._renderService=z,this.register(xe.addDisposableDomListener(this._element,"mouseleave",function(){ee._isMouseOut=!0,ee._clearCurrentLink()})),this.register(xe.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(xe.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},ve.prototype._onMouseMove=function(de){if(this._lastMouseEvent=de,this._element&&this._mouseService){var ce=this._positionFromMouseEvent(de,this._element,this._mouseService);if(ce){this._isMouseOut=!1;for(var z=de.composedPath(),ee=0;ee<z.length;ee++){var oe=z[ee];if(oe.classList.contains("xterm"))break;if(oe.classList.contains("xterm-hover"))return}this._lastBufferCell&&ce.x===this._lastBufferCell.x&&ce.y===this._lastBufferCell.y||(this._onHover(ce),this._lastBufferCell=ce)}}},ve.prototype._onHover=function(de){if(this._activeLine!==de.y)return this._clearCurrentLink(),void this._askForLink(de,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,de)||(this._clearCurrentLink(),this._askForLink(de,!0))},ve.prototype._askForLink=function(de,ce){var z=this;this._activeProviderReplies&&ce||(this._activeProviderReplies=new Map,this._activeLine=de.y);var ee=!1;this._linkProviders.forEach(function(oe,ie){var se;ce?!((se=z._activeProviderReplies)===null||se===void 0)&&se.get(ie)&&(ee=z._checkLinkProviderResult(ie,de,ee)):oe.provideLinks(de.y,function(ue){var Se,we;if(!z._isMouseOut){var Pe=ue==null?void 0:ue.map(function(Ae){return{link:Ae}});(Se=z._activeProviderReplies)===null||Se===void 0||Se.set(ie,Pe),ee=z._checkLinkProviderResult(ie,de,ee),((we=z._activeProviderReplies)===null||we===void 0?void 0:we.size)===z._linkProviders.length&&z._removeIntersectingLinks(de.y,z._activeProviderReplies)}})})},ve.prototype._removeIntersectingLinks=function(de,ce){for(var z=new Set,ee=0;ee<ce.size;ee++){var oe=ce.get(ee);if(oe)for(var ie=0;ie<oe.length;ie++)for(var se=oe[ie],ue=se.link.range.start.y<de?0:se.link.range.start.x,Se=se.link.range.end.y>de?this._bufferService.cols:se.link.range.end.x,we=ue;we<=Se;we++){if(z.has(we)){oe.splice(ie--,1);break}z.add(we)}}},ve.prototype._checkLinkProviderResult=function(de,ce,z){var ee,oe=this;if(!this._activeProviderReplies)return z;for(var ie=this._activeProviderReplies.get(de),se=!1,ue=0;ue<de;ue++)this._activeProviderReplies.has(ue)&&!this._activeProviderReplies.get(ue)||(se=!0);if(!se&&ie){var Se=ie.find(function(Pe){return oe._linkAtPosition(Pe.link,ce)});Se&&(z=!0,this._handleNewLink(Se))}if(this._activeProviderReplies.size===this._linkProviders.length&&!z)for(ue=0;ue<this._activeProviderReplies.size;ue++){var we=(ee=this._activeProviderReplies.get(ue))===null||ee===void 0?void 0:ee.find(function(Pe){return oe._linkAtPosition(Pe.link,ce)});if(we){z=!0,this._handleNewLink(we);break}}return z},ve.prototype._onClick=function(de){if(this._element&&this._mouseService&&this._currentLink){var ce=this._positionFromMouseEvent(de,this._element,this._mouseService);ce&&this._linkAtPosition(this._currentLink.link,ce)&&this._currentLink.link.activate(de,this._currentLink.link.text)}},ve.prototype._clearCurrentLink=function(de,ce){this._element&&this._currentLink&&this._lastMouseEvent&&(!de||!ce||this._currentLink.link.range.start.y>=de&&this._currentLink.link.range.end.y<=ce)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,ye.disposeArray(this._linkCacheDisposables))},ve.prototype._handleNewLink=function(de){var ce=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var z=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);z&&this._linkAtPosition(de.link,z)&&(this._currentLink=de,this._currentLink.state={decorations:{underline:de.link.decorations===void 0||de.link.decorations.underline,pointerCursor:de.link.decorations===void 0||de.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,de.link,this._lastMouseEvent),de.link.decorations={},Object.defineProperties(de.link.decorations,{pointerCursor:{get:function(){var ee,oe;return(oe=(ee=ce._currentLink)===null||ee===void 0?void 0:ee.state)===null||oe===void 0?void 0:oe.decorations.pointerCursor},set:function(ee){var oe,ie;!((oe=ce._currentLink)===null||oe===void 0)&&oe.state&&ce._currentLink.state.decorations.pointerCursor!==ee&&(ce._currentLink.state.decorations.pointerCursor=ee,ce._currentLink.state.isHovered&&((ie=ce._element)===null||ie===void 0||ie.classList.toggle("xterm-cursor-pointer",ee)))}},underline:{get:function(){var ee,oe;return(oe=(ee=ce._currentLink)===null||ee===void 0?void 0:ee.state)===null||oe===void 0?void 0:oe.decorations.underline},set:function(ee){var oe,ie,se;!((oe=ce._currentLink)===null||oe===void 0)&&oe.state&&((se=(ie=ce._currentLink)===null||ie===void 0?void 0:ie.state)===null||se===void 0?void 0:se.decorations.underline)!==ee&&(ce._currentLink.state.decorations.underline=ee,ce._currentLink.state.isHovered&&ce._fireUnderlineEvent(de.link,ee))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(ee){var oe=ee.start===0?0:ee.start+1+ce._bufferService.buffer.ydisp;ce._clearCurrentLink(oe,ee.end+1+ce._bufferService.buffer.ydisp)})))}},ve.prototype._linkHover=function(de,ce,z){var ee;!((ee=this._currentLink)===null||ee===void 0)&&ee.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ce,!0),this._currentLink.state.decorations.pointerCursor&&de.classList.add("xterm-cursor-pointer")),ce.hover&&ce.hover(z,ce.text)},ve.prototype._fireUnderlineEvent=function(de,ce){var z=de.range,ee=this._bufferService.buffer.ydisp,oe=this._createLinkUnderlineEvent(z.start.x-1,z.start.y-ee-1,z.end.x,z.end.y-ee-1,void 0);(ce?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(oe)},ve.prototype._linkLeave=function(de,ce,z){var ee;!((ee=this._currentLink)===null||ee===void 0)&&ee.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ce,!1),this._currentLink.state.decorations.pointerCursor&&de.classList.remove("xterm-cursor-pointer")),ce.leave&&ce.leave(z,ce.text)},ve.prototype._linkAtPosition=function(de,ce){var z=de.range.start.y===de.range.end.y,ee=de.range.start.y<ce.y,oe=de.range.end.y>ce.y;return(z&&de.range.start.x<=ce.x&&de.range.end.x>=ce.x||ee&&de.range.end.x>=ce.x||oe&&de.range.start.x<=ce.x||ee&&oe)&&de.range.start.y<=ce.y&&de.range.end.y>=ce.y},ve.prototype._positionFromMouseEvent=function(de,ce,z){var ee=z.getCoords(de,ce,this._bufferService.cols,this._bufferService.rows);if(ee)return{x:ee[0],y:ee[1]+this._bufferService.buffer.ydisp}},ve.prototype._createLinkUnderlineEvent=function(de,ce,z,ee,oe){return{x1:de,y1:ce,x2:z,y2:ee,cols:this._bufferService.cols,fg:oe}},ve=ke([Ce(0,Le.IBufferService)],ve)}(ye.Disposable);Ee.Linkifier2=ge},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreBrowserService=void 0;var me=function(){function Be(ke){this._textarea=ke}return Object.defineProperty(Be.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Be}();Ee.CoreBrowserService=me},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(ue,Se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(we,Pe){we.__proto__=Pe}||function(we,Pe){for(var Ae in Pe)Pe.hasOwnProperty(Ae)&&(we[Ae]=Pe[Ae])})(ue,Se)},function(ue,Se){function we(){this.constructor=ue}me(ue,Se),ue.prototype=Se===null?Object.create(Se):(we.prototype=Se.prototype,new we)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreTerminal=void 0;var ke=Me(2),Ce=Me(1),Le=Me(66),he=Me(67),ye=Me(68),xe=Me(74),ge=Me(75),le=Me(0),ve=Me(76),de=Me(77),ce=Me(78),z=Me(80),ee=Me(81),oe=Me(19),ie=Me(82),se=function(ue){function Se(we){var Pe=ue.call(this)||this;return Pe._onBinary=new le.EventEmitter,Pe._onData=new le.EventEmitter,Pe._onLineFeed=new le.EventEmitter,Pe._onResize=new le.EventEmitter,Pe._onScroll=new le.EventEmitter,Pe._instantiationService=new Le.InstantiationService,Pe.optionsService=new xe.OptionsService(we),Pe._instantiationService.setService(Ce.IOptionsService,Pe.optionsService),Pe._bufferService=Pe.register(Pe._instantiationService.createInstance(ye.BufferService)),Pe._instantiationService.setService(Ce.IBufferService,Pe._bufferService),Pe._logService=Pe._instantiationService.createInstance(he.LogService),Pe._instantiationService.setService(Ce.ILogService,Pe._logService),Pe._coreService=Pe.register(Pe._instantiationService.createInstance(ge.CoreService,function(){return Pe.scrollToBottom()})),Pe._instantiationService.setService(Ce.ICoreService,Pe._coreService),Pe._coreMouseService=Pe._instantiationService.createInstance(ve.CoreMouseService),Pe._instantiationService.setService(Ce.ICoreMouseService,Pe._coreMouseService),Pe._dirtyRowService=Pe._instantiationService.createInstance(de.DirtyRowService),Pe._instantiationService.setService(Ce.IDirtyRowService,Pe._dirtyRowService),Pe.unicodeService=Pe._instantiationService.createInstance(ce.UnicodeService),Pe._instantiationService.setService(Ce.IUnicodeService,Pe.unicodeService),Pe._charsetService=Pe._instantiationService.createInstance(z.CharsetService),Pe._instantiationService.setService(Ce.ICharsetService,Pe._charsetService),Pe._inputHandler=new oe.InputHandler(Pe._bufferService,Pe._charsetService,Pe._coreService,Pe._dirtyRowService,Pe._logService,Pe.optionsService,Pe._coreMouseService,Pe.unicodeService),Pe.register(le.forwardEvent(Pe._inputHandler.onLineFeed,Pe._onLineFeed)),Pe.register(Pe._inputHandler),Pe.register(le.forwardEvent(Pe._bufferService.onResize,Pe._onResize)),Pe.register(le.forwardEvent(Pe._coreService.onData,Pe._onData)),Pe.register(le.forwardEvent(Pe._coreService.onBinary,Pe._onBinary)),Pe.register(Pe.optionsService.onOptionChange(function(Ae){return Pe._updateOptions(Ae)})),Pe._writeBuffer=new ie.WriteBuffer(function(Ae){return Pe._inputHandler.parse(Ae)}),Pe}return Be(Se,ue),Object.defineProperty(Se.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Se.prototype.dispose=function(){var we;this._isDisposed||(ue.prototype.dispose.call(this),(we=this._windowsMode)===null||we===void 0||we.dispose(),this._windowsMode=void 0)},Se.prototype.write=function(we,Pe){this._writeBuffer.write(we,Pe)},Se.prototype.writeSync=function(we){this._writeBuffer.writeSync(we)},Se.prototype.resize=function(we,Pe){isNaN(we)||isNaN(Pe)||(we=Math.max(we,ye.MINIMUM_COLS),Pe=Math.max(Pe,ye.MINIMUM_ROWS),this._bufferService.resize(we,Pe))},Se.prototype.scroll=function(we,Pe){Pe===void 0&&(Pe=!1);var Ae,De=this._bufferService.buffer;(Ae=this._cachedBlankLine)&&Ae.length===this.cols&&Ae.getFg(0)===we.fg&&Ae.getBg(0)===we.bg||(Ae=De.getBlankLine(we,Pe),this._cachedBlankLine=Ae),Ae.isWrapped=Pe;var ze=De.ybase+De.scrollTop,Ze=De.ybase+De.scrollBottom;if(De.scrollTop===0){var Xe=De.lines.isFull;Ze===De.lines.length-1?Xe?De.lines.recycle().copyFrom(Ae):De.lines.push(Ae.clone()):De.lines.splice(Ze+1,0,Ae.clone()),Xe?this._bufferService.isUserScrolling&&(De.ydisp=Math.max(De.ydisp-1,0)):(De.ybase++,this._bufferService.isUserScrolling||De.ydisp++)}else{var Ge=Ze-ze+1;De.lines.shiftElements(ze+1,Ge-1,-1),De.lines.set(Ze,Ae.clone())}this._bufferService.isUserScrolling||(De.ydisp=De.ybase),this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom),this._onScroll.fire(De.ydisp)},Se.prototype.scrollLines=function(we,Pe){var Ae=this._bufferService.buffer;if(we<0){if(Ae.ydisp===0)return;this._bufferService.isUserScrolling=!0}else we+Ae.ydisp>=Ae.ybase&&(this._bufferService.isUserScrolling=!1);var De=Ae.ydisp;Ae.ydisp=Math.max(Math.min(Ae.ydisp+we,Ae.ybase),0),De!==Ae.ydisp&&(Pe||this._onScroll.fire(Ae.ydisp))},Se.prototype.scrollPages=function(we){this.scrollLines(we*(this.rows-1))},Se.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},Se.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},Se.prototype.scrollToLine=function(we){var Pe=we-this._bufferService.buffer.ydisp;Pe!==0&&this.scrollLines(Pe)},Se.prototype.addEscHandler=function(we,Pe){return this._inputHandler.addEscHandler(we,Pe)},Se.prototype.addDcsHandler=function(we,Pe){return this._inputHandler.addDcsHandler(we,Pe)},Se.prototype.addCsiHandler=function(we,Pe){return this._inputHandler.addCsiHandler(we,Pe)},Se.prototype.addOscHandler=function(we,Pe){return this._inputHandler.addOscHandler(we,Pe)},Se.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},Se.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},Se.prototype._updateOptions=function(we){var Pe;switch(we){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((Pe=this._windowsMode)===null||Pe===void 0||Pe.dispose(),this._windowsMode=void 0)}},Se.prototype._enableWindowsMode=function(){var we=this;if(!this._windowsMode){var Pe=[];Pe.push(this.onLineFeed(ee.updateWindowsModeWrappedState.bind(null,this._bufferService))),Pe.push(this.addCsiHandler({final:"H"},function(){return ee.updateWindowsModeWrappedState(we._bufferService),!1})),this._windowsMode={dispose:function(){for(var Ae=0,De=Pe;Ae<De.length;Ae++)De[Ae].dispose()}}}},Se}(ke.Disposable);Ee.CoreTerminal=se},function(en,Ee,Me){"use strict";var me=this&&this.__spreadArrays||function(){for(var he=0,ye=0,xe=arguments.length;ye<xe;ye++)he+=arguments[ye].length;var ge=Array(he),le=0;for(ye=0;ye<xe;ye++)for(var ve=arguments[ye],de=0,ce=ve.length;de<ce;de++,le++)ge[le]=ve[de];return ge};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InstantiationService=Ee.ServiceCollection=void 0;var Be=Me(1),ke=Me(14),Ce=function(){function he(){for(var ye=[],xe=0;xe<arguments.length;xe++)ye[xe]=arguments[xe];this._entries=new Map;for(var ge=0,le=ye;ge<le.length;ge++){var ve=le[ge],de=ve[0],ce=ve[1];this.set(de,ce)}}return he.prototype.set=function(ye,xe){var ge=this._entries.get(ye);return this._entries.set(ye,xe),ge},he.prototype.forEach=function(ye){this._entries.forEach(function(xe,ge){return ye(ge,xe)})},he.prototype.has=function(ye){return this._entries.has(ye)},he.prototype.get=function(ye){return this._entries.get(ye)},he}();Ee.ServiceCollection=Ce;var Le=function(){function he(){this._services=new Ce,this._services.set(Be.IInstantiationService,this)}return he.prototype.setService=function(ye,xe){this._services.set(ye,xe)},he.prototype.getService=function(ye){return this._services.get(ye)},he.prototype.createInstance=function(ye){for(var xe=[],ge=1;ge<arguments.length;ge++)xe[ge-1]=arguments[ge];for(var le=ke.getServiceDependencies(ye).sort(function(ie,se){return ie.index-se.index}),ve=[],de=0,ce=le;de<ce.length;de++){var z=ce[de],ee=this._services.get(z.id);if(!ee)throw new Error("[createInstance] "+ye.name+" depends on UNKNOWN service "+z.id+".");ve.push(ee)}var oe=le.length>0?le[0].index:xe.length;if(xe.length!==oe)throw new Error("[createInstance] First service dependency of "+ye.name+" at position "+(oe+1)+" conflicts with "+xe.length+" static arguments");return new(ye.bind.apply(ye,me([void 0],me(xe,ve))))},he}();Ee.InstantiationService=Le},function(en,Ee,Me){"use strict";var me=this&&this.__decorate||function(xe,ge,le,ve){var de,ce=arguments.length,z=ce<3?ge:ve===null?ve=Object.getOwnPropertyDescriptor(ge,le):ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(xe,ge,le,ve);else for(var ee=xe.length-1;ee>=0;ee--)(de=xe[ee])&&(z=(ce<3?de(z):ce>3?de(ge,le,z):de(ge,le))||z);return ce>3&&z&&Object.defineProperty(ge,le,z),z},Be=this&&this.__param||function(xe,ge){return function(le,ve){ge(le,ve,xe)}},ke=this&&this.__spreadArrays||function(){for(var xe=0,ge=0,le=arguments.length;ge<le;ge++)xe+=arguments[ge].length;var ve=Array(xe),de=0;for(ge=0;ge<le;ge++)for(var ce=arguments[ge],z=0,ee=ce.length;z<ee;z++,de++)ve[de]=ce[z];return ve};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LogService=Ee.LogLevel=void 0;var Ce,Le=Me(1);(function(xe){xe[xe.DEBUG=0]="DEBUG",xe[xe.INFO=1]="INFO",xe[xe.WARN=2]="WARN",xe[xe.ERROR=3]="ERROR",xe[xe.OFF=4]="OFF"})(Ce=Ee.LogLevel||(Ee.LogLevel={}));var he={debug:Ce.DEBUG,info:Ce.INFO,warn:Ce.WARN,error:Ce.ERROR,off:Ce.OFF},ye=function(){function xe(ge){var le=this;this._optionsService=ge,this._updateLogLevel(),this._optionsService.onOptionChange(function(ve){ve==="logLevel"&&le._updateLogLevel()})}return xe.prototype._updateLogLevel=function(){this._logLevel=he[this._optionsService.options.logLevel]},xe.prototype._evalLazyOptionalParams=function(ge){for(var le=0;le<ge.length;le++)typeof ge[le]=="function"&&(ge[le]=ge[le]())},xe.prototype._log=function(ge,le,ve){this._evalLazyOptionalParams(ve),ge.call.apply(ge,ke([console,"xterm.js: "+le],ve))},xe.prototype.debug=function(ge){for(var le=[],ve=1;ve<arguments.length;ve++)le[ve-1]=arguments[ve];this._logLevel<=Ce.DEBUG&&this._log(console.log,ge,le)},xe.prototype.info=function(ge){for(var le=[],ve=1;ve<arguments.length;ve++)le[ve-1]=arguments[ve];this._logLevel<=Ce.INFO&&this._log(console.info,ge,le)},xe.prototype.warn=function(ge){for(var le=[],ve=1;ve<arguments.length;ve++)le[ve-1]=arguments[ve];this._logLevel<=Ce.WARN&&this._log(console.warn,ge,le)},xe.prototype.error=function(ge){for(var le=[],ve=1;ve<arguments.length;ve++)le[ve-1]=arguments[ve];this._logLevel<=Ce.ERROR&&this._log(console.error,ge,le)},xe=me([Be(0,Le.IOptionsService)],xe)}();Ee.LogService=ye},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(le,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ce){de.__proto__=ce}||function(de,ce){for(var z in ce)ce.hasOwnProperty(z)&&(de[z]=ce[z])})(le,ve)},function(le,ve){function de(){this.constructor=le}me(le,ve),le.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),ke=this&&this.__decorate||function(le,ve,de,ce){var z,ee=arguments.length,oe=ee<3?ve:ce===null?ce=Object.getOwnPropertyDescriptor(ve,de):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(le,ve,de,ce);else for(var ie=le.length-1;ie>=0;ie--)(z=le[ie])&&(oe=(ee<3?z(oe):ee>3?z(ve,de,oe):z(ve,de))||oe);return ee>3&&oe&&Object.defineProperty(ve,de,oe),oe},Ce=this&&this.__param||function(le,ve){return function(de,ce){ve(de,ce,le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferService=Ee.MINIMUM_ROWS=Ee.MINIMUM_COLS=void 0;var Le=Me(1),he=Me(69),ye=Me(0),xe=Me(2);Ee.MINIMUM_COLS=2,Ee.MINIMUM_ROWS=1;var ge=function(le){function ve(de){var ce=le.call(this)||this;return ce._optionsService=de,ce.isUserScrolling=!1,ce._onResize=new ye.EventEmitter,ce.cols=Math.max(de.options.cols,Ee.MINIMUM_COLS),ce.rows=Math.max(de.options.rows,Ee.MINIMUM_ROWS),ce.buffers=new he.BufferSet(de,ce),ce}return Be(ve,le),Object.defineProperty(ve.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),ve.prototype.dispose=function(){le.prototype.dispose.call(this),this.buffers.dispose()},ve.prototype.resize=function(de,ce){this.cols=de,this.rows=ce,this.buffers.resize(de,ce),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:de,rows:ce})},ve.prototype.reset=function(){this.buffers.dispose(),this.buffers=new he.BufferSet(this._optionsService,this),this.isUserScrolling=!1},ve=ke([Ce(0,Le.IOptionsService)],ve)}(xe.Disposable);Ee.BufferService=ge},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(he,ye){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(xe,ge){xe.__proto__=ge}||function(xe,ge){for(var le in ge)ge.hasOwnProperty(le)&&(xe[le]=ge[le])})(he,ye)},function(he,ye){function xe(){this.constructor=he}me(he,ye),he.prototype=ye===null?Object.create(ye):(xe.prototype=ye.prototype,new xe)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferSet=void 0;var ke=Me(70),Ce=Me(0),Le=function(he){function ye(xe,ge){var le=he.call(this)||this;return le._onBufferActivate=le.register(new Ce.EventEmitter),le._normal=new ke.Buffer(!0,xe,ge),le._normal.fillViewportRows(),le._alt=new ke.Buffer(!1,xe,ge),le._activeBuffer=le._normal,le.setupTabStops(),le}return Be(ye,he),Object.defineProperty(ye.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),ye.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}))},ye.prototype.activateAltBuffer=function(xe){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(xe),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}))},ye.prototype.resize=function(xe,ge){this._normal.resize(xe,ge),this._alt.resize(xe,ge)},ye.prototype.setupTabStops=function(xe){this._normal.setupTabStops(xe),this._alt.setupTabStops(xe)},ye}(Me(2).Disposable);Ee.BufferSet=Le},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferStringIterator=Ee.Buffer=Ee.MAX_BUFFER_SIZE=void 0;var me=Me(71),Be=Me(16),ke=Me(4),Ce=Me(3),Le=Me(72),he=Me(73),ye=Me(20),xe=Me(6);Ee.MAX_BUFFER_SIZE=4294967295;var ge=function(){function ve(de,ce,z){this._hasScrollback=de,this._optionsService=ce,this._bufferService=z,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=Be.DEFAULT_ATTR_DATA.clone(),this.savedCharset=ye.DEFAULT_CHARSET,this.markers=[],this._nullCell=ke.CellData.fromCharData([0,Ce.NULL_CELL_CHAR,Ce.NULL_CELL_WIDTH,Ce.NULL_CELL_CODE]),this._whitespaceCell=ke.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 me.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return ve.prototype.getNullCell=function(de){return de?(this._nullCell.fg=de.fg,this._nullCell.bg=de.bg,this._nullCell.extended=de.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new xe.ExtendedAttrs),this._nullCell},ve.prototype.getWhitespaceCell=function(de){return de?(this._whitespaceCell.fg=de.fg,this._whitespaceCell.bg=de.bg,this._whitespaceCell.extended=de.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new xe.ExtendedAttrs),this._whitespaceCell},ve.prototype.getBlankLine=function(de,ce){return new Be.BufferLine(this._bufferService.cols,this.getNullCell(de),ce)},Object.defineProperty(ve.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"isCursorInViewport",{get:function(){var de=this.ybase+this.y-this.ydisp;return de>=0&&de<this._rows},enumerable:!1,configurable:!0}),ve.prototype._getCorrectBufferLength=function(de){if(!this._hasScrollback)return de;var ce=de+this._optionsService.options.scrollback;return ce>Ee.MAX_BUFFER_SIZE?Ee.MAX_BUFFER_SIZE:ce},ve.prototype.fillViewportRows=function(de){if(this.lines.length===0){de===void 0&&(de=Be.DEFAULT_ATTR_DATA);for(var ce=this._rows;ce--;)this.lines.push(this.getBlankLine(de))}},ve.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new me.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},ve.prototype.resize=function(de,ce){var z=this.getNullCell(Be.DEFAULT_ATTR_DATA),ee=this._getCorrectBufferLength(ce);if(ee>this.lines.maxLength&&(this.lines.maxLength=ee),this.lines.length>0){if(this._cols<de)for(var oe=0;oe<this.lines.length;oe++)this.lines.get(oe).resize(de,z);var ie=0;if(this._rows<ce)for(var se=this._rows;se<ce;se++)this.lines.length<ce+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Be.BufferLine(de,z)):this.ybase>0&&this.lines.length<=this.ybase+this.y+ie+1?(this.ybase--,ie++,this.ydisp>0&&this.ydisp--):this.lines.push(new Be.BufferLine(de,z)));else for(se=this._rows;se>ce;se--)this.lines.length>ce+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(ee<this.lines.maxLength){var ue=this.lines.length-ee;ue>0&&(this.lines.trimStart(ue),this.ybase=Math.max(this.ybase-ue,0),this.ydisp=Math.max(this.ydisp-ue,0),this.savedY=Math.max(this.savedY-ue,0)),this.lines.maxLength=ee}this.x=Math.min(this.x,de-1),this.y=Math.min(this.y,ce-1),ie&&(this.y+=ie),this.savedX=Math.min(this.savedX,de-1),this.scrollTop=0}if(this.scrollBottom=ce-1,this._isReflowEnabled&&(this._reflow(de,ce),this._cols>de))for(oe=0;oe<this.lines.length;oe++)this.lines.get(oe).resize(de,z);this._cols=de,this._rows=ce},Object.defineProperty(ve.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),ve.prototype._reflow=function(de,ce){this._cols!==de&&(de>this._cols?this._reflowLarger(de,ce):this._reflowSmaller(de,ce))},ve.prototype._reflowLarger=function(de,ce){var z=Le.reflowLargerGetLinesToRemove(this.lines,this._cols,de,this.ybase+this.y,this.getNullCell(Be.DEFAULT_ATTR_DATA));if(z.length>0){var ee=Le.reflowLargerCreateNewLayout(this.lines,z);Le.reflowLargerApplyNewLayout(this.lines,ee.layout),this._reflowLargerAdjustViewport(de,ce,ee.countRemoved)}},ve.prototype._reflowLargerAdjustViewport=function(de,ce,z){for(var ee=this.getNullCell(Be.DEFAULT_ATTR_DATA),oe=z;oe-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<ce&&this.lines.push(new Be.BufferLine(de,ee))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-z,0)},ve.prototype._reflowSmaller=function(de,ce){for(var z=this.getNullCell(Be.DEFAULT_ATTR_DATA),ee=[],oe=0,ie=this.lines.length-1;ie>=0;ie--){var se=this.lines.get(ie);if(!(!se||!se.isWrapped&&se.getTrimmedLength()<=de)){for(var ue=[se];se.isWrapped&&ie>0;)se=this.lines.get(--ie),ue.unshift(se);var Se=this.ybase+this.y;if(!(Se>=ie&&Se<ie+ue.length)){var we=ue[ue.length-1].getTrimmedLength(),Pe=Le.reflowSmallerGetNewLineLengths(ue,this._cols,de),Ae=Pe.length-ue.length,De=void 0;De=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+Ae):Math.max(0,this.lines.length-this.lines.maxLength+Ae);for(var ze=[],Ze=0;Ze<Ae;Ze++){var Xe=this.getBlankLine(Be.DEFAULT_ATTR_DATA,!0);ze.push(Xe)}ze.length>0&&(ee.push({start:ie+ue.length+oe,newLines:ze}),oe+=ze.length),ue.push.apply(ue,ze);var Ge=Pe.length-1,ft=Pe[Ge];ft===0&&(ft=Pe[--Ge]);for(var at=ue.length-Ae-1,Ct=we;at>=0;){var et=Math.min(Ct,ft);if(ue[Ge].copyCellsFrom(ue[at],Ct-et,ft-et,et,!0),(ft-=et)===0&&(ft=Pe[--Ge]),(Ct-=et)===0){at--;var yt=Math.max(at,0);Ct=Le.getWrappedLineTrimmedLength(ue,yt,this._cols)}}for(Ze=0;Ze<ue.length;Ze++)Pe[Ze]<de&&ue[Ze].setCell(Pe[Ze],z);for(var st=Ae-De;st-- >0;)this.ybase===0?this.y<ce-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+oe)-ce&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+Ae,this.ybase+ce-1)}}}if(ee.length>0){var zt=[],lt=[];for(Ze=0;Ze<this.lines.length;Ze++)lt.push(this.lines.get(Ze));var tt=this.lines.length,ut=tt-1,mt=0,Pt=ee[mt];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+oe);var gt=0;for(Ze=Math.min(this.lines.maxLength-1,tt+oe-1);Ze>=0;Ze--)if(Pt&&Pt.start>ut+gt){for(var Ft=Pt.newLines.length-1;Ft>=0;Ft--)this.lines.set(Ze--,Pt.newLines[Ft]);Ze++,zt.push({index:ut+1,amount:Pt.newLines.length}),gt+=Pt.newLines.length,Pt=ee[++mt]}else this.lines.set(Ze,lt[ut--]);var Ht=0;for(Ze=zt.length-1;Ze>=0;Ze--)zt[Ze].index+=Ht,this.lines.onInsertEmitter.fire(zt[Ze]),Ht+=zt[Ze].amount;var hn=Math.max(0,tt+oe-this.lines.maxLength);hn>0&&this.lines.onTrimEmitter.fire(hn)}},ve.prototype.stringIndexToBufferIndex=function(de,ce,z){for(z===void 0&&(z=!1);ce;){var ee=this.lines.get(de);if(!ee)return[-1,-1];for(var oe=z?ee.getTrimmedLength():ee.length,ie=0;ie<oe;++ie)if(ee.get(ie)[Ce.CHAR_DATA_WIDTH_INDEX]&&(ce-=ee.get(ie)[Ce.CHAR_DATA_CHAR_INDEX].length||1),ce<0)return[de,ie];de++}return[de,0]},ve.prototype.translateBufferLineToString=function(de,ce,z,ee){z===void 0&&(z=0);var oe=this.lines.get(de);return oe?oe.translateToString(ce,z,ee):""},ve.prototype.getWrappedRangeForLine=function(de){for(var ce=de,z=de;ce>0&&this.lines.get(ce).isWrapped;)ce--;for(;z+1<this.lines.length&&this.lines.get(z+1).isWrapped;)z++;return{first:ce,last:z}},ve.prototype.setupTabStops=function(de){for(de!=null?this.tabs[de]||(de=this.prevStop(de)):(this.tabs={},de=0);de<this._cols;de+=this._optionsService.options.tabStopWidth)this.tabs[de]=!0},ve.prototype.prevStop=function(de){for(de==null&&(de=this.x);!this.tabs[--de]&&de>0;);return de>=this._cols?this._cols-1:de<0?0:de},ve.prototype.nextStop=function(de){for(de==null&&(de=this.x);!this.tabs[++de]&&de<this._cols;);return de>=this._cols?this._cols-1:de<0?0:de},ve.prototype.addMarker=function(de){var ce=this,z=new he.Marker(de);return this.markers.push(z),z.register(this.lines.onTrim(function(ee){z.line-=ee,z.line<0&&z.dispose()})),z.register(this.lines.onInsert(function(ee){z.line>=ee.index&&(z.line+=ee.amount)})),z.register(this.lines.onDelete(function(ee){z.line>=ee.index&&z.line<ee.index+ee.amount&&z.dispose(),z.line>ee.index&&(z.line-=ee.amount)})),z.register(z.onDispose(function(){return ce._removeMarker(z)})),z},ve.prototype._removeMarker=function(de){this.markers.splice(this.markers.indexOf(de),1)},ve.prototype.iterator=function(de,ce,z,ee,oe){return new le(this,de,ce,z,ee,oe)},ve}();Ee.Buffer=ge;var le=function(){function ve(de,ce,z,ee,oe,ie){z===void 0&&(z=0),ee===void 0&&(ee=de.lines.length),oe===void 0&&(oe=0),ie===void 0&&(ie=0),this._buffer=de,this._trimRight=ce,this._startIndex=z,this._endIndex=ee,this._startOverscan=oe,this._endOverscan=ie,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return ve.prototype.hasNext=function(){return this._current<this._endIndex},ve.prototype.next=function(){var de=this._buffer.getWrappedRangeForLine(this._current);de.first<this._startIndex-this._startOverscan&&(de.first=this._startIndex-this._startOverscan),de.last>this._endIndex+this._endOverscan&&(de.last=this._endIndex+this._endOverscan),de.first=Math.max(de.first,0),de.last=Math.min(de.last,this._buffer.lines.length);for(var ce="",z=de.first;z<=de.last;++z)ce+=this._buffer.translateBufferLineToString(z,this._trimRight);return this._current=de.last+1,{range:de,content:ce}},ve}();Ee.BufferStringIterator=le},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CircularList=void 0;var me=Me(0),Be=function(){function ke(Ce){this._maxLength=Ce,this.onDeleteEmitter=new me.EventEmitter,this.onInsertEmitter=new me.EventEmitter,this.onTrimEmitter=new me.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(ke.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"maxLength",{get:function(){return this._maxLength},set:function(Ce){if(this._maxLength!==Ce){for(var Le=new Array(Ce),he=0;he<Math.min(Ce,this.length);he++)Le[he]=this._array[this._getCyclicIndex(he)];this._array=Le,this._maxLength=Ce,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"length",{get:function(){return this._length},set:function(Ce){if(Ce>this._length)for(var Le=this._length;Le<Ce;Le++)this._array[Le]=void 0;this._length=Ce},enumerable:!1,configurable:!0}),ke.prototype.get=function(Ce){return this._array[this._getCyclicIndex(Ce)]},ke.prototype.set=function(Ce,Le){this._array[this._getCyclicIndex(Ce)]=Le},ke.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++},ke.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(ke.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),ke.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},ke.prototype.splice=function(Ce,Le){for(var he=[],ye=2;ye<arguments.length;ye++)he[ye-2]=arguments[ye];if(Le){for(var xe=Ce;xe<this._length-Le;xe++)this._array[this._getCyclicIndex(xe)]=this._array[this._getCyclicIndex(xe+Le)];this._length-=Le}for(xe=this._length-1;xe>=Ce;xe--)this._array[this._getCyclicIndex(xe+he.length)]=this._array[this._getCyclicIndex(xe)];for(xe=0;xe<he.length;xe++)this._array[this._getCyclicIndex(Ce+xe)]=he[xe];if(this._length+he.length>this._maxLength){var ge=this._length+he.length-this._maxLength;this._startIndex+=ge,this._length=this._maxLength,this.onTrimEmitter.fire(ge)}else this._length+=he.length},ke.prototype.trimStart=function(Ce){Ce>this._length&&(Ce=this._length),this._startIndex+=Ce,this._length-=Ce,this.onTrimEmitter.fire(Ce)},ke.prototype.shiftElements=function(Ce,Le,he){if(!(Le<=0)){if(Ce<0||Ce>=this._length)throw new Error("start argument out of range");if(Ce+he<0)throw new Error("Cannot shift elements in list beyond index 0");if(he>0){for(var ye=Le-1;ye>=0;ye--)this.set(Ce+ye+he,this.get(Ce+ye));var xe=Ce+Le+he-this._length;if(xe>0)for(this._length+=xe;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(ye=0;ye<Le;ye++)this.set(Ce+ye+he,this.get(Ce+ye))}},ke.prototype._getCyclicIndex=function(Ce){return(this._startIndex+Ce)%this._maxLength},ke}();Ee.CircularList=Be},function(en,Ee,Me){"use strict";function me(Be,ke,Ce){if(ke===Be.length-1)return Be[ke].getTrimmedLength();var Le=!Be[ke].hasContent(Ce-1)&&Be[ke].getWidth(Ce-1)===1,he=Be[ke+1].getWidth(0)===2;return Le&&he?Ce-1:Ce}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getWrappedLineTrimmedLength=Ee.reflowSmallerGetNewLineLengths=Ee.reflowLargerApplyNewLayout=Ee.reflowLargerCreateNewLayout=Ee.reflowLargerGetLinesToRemove=void 0,Ee.reflowLargerGetLinesToRemove=function(Be,ke,Ce,Le,he){for(var ye=[],xe=0;xe<Be.length-1;xe++){var ge=xe,le=Be.get(++ge);if(le.isWrapped){for(var ve=[Be.get(xe)];ge<Be.length&&le.isWrapped;)ve.push(le),le=Be.get(++ge);if(Le>=xe&&Le<ge)xe+=ve.length-1;else{for(var de=0,ce=me(ve,de,ke),z=1,ee=0;z<ve.length;){var oe=me(ve,z,ke),ie=oe-ee,se=Ce-ce,ue=Math.min(ie,se);ve[de].copyCellsFrom(ve[z],ee,ce,ue,!1),(ce+=ue)===Ce&&(de++,ce=0),(ee+=ue)===oe&&(z++,ee=0),ce===0&&de!==0&&ve[de-1].getWidth(Ce-1)===2&&(ve[de].copyCellsFrom(ve[de-1],Ce-1,ce++,1,!1),ve[de-1].setCell(Ce-1,he))}ve[de].replaceCells(ce,Ce,he);for(var Se=0,we=ve.length-1;we>0&&(we>de||ve[we].getTrimmedLength()===0);we--)Se++;Se>0&&(ye.push(xe+ve.length-Se),ye.push(Se)),xe+=ve.length-1}}}return ye},Ee.reflowLargerCreateNewLayout=function(Be,ke){for(var Ce=[],Le=0,he=ke[Le],ye=0,xe=0;xe<Be.length;xe++)if(he===xe){var ge=ke[++Le];Be.onDeleteEmitter.fire({index:xe-ye,amount:ge}),xe+=ge-1,ye+=ge,he=ke[++Le]}else Ce.push(xe);return{layout:Ce,countRemoved:ye}},Ee.reflowLargerApplyNewLayout=function(Be,ke){for(var Ce=[],Le=0;Le<ke.length;Le++)Ce.push(Be.get(ke[Le]));for(Le=0;Le<Ce.length;Le++)Be.set(Le,Ce[Le]);Be.length=ke.length},Ee.reflowSmallerGetNewLineLengths=function(Be,ke,Ce){for(var Le=[],he=Be.map(function(ce,z){return me(Be,z,ke)}).reduce(function(ce,z){return ce+z}),ye=0,xe=0,ge=0;ge<he;){if(he-ge<Ce){Le.push(he-ge);break}ye+=Ce;var le=me(Be,xe,ke);ye>le&&(ye-=le,xe++);var ve=Be[xe].getWidth(ye-1)===2;ve&&ye--;var de=ve?Ce-1:Ce;Le.push(de),ge+=de}return Le},Ee.getWrappedLineTrimmedLength=me},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(Le,he){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,xe){ye.__proto__=xe}||function(ye,xe){for(var ge in xe)xe.hasOwnProperty(ge)&&(ye[ge]=xe[ge])})(Le,he)},function(Le,he){function ye(){this.constructor=Le}me(Le,he),Le.prototype=he===null?Object.create(he):(ye.prototype=he.prototype,new ye)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Marker=void 0;var ke=Me(0),Ce=function(Le){function he(ye){var xe=Le.call(this)||this;return xe.line=ye,xe._id=he._nextId++,xe.isDisposed=!1,xe._onDispose=new ke.EventEmitter,xe}return Be(he,Le),Object.defineProperty(he.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(he.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),he.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},he._nextId=1,he}(Me(2).Disposable);Ee.Marker=Ce},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.OptionsService=Ee.DEFAULT_OPTIONS=Ee.DEFAULT_BELL_SOUND=void 0;var me=Me(0),Be=Me(11),ke=Me(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:Be.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var Ce=["cols","rows"],Le=function(){function he(ye){this._onOptionChange=new me.EventEmitter,this.options=ke.clone(Ee.DEFAULT_OPTIONS);for(var xe=0,ge=Object.keys(ye);xe<ge.length;xe++){var le=ge[xe];if(le in this.options){var ve=ye[le];this.options[le]=ve}}}return Object.defineProperty(he.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),he.prototype.setOption=function(ye,xe){if(!(ye in Ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+ye+'"');if(Ce.indexOf(ye)!==-1)throw new Error('Option "'+ye+'" can only be set in the constructor');this.options[ye]!==xe&&(xe=this._sanitizeAndValidateOption(ye,xe),this.options[ye]!==xe&&(this.options[ye]=xe,this._onOptionChange.fire(ye)))},he.prototype._sanitizeAndValidateOption=function(ye,xe){switch(ye){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":xe||(xe=Ee.DEFAULT_OPTIONS[ye]);break;case"cursorWidth":xe=Math.floor(xe);case"lineHeight":case"tabStopWidth":if(xe<1)throw new Error(ye+" cannot be less than 1, value: "+xe);break;case"minimumContrastRatio":xe=Math.max(1,Math.min(21,Math.round(10*xe)/10));break;case"scrollback":if((xe=Math.min(xe,4294967295))<0)throw new Error(ye+" cannot be less than 0, value: "+xe);break;case"fastScrollSensitivity":case"scrollSensitivity":if(xe<=0)throw new Error(ye+" cannot be less than or equal to 0, value: "+xe)}return xe},he.prototype.getOption=function(ye){if(!(ye in Ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+ye+'"');return this.options[ye]},he}();Ee.OptionsService=Le},function(en,Ee,Me){"use strict";var me,Be=this&&this.__extends||(me=function(de,ce){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,ee){z.__proto__=ee}||function(z,ee){for(var oe in ee)ee.hasOwnProperty(oe)&&(z[oe]=ee[oe])})(de,ce)},function(de,ce){function z(){this.constructor=de}me(de,ce),de.prototype=ce===null?Object.create(ce):(z.prototype=ce.prototype,new z)}),ke=this&&this.__decorate||function(de,ce,z,ee){var oe,ie=arguments.length,se=ie<3?ce:ee===null?ee=Object.getOwnPropertyDescriptor(ce,z):ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(de,ce,z,ee);else for(var ue=de.length-1;ue>=0;ue--)(oe=de[ue])&&(se=(ie<3?oe(se):ie>3?oe(ce,z,se):oe(ce,z))||se);return ie>3&&se&&Object.defineProperty(ce,z,se),se},Ce=this&&this.__param||function(de,ce){return function(z,ee){ce(z,ee,de)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreService=void 0;var Le=Me(1),he=Me(0),ye=Me(33),xe=Me(2),ge=Object.freeze({insertMode:!1}),le=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),ve=function(de){function ce(z,ee,oe,ie){var se=de.call(this)||this;return se._bufferService=ee,se._logService=oe,se._optionsService=ie,se.isCursorInitialized=!1,se.isCursorHidden=!1,se._onData=se.register(new he.EventEmitter),se._onUserInput=se.register(new he.EventEmitter),se._onBinary=se.register(new he.EventEmitter),se._scrollToBottom=z,se.register({dispose:function(){return se._scrollToBottom=void 0}}),se.modes=ye.clone(ge),se.decPrivateModes=ye.clone(le),se}return Be(ce,de),Object.defineProperty(ce.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),ce.prototype.reset=function(){this.modes=ye.clone(ge),this.decPrivateModes=ye.clone(le)},ce.prototype.triggerDataEvent=function(z,ee){if(ee===void 0&&(ee=!1),!this._optionsService.options.disableStdin){var oe=this._bufferService.buffer;oe.ybase!==oe.ydisp&&this._scrollToBottom(),ee&&this._onUserInput.fire(),this._logService.debug('sending data "'+z+'"',function(){return z.split("").map(function(ie){return ie.charCodeAt(0)})}),this._onData.fire(z)}},ce.prototype.triggerBinaryEvent=function(z){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+z+'"',function(){return z.split("").map(function(ee){return ee.charCodeAt(0)})}),this._onBinary.fire(z))},ce=ke([Ce(1,Le.IBufferService),Ce(2,Le.ILogService),Ce(3,Le.IOptionsService)],ce)}(xe.Disposable);Ee.CoreService=ve},function(en,Ee,Me){"use strict";var me=this&&this.__decorate||function(le,ve,de,ce){var z,ee=arguments.length,oe=ee<3?ve:ce===null?ce=Object.getOwnPropertyDescriptor(ve,de):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(le,ve,de,ce);else for(var ie=le.length-1;ie>=0;ie--)(z=le[ie])&&(oe=(ee<3?z(oe):ee>3?z(ve,de,oe):z(ve,de))||oe);return ee>3&&oe&&Object.defineProperty(ve,de,oe),oe},Be=this&&this.__param||function(le,ve){return function(de,ce){ve(de,ce,le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreMouseService=void 0;var ke=Me(1),Ce=Me(0),Le={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(le){return le.button!==4&&le.action===1&&(le.ctrl=!1,le.alt=!1,le.shift=!1,!0)}},VT200:{events:19,restrict:function(le){return le.action!==32}},DRAG:{events:23,restrict:function(le){return le.action!==32||le.button!==3}},ANY:{events:31,restrict:function(le){return!0}}};function he(le,ve){var de=(le.ctrl?16:0)|(le.shift?4:0)|(le.alt?8:0);return le.button===4?(de|=64,de|=le.action):(de|=3&le.button,4&le.button&&(de|=64),8&le.button&&(de|=128),le.action===32?de|=32:le.action!==0||ve||(de|=3)),de}var ye=String.fromCharCode,xe={DEFAULT:function(le){var ve=[he(le,!1)+32,le.col+32,le.row+32];return ve[0]>255||ve[1]>255||ve[2]>255?"":"\x1B[M"+ye(ve[0])+ye(ve[1])+ye(ve[2])},SGR:function(le){var ve=le.action===0&&le.button!==4?"m":"M";return"\x1B[<"+he(le,!0)+";"+le.col+";"+le.row+ve}},ge=function(){function le(ve,de){this._bufferService=ve,this._coreService=de,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new Ce.EventEmitter,this._lastEvent=null;for(var ce=0,z=Object.keys(Le);ce<z.length;ce++){var ee=z[ce];this.addProtocol(ee,Le[ee])}for(var oe=0,ie=Object.keys(xe);oe<ie.length;oe++){var se=ie[oe];this.addEncoding(se,xe[se])}this.reset()}return le.prototype.addProtocol=function(ve,de){this._protocols[ve]=de},le.prototype.addEncoding=function(ve,de){this._encodings[ve]=de},Object.defineProperty(le.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(ve){if(!this._protocols[ve])throw new Error('unknown protocol "'+ve+'"');this._activeProtocol=ve,this._onProtocolChange.fire(this._protocols[ve].events)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(ve){if(!this._encodings[ve])throw new Error('unknown encoding "'+ve+'"');this._activeEncoding=ve},enumerable:!1,configurable:!0}),le.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(le.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),le.prototype.triggerMouseEvent=function(ve){if(ve.col<0||ve.col>=this._bufferService.cols||ve.row<0||ve.row>=this._bufferService.rows||ve.button===4&&ve.action===32||ve.button===3&&ve.action!==32||ve.button!==4&&(ve.action===2||ve.action===3)||(ve.col++,ve.row++,ve.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,ve))||!this._protocols[this._activeProtocol].restrict(ve))return!1;var de=this._encodings[this._activeEncoding](ve);return de&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(de):this._coreService.triggerDataEvent(de,!0)),this._lastEvent=ve,!0},le.prototype.explainEvents=function(ve){return{down:!!(1&ve),up:!!(2&ve),drag:!!(4&ve),move:!!(8&ve),wheel:!!(16&ve)}},le.prototype._compareEvents=function(ve,de){return ve.col===de.col&&ve.row===de.row&&ve.button===de.button&&ve.action===de.action&&ve.ctrl===de.ctrl&&ve.alt===de.alt&&ve.shift===de.shift},le=me([Be(0,ke.IBufferService),Be(1,ke.ICoreService)],le)}();Ee.CoreMouseService=ge},function(en,Ee,Me){"use strict";var me=this&&this.__decorate||function(Le,he,ye,xe){var ge,le=arguments.length,ve=le<3?he:xe===null?xe=Object.getOwnPropertyDescriptor(he,ye):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(Le,he,ye,xe);else for(var de=Le.length-1;de>=0;de--)(ge=Le[de])&&(ve=(le<3?ge(ve):le>3?ge(he,ye,ve):ge(he,ye))||ve);return le>3&&ve&&Object.defineProperty(he,ye,ve),ve},Be=this&&this.__param||function(Le,he){return function(ye,xe){he(ye,xe,Le)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DirtyRowService=void 0;var ke=Me(1),Ce=function(){function Le(he){this._bufferService=he,this.clearRange()}return Object.defineProperty(Le.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(Le.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),Le.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},Le.prototype.markDirty=function(he){he<this._start?this._start=he:he>this._end&&(this._end=he)},Le.prototype.markRangeDirty=function(he,ye){if(he>ye){var xe=he;he=ye,ye=xe}he<this._start&&(this._start=he),ye>this._end&&(this._end=ye)},Le.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},Le=me([Be(0,ke.IBufferService)],Le)}();Ee.DirtyRowService=Ce},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.UnicodeService=void 0;var me=Me(0),Be=Me(79),ke=function(){function Ce(){this._providers=Object.create(null),this._active="",this._onChange=new me.EventEmitter;var Le=new Be.UnicodeV6;this.register(Le),this._active=Le.version,this._activeProvider=Le}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(Le){if(!this._providers[Le])throw new Error('unknown Unicode version "'+Le+'"');this._active=Le,this._activeProvider=this._providers[Le],this._onChange.fire(Le)},enumerable:!1,configurable:!0}),Ce.prototype.register=function(Le){this._providers[Le.version]=Le},Ce.prototype.wcwidth=function(Le){return this._activeProvider.wcwidth(Le)},Ce.prototype.getStringCellWidth=function(Le){for(var he=0,ye=Le.length,xe=0;xe<ye;++xe){var ge=Le.charCodeAt(xe);if(55296<=ge&&ge<=56319){if(++xe>=ye)return he+this.wcwidth(ge);var le=Le.charCodeAt(xe);56320<=le&&le<=57343?ge=1024*(ge-55296)+le-56320+65536:he+=this.wcwidth(le)}he+=this.wcwidth(ge)}return he},Ce}();Ee.UnicodeService=ke},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.UnicodeV6=void 0;var me,Be=Me(15),ke=[[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]],Le=function(){function he(){if(this.version="6",!me){me=new Uint8Array(65536),Be.fill(me,1),me[0]=0,Be.fill(me,0,1,32),Be.fill(me,0,127,160),Be.fill(me,2,4352,4448),me[9001]=2,me[9002]=2,Be.fill(me,2,11904,42192),me[12351]=1,Be.fill(me,2,44032,55204),Be.fill(me,2,63744,64256),Be.fill(me,2,65040,65050),Be.fill(me,2,65072,65136),Be.fill(me,2,65280,65377),Be.fill(me,2,65504,65511);for(var ye=0;ye<ke.length;++ye)Be.fill(me,0,ke[ye][0],ke[ye][1]+1)}}return he.prototype.wcwidth=function(ye){return ye<32?0:ye<127?1:ye<65536?me[ye]:function(xe,ge){var le,ve=0,de=ge.length-1;if(xe<ge[0][0]||xe>ge[de][1])return!1;for(;de>=ve;)if(xe>ge[le=ve+de>>1][1])ve=le+1;else{if(!(xe<ge[le][0]))return!0;de=le-1}return!1}(ye,Ce)?0:ye>=131072&&ye<=196605||ye>=196608&&ye<=262141?2:1},he}();Ee.UnicodeV6=Le},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharsetService=void 0;var me=function(){function Be(){this.glevel=0,this._charsets=[]}return Be.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Be.prototype.setgLevel=function(ke){this.glevel=ke,this.charset=this._charsets[ke]},Be.prototype.setgCharset=function(ke,Ce){this._charsets[ke]=Ce,this.glevel===ke&&(this.charset=Ce)},Be}();Ee.CharsetService=me},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.updateWindowsModeWrappedState=void 0;var me=Me(3);Ee.updateWindowsModeWrappedState=function(Be){var ke=Be.buffer.lines.get(Be.buffer.ybase+Be.buffer.y-1),Ce=ke==null?void 0:ke.get(Be.cols-1),Le=Be.buffer.lines.get(Be.buffer.ybase+Be.buffer.y);Le&&Ce&&(Le.isWrapped=Ce[me.CHAR_DATA_CODE_INDEX]!==me.NULL_CELL_CODE&&Ce[me.CHAR_DATA_CODE_INDEX]!==me.WHITESPACE_CELL_CODE)}},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.WriteBuffer=void 0;var me=function(){function Be(ke){this._action=ke,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Be.prototype.writeSync=function(ke){if(this._writeBuffer.length){for(var Ce=this._bufferOffset;Ce<this._writeBuffer.length;++Ce){var Le=this._writeBuffer[Ce],he=this._callbacks[Ce];this._action(Le),he&&he()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(ke)},Be.prototype.write=function(ke,Ce){var Le=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 Le._innerWrite()})),this._pendingData+=ke.length,this._writeBuffer.push(ke),this._callbacks.push(Ce)},Be.prototype._innerWrite=function(){for(var ke=this,Ce=Date.now();this._writeBuffer.length>this._bufferOffset;){var Le=this._writeBuffer[this._bufferOffset],he=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(Le),this._pendingData-=Le.length,he&&he(),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 ke._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},Be}();Ee.WriteBuffer=me},function(en,Ee,Me){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.AddonManager=void 0;var me=function(){function Be(){this._addons=[]}return Be.prototype.dispose=function(){for(var ke=this._addons.length-1;ke>=0;ke--)this._addons[ke].instance.dispose()},Be.prototype.loadAddon=function(ke,Ce){var Le=this,he={instance:Ce,dispose:Ce.dispose,isDisposed:!1};this._addons.push(he),Ce.dispose=function(){return Le._wrappedAddonDispose(he)},Ce.activate(ke)},Be.prototype._wrappedAddonDispose=function(ke){if(!ke.isDisposed){for(var Ce=-1,Le=0;Le<this._addons.length;Le++)if(this._addons[Le]===ke){Ce=Le;break}if(Ce===-1)throw new Error("Could not dispose an addon that has not been loaded");ke.isDisposed=!0,ke.dispose.apply(ke.instance),this._addons.splice(Ce,1)}},Be}();Ee.AddonManager=me}])})},93314:function(_n){"use strict";_n.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},62522:function(_n){"use strict";_n.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="},16722:function(_n,en,Ee){"use strict";Ee.d(en,{Z:function(){return ye}});const Me=xe=>typeof xe=="object"&&xe!=null&&xe.nodeType===1,me=(xe,ge)=>(!ge||xe!=="hidden")&&xe!=="visible"&&xe!=="clip",Be=(xe,ge)=>{if(xe.clientHeight<xe.scrollHeight||xe.clientWidth<xe.scrollWidth){const le=getComputedStyle(xe,null);return me(le.overflowY,ge)||me(le.overflowX,ge)||(ve=>{const de=(ce=>{if(!ce.ownerDocument||!ce.ownerDocument.defaultView)return null;try{return ce.ownerDocument.defaultView.frameElement}catch(z){return null}})(ve);return!!de&&(de.clientHeight<ve.scrollHeight||de.clientWidth<ve.scrollWidth)})(xe)}return!1},ke=(xe,ge,le,ve,de,ce,z,ee)=>ce<xe&&z>ge||ce>xe&&z<ge?0:ce<=xe&&ee<=le||z>=ge&&ee>=le?ce-xe-ve:z>ge&&ee<le||ce<xe&&ee>le?z-ge+de:0,Ce=xe=>{const ge=xe.parentElement;return ge==null?xe.getRootNode().host||null:ge},Le=(xe,ge)=>{var le,ve,de,ce;if(typeof document=="undefined")return[];const{scrollMode:z,block:ee,inline:oe,boundary:ie,skipOverflowHiddenElements:se}=ge,ue=typeof ie=="function"?ie:Pt=>Pt!==ie;if(!Me(xe))throw new TypeError("Invalid target");const Se=document.scrollingElement||document.documentElement,we=[];let Pe=xe;for(;Me(Pe)&&ue(Pe);){if(Pe=Ce(Pe),Pe===Se){we.push(Pe);break}Pe!=null&&Pe===document.body&&Be(Pe)&&!Be(document.documentElement)||Pe!=null&&Be(Pe,se)&&we.push(Pe)}const Ae=(ve=(le=window.visualViewport)==null?void 0:le.width)!=null?ve:innerWidth,De=(ce=(de=window.visualViewport)==null?void 0:de.height)!=null?ce:innerHeight,{scrollX:ze,scrollY:Ze}=window,{height:Xe,width:Ge,top:ft,right:at,bottom:Ct,left:et}=xe.getBoundingClientRect(),{top:yt,right:st,bottom:zt,left:lt}=(Pt=>{const gt=window.getComputedStyle(Pt);return{top:parseFloat(gt.scrollMarginTop)||0,right:parseFloat(gt.scrollMarginRight)||0,bottom:parseFloat(gt.scrollMarginBottom)||0,left:parseFloat(gt.scrollMarginLeft)||0}})(xe);let tt=ee==="start"||ee==="nearest"?ft-yt:ee==="end"?Ct+zt:ft+Xe/2-yt+zt,ut=oe==="center"?et+Ge/2-lt+st:oe==="end"?at+st:et-lt;const mt=[];for(let Pt=0;Pt<we.length;Pt++){const gt=we[Pt],{height:Ft,width:Ht,top:hn,right:Qt,bottom:bn,left:Wt}=gt.getBoundingClientRect();if(z==="if-needed"&&ft>=0&&et>=0&&Ct<=De&&at<=Ae&&(gt===Se&&!Be(gt)||ft>=hn&&Ct<=bn&&et>=Wt&&at<=Qt))return mt;const Kt=getComputedStyle(gt),Jt=parseInt(Kt.borderLeftWidth,10),Yt=parseInt(Kt.borderTopWidth,10),kt=parseInt(Kt.borderRightWidth,10),pt=parseInt(Kt.borderBottomWidth,10);let Bt=0,xt=0;const vt="offsetWidth"in gt?gt.offsetWidth-gt.clientWidth-Jt-kt:0,nt="offsetHeight"in gt?gt.offsetHeight-gt.clientHeight-Yt-pt:0,He="offsetWidth"in gt?gt.offsetWidth===0?0:Ht/gt.offsetWidth:0,Ie="offsetHeight"in gt?gt.offsetHeight===0?0:Ft/gt.offsetHeight:0;if(Se===gt)Bt=ee==="start"?tt:ee==="end"?tt-De:ee==="nearest"?ke(Ze,Ze+De,De,Yt,pt,Ze+tt,Ze+tt+Xe,Xe):tt-De/2,xt=oe==="start"?ut:oe==="center"?ut-Ae/2:oe==="end"?ut-Ae:ke(ze,ze+Ae,Ae,Jt,kt,ze+ut,ze+ut+Ge,Ge),Bt=Math.max(0,Bt+Ze),xt=Math.max(0,xt+ze);else{Bt=ee==="start"?tt-hn-Yt:ee==="end"?tt-bn+pt+nt:ee==="nearest"?ke(hn,bn,Ft,Yt,pt+nt,tt,tt+Xe,Xe):tt-(hn+Ft/2)+nt/2,xt=oe==="start"?ut-Wt-Jt:oe==="center"?ut-(Wt+Ht/2)+vt/2:oe==="end"?ut-Qt+kt+vt:ke(Wt,Qt,Ht,Jt,kt+vt,ut,ut+Ge,Ge);const{scrollLeft:We,scrollTop:Oe}=gt;Bt=Ie===0?0:Math.max(0,Math.min(Oe+Bt/Ie,gt.scrollHeight-Ft/Ie+nt)),xt=He===0?0:Math.max(0,Math.min(We+xt/He,gt.scrollWidth-Ht/He+vt)),tt+=Oe-Bt,ut+=We-xt}mt.push({el:gt,top:Bt,left:xt})}return mt},he=xe=>xe===!1?{block:"end",inline:"nearest"}:(ge=>ge===Object(ge)&&Object.keys(ge).length!==0)(xe)?xe:{block:"start",inline:"nearest"};function ye(xe,ge){if(!xe.isConnected||!(de=>{let ce=de;for(;ce&&ce.parentNode;){if(ce.parentNode===document)return!0;ce=ce.parentNode instanceof ShadowRoot?ce.parentNode.host:ce.parentNode}return!1})(xe))return;const le=(de=>{const ce=window.getComputedStyle(de);return{top:parseFloat(ce.scrollMarginTop)||0,right:parseFloat(ce.scrollMarginRight)||0,bottom:parseFloat(ce.scrollMarginBottom)||0,left:parseFloat(ce.scrollMarginLeft)||0}})(xe);if((de=>typeof de=="object"&&typeof de.behavior=="function")(ge))return ge.behavior(Le(xe,ge));const ve=typeof ge=="boolean"||ge==null?void 0:ge.behavior;for(const{el:de,top:ce,left:z}of Le(xe,he(ge))){const ee=ce-le.top+le.bottom,oe=z-le.left+le.right;de.scroll({top:ee,left:oe,behavior:ve})}}}}]);
|