|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7460],{89489:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},59477:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},40001:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},81953:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},49198:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},87169:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},73331:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},15277:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},52671:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},8657:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},10906:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},56082:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},33853:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},15075:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},43531:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},76618:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},61485:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},38819:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},47472:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(ge,ce){return me.createElement(Ce.Z,(0,Le.Z)({},ge,{ref:ce,icon:Te}))},he=me.forwardRef(_e),Se=he},78780:function(){"use strict"},19136:function(){"use strict"},11570:function(Pn,qt){"use strict";qt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},95910:function(Pn,qt){"use strict";qt.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"}},58323:function(){"use strict"},54318:function(Pn,qt,Ee){"use strict";var Le=Ee(59301),me=Object.defineProperty,Ie=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,_e=(xe,ge,ce)=>ge in xe?me(xe,ge,{enumerable:!0,configurable:!0,writable:!0,value:ce}):xe[ge]=ce,he=(xe,ge)=>{for(var ce in ge||(ge={}))Te.call(ge,ce)&&_e(xe,ce,ge[ce]);if(Ie)for(var ce of Ie(ge))Ce.call(ge,ce)&&_e(xe,ce,ge[ce]);return xe};const Se=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"})));qt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},71302:function(Pn,qt,Ee){"use strict";var Le=Ee(59301),me=Object.defineProperty,Ie=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,_e=(xe,ge,ce)=>ge in xe?me(xe,ge,{enumerable:!0,configurable:!0,writable:!0,value:ce}):xe[ge]=ce,he=(xe,ge)=>{for(var ce in ge||(ge={}))Te.call(ge,ce)&&_e(xe,ce,ge[ce]);if(Ie)for(var ce of Ie(ge))Ce.call(ge,ce)&&_e(xe,ce,ge[ce]);return xe};const Se=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"})));qt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},29277:function(){"use strict";function Pn(ue,z,ee,oe){ee===void 0&&(ee=0),oe===void 0&&(oe=1/0),this._name=ue,this._defaultValue=z,this._minimum=ee,this._maximum=oe}Object.defineProperty(Pn.prototype,"name",{get:function(){return this._name},set:function(ue){if(typeof ue!="string"||ue==="")throw new Error("Shape name must be a valid string.");this._name=ue}}),Object.defineProperty(Pn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("The default value must be a real number, not: "+ue);this._defaultValue=ue}}),Object.defineProperty(Pn.prototype,"minimum",{get:function(){return this._minimum},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("Minimum must be a real number, not: "+ue);this._minimum=ue}}),Object.defineProperty(Pn.prototype,"maximum",{get:function(){return this._maximum},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("Maximum must be a real number, not: "+ue);this._maximum=ue}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(ue,z){var ee=go.Shape._FigureParameters[ue];return ee?ee[z]:null},go.Shape.setFigureParameter=function(ue,z,ee){if(!(ee instanceof Pn))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[ue];oe||(oe=[],go.Shape._FigureParameters[ue]=oe),oe[z]=ee};var qt=[];function Ee(ue,z){var ee=qt.pop();return ee===void 0?new go.Point(ue,z):(ee.x=ue,ee.y=z,ee)}function Le(){var ue=qt.pop();return ue===void 0?new go.Point:ue}function me(ue){qt.push(ue)}function Ie(ue,z,ee,oe,ie,se,le,ye,we){we||(we=new go.Point);var be=ue-ee,ke=ie-le,Ne=NaN,je=NaN;if(be===0)if(ke===0)ue===ee&&(Ne=ue,je=z);else{var Ve=(se-ye)/ke,Je=se-Ve*ie;Ne=ue,je=Ve*Ne+Je}else if(ke===0){var We=(z-oe)/be,gt=z-We*ue;Ne=ie,je=We*Ne+gt}else{var We=(z-oe)/be,Ve=(se-ye)/ke,gt=z-We*ue,Je=se-Ve*ie;Ne=(Je-gt)/(We-Ve),je=We*Ne+gt}return we.x=Ne,we.y=je,we}function Te(ue,z,ee,oe,ie,se,le,ye,we,be,ke,Ne,je,Ve){var Je=1-we,We=we,gt=ue*Je+ee*We,ut=z*Je+oe*We,bt=ee*Je+ie*We,rt=oe*Je+se*We,St=ie*Je+le*We,ct=se*Je+ye*We,Bt=gt*Je+bt*We,ht=ut*Je+rt*We,it=bt*Je+St*We,dt=rt*Je+ct*We,yt=Bt*Je+it*We,Et=ht*Je+dt*We;be.x=gt,be.y=ut,ke.x=Bt,ke.y=ht,Ne.x=yt,Ne.y=Et,je.x=it,je.y=dt,Ve.x=St,Ve.y=ct}var Ce=new go.Spot(.156,.156),_e=new go.Spot(.844,.844),he=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Pn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(ue,z,ee){var oe=ue?ue.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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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=_e,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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 Pn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(ue,z,ee){var oe=ue?ue.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 Pn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(ue,z,ee){var oe=ue?ue.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 Pn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(ue,z,ee){var oe=ue?ue.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 Pn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(ue,z,ee){var oe=ue?ue.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 Pn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(ue,z,ee){var oe=ue?ue.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 Se=[];function xe(){var ue=Se.pop();return ue===void 0?[]:ue}function ge(ue){ue.length=0,Se.push(ue)}function ce(ue){for(var z=xe(),ee=.5,oe=.5,ie=Math.PI*1.5,se=0,le=0;le<ue;le++)se=2*Math.PI/ue*le+ie,z[le]=new go.Point(oe+ee*Math.cos(se),oe+ee*Math.sin(se));return z.push(z[0]),z}function ve(ue){var z=de(ue),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(ue){for(var z=ce(ue),ee=xe(),oe=Math.floor(z.length/2),ie=z.length-1,se=ue%2===0?2:1,le=0;le<ie;le++){var ye=z[le],we=z[le+1],be=z[(oe+le-1)%ie],ke=z[(oe+le+se)%ie];ee[le*2]=ye,ee[le*2+1]=Ie(ye.x,ye.y,be.x,be.y,we.x,we.y,ke.x,ke.y,new go.Point)}return ee[ee.length]=ee[0],ge(z),ee}go.Shape.defineFigureGenerator("Pentagon",function(ue,z,ee){var oe=ce(5),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<5;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(6),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<6;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(7),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<7;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(8),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<8;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(9),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<9;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(10),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<10;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,z,ee){var oe=ce(12),ie=new go.Geometry,se=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(se);for(var le=1;le<12;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<10;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<12;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<14;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<16;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<18;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<20;le++)se.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*z,oe[le].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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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(ue,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 le=1;le<oe.length;le+=3)se.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*z,oe[le+2].y*ee,oe[le].x*z,oe[le].y*ee,oe[le+1].x*z,oe[le+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 Pn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Pn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(ue,z,ee){var oe=ue?ue.parameter1:NaN,ie=ue?ue.parameter2:NaN;isNaN(oe)&&(oe=8),isNaN(ie)&&(ie=8);var se=new go.Geometry,le=new go.PathFigure(0,0,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe<z/2&&ie<ee/2&&(le.add(new go.PathSegment(go.PathSegment.Move,oe,ie)),le.add(new go.PathSegment(go.PathSegment.Line,oe,ee-ie)),le.add(new go.PathSegment(go.PathSegment.Line,z-oe,ee-ie)),le.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 Pn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=8);var ie=z/2,se=new go.Geometry,le=new go.PathFigure(z,z/2,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var ye=Math.max(ie-oe,0);return ye>0&&(le.add(new go.PathSegment(go.PathSegment.Move,z/2+ye,z/2)),le.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,ye,ye).close())),se.spot1=Ce,se.spot2=_e,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Cloud",function(ue,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(ue,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 Pn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Pn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(ue,z,ee){var oe=ue?ue.parameter1:NaN,ie=ue?ue.parameter2:NaN;isNaN(oe)&&(oe=0),isNaN(ie)&&(ie=315);var se=oe%360;se<0&&(se+=360);var le=ie%360,ye=Math.min(z,ee)/2;return new go.Geometry().add(new go.PathFigure(ye,ye).add(new go.PathSegment(go.PathSegment.Arc,se,le,ye,ye,ye,ye).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(ue,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 Pn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30);var ie=Math.min(oe,z)/2,se=z/2,le=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,le-ie)).add(new go.PathSegment(go.PathSegment.Line,z,le-ie)).add(new go.PathSegment(go.PathSegment.Line,z,le+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,le+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,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le-ie)).add(new go.PathSegment(go.PathSegment.Line,se-ie,le-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Pn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=Math.min(oe,z)/2,se=z/2,le=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,le-ie)).add(new go.PathSegment(go.PathSegment.Line,z,le-ie)).add(new go.PathSegment(go.PathSegment.Line,z,le+ie)).add(new go.PathSegment(go.PathSegment.Line,se+ie,le+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,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le+ie)).add(new go.PathSegment(go.PathSegment.Line,0,le-ie)).add(new go.PathSegment(go.PathSegment.Line,se-ie,le-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new Pn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(ue,z,ee){var oe=ue?ue.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,le=ee/2,ye=Math.atan2(ee,z),we=oe-Math.min(Math.cos(ye)*oe/2,se),be=oe-Math.min(Math.sin(ye)*oe/2,le),ie=new go.Geometry,ke=new go.PathFigure(we,0,!0);return ie.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,se,.2*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,z-we,0)),ke.add(new go.PathSegment(go.PathSegment.Line,z,be)),ke.add(new go.PathSegment(go.PathSegment.Line,.8*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,z,ee-be)),ke.add(new go.PathSegment(go.PathSegment.Line,z-we,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,se,.8*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,we,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,0,ee-be)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new Pn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(ue,z,ee){var oe=ue?ue.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 Pn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(ue,z,ee){var oe=ue?ue.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 Pn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(ue,z,ee){var oe=ue?ue.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(ue,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(ue,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(ue,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(ue,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(ue,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,le=.3,ye=0,we=se*he;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+se+ye)*ee,(.5-se+le)*z,(.5+we+ye)*ee,(.5-we+le)*z,(.5+se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+le)*z,(.5+ye)*ee,(.5+we+le)*z,(.5+se+ye)*ee,(.5+se+le)*z,(.5+we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-se+ye)*ee,(1-.5+se+le)*z,(.5-we+ye)*ee,(.5+we+le)*z,(.5-se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-we+le)*z,(.5-se+ye)*ee,(.5-se+le+.05)*z,(.5-we+ye-.02)*ee)),se=.2,le=0,ye=-.3,we=se*he,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+le)*z,(.5+ye)*ee,(.5+we+le)*z,(.5+se+ye)*ee,(.5+se+le)*z,(.5+we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-se+ye)*ee,(1-.5+se+le)*z,(.5-we+ye)*ee,(.5+we+le)*z,(.5-se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+le)*z,(.5+ye)*ee,(.5-we+le)*z,(.5-se+ye)*ee,(.5-se+le)*z,(.5-we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-we+le)*z,(.5+se+ye)*ee,(.5-se+le)*z,(.5+we+ye)*ee,(.5-we+le)*z,(.5+se+ye)*ee)),se=.2,le=-.3,ye=0,we=se*he,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-se+ye)*ee,(1-.5+se+le-.05)*z,(.5-we+ye-.02)*ee,(.5+we+le)*z,(.5-se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+le)*z,(.5+ye)*ee,(.5-we+le)*z,(.5-se+ye)*ee,(.5-se+le)*z,(.5-we+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+se+ye)*ee,(.5-se+le)*z,(.5+we+ye)*ee,(.5-we+le)*z,(.5+se+ye)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+we+le)*z,(.5+se+ye)*ee,(.5+se+le)*z,(.5+we+ye)*ee).close()),oe.setSpots(.06,.33,.93,.68),oe}),go.Shape.defineFigureGenerator("YinYang",function(ue,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,le=.5,ye=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(le+se)*z,ye*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*le,ee*ye,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)),ye=.75,ie=new go.PathFigure((le+se)*z,ye*ee,!0),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*le,ee*ye,se*z,se*z).close()),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Peace",function(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,le=.5,ye=.5,we=new go.PathFigure(le*z,(ye-se)*ee);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),se=.4,ie=he*.4;var be=Le(),ke=Le(),Ne=Le(),je=Le();Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.42,be,ke,Ne,je,je);var Ve=Le(),Je=Le(),We=Le();Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.58,je,je,We,Ve,Je);var gt=Le(),ut=Le(),bt=Le();Te(le,ye+se,le-ie,ye+se,le-se,ye+ie,le-se,ye,.42,gt,ut,bt,je,je);var rt=Le(),St=Le(),ct=Le();return Te(le,ye+se,le-ie,ye+se,le-se,ye+ie,le-se,ye,.58,je,je,ct,rt,St),we.add(new go.PathSegment(go.PathSegment.Move,ct.x*z,ct.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,rt.x*z,rt.y*ee,St.x*z,St.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,Ne.x*z,Ne.y*ee,be.x*z,be.y*ee,ke.x*z,ke.y*ee)),we.add(new go.PathSegment(go.PathSegment.Line,ct.x*z,ct.y*ee).close()),we.add(new go.PathSegment(go.PathSegment.Move,bt.x*z,bt.y*ee)),we.add(new go.PathSegment(go.PathSegment.Line,We.x*z,We.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,Ve.x*z,Ve.y*ee,Je.x*z,Je.y*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,bt.x*z,bt.y*ee,gt.x*z,gt.y*ee,ut.x*z,ut.y*ee).close()),me(be),me(ke),me(Ne),me(je),me(Ve),me(Je),me(We),me(gt),me(ut),me(bt),me(rt),me(St),me(ct),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Fragile",function(ue,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 Pn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(ue,z,ee){var oe=ue?ue.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.4,se=.4,le=.5,ye=.5,we=Le(),be=Le(),ke=Le(),Ne=Le(),je=new go.PathFigure((le-se)*z,ye*ee,!1);oe.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee)),Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.44,ke,Ne,be,we,we),je.add(new go.PathSegment(go.PathSegment.Bezier,be.x*z,be.y*ee,ke.x*z,ke.y*ee,Ne.x*z,Ne.y*ee));var Ve=Ee(be.x,be.y);Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.56,we,we,be,ke,Ne);var Je=Ee(be.x,be.y);je.add(new go.PathSegment(go.PathSegment.Line,(Ve.x*.1+.95*.9)*z,Ve.y*.1*ee)),je.add(new go.PathSegment(go.PathSegment.Line,.85*z,Ve.y*.1*ee)),je.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),je.add(new go.PathSegment(go.PathSegment.Line,(Je.x*.1+.9)*z,.15*ee)),je.add(new go.PathSegment(go.PathSegment.Line,(Je.x*.1+.9)*z,(Je.y*.1+.05*.9)*ee)),je.add(new go.PathSegment(go.PathSegment.Line,Je.x*z,Je.y*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,ke.x*z,ke.y*ee,Ne.x*z,Ne.y*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee)),se=.35,ie=he*.35;var We=new go.PathFigure(le*z,(ye-se)*ee,!1);oe.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee));var gt=new go.PathFigure((le-se)*z,ye*ee,!1);return oe.add(gt),me(we),me(be),me(ke),me(Ne),me(Ve),me(Je),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(ue,z,ee){var oe=new go.Geometry,ie=.375,se=0,le=-.125,ye=ie*he,we=new go.PathFigure((.525+se)*z,(.5+ie+le)*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*z,(.5+le)*ee,(.5+ye+se)*z,(.5+ie+le)*ee,(.5+ie+se)*z,(.5+ye+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5-ie+le)*ee,(1-.5+ie+se)*z,(.5-ye+le)*ee,(.5+ye+se)*z,(.5-ie+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+le)*ee,(.5-ye+se)*z,(.5-ie+le)*ee,(.5-ie+se)*z,(.5-ye+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.475+se)*z,(.5+ie+le)*ee,(.5-ie+se)*z,(.5+ye+le)*ee,(.5-ye+se)*z,(.5+ie+le)*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,le=-.125,ye=ie*he;var we=new go.PathFigure((1-.5+ie+se)*z,(.5+le)*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5+ie+le)*ee,(.5+ie+se)*z,(.5+ye+le)*ee,(.5+ye+se)*z,(.5+ie+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+le)*ee,(.5-ye+se)*z,(.5+ie+le)*ee,(.5-ie+se)*z,(.5+ye+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5+se)*z,(.5-ie+le)*ee,(.5-ie+se)*z,(.5-ye+le)*ee,(.5-ye+se)*z,(.5-ie+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+se)*z,(.5+le)*ee,(.5+ye+se)*z,(.5-ie+le)*ee,(1-.5+ie+se)*z,(.5-ye+le)*ee));var we=new go.PathFigure((.525+se)*z,(.5+ie+le)*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(ue,z,ee){var oe=ue?ue.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(ue,z,ee){var oe=ue?ue.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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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 Pn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Pn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.3);var se=(1-oe)*z,le=(.5-ie/2)*ee,ye=(.5+ie/2)*ee,we=new go.Geometry,be=new go.PathFigure(0,le,!0);we.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se,le)),be.add(new go.PathSegment(go.PathSegment.Line,se,0)),be.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,se,ee)),be.add(new go.PathSegment(go.PathSegment.Line,se,ye)),be.add(new go.PathSegment(go.PathSegment.Line,0,ye).close()),we.spot1=new go.Spot(0,le/ee);var ke=Ie(0,ye/ee,1,ye/ee,se/z,1,1,.5,Le());return we.spot2=new go.Spot(ke.x,ke.y),me(ke),we}),go.Shape.setFigureParameter("Arrow2",0,new Pn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Pn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=30),oe>z&&(oe=z);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,ee/2);var se=z-oe,le=(ee-ie)/2,ye=le+ie,we=new go.Geometry,be=new go.PathFigure(0,le,!0);we.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se,le)),be.add(new go.PathSegment(go.PathSegment.Line,se,0)),be.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,se,ee)),be.add(new go.PathSegment(go.PathSegment.Line,se,ye)),be.add(new go.PathSegment(go.PathSegment.Line,0,ye).close()),we.spot1=new go.Spot(0,le/ee);var ke=Ie(0,ye/ee,1,ye/ee,se/z,1,1,.5,Le());return we.spot2=new go.Spot(ke.x,ke.y),me(ke),we}),go.Shape.defineFigureGenerator("Chevron",function(ue,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(ue,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 Pn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,le=new go.Geometry,ye=new go.PathFigure(z,.5*ee,!0);le.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.3*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.3*z,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var we=Ie(0,.5,.3,0,0,ie/ee,.1,ie/ee,Le());return le.spot1=new go.Spot(we.x,we.y),we=Ie(.7,1,1,.5,0,se/ee,1,se/ee,we),le.spot2=new go.Spot(we.x,we.y),me(we),le}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Pn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Pn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=100);var se=(ee-oe)/2,le=se+oe,ye=(ee-ie)/2,we=ye+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,se=(ee-oe)/2,le=se+oe,ye=0,we=ee):(se=0,le=ee,ye=0,we=ee));var be=new go.Geometry,ke=new go.PathFigure(z,.5*ee,!0);be.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,we)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,.3*z,we)),ke.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ke.add(new go.PathSegment(go.PathSegment.Line,.3*z,ye)),ke.add(new go.PathSegment(go.PathSegment.Line,.3*z,se)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,ye).close());var Ne=Ie(0,.5,.3,ye/ee,0,se/ee,1,se/ee,Le());return be.spot1=new go.Spot(Ne.x,Ne.y),Ne=Ie(.7,we/ee,1,.5,0,le/ee,1,le/ee,Ne),be.spot2=new go.Spot(Ne.x,Ne.y),me(Ne),be}),go.Shape.setFigureParameter("IBeamArrow",0,new Pn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,le=new go.Geometry,ye=new go.PathFigure(z,.5*ee,!0);le.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),le.spot1=new go.Spot(0,ie/ee);var we=Ie(.7,1,1,.5,0,se/ee,1,se/ee,Le());return le.spot2=new go.Spot(we.x,we.y),me(we),le}),go.Shape.setFigureParameter("IBeamArrow2",0,new Pn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Pn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=100);var se=(ee-oe)/2,le=se+oe,ye=(ee-ie)/2,we=ye+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,se=(ee-oe)/2,le=se+oe,ye=0,we=ee):(se=0,le=ee,ye=0,we=ee));var be=new go.Geometry,ke=new go.PathFigure(z,.5*ee,!0);be.add(ke),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,we)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*z,we)),ke.add(new go.PathSegment(go.PathSegment.Line,0,we)),ke.add(new go.PathSegment(go.PathSegment.Line,0,ye)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*z,ye)),ke.add(new go.PathSegment(go.PathSegment.Line,.2*z,se)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ke.add(new go.PathSegment(go.PathSegment.Line,.7*z,ye).close()),be.spot1=new go.Spot(0,se/ee);var Ne=Ie(.7,we/ee,1,.5,0,le/ee,1,le/ee,Le());return be.spot2=new go.Spot(Ne.x,Ne.y),me(Ne),be}),go.Shape.setFigureParameter("Pointer",0,new Pn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(ue,z,ee){var oe=ue?ue.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 le=Ie(.2,.65,1,.65,0,1,1,.5,Le());return ie.spot2=new go.Spot(le.x,le.y),me(le),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new Pn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(ue,z,ee){var oe=ue?ue.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 le=Ie(0,.65,1,.65,0,1,1,.5,Le());return ie.spot2=new go.Spot(le.x,le.y),me(le),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new Pn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.4);var ie=(.5-oe/2)*ee,se=(.5+oe/2)*ee,le=new go.Geometry,ye=new go.PathFigure(z,.5*ee,!0);le.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,0,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),le.spot1=new go.Spot(.2,.3);var we=Ie(.7,1,1,.5,0,se/ee,1,se/ee,Le());return le.spot2=new go.Spot(we.x,we.y),me(we),le}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Pn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=50);var ie=(ee-oe)/2,se=ie+oe;oe>ee&&(ie=0,se=ee);var le=new go.Geometry,ye=new go.PathFigure(z,.5*ee,!0);le.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,se)),ye.add(new go.PathSegment(go.PathSegment.Line,0,se)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),le.spot1=new go.Spot(.2,ie/ee);var we=Ie(.7,1,1,.5,0,se/ee,1,se/ee,Le());return le.spot2=new go.Spot(we.x,we.y),me(we),le}),go.Shape.setFigureParameter("SquareArrow",0,new Pn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(ue,z,ee){var oe=ue?ue.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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,le=new go.PathFigure(0,.9*ee,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),le.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(ue,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(ue,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(ue,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(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,se=he*.5,le=new go.PathFigure(0,oe,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,he*oe,(.5-se)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,1*z,oe,(.5+se)*z,0,1*z,he*oe)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*ee,1*z,ee-he*oe,(.5+se)*z,1*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,(.5-se)*z,1*ee,0,ee-he*oe)),le.add(new go.PathSegment(go.PathSegment.Line,0,oe));var ye=new go.PathFigure(z,oe,!1);return ie.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*oe,1*z,2*oe-he*oe,(.5+se)*z,2*oe)),ye.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(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,se=he*.5,le=new go.PathFigure(0,ee-oe,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,he*oe,(.5-se)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,oe,(.5+se)*z,0,z,he*oe)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,ee-he*oe,(.5+se)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,(.5-se)*z,ee,0,ee-he*oe));var ye=new go.PathFigure(0,ee-oe,!1);return ie.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee-2*oe,0,ee-oe-he*oe,(.5-se)*z,ee-2*oe)),ye.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(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,se=he*.5,le=new go.PathFigure(oe,0,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z-oe,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-he*oe,0,z,(.5-se)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,(.5+se)*ee,z-he*oe,ee)),le.add(new go.PathSegment(go.PathSegment.Line,oe,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,he*oe,ee,0,(.5+se)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-se)*ee,he*oe,0));var ye=new go.PathFigure(oe,0,!1);return ie.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,2*oe,.5*ee,oe+he*oe,0,2*oe,(.5-se)*ee)),ye.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(ue,z,ee){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,se=he*.5,le=new go.PathFigure(z-oe,0,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-he*oe,0,z,(.5-se)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,(.5+se)*ee,z-he*oe,ee)),le.add(new go.PathSegment(go.PathSegment.Line,oe,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,he*oe,ee,0,(.5+se)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-se)*ee,he*oe,0)),le.add(new go.PathSegment(go.PathSegment.Line,z-oe,0));var ye=new go.PathFigure(z-oe,0,!1);return ie.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,z-2*oe,.5*ee,z-oe-he*oe,0,z-2*oe,(.5-se)*ee)),ye.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(ue,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(ue,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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=.2,se=.1,le=he*ie,ye=he*se,we=.5,be=.1,ke=new go.PathFigure(we*z,(be+se)*ee,!0);oe.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,(we-ie)*z,be*ee,(we-le)*z,(be+se)*ee,(we-ie)*z,(be+ye)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-se)*ee,(we-ie)*z,(be-ye)*ee,(we-le)*z,(be-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(we+ie)*z,be*ee,(we+le)*z,(be-se)*ee,(we+ie)*z,(be-ye)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be+se)*ee,(we+ie)*z,(be+ye)*ee,(we+le)*z,(be+se)*ee));var Ne=.05,je=he*Ne;we=.05,be=.25;var Ve=new go.PathFigure(.5*z,.2*ee,!0);return oe.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*ee)),we=.95,be=.25,Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we+Ne)*z,be*ee,(we+je)*z,(be-Ne)*ee,(we+Ne)*z,(be-je)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*ee)),Ne=.025,je=he*Ne,we=.825,be=.35,Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-Ne)*ee,(we+Ne)*z,(be-je)*ee,(we+je)*z,(be-Ne)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we-Ne)*z,be*ee,(we-je)*z,(be-Ne)*ee,(we-Ne)*z,(be-je)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee)),Ne=.05,je=he*Ne,we=.5,be=.7,Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-Ne)*ee,(we+Ne)*z,(be-je)*ee,(we+je)*z,(be-Ne)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we-Ne)*z,be*ee,(we-je)*z,(be-Ne)*ee,(we-Ne)*z,(be-je)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.45*z,ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*ee)),Ne=.025,je=he*Ne,we=.175,be=.35,Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-Ne)*ee,(we+Ne)*z,(be-je)*ee,(we+je)*z,(be-Ne)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we-Ne)*z,be*ee,(we-je)*z,(be-Ne)*ee,(we-Ne)*z,(be-je)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),Ne=.05,je=he*Ne,we=.05,be=.25,Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-Ne)*ee,(we-Ne)*z,(be-je)*ee,(we-je)*z,(be-Ne)*ee)),Ve.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 Pn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(ue,z,ee){var oe=ue?ue.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure(0,ie*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),le.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),oe}),go.Shape.defineFigureGenerator("Database",function(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,le=new go.PathFigure(z,.1*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+se)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-se)*ee,(.5-ie)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-se)*ee));var ye=new go.PathFigure(z,.1*ee,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+se)*ee,(.5+ie)*z,.2*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+se)*ee,(.5+ie)*z,.3*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,z,.3*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*ee,z,(.3+se)*ee,(.5+ie)*z,.4*ee)),ye.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.1,le=new go.PathFigure(z,.1*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+se)*ee,(.5+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+se)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-se)*ee,(.5-ie)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-se)*ee));var ye=new go.PathFigure(z,.1*ee,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+se)*ee,(.5+ie)*z,.2*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+se)*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+se)*ee,(.5+ie)*z,.3*ee)),ye.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var se=he*.2,le=new go.PathFigure(0,.2*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-se)*ee,(.2-se)*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*ee,(.8+se)*z,0,z,(.2-se)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,ee,z,(.8+se)*ee,(.8+se)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-se)*z,ee,0,(.8+se)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var ye=new go.PathFigure(0,ie*ee,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),oe}),go.Shape.defineFigureGenerator("DividedProcess",function(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure(0,ie*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),oe}),go.Shape.defineFigureGenerator("Document",function(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure(ie*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ie*ee)),le.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),le.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),oe}),go.Shape.defineFigureGenerator("ExternalProcess",function(ue,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(ue,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(ue,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 le=new go.PathFigure(z,.5*ee,!1);return oe.add(le),le.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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN,se=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ye=new go.PathFigure(ie*z,0,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,z,se*ee)),oe}),go.Shape.defineFigureGenerator("Junction",function(ue,z,ee){var oe=new go.Geometry,ie=1/Math.SQRT2,se=(1-1/Math.SQRT2)/2,le=he*.5,ye=.5,we=new go.PathFigure(z,ye*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ye*z,ee,z,(ye+le)*ee,(ye+le)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ye*ee,(ye-le)*z,ee,0,(ye+le)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,ye*z,0,0,(ye-le)*ee,(ye-le)*z,0)),we.add(new go.PathSegment(go.PathSegment.Bezier,z,ye*ee,(ye+le)*z,0,z,(ye-le)*ee));var be=new go.PathFigure((se+ie)*z,(se+ie)*ee,!1);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se*z,se*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*z,(se+ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Line,(se+ie)*z,se*ee)),oe}),go.Shape.defineFigureGenerator("LinedDocument",function(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,le=new go.PathFigure(.5*z,ee,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,se*ee,(se+ie)*z,0,z,(se-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(se+.1)*z,.9*ee,z,(se+ie)*ee,(se+ie)*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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(ue,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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN;isNaN(ie)&&(ie=.1);var se=1-ie,le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close());var ye=new go.PathFigure(.5*ie*z,ie*ee,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*z,ie*ee)),oe}),go.Shape.defineFigureGenerator("OffPageConnector",function(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,le=new go.PathFigure(z,se*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,se*z,ee,z,(se+ie)*ee,(se+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,se*ee,(se+ie)*z,0,z,(se-ie)*ee));var ye=new go.PathFigure(z,.5*ee,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),oe}),go.Shape.defineFigureGenerator("PaperTape",function(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN,se=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.3);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.parameter1:NaN,se=ue?ue.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(se)&&(se=.3);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Procedure",function(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure((1-ie)*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Move,ie*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),oe}),go.Shape.defineFigureGenerator("Process",function(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure(ie*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Sort",function(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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 le=new go.PathFigure(ie*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),le.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,0)),le.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=ue?ue.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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,le=new go.PathFigure(z,se*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,se*z,ee,z,(se+ie)*ee,(se+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-ie)*z,ee,0,(se+ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,se*z,0,0,(se-ie)*ee,(se-ie)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,se*ee,(se+ie)*z,0,z,(se-ie)*ee));var ye=new go.PathFigure(z,se*ee,!1);oe.add(ye),ye.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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.1,se=.1,le=.9,ye=.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 be=new go.PathFigure((le+se)*z,ye*ee,!0);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,(le+ie)*z,(ye-se)*ee,(le+se)*z,(ye-ie)*ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.4,.75),oe}),go.Shape.defineFigureGenerator("NandGate",function(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=he*.4,le=he*.1,ye=.1,we=.9,be=.5,ke=new go.PathFigure(.8*z,.5*ee,!0);oe.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,.8*z,(.5+se)*ee,(.4+ie)*z,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ke.add(new go.PathSegment(go.PathSegment.Line,0,0)),ke.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ke.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(.4+ie)*z,0,.8*z,(.5-se)*ee));var Ne=new go.PathFigure((we+ye)*z,be*ee,!0);return oe.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be+ye)*ee,(we+ye)*z,(be+le)*ee,(we+le)*z,(be+ye)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z,be*ee,(we-le)*z,(be+ye)*ee,(we-ye)*z,(be+le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-ye)*ee,(we-ye)*z,(be-le)*ee,(we-le)*z,(be-ye)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z,be*ee,(we+le)*z,(be-ye)*ee,(we+ye)*z,(be-le)*ee)),oe.spot1=new go.Spot(0,.05),oe.spot2=new go.Spot(.55,.95),oe}),go.Shape.defineFigureGenerator("NorGate",function(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,le=0,ye=.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,(ye+se)*ee,(le+se)*z,(ye+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,(le+se)*z,(ye-ie)*ee,.7*z,(ye-se)*ee)),ie=.1,se=he*.1,le=.9,ye=.5;var be=new go.PathFigure((le-ie)*z,ye*ee,!0);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee)),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.6,.75),oe}),go.Shape.defineFigureGenerator("OrGate",function(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,le=0,ye=.5,we=new go.PathFigure(0,0,!0);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(le+se+se)*z,(ye-ie)*ee,.8*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*z,(ye+se)*ee,(le+se+se)*z,(ye+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(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,le=.2,ye=.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 be=new go.PathFigure(.8*z,.5*ee,!0);oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(le+se)*z,(ye-ie)*ee,.7*z,(ye-se)*ee)),ie=.1,se=he*.1,le=.9,ye=.5;var ke=new go.PathFigure((le-ie)*z,ye*ee,!0);return oe.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee)),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.65,.75),oe}),go.Shape.defineFigureGenerator("XorGate",function(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*ie,le=.2,ye=.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 be=new go.PathFigure(.2*z,0,!0);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(le+se)*z,(ye-ie)*ee,.9*z,(ye-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),be.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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=he*.1,se=.1,le=.1,ye=.5,we=new go.PathFigure((le-ie*.5)*z,ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,0,(le-ie)*z,ee,(le-se)*z,0)),le=.3,we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,(le+se)*z,0,(le+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,0,(le-ie)*z,ee,(le-se)*z,0)),le=.5,we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,(le+se)*z,0,(le+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,0,(le-ie)*z,ee,(le-se)*z,0)),le=.7,we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,(le+se)*z,0,(le+ie)*z,ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,0,(le-ie)*z,ee,(le-se)*z,0)),le=.9,we.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie*.5)*z,ee,(le+se)*z,0,(le+ie)*z,ee)),oe}),go.Shape.defineFigureGenerator("ACvoltageSource",function(ue,z,ee){var oe=new go.Geometry,ie=he*.5,se=.5,le=.5,ye=.5,we=new go.PathFigure((le-se)*z,ye*ee,!1);return oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,(le+ie)*z,(ye-se)*ee,(le+se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,(le-se+.1)*z,ye*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+se-.1)*z,ye*ee,le*z,(ye-se)*ee,le*z,(ye+se)*ee)),oe}),go.Shape.defineFigureGenerator("DCvoltageSource",function(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=z,se=ee;z=z*.38,ee=ee*.6;var le=he*.8,ye=.8,we=0,be=.5,ke=(ie-z)/2,Ne=(se-ee)/2,je=new go.PathFigure(we*z+ke,(be+ye)*ee+Ne,!0);oe.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z+ke,be*ee+Ne,(we-le)*z+ke,(be+ye)*ee+Ne,(we-ye)*z+ke,(be+le)*ee+Ne)),je.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(be-ye)*ee+Ne,(we-ye)*z+ke,(be-le)*ee+Ne,(we-le)*z+ke,(be-ye)*ee+Ne)),je.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye+le*.5)*z+ke,be*ee+Ne,we*z+ke,(be-ye)*ee+Ne,(we-ye+le*.5)*z+ke,(be-le)*ee+Ne)),je.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(be+ye)*ee+Ne,(we-ye+le*.5)*z+ke,(be+le)*ee+Ne,we*z+ke,(be+ye)*ee+Ne).close()),le=he*.4,ye=.4,we=.2,be=.5;var Ve=new go.PathFigure(we*z+ke,(be+ye)*ee+Ne,!0);oe.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z+ke,be*ee+Ne,(we-le)*z+ke,(be+ye)*ee+Ne,(we-ye)*z+ke,(be+le)*ee+Ne)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(be-ye)*ee+Ne,(we-ye)*z+ke,(be-le)*ee+Ne,(we-le)*z+ke,(be-ye)*ee+Ne)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye+le*.5)*z+ke,be*ee+Ne,we*z+ke,(be-ye)*ee+Ne,(we-ye+le*.5)*z+ke,(be-le)*ee+Ne)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(be+ye)*ee+Ne,(we-ye+le*.5)*z+ke,(be+le)*ee+Ne,we*z+ke,(be+ye)*ee+Ne).close()),le=he*.2,ye=.2,we=.5,be=.5;var Je=new go.PathFigure((we-ye)*z+ke,be*ee+Ne,!0);oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(be-ye)*ee+Ne,(we-ye)*z+ke,(be-le)*ee+Ne,(we-le)*z+ke,(be-ye)*ee+Ne)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z+ke,be*ee+Ne,(we+le)*z+ke,(be-ye)*ee+Ne,(we+ye)*z+ke,(be-le)*ee+Ne)),Je.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(be+ye)*ee+Ne,(we+ye)*z+ke,(be+le)*ee+Ne,(we+le)*z+ke,(be+ye)*ee+Ne)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(we-ye)*z+ke,be*ee+Ne,(we-le)*z+ke,(be+ye)*ee+Ne,(we-ye)*z+ke,(be+le)*ee+Ne)),le=he*.4,ye=.4,we=.8,be=.5;var We=new go.PathFigure(we*z+ke,(be-ye)*ee+Ne,!0);oe.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z+ke,be*ee+Ne,(we+le)*z+ke,(be-ye)*ee+Ne,(we+ye)*z+ke,(be-le)*ee+Ne)),We.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(be+ye)*ee+Ne,(we+ye)*z+ke,(be+le)*ee+Ne,(we+le)*z+ke,(be+ye)*ee+Ne)),We.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye-le*.5)*z+ke,be*ee+Ne,we*z+ke,(be+ye)*ee+Ne,(we+ye-le*.5)*z+ke,(be+le)*ee+Ne)),We.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(be-ye)*ee+Ne,(we+ye-le*.5)*z+ke,(be-le)*ee+Ne,we*z+ke,(be-ye)*ee+Ne).close()),le=he*.8,ye=.8,we=1,be=.5;var gt=new go.PathFigure(we*z+ke,(be-ye)*ee+Ne,!0);return oe.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye)*z+ke,be*ee+Ne,(we+le)*z+ke,(be-ye)*ee+Ne,(we+ye)*z+ke,(be-le)*ee+Ne)),gt.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(be+ye)*ee+Ne,(we+ye)*z+ke,(be+le)*ee+Ne,(we+le)*z+ke,(be+ye)*ee+Ne)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(we+ye-le*.5)*z+ke,be*ee+Ne,we*z+ke,(be+ye)*ee+Ne,(we+ye-le*.5)*z+ke,(be+le)*ee+Ne)),gt.add(new go.PathSegment(go.PathSegment.Bezier,we*z+ke,(be-ye)*ee+Ne,(we+ye-le*.5)*z+ke,(be-le)*ee+Ne,we*z+ke,(be-ye)*ee+Ne).close()),oe}),go.Shape.defineFigureGenerator("Email",function(ue,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(ue,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 le=new go.PathFigure(.6*z,ee,!0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee).close());var ye=new go.PathFigure(0,.5*ee,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*ee)),oe}),go.Shape.defineFigureGenerator("Power",function(ue,z,ee){var oe=new go.Geometry,ie=he*.4,se=.4,le=.5,ye=.5,we=Le(),be=Le(),ke=Le(),Ne=Le();Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.5,we,we,be,ke,Ne);var je=Ee(be.x,be.y),Ve=new go.PathFigure(be.x*z,be.y*ee,!0);oe.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,ke.x*z,ke.y*ee,Ne.x*z,Ne.y*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,(le-ie)*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee)),Te(le-se,ye,le-se,ye-ie,le-ie,ye-se,le,ye-se,.5,ke,Ne,be,we,we),Ve.add(new go.PathSegment(go.PathSegment.Bezier,be.x*z,be.y*ee,ke.x*z,ke.y*ee,Ne.x*z,Ne.y*ee)),ie=he*.3,se=.3,Te(le-se,ye,le-se,ye-ie,le-ie,ye-se,le,ye-se,.5,ke,Ne,be,we,we),Ve.add(new go.PathSegment(go.PathSegment.Line,be.x*z,be.y*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-se)*z,ye*ee,Ne.x*z,Ne.y*ee,ke.x*z,ke.y*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+se)*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+se)*z,ye*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.5,we,we,be,ke,Ne),Ve.add(new go.PathSegment(go.PathSegment.Bezier,be.x*z,be.y*ee,Ne.x*z,Ne.y*ee,ke.x*z,ke.y*ee).close());var Ve=new go.PathFigure(.45*z,0,!0);return oe.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*ee)),Ve.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),me(we),me(be),me(ke),me(Ne),me(je),oe.spot1=new go.Spot(.25,.45),oe.spot2=new go.Spot(.75,.8),oe}),go.Shape.defineFigureGenerator("Fallout",function(ue,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(le,ye,we){le.add(new go.PathSegment(go.PathSegment.Move,(.3+ye)*z,(.8+we)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ye)*z,(.5+we)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.1+ye)*z,(.5+we)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.3+ye)*z,(.8+we)*ee).close())}return se(ie,0,0),se(ie,.4,0),se(ie,.2,-.3),oe}),go.Shape.defineFigureGenerator("IrritationHazard",function(ue,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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=.5,se=0,le=0,ye=ie*he,we=.4*Math.SQRT2/2+.5,be=.5-.5*Math.SQRT2/2,ke=1,Ne=.5,je=.5,Ve=0,Je=new go.PathFigure(we*z,(1-be)*ee,!1);return oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,Ne*ee,ke*z,.7*ee,ke*z,Ne*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(je+se)*z,(Ve+se)*ee,(.5+ie+se)*z,(.5-ye+se)*ee,(.5+ye+se)*z,(.5-ie+se)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+se)*z,(.5+le)*ee,(.5-ye+se)*z,(.5-ie+le)*ee,(.5-ie+se)*z,(.5-ye+le)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(.35+se)*z,.9*ee,(.5-ie+se)*z,(.5+ye+le)*ee,(.5-ye+se)*z,.9*ee)),Je.add(new go.PathSegment(go.PathSegment.Move,(.25+se)*z,.8*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,(.35+se)*z,.9*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,(.2+se)*z,.95*ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(ue,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(ue,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(ue,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 le=new go.PathFigure(0,.5*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.2*z,.35*ee,.3*z,.35*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.7*z,.65*ee,.8*z,.65*ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(ue,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(ue,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(ue,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(ue,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 le=.5-.285,ye=.5,we=le,be=Math.PI/4,ke=4*(1-Math.cos(be))/(3*Math.sin(be)),Ne=ke*.5,je=le,Ve=le,Je=ke*je,We=ke*Ve;se.add(new go.PathSegment(go.PathSegment.Bezier,(ye-je)*z,we*ee,(ye-(Je+je)/2)*z,(we+(Ve+We)/2)*ee,(ye-je)*z,(we+We)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ye*z,(we-Ve)*ee,(ye-je)*z,(we-We)*ee,(ye-Je)*z,(we-Ve)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(ye+je)*z,we*ee,(ye+Je)*z,(we-Ve)*ee,(ye+je)*z,(we-We)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(ye+je)*z,(we+We)*ee,(ye+(Je+je)/2)*z,(we+(Ve+We)/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 gt=new go.PathFigure(.2*z,ee,!1);oe.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*ee));var ut=new go.PathFigure(.8*z,ee,!1);return oe.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(ue,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(ue,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(ue,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 le=new go.PathFigure(.1*z,ee,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("Caution",function(ue,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(ue,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 le=new go.PathFigure(.675*z,.575*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*ee,z,.8*ee,z,.85*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,le=new go.PathFigure(z,ie*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,ee,z,(ie+se)*ee,(ie+se)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*ee,(ie-se)*z,ee,0,(ie+se)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,0,0,(ie-se)*ee,(ie-se)*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,ie*ee,(ie+se)*z,0,z,(ie-se)*ee));var ye=new go.PathFigure(ie*z,0,!1);return oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ie*z,.15*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,ie*z,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,ie*z,.85*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,0,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.15*z,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.85*z,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*ee)),ye.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*ee)),oe}),go.Shape.defineFigureGenerator("Package",function(ue,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(ue,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 le=new go.PathFigure(0,.5*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("Component",function(ue,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 le=new go.PathFigure(0,.6*ee,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),oe}),go.Shape.defineFigureGenerator("Boat Shipment",function(ue,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(ue,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(ue,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(ue,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(ue,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 le=.1,ye=he*.1,we=.2,be=.9,ke=new go.PathFigure((we-le)*z,be*ee,!0);oe.add(ke),ke.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-le)*ee,(we-le)*z,(be-ye)*ee,(we-ye)*z,(be-le)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(we+le)*z,be*ee,(we+ye)*z,(be-le)*ee,(we+le)*z,(be-ye)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be+le)*ee,(we+le)*z,(be+ye)*ee,(we+ye)*z,(be+le)*ee)),ke.add(new go.PathSegment(go.PathSegment.Bezier,(we-le)*z,be*ee,(we-ye)*z,(be+le)*ee,(we-le)*z,(be+ye)*ee).close()),le=.1,ye=he*.1,we=.8,be=.9;var Ne=new go.PathFigure((we-le)*z,be*ee,!0);return oe.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be-le)*ee,(we-le)*z,(be-ye)*ee,(we-ye)*z,(be-le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(we+le)*z,be*ee,(we+ye)*z,(be-le)*ee,(we+le)*z,(be-ye)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,we*z,(be+le)*ee,(we+le)*z,(be+ye)*ee,(we+ye)*z,(be+le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(we-le)*z,be*ee,(we-ye)*z,(be+le)*ee,(we-le)*z,(be+ye)*ee).close()),oe}),go.Shape.defineFigureGenerator("KanbanPost",function(ue,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(ue,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 le=new go.PathFigure(.5*z,.8*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee));var ye=new go.PathFigure(.5*z,.7*ee,!1);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee));var we=.1,be=he*.1,ke=.1,Ne=.9,je=new go.PathFigure((ke-we)*z,Ne*ee,!0);oe.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Ne-we)*ee,(ke-we)*z,(Ne-be)*ee,(ke-be)*z,(Ne-we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ke+we)*z,Ne*ee,(ke+be)*z,(Ne-we)*ee,(ke+we)*z,(Ne-be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Ne+we)*ee,(ke+we)*z,(Ne+be)*ee,(ke+be)*z,(Ne+we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ke-we)*z,Ne*ee,(ke-be)*z,(Ne+we)*ee,(ke-we)*z,(Ne+be)*ee)),we=.1,be=he*.1,ke=.4,Ne=.9;var Ve=new go.PathFigure((ke-we)*z,Ne*ee,!0);return oe.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Ne-we)*ee,(ke-we)*z,(Ne-be)*ee,(ke-be)*z,(Ne-we)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(ke+we)*z,Ne*ee,(ke+be)*z,(Ne-we)*ee,(ke+we)*z,(Ne-be)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,ke*z,(Ne+we)*ee,(ke+we)*z,(Ne+be)*ee,(ke+be)*z,(Ne+we)*ee)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(ke-we)*z,Ne*ee,(ke-be)*z,(Ne+we)*ee,(ke-we)*z,(Ne+be)*ee)),oe}),go.Shape.defineFigureGenerator("RailShipment",function(ue,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 le=new go.PathFigure(.55*z,.4*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*ee).close());var ke=.05,Ne=he*.05,je=.175,Ve=.95,ye=new go.PathFigure((je-ke)*z,Ve*ee,!0);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve-ke)*ee,(je-ke)*z,(Ve-Ne)*ee,(je-Ne)*z,(Ve-ke)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(je+ke)*z,Ve*ee,(je+Ne)*z,(Ve-ke)*ee,(je+ke)*z,(Ve-Ne)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve+ke)*ee,(je+ke)*z,(Ve+Ne)*ee,(je+Ne)*z,(Ve+ke)*ee)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(je-ke)*z,Ve*ee,(je-Ne)*z,(Ve+ke)*ee,(je-ke)*z,(Ve+Ne)*ee));var ke=.05,Ne=he*.05,je=.375,Ve=.95,we=new go.PathFigure((je-ke)*z,Ve*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve-ke)*ee,(je-ke)*z,(Ve-Ne)*ee,(je-Ne)*z,(Ve-ke)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(je+ke)*z,Ve*ee,(je+Ne)*z,(Ve-ke)*ee,(je+ke)*z,(Ve-Ne)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve+ke)*ee,(je+ke)*z,(Ve+Ne)*ee,(je+Ne)*z,(Ve+ke)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(je-ke)*z,Ve*ee,(je-Ne)*z,(Ve+ke)*ee,(je-ke)*z,(Ve+Ne)*ee));var ke=.05,Ne=he*.05,je=.625,Ve=.95,be=new go.PathFigure((je-ke)*z,Ve*ee,!0);oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve-ke)*ee,(je-ke)*z,(Ve-Ne)*ee,(je-Ne)*z,(Ve-ke)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(je+ke)*z,Ve*ee,(je+Ne)*z,(Ve-ke)*ee,(je+ke)*z,(Ve-Ne)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve+ke)*ee,(je+ke)*z,(Ve+Ne)*ee,(je+Ne)*z,(Ve+ke)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(je-ke)*z,Ve*ee,(je-Ne)*z,(Ve+ke)*ee,(je-ke)*z,(Ve+Ne)*ee));var ke=.05,Ne=he*.05,je=.825,Ve=.95,Je=new go.PathFigure((je-ke)*z,Ve*ee,!0);oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve-ke)*ee,(je-ke)*z,(Ve-Ne)*ee,(je-Ne)*z,(Ve-ke)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(je+ke)*z,Ve*ee,(je+Ne)*z,(Ve-ke)*ee,(je+ke)*z,(Ve-Ne)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Ve+ke)*ee,(je+ke)*z,(Ve+Ne)*ee,(je+Ne)*z,(Ve+ke)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(je-ke)*z,Ve*ee,(je-Ne)*z,(Ve+ke)*ee,(je-ke)*z,(Ve+Ne)*ee).close());var We=new go.PathFigure(0,ee,!1);return oe.add(We),We.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),oe}),go.Shape.defineFigureGenerator("Warehouse",function(ue,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 le=new go.PathFigure(.15*z,ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee).close());var ye=.05,we=he*.05,be=.35,ke=.775,Ne=new go.PathFigure((be-ye)*z,ke*ee,!0);return oe.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,be*z,(ke-ye)*ee,(be-ye)*z,(ke-we)*ee,(be-we)*z,(ke-ye)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(be+ye)*z,ke*ee,(be+we)*z,(ke-ye)*ee,(be+ye)*z,(ke-we)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,be*z,(ke+ye)*ee,(be+ye)*z,(ke+we)*ee,(be+we)*z,(ke+ye)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(be-ye)*z,ke*ee,(be-we)*z,(ke+ye)*ee,(be-ye)*z,(ke+we)*ee).close()),oe}),go.Shape.defineFigureGenerator("ControlCenter",function(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=.3,se=he*.3,le=.5,ye=.7,we=new go.PathFigure((le-ie)*z,ye*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee));var be=new go.PathFigure(0,.7*ee,!1);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*ee,0,0,z,0)),oe}),go.Shape.defineFigureGenerator("TripleFanBlades",function(ue,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(ue,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(ue,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(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,le=.5,ye=.5,we=new go.PathFigure((le-ie)*z,ye*ee,!0);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee));var be=new go.PathFigure(.15*z,.5*ee,!1);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Flag",function(ue,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(ue,z,ee){var oe=new go.Geometry,ie=.5,se=he*.5,le=.5,ye=.5,we=new go.PathFigure((le-ie)*z,ye*ee,!1);oe.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee).close()),ie=.05,se=he*.05,le=.5,ye=.8;var be=new go.PathFigure((le-ie)*z,ye*ee,!1);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye-ie)*ee,(le-ie)*z,(ye-se)*ee,(le-se)*z,(ye-ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(le+ie)*z,ye*ee,(le+se)*z,(ye-ie)*ee,(le+ie)*z,(ye-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,le*z,(ye+ie)*ee,(le+ie)*z,(ye+se)*ee,(le+se)*z,(ye+ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(le-ie)*z,ye*ee,(le-se)*z,(ye+ie)*ee,(le-ie)*z,(ye+se)*ee).close()),be.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),be.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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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 le=new go.PathFigure(.402*z,.85*ee,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*ee).close());var ye=new go.PathFigure(.678*z,.85*ee,!1);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*ee)),ye.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*ee)),ye.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(ue,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(ue,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 le=new go.PathFigure(z*.408,ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.408,ee*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*(1-.184*3))),le.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*1).close());var ye=new go.PathFigure(z*.612,ee,!0);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z*.612,ee*(1-.184*3))),ye.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*(1-.184*4))),ye.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(ue,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 le=new go.PathFigure(z*.055,.13*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.13)),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.16)),le.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.16).close());var ye=new go.PathFigure(z*.055,.18*ee,!0);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.18)),ye.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.21)),ye.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(ue,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(ue,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(ue,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 le=new go.PathFigure(z*.11,ee*.1,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.8)),le.add(new go.PathSegment(go.PathSegment.Line,z*.11,ee*.8).close());var ye=new go.PathFigure(z*(.11+.24133333*1+.028*1),ee*.1,!1);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.1)),ye.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.8)),ye.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(ue,z,ee){var oe=new go.Geometry,ie=8,se=ie*he,le=new go.PathFigure(ie,0,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.14)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),le.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-se,z-se,ee)),le.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,se,ee,0,ee-se)),le.add(new go.PathSegment(go.PathSegment.Line,0,ie)),le.add(new go.PathSegment(go.PathSegment.Bezier,ie,0,0,se,se,0).close());var ye=new go.PathFigure(z*.83,0,!1);oe.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.3)),ye.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.3)),ye.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 be=new go.PathFigure(z*.78,ee*.05,!1);return oe.add(be),be.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),be.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),be.add(new go.PathSegment(go.PathSegment.Line,z*.78,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("SpeechBubble",function(ue,z,ee){var oe=ue?ue.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,le=new go.Geometry,ye=new go.PathFigure(oe,0,!0);return le.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,z-oe,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,z,oe,z-ie,0,z,ie)),ye.add(new go.PathSegment(go.PathSegment.Line,z,se-oe)),ye.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,se,z,se-ie,z-ie,se)),ye.add(new go.PathSegment(go.PathSegment.Line,z*.7,se)),ye.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee)),ye.add(new go.PathSegment(go.PathSegment.Line,z*.55,se)),ye.add(new go.PathSegment(go.PathSegment.Line,oe,se)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,se-oe,ie,se,0,se-ie)),ye.add(new go.PathSegment(go.PathSegment.Line,0,oe)),ye.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()),ie>1?(le.spot1=new go.Spot(0,0,ie,ie),le.spot2=new go.Spot(1,.8,-ie,-ie)):(le.spot1=go.Spot.TopLeft,le.spot2=new go.Spot(1,.8)),le}),go.Shape.defineFigureGenerator("Repeat",function(ue,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(ue,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(ue,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 le=new go.PathFigure(z*.28,ee*.37,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.37)),le.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.41)),le.add(new go.PathSegment(go.PathSegment.Line,z*.28,ee*.41).close()),oe}),go.Shape.defineFigureGenerator("Beaker",function(ue,z,ee){var oe=new go.Geometry,ie=15,se=ie*he,le=new go.PathFigure(z*.62,ee*.475,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),le.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-se,z-se,ee)),le.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,se,ee,0,ee-se)),le.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.475)),le.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.03)),le.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*0)),le.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(ue,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 le=new go.PathFigure(z*.4,ee*0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.44)),le.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.44)),le.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.66)),le.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),ee*.44)),le.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.44)),le.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*0).close()),oe}),go.Shape.defineFigureGenerator("Bin",function(ue,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(ue,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 le=new go.PathFigure(z*.5,ee*0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.63)),le.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.63)),le.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.74,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("EmptyDrink",function(ue,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(ue,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(ue,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")},5559: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 Pn={},qt="5.0",Ee={},Le=null,me=!1,Ie=!1,Te=null,Ce=!1,_e=null,he=null,Se=0;Se<arguments.length;Se++){var xe=arguments[Se];if(xe!==null)switch(typeof xe){case"number":qt=xe.toFixed(1);break;case"string":xe.match(new RegExp("^[0-9]\\.[0-9]+$"))?qt=xe:Te=xe;break;case"object":typeof xe.is3D!="undefined"?Le=xe:Ee=xe;break;case"boolean":me=xe,Ie=!0;break}}Le===null&&(Le={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&&!Ie&&(me=!0)),Te!==null&&Ee.id===void 0&&(Ee.id=Te);var ge="",ce="",ve=!1,de=null,ue=null,z=null,ee=!1,oe=null,ie=null,se=null,le=null,ye=null;Ee.height!==void 0&&(Ee.height=Math.round(Ee.height)),Ee.width!==void 0&&(Ee.width=Math.round(Ee.width));var we=function(vt){return parseFloat(vt)>4?parseFloat(vt):5};Pn.setHTML5Codebase=function(vt,Rt){he=vt,dt(vt,Rt)},Pn.setJavaCodebase=Pn.setJavaCodebaseVersion=Pn.isCompiledInstalled=Pn.setPreCompiledScriptPath=Pn.setPreCompiledResourcePath=function(){},Pn.setHTML5CodebaseVersion=function(vt,Rt){var jt=parseFloat(vt);if(jt!==NaN&&jt<5){console.log("The GeoGebra HTML5 codebase version "+jt+" is deprecated. Using version latest instead.");return}_e=vt,it(vt,Rt)},Pn.getHTML5CodebaseVersion=function(){return ue},Pn.getParameters=function(){return Ee},Pn.setFontsCSSURL=function(vt){le=vt},Pn.setGiacJSURL=function(vt){},Pn.setJNLPFile=function(vt){ge=vt},Pn.setJNLPBaseDir=function(vt){},Pn.inject=function(){function vt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Rt="auto",jt=Ee.id,un,Vt=!1,xn=0;xn<arguments.length;xn++){var Ut=arguments[xn];typeof Ut=="string"?(Ut=Ut.toLowerCase(),Ut.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Rt=Ut:jt=arguments[xn]):typeof Ut=="boolean"?Vt=Ut:Ut instanceof HTMLElement&&(un=Ut)}Zt();function Zt(){if(!Ce){setTimeout(Zt,200);return}Rt=Bt(Rt);var Xt=un||document.getElementById(jt);if(!Xt){console.log("possibly bug on ajax loading? ");return}if(Pn.removeExistingApplet(Xt,!1),Ee.width===void 0&&Xt.clientWidth&&(Ee.width=Xt.clientWidth),Ee.height===void 0&&Xt.clientHeight&&(Ee.height=Xt.clientHeight),!(Ee.width&&Ee.height)&&Rt==="html5"&&(delete Ee.width,delete Ee.height),de=Rt,Rt==="screenshot")ut(Xt,Ee);else{var mt=!1;Ee.hasOwnProperty("playButton")&&Ee.playButton||Ee.hasOwnProperty("clickToLoad")&&Ee.clickToLoad?mt=!0:Ee.hasOwnProperty("playButtonAutoDecide")&&Ee.playButtonAutoDecide&&(mt=(!be()||vt())&&ke()),mt?(de="screenshot",rt(Xt,Ee,Vt,Rt)):gt(Xt,Ee,Vt)}}};function be(){try{return window.self!==window.top}catch(vt){return!0}}function ke(){return Ee.hasOwnProperty("screenshotGenerator")&&Ee.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Pn.getViews=function(){return Le},Pn.isJavaInstalled=function(){return!1};var Ne=function(vt){var Rt=function(xn){var Ut=JSON.parse(xn),Zt=function(ze){return ze.type=="G"||ze.type=="E"},Xt=Ut.elements?Ut.elements.filter(Zt)[0]:Ut;if(!Xt||!Xt.url){jt();return}Ee.fileName=Xt.url,je(Xt.settings||{}),Le.is3D=!0;var mt="https://www.geogebra.org/images/";Pn.setPreviewImage(oe||Xt.previewUrl,mt+"GeoGebra_loading.png",mt+"applet_play.png"),vt()},jt=function(){Ee.onError&&Ee.onError(),yt("Error: Fetching material (id "+Ee.material_id+") failed.",Ee)},un=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Vt="/materials/"+Ee.material_id+"?scope=basic";Ve("https://"+un+"/api/proxy.php?path="+encodeURIComponent(Vt),Rt,jt)};function je(vt){var Rt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(jt){vt[jt]=!!vt[jt]}),Rt.forEach(function(jt){Ee[jt]===void 0&&vt[jt]!==void 0&&(Ee[jt]=vt[jt])}),Ee.showToolBarHelp===void 0&&(Ee.showToolBarHelp=Ee.showToolBar)}function Ve(vt,Rt,jt){var un=new XMLHttpRequest;un.open("GET",vt),un.onload=function(){Rt(un.responseText)},un.onerror=jt,un.send()}Pn.isHTML5Installed=function(){return!0},Pn.getLoadedAppletType=function(){return de},Pn.setPreviewImage=function(vt,Rt,jt){oe=vt,ie=Rt,se=jt},Pn.removeExistingApplet=function(vt,Rt){var jt;typeof vt=="string"&&(vt=document.getElementById(vt)),de=null;var un=null;for(jt=0;jt<vt.childNodes.length;jt++){var Vt=vt.childNodes[jt],xn=Vt.className;xn==="applet_screenshot"?Rt?(Vt.style.display="block",de="screenshot"):Vt.style.display="none":xn!=="applet_scaler prerender"&&(vt.removeChild(Vt),un=xn&&xn.indexOf("appletParameters")!=-1?Vt.id:null,jt--)}var Ut=Ee.id!==void 0?Ee.id:un,Zt=window[Ut];Zt&&typeof Zt.getBase64=="function"&&(Zt.remove(),window[Ut]=null)},Pn.refreshHitPoints=function(){if(we(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var vt=Pn.getAppletObject();return vt&&typeof vt.recalculateEnvironments=="function"?(vt.recalculateEnvironments(),!0):!1},Pn.startAnimation=function(){var vt=Pn.getAppletObject();return vt&&typeof vt.startAnimation=="function"?(vt.startAnimation(),!0):!1},Pn.stopAnimation=function(){var vt=Pn.getAppletObject();return vt&&typeof vt.stopAnimation=="function"?(vt.stopAnimation(),!0):!1},Pn.getAppletObject=function(){var vt=Ee.id!==void 0?Ee.id:"ggbApplet";return window[vt]},Pn.resize=function(){};var Je=function(vt,Rt,jt){var un=document.createElement("param");un.setAttribute("name",Rt),un.setAttribute("value",jt),vt.appendChild(un)},We=function(vt){return vt&&vt!=="false"},gt=function(vt,Rt,jt){we(ue)<=4.2&&(jt=!0);var un=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ue||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(un=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Vt=document.createElement("div");Vt.classList.add("appletParameters","notranslate");var xn=Rt.width,Ut=Rt.height;if(Rt.disableAutoScale=Rt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Rt.disableAutoScale,Rt.width!==void 0)if(we(ue)<=4.4)We(Rt.showToolBar)&&(Rt.height-=7),We(Rt.showAlgebraInput)&&(Rt.height-=37),Rt.width<605&&We(Rt.showToolBar)&&(Rt.width=605,xn=605);else{var Zt=100;(We(Rt.showToolBar)||We(Rt.showMenuBar))&&(Rt.hasOwnProperty("customToolBar")&&(Rt.customToolbar=Rt.customToolBar),Zt=We(Rt.showMenuBar)?245:155),xn<Zt&&(Rt.width=Zt,xn=Zt)}Vt.style.border="none",Vt.style.display="inline-block";for(var Xt in Rt)Rt.hasOwnProperty(Xt)&&Xt!=="appletOnLoad"&&Vt.setAttribute("data-param-"+Xt,Rt[Xt]);le&&Vt.setAttribute("data-param-fontscssurl",le),Pn.resize=function(){GGBAppletUtils.responsiveResize(vt,Rt)},window.addEventListener("resize",function(at){Pn.resize()});var mt=typeof Rt.appletOnLoad=="function"?Rt.appletOnLoad:function(){};if(!jt&&Rt.width!==void 0){Rt.hasOwnProperty("showSplash")||Vt.setAttribute("data-param-showSplash","false");var ze=vt.querySelector(".applet_scaler.prerender"),Be=ze!==null;if(Be)var qe=ze.querySelector(".ggb_preview");else{var qe=ct(xn,Ut,Rt.borderColor,!1);ze=document.createElement("div"),ze.className="applet_scaler",ze.style.position="relative",ze.style.display="block",ze.style.width=xn+"px",ze.style.height=Ut+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ze,"66%"),we(ue)>=5?(Rt.appletOnLoad=function(at){var xt=vt.querySelector(".ggb_preview");xt&&xt.parentNode.removeChild(xt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ze),window.GGBT_wsf_view&&$(window).trigger("resize"),mt(at)},Be||ze.appendChild(qe)):Vt.appendChild(qe),ze.appendChild(Vt),Be||vt.appendChild(ze),setTimeout(function(){Pn.resize()},1)}else{var Qe=document.createElement("div");Qe.className="applet_scaler",Qe.style.position="relative",Qe.style.display="block",Qe.appendChild(Vt),vt.appendChild(Qe),Rt.appletOnLoad=function(at){Pn.resize(),mt(at)}}function Ue(at,xt){xt&&typeof xt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(at,xt.appletOnLoad):renderGGBElement(at),yt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",xt)}function Xe(at,xt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:at,params:xt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(tn){Ue(tn.article,tn.params)}),html5AppletsToProcess=null)},we(ue)<5&&(at.className+=" geogebraweb")):Ue(at,xt)}if(un){scriptLoadStarted=!0;for(var Re=0;Re<Vt.childNodes.length;Re++){var Ae=Vt.childNodes[Re].tagName;Ae==="TABLE"&&(Vt.removeChild(Vt.childNodes[Re]),Re--)}if(ggbHTML5LoadedScript!==null){var Ge=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ge!=null&&Ge.parentNode.removeChild(Ge)}var Ke=document.createElement("script"),Ze=function(){Xe(Vt,Rt)};Ke.src=ce+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=ue,ggbHTML5LoadedScript=Ke.src,yt("GeoGebra HTML5 codebase loaded: '"+ce+"'.",Rt),!he&&(!_e||_e=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ze()):ce.requirejs?__webpack_require__.e(777).then(function(){var at=[__webpack_require__(70777)];Ze.apply(null,at)}.bind(this)).catch(__webpack_require__.oe):(Ke.onload=Ze,vt.appendChild(Ke))}else Xe(Vt,Rt);Rt.height=Ut,Rt.width=xn},ut=function(vt,Rt,jt){var un=ct(Rt.width,Rt.height,Rt.borderColor,jt),Vt=document.createElement("div");Vt.style.position="relative",Vt.style.display="block",Vt.style.width=Rt.width+"px",Vt.style.height=Rt.height+"px",Vt.className="applet_screenshot applet_scaler"+(jt?" applet_screenshot_play":""),Vt.appendChild(un);var xn=GGBAppletUtils.getScale(Rt,vt,jt);jt?(vt.appendChild(St()),window.GGBT_wsf_view||(vt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Vt,"66%"),vt.appendChild(Vt),xn!==1&&!isNaN(xn)&&(GGBAppletUtils.scaleElement(Vt,xn),Vt.style.width=Rt.width+"px",Vt.style.height=Rt.height+"px",Vt.parentNode.style.width=Rt.width*xn+"px",Vt.parentNode.style.height=Rt.height*xn+"px"),Pn.resize=function(){bt(vt,un,Vt,jt)},window.addEventListener("resize",function(Ut){Pn.resize()}),Pn.resize()};function bt(vt,Rt,jt,un){if(vt.contains(Rt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(vt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(vt)}var Vt=GGBAppletUtils.getScale(Ee,vt,un);jt.parentNode!==null&&(!isNaN(Vt)&&Vt!==1?(GGBAppletUtils.scaleElement(jt,Vt),jt.parentNode.style.width=Ee.width*Vt+"px",jt.parentNode.style.height=Ee.height*Vt+"px"):(GGBAppletUtils.scaleElement(jt,1),jt.parentNode.style.width=Ee.width+"px",jt.parentNode.style.height=Ee.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(vt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Pn.onExitFullscreen=function(vt,Rt){Rt.appendChild(vt)};var rt=function(vt,Rt,jt,un){ut(vt,Rt,!0);for(var Vt=function(){var Zt=[];for(Ut=0;Ut<vt.childNodes.length;Ut++)Zt.push(vt.childNodes[Ut]);if(window.GGBT_wsf_view){var Xt=window.GGBT_wsf_view.renderFullScreen(vt,Rt.id),mt=document.getElementById("fullscreencontainer"),ze=jQuery(vt).find(".fullscreencontent");ze.length>0?(Xt.remove(),ze.attr("id","fullscreencontent").show(),jQuery(mt).append(ze),window.dispatchEvent(new Event("resize"))):gt(Xt,Rt,!1),window.GGBT_wsf_view.launchFullScreen(mt)}else de=un,gt(vt,Rt,!1);if(!window.GGBT_wsf_view)for(Ut=0;Ut<Zt.length;Ut++)vt.removeChild(Zt[Ut])},xn=vt.getElementsByClassName("ggb_preview_play"),Ut=0;Ut<xn.length;Ut++)xn[Ut].addEventListener("click",Vt,!1),xn[Ut].addEventListener("ontouchstart",Vt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(vt),ke()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},St=function(){var vt=document.createElement("div");if(vt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Rt='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',jt=document.createElement("style");jt.styleSheet?jt.styleSheet.cssText=Rt:jt.appendChild(document.createTextNode(Rt)),document.getElementsByTagName("head")[0].appendChild(jt)}return vt},ct=function(vt,Rt,jt,un){var Vt=document.createElement("div");Vt.className="ggb_preview",Vt.style.position="absolute",Vt.style.zIndex="90",Vt.style.width=vt-2+"px",Vt.style.height=Rt-2+"px",Vt.style.top="0px",Vt.style.left="0px",Vt.style.overflow="hidden",Vt.style.backgroundColor="white";var xn="lightgrey";jt!==void 0&&(jt==="none"?xn="transparent":xn=jt),Vt.style.border="1px solid "+xn;var Ut=document.createElement("img");if(Ut.style.position="relative",Ut.style.zIndex="1000",Ut.style.top="-1px",Ut.style.left="-1px",oe!==null&&Ut.setAttribute("src",oe),Ut.style.opacity=.7,ie!==null){var Zt,Xt,mt;if(!un){Zt=document.createElement("img"),Zt.style.position="absolute",Zt.style.zIndex="1001",Zt.style.opacity=1,Ut.style.opacity=.3,Xt=360,Xt>vt/4*3&&(Xt=vt/4*3),mt=Xt/5.8,Zt.setAttribute("src",ie),Zt.setAttribute("width",Xt),Zt.setAttribute("height",mt);var ze=(vt-Xt)/2,Be=(Rt-mt)/2;Zt.style.left=ze+"px",Zt.style.top=Be+"px",Vt.appendChild(Zt)}}return Vt.appendChild(Ut),Vt},Bt=function(vt){return vt=vt.toLowerCase(),vt==="html5"||vt==="screenshot"?vt:"html5"},ht=["web","webSimple","web3d","tablet","tablet3d","phone"],it=function(vt,Rt){if(ue=vt,Rt){dt(ue,!0);return}var jt=!me;if(jt){var un=we(ue);!isNaN(un)&&un<4.4&&(jt=!1)}var Vt,xn;window.location.protocol.substr(0,4)==="http"?Vt=window.location.protocol:Vt="http:";var Ut=ue.indexOf("//");Ut>0?xn=ue:Ut===0?xn=Vt+ue:xn="https://www.geogebra.org/apps/5.2.814.0/";for(var Zt in ht)if(ue.slice(ht[Zt].length*-1)===ht[Zt]||ue.slice((ht[Zt].length+1)*-1)===ht[Zt]+"/"){dt(xn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&jt&&!Le.is3D&&!Le.AV&&!Le.SV&&!Le.CV&&!Le.EV2&&!Le.CP&&!Le.PC&&!Le.DA&&!Le.FI&&!Le.PV&&!We(Ee.showToolBar)&&!We(Ee.showMenuBar)&&!We(Ee.showAlgebraInput)&&!We(Ee.enableRightClick)&&(!Ee.appName||Ee.appName=="classic")?xn+="webSimple/":xn+="web3d/",dt(xn,!1)},dt=function(vt,Rt){if(vt.requirejs){ce=vt;return}vt.slice(-1)!=="/"&&(vt+="/"),ce=vt,Rt===null&&(Rt=vt.indexOf("http")===-1),ve=Rt,z="web.nocache.js",ee=!1;var jt=ce.split("/");jt.length>1&&(!Rt&&jt[jt.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):ht.indexOf(jt[jt.length-2])>=0&&(z=jt[jt.length-2]+".nocache.js")),jt=vt.split("/"),ue=jt[jt.length-3],ue.substr(0,4)==="test"?ue=ue.substr(4,1)+"."+ue.substr(5,1):(ue.substr(0,3)==="war"||ue.substr(0,4)==="beta")&&(ue="5.0");var un=parseFloat(ue);un!==NaN&&un<5&&vt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+un+" is deprecated. Using version latest instead."),it("5.0",Rt))},yt=function(vt,Rt){window.console&&window.console.log&&(!Rt||typeof Rt.showLogging=="undefined"||Rt.showLogging&&Rt.showLogging!=="false")&&console.log(vt)};Ee.material_id!==void 0?Ne(Et):Et();function Et(){var vt=qt;_e!==null?vt=_e:parseFloat(vt)<5&&(vt="5.0"),it(vt,!1),he!==null&&dt(he,ve),Ce=!0}return Pn},GGBAppletUtils=function(){"use strict";function Pn(){return window.GGBT_wsf_edit!==void 0}function qt(Ce,_e){_e!=1?(Ce.style.transformOrigin="0% 0% 0px",Ce.style.webkitTransformOrigin="0% 0% 0px",Ce.style.transform="scale("+_e+","+_e+")",Ce.style.webkitTransform="scale("+_e+","+_e+")",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,_e,he,Se,xe,ge){var ce=null;if(ge!=null&&ge!="")for(var ve=Ce.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+ge+" ")>-1){ce=ve;break}else ve=ve.parentNode;var de=0,ue=0,z=0,ee=0,oe=0,ie=0,se=0;if(ce)de=ce.offsetWidth,ue=Math.max(Se?ce.offsetWidth:0,ce.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(de=Math.min(window.innerWidth,document.documentElement.clientWidth),ue=Math.min(window.innerHeight,document.documentElement.clientHeight),z=de):(de=window.innerWidth,ue=window.innerHeight,z=window.innerWidth),Ce){var le=Ce.getBoundingClientRect();le.left>0&&le.left<=de&&(xe===void 0||!xe)&&(document.dir==="rtl"?(oe=de-le.width-le.left,ie=z<=480?10:30):(ie=le.left,oe=z<=480?10:30),ee=ie+oe)}if(Ce&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ye=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)&&_e>0&&_e+ee<de?de=_e:de-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(he===void 0||!he)&&(ue-=se)),{width:de,height:ue}}function Le(Ce,_e,he,Se,xe){if(Ce.isScreenshoGenerator)return 1;var ge=Se!==void 0&&Se,ce=Ce.noScaleMargin!=null&&Ce.noScaleMargin,ve=function(ye){return ye&&ye!=="false"},de=ve(Ce.autoHeight),ue=Ee(_e,Ce.width,he,de,ge&&window.GGBT_wsf_view||ce,xe),z=parseInt(ue.width),ee=Ce.width,oe=Ce.height;if(ee===void 0){var ie=_e.querySelector(".appletParameters");ie&&(ee=ie.offsetWidth,oe=ie.offsetHeight)}var se=z/ee,le=ge?1:ue.height/oe;return he!==void 0&&!he&&(se=Math.min(1,se),le=Math.min(1,le)),Math.min(se,le)}function me(Ce,_e,he){var Se=1,xe,ge=!1;if(Ce.hasOwnProperty("allowUpscale")&&(ge=Ce.allowUpscale),Ce.hasOwnProperty("scale")&&(Se=parseFloat(Ce.scale),(isNaN(Se)||Se===null||Se===0)&&(Se=1),Se>1&&(ge=!0)),_e&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ge=!0),!(Ce.hasOwnProperty("disableAutoScale")&&Ce.disableAutoScale))xe=Le(Ce,_e,ge,he,Ce.scaleContainerClass);else return Se;return ge&&(!Ce.hasOwnProperty("scale")||Se===1)?xe:Math.min(Se,xe)}function Ie(Ce){var _e=Math.min(window.innerWidth,document.documentElement.clientWidth),he=Math.min(window.innerHeight,document.documentElement.clientHeight),Se=Ce.getBoundingClientRect(),xe=(_e-Se.width)/2,ge=(he-Se.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 Te(Ce,_e){var he=Ce.querySelector(".appletParameters");if(he){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(_e.id!==he.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ce)}if(he.parentElement&&/fullscreen/.test(he.parentElement.className))return;var Se=me(_e,Ce);Pn()&&he.setAttribute("data-param-scale",Se);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 ce=_e.id!==void 0?_e.id:"ggbApplet",ve=window[ce];(ve==null||!ve.recalculateEnvironments)&&xe!==null&&!xe.className.match(/fullscreen/)&&(xe.parentNode.style.transform="",!isNaN(Se)&&Se!==1?(xe.parentNode.style.width=_e.width*Se+"px",xe.parentNode.style.height=_e.height*Se+"px",qt(xe,Se)):(qt(xe,1),xe.parentNode.style.width=_e.width+"px",xe.parentNode.style.height=_e.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ie(Ce),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(he).parents(".content-added-content"))}}return{responsiveResize:Te,isFlexibleWorksheetEditor:Pn,positionCenter:Ie,getScale:me,scaleElement:qt}}();__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 Pn=n.location.search;return Pn.indexOf(J)!=-1||Pn.indexOf(K)!=-1}function q(Pn,qt){}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(Pn){var qt=s[L].bindings;s[L].bindings=function(){for(var Ee=qt?qt():{},Le=Pn[webModule.__softPermutationId],me=O;me<Le.length;me++){var Ie=Le[me];Ee[Ie[O]]=Ie[P]}return Ee}};var t;function u(){return v(),t}function v(){if(!t){var Pn=o.createElement(Q);if(Pn.id=L,Pn.style.cssText=R+S,Pn.tabIndex=-1,o.body.appendChild(Pn),t=Pn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var qt=document.compatMode==U?V:W;t.write(qt+X),t.close()}}}function w(Pn){function qt(Le){function me(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ie=me();if(Ie){Le();return}function Te(){if(!Ie){if(!me())return;Ie=!0,Le(),o.removeEventListener&&o.removeEventListener(Z,Te,!1),Ce&&clearInterval(Ce)}}o.addEventListener&&o.addEventListener(Z,Te,!1);var Ce=setInterval(function(){Te()},$)}function Ee(Le){var me=u(),Ie=me.body,Te=me.createElement(_);Te.language=ab,Te.crossOrigin=W,Te.src=Le,webModule.__errFn&&(Te.onerror=function(){webModule.__errFn(L,new Error(bb+Le))}),Ie.appendChild(Te)}qt(function(){Ee(Pn)})}webModule.__startLoadingFragment=function(Pn){return C(Pn)},webModule.__installRunAsyncCode=function(Pn){var qt=u(),Ee=qt.body,Le=qt.createElement(_);Le.language=ab,Le.text=Pn,Ee.appendChild(Le),Ee.removeChild(Le)};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(Pn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Pn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Pn){var qt=c[Pn];return qt==null?null:qt},r=d,webModule.__errFn=e}function B(){function Pn(Ce){var _e=Ce.lastIndexOf(rb);_e==-1&&(_e=Ce.length);var he=Ce.indexOf(sb);he==-1&&(he=Ce.length);var Se=Ce.lastIndexOf(tb,Math.min(he,_e));return Se>=O?Ce.substring(O,Se+P):W}function qt(Ce){if(!Ce.match(/^\w+:\/\//)){var _e=o.createElement(ub);_e.src=Ce+vb,Ce=Pn(_e.src)}return Ce}function Ee(){var Ce=__gwt_getMetaProperty(wb);return Ce!=null?Ce:W}function Le(){for(var Ce=o.getElementsByTagName(_),_e=O;_e<Ce.length;++_e)if(Ce[_e].src.indexOf(xb)!=-1)return Pn(Ce[_e].src);return W}function me(){var Ce=o.getElementsByTagName(yb);return Ce.length>O?Ce[Ce.length-P].href:W}function Ie(){var Ce=o.location;return Ce.href==Ce.protocol+zb+Ce.host+Ce.pathname+Ce.search+Ce.hash}var Te=Ee();return Te==W&&(Te=Le()),Te==W&&(Te=me()),Te==W&&Ie()&&(Te=Pn(o.location.href)),Te=qt(Te),Te}function C(Pn){return Pn.match(/^\//)||Pn.match(/^[a-zA-Z]+:\/\//)?Pn:webModule.__moduleBase+Pn}function D(){var Pn=[],qt=O,Ee=[],Le=[];function me(Ce){var _e=Le[Ce](),he=Ee[Ce];if(_e in he)return _e;var Se=[];for(var xe in he)Se[he[xe]]=xe;throw r&&r(Ce,Se,_e),null}if(__gwt_isKnownPropertyValue=function(Ce,_e){return _e in Ee[Ce]},webModule.__getPropMap=function(){var Ce={};for(var _e in Ee)Ee.hasOwnProperty(_e)&&(Ce[_e]=me(_e));return Ce},webModule.__computePropValue=me,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ie;try{Ie=Cb;var Te=Ie.indexOf(Db);Te!=-1&&(qt=parseInt(Ie.substring(Te+P),$),Ie=Ie.substring(O,Te))}catch(Ce){}return webModule.__softPermutationId=qt,C(Ie+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})()},49291:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Ax:function(){return Te},Ds:function(){return Ce},KI:function(){return he},SI:function(){return Ie},f1:function(){return me}});var Le=Ee(38446);function me(Se){let xe=!0;if(Se.length>0){for(let ge=0;ge<Se.length;ge++)if(Se[ge].compile_success==0||!Se[ge].compile_success){xe=!1;break}}else xe=!1;return xe}function Ie(Se,xe=""){let ge=[];for(let ce=0;ce<Se.length;ce++){let ve=Se[ce],de=xe?`${xe}/${ve.name}`:`${ve.name}`;ge.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:de})}return ge}function Te(Se,xe,ge){for(let ce=0;ce<Se.length;ce++){let ve=Se[ce];if(ve.key===xe){ve.children=ge;break}ve.children&&Te(ve.children,xe,ge)}return Se}function Ce(Se,xe,ge){let ce;return function(){let ve=this,de=arguments,ue=function(){ce=null,ge||Se.apply(ve,de)},z=ge&&!ce;clearTimeout(ce),ce=setTimeout(ue,xe),z&&Se.apply(ve,de)}}const _e=!0,he=Le.Z.API_SERVER},14573:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ce}});var Le=Ee(59301),me={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ie=Ee(92310),Te=Ee.n(Ie),Ce=Ee(71418),_e=Ee(2859),he=Ee(7660),Se=Ee(88230),xe=(ve,de,ue)=>new Promise((z,ee)=>{var oe=le=>{try{se(ue.next(le))}catch(ye){ee(ye)}},ie=le=>{try{se(ue.throw(le))}catch(ye){ee(ye)}},se=le=>le.done?z(le.value):Promise.resolve(le.value).then(oe,ie);se((ue=ue.apply(ve,de)).next())}),ce=({data:ve,className:de,fullWidth:ue,style:z={},onClose:ee,onOk:oe,showFullTools:ie,noAssociationId:se})=>{const le=(0,Le.useRef)(null),ye=(0,Le.useRef)(null),we=(0,Le.useRef)(null),be=(0,Le.useRef)(null),[ke,Ne]=(0,Le.useState)(!1),[je,Ve]=(0,Le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Le.useEffect)(()=>{we.current||(we.current=document.createElement("style"),document.head.appendChild(we.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),we.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&Je()):(document.body.removeAttribute("data-custom"),we.current&&(document.head.removeChild(we.current),we.current=null))},[ve==null?void 0:ve.visible]);const Je=()=>xe(void 0,null,function*(){Ne(!0),Ve("\u6B63\u5728\u52A0\u8F7D\u4E2D");const bt=yield(0,Se.ZJ)(ve==null?void 0:ve.src);le.current.src="",le.current.src=bt,le.current.onload=function(){ut()},Ne(!1),Ve("")}),We=bt=>xe(void 0,null,function*(){Ne(!0),Ve("\u6B63\u5728\u4FDD\u5B58\u4E2D");const rt=yield(0,he.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:bt.dataUrl}});rt!=null&&rt.id&&!se?(yield(0,he.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:rt==null?void 0:rt.id,settings:JSON.stringify(bt.state)}})).status===0&&oe():rt!=null&&rt.id&&oe(rt),Ne(!1),Ve("")}),gt=()=>{const bt=document.querySelector('a[href="https://markerjs.com/"]');bt&&bt.parentNode&&(bt.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(St=>{const ct=document.querySelector(St.name);ct&&ct.setAttribute("title",St.title)})},ut=()=>{ye.current=new _e.hP(le.current),ye.current.targetRoot=be.current,ye.current.addEventListener("render",We),ye.current.addEventListener("beforeclose",ee),ie&&(ye.current.availableMarkerTypes=ye.current.ALL_MARKER_TYPES,ye.current.uiStyleSettings.redoButtonVisible=!0,ye.current.uiStyleSettings.notesButtonVisible=!0,ye.current.uiStyleSettings.zoomButtonVisible=!0,ye.current.uiStyleSettings.zoomOutButtonVisible=!0,ye.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ye.current.uiStyleSettings,ye.current.show(),ve!=null&&ve.snapshotData&&ye.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),gt()},300)};return Le.createElement(Le.Fragment,null,(ve==null?void 0:ve.visible)&&Le.createElement(Ce.Z,{spinning:ke,tip:je,style:{position:"absolute"}},Le.createElement("div",{ref:be,className:Te()(me.imageDimensions,de,ue?me.fullWidth:""),style:z},Le.createElement("img",{className:me.img,ref:le}))))}},46531:function(Pn,qt,Ee){"use strict";var Le=Ee(59301),me=Ee(95237),Ie=Ee(43604),Te=Ee(99313),Ce=Ee(3113),_e=Ee(99325),he=Ee(11570),Se=Ee(48136),xe=Ee(59301);const ge=(0,Le.forwardRef)(({callback:ce,showSaveButton:ve,value:de=""},ue)=>{const z=(0,Le.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=ye=>{z.current.setValue(z.current.getValue()+" "+ye.value+" ")},se=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:xe.createElement(me.Z,{className:he.Z.lists,gutter:[10,10]},ee.map((ye,we)=>xe.createElement(Ie.Z,{flex:"110px",className:he.Z.item},xe.createElement("div",null,xe.createElement(_e.Z,{value:`$$${ye.value}$$`}),ye.name),xe.createElement("div",{className:he.Z.children},ye.children.map((be,ke)=>xe.createElement("div",{key:ke},xe.createElement("h1",null,be.name),xe.createElement(me.Z,{gutter:[10,10]},be.data.map((Ne,je)=>xe.createElement(Ie.Z,{key:je,onClick:()=>ie(Ne),className:he.Z.diamond},xe.createElement(_e.Z,{value:"`$$"+Ne.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:xe.createElement(me.Z,{className:he.Z.lists,gutter:[10,10]},oe.map((ye,we)=>xe.createElement(Ie.Z,{flex:"110px",className:he.Z.item},xe.createElement("div",null,xe.createElement(_e.Z,{value:"`$$"+ye.value+"$$`"}),ye.name),xe.createElement("div",{className:he.Z.children},ye.children.map((be,ke)=>xe.createElement("div",{key:ke},be.name&&xe.createElement("h1",null,be.name),xe.createElement(me.Z,{gutter:[10,10]},be.data.map((Ne,je)=>xe.createElement(Ie.Z,{key:je,onClick:()=>ie(Ne),className:he.Z.diamond},xe.createElement(_e.Z,{value:"`$$"+Ne.value+"$$`"}))))))))))}],le=()=>{var ye=document.createElement("div");ye.innerHTML=z.current.getValue();var we=ye.innerText;return ce&&ce(we),we};return(0,Le.useImperativeHandle)(ue,()=>({getData:le})),xe.createElement("div",{className:he.Z.mathWrap},xe.createElement(Te.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:le,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});qt.Z=ge},57816:function(Pn,qt,Ee){"use strict";var Le=Ee(59301),me=Ee(93314),Ie=Ee(3113),Te=Object.defineProperty,Ce=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,ge=(ue,z,ee)=>z in ue?Te(ue,z,{enumerable:!0,configurable:!0,writable:!0,value:ee}):ue[z]=ee,ce=(ue,z)=>{for(var ee in z||(z={}))Se.call(z,ee)&&ge(ue,ee,z[ee]);if(he)for(var ee of he(z))xe.call(z,ee)&&ge(ue,ee,z[ee]);return ue},ve=(ue,z)=>Ce(ue,_e(z));const de=({img:ue,buttonProps:z={},styles:ee={},customText:oe,ButtonText:ie,ButtonClick:se,Buttonclass:le,ButtonTwo:ye,imgStyles:we,loading:be=!1})=>Le.createElement("section",{className:"tc animated fadeIn",style:ce(ce({},{color:"#999",margin:"100px auto",visibility:be?"hidden":"visible"}),ee)},Le.createElement("img",{src:ue||me,style:ve(ce({},we),{pointerEvents:"none",userSelect:"none"})}),Le.createElement("p",{className:"mt20 font14"},oe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&Le.createElement(Ie.ZP,ce({className:le,onClick:se},z),ie),ye&&ye);qt.Z=de},90853:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return le}});var Le=Ee(59301),me={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ie=Ee(3113),Te=Ee(70557),Ce=Ee(57800),_e=Ee(6848),he=Ee(88230),Se=Ee(30897),xe=Ee(57816),ge=Ee(38446),ce=Ee(89282),ve=Ee(59301),de=Object.defineProperty,ue=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(ye,we,be)=>we in ye?de(ye,we,{enumerable:!0,configurable:!0,writable:!0,value:be}):ye[we]=be,ie=(ye,we)=>{for(var be in we||(we={}))z.call(we,be)&&oe(ye,be,we[be]);if(ue)for(var be of ue(we))ee.call(we,be)&&oe(ye,be,we[be]);return ye},se=(ye,we,be)=>new Promise((ke,Ne)=>{var je=We=>{try{Je(be.next(We))}catch(gt){Ne(gt)}},Ve=We=>{try{Je(be.throw(We))}catch(gt){Ne(gt)}},Je=We=>We.done?ke(We.value):Promise.resolve(We.value).then(je,Ve);Je((be=be.apply(ye,we)).next())}),le=({editOffice:ye="view",data:we,theme:be,type:ke,filename:Ne,monacoEditor:je,className:Ve,style:Je,close:We,onClose:gt,hasMask:ut,disabledDownload:bt,onImgDimensions:rt,showNodata:St,recordInfo:ct})=>{const[Bt,ht]=(0,Le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[it,dt]=(0,Le.useState)(""),[yt,Et]=(0,Le.useState)(),vt=window.ENV==="build"?"/react/build":"",Rt=location.host.startsWith("localhost")?ge.Z.PROXY_SERVER:ge.Z.API_SERVER,un=10*(1024*1024),Vt=(0,Le.useRef)();we!=null&&we.startsWith("/api")&&ke!=="txt"&&(we=ge.Z.API_SERVER+we);const xn=mt=>mt.substring(mt.lastIndexOf("/")+1).split(".").pop();Ne&&je&&(je.filename=Ne),(0,Le.useEffect)(()=>{var mt,ze;const Be=(ze=(mt=document.cookie)==null?void 0:mt.replace(/\s/g,""))==null?void 0:ze.split(";");Be==null||Be.map(qe=>{let Qe=qe.split("=");Qe[0]==="_educoder_session"&&dt(Qe[1])})},[]),(0,Le.useEffect)(()=>{ke==="office"&&(we.indexOf("bigfilescdn.")>-1||we.indexOf("bigfiles1")>-1?Et({url:we,fileType:xn(we),model:we.indexOf("model=edit")?"edit":"view"}):Ut())},[ke,we]);const Ut=()=>se(void 0,null,function*(){console.log("data:",we);let mt=we;we.startsWith("http")||(mt=location.origin+mt);let ze=new URL(mt).pathname.split("/").pop();const Be=yield(0,Se.gJ)({attachment_id:ze});Be.url=Rt+Be.url,Et(Be)}),Zt=()=>{if(we.startsWith("http")||we.startsWith("blob:")){Xt();return}(0,he.Sv)(Ne||"educoder",we,Ne)},Xt=()=>{ct&&(0,ce.fc)({id:ct==null?void 0:ct.id,watch_type:1,course_id:ct==null?void 0:ct.course_id}),(0,he.Nd)(Ne||"educoder",decodeURIComponent(we))};return ve.createElement("div",{style:ie({},Je||{}),className:`${ut&&me.bgBlack} ${ke?me.wrp:"hide"}`},We&&ve.createElement("div",{className:me.close,ref:Vt},!!rt&&ve.createElement(_e.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Vt.current},ve.createElement("span",{onClick:()=>{gt(),rt()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!bt&&ve.createElement(_e.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Vt.current},ve.createElement("span",{onClick:Xt},ve.createElement("i",{className:"icon-quxiaozhiding"}))),ve.createElement(_e.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Vt.current},ve.createElement("span",{className:"",onClick:gt},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${me[Ve]} ${Ve} ${me.monaco} ${ke==="txt"?"show":"hide"}`},ke==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(Ce.ZP,ie({},je)))),ke==="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}),ke==="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})),ke==="office"&&yt&&ve.createElement("iframe",{src:`${vt}/office.html?key=${yt.key}&url=${btoa(yt.url)}&callbackUrl=${Rt+(yt.callbackUrl||"")}&fileType=${yt.fileType}&title=${yt.title||""}&model=${ye}&officeServer=${ge.Z.ONLYOFFICE}&disabledDownload=${!!bt}`}),ke==="html"&&ve.createElement("iframe",{src:we+"&disposition=inline"}),ke==="pdf"&&ve.createElement("iframe",{src:`${vt}/js/pdfview/index.html?filename=${Ne||"educoder.pdf"}&url=${encodeURIComponent(we)}&disabledDownload=${!!bt}`}),ke==="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}`}),(ke==="other"||ke==="download")&&ve.createElement(ve.Fragment,null,St?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(Ie.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Zt,disabled:bt},"\u4E0B\u8F7D")}):ve.createElement(Ie.ZP,{type:"primary",size:"middle",onClick:Zt,disabled:bt},ve.createElement(Te.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},99325:function(Pn,qt,Ee){"use strict";Ee.d(qt,{z:function(){return ke},Z:function(){return Ne}});var Le=Ee(59301),me=Ee(2878),Ie=Ee(85187),Te=Ee(64018),Ce=Ee(40846),_e=Ee(38446),he=Ee(88230),Se=Ee(15342),xe=Ee(1012),ge=Ee(90853),ce=Ee(59301),de=({html:je})=>{const Ve=(0,Le.useRef)(null),Je=(0,Le.useRef)(null),We=`.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,Le.useEffect)(()=>{const gt=Ve.current.attachShadow({mode:"open"});Je.current=document.createElement("div"),Je.current.className="markdown-body",Je.current.innerHTML=je,gt.appendChild(Je.current);const ut=document.createElement("style");return ut.textContent=We,gt.appendChild(ut),()=>{gt.innerHTML=""}},[]),(0,Le.useEffect)(()=>{Je.current&&(Je.current.innerHTML=je)},[je]),ce.createElement("div",{ref:Ve})},ue=Object.defineProperty,z=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ie=(je,Ve,Je)=>Ve in je?ue(je,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Je}):je[Ve]=Je,se=(je,Ve)=>{for(var Je in Ve||(Ve={}))ee.call(Ve,Je)&&ie(je,Je,Ve[Je]);if(z)for(var Je of z(Ve))oe.call(Ve,Je)&&ie(je,Je,Ve[Je]);return je};const le="@\u2581\u2581@",ye="@\u2581@",we=/<pre[^>]*>/g;function be(je){let Ve=document.createElement("div");return Ve.innerHTML=je,Ve.childNodes.length===0?"":Ve.childNodes[0].nodeValue}const ke=(je,Ve)=>{je=je||"";const Je=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,We=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,gt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ut=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ve?je.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Je,(bt,rt,St,ct,Bt,ht,it)=>{const dt=rt||ct||ht,yt=St||Bt||it||"?";return _e.Z.API_SERVER+"/api/attachments/"+dt+yt+"&t="+(0,he.Jn)(dt,Date.now())+(bt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(je=je.replace(ut,(bt,rt,St,ct,Bt,ht,it)=>{const dt=rt||ct||ht,yt=St||Bt||it||"?";return _e.Z.API_SERVER+"/attachments/download/"+dt+yt+"&t="+(0,he.Jn)(dt,Date.now())+(bt.indexOf(")")>-1?")":"&")}).replace(Je,(bt,rt,St,ct,Bt,ht,it)=>{const dt=rt||ct||ht,yt=St||Bt||it||"?";return _e.Z.API_SERVER+"/api/attachments/"+dt+yt+"&t="+(0,he.Jn)(dt,Date.now())+(bt.indexOf(")")>-1?")":"&")}).replace(We,(bt,rt,St,ct,Bt)=>{const ht=rt||ct,it=St||Bt||"";return'"'+_e.Z.API_SERVER+"/api/attachments/"+ht+it+ht+it+"&t="+(0,he.Jn)(ht,Date.now())}).replace(gt,(bt,rt,St,ct,Bt)=>{const ht=rt||ct,it=St||Bt||"";return"("+_e.Z.API_SERVER+"/files/uploads/"+ht+it+ht+it+"&t="+(0,he.Jn)(ht,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,`
|
|
|
`),je)};var Ne=({value:je="",className:Ve,showTextOnly:Je,showLines:We,style:gt={},stylesPrev:ut={},highlightKeywords:bt,showProgramFill:rt,isProgramFill:St,disabledFill:ct=!1,programFillValue:Bt,onFillChange:ht=yt=>{},onFillBlur:it=()=>{},onFillFocus:dt=()=>{}})=>{let yt=String(je);const[Et,vt]=(0,Le.useState)(""),[Rt,jt]=(0,Le.useState)("office"),[un,Vt]=(0,Le.useState)([]),xn=(0,Le.useRef)("a"+(0,xe.Z)()),Ut={},Zt=(Ke,Ze,at)=>{const xt=document.createElement(Ke===ye?"input":"textarea");xt.style.width="100%",xt.style.height=Ke===ye?"40px":"151px",xt.rows=5,xt.spellcheck=!1,xt.name="edu-program-fill",xt.placeholder="\u8BF7\u8F93\u5165",xt.dataset.id=Ze;const tn=Object.keys(Ut).length;return Ut[tn]=xt,`<span class="edu-program-fill-wrap ${Ke===ye?"":"show"}" style="width:${Ke===ye?"400px":"100%"}" title=${at||""}><span>${xt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Xt(Ke){return Ke=Ke.replace(/!\[.*?\]\(.*?\)/g,""),Ke=Ke.replace(/\[.*?\]\(.*?\)/g,""),Ke=Ke.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ke=Ke.replace(/<embed.*?>/g,""),Ke=Ke.replace(/<img.*?>/g,""),Ke=Ke.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ke=Ke.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ke=Ke.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ke=Ke.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ke}const mt=Ke=>Ke.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ze,at){let xt=at.replace(/(\n|\r)/g,"").split("}"),tn=[];return xt.map(nn=>{nn!=""&&tn.push(`.${xn.current} ${nn}`)}),`<style>${tn.join("}")}</style>`}),ze=(0,Le.useMemo)(()=>{try{const xt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,tn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,nn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Jt=/\(\/attachments\/download\//g;yt=yt.replace(Jt,"("+_e.Z.API_SERVER+"/attachments/download/").replace(xt,"("+_e.Z.API_SERVER+"/api/attachments/").replace(tn,'"'+_e.Z.API_SERVER+"/api/attachments/").replace(nn,'"'+_e.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(xt){}if(rt){let xt=-1;return yt=yt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(tn,nn,Jt){var mn;return++xt,Zt(tn,xt,(mn=Bt==null?void 0:Bt[xt])==null?void 0:mn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${mt(yt||"")}</pre>`}let Ke=mt(yt);Ke=(0,Ie.ZP)(Ke);const Ze=(0,Ie.ez)();yt.match(/\[TOC\]/)&&(Ke=Ke.replace("<p>[TOC]</p>",(0,Ie.Qv)()),(0,Ie.Iy)()),Ke=Ke.replace(/(__special_katext_id_\d+__)/g,(xt,tn)=>{const{type:nn,expression:Jt}=Ze[tn];return(0,Se.renderToString)(be(Jt)||"",{displayMode:nn==="block",throwOnError:!1,output:"html"})}),Ke=Ke.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ie.AL)();const at=document.createElement("div");if(at.innerHTML=Ke,Je)return at.innerText;if(bt){const xt=bt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ue(at,xt),at.innerHTML}return setTimeout(()=>Ae(),500),at.innerHTML},[yt,bt]);(0,Le.useEffect)(()=>{Xe.current&&Xe.current.querySelectorAll(["input","textarea"]).forEach(Ze=>{Ze.oninput=Be,Ze.onblur=qe,Ze.onfocus=Qe})},[un]),(0,Le.useEffect)(()=>{var Ke,Ze,at,xt,tn;if(Bt!=null&&Bt.length)try{const nn=Xe.current.querySelectorAll(".edu-program-fill-score"),Jt=Xe.current.querySelectorAll('[name="edu-program-fill"]');for(const[mn,kn]of Jt.entries())kn.value=((Ke=Bt==null?void 0:Bt[mn])==null?void 0:Ke.value)||"",((Ze=Bt==null?void 0:Bt[mn])==null?void 0:Ze.type)==="warning"?kn.className="program-fill-warning":((at=Bt==null?void 0:Bt[mn])==null?void 0:at.type)==="success"?kn.className="program-fill-success":kn.className="";for(const[mn,kn]of nn.entries())kn.innerHTML=(xt=Bt==null?void 0:Bt[mn])!=null&&xt.score?`${(tn=Bt==null?void 0:Bt[mn])==null?void 0:tn.score}\u5206`:"";Vt(Bt)}catch(nn){console.log(nn,"error")}},[Bt]);const Be=Ke=>{un[Ke.target.dataset.id]=un[Ke.target.dataset.id]||{},un[Ke.target.dataset.id].value=Ke.target.value,Vt([...un]),ht(un,Ke.target.dataset.id)},qe=Ke=>{un[Ke.target.dataset.id]=un[Ke.target.dataset.id]||{},un[Ke.target.dataset.id].value=Ke.target.value,Vt([...un]),it(un,Ke.target.dataset.id)},Qe=Ke=>{un[Ke.target.dataset.id]=un[Ke.target.dataset.id]||{},un[Ke.target.dataset.id].value=Ke.target.value,Vt([...un]),dt(un,Ke.target.dataset.id)};function Ue(Ke,Ze){return Ke.childNodes.forEach(at=>{var xt;if(at.childNodes.length>0)Ue(at,Ze);else if(at.nodeName!=="IMG")if(at.innerHTML)at.innerHTML=(xt=at.innerHTML)==null?void 0:xt.replace(new RegExp(Ze,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const tn=document.createElement("span");tn.innerHTML=at.textContent.replace(new RegExp(Ze,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),at.replaceWith(tn)}})}const Xe=(0,Le.useRef)();Ie.jb.WebkitLineClamp=We,We&&(gt=se(se({},gt),Ie.jb));function Re(Ke){let Ze=Ke.target;if(Ze.tagName.toUpperCase()==="A"){let at=Ze.getAttribute("href");if(at.indexOf("office")>-1)Ke.preventDefault(),vt(at),jt("office");else if(at.indexOf("application/pdf")>-1)Ke.preventDefault(),vt(at),jt("pdf");else if(at.indexOf("text/html")>-1)Ke.preventDefault(),vt(at),jt("html");else if(at.startsWith("#")){Ke.preventDefault();let xt=document.getElementById(at.replace("#",""));xt&&xt.scrollIntoView(!0)}}}const Ae=()=>{var Ke;const Ze=(Ke=Xe.current)==null?void 0:Ke.querySelectorAll("video");Ze==null||Ze.forEach(at=>{if(at.oncontextmenu=()=>!1,at.src.indexOf(".m3u8")>-1&&!at.canPlayType("application/vnd.apple.mpegurl")){if(Ce.ZP.isSupported()){var xt=new Ce.ZP;xt.loadSource(at.src),xt.attachMedia(at)}}})};(0,Le.useEffect)(()=>{if(Xe.current&&ze&&ze.match(we)&&window.PR.prettyPrint(),Xe.current)return Xe.current.addEventListener("click",Re),()=>{var Ke;(Ke=Xe.current)==null||Ke.removeEventListener("click",Re),(0,Ie.AL)(),(0,Ie.Iy)()}},[ze,Xe.current,Re]),(0,Le.useEffect)(()=>{var Ke;const Ze=at=>{at.preventDefault(),at.clipboardData.setData("text",window.getSelection().toString())};return(Ke=Xe.current)==null||Ke.addEventListener("copy",Ze),()=>{var at;(at=Xe.current)==null||at.removeEventListener("copy",Ze)}},[Xe.current]);const Ge=Ke=>/<style[\s\S]*?>/i.test(Ke||"");return Le.createElement(Le.Fragment,null,Je&&Le.createElement("div",{ref:Xe},ze),!Je&&!Ge(ze)&&Le.createElement("div",{ref:Xe,style:se({},gt),className:`${Ve||""} ${ct?"disabled-fill":""} markdown-body ${xn.current}`,dangerouslySetInnerHTML:{__html:ze}}),!Je&&Ge(ze)&&Le.createElement(de,{html:ze}),Le.createElement(ge.Z,{close:!0,data:Et,type:Et!=null&&Et.length?Rt:"",style:se({},ut),onClose:()=>vt("")}))}},7651:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Te}});var Le=Ee(24459),me={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Ie=Ee(59301),Te=({message:Ce,className:_e,children:he,style:Se={}})=>Ie.createElement("div",{className:`custom-spinner ${me.idsRingWrapper} ${_e}`},Ie.createElement("div",{className:me.ldsRing},Ie.createElement("div",null),Ie.createElement("div",null),Ie.createElement("div",null),Ie.createElement("div",null)),Ce?Ie.createElement("p",{style:Se},Ce):null,he,Ie.createElement(Le.Outlet,null))},31582:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Te}});var Le=Ee(59301),me=Ee(50484),Ie=Ee(59301),Te=({defaultX:Ce="40%",leftChild:_e,rightChild:he,className:Se,hideResize:xe=!1})=>{const[ge,ce]=(0,Le.useState)(Ce),ve=(0,Le.useRef)();function de(){ve.current=!0}(0,Le.useEffect)(()=>{function ee(ie){ve.current&&(me.Z.publish("resize-move-bar",ie),ce(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 ue=typeof ge=="number"&&ge!==.01?`${ge}px`:Ce,z=`calc(100% - ${xe?"0px":"4px"} - ${ue})`;return Ie.createElement("div",{className:`split-panel-container ${Se}`},Ie.createElement("section",{style:{width:ue,display:ge===.01?"none":""}},_e),Ie.createElement("section",{className:"resize-x-bar",onMouseDown:de},Ie.createElement("a",{className:"btn-resize"},Ie.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Ie.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"})))),Ie.createElement("section",{style:{width:z}},he))}},75618:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return _e}});var Le=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_"},Ie=Ee(92310),Te=Ee.n(Ie),_e=({className:he,style:Se={},leftNode:xe,leftTitle:ge="\u81EA\u6D4B\u8F93\u5165",rightNode:ce,rightTitle:ve="\u8FD0\u884C\u7ED3\u679C"})=>Le.createElement("div",{className:Te()(me.result,he),style:Se},Le.createElement("div",{className:me.left},Le.createElement("div",{className:me.title},Le.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),Le.createElement("span",null,ge)),Le.createElement("div",{className:me.leftNode},xe)),Le.createElement("div",{className:me.right},Le.createElement("div",{className:me.title},Le.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),Le.createElement("span",null,ve)),Le.createElement("div",{className:me.rightNode},ce)))},46942:function(Pn,qt,Ee){"use strict";var Le=Ee(59301);const me=Te=>String(Te).length===1?`0${Te}`:Te,Ie=({className:Te="",onChange:Ce,defaultValue:_e=0})=>{const[he,Se]=(0,Le.useState)(_e);(0,Le.useEffect)(()=>{const ve=setTimeout(()=>{Se(he+1e3)},1e3);return Ce(he+1e3),()=>{clearInterval(ve)}},[he]);const xe=parseInt(he/(60*6e4))||"00",ge=parseInt(he%(60*6e4)/6e4)||"00",ce=parseInt(he%6e4/1e3)||"00";return Le.createElement("div",{className:Te},me(xe),":",me(ge),":",me(ce))};qt.Z=Ie},71628:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return z}});var Le=Ee(59301),me=Ee(8591),Ie=Ee(38854),Te=Ee(44860),Ce=Ee(40846),_e=Ee(73898),he=Ee(56102),Se=Ee(20736),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,le)=>{var ye=ke=>{try{be(ie.next(ke))}catch(Ne){le(Ne)}},we=ke=>{try{be(ie.throw(ke))}catch(Ne){le(Ne)}},be=ke=>ke.done?se(ke.value):Promise.resolve(ke.value).then(ye,we);be((ie=ie.apply(ee,oe)).next())});function ce(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 ue=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var z=(0,Le.forwardRef)(({allow_skip:ee,src:oe,toLog:ie,videoId:se,logWatchHistory:le,courseId:ye=null,startTime:we,handlePause:be=()=>{},handlePlay:ke=()=>{},handlePlayEnded:Ne=()=>{},autoPlay:je=!1,onPlayEnded:Ve=()=>{},isShowWaterMark:Je=!0},We)=>{var gt;oe=oe==null?void 0:oe.replace("http://","https://");const bt=((gt=oe==null?void 0:oe.split("."))==null?void 0:gt.pop())==="flv",rt=(0,Le.useRef)(),St=(0,Le.useRef)(),ct=(0,Le.useRef)(),Bt=(0,Le.useRef)(),ht=(0,Le.useRef)(),it=(0,Le.useRef)(),dt=(0,Le.useRef)(),yt=(0,Le.useRef)(),Et=(0,Le.useRef)(),vt=(0,Le.useRef)(),Rt=(0,Le.useRef)(),jt=(0,Le.useRef)(),un=(0,Le.useRef)(),Vt=(0,Le.useRef)(),xn=navigator.userAgent.toLowerCase().match(ue),Ut=xn?xn[0]:"pc",Zt=(0,Le.useRef)(!1),Xt=(0,_e.eY)();let mt=0,ze=0,Be=0,qe=null,Qe=!1,Ue=20,Xe=1,Re=!1,Ae=!1,Ge=[];(0,Le.useImperativeHandle)(We,()=>({getLastUpdatedTime:()=>rt.current.currentTime,getDuration:()=>rt.current.duration})),me.ZP.config({maxCount:1,getContainer:()=>ct.current});const Ke=(0,Le.useCallback)((mn,kn=!1)=>{let fn={point:rt.current.currentTime};qe?(fn.log_id=qe,fn.watch_duration=de(Ge),fn.total_duration=ze):(ye?(fn.video_id=parseInt(se,10),fn.course_id=ye):fn.video_id=se,fn.duration=mt,fn.device=Ut),kn&&(fn.ed="1");function Mn(){return ge(this,null,function*(){Re=!0,qe=yield le==null?void 0:le(fn),Re=!1,mn&&mn()})}Mn()},[se,ye]);(0,Le.useEffect)(()=>{rt.current&&(Bt.current.style.display="none",ht.current.style.display="block"),me.ZP.destroy();let mn=null;return Te.Z.isSupported&&bt&&oe&&(oe==null?void 0:oe.indexOf(".m3u8"))<0?(mn=Te.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:oe,muted:!1}),rt.current&&(mn.attachMediaElement(rt.current),mn.load())):rt.current.setAttribute("src",oe),at(),()=>{mn&&(mn.unload(),mn.pause(),mn.destroy(),mn=null)}},[rt,bt,oe]);function Ze(){rt.current.paused?(Bt.current.style.display="none",ht.current.style.display="block"):(Bt.current.style.display="block",ht.current.style.display="none")}function at(){Rt.current.style.display="none",un.current.style.display="none",jt.current.style.display="none",rt.current.muted||rt.current.volume===0?Rt.current.style.display="block":rt.current.volume>0&&rt.current.volume<=.5?un.current.style.display="block":jt.current.style.display="block"}(0,Le.useEffect)(()=>{const mn=document.getElementById("play"),kn=document.querySelectorAll(".playback-icons use");function fn(){ke(),we&&!Zt.current&&(rt.current.currentTime=we),Zt.current=!0,Ge.push(rt.current.currentTime),Qe||(Qe=!0,ie&&Ke())}function Mn(){return ge(this,null,function*(){Ze(),Ge.push(rt.current.currentTime),ie&&Ke(()=>{qe=null,Be=0,Qe=!1,Re=!1,Ae=!1,Ge=[],ze=0,Xe=1},!0),Ve()})}function Zn(){it.current.value=Math.round(rt.current.currentTime),dt.current.value=Math.round(rt.current.currentTime)}function Tn(){const di=ce(Math.round(rt.current.currentTime));Et.current.innerText=`${di.hour>0?di.hour+":":""}${di.minutes}:${di.seconds}`,Et.current.setAttribute("datetime",`${di.hour>0?" "+di.hour+" ":""}${di.minutes}m ${di.seconds}s`)}function ci(){var di,Cr,zi,st,Dr,Mr,xo;const Gr=Math.round((di=rt.current)==null?void 0:di.duration);(zi=(Cr=it.current)==null?void 0:Cr.setAttribute)==null||zi.call(Cr,"max",Gr),(Dr=(st=dt.current)==null?void 0:st.setAttribute)==null||Dr.call(st,"max",Gr);const uo=ce(Gr);yt.current&&(yt.current.innerText=`${uo.hour>0?uo.hour+":":""}${uo.minutes}:${uo.seconds}`,(xo=(Mr=yt.current).setAttribute)==null||xo.call(Mr,"datetime",`${uo.hour>0?" "+uo.hour+" ":""}${uo.minutes}m ${uo.seconds}s`))}function ai(){try{const di=Math.round(rt.current.duration);it.current.setAttribute("max",di),dt.current.setAttribute("max",di);const Cr=ce(di);yt.current.innerText=`${Cr.hour>0?Cr.hour+":":""}${Cr.minutes}:${Cr.seconds}`,yt.current.setAttribute("datetime",`${Cr.hour>0?" "+Cr.hour+" ":""}${Cr.minutes}m ${Cr.seconds}s`),Zn(),Tn();const{width:zi,height:st,x:Dr,y:Mr}=St.current.getBoundingClientRect();if(Dr<0||Mr<0||!zi)return;if(!Ae){let xo=rt.current.currentTime,Gr=xo-Be;Math.abs(Gr)<10?(ze+=Math.abs(Gr),Be=xo,Re||ze-Xe*Ue>=0&&(Xe++,Ge.push(Be),ie&&Ke())):(Be=xo,ie&&Ke())}}catch(di){console.log(di)}}function ki(){Ae=!0}function Ci(){rt.current.playing&&Ge.push(rt.current.currentTime,Be),Be=rt.current.currentTime,Ae=!1}function or(){mt=rt.current.duration,mt<=20&&(Ue=mt/3),rt.current.addEventListener("play",fn)}function tr(di){di.preventDefault(),(0,Se.vp)()?(rt.current.style.width="100%",rt.current.style.height="100%"):rt.current.style.cssText=""}function pr(){be()}function cr(di){if(!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const Cr=di.target.dataset.seek?di.target.dataset.seek:di.target.value;rt.current.currentTime=Cr,dt.current.value=Cr,it.current.value=Cr}function to(di){const Cr=Math.round(di.offsetX/di.target.clientWidth*parseInt(di.target.getAttribute("max"),10));it.current.setAttribute("data-seek",Cr);const zi=ce(Cr);vt.current.textContent=`${zi.hour>0?zi.hour+":":""}${zi.minutes}:${zi.seconds}`;const st=rt.current.getBoundingClientRect();vt.current.style.left=`${di.pageX-st.left}px`}function no(di){switch(di.code){case"Space":di.preventDefault(),nn();break;case"ArrowRight":if(di.preventDefault(),!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(rt.current.currentTime>=rt.current.duration)break;rt.current.currentTime=parseInt(rt.current.currentTime)+5,Zn();break;case"ArrowLeft":if(di.preventDefault(),!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(rt.current.currentTime===0)break;rt.current.currentTime=parseInt(rt.current.currentTime)-5,Zn();break;case"ArrowUp":di.preventDefault(),rt.current.volume<1&&(rt.current.volume=(parseInt(rt.current.volume*10)+1)/10);break;case"ArrowDown":di.preventDefault(),rt.current.volume>0&&(rt.current.volume=(parseInt(rt.current.volume*10)-1)/10);break}}return ct.current.addEventListener((0,Se.gH)(),tr),rt.current.addEventListener("canplay",or),rt.current.addEventListener("ended",Mn),rt.current.addEventListener("seeking",ki),rt.current.addEventListener("seeked",Ci),rt.current.addEventListener("loadedmetadata",ci),it.current.addEventListener("mousemove",to),it.current.addEventListener("input",cr),rt.current.addEventListener("timeupdate",ai),rt.current.addEventListener("pause",pr),rt.current.addEventListener("volumechange",at),document.addEventListener("keydown",no),()=>{var di,Cr,zi,st,Dr,Mr,xo,Gr,uo,Zr,co,cn;(di=rt.current)==null||di.removeEventListener("canplay",or),(Cr=rt.current)==null||Cr.removeEventListener("play",fn),(zi=rt.current)==null||zi.removeEventListener("ended",Mn),(st=rt.current)==null||st.removeEventListener("seeking",ki),(Dr=rt.current)==null||Dr.removeEventListener("seeked",Ci),(Mr=it.current)==null||Mr.removeEventListener("mousemove",to),(xo=it.current)==null||xo.removeEventListener("input",cr),(Gr=rt.current)==null||Gr.removeEventListener("timeupdate",ai),(uo=rt.current)==null||uo.removeEventListener("pause",pr),(Zr=rt.current)==null||Zr.removeEventListener("loadedmetadata",ci),(co=rt.current)==null||co.removeEventListener("volumechange",at),document.removeEventListener("keydown",no),(cn=rt.current)!=null&&cn.playing&&(Ge.push(Be,rt.current.currentTime),ie&&Ke())}},[rt,oe]),(0,Le.useEffect)(()=>{if(rt.current.onended=()=>{Ne(rt)},rt.current.oncontextmenu=()=>!1,(oe==null?void 0:oe.indexOf(".m3u8"))>-1){if(rt.current.canPlayType("application/vnd.apple.mpegurl"))rt.current.src=oe;else if(Ce.ZP.isSupported()){var mn=new Ce.ZP;mn.loadSource(oe),mn.attachMedia(rt.current)}}},[oe]);const[xt,tn]=(0,Le.useState)(1),nn=()=>{rt.current.paused||rt.current.ended?rt.current.play():rt.current.pause(),Ze()};function Jt(){rt.current.muted=!rt.current.muted,rt.current.muted?(Vt.current.setAttribute("data-volume",volume.value),Vt.current.value=0):Vt.current.value=Vt.current.dataset.volume}return Le.createElement("div",{style:{position:"relative"},ref:ct},Le.createElement("div",{ref:St,className:`${xe.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${xe.animate__loop}`},Je&&Xt?Xt.login:" "),Le.createElement("div",{className:xe.container},Le.createElement("div",{className:xe["video-container"],id:"video-container"},Le.createElement("div",{className:xe["playback-animation"],id:"playback-animation"},Le.createElement("svg",{className:xe["playback-icons"]},Le.createElement("use",{className:"hidden",href:"#play-icon"}),Le.createElement("use",{href:"#pause"}))),Le.createElement("video",{className:xe.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:rt,autoPlay:je}),Le.createElement("div",{className:`${xe["video-controls"]} `,id:"video-controls"},Le.createElement("div",{className:xe["bottom-controls"]},Le.createElement("div",{className:xe["left-controls"]},Le.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:nn},Le.createElement("svg",{className:xe["playback-icons"]},Le.createElement("use",{ref:ht,href:"#play-icon"}),Le.createElement("use",{ref:Bt,style:{display:"none"},href:"#pause"}))),Le.createElement("div",{className:xe.time},Le.createElement("time",{id:"time-elapsed",ref:Et},"00:00"),Le.createElement("span",null," / "),Le.createElement("time",{id:"duration",ref:yt},"00:00"))),Le.createElement("div",{className:xe["right-controls"]},ee&&Le.createElement(Ie.Z,{placement:"top",overlayClassName:xe.rateOverlay,getPopupContainer:mn=>mn.parentNode,menu:{items:[{key:"1",label:Le.createElement("span",{onClick:()=>{tn(1),rt.current.playbackRate=1}},"1.0x")},{key:"2",label:Le.createElement("span",{onClick:()=>{tn(1.5),rt.current.playbackRate=1.5}},"1.5x")},{key:"3",label:Le.createElement("span",{onClick:()=>{tn(2),rt.current.playbackRate=2}},"2.0x")}]}},Le.createElement("div",{className:`${xe.controlText} mr5`},"\u500D\u901F")),Le.createElement(he.CopyToClipboard,{text:oe,onCopy:()=>me.ZP.success("\u590D\u5236\u6210\u529F")},Le.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},Le.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),Le.createElement("div",{className:xe["volume-controls"]},Le.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:xe["volume-button"],id:"volume-button",onClick:Jt},Le.createElement("i",{ref:Rt,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),Le.createElement("i",{ref:un,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),Le.createElement("i",{ref:jt,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),Le.createElement("input",{className:xe.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:Vt,style:{display:"none"},onClick:at})),Le.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:xe["fullscreen-button"],onClick:()=>{(0,Se.vp)()?(0,Se.BU)():(0,Se.Dj)(ct.current)}},Le.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),Le.createElement("div",{className:xe["video-progress"]},Le.createElement("progress",{ref:dt,value:"0",min:"0"}),Le.createElement("input",{className:xe.seek,ref:it,value:"0",min:"0",type:"range",step:"1"}),Le.createElement("div",{className:xe["seek-tooltip"],ref:vt,id:"seek-tooltip"},"00:00"))))),Le.createElement("svg",{style:{display:"none"}},Le.createElement("defs",null,Le.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),Le.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},Le.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),Le.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},Le.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"})),Le.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},Le.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"})),Le.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},Le.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"})),Le.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},Le.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"})),Le.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},Le.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"})),Le.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},Le.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"})))))})},85469:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return wn}});var Le=Ee(59301),me=Ee(50484),Ie=Ee(15277),Te=Ee(92310),Ce=Ee.n(Te),_e=Ee(92413),he=Ee(33708),Se=Ee(400),xe=Ee(33606),ge=Ee(39559),ce=Ee(37061),ve=Ee(55468),de=Ee(18929),ue=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],z=Le.createContext(null),ee=0;function oe(Ft,$t){var bn=Le.useState(function(){return ee+=1,String(ee)}),An=(0,xe.Z)(bn,1),Gt=An[0],sn=Le.useContext(z),Bn={data:$t,canPreview:Ft};return Le.useEffect(function(){if(sn)return sn.register(Gt,Bn)},[]),Le.useEffect(function(){sn&&sn.register(Gt,Bn)},[Ft,$t]),Gt}function ie(Ft){return new Promise(function($t){var bn=document.createElement("img");bn.onerror=function(){return $t(!1)},bn.onload=function(){return $t(!0)},bn.src=Ft})}function se(Ft){var $t=Ft.src,bn=Ft.isCustomPlaceholder,An=Ft.fallback,Gt=(0,Le.useState)(bn?"loading":"normal"),sn=(0,xe.Z)(Gt,2),Bn=sn[0],Nn=sn[1],qn=(0,Le.useRef)(!1),Gn=Bn==="error";(0,Le.useEffect)(function(){ie($t).then(function(Mi){Mi||Nn("error")})},[$t]),(0,Le.useEffect)(function(){bn&&!qn.current?Nn("loading"):Gn&&Nn("normal")},[$t]);var Jn=function(){Nn("normal")},Dn=function(Hn){qn.current=!1,Bn==="loading"&&Hn!=null&&Hn.complete&&(Hn.naturalWidth||Hn.naturalHeight)&&(qn.current=!0,Jn())},ri=Gn&&An?{src:An}:{onLoad:Jn,src:$t};return[Dn,ri,Bn]}var le=Ee(86923),ye=Ee(8224),we=Ee(10228),be=Ee(48736);function ke(Ft,$t,bn,An){var Gt=$t+bn,sn=(bn-An)/2;if(bn>An){if($t>0)return(0,Se.Z)({},Ft,sn);if($t<0&&Gt<An)return(0,Se.Z)({},Ft,-sn)}else if($t<0||Gt>An)return(0,Se.Z)({},Ft,$t<0?sn:-sn);return{}}function Ne(Ft,$t,bn,An){var Gt=(0,ve.g1)(),sn=Gt.width,Bn=Gt.height,Nn=null;return Ft<=sn&&$t<=Bn?Nn={x:0,y:0}:(Ft>sn||$t>Bn)&&(Nn=(0,he.Z)((0,he.Z)({},ke("x",bn,Ft,sn)),ke("y",An,$t,Bn))),Nn}var je=Ee(13697),Ve=Ee(16089),Je={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function We(Ft,$t,bn,An){var Gt=(0,Le.useRef)(null),sn=(0,Le.useRef)([]),Bn=(0,Le.useState)(Je),Nn=(0,xe.Z)(Bn,2),qn=Nn[0],Gn=Nn[1],Jn=function(Hn){Gn(Je),An&&!(0,je.Z)(Je,qn)&&An({transform:Je,action:Hn})},Dn=function(Hn,oi){Gt.current===null&&(sn.current=[],Gt.current=(0,Ve.Z)(function(){Gn(function(Bi){var lr=Bi;return sn.current.forEach(function(Ai){lr=(0,he.Z)((0,he.Z)({},lr),Ai)}),Gt.current=null,An==null||An({transform:lr,action:oi}),lr})})),sn.current.push((0,he.Z)((0,he.Z)({},qn),Hn))},ri=function(Hn,oi,Bi,lr){var Ai=Ft.current,an=Ai.width,si=Ai.height,wi=Ai.offsetWidth,pi=Ai.offsetHeight,Wi=Ai.offsetLeft,Ni=Ai.offsetTop,hr=Hn,Fi=qn.scale*Hn;Fi>bn?(hr=bn/qn.scale,Fi=bn):Fi<$t&&(hr=$t/qn.scale,Fi=$t);var Ki=Bi!=null?Bi:innerWidth/2,_r=lr!=null?lr:innerHeight/2,On=hr-1,Jr=On*an*.5,In=On*si*.5,Sr=On*(Ki-qn.x-Wi),fo=On*(_r-qn.y-Ni),Pr=qn.x-(Sr-Jr),Do=qn.y-(fo-In);if(Hn<1&&Fi===1){var ro=wi*Fi,Yi=pi*Fi,er=(0,ve.g1)(),dr=er.width,Tr=er.height;ro<=dr&&Yi<=Tr&&(Pr=0,Do=0)}Dn({x:Pr,y:Do,scale:Fi},oi)};return{transform:qn,resetTransform:Jn,updateTransform:Dn,dispatchZoomChange:ri}}var gt=Ee(43403),ut=Ee(77900),bt=function($t){var bn=$t.visible,An=$t.maskTransitionName,Gt=$t.getContainer,sn=$t.prefixCls,Bn=$t.rootClassName,Nn=$t.icons,qn=$t.countRender,Gn=$t.showSwitch,Jn=$t.showProgress,Dn=$t.current,ri=$t.transform,Mi=$t.count,Hn=$t.scale,oi=$t.minScale,Bi=$t.maxScale,lr=$t.closeIcon,Ai=$t.onSwitchLeft,an=$t.onSwitchRight,si=$t.onClose,wi=$t.onZoomIn,pi=$t.onZoomOut,Wi=$t.onRotateRight,Ni=$t.onRotateLeft,hr=$t.onFlipX,Fi=$t.onFlipY,Ki=$t.toolbarRender,_r=(0,Le.useContext)(z),On=Nn.rotateLeft,Jr=Nn.rotateRight,In=Nn.zoomIn,Sr=Nn.zoomOut,fo=Nn.close,Pr=Nn.left,Do=Nn.right,ro=Nn.flipX,Yi=Nn.flipY,er="".concat(sn,"-operations-operation");Le.useEffect(function(){var Tt=function(Po){Po.keyCode===we.Z.ESC&&si()};return bn&&window.addEventListener("keydown",Tt),function(){window.removeEventListener("keydown",Tt)}},[bn]);var dr=[{icon:Yi,onClick:Fi,type:"flipY"},{icon:ro,onClick:hr,type:"flipX"},{icon:On,onClick:Ni,type:"rotateLeft"},{icon:Jr,onClick:Wi,type:"rotateRight"},{icon:Sr,onClick:pi,type:"zoomOut",disabled:Hn===oi},{icon:In,onClick:wi,type:"zoomIn",disabled:Hn===Bi}],Tr=dr.map(function(Tt){var xr,Po=Tt.icon,Wo=Tt.onClick,Co=Tt.type,qo=Tt.disabled;return Le.createElement("div",{className:Ce()(er,(xr={},(0,Se.Z)(xr,"".concat(sn,"-operations-operation-").concat(Co),!0),(0,Se.Z)(xr,"".concat(sn,"-operations-operation-disabled"),!!qo),xr)),onClick:Wo,key:Co},Po)}),hi=Le.createElement("div",{className:"".concat(sn,"-operations")},Tr);return Le.createElement(ut.default,{visible:bn,motionName:An},function(Tt){var xr=Tt.className,Po=Tt.style;return Le.createElement(gt.Z,{open:!0,getContainer:Gt!=null?Gt:document.body},Le.createElement("div",{className:Ce()("".concat(sn,"-operations-wrapper"),xr,Bn),style:Po},lr===null?null:Le.createElement("button",{className:"".concat(sn,"-close"),onClick:si},lr||fo),Gn&&Le.createElement(Le.Fragment,null,Le.createElement("div",{className:Ce()("".concat(sn,"-switch-left"),(0,Se.Z)({},"".concat(sn,"-switch-left-disabled"),Dn===0)),onClick:Ai},Pr),Le.createElement("div",{className:Ce()("".concat(sn,"-switch-right"),(0,Se.Z)({},"".concat(sn,"-switch-right-disabled"),Dn===Mi-1)),onClick:an},Do)),Le.createElement("div",{className:"".concat(sn,"-footer")},Jn&&Le.createElement("div",{className:"".concat(sn,"-progress")},qn?qn(Dn+1,Mi):"".concat(Dn+1," / ").concat(Mi)),Ki?Ki(hi,(0,he.Z)({icons:{flipYIcon:Tr[0],flipXIcon:Tr[1],rotateLeftIcon:Tr[2],rotateRightIcon:Tr[3],zoomOutIcon:Tr[4],zoomInIcon:Tr[5]},actions:{onFlipY:Fi,onFlipX:hr,onRotateLeft:Ni,onRotateRight:Wi,onZoomOut:pi,onZoomIn:wi},transform:ri},_r?{current:Dn,total:Mi}:{})):hi)))})},rt=bt,St=1,ct=1,Bt=["fallback","src","imgRef"],ht=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],it=function($t){var bn=$t.fallback,An=$t.src,Gt=$t.imgRef,sn=(0,ce.Z)($t,Bt),Bn=se({src:An,fallback:bn}),Nn=(0,xe.Z)(Bn,2),qn=Nn[0],Gn=Nn[1];return Le.createElement("img",(0,_e.Z)({ref:function(Dn){Gt.current=Dn,qn(Dn)}},sn,Gn))},dt=function($t){var bn=$t.prefixCls,An=$t.src,Gt=$t.alt,sn=$t.fallback,Bn=$t.movable,Nn=Bn===void 0?!0:Bn,qn=$t.onClose,Gn=$t.visible,Jn=$t.icons,Dn=Jn===void 0?{}:Jn,ri=$t.rootClassName,Mi=$t.closeIcon,Hn=$t.getContainer,oi=$t.current,Bi=oi===void 0?0:oi,lr=$t.count,Ai=lr===void 0?1:lr,an=$t.countRender,si=$t.scaleStep,wi=si===void 0?.5:si,pi=$t.minScale,Wi=pi===void 0?1:pi,Ni=$t.maxScale,hr=Ni===void 0?50:Ni,Fi=$t.transitionName,Ki=Fi===void 0?"zoom":Fi,_r=$t.maskTransitionName,On=_r===void 0?"fade":_r,Jr=$t.imageRender,In=$t.imgCommonProps,Sr=$t.toolbarRender,fo=$t.onTransform,Pr=$t.onChange,Do=(0,ce.Z)($t,ht),ro=(0,Le.useRef)(),Yi=(0,Le.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),er=(0,Le.useState)(!1),dr=(0,xe.Z)(er,2),Tr=dr[0],hi=dr[1],Tt=(0,Le.useContext)(z),xr=Tt&&Ai>1,Po=Tt&&Ai>=1,Wo=We(ro,Wi,hr,fo),Co=Wo.transform,qo=Wo.resetTransform,Zo=Wo.updateTransform,wr=Wo.dispatchZoomChange,vr=(0,Le.useState)(!0),Qi=(0,xe.Z)(vr,2),Qr=Qi[0],Gi=Qi[1],Ui=Co.rotate,qi=Co.scale,Xn=Co.x,qr=Co.y,_o=Ce()((0,Se.Z)({},"".concat(bn,"-moving"),Tr));(0,Le.useEffect)(function(){Qr||Gi(!0)},[Qr]);var Ko=function(){qo("close")},Eo=function(){wr(St+wi,"zoomIn")},rs=function(){wr(St/(St+wi),"zoomOut")},ms=function(){Zo({rotate:Ui+90},"rotateRight")},Ls=function(){Zo({rotate:Ui-90},"rotateLeft")},ws=function(){Zo({flipX:!Co.flipX},"flipX")},ta=function(){Zo({flipY:!Co.flipY},"flipY")},aa=function(Er){Er==null||Er.preventDefault(),Er==null||Er.stopPropagation(),Bi>0&&(Gi(!1),qo("prev"),Pr==null||Pr(Bi-1,Bi))},Ln=function(Er){Er==null||Er.preventDefault(),Er==null||Er.stopPropagation(),Bi<Ai-1&&(Gi(!1),qo("next"),Pr==null||Pr(Bi+1,Bi))},Os=function(){if(Gn&&Tr){hi(!1);var Er=Yi.current,na=Er.transformX,Rr=Er.transformY,io=Xn!==na&&qr!==Rr;if(!io)return;var Kr=ro.current.offsetWidth*qi,Ei=ro.current.offsetHeight*qi,ls=ro.current.getBoundingClientRect(),Ms=ls.left,ba=ls.top,za=Ui%180!==0,Ja=Ne(za?Ei:Kr,za?Kr:Ei,Ms,ba);Ja&&Zo((0,he.Z)({},Ja),"dragRebound")}},hl=function(Er){!Nn||Er.button!==0||(Er.preventDefault(),Er.stopPropagation(),Yi.current={deltaX:Er.pageX-Co.x,deltaY:Er.pageY-Co.y,transformX:Co.x,transformY:Co.y},hi(!0))},dl=function(Er){Gn&&Tr&&Zo({x:Er.pageX-Yi.current.deltaX,y:Er.pageY-Yi.current.deltaY},"move")},vs=function(Er){if(!(!Gn||Er.deltaY==0)){var na=Math.abs(Er.deltaY/100),Rr=Math.min(na,ct),io=St+Rr*wi;Er.deltaY>0&&(io=St/io),wr(io,"wheel",Er.clientX,Er.clientY)}},ja=function(Er){!Gn||!xr||(Er.keyCode===we.Z.LEFT?aa():Er.keyCode===we.Z.RIGHT&&Ln())},lu=function(Er){Gn&&(qi!==1?Zo({x:0,y:0,scale:1},"doubleClick"):wr(St+wi,"doubleClick",Er.clientX,Er.clientY))};(0,Le.useEffect)(function(){var ho,Er,na,Rr;if(Nn){na=(0,ye.Z)(window,"mouseup",Os,!1),Rr=(0,ye.Z)(window,"mousemove",dl,!1);try{window.top!==window.self&&(ho=(0,ye.Z)(window.top,"mouseup",Os,!1),Er=(0,ye.Z)(window.top,"mousemove",dl,!1))}catch(io){(0,be.Kp)(!1,"[rc-image] ".concat(io))}}return function(){var io,Kr,Ei,ls;(io=na)===null||io===void 0||io.remove(),(Kr=Rr)===null||Kr===void 0||Kr.remove(),(Ei=ho)===null||Ei===void 0||Ei.remove(),(ls=Er)===null||ls===void 0||ls.remove()}},[Gn,Tr,Xn,qr,Ui,Nn]),(0,Le.useEffect)(function(){var ho=(0,ye.Z)(window,"keydown",ja,!1);return function(){ho.remove()}},[Gn,xr,Bi]);var Vl=Le.createElement(it,(0,_e.Z)({},In,{width:$t.width,height:$t.height,imgRef:ro,className:"".concat(bn,"-img"),alt:Gt,style:{transform:"translate3d(".concat(Co.x,"px, ").concat(Co.y,"px, 0) scale3d(").concat(Co.flipX?"-":"").concat(qi,", ").concat(Co.flipY?"-":"").concat(qi,", 1) rotate(").concat(Ui,"deg)"),transitionDuration:!Qr&&"0s"},fallback:sn,src:An,onWheel:vs,onMouseDown:hl,onDoubleClick:lu}));return Le.createElement(Le.Fragment,null,Le.createElement(le.Z,(0,_e.Z)({transitionName:Ki,maskTransitionName:On,closable:!1,keyboard:!0,prefixCls:bn,onClose:qn,visible:Gn,wrapClassName:_o,rootClassName:ri,getContainer:Hn},Do,{afterClose:Ko}),Le.createElement("div",{className:"".concat(bn,"-img-wrapper")},Jr?Jr(Vl,(0,he.Z)({transform:Co},Tt?{current:Bi}:{})):Vl)),Le.createElement(rt,{visible:Gn,transform:Co,maskTransitionName:On,closeIcon:Mi,getContainer:Hn,prefixCls:bn,rootClassName:ri,icons:Dn,countRender:an,showSwitch:xr,showProgress:Po,current:Bi,count:Ai,scale:qi,minScale:Wi,maxScale:hr,toolbarRender:Sr,onSwitchLeft:aa,onSwitchRight:Ln,onZoomIn:Eo,onZoomOut:rs,onRotateRight:ms,onRotateLeft:Ls,onFlipX:ws,onFlipY:ta,onClose:qn}))},yt=dt,Et=Ee(26407);function vt(Ft){var $t=Le.useState({}),bn=(0,xe.Z)($t,2),An=bn[0],Gt=bn[1],sn=Le.useCallback(function(Nn,qn){return Gt(function(Gn){return(0,he.Z)((0,he.Z)({},Gn),{},(0,Se.Z)({},Nn,qn))}),function(){Gt(function(Gn){var Jn=(0,he.Z)({},Gn);return delete Jn[Nn],Jn})}},[]),Bn=Le.useMemo(function(){return Ft?Ft.map(function(Nn){if(typeof Nn=="string")return{data:{src:Nn}};var qn={};return Object.keys(Nn).forEach(function(Gn){["src"].concat((0,Et.Z)(ue)).includes(Gn)&&(qn[Gn]=Nn[Gn])}),{data:qn}}):Object.keys(An).reduce(function(Nn,qn){var Gn=An[qn],Jn=Gn.canPreview,Dn=Gn.data;return Jn&&Nn.push({data:Dn,id:qn}),Nn},[])},[Ft,An]);return[Bn,sn]}var Rt=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],jt=["src"],un=function($t){var bn,An=$t.previewPrefixCls,Gt=An===void 0?"rc-image-preview":An,sn=$t.children,Bn=$t.icons,Nn=Bn===void 0?{}:Bn,qn=$t.items,Gn=$t.preview,Jn=$t.fallback,Dn=(0,ge.Z)(Gn)==="object"?Gn:{},ri=Dn.visible,Mi=Dn.onVisibleChange,Hn=Dn.getContainer,oi=Dn.current,Bi=Dn.movable,lr=Dn.minScale,Ai=Dn.maxScale,an=Dn.countRender,si=Dn.closeIcon,wi=Dn.onChange,pi=Dn.onTransform,Wi=Dn.toolbarRender,Ni=Dn.imageRender,hr=(0,ce.Z)(Dn,Rt),Fi=vt(qn),Ki=(0,xe.Z)(Fi,2),_r=Ki[0],On=Ki[1],Jr=(0,de.Z)(0,{value:oi}),In=(0,xe.Z)(Jr,2),Sr=In[0],fo=In[1],Pr=(0,Le.useState)(!1),Do=(0,xe.Z)(Pr,2),ro=Do[0],Yi=Do[1],er=((bn=_r[Sr])===null||bn===void 0?void 0:bn.data)||{},dr=er.src,Tr=(0,ce.Z)(er,jt),hi=(0,de.Z)(!!ri,{value:ri,onChange:function(Ui,qi){Mi==null||Mi(Ui,qi,Sr)}}),Tt=(0,xe.Z)(hi,2),xr=Tt[0],Po=Tt[1],Wo=(0,Le.useState)(null),Co=(0,xe.Z)(Wo,2),qo=Co[0],Zo=Co[1],wr=Le.useCallback(function(Gi,Ui,qi){var Xn=_r.findIndex(function(qr){return qr.id===Gi});Po(!0),Zo({x:Ui,y:qi}),fo(Xn<0?0:Xn),Yi(!0)},[_r]);Le.useEffect(function(){xr?ro||fo(0):Yi(!1)},[xr]);var vr=function(Ui,qi){fo(Ui),wi==null||wi(Ui,qi)},Qi=function(){Po(!1),Zo(null)},Qr=Le.useMemo(function(){return{register:On,onPreview:wr}},[On,wr]);return Le.createElement(z.Provider,{value:Qr},sn,Le.createElement(yt,(0,_e.Z)({"aria-hidden":!xr,movable:Bi,visible:xr,prefixCls:Gt,closeIcon:si,onClose:Qi,mousePosition:qo,imgCommonProps:Tr,src:dr,fallback:Jn,icons:Nn,minScale:lr,maxScale:Ai,getContainer:Hn,current:Sr,count:_r.length,countRender:an,onTransform:pi,toolbarRender:Wi,imageRender:Ni,onChange:vr},hr)))},Vt=un,xn=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Ut=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Zt=function($t){var bn=$t.src,An=$t.alt,Gt=$t.onPreviewClose,sn=$t.prefixCls,Bn=sn===void 0?"rc-image":sn,Nn=$t.previewPrefixCls,qn=Nn===void 0?"".concat(Bn,"-preview"):Nn,Gn=$t.placeholder,Jn=$t.fallback,Dn=$t.width,ri=$t.height,Mi=$t.style,Hn=$t.preview,oi=Hn===void 0?!0:Hn,Bi=$t.className,lr=$t.onClick,Ai=$t.onError,an=$t.wrapperClassName,si=$t.wrapperStyle,wi=$t.rootClassName,pi=(0,ce.Z)($t,xn),Wi=Gn&&Gn!==!0,Ni=(0,ge.Z)(oi)==="object"?oi:{},hr=Ni.src,Fi=Ni.visible,Ki=Fi===void 0?void 0:Fi,_r=Ni.onVisibleChange,On=_r===void 0?Gt:_r,Jr=Ni.getContainer,In=Jr===void 0?void 0:Jr,Sr=Ni.mask,fo=Ni.maskClassName,Pr=Ni.movable,Do=Ni.icons,ro=Ni.scaleStep,Yi=Ni.minScale,er=Ni.maxScale,dr=Ni.imageRender,Tr=Ni.toolbarRender,hi=(0,ce.Z)(Ni,Ut),Tt=hr!=null?hr:bn,xr=(0,de.Z)(!!Ki,{value:Ki,onChange:On}),Po=(0,xe.Z)(xr,2),Wo=Po[0],Co=Po[1],qo=se({src:bn,isCustomPlaceholder:Wi,fallback:Jn}),Zo=(0,xe.Z)(qo,3),wr=Zo[0],vr=Zo[1],Qi=Zo[2],Qr=(0,Le.useState)(null),Gi=(0,xe.Z)(Qr,2),Ui=Gi[0],qi=Gi[1],Xn=(0,Le.useContext)(z),qr=!!oi,_o=function(){Co(!1),qi(null)},Ko=Ce()(Bn,an,wi,(0,Se.Z)({},"".concat(Bn,"-error"),Qi==="error")),Eo=(0,Le.useMemo)(function(){var ws={};return ue.forEach(function(ta){$t[ta]!==void 0&&(ws[ta]=$t[ta])}),ws},ue.map(function(ws){return $t[ws]})),rs=(0,Le.useMemo)(function(){return(0,he.Z)((0,he.Z)({},Eo),{},{src:Tt})},[Tt,Eo]),ms=oe(qr,rs),Ls=function(ta){var aa=(0,ve.os)(ta.target),Ln=aa.left,Os=aa.top;Xn?Xn.onPreview(ms,Ln,Os):(qi({x:Ln,y:Os}),Co(!0)),lr==null||lr(ta)};return Le.createElement(Le.Fragment,null,Le.createElement("div",(0,_e.Z)({},pi,{className:Ko,onClick:qr?Ls:lr,style:(0,he.Z)({width:Dn,height:ri},si)}),Le.createElement("img",(0,_e.Z)({},Eo,{className:Ce()("".concat(Bn,"-img"),(0,Se.Z)({},"".concat(Bn,"-img-placeholder"),Gn===!0),Bi),style:(0,he.Z)({height:ri},Mi),ref:wr},vr,{width:Dn,height:ri,onError:Ai})),Qi==="loading"&&Le.createElement("div",{"aria-hidden":"true",className:"".concat(Bn,"-placeholder")},Gn),Sr&&qr&&Le.createElement("div",{className:Ce()("".concat(Bn,"-mask"),fo),style:{display:(Mi==null?void 0:Mi.display)==="none"?"none":void 0}},Sr)),!Xn&&qr&&Le.createElement(yt,(0,_e.Z)({"aria-hidden":!Wo,visible:Wo,prefixCls:qn,onClose:_o,mousePosition:Ui,src:Tt,alt:An,fallback:Jn,getContainer:In,icons:Do,movable:Pr,scaleStep:ro,minScale:Yi,maxScale:er,rootClassName:wi,imageRender:dr,imgCommonProps:Eo,toolbarRender:Tr},hi)))};Zt.PreviewGroup=Vt,Zt.displayName="Image";var Xt=Zt,mt=Xt,ze=Ee(62892),Be=Ee(36355),qe=Ee(31724),Qe=Ee(99267),Ue=Ee(33853),Xe=Ee(38819),Re={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"},Ae=Re,Ge=Ee(7657),Ke=function($t,bn){return Le.createElement(Ge.Z,(0,_e.Z)({},$t,{ref:bn,icon:Ae}))},Ze=Le.forwardRef(Ke),at=Ze,xt={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"},tn=xt,nn=function($t,bn){return Le.createElement(Ge.Z,(0,_e.Z)({},$t,{ref:bn,icon:tn}))},Jt=Le.forwardRef(nn),mn=Jt,kn={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"},fn=kn,Mn=function($t,bn){return Le.createElement(Ge.Z,(0,_e.Z)({},$t,{ref:bn,icon:fn}))},Zn=Le.forwardRef(Mn),Tn=Zn,ci={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"},ai=ci,ki=function($t,bn){return Le.createElement(Ge.Z,(0,_e.Z)({},$t,{ref:bn,icon:ai}))},Ci=Le.forwardRef(ki),or=Ci,tr={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"},pr=tr,cr=function($t,bn){return Le.createElement(Ge.Z,(0,_e.Z)({},$t,{ref:bn,icon:pr}))},to=Le.forwardRef(cr),no=to,di=Ee(64993),Cr=Ee(73819),zi=Ee(17313),st=Ee(29878),Dr=Ee(1950),Mr=Ee(83116),xo=Ee(37613);const Gr=Ft=>({position:Ft||"absolute",inset:0}),uo=Ft=>{const{iconCls:$t,motionDurationSlow:bn,paddingXXS:An,marginXXS:Gt,prefixCls:sn,colorTextLightSolid:Bn}=Ft;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:Bn,background:new di.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${bn}`,[`.${sn}-mask-info`]:Object.assign(Object.assign({},zi.vS),{padding:`0 ${An}px`,[$t]:{marginInlineEnd:Gt,svg:{verticalAlign:"baseline"}}})}},Zr=Ft=>{const{previewCls:$t,modalMaskBg:bn,paddingSM:An,marginXL:Gt,margin:sn,paddingLG:Bn,previewOperationColorDisabled:Nn,previewOperationHoverColor:qn,motionDurationSlow:Gn,iconCls:Jn,colorTextLightSolid:Dn}=Ft,ri=new di.C(bn).setAlpha(.1),Mi=ri.clone().setAlpha(.2);return{[`${$t}-footer`]:{position:"fixed",bottom:Gt,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:Ft.previewOperationColor},[`${$t}-progress`]:{marginBottom:sn},[`${$t}-close`]:{position:"fixed",top:Gt,right:{_skip_check_:!0,value:Gt},display:"flex",color:Dn,backgroundColor:ri.toRgbString(),borderRadius:"50%",padding:An,outline:0,border:0,cursor:"pointer",transition:`all ${Gn}`,"&:hover":{backgroundColor:Mi.toRgbString()},[`& > ${Jn}`]:{fontSize:Ft.previewOperationSize}},[`${$t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${Bn}px`,backgroundColor:ri.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:An,padding:An,cursor:"pointer",transition:`all ${Gn}`,userSelect:"none",[`&:not(${$t}-operations-operation-disabled):hover > ${Jn}`]:{color:qn},"&-disabled":{color:Nn,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${Jn}`]:{fontSize:Ft.previewOperationSize}}}}},co=Ft=>{const{modalMaskBg:$t,iconCls:bn,previewOperationColorDisabled:An,previewCls:Gt,zIndexPopup:sn,motionDurationSlow:Bn}=Ft,Nn=new di.C($t).setAlpha(.1),qn=Nn.clone().setAlpha(.2);return{[`${Gt}-switch-left, ${Gt}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:sn+1,display:"flex",alignItems:"center",justifyContent:"center",width:Ft.imagePreviewSwitchSize,height:Ft.imagePreviewSwitchSize,marginTop:-Ft.imagePreviewSwitchSize/2,color:Ft.previewOperationColor,background:Nn.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${Bn}`,userSelect:"none","&:hover":{background:qn.toRgbString()},"&-disabled":{"&, &:hover":{color:An,background:"transparent",cursor:"not-allowed",[`> ${bn}`]:{cursor:"not-allowed"}}},[`> ${bn}`]:{fontSize:Ft.previewOperationSize}},[`${Gt}-switch-left`]:{insetInlineStart:Ft.marginSM},[`${Gt}-switch-right`]:{insetInlineEnd:Ft.marginSM}}},cn=Ft=>{const{motionEaseOut:$t,previewCls:bn,motionDurationSlow:An,componentCls:Gt}=Ft;return[{[`${Gt}-preview-root`]:{[bn]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${bn}-body`]:Object.assign(Object.assign({},Gr()),{overflow:"hidden"}),[`${bn}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${An} ${$t} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},Gr()),{transition:`transform ${An} ${$t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${bn}-moving`]:{[`${bn}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${Gt}-preview-root`]:{[`${bn}-wrap`]:{zIndex:Ft.zIndexPopup}}},{[`${Gt}-preview-operations-wrapper`]:{position:"fixed",zIndex:Ft.zIndexPopup+1},"&":[Zr(Ft),co(Ft)]}]},$e=Ft=>{const{componentCls:$t}=Ft;return{[$t]:{position:"relative",display:"inline-block",[`${$t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${$t}-img-placeholder`]:{backgroundColor:Ft.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${$t}-mask`]:Object.assign({},uo(Ft)),[`${$t}-mask:hover`]:{opacity:1},[`${$t}-placeholder`]:Object.assign({},Gr())}}},tt=Ft=>{const{previewCls:$t}=Ft;return{[`${$t}-root`]:(0,st._y)(Ft,"zoom"),"&":(0,Dr.J$)(Ft,!0)}};var et=(0,Mr.Z)("Image",Ft=>{const $t=`${Ft.componentCls}-preview`,bn=(0,xo.TS)(Ft,{previewCls:$t,modalMaskBg:new di.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:Ft.controlHeightLG});return[$e(bn),cn(bn),(0,Cr.QA)((0,xo.TS)(bn,{componentCls:$t})),tt(bn)]},Ft=>({zIndexPopup:Ft.zIndexPopupBase+80,previewOperationColor:new di.C(Ft.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new di.C(Ft.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new di.C(Ft.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:Ft.fontSizeIcon*1.5})),Pt=function(Ft,$t){var bn={};for(var An in Ft)Object.prototype.hasOwnProperty.call(Ft,An)&&$t.indexOf(An)<0&&(bn[An]=Ft[An]);if(Ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,An=Object.getOwnPropertySymbols(Ft);Gt<An.length;Gt++)$t.indexOf(An[Gt])<0&&Object.prototype.propertyIsEnumerable.call(Ft,An[Gt])&&(bn[An[Gt]]=Ft[An[Gt]]);return bn};const At={rotateLeft:Le.createElement(at,null),rotateRight:Le.createElement(mn,null),zoomIn:Le.createElement(or,null),zoomOut:Le.createElement(no,null),close:Le.createElement(Qe.Z,null),left:Le.createElement(Ue.Z,null),right:Le.createElement(Xe.Z,null),flipX:Le.createElement(Tn,null),flipY:Le.createElement(Tn,{rotate:90})};var Ct=Ft=>{var{previewPrefixCls:$t,preview:bn}=Ft,An=Pt(Ft,["previewPrefixCls","preview"]);const{getPrefixCls:Gt}=Le.useContext(Be.E_),sn=Gt("image",$t),Bn=`${sn}-preview`,Nn=Gt(),[qn,Gn]=et(sn),Jn=Le.useMemo(()=>{var Dn;if(bn===!1)return bn;const ri=typeof bn=="object"?bn:{},Mi=Ce()(Gn,(Dn=ri.rootClassName)!==null&&Dn!==void 0?Dn:"");return Object.assign(Object.assign({},ri),{transitionName:(0,ze.m)(Nn,"zoom",ri.transitionName),maskTransitionName:(0,ze.m)(Nn,"fade",ri.maskTransitionName),rootClassName:Mi})},[bn]);return qn(Le.createElement(mt.PreviewGroup,Object.assign({preview:Jn,previewPrefixCls:Bn,icons:At},An)))},dn=function(Ft,$t){var bn={};for(var An in Ft)Object.prototype.hasOwnProperty.call(Ft,An)&&$t.indexOf(An)<0&&(bn[An]=Ft[An]);if(Ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,An=Object.getOwnPropertySymbols(Ft);Gt<An.length;Gt++)$t.indexOf(An[Gt])<0&&Object.prototype.propertyIsEnumerable.call(Ft,An[Gt])&&(bn[An[Gt]]=Ft[An[Gt]]);return bn};const _n=Ft=>{const{prefixCls:$t,preview:bn,className:An,rootClassName:Gt,style:sn}=Ft,Bn=dn(Ft,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:Nn,locale:qn=qe.Z,getPopupContainer:Gn,image:Jn}=Le.useContext(Be.E_),Dn=Nn("image",$t),ri=Nn(),Mi=qn.Image||qe.Z.Image,[Hn,oi]=et(Dn),Bi=Ce()(Gt,oi),lr=Ce()(An,oi,Jn==null?void 0:Jn.className),Ai=Le.useMemo(()=>{if(bn===!1)return bn;const si=typeof bn=="object"?bn:{},{getContainer:wi}=si,pi=dn(si,["getContainer"]);return Object.assign(Object.assign({mask:Le.createElement("div",{className:`${Dn}-mask-info`},Le.createElement(Ie.Z,null),Mi==null?void 0:Mi.preview),icons:At},pi),{getContainer:wi||Gn,transitionName:(0,ze.m)(ri,"zoom",si.transitionName),maskTransitionName:(0,ze.m)(ri,"fade",si.maskTransitionName)})},[bn,Mi]),an=Object.assign(Object.assign({},Jn==null?void 0:Jn.style),sn);return Hn(Le.createElement(mt,Object.assign({prefixCls:Dn,preview:Ai,rootClassName:Bi,className:lr,style:an},Bn)))};_n.PreviewGroup=Ct;var zn=_n,wn=()=>{const[Ft,$t]=(0,Le.useState)(""),[bn,An]=(0,Le.useState)(0);let[Gt,sn]=(0,Le.useState)(),[Bn,Nn]=(0,Le.useState)();const[qn,Gn]=(0,Le.useState)(!1),Jn=(0,Le.useRef)("");(0,Le.useEffect)(()=>me.Z.subscribe("preview-image",wi=>{$t(wi),console.log(Ai.current),document.body.style.overflow="hidden"}),[]),(0,Le.useEffect)(()=>(document.addEventListener("keydown",Dn),()=>{document.removeEventListener("keydown",Dn)}),[]),(0,Le.useEffect)(()=>{Jn.current=Ft},[Ft]);function Dn(si){si.keyCode==27&&Jn.current&&ri()}function ri(){document.body.style.overflow="auto",sn(void 0),Nn(void 0),An(0),$t("")}function Mi(){An(bn+90)}function Hn(){Gt=Ai.current.width*1.1,Bn=Ai.current.height*1.1,Nn(Bn),sn(Gt)}function oi(){Gt=Ai.current.width/1.1,Bn=Ai.current.height/1.1,Nn(Bn),sn(Gt)}const Bi=(0,Le.useRef)(),lr=(0,Le.useRef)(),Ai=(0,Le.useRef)(),an=si=>{(si.nativeEvent.target===Bi.current||si.nativeEvent.target===lr.current)&&ri()};return Le.createElement(Le.Fragment,null,Ft?Le.createElement("div",null,Le.createElement("div",{className:"preview-wrp-group",ref:lr},Le.createElement(zn,{className:"image-preview",src:Ft,style:{display:"none"},preview:{visible:!0,src:Ft,movable:!1,onVisibleChange:si=>{$t("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},73278:function(Pn,qt,Ee){"use strict";Ee.d(qt,{h:function(){return ye}});var Le=Ee(59301),me=Ee(57809),Ie=Ee(78241),Te=Ee(3113),Ce=Ee(89780),_e=Ee.n(Ce),he=Ee(78780),Se=Ee(19136),xe=Object.defineProperty,ge=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,z=(we,be,ke)=>be in we?xe(we,be,{enumerable:!0,configurable:!0,writable:!0,value:ke}):we[be]=ke,ee=(we,be)=>{for(var ke in be||(be={}))de.call(be,ke)&&z(we,ke,be[ke]);if(ve)for(var ke of ve(be))ue.call(be,ke)&&z(we,ke,be[ke]);return we},oe=(we,be)=>ge(we,ce(be));const ie=me.default.Option,se={labelCol:{span:4},wrapperCol:{span:20}},le={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"]};qt.Z=({callback:we,onCancel:be})=>{const[ke,Ne]=(0,Le.useState)("python");function je(Je){Ne(le[Je][1])}function Ve(Je){we(Je)}return Le.createElement(Ie.default,oe(ee({},se),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ve,style:{width:500}}),Le.createElement(Ie.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Le.createElement(me.default,{getPopupContainer:Je=>Je.parentNode,onChange:je},Object.keys(le).map(Je=>Le.createElement(ie,{key:Je,value:Je},le[Je][0])))),Le.createElement(Ie.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Le.createElement(ye,{mode:ke})),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement(Te.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(Te.ZP,{type:"ghost",onClick:be},"\u53D6\u6D88")))};function ye({value:we,onChange:be,mode:ke,options:Ne={}}){const je=(0,Le.useRef)(),[Ve,Je]=(0,Le.useState)();return(0,Le.useEffect)(()=>{if(Ve){let We=function(gt){const ut=gt.getValue();be&&be(ut)};return Ve.on("change",We),()=>{Ve.off("change",We)}}},[Ve,be]),(0,Le.useEffect)(()=>{Ve&&Ve.setOption("mode",ke)},[Ve,ke]),(0,Le.useEffect)(()=>{Ve&&(we!==Ve.getValue()||we==="")&&setTimeout(()=>{Ve.setValue(we||"")},300)},[Ve,we]),(0,Le.useEffect)(()=>{if(je.current&&!Ve){const We=_e().fromTextArea(je.current,ee({mode:ke,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ne));Je(We)}},[je.current,Ve]),Le.createElement("div",{className:"my-codemirror-container"},Le.createElement("textarea",{ref:je}))}},64726:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return co}});var Le=Ee(59301),me=Ee(89780),Ie=Ee.n(me),Te=Ee(76374),Ce=Ee(78780),_e=Ee(6313),he=Ee(25717),Se=Ee(99498),xe=Ee(25419),ge=Ee(67549),ce=Ee(99325),ve=({value:cn="",className:$e,showTextOnly:tt,showLines:et,style:Pt={}})=>{const At=(0,Le.useMemo)(()=>"",[cn]);return Le.createElement(Le.Fragment,null,Le.createElement("div",{dangerouslySetInnerHTML:{__html:At}}))},de=Ee(59301),ue=Object.defineProperty,z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,le=(cn,$e,tt)=>$e in cn?ue(cn,$e,{enumerable:!0,configurable:!0,writable:!0,value:tt}):cn[$e]=tt,ye=(cn,$e)=>{for(var tt in $e||($e={}))ie.call($e,tt)&&le(cn,tt,$e[tt]);if(oe)for(var tt of oe($e))se.call($e,tt)&&le(cn,tt,$e[tt]);return cn},we=(cn,$e)=>z(cn,ee($e));let be=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function ke({onActionCallback:cn,title:$e,icon:tt,actionName:et,className:Pt="",children:At}){function kt(){cn(et)}return de.createElement("a",{title:$e,className:Pt,onClick:kt},de.createElement("i",{className:`${tt}`}),At)}var Ne=({watch:cn,showNullButton:$e,showNullProgramButton:tt,onActionCallback:et,fullScreen:Pt,insertTemp:At,hidetoolBar:kt,extraUse:Ct})=>{const dn=[...be,{title:`${cn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${cn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return de.createElement("ul",{className:"markdown-toolbar-container"},!kt&&dn.map((_n,zn)=>de.createElement("li",{key:zn},_n.actionName?de.createElement(ke,we(ye({},_n),{onActionCallback:et})):de.createElement("span",{className:"v-line"}))),$e?de.createElement("li",null,de.createElement(ke,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:et},de.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,tt?de.createElement(de.Fragment,null,de.createElement("li",null,de.createElement(ke,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:et},de.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),de.createElement("li",null,de.createElement(ke,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:et},de.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,At&&de.createElement("li",null,de.createElement(ke,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${At}`,onActionCallback:et},de.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ct&&de.createElement("li",null,Ct),de.createElement("li",{className:"btn-full-screen"},de.createElement(ke,{icon:`${Pt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Pt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:et})))},je=Ee(19647),Ve=Ee(78241),Je=Ee(92832),We=Ee(3113),gt=Object.defineProperty,ut=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,Bt=(cn,$e,tt)=>$e in cn?gt(cn,$e,{enumerable:!0,configurable:!0,writable:!0,value:tt}):cn[$e]=tt,ht=(cn,$e)=>{for(var tt in $e||($e={}))St.call($e,tt)&&Bt(cn,tt,$e[tt]);if(rt)for(var tt of rt($e))ct.call($e,tt)&&Bt(cn,tt,$e[tt]);return cn},it=(cn,$e)=>ut(cn,bt($e));const dt={labelCol:{span:4},wrapperCol:{span:20}};var yt=({callback:cn,onCancel:$e})=>{function tt(et){cn(et)}return Le.createElement(Ve.default,it(ht({},dt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:tt,style:{width:500}}),Le.createElement(Ve.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Le.createElement(Je.default,null)),Le.createElement(Ve.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Le.createElement(Je.default,null)),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(We.ZP,{type:"ghost",onClick:$e},"\u53D6\u6D88")))},Et=Ee(73278),vt=Ee(56030),Rt=Ee(43418),jt=Ee(95237),un=Ee(14573),Vt=Ee(59301),xn=({callback:cn,onCancel:$e})=>{const tt=document.createElement("canvas"),et=tt.getContext("2d");tt.width=1e3,tt.height=800,et.fillStyle="#ffffff",et.fillRect(0,0,tt.width,tt.height);const Pt=tt.toDataURL("image/png");return Vt.createElement(Rt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Vt.createElement(jt.Z,{style:{height:"100vh"}},Vt.createElement(un.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Pt,visible:!0,title:String(Date.now())},onOk:At=>{cn({src:At.url})},onClose:$e})))},Ut=Ee(12378);function Zt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Zt,go.CommandHandler),Zt.prototype.canAlignSelection=function(){var cn=this.diagram;return!(cn===null||cn.isReadOnly||cn.isModelReadOnly||cn.selection.count<2)},Zt.prototype.alignLeft=function(){var cn=this.diagram;cn.startTransaction("aligning left");var $e=1/0;cn.selection.each(function(tt){tt instanceof go.Link||($e=Math.min(tt.position.x,$e))}),cn.selection.each(function(tt){tt instanceof go.Link||tt.move(new go.Point($e,tt.position.y))}),cn.commitTransaction("aligning left")},Zt.prototype.alignRight=function(){var cn=this.diagram;cn.startTransaction("aligning right");var $e=-1/0;cn.selection.each(function(tt){if(!(tt instanceof go.Link)){var et=tt.actualBounds.x+tt.actualBounds.width;$e=Math.max(et,$e)}}),cn.selection.each(function(tt){tt instanceof go.Link||tt.move(new go.Point($e-tt.actualBounds.width,tt.position.y))}),cn.commitTransaction("aligning right")},Zt.prototype.alignTop=function(){var cn=this.diagram;cn.startTransaction("alignTop");var $e=1/0;cn.selection.each(function(tt){tt instanceof go.Link||($e=Math.min(tt.position.y,$e))}),cn.selection.each(function(tt){tt instanceof go.Link||tt.move(new go.Point(tt.position.x,$e))}),cn.commitTransaction("alignTop")},Zt.prototype.alignBottom=function(){var cn=this.diagram;cn.startTransaction("aligning bottom");var $e=-1/0;cn.selection.each(function(tt){if(!(tt instanceof go.Link)){var et=tt.actualBounds.y+tt.actualBounds.height;$e=Math.max(et,$e)}}),cn.selection.each(function(tt){tt instanceof go.Link||tt.move(new go.Point(tt.actualBounds.x,$e-tt.actualBounds.height))}),cn.commitTransaction("aligning bottom")},Zt.prototype.alignCenterX=function(){var cn=this.diagram,$e=cn.selection.first();if($e){cn.startTransaction("aligning Center X");var tt=$e.actualBounds.x+$e.actualBounds.width/2;cn.selection.each(function(et){et instanceof go.Link||et.move(new go.Point(tt-et.actualBounds.width/2,et.actualBounds.y))}),cn.commitTransaction("aligning Center X")}},Zt.prototype.alignCenterY=function(){var cn=this.diagram,$e=cn.selection.first();if($e){cn.startTransaction("aligning Center Y");var tt=$e.actualBounds.y+$e.actualBounds.height/2;cn.selection.each(function(et){et instanceof go.Link||et.move(new go.Point(et.actualBounds.x,tt-et.actualBounds.height/2))}),cn.commitTransaction("aligning Center Y")}},Zt.prototype.alignColumn=function(cn){var $e=this.diagram;$e.startTransaction("align Column"),cn===void 0&&(cn=0),cn=parseFloat(cn);var tt=new Array;$e.selection.each(function(Ct){Ct instanceof go.Link||tt.push(Ct)});for(var et=0;et<tt.length-1;et++){var Pt=tt[et],At=Pt.actualBounds.y+Pt.actualBounds.height+cn,kt=tt[et+1];kt.move(new go.Point(Pt.actualBounds.x,At))}$e.commitTransaction("align Column")},Zt.prototype.alignRow=function(cn){cn===void 0&&(cn=0),cn=parseFloat(cn);var $e=this.diagram;$e.startTransaction("align Row");var tt=new Array;$e.selection.each(function(Ct){Ct instanceof go.Link||tt.push(Ct)});for(var et=0;et<tt.length-1;et++){var Pt=tt[et],At=Pt.actualBounds.x+Pt.actualBounds.width+cn,kt=tt[et+1];kt.move(new go.Point(At,Pt.actualBounds.y))}$e.commitTransaction("align Row")},Zt.prototype.canRotate=function(cn){var $e=this.diagram;return!($e===null||$e.isReadOnly||$e.isModelReadOnly||$e.selection.count<1)},Zt.prototype.rotate=function(cn){cn===void 0&&(cn=90);var $e=this.diagram;$e.startTransaction("rotate "+cn.toString());var $e=this.diagram;$e.selection.each(function(tt){tt instanceof go.Link||tt instanceof go.Group||(tt.angle+=cn)}),$e.commitTransaction("rotate "+cn.toString())},Zt.prototype.pullToFront=function(){var cn=this.diagram;cn.startTransaction("pullToFront");var $e=new go.Map;cn.selection.each(function(tt){$e.set(tt.layer,0)}),$e.iteratorKeys.each(function(tt){var et=0;tt.parts.each(function(Pt){if(!Pt.isSelected){var At=Pt.zOrder;isNaN(At)?Pt.zOrder=0:et=Math.max(et,At)}}),$e.set(tt,et)}),cn.selection.each(function(tt){Zt._assignZOrder(tt,$e.get(tt.layer)+1)}),cn.commitTransaction("pullToFront")},Zt.prototype.pushToBack=function(){var cn=this.diagram;cn.startTransaction("pushToBack");var $e=new go.Map;cn.selection.each(function(tt){$e.set(tt.layer,0)}),$e.iteratorKeys.each(function(tt){var et=0;tt.parts.each(function(Pt){if(!Pt.isSelected){var At=Pt.zOrder;isNaN(At)?Pt.zOrder=0:et=Math.min(et,At)}}),$e.set(tt,et)}),cn.selection.each(function(tt){Zt._assignZOrder(tt,$e.get(tt.layer)-1-Zt._findGroupDepth(tt))}),cn.commitTransaction("pushToBack")},Zt._assignZOrder=function(cn,$e,tt){tt===void 0&&(tt=cn),cn.layer===tt.layer&&(cn.zOrder=$e),cn instanceof go.Group&&cn.memberParts.each(function(et){Zt._assignZOrder(et,$e+1,tt)})},Zt._findGroupDepth=function(cn){if(cn instanceof go.Group){var $e=0;return cn.memberParts.each(function(tt){$e=Math.max($e,Zt._findGroupDepth(tt))}),$e+1}else return 0},Zt.prototype.doKeyDown=function(){var cn=this.diagram;if(cn!==null){var $e=cn.lastInput;if($e.key==="Up"||$e.key==="Down"||$e.key==="Left"||$e.key==="Right"){var tt=this.arrowKeyBehavior;if(tt==="none")return;if(tt==="select"){this._arrowKeySelect();return}else if(tt==="move"){this._arrowKeyMove();return}else if(tt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Zt.prototype._getAllParts=function(){var cn=new Array;return this.diagram.nodes.each(function($e){cn.push($e)}),this.diagram.parts.each(function($e){cn.push($e)}),cn},Zt.prototype._arrowKeyMove=function(){var cn=this.diagram,$e=cn.lastInput,tt=0,et=0;if($e.control||$e.meta)tt=1,et=1;else if(cn.grid!==null){var Pt=cn.grid.gridCellSize;et=Pt.width,tt=Pt.height}cn.startTransaction("arrowKeyMove"),cn.selection.each(function(At){$e.key==="Up"?At.move(new go.Point(At.actualBounds.x,At.actualBounds.y-tt)):$e.key==="Down"?At.move(new go.Point(At.actualBounds.x,At.actualBounds.y+tt)):$e.key==="Left"?At.move(new go.Point(At.actualBounds.x-et,At.actualBounds.y)):$e.key==="Right"&&At.move(new go.Point(At.actualBounds.x+et,At.actualBounds.y))}),cn.commitTransaction("arrowKeyMove")},Zt.prototype._arrowKeySelect=function(){var cn=this.diagram,$e=cn.lastInput,tt=null;$e.key==="Up"?tt=this._findNearestPartTowards(270):$e.key==="Down"?tt=this._findNearestPartTowards(90):$e.key==="Left"?tt=this._findNearestPartTowards(180):$e.key==="Right"&&(tt=this._findNearestPartTowards(0)),tt!==null&&($e.shift?tt.isSelected=!0:$e.control||$e.meta?tt.isSelected=!tt.isSelected:cn.select(tt))},Zt.prototype._findNearestPartTowards=function(cn){var $e=this.diagram.selection.first();if($e===null)return null;for(var tt=$e.actualBounds.center,et=this._getAllParts(),Pt=1/0,At=$e,kt=0;kt<et.length;kt++){var Ct=et[kt];if(Ct!==$e&&Ct.canSelect()){var dn=Ct.actualBounds.center,_n=tt.directionPoint(dn),zn=this._angleCloseness(_n,cn);if(zn<=45){var wn=tt.distanceSquaredPoint(dn);wn*=1+Math.sin(zn*Math.PI/180),wn<Pt&&(Pt=wn,At=Ct)}}}return At},Zt.prototype._angleCloseness=function(cn,$e){return Math.min(Math.abs($e-cn),Math.min(Math.abs($e+360-cn),Math.abs($e-360-cn)))},Zt.prototype._arrowKeyTree=function(){var cn=this.diagram,$e=cn.selection.first();if($e instanceof go.Node){var tt=cn.lastInput;if(tt.key==="Right"){if(!$e.isTreeLeaf)if(!$e.isTreeExpanded)cn.commandHandler.canExpandTree($e)&&cn.commandHandler.expandTree($e);else{var et=this._sortTreeChildrenByY($e).first();et!==null&&cn.select(et)}}else if(tt.key==="Left")if(!$e.isTreeLeaf&&$e.isTreeExpanded)cn.commandHandler.canCollapseTree($e)&&cn.commandHandler.collapseTree($e);else{var Pt=$e.findTreeParentNode();Pt!==null&&cn.select(Pt)}else if(tt.key==="Up"){var Pt=$e.findTreeParentNode();if(Pt!==null){var At=this._sortTreeChildrenByY(Pt),kt=At.indexOf($e);if(kt>0){for(var Ct=At.elt(kt-1);Ct!==null&&Ct.isTreeExpanded&&!Ct.isTreeLeaf;){var dn=this._sortTreeChildrenByY(Ct);Ct=dn.last()}Ct!==null&&cn.select(Ct)}else cn.select(Pt)}}else if(tt.key==="Down")if($e.isTreeExpanded&&!$e.isTreeLeaf){var et=this._sortTreeChildrenByY($e).first();et!==null&&cn.select(et)}else for(;$e!==null;){var Pt=$e.findTreeParentNode();if(Pt===null)break;var At=this._sortTreeChildrenByY(Pt),kt=At.indexOf($e);if(kt<At.length-1){cn.select(At.elt(kt+1));break}else $e=Pt}var _n=cn.selection.first();_n!==null&&cn.scrollToRect(_n.actualBounds)}},Zt.prototype._sortTreeChildrenByY=function(cn){var $e=new go.List().addAll(cn.findTreeChildrenNodes());return $e.sort(function(tt,et){var Pt=tt.location,At=et.location;return Pt.y<At.y?-1:Pt.y>At.y?1:Pt.x<At.x?-1:Pt.x>At.x?1:0}),$e},Zt.prototype.copyToClipboard=function(cn){go.CommandHandler.prototype.copyToClipboard.call(this,cn),this._lastPasteOffset.set(this.pasteOffset)},Zt.prototype.pasteFromClipboard=function(){var cn=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(cn,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),cn},Object.defineProperty(Zt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(cn){if(cn!=="move"&&cn!=="select"&&cn!=="scroll"&&cn!=="tree"&&cn!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+cn);this._arrowKeyBehavior=cn}}),Object.defineProperty(Zt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(cn){if(!(cn instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+cn);this._pasteOffset.set(cn)}});var Xt=Zt,mt=Ee(29277),ze=Ee(43604),Be=Ee(7660),qe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Qe=Ee(59301),Ue=(cn,$e,tt)=>new Promise((et,Pt)=>{var At=dn=>{try{Ct(tt.next(dn))}catch(_n){Pt(_n)}},kt=dn=>{try{Ct(tt.throw(dn))}catch(_n){Pt(_n)}},Ct=dn=>dn.done?et(dn.value):Promise.resolve(dn.value).then(At,kt);Ct((tt=tt.apply(cn,$e)).next())});function Xe({onCancel:cn,callback:$e}){let tt=(0,Le.useRef)(),et=(0,Le.useRef)(),Pt=(0,Le.useRef)(),At=(0,Le.useRef)(!1);const kt=(0,Le.useRef)(!1),[Ct,dn]=(0,Le.useState)(0);function _n(){const wn=Ut.bx.make,Ft={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"};tt.current=new Ut.S0(et.current,{padding:20,grid:wn(Ut.s_,"Grid",wn(Ut.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),wn(Ut.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:an=>{var si=an.diagram.commandHandler.addTopLevelParts(an.diagram.selection,!0);si||an.diagram.currentTool.doCancel()},commandHandler:wn(Xt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:an=>{var si=an.subject;si.location=si.location.copy().snapToGridPoint(an.diagram.grid.gridOrigin,an.diagram.grid.gridCellSize),setTimeout(()=>{an.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:an=>{var si=an.subject;setTimeout(()=>{an.diagram.commandHandler.editTextBlock()})},LinkRelinked:an=>{var si=an.parameter.part;si.invalidateConnectedLinks();var wi=an.subject;an.diagram.toolManager.linkingTool.isForwards?wi.toNode.invalidateConnectedLinks():wi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),tt.current.nodeTemplate=wn(Ut.NB,"Auto",{locationSpot:Ut.z6.Center,locationObjectName:"SHAPE",desiredSize:new Ut.$u(120,60),minSize:new Ut.$u(40,40),resizable:!0,resizeCellSize:new Ut.$u(10,10),rotatable:!0},new Ut.KX("location","loc",Ut.E9.parse).makeTwoWay(Ut.E9.stringify),new Ut.KX("desiredSize","size",Ut.$u.parse).makeTwoWay(Ut.$u.stringify),wn(Ut.bn,{name:"SHAPE",fill:Ft.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ut.z6.AllSides,toSpot:Ut.z6.AllSides},new Ut.KX("figure"),new Ut.KX("fill"),new Ut.KX("stroke","borderColor"),new Ut.KX("strokeWidth","thickness"),new Ut.KX("strokeDashArray","dash")),wn(Ut.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),wn(Ut.al,{margin:1,textAlign:"center",overflow:Ut.al.OverflowEllipsis,editable:!0},new Ut.KX("text").makeTwoWay(),new Ut.KX("stroke","color"))),tt.current.nodeTemplate.toolTip=wn("ToolTip",wn(Ut.s_,"Vertical",{maxSize:new Ut.$u(200,NaN)},wn(Ut.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ut.KX("text")),wn(Ut.al,{font:"10pt sans-serif",textAlign:"center"},new Ut.KX("text","details"))));function $t(an,si){var wi=(pi,Wi)=>{pi.handled=!0,pi.diagram.model.commit(Ni=>{var hr=Wi.part.adornedPart,Fi=new Ut.E9().setRectSpot(hr.actualBounds,an);Fi.subtract(hr.location),Fi.scale(2,2),Fi.x+=Math.sign(Fi.x)*130,Fi.y+=Math.sign(Fi.y)*130,Fi.add(hr.location),Fi.snapToGridPoint(pi.diagram.grid.gridOrigin,pi.diagram.grid.gridCellSize);var Ki=Ni.copyNodeData(hr.data);Ni.setGroupKeyForNodeData(Ki,Ni.getGroupKeyForNodeData(hr.data)),Ni.addNodeData(Ki);var _r={from:hr.key,to:Ni.getKeyForNodeData(Ki)};Ni.addLinkData(_r);var On=pi.diagram.findNodeForData(Ki);On.location=Fi,pi.diagram.select(On),setTimeout(()=>{pi.diagram.commandHandler.editTextBlock()},20)})};return wn(Ut.bn,{figure:si,alignment:an,alignmentFocus:an.opposite(),width:an.equals(Ut.z6.Top)||an.equals(Ut.z6.Bottom)?25:18,height:an.equals(Ut.z6.Top)||an.equals(Ut.z6.Bottom)?18:25,fill:"orange",stroke:Ft.white,strokeWidth:4,mouseEnter:(pi,Wi)=>Wi.fill="dodgerblue",mouseLeave:(pi,Wi)=>Wi.fill="orange",isActionable:!0,click:wi,contextClick:wi})}function bn(an){return wn(Ut.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:(si,wi)=>wi.fill="dodgerblue",mouseLeave:(si,wi)=>wi.fill="orange",click:(si,wi)=>{si.diagram.commandHandler.showContextMenu(wi.part.adornedPart)}},an||{})}tt.current.nodeTemplate.selectionAdornmentTemplate=wn(Ut.uz,"Spot",wn(Ut.Vm,{padding:10}),$t(Ut.z6.Top,"TriangleUp"),$t(Ut.z6.Left,"TriangleLeft"),$t(Ut.z6.Right,"TriangleRight"),$t(Ut.z6.Bottom,"TriangleDown"),bn({alignment:new Ut.z6(.75,0)}));function An(an,si){return(wi,pi)=>{wi.handled=!0,wi.diagram.model.commit(Wi=>{Wi.set(pi.part.adornedPart.data,an,si)})}}function Gt(an,si){return si||(si="color"),wn(Ut.bn,{width:16,height:16,stroke:"lightgray",fill:an,margin:1,background:"transparent",mouseEnter:(wi,pi)=>pi.stroke="dodgerblue",mouseLeave:(wi,pi)=>pi.stroke="lightgray",click:An(si,an),contextClick:An(si,an)})}function sn(){return[wn("ContextMenuButton",wn(Ut.s_,"Horizontal",Gt(Ft.white,"fill"),Gt(Ft.beige,"fill"),Gt(Ft.extralightblue,"fill"),Gt(Ft.extralightred,"fill"))),wn("ContextMenuButton",wn(Ut.s_,"Horizontal",Gt(Ft.lightgray,"fill"),Gt(Ft.lightgreen,"fill"),Gt(Ft.lightblue,"fill"),Gt(Ft.lightred,"fill")))]}function Bn(){return[wn("ContextMenuButton",wn(Ut.s_,"Horizontal",Gt(Ft.black),Gt(Ft.green),Gt(Ft.blue),Gt(Ft.red))),wn("ContextMenuButton",wn(Ut.s_,"Horizontal",Gt(Ft.white),Gt(Ft.magenta),Gt(Ft.purple),Gt(Ft.orange)))]}function Nn(an,si){return si||(si="thickness"),wn(Ut.bn,"LineH",{width:16,height:16,strokeWidth:an,margin:1,background:"transparent",mouseEnter:(wi,pi)=>pi.background="dodgerblue",mouseLeave:(wi,pi)=>pi.background="transparent",click:An(si,an),contextClick:An(si,an)})}function qn(an,si){return si||(si="dash"),wn(Ut.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:an,margin:1,background:"transparent",mouseEnter:(wi,pi)=>pi.background="dodgerblue",mouseLeave:(wi,pi)=>pi.background="transparent",click:An(si,an),contextClick:An(si,an)})}function Gn(){return[wn("ContextMenuButton",wn(Ut.s_,"Horizontal",Nn(1),Nn(2),Nn(3),Nn(4))),wn("ContextMenuButton",wn(Ut.s_,"Horizontal",qn(null),qn([2,4]),qn([4,4])))]}function Jn(an,si){return si||(si="figure"),wn(Ut.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:an,margin:1,background:"transparent",mouseEnter:(wi,pi)=>pi.fill="dodgerblue",mouseLeave:(wi,pi)=>pi.fill="lightgray",click:An(si,an),contextClick:An(si,an)})}tt.current.nodeTemplate.contextMenu=wn("ContextMenu",wn("ContextMenuButton",wn(Ut.s_,"Horizontal",Jn("Rectangle"),Jn("RoundedRectangle"),Jn("Ellipse"),Jn("Diamond"))),wn("ContextMenuButton",wn(Ut.s_,"Horizontal",Jn("Parallelogram2"),Jn("ManualOperation"),Jn("Procedure"),Jn("Cylinder1"))),wn("ContextMenuButton",wn(Ut.s_,"Horizontal",Jn("Terminator"),Jn("CreateRequest"),Jn("Document"),Jn("TriangleDown"))),sn(),Bn(),Gn()),tt.current.groupTemplate=wn(Ut.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ut.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(an,si)=>{var wi=si.addMembers(si.diagram.selection,!0);wi||si.diagram.currentTool.doCancel()},avoidable:!1},new Ut.KX("location","loc",Ut.E9.parse).makeTwoWay(Ut.E9.stringify),wn(Ut.s_,"Auto",{name:"BODY"},wn(Ut.bn,{parameter1:10,fill:Ft.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ut.z6.AllSides,toSpot:Ut.z6.AllSides},new Ut.KX("fill"),new Ut.KX("stroke","color"),new Ut.KX("strokeWidth","thickness"),new Ut.KX("strokeDashArray","dash")),wn(Ut.Vm,{background:"transparent",margin:20})),wn(Ut.al,{alignment:Ut.z6.Top,alignmentFocus:Ut.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Ut.KX("text"),new Ut.KX("stroke","color"))),tt.current.groupTemplate.selectionAdornmentTemplate=wn(Ut.uz,"Spot",wn(Ut.s_,"Auto",wn(Ut.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),wn(Ut.Vm,{margin:1.5})),bn({alignment:Ut.z6.TopRight,alignmentFocus:Ut.z6.BottomRight})),tt.current.groupTemplate.contextMenu=wn("ContextMenu",sn(),Bn(),Gn()),tt.current.linkTemplate=wn(Ut.rU,{layerName:"Foreground",routing:Ut.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Ut.KX("fromSpot","fromSpot",Ut.z6.parse),new Ut.KX("toSpot","toSpot",Ut.z6.parse),new Ut.KX("fromShortLength","dir",an=>an>=1?10:0),new Ut.KX("toShortLength","dir",an=>an>=1?10:0),new Ut.KX("points").makeTwoWay(),wn(Ut.bn,{strokeWidth:2},new Ut.KX("stroke","color"),new Ut.KX("strokeWidth","thickness"),new Ut.KX("strokeDashArray","dash")),wn(Ut.bn,{segmentIndex:0,segmentOffset:new Ut.E9(15,0),segmentOrientation:Ut.rU.OrientAlong,alignmentFocus:Ut.z6.Right,figure:"circle",width:10,strokeWidth:0},new Ut.KX("fill","color"),new Ut.KX("visible","dir",an=>an===1)),wn(Ut.bn,{segmentIndex:-1,segmentOffset:new Ut.E9(-10,6),segmentOrientation:Ut.rU.OrientPlus90,alignmentFocus:Ut.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ut.KX("fill","color"),new Ut.KX("visible","dir",an=>an>=1),new Ut.KX("width","thickness",an=>7+3*an),new Ut.KX("height","thickness",an=>7+3*an),new Ut.KX("segmentOffset","thickness",an=>new Ut.E9(-15,4+1.5*an))),wn(Ut.bn,{segmentIndex:0,segmentOffset:new Ut.E9(15,-6),segmentOrientation:Ut.rU.OrientMinus90,alignmentFocus:Ut.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ut.KX("fill","color"),new Ut.KX("visible","dir",an=>an===2),new Ut.KX("width","thickness",an=>7+3*an),new Ut.KX("height","thickness",an=>7+3*an),new Ut.KX("segmentOffset","thickness",an=>new Ut.E9(-15,4+1.5*an))),wn(Ut.al,{alignmentFocus:new Ut.z6(0,1,-4,0),editable:!0},new Ut.KX("text").makeTwoWay(),new Ut.KX("stroke","color"))),tt.current.linkTemplate.selectionAdornmentTemplate=wn(Ut.uz,wn(Ut.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Dn(2)},new Ut.KX("pathPattern","thickness",Dn)),bn({alignmentFocus:new Ut.z6(0,0,-6,-4)}));function Dn(an){return wn(Ut.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(an+4).toString()+" H3"})}function ri(an){var si="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return an===0?si="M0 0 M16 16 M0 8 L16 8":an===2&&(si="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),wn(Ut.bn,{geometryString:si,margin:2,background:"transparent",mouseEnter:(wi,pi)=>pi.background="dodgerblue",mouseLeave:(wi,pi)=>pi.background="transparent",click:An("dir",an),contextClick:An("dir",an)})}function Mi(an){var si=(wi,pi)=>{wi.handled=!0,wi.diagram.model.commit(Wi=>{var Ni=pi.part.adornedPart;Wi.set(Ni.data,an?"toSpot":"fromSpot",Ut.z6.stringify(Ut.z6.AllSides)),(an?Ni.toNode:Ni.fromNode).invalidateConnectedLinks()})};return wn(Ut.bn,{width:12,height:12,fill:"transparent",mouseEnter:(wi,pi)=>pi.background="dodgerblue",mouseLeave:(wi,pi)=>pi.background="transparent",click:si,contextClick:si})}function Hn(an,si){var wi=0,pi=Ut.z6.RightSide;an.equals(Ut.z6.Top)?(wi=270,pi=Ut.z6.TopSide):an.equals(Ut.z6.Left)?(wi=180,pi=Ut.z6.LeftSide):an.equals(Ut.z6.Bottom)&&(wi=90,pi=Ut.z6.BottomSide),si||(wi-=180);var Wi=(Ni,hr)=>{Ni.handled=!0,Ni.diagram.model.commit(Fi=>{var Ki=hr.part.adornedPart;Fi.set(Ki.data,si?"toSpot":"fromSpot",Ut.z6.stringify(pi)),(si?Ki.toNode:Ki.fromNode).invalidateConnectedLinks()})};return wn(Ut.bn,{alignment:an,alignmentFocus:an.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:wi,background:"transparent",mouseEnter:(Ni,hr)=>hr.background="dodgerblue",mouseLeave:(Ni,hr)=>hr.background="transparent",click:Wi,contextClick:Wi})}tt.current.linkTemplate.contextMenu=wn("ContextMenu",Bn(),Gn(),wn("ContextMenuButton",wn(Ut.s_,"Horizontal",ri(0),ri(1),ri(2))),wn("ContextMenuButton",wn(Ut.s_,"Horizontal",wn(Ut.s_,"Spot",Mi(!1),Hn(Ut.z6.Top,!1),Hn(Ut.z6.Left,!1),Hn(Ut.z6.Right,!1),Hn(Ut.z6.Bottom,!1)),wn(Ut.s_,"Spot",{margin:new Ut.Zt(0,0,0,2)},Mi(!0),Hn(Ut.z6.Top,!0),Hn(Ut.z6.Left,!0),Hn(Ut.z6.Right,!0),Hn(Ut.z6.Bottom,!0)))));const oi=`{ "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 Bi=["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 lr(an){return console.log("shapeName:",an),Bi.indexOf(an)>=0}var Ai=new Ut.YI(Pt.current,{maxSelectionCount:1,linkTemplate:wn(Ut.rU,{locationSpot:Ut.z6.Center,selectionAdornmentTemplate:wn(Ut.uz,"Link",{locationSpot:Ut.z6.Center},wn(Ut.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),wn(Ut.bn,{toArrow:"Standard",stroke:null}))},{routing:Ut.rU.AvoidsNodes,curve:Ut.rU.JumpOver,corner:5,toShortLength:4},new Ut.KX("points"),wn(Ut.bn,{isPanelMain:!0,strokeWidth:2}),wn(Ut.bn,{toArrow:"Standard",stroke:null})),model:new Ut.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Ut.bn.getFigureGenerators().toArray().map(an=>({text:"\u672A\u547D\u540D",size:"100 100",figure:an.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return tt.current.addDiagramListener("TextEdited",function(an){var si;const wi=an.subject.part;var pi=(si=document.activeElement)==null?void 0:si.value;typeof pi=="string"&&pi.trim()===""&&tt.current.model.commit(function(Wi){Wi.set(wi.data,"text","\u672A\u547D\u540D"),tt.current.commandHandler.stopCommand()},"increment")}),Ai.nodeTemplate=wn(Ut.NB,"Auto",{locationSpot:Ut.z6.Center},new Ut.KX("location","location",Ut.E9.parse).makeTwoWay(Ut.E9.stringify),wn(Ut.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 Ut.KX("stroke").makeTwoWay(),new Ut.KX("fill").makeTwoWay(),new Ut.KX("figure")),wn(Ut.al,{margin:new Ut.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Ut.$u(16,16),maxSize:new Ut.$u(10,NaN),textAlign:"center",editable:!0},new Ut.KX("key").makeTwoWay())),setTimeout(()=>{tt.current.grid=wn(Ut.s_,"Grid",wn(Ut.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),wn(Ut.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),tt.current.grid.visible=!0,tt.current.grid.gridCellStroke="darkgray",tt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=tt.current,tt.current}const zn=()=>Ue(this,null,function*(){var wn=tt.current.makeImage();const Ft=yield(0,Be.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:wn.src}});$e({src:Ft.url})});return(0,Le.useEffect)(()=>(setTimeout(()=>{_n()},500),dn(Ct+1),()=>{tt.current=null}),[]),Qe.createElement("div",{ref:kt,className:At.current?`${qe.maxH60} body-overflow-initial`:"body-overflow-initial"},Qe.createElement(Rt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Ct,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Qe.createElement(jt.Z,null,Qe.createElement(ze.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Qe.createElement(ze.Z,{onClick:()=>{var wn,Ft,$t=tt.current.selection.first();if(At.current=!At.current,document.activeElement&&$t){let bn=(Ft=(wn=document.activeElement)==null?void 0:wn.value)==null?void 0:Ft.trim();typeof bn=="string"&&tt.current.model.commit(function(An){An.set($t.data,"text",bn||"\u672A\u547D\u540D"),tt.current.commandHandler.stopCommand()},"increment")}dn(Ct+1)}},Qe.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:cn},Qe.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:qe.flowChartWrp},Qe.createElement("div",{style:{display:"flex",height:"100%"}},Qe.createElement("div",{style:{width:"300px",height:"100%"}},Qe.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Qe.createElement("div",{style:{height:"calc(100% - 50px)"},className:qe.myPaletteDiv,ref:Pt})),Qe.createElement("div",{style:{flex:1,position:"relative"}},Qe.createElement("div",{ref:et,style:{height:"80vh"}}))),Qe.createElement("div",{className:"tr"},Qe.createElement(We.ZP,{size:"large",onClick:zn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Re=Xe,Ae=Ee(5112),Ge=Ee(5871);const Ke=Ae.ZP.Group,Ze={margin:"0 8px"};var at=({callback:cn,onCancel:$e})=>{function tt(et){cn(et)}return Le.createElement(Ve.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:tt},Le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Le.createElement("span",{style:Ze},"\u5355\u5143\u683C\u6570\uFF1A"),Le.createElement("span",{style:Ze},"\u884C\u6570"),Le.createElement(Ve.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Le.createElement(Ge.Z,null)),Le.createElement("span",{style:Ze},"\u5217\u6570"),Le.createElement(Ve.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Le.createElement(Ge.Z,null))),Le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Le.createElement("span",{style:Ze},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Le.createElement(Ve.default.Item,{name:"align"},Le.createElement(Ke,null,Le.createElement(Ae.ZP,{value:"default"},Le.createElement("i",{className:"fa fa-align-justify"})),Le.createElement(Ae.ZP,{value:"left"},Le.createElement("i",{className:"fa fa-align-left"})),Le.createElement(Ae.ZP,{value:"center"},Le.createElement("i",{className:"fa fa-align-center"})),Le.createElement(Ae.ZP,{value:"right"},Le.createElement("i",{className:"fa fa-align-right"}))))),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(We.ZP,{type:"ghost",onClick:$e},"\u53D6\u6D88")))},xt=Ee(78673),tn=Ee(5559),nn=Ee.n(tn),mn=(0,Le.forwardRef)(({use3d:cn,width:$e,height:tt,callback:et,showSaveButton:Pt},At)=>{const kt=(0,Le.useRef)(),Ct=(0,Le.useRef)(),[dn,_n]=(0,Le.useState)(!1),zn=(0,Le.useRef)({id:kt,appName:"graphing",width:$e||1e3,height:tt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Le.useEffect)(()=>{Ct.current=new(nn())(zn.current,!0),window.onload=function(){Ct.current.inject("applet_container")}},[]);const wn=()=>{var Ft=window.ggbApplet.getPNGBase64(1,!0,72);return et&&et(Ft),Ft};return(0,Le.useEffect)(()=>{zn.current.appName=dn?"3D":"graphing",Ct.current.inject("applet_container")},[dn]),(0,Le.useEffect)(()=>{_n(cn)},[cn]),(0,Le.useImperativeHandle)(At,()=>({getImgData:wn})),Le.createElement(Le.Fragment,null,Le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:kt}),Le.createElement(jt.Z,{align:"middle"},Le.createElement(ze.Z,{flex:1},Le.createElement(xt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:dn,onChange:Ft=>_n(Ft)})),Le.createElement(ze.Z,null,Le.createElement(We.ZP,{size:"large",onClick:wn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),kn=Ee(46531),fn=Ee(8591);const Mn="link",Zn="upload-image",Tn="add-flowchart",ci="draw-image",ai="add-flowchart",ki="code-block",Ci="add-table",or="------------",tr={default:or,left:`:${or}`,center:`:${or}:`,right:`${or}:`};var pr=Ee(50505);function cr(){}let to=0;const no=1e4,di="\u2581",Cr="@\u2581\u2581@",zi="@\u2581@",st=`
|
|
|
**\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`,Dr=["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 Mr(cn){return/^\d+$/.test(cn)?`${cn}px`:cn}const Gr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",uo={[Gr+"-B"]:"bold",[Gr+"-I"]:"italic"},Zr={[Mn]:"\u6DFB\u52A0\u94FE\u63A5",[ki]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Zn]:"\u6DFB\u52A0\u56FE\u7247",[ci]:"\u6DFB\u52A0\u753B\u56FE",[Tn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ci]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var co=({defaultValue:cn="",onChange:$e,width:tt="100%",height:et=400,miniToolbar:Pt=!1,isFocus:At=!1,watch:kt,insertTemp:Ct,mode:dn="markdown",id:_n="markdown-editor-id",showResizeBar:zn=!1,noStorage:wn=!1,showNullButton:Ft=!1,showNullProgramButton:$t=!1,hidetoolBar:bn=!1,fullScreen:An=!1,onBlur:Gt,onCMBeforeChange:sn,onFullScreen:Bn,className:Nn="",disablePaste:qn=!1,disabled:Gn=!1,disabledFill:Jn=!1,placeholder:Dn="",values:ri="",extraUse:Mi})=>{const[Hn,oi]=(0,Le.useState)(null),[Bi,lr]=(0,Le.useState)(cn),[Ai,an]=(0,Le.useState)(kt),[si,wi]=(0,Le.useState)(An),[pi,Wi]=(0,Le.useState)(""),[Ni,hr]=(0,Le.useState)(0),[Fi,Ki]=(0,Le.useState)(et),[_r,On]=(0,Le.useState)(!1),[Jr,In]=(0,Le.useState)(0),[Sr,fo]=(0,Le.useState)(0),Pr=(0,Le.useRef)(),Do=(0,Le.useRef)(),ro=(0,Le.useRef)(),Yi=(0,Le.useRef)();(0,Le.useEffect)(()=>{const Gi=window.scrollY||window.pageYOffset;lr(ri),Hn==null||Hn.setValue(ri),window.scrollTo(0,Gi)},[ri]),(0,Le.useEffect)(()=>{Bn==null||Bn(si)},[si]),(0,Le.useEffect)(()=>{if(Pr.current){let Gi=function(qi,Xn){var qr;if(qn){Xn.preventDefault();return}const _o=Xn.clipboardData;if(_o){const Ko=_o.types.toString(),Eo=_o.items;if(Ko==="Files"||_o.types.indexOf("Files")>-1){if(Xn.preventDefault(),dn=="stex")return;try{let rs=Eo[1];((qr=Eo[0])==null?void 0:qr.kind)==="file"&&(rs=Eo[0]);const ms=rs.getAsFile(),Ls=ms.name.split(".").pop();(0,vt.I)(ms,ws=>{var ta,aa,Ln;ws.id?((ta=ms==null?void 0:ms.type)==null?void 0:ta.indexOf("image"))>-1?Ui.replaceSelection(``):((aa=ms==null?void 0:ms.type)==null?void 0:aa.indexOf("video"))>-1?Ui.replaceSelection(`<video width="100%" controls src="/api/attachments/${ws.id}"></video>`):((Ln=ms==null?void 0:ms.type)==null?void 0:Ln.indexOf("pdf"))>-1?Ui.replaceSelection(`<a href="/api/attachments/${ws.id}?type=${ms.type}&disposition=inline" target="_blank">${ms.name}</a>`):Dr.includes(Ls)?Ui.replaceSelection(`<a href="/api/attachments/${ws.id}?type=office&disposition=inline" target="_blank">${ms.name}</a>`):Ui.replaceSelection(`[${ms.name}](/api/attachments/${ws.id}?type=${ws.content_type})`):(ws==null?void 0:ws.status)===401&&(document.location.href="/user/login")})}catch(rs){fn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ui=Ie().fromTextArea(Pr.current,{mode:dn,lineNumbers:!Pt,lineWrapping:!0,value:cn,autoCloseTags:!0,autoCloseBrackets:!0});return Ui.on("keyup",function(qi,Xn){Xn.keyCode===8&&(qi.getValue()==""?Ui.setOption("placeholder",Dn):Ui.setOption("placeholder",null))}),Ui.on("keydown",function(qi,Xn){if(Xn.keyCode===8){var qr=dr(qi);qr&&Xn.preventDefault()}}),At&&Ui.focus(),Ui.on("paste",Gi),Gn&&Ui.on("beforeChange",function(qi,Xn){(Xn.origin==="paste"||Xn.origin==="+input")&&Xn.cancel()}),oi(Ui),()=>{Ui.off("paste",Gi)}}},[]);const er=(0,Le.useCallback)(()=>{if(Do.current)try{}catch(Gi){console.log(Gi,"---- to set md editor body height")}},[Fi,Do,si]);(0,Le.useEffect)(()=>{function Gi(){let Ui=new Te.Z(qi=>{for(let Xn of qi)(Xn.target.offsetHeight>0||Xn.target.offsetWidth>0)&&(er(),Hn.setSize("100%","100%"),Hn.refresh())});return Ui.observe(Pr.current.parentElement),Ui}if(Hn){const Ui=Gi();return()=>{var qi,Xn;(qi=Pr.current)!=null&&qi.parentElement&&Ui.unobserve((Xn=Pr.current)==null?void 0:Xn.parentElement)}}},[Hn,er]),(0,Le.useEffect)(()=>{if(Hn){let Gi=[];for(const[Ui,qi]of Object.entries(uo)){let Xn={[Ui]:()=>{Tr(qi)}};Gi.push(Xn),Hn.addKeyMap(Xn)}return()=>{for(let Ui of Gi)Hn.removeKeyMap(Ui)}}},[Hn]),(0,Le.useEffect)(()=>{An!==si&&wi(An)},[An]),(0,pr.Z)(()=>{if(!wn&&Ni>0){let Gi=new Date().getTime(),Ui=window.sessionStorage.getItem(_n);Gi>=Ni+no&&(!Ui||Ui!==Bi)&&(window.sessionStorage.setItem(_n,Bi),On(!0))}},no),(0,Le.useEffect)(()=>{an(kt)},[Hn,kt]),(0,Le.useEffect)(()=>{Hn&&At&&Hn.focus()},[Hn,At]),(0,Le.useEffect)(()=>{if(Ai&&Hn){let Gi=function(qi){let Xn=qi.target;if(Yi.current){let qr=Xn.scrollTop/Xn.scrollHeight;Yi.current.scrollTop=Yi.current.scrollHeight*qr}};const Ui=Hn.getScrollerElement();return Ui.addEventListener("scroll",Gi),()=>{Ui.removeEventListener("scroll",Gi)}}},[Hn,Ai]),(0,Le.useEffect)(()=>{if(Hn&&sn){let Gi=function(Ui,qi){sn(Ui,qi)};return Hn.on("beforeChange",Gi),()=>{Hn.off("beforeChange",Gi)}}},[Hn,sn]),(0,Le.useEffect)(()=>{if(Hn&&Gt){let Gi=function(){Gt(Hn.getValue())};return Hn.on("blur",Gi),()=>{Hn.off("blur",Gi)}}},[Hn,Gt]);function dr(Gi,Ui){var qi=Gi.getDoc(),Xn=qi.getCursor(),qr=qi.getLine(Xn.line),_o=qr.charAt(Xn.ch-1),Ko=qr.lastIndexOf("@\u2581@",Xn.ch),Eo=qr.lastIndexOf("@\u2581\u2581@",Xn.ch),rs=Ko>Eo?Ko:Eo,ms=Ko>Eo?3:4;if(Cr.indexOf(_o)===-1)return null;if(console.log("change1:",Ui,Gi,qr,Xn,rs,Ko,Eo,_o),rs>=0&&Xn.ch-rs<5){var Ls=rs+ms;return qi.replaceRange("",{line:Xn.line,ch:rs},{line:Xn.line,ch:Ls}),{line:Xn.line,ch:Ls}}return null}(0,Le.useEffect)(()=>{if(Hn){let Gi=function(Ui,qi){const Xn=Ui.getValue();lr(Xn),hr(new Date().getTime()),Ui.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),$e&&($t?$e(Xn,Zo(Xn)):$e(Xn))};return Hn.on("change",Gi),()=>{Hn.off("change",Gi)}}},[Hn,$e]),(0,Le.useEffect)(()=>{if(Hn)if(cn==null)Hn.setValue(""),lr("");else{const Gi=window.scrollY||window.pageYOffset;cn!==Hn.getValue()&&(Hn.setValue(cn),lr(cn),Hn.setCursor(Gn?1:Hn.lineCount(),0),window.scrollTo(0,Gi))}},[Hn,cn]);const Tr=(0,Le.useCallback)(Gi=>{const Ui=Hn.getCursor(),qi=Hn.getSelection();let Xn=qi.split(`
|
|
|
`);switch(Gi){case"bold":return Hn.replaceSelection("**"+qi+"**"),qi===""&&Hn.setCursor(Ui.line,Ui.ch+2),Hn.focus();case"italic":return Hn.replaceSelection("*"+qi+"*"),qi===""&&Hn.setCursor(Ui.line,Ui.ch+1),Hn.focus();case"code":return Hn.replaceSelection("`"+qi+"`"),qi===""&&Hn.setCursor(Ui.line,Ui.ch+1),Hn.focus();case"inline-latex":return Wi("inline-latex"),Hn.focus();case"latex":return Hn.replaceSelection("```latex\n"+qi+"\n```"),Hn.setCursor(Ui.line+1,qi.length+1),Hn.focus();case"line-break":return Hn.replaceSelection(`<br/>
|
|
|
`),Hn.focus();case"list-ul":return qi===""?Hn.replaceSelection("- "+qi):Hn.replaceSelection(Xn.map(qr=>qr===""?"":`- ${qr}`).join(`
|
|
|
`)),Hn.focus();case"list-ol":return qi===""?Hn.replaceSelection("1. "+qi):Hn.replaceSelection(Xn.map((qr,_o)=>qr===""?"":`${_o+1}. ${qr}`).join(`
|
|
|
`)),Hn.focus();case"add-null-ch":return qi===""&&Hn.setCursor(Ui.line,Ui.ch),Hn.replaceSelection(di),Hn.focus();case"add-signal":return qi===""&&Hn.setCursor(Ui.line,Ui.ch),Hn.replaceSelection(zi),Hn.focus();case"add-multiple":return qi===""&&Hn.setCursor(Ui.line,Ui.ch),Hn.replaceSelection(Cr),Hn.focus();case"inster-template-1":return qi===""&&Hn.setCursor(Ui.line,Ui.ch),Hn.replaceSelection(st),Hn.focus();case"eraser":return Hn.setValue(""),Hn.focus();case"trigger-watch":return an(!Ai),Hn.focus();case"trigger-full-screen":return wi(!si),Hn.focus();case Mn:Wi(Mn);return;case ki:Wi(ki);return;case Zn:Wi(Zn);return;case ci:Wi(ci);return;case"maths-latex":Wi("maths-latex");return;case Tn:Wi(Tn);return;case Ci:Wi(Ci);return;default:throw new Error}},[Hn,Ai,si]),hi=(0,Le.useCallback)((Gi,Ui)=>{var qi,Xn,qr,_o,Ko,Eo;switch(Wi(""),pi){case Mn:const{title:ta,link:aa}=Gi;return Hn.replaceSelection(`[${ta}](${aa})`),Hn.focus();case ki:const{language:Ln,content:Os}=Gi;return Hn.replaceSelection(["```"+Ln,Os,"```"].join(`
|
|
|
`)),Hn.focus();case"maths-latex":for(var rs=atob(Gi),ms=new Uint8Array(rs.length),Ls=0;Ls<rs.length;Ls++)ms[Ls]=rs.charCodeAt(Ls);var ws=new Blob([ms],{type:"image/png"});(0,vt.I)(ws,na=>{na.id?Hn.replaceSelection(``):(na==null?void 0:na.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Hn.replaceSelection("`$$"+Gi+"$$`");break;case Zn:case ci:case ai:const{src:hl,alt:dl}=Gi,vs=Ui,ja=(qr=(Xn=(qi=vs==null?void 0:vs.name)==null?void 0:qi.split("."))==null?void 0:Xn.pop)==null?void 0:qr.call(Xn);return((_o=vs==null?void 0:vs.type)==null?void 0:_o.indexOf("image"))>-1||!(vs!=null&&vs.type)?dl?Hn.replaceSelection(``):Hn.replaceSelection(``):((Ko=vs==null?void 0:vs.type)==null?void 0:Ko.indexOf("video"))>-1?Hn.replaceSelection(`<video width="100%" controls src="${hl}"></video>`):((Eo=vs==null?void 0:vs.type)==null?void 0:Eo.indexOf("pdf"))>-1?Hn.replaceSelection(`<a href="${hl}?type=${vs.type}&disposition=inline" target="_blank">${vs.name}</a>`):Dr.includes(ja)?Hn.replaceSelection(`<a href="${hl}?type=office&disposition=inline" target="_blank">${vs.name}</a>`):Hn.replaceSelection(`[${vs.name}](${hl})`),Hn.focus();case Ci:const{row:lu,col:Vl,align:ho}=Gi;let Er=`
|
|
|
`;for(let na=0;na<lu;na++){let Rr=[],io=[];for(let Kr=0;Kr<Vl;Kr++)na===1&&io.push(tr[ho]),Rr.push(" ");na===1&&(Er+=`| ${io.join(" | ")} |
|
|
|
`),Er+=`| ${Rr.join(Vl===1?"":" | ")} |
|
|
|
`}return Hn.replaceSelection(Er+`
|
|
|
`),Hn.focus();default:throw new Error}},[Hn,pi]),Tt=(0,Le.useMemo)(()=>{switch(pi){case Mn:return Le.createElement(yt,{callback:hi,onCancel:xr});case ki:return Le.createElement(Et.Z,{callback:hi,onCancel:xr});case Zn:return Le.createElement(vt.Z,{callback:hi,onCancel:xr});case Tn:return Le.createElement(Re,{callback:hi,onCancel:xr});case Ci:return Le.createElement(at,{callback:hi,onCancel:xr});case"maths-latex":return Le.createElement(mn,{showSaveButton:!0,callback:hi});case"inline-latex":return Le.createElement(kn.Z,{showSaveButton:!0,callback:hi});default:return null}},[pi]);function xr(){Wi("")}(0,Le.useEffect)(()=>{if(ro.current){let Gi=function(Ko){qr=!0,_o=Ko.pageY},Ui=function(){qr=!1},qi=function(Ko){if(qr){let Eo=Ko.pageY-_o;Eo<0&&(Eo=0),Eo>300&&(Eo=300);let rs=et+Eo+"px";Ki(rs)}},Xn=ro.current,qr=!1,_o=0;return Xn.addEventListener("mousedown",Gi),document.addEventListener("mousemove",qi),document.addEventListener("mouseup",Ui),()=>{Xn.removeEventListener("mousedown",Gi),document.removeEventListener("mousemove",qi),document.removeEventListener("mouseup",Ui)}}},[Hn,ro]),(0,Le.useEffect)(()=>{Ki(et)},[et]);const Po=Mr(tt),Wo=Mr(Fi),Co={width:Po,height:Wo},qo=(0,Le.useMemo)(()=>{if(Ni){let Gi=new Date(Ni),Ui=Gi.getHours(),qi=Gi.getMinutes(),Xn=Gi.getSeconds();return Ui=Ui<10?"0"+Ui:Ui,qi=qi<10?"0"+qi:qi,Xn=Xn<10?"0"+Xn:Xn,`${Ui}:${qi}:${Xn}`}return 0},[Ni]),Zo=Gi=>{const Ui=[];if($t){let qi=-1;Gi=Gi.replace(/(@▁▁@|@▁@)/g,function(Xn,qr,_o){Ui.push({multiLine:Xn!==zi})})}return Ui};function wr(){window.sessionStorage.removeItem(_n),On(!1),hr(0)}function vr(){On(!1),hr(0),Hn.setValue(window.sessionStorage.getItem(_n))}(0,Le.useEffect)(()=>{Zr[pi]&&pi!==ci&&pi!==Tn&&setTimeout(()=>{const Gi=document.getElementsByClassName("markdown-popup-form")[0],Ui=window.innerWidth/2-Gi.offsetWidth/2,qi=window.innerHeight/2-Gi.offsetHeight/2;In(Ui),fo(qi)},0)},[pi]);const Qi=Gi=>{Gi.preventDefault();const Ui=Gi.clientX-Jr,qi=Gi.clientY-Sr;document.body.onmousemove=Xn=>{let qr=Xn.clientX-Ui,_o=Xn.clientY-qi;const Ko=document.getElementsByClassName("markdown-popup-form")[0],Eo=window.innerWidth-Ko.offsetWidth,rs=window.innerHeight-Ko.offsetHeight;qr=Math.max(0,Math.min(qr,Eo)),_o=Math.max(0,Math.min(_o,rs)),Qr(Xn.clientX,Xn.clientY,Ui,qi)&&(In(qr),fo(_o))},document.body.onmouseup=function(){document.body.onmousemove=null}},Qr=(Gi,Ui,qi,Xn)=>{const qr=document.body.clientHeight,_o=document.body.clientWidth;return Gi<20&&qi>Gi||Gi>_o-20&&qi<Gi||Ui<20&&Xn>Ui||Ui>qr-20&&Xn<Ui?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"markdown-editor-wrapper",ref:Do},Le.createElement("div",{className:`markdown-editor-container ${Nn} ${Ai?"on-preview":""} ${Pt?"mini":""} ${si?"full-screen":""}`,style:Co},Le.createElement(Ne,{insertTemp:Ct,watch:Ai,fullScreen:si,showNullButton:Ft,showNullProgramButton:$t,onActionCallback:Tr,hidetoolBar:bn,extraUse:Mi}),Le.createElement("div",{className:"markdown-editor-body"},Le.createElement("div",{className:"codemirror-container"},Le.createElement("textarea",{ref:Pr,placeholder:Dn})),Ai?Le.createElement("div",{ref:Yi,className:"preview-container"},dn==="stex"&&Le.createElement(ve,{value:Bi}),dn!=="stex"&&Le.createElement(ce.Z,{disabledFill:Jn,showProgramFill:$t,value:Bi})):null))),zn?Le.createElement("a",{ref:ro,className:"editor-resize"}):null,pi===ci&&Le.createElement(xn,{callback:hi,onCancel:xr}),pi===Tn&&Le.createElement(Re,{callback:hi,onCancel:xr}),Le.createElement(je.Z,null,Zr[pi]&&pi!==ci&&pi!==Tn?Le.createElement(Rt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Jr,top:Sr},title:Le.createElement("div",{style:{cursor:"move"},onMouseDown:Qi},Zr[pi]),open:!0,onCancel:xr,footer:null,destroyOnClose:!0,width:pi===Tn?"1200px":null,height:pi===Tn?"80vh":null,className:"markdown-popup-form"},Tt):null))}},56030:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return le},I:function(){return we}});var Le=Ee(78241),me=Ee(8591),Ie=Ee(92832),Te=Ee(3113),Ce=Ee(49291),_e=Ee(59301),he=Ee(59301),Se=Object.defineProperty,xe=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,ue=(be,ke,Ne)=>ke in be?Se(be,ke,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):be[ke]=Ne,z=(be,ke)=>{for(var Ne in ke||(ke={}))ve.call(ke,Ne)&&ue(be,Ne,ke[Ne]);if(ce)for(var Ne of ce(ke))de.call(ke,Ne)&&ue(be,Ne,ke[Ne]);return be},ee=(be,ke)=>xe(be,ge(ke));const{useForm:oe}=Le.default,ie={width:280,marginRight:10},se={labelCol:{span:5},wrapperCol:{span:19}};var le=({callback:be,onCancel:ke})=>{const[Ne]=oe();let je=(0,_e.useRef)();function Ve(gt){be(gt,je.current)}function Je(gt,ut){if(gt.status===-1){me.ZP.error(gt.message);return}Ne.setFieldsValue({src:`/api/attachments/${gt.id}`,type:ut.type})}function We(gt){let ut=gt.target.files[0];je.current=ut,we(ut,Je)}return he.createElement(Le.default,ee(z({form:Ne},se),{className:"upload-image-panel",onFinish:Ve,style:{width:470,overflow:"hidden"}}),he.createElement(Le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},he.createElement("div",{className:"flex-container"},he.createElement(Le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},he.createElement(Ie.default,{style:ie})),he.createElement(ye,{onFileChange:We}))),he.createElement(Le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},he.createElement(Ie.default,{style:{width:264}})),he.createElement(Le.default.Item,{style:{textAlign:"right"}},he.createElement(Te.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),he.createElement(Te.ZP,{type:"default",onClick:ke},"\u53D6\u6D88")))};function ye({onFileChange:be}){return he.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",he.createElement("input",{type:"file",onChange:be}))}function we(be,ke){if(!be)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ne=new FormData;Ne.append("editormd-image-file",be),Ne.append("file_param_name","editormd-image-file"),Ne.append("byxhr","true");var je=new window.XMLHttpRequest;je.withCredentials=!0,je.addEventListener("load",function(Ve){ke(JSON.parse(Ve.target.responseText),be)},!1),je.addEventListener("error",function(Ve){console.error(Ve)},!1),je.open("POST",`${Ce.KI}/api/attachments.json`),je.send(Ne)}},19647:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Ie}});var Le=Ee(59301),me=Ee(4676);class Ie extends Le.Component{constructor(Ce){super(Ce);const _e=window.document;this.node=_e.createElement("div"),_e.body.appendChild(this.node)}render(){const{children:Ce}=this.props;return(0,me.createPortal)(Ce,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},57800:function(Pn,qt,Ee){"use strict";Ee.d(qt,{SV:function(){return Xe},ZP:function(){return Ue}});var Le=Ee(59301),me=Ee(76374);const Ie={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"]},Te={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(`
|
|
|
`)}]},_e={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 Se=Ee(7947),xe=Ee.n(Se),ge=Object.defineProperty,ce=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ee=(Re,Ae,Ge)=>Ae in Re?ge(Re,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Re[Ae]=Ge,oe=(Re,Ae)=>{for(var Ge in Ae||(Ae={}))ue.call(Ae,Ge)&&ee(Re,Ge,Ae[Ge]);if(de)for(var Ge of de(Ae))z.call(Ae,Ge)&&ee(Re,Ge,Ae[Ge]);return Re},ie=(Re,Ae)=>ce(Re,ve(Ae)),se=(Re,Ae,Ge)=>new Promise((Ke,Ze)=>{var at=nn=>{try{tn(Ge.next(nn))}catch(Jt){Ze(Jt)}},xt=nn=>{try{tn(Ge.throw(nn))}catch(Jt){Ze(Jt)}},tn=nn=>nn.done?Ke(nn.value):Promise.resolve(nn.value).then(at,xt);tn((Ge=Ge.apply(Re,Ae)).next())});const le={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"]}},ye=(Re,Ae)=>Ae.map(Ge=>({label:Ge,kind:Re.languages.CompletionItemKind.Keyword,insertText:Ge})),we=Re=>Object.keys(le.tables).map(Ae=>({label:Ae,kind:Re.languages.CompletionItemKind.Variable,insertText:Ae})),be=(Re,Ae)=>{const Ge=le.tables[Re];return Ge?Ge.map(Ke=>({label:Ke,kind:Ae.languages.CompletionItemKind.Field,insertText:Ke})):[]};function ke(Re,Ae,Ge,Ke,Ze){let at=Ae.getWordUntilPosition(Ge),xt={startLineNumber:Ge.lineNumber,endLineNumber:Ge.lineNumber,startColumn:at.startColumn,endColumn:at.endColumn},tn=Ke.map(nn=>({label:nn,kind:Re.languages.CompletionItemKind.Keyword,insertText:nn,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xt}));return Ze.map(nn=>{tn.push(ie(oe({},nn),{range:xt}))}),tn}var Ne=Re=>{le.languages.map(Ze=>(Re.languages.registerDocumentFormattingEditProvider(Ze,{provideDocumentFormattingEdits(at,xt,tn){return se(this,null,function*(){const nn=xe()(at.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:at.getFullModelRange(),text:nn}]})}}),Ze));const Ae=Ce.quickKey.map(Ze=>({label:Ze.label,kind:Re.languages.CompletionItemKind.Method,insertText:Ze.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ge=_e.quickKey.map(Ze=>({label:Ze.label,kind:Re.languages.CompletionItemKind.Method,insertText:Ze.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ke=Te.quickKey.map(Ze=>({label:Ze.label,kind:Re.languages.CompletionItemKind.Method,insertText:Ze.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Re.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ze,at){var xt=Ze.getWordUntilPosition(at),tn={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},nn=Ze.getLineContent(at.lineNumber).substring(xt.startColumn-2,xt.endColumn);return{suggestions:[...Ce.keywords.map(Jt=>({label:Jt,kind:Re.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...Ce.quickKey.map(Jt=>({label:Jt.label,kind:Re.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:nn.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ze,at){var xt=Ze.getWordUntilPosition(at),tn={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn};return{suggestions:[...Ie.keywords.map(nn=>({label:nn,kind:Re.languages.CompletionItemKind.Function,documentation:nn,insertText:nn,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ze,at){var xt=Ze.getWordUntilPosition(at),tn={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},nn=Ze.getLineContent(at.lineNumber).substring(xt.startColumn-2,xt.endColumn);return{suggestions:[...Te.keywords.map(Jt=>({label:Jt,kind:Re.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...Te.quickKey.map(Jt=>({label:Jt.label,kind:Re.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:nn.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ze,at){var xt=Ze.getWordUntilPosition(at),tn={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},nn=Ze.getLineContent(at.lineNumber).substring(xt.startColumn-2,xt.endColumn);return{suggestions:[...he.keywords.map(Jt=>({label:Jt,kind:Re.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),...he.quickKey.map(Jt=>({label:Jt.label,kind:Re.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:nn.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ze,at){var xt=Ze.getWordUntilPosition(at),tn={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},nn=Ze.getLineContent(at.lineNumber).substring(xt.startColumn-2,xt.endColumn);return{suggestions:[..._e.keywords.map(Jt=>({label:Jt,kind:Re.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn})),..._e.quickKey.map(Jt=>({label:Jt.label,kind:Re.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:nn.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}})};const je="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ve=Object.defineProperty,Je=(Re,Ae,Ge)=>Ae in Re?Ve(Re,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Re[Ae]=Ge,We=(Re,Ae,Ge)=>Je(Re,typeof Ae!="symbol"?Ae+"":Ae,Ge);const gt=class mx{constructor(Ae,Ge,Ke){this.placeholder=Ae,this.editor=Ge,this.monaco=Ke,Ge.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)}};We(gt,"ID","editor.widget.placeholderHint");var bt=gt,rt=Ee(96236),St=Ee(8591),ct=Ee(6848),Bt=Ee(89392),ht=Ee(50484),it=Ee(56102),dt=Object.defineProperty,yt=Object.defineProperties,Et=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,un=(Re,Ae,Ge)=>Ae in Re?dt(Re,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Re[Ae]=Ge,Vt=(Re,Ae)=>{for(var Ge in Ae||(Ae={}))Rt.call(Ae,Ge)&&un(Re,Ge,Ae[Ge]);if(vt)for(var Ge of vt(Ae))jt.call(Ae,Ge)&&un(Re,Ge,Ae[Ge]);return Re},xn=(Re,Ae)=>yt(Re,Et(Ae)),Ut=(Re,Ae)=>{var Ge={};for(var Ke in Re)Rt.call(Re,Ke)&&Ae.indexOf(Ke)<0&&(Ge[Ke]=Re[Ke]);if(Re!=null&&vt)for(var Ke of vt(Re))Ae.indexOf(Ke)<0&&jt.call(Re,Ke)&&(Ge[Ke]=Re[Ke]);return Ge},Zt=(Re,Ae,Ge)=>new Promise((Ke,Ze)=>{var at=nn=>{try{tn(Ge.next(nn))}catch(Jt){Ze(Jt)}},xt=nn=>{try{tn(Ge.throw(nn))}catch(Jt){Ze(Jt)}},tn=nn=>nn.done?Ke(nn.value):Promise.resolve(nn.value).then(at,xt);tn((Ge=Ge.apply(Re,Ae)).next())});function Xt(Re){return/^\d+$/.test(Re)?`${Re}px`:Re}function mt(){}let ze=!1;const Be={"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 qe(Re=[]){let Ae=Re;if(Array.isArray(Re)){for(let Ge=0;Ge<Re.length;Ge++){let Ke=Be[Re[Ge]];if(Ke)return Ke}return Ae[0]}return Be[Ae]||Ae}let Qe=null;var Ue=Re=>{var Ae=Re,{width:Ge="100%",height:Ke="100%",value:Ze,language:at="javascript",style:xt={},options:tn={},overrideServices:nn={},theme:Jt="vs-dark",onEditBlur:mn,isCopy:kn=!1,onSave:fn,autoHeight:Mn=!1,forbidCopy:Zn=!1,onChange:Tn=mt,editorDidMount:ci=mt,onFocus:ai=mt,onBreakPoint:ki=mt,breakPointValue:Ci=[],filename:or="educoder.txt",errorLine:tr,errorContent:pr="",highlightLine:cr,openBreakPoint:to=!1,placeholder:no=""}=Ae,di=Ut(Ae,["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 Cr=(0,Le.useRef)(),zi=(0,Le.useRef)({}),st=(0,Le.useRef)(),Dr=(0,Le.useRef)(),Mr=(0,Le.useRef)([]),xo=(0,Le.useRef)(!1),Gr=(0,Le.useRef)(),uo=(0,Le.useRef)(),Zr=(0,Le.useRef)(!1),[co,cn]=(0,Le.useState)(!1);function $e(){let Gt;return Cr.current&&(Gt=new me.Z(sn=>{for(let Bn of sn)(Bn.target.offsetHeight>0||Bn.target.offsetWidth>0)&&zi.current.instance.layout()}),Gt.observe(Cr.current)),Gt}function tt(){St.ZP.warning({content:decodeURIComponent(je),key:"monaco-editor-tip"})}const et=()=>{let Gt=zi.current.instance;if(Ze!=null&&Gt&&co){const sn=Gt.getModel();sn&&Ze!==sn.getValue()&&(ze=!0,sn.setValue(Ze),Gt.layout(),ze=!1)}};(0,Le.useEffect)(()=>{const Gt=ht.Z.subscribe("formatDocument",sn=>{var Bn;let Nn=zi.current.instance;(Bn=Nn==null?void 0:Nn.getAction)==null||Bn.call(Nn,"editor.action.formatDocument").run()});return window.updateMonacoValue=sn=>{Tn(sn)},Gt},[]),(0,Le.useEffect)(()=>{var Gt;let sn=zi.current.instance;Dr.current&&clearTimeout(Dr.current),Dr.current=setTimeout(()=>{et()},500),Ze&&(Ze!=null&&Ze.length)&&((Gt=sn==null?void 0:sn.updateOptions)==null||Gt.call(sn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ze.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ze,co,zi.current]),(0,Le.useEffect)(()=>{if(tr&&zi.current&&zi.current.instance){let sn=zi.current.instance;sn.changeViewZones(function(Bn){var Nn=document.createElement("div");Nn.style.padding="10px 20px",Nn.style.width="calc(100% - 20px)",Nn.className="my-error-line-wrp",Nn.innerHTML=pr,Bn.addZone({afterLineNumber:tr||11,heightInLines:3,domNode:Nn})});var Gt={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}};sn.addOverlayWidget(Gt),sn.revealPositionInCenter({lineNumber:20,column:1})}},[tr,zi.current,co]);const Pt=(Gt="",sn)=>{if(!Gt||Gt.trim()==="")return!0;const Nn=zi.current.instance.getModel().getLineTokens(sn);let qn=!1;for(let Gn=0;Gn<2;Gn++)Nn.getStandardTokenType(Gn)===1&&(qn=!0);return qn};(0,Le.useEffect)(()=>{var Gt;const sn=(Gt=zi.current)==null?void 0:Gt.instance;if(sn&&co&&Zn){const Bn=sn.onDidBlurEditorWidget(()=>{Zr.current=!1}),Nn=sn.onDidFocusEditorText(()=>{Zr.current=!0});return()=>{Bn.dispose(),Nn.dispose()}}},[zi.current,co,Zn]),(0,Le.useEffect)(()=>{var Gt;if((Gt=zi.current)!=null&&Gt.instance&&co&&to){let sn=zi.current.instance,Bn=sn.getModel();if(!Bn)return;(()=>{var Ai;let an=[],si=[];const wi=Bn.getAllDecorations();for(let Wi of wi)Wi.options.className==="highlighted-line"&&(an.push((Ai=Wi==null?void 0:Wi.range)==null?void 0:Ai.startLineNumber),si.push(Wi==null?void 0:Wi.id));if(cr===an[0])return;Bn.deltaDecorations(si,[]);const pi=Bn.getLineCount();cr&&cr<=pi&&(sn.deltaDecorations([],[{range:new Qe.Range(cr,1,cr,Bn.getLineMaxColumn(cr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),sn.revealLineInCenter(cr))})();const qn=(Ai=!1)=>{var an;let si=[],wi=[];const pi=Bn.getAllDecorations();for(let Wi of pi)Wi.options.linesDecorationsClassName==="breakpoints-select"&&(si.push((an=Wi==null?void 0:Wi.range)==null?void 0:an.startLineNumber),wi.push(Wi==null?void 0:Wi.id));if(Ai)return{lines:si,ids:wi};ki(si)},Gn=Ai=>Zt(void 0,null,function*(){let an={range:new Qe.Range(Ai,1,Ai,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Bn.deltaDecorations([],[an]),qn()}),Jn=Ai=>Zt(void 0,null,function*(){let an=[];const si=sn.getLineDecorations(Ai);for(let wi of si)wi.options.linesDecorationsClassName==="breakpoints-select"&&an.push(wi.id);yield Bn.deltaDecorations(an,[]),qn()}),Dn=Ai=>{let an=sn.getLineDecorations(Ai);for(let si of an)if(si.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Bt.isEqual)(Ci,qn(!0).lines)){Bn.deltaDecorations(qn(!0).ids,[]);const Ai=Ci.map(an=>({range:new Qe.Range(an,1,an,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Bn.deltaDecorations([],Ai)}const ri=sn.onDidChangeModelContent(Ai=>{let an=sn.getPosition();if(an){let si=an.lineNumber;clearTimeout(uo.current),uo.current=setTimeout(()=>{Pt(Bn.getLineContent(si),si)?Jn(si):Dn(si)?(Jn(si),Gn(si)):qn()},100)}}),Mi=sn.onMouseDown(Ai=>{var an,si,wi;if(Ai.target.detail&&((wi=(si=(an=Ai.target)==null?void 0:an.element)==null?void 0:si.className)!=null&&wi.includes("line-numbers"))){let pi=Ai.target.position.lineNumber;if(Pt(Bn.getLineContent(pi),pi))return;Dn(pi)?Jn(pi):Gn(pi)}}),Hn=Ai=>{let an={range:new Qe.Range(Ai,1,Ai,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Mr.current=sn.deltaDecorations(Mr.current,[an])},oi=()=>{Mr.current=sn.deltaDecorations(Mr.current,[])},Bi=sn.onMouseMove(Ai=>{var an,si,wi;if(oi(),Ai.target.detail&&((wi=(si=(an=Ai.target)==null?void 0:an.element)==null?void 0:si.className)!=null&&wi.includes("line-numbers"))){let pi=Ai.target.position.lineNumber;if(Pt(Bn.getLineContent(pi),pi))return;Hn(pi)}}),lr=sn.onMouseLeave(()=>{oi()});return()=>{ri.dispose(),Mi.dispose(),Bi.dispose(),lr.dispose()}}},[zi.current,co,Ci,cr,to,at]),(0,Le.useEffect)(()=>{var Gt;(Gt=zi.current)!=null&&Gt.instance&&to&&zi.current.instance.setPosition({lineNumber:0,column:0})},[cr]);function At(){let Gt=zi.current.instance;if(Gt){const sn=Gt.getSelection(),Bn=zi.current.pastePos||{},Nn=new Qe.Range(Bn.startLineNumber||sn.endLineNumber,Bn.startColumn||sn.endColumn,Bn.endLineNumber||sn.endLineNumber,Bn.endColumn||sn.endColumn);setTimeout(()=>{Gt.executeEdits("",[{range:Nn,text:""}])},300)}}function kt(Gt){(window.navigator.platform.match("Mac")?Gt.metaKey:Gt.ctrlKey)&&Gt.keyCode==83&&(Gt.preventDefault(),fn())}const Ct=()=>{if(Mn&&zi.current.instance){const Gt=zi.current.instance.getContentHeight();bn(Gt<Ke?Ke:Gt)}else bn(Ke)};function dn(Gt){var sn=document.createEvent("MouseEvents");sn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Gt.dispatchEvent(sn)}const _n=Gt=>{if(!Zr.current)return;const{keyCode:sn,ctrlKey:Bn,metaKey:Nn,target:qn,type:Gn}=Gt;return(Gn==="paste"||(sn===67||sn===86)&&(Nn||Bn))&&qn.nodeName==="TEXTAREA"&&(tt(),Gt.preventDefault()),!1};function zn(Gt,sn){var Bn=window.URL||window.webkitURL||window,Nn=new Blob([sn]),qn=document.createElementNS("http://www.w3.org/1999/xhtml","a");qn.href=Bn.createObjectURL(Nn),qn.download=Gt,dn(qn)}(0,Le.useEffect)(()=>{Ct()},[Ct]),(0,Le.useEffect)(()=>{Cr.current&&!co&&Promise.all([Ee.e(8909),Ee.e(6894)]).then(Ee.bind(Ee,71448)).then(Gt=>{try{Qe=Gt,zi.current.instance=Qe.editor.create(Cr.current,{value:Ze,language:qe(at),theme:Jt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},nn);const sn=zi.current.instance;let qn=[...rt.BH._menuItems].find(ri=>ri[0]._debugName=="EditorContext")[1],Gn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Jn=(ri,Mi)=>{var Hn,oi;let Bi=ri._first;do Mi.includes((oi=(Hn=Bi.element)==null?void 0:Hn.command)==null?void 0:oi.id)&&ri._remove(Bi);while(Bi=Bi.next)};if(ci(sn,Qe),setTimeout(()=>{Ct(),zi.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{zn(or||"educoder.txt",sn.getValue())}})},500),zi.current.subscription=sn.onDidChangeModelContent(ri=>{xo.current?clearTimeout(Gr.current):(Ct(),Tn(sn.getValue(),ri)),Gr.current=setTimeout(()=>{xo.current=!1},500)}),window.Monaco||Ne(Qe,qe(at)),Zn&&(Jn(qn,Gn),Cr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",_n),window.removeEventListener("paste",_n),window.addEventListener("keydown",_n),window.addEventListener("paste",_n)),window.Monaco=Qe,mn&&sn.onDidBlurEditorWidget(()=>{mn(sn.getValue())}),ai&&sn.onDidFocusEditorText(()=>{ai(sn.getValue())}),Zn)try{sn.onDidPaste(ri=>{const Mi=sn.getSelection(),Hn=zi.current.pastePos||{},oi=new Qe.Range(Hn.startLineNumber||Mi.endLineNumber,Hn.startColumn||Mi.endColumn,Hn.endLineNumber||Mi.endLineNumber,Hn.endColumn||Mi.endColumn);sn.executeEdits("",[{range:ri.range,text:""}])})}catch(ri){}let Dn=$e();return no&&typeof no=="string"&&new bt(no,sn,Qe),cn(!0),()=>{const ri=zi.current.instance;ri.dispose();const Mi=ri.getModel();Mi&&Mi.dispose(),zi.current.subscription&&zi.current.subscription.dispose(),Dn.unobserve(Cr.current)}}catch(sn){}})},[]),(0,Le.useEffect)(()=>{if(zi.current.instance&&co)return document.addEventListener("keydown",kt,!1),()=>{document.removeEventListener("keydown",kt)}},[fn,co]),(0,Le.useEffect)(()=>{let Gt=zi.current.instance;if(Gt&&co){let sn=qe(at);Qe.editor.setModelLanguage(Gt.getModel(),sn)}},[at,co]),(0,Le.useEffect)(()=>{zi.current.instance&&co&&Qe.editor.setTheme(Jt)},[Jt,co]),(0,Le.useEffect)(()=>{let Gt=zi.current.instance;st.current=tn,Gt&&co&&(Gt.updateOptions(Vt({},tn)),setTimeout(()=>{Gt.getModel().updateOptions(Vt({},tn))},200))},[JSON.stringify(tn),co]),(0,Le.useEffect)(()=>{let Gt=zi.current.instance;Gt&&co&&Gt.layout()},[Ge,Ke,co]);const[wn,Ft]=(0,Le.useState)(Xt(Ge)),[$t,bn]=(0,Le.useState)(Xt(Ke)),An=xn(Vt({},xt),{width:wn,height:$t,position:"relative"});return Le.createElement("div",{className:"my-monaco-editor",ref:Cr,style:An},kn&&Le.createElement(it.CopyToClipboard,{text:Ze,onCopy:()=>St.ZP.success("\u590D\u5236\u6210\u529F")},Le.createElement(ct.Z,{title:"\u590D\u5236\u4EE3\u7801"},Le.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Le.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Xe({width:Re="100%",height:Ae="100%",original:Ge,modified:Ke,language:Ze,options:at={}}){const xt=(0,Le.useRef)(),[tn,nn]=(0,Le.useState)(null);function Jt(Mn){let Zn;return xt.current&&(Zn=new me.Z(Tn=>{for(let ci of Tn)(ci.target.offsetHeight>0||ci.target.offsetWidth>0)&&Mn.layout()}),Zn.observe(xt.current)),Zn}(0,Le.useEffect)(()=>(xt.current&&Promise.all([Ee.e(8909),Ee.e(9404)]).then(Ee.bind(Ee,2550)).then(Mn=>{Qe=Mn;const Zn=Qe.editor.createDiffEditor(xt.current,xn(Vt({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},at),{wordWrap:!0}));nn(Zn);let Tn=Jt(Zn);return()=>{Zn.dispose();const ci=Zn.getModel();ci&&ci.dispose(),Tn.unobserve(xt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Le.useEffect)(()=>{tn&&tn.setModel({original:Qe.editor.createModel(Ge,Ze),modified:Qe.editor.createModel(Ke,Ze)})},[Ge,Ke,Ze,tn]);const mn=Xt(Re),kn=Xt(Ae),fn={width:mn,height:kn};return Le.createElement("div",{className:"my-diff-editor",ref:xt,style:fn})}},34043:function(Pn,qt,Ee){"use strict";var Le=Ee(58323),me=Ee(57809),Ie=Ee(78673),Te=Ee(59301);const Ce=me.default.Option;qt.Z=({isTheoretical:_e,onFontSizeChange:he,cmFontSize:Se,cmCodeMode:xe,autoFormat:ge,onCodeModeChange:ce,onTabToSpace:ve,onAutoFormat:de,formatDocument:ue,className:z="",tabToSpace:ee,children:oe,code_editor:ie,challenge:se})=>{const le={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return Te.createElement("div",{className:`tpi-code-setting ${z}`},Te.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Te.createElement("section",null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Te.createElement(me.default,{bordered:!1,size:"small",value:xe,onChange:ce},Te.createElement(Ce,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Te.createElement(Ce,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!_e&&Te.createElement(Te.Fragment,null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Te.createElement(me.default,{bordered:!1,size:"small",value:Se,onChange:he},Te.createElement(Ce,{value:12},"12px"),Te.createElement(Ce,{value:14},"14px"),Te.createElement(Ce,{value:16},"16px"),Te.createElement(Ce,{value:18},"18px"),Te.createElement(Ce,{value:20},"20px"),Te.createElement(Ce,{value:22},"22px"))),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"Tab\u8F6C\u6362"),Te.createElement(Ie.Z,{checked:ee,onChange:ve})),Te.createElement("div",{className:"file-item",onClick:ue},Te.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!_e&&Te.createElement(Te.Fragment,null,Te.createElement("h3",null,"\u5FEB\u6377\u952E"),Te.createElement("section",null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Te.createElement("span",null,"Ctrl + S")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Te.createElement("span",null,"F1 / Alt + F1")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Te.createElement("span",null,"Ctrl + ]/[")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Te.createElement("span",null,"Ctrl + Shift + \\")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Te.createElement("span",null,"Home")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Te.createElement("span",null,"End"))),oe),!_e&&Te.createElement(Te.Fragment,null,Te.createElement("h3",null,"\u5FEB\u6377\u952E"),Te.createElement("section",null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Te.createElement("span",null,le[se==null?void 0:se.difficulty])),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Te.createElement("span",null,ie==null?void 0:ie.name)),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Te.createElement("span",null,ie!=null&&ie.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},50505:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});var Le=Ee(59301);function me(Ie,Te){const Ce=(0,Le.useRef)();(0,Le.useEffect)(()=>{Ce.current=Ie}),(0,Le.useEffect)(()=>{function _e(){Ce.current()}if(Te!==null){let he=setInterval(_e,Te);return()=>clearInterval(he)}},[Te])}},70037:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Im:function(){return Ve},ZP:function(){return rt},gZ:function(){return ut}});var Le=Ee(59301),me=Ee(92832),Ie=Ee(3113),Te=Ee(84105),Ce=Ee(87395),_e=Ee(86723),he=Ee(24334),Se=Ee(7651),xe=Ee(99325),ge=Ee(88230),ce=Ee(75618),ve=Ee(34376),de=Ee(92310),ue=Ee.n(de),z=Ee(59301),ee=Object.defineProperty,oe=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,we=(St,ct,Bt)=>ct in St?ee(St,ct,{enumerable:!0,configurable:!0,writable:!0,value:Bt}):St[ct]=Bt,be=(St,ct)=>{for(var Bt in ct||(ct={}))le.call(ct,Bt)&&we(St,Bt,ct[Bt]);if(se)for(var Bt of se(ct))ye.call(ct,Bt)&&we(St,Bt,ct[Bt]);return St},ke=(St,ct)=>oe(St,ie(ct));const{TextArea:Ne}=me.default,je={visible:!1,tabIndex:"0"},Ve={[_e.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[_e.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[_e.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 Je=(St=>(St[St.SET_VISIBLE=0]="SET_VISIBLE",St[St.SET_TABINDEX=1]="SET_TABINDEX",St))(Je||{});function We(St,ct){switch(ct.type){case 0:return ke(be({},St),{visible:ct.payload});case 1:return ke(be({},St),{tabIndex:ct.payload});default:throw new Error}}function gt({value:St,className:ct}){const[Bt,ht]=(0,Le.useState)(!1),it=(0,Le.useRef)(),dt=(0,Le.useRef)();return(0,Le.useEffect)(()=>{Bt&&(dt.current.reset(),dt.current.write((0,ge.pp)(St||"")))},[St,Bt]),(0,Le.useEffect)(()=>{var yt,Et,vt,Rt;if(it.current){dt.current=new ve.Terminal({fontSize:14,disableStdin:!0}),dt.current.open(it.current);const jt=it.current.offsetWidth-14,un=((Rt=(vt=(Et=(yt=dt.current)==null?void 0:yt._core)==null?void 0:Et._renderService)==null?void 0:vt.dimensions)==null?void 0:Rt.actualCellWidth)||9.5,Vt=Math.ceil(jt/un);dt.current.resize(Vt,8),ht(!0)}},[]),z.createElement("div",{ref:it,className:ue()("XtermText-valueRef",ct)})}function ut(St){const{status:ct,error_msg:Bt,output:ht,input:it,expected_output:dt,is_file:yt,input_file_url:Et,output_file_url:vt,expected_output_file_url:Rt}=St;let jt=null;const un={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(ct){case _e.h.NOMATCH:jt=z.createElement(z.Fragment,null,z.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!yt&&z.createElement(gt,{className:"mb10",value:it}),yt&&z.createElement("div",{style:un},z.createElement("a",{onClick:()=>(0,ge.LR)(Et,it)},it)),z.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!yt&&z.createElement(gt,{className:"mb10",value:ht&&he.Base64.decode(ht)||""}),yt&&z.createElement("div",{style:un},z.createElement("a",{onClick:()=>(0,ge.LR)(vt,ht)},ht)),z.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!yt&&z.createElement(gt,{className:"mb10",value:dt&&he.Base64.decode(dt)||""}),yt&&z.createElement("div",{style:un},z.createElement("a",{onClick:()=>(0,ge.LR)(Rt,dt)},dt)));break;case _e.h.EXECUTEFAILURE:jt=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!yt&&z.createElement(xe.Z,{value:it,style:un}),yt&&z.createElement("div",{style:un},z.createElement("a",{onClick:()=>(0,ge.LR)(Et,it)},it)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(Bt)));break;case _e.h.COMPILEFAILURE:jt=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!yt&&z.createElement(xe.Z,{value:it,style:un}),yt&&z.createElement("div",{style:un},z.createElement("a",{onClick:()=>(0,ge.LR)(Et,it)},it)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(Bt)));break;case _e.h.PODFAILURE:jt=z.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case _e.h.TIMEOUT:jt=z.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return z.createElement(z.Fragment,null," ",jt," ")}function bt(St){const{status:ct,error_msg:Bt,execute_time:ht,output:it,input:dt,expected_output:yt,is_file:Et,input_file_url:vt,output_file_url:Rt,expected_output_file_url:jt}=St;let un=null;switch(ct){case _e.h.OK:un=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",ht,"\u79D2"),z.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),z.createElement("pre",null,he.Base64.decode(it)));break;case _e.h.NOMATCH:un=z.createElement(z.Fragment,null,z.createElement("p",null,"\u8F93\u5165\uFF1A",z.createElement("pre",null,dt)),z.createElement("p",null,"\u8F93\u51FA\uFF1A",it&&he.Base64.decode(it)),z.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",yt&&he.Base64.decode(yt)));break;case _e.h.EXECUTEFAILURE:un=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",z.createElement("pre",null,dt)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(Bt)));break;case _e.h.COMPILEFAILURE:un=z.createElement(z.Fragment,null,z.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",z.createElement("pre",null,dt)),z.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),z.createElement("pre",{className:"error"},he.Base64.decode(Bt)));break;case _e.h.PODFAILURE:un=z.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case _e.h.TIMEOUT:un=z.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return z.createElement(z.Fragment,null," ",un," ")}var rt=({id:St,is_file:ct,input:Bt,debuging:ht,submitting:it,executingMessage:dt,debugResult:yt,onChangeInput:Et,onDebugCode:vt,onSubmitCode:Rt})=>{const[jt,un]=(0,Le.useReducer)(We,je),{visible:Vt,tabIndex:xn}=jt;(0,Le.useEffect)(()=>{un({type:0,payload:!1})},[St]);function Ut(ze){let Be=ze.target.id;un({type:1,payload:Be})}function Zt(){un({type:0,payload:!Vt})}const Xt=(0,Le.useMemo)(()=>{if(yt){const{status:ze}=yt;return z.createElement(z.Fragment,null,bt(yt))}return null},[yt]);function mt(){un({type:0,payload:!0}),un({type:1,payload:"1"}),vt()}return z.createElement("div",{className:"test-case-panel"},z.createElement("div",{className:`test-case-panel-body ${Vt?"active":""}`},z.createElement("ul",{className:"s-navs"},z.createElement("li",null,z.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),z.createElement(ce.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:z.createElement(Ne,{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:ct?"":Bt,onChange:Et}),rightNode:ht?z.createElement(Se.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):yt?Xt: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 ${Vt?"up":""}`,onClick:Zt},Vt?z.createElement(Te.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(Ie.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),z.createElement(Ie.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),z.createElement(Ie.ZP,{className:"btn-green",type:"ghost",loading:ht,onClick:mt},"\u8C03\u8BD5\u4EE3\u7801"),z.createElement(Ie.ZP,{type:"primary",className:"custom-ant-disabled",loading:it,disabled:it,onClick:()=>{un({type:0,payload:!1}),Rt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},68115:function(Pn,qt,Ee){"use strict";Ee.r(qt),Ee.d(qt,{default:function(){return Dt}});var Le=Ee(59301),me=Ee(10906),Ie=Ee(76618),Te=Ee(24459),Ce=Ee(31797),_e=Ee(8591),he=Ee(43418),Se=Ee(71418),xe=Ee(57809),ge=Ee(53576),ce=Ee(31582),ve=Ee(38446),de=Ee(87169),ue=Ee(43428),z=Ee(57800),ee=Ee(19647),oe=Ee(90691),ie=Ee(34043),se=Ee(59301),le=Object.defineProperty,ye=Object.defineProperties,we=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,je=(pt,_t,Lt)=>_t in pt?le(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,Ve=(pt,_t)=>{for(var Lt in _t||(_t={}))ke.call(_t,Lt)&&je(pt,Lt,_t[Lt]);if(be)for(var Lt of be(_t))Ne.call(_t,Lt)&&je(pt,Lt,_t[Lt]);return pt},Je=(pt,_t)=>ye(pt,we(_t));const We={theme:(0,oe.G)("cmCodeMode","vs-dark"),fontSize:(0,oe.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,oe.G)("cmTabToSpace",!0)};var gt=(pt=>(pt[pt.set_font_size=0]="set_font_size",pt[pt.set_theme=1]="set_theme",pt[pt.on_tab_to_space=2]="on_tab_to_space",pt[pt.set_show_editor_setting=3]="set_show_editor_setting",pt))(gt||{});function ut(pt,_t){switch(_t.type){case 3:return Je(Ve({},pt),{showEditorSetting:_t.payload});case 1:return Je(Ve({},pt),{theme:_t.payload});case 0:return Je(Ve({},pt),{fontSize:_t.payload});case 2:return Je(Ve({},pt),{tabToSpace:_t.payload});default:throw new Error}}var bt=({isLoading:pt,value:_t,onChange:Lt,language:Sn,onUpdateCode:hn,ActionBarRender:on=vn=>se.createElement(rt,{onShowCodeSetting:vn})})=>{const[vn,yn]=(0,Le.useReducer)(ut,We),{theme:Cn,fontSize:jn,showEditorSetting:ti,tabToSpace:Kn}=vn,xi=(0,Le.useRef)(),Vn=(0,Le.useRef)(),mi={onFontSizeChange:Zi=>{yn({type:0,payload:Zi}),(0,oe.t)("cmFontSize",Zi)},tabToSpace:Kn,cmFontSize:jn,className:"oj",cmCodeMode:Cn,onTabToSpace:Zi=>{yn({type:2,payload:Zi}),(0,oe.t)("cmTabToSpace",Zi)},onCodeModeChange:Zi=>{yn({type:1,payload:Zi}),(0,oe.t)("cmCodeMode",Zi)}};function li(){yn({type:3,payload:!1})}function Ri(){yn({type:3,payload:!0})}const Di={value:_t,language:Sn,theme:Cn,height:"calc(100% - 56px)",options:{fontSize:jn,insertSpaces:Kn},onChange:Zi=>{Lt(Zi),Vn.current=Zi,clearTimeout(xi.current),xi.current=setTimeout(()=>{hn(Vn.current)},1e4)},onEditBlur:Zi=>{Vn.current&&hn(Vn.current)}};return se.createElement(Le.Fragment,null,se.createElement("div",{className:"code-panel-container"},on(Ri),!pt&&se.createElement(z.ZP,Ve({},Di))),se.createElement(ee.Z,null,se.createElement(ue.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ti,onClose:li},se.createElement(ie.Z,Ve({},mi)))))};function rt({onShowCodeSetting:pt}){return se.createElement("div",{className:"action-bar"},se.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),se.createElement("a",{onClick:pt},se.createElement("i",{className:"iconfont icon-shezhi"})))}var St=Ee(24334),ct=Ee(95910),Bt=Ee(70037),ht=Ee(92832),it=Ee(78241),dt=Ee(3113);const{TextArea:yt}=ht.default,Et=5e3;var vt=({callback:pt,onCancel:_t,notes:Lt})=>{function Sn(hn){pt(hn)}return Le.createElement(it.default,{className:"note-form-panel",onFinish:Sn,initialValues:{notes:Lt}},Le.createElement(it.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:Et,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${Et}`}]},Le.createElement(yt,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),Le.createElement(it.default.Item,{style:{textAlign:"right"}},Le.createElement(dt.ZP,{type:"ghost",onClick:_t,style:{marginRight:10}}," \u53D6\u6D88 "),Le.createElement(dt.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},Rt={"left-panel":"left-panel___fP6Y3","tab-panel-body":"tab-panel-body___aLOJQ",b1:"b1___ELpwD","oj-mr":"oj-mr___SIQSw","oj-width-input":"oj-width-input___tR_Si","s-navs":"s-navs___iVrSH","bg-white":"bg-white___S0kiU",active:"active___D332c"},jt={pagination:"pagination___npPu7",info:"info___aRH6C"},un=Ee(1710),Vt=Ee(58421),xn=Ee(58617),Ut=Ee(81953),Zt=Ee(86723),Xt=Ee(88230),mt=Ee(61186),ze=Ee.n(mt);const{Column:Be}=un.default;var qe=({submitResult:pt,submitting:_t,submitRecords:Lt,page:Sn,onPageChange:hn,topicId:on})=>{const{status:vn,id:yn,input:Cn,output:jn,expected_output:ti,is_file:Kn,input_file_url:xi,output_file_url:Vn,expected_output_file_url:mi,error_msg:li}=pt||{},{records:Ri,records_count:Di}=Lt||{},Zi=(0,Te.useParams)();function Oi(){Kn?navigator.clipboard.writeText(St.Base64.decode(li)).then(()=>{_e.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(St.Base64.decode(jn)).then(()=>{_e.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return Le.createElement(Se.Z,{spinning:_t,tip:"\u8BC4\u6D4B\u4E2D...",indicator:Le.createElement(xn.Z,{style:{fontSize:24},spin:!0})},yn?Le.createElement(Le.Fragment,null,Le.createElement("ul",{className:jt.info},Le.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",Le.createElement("span",{className:vn===Zt.h.OK?"c-green":"c-red"},Bt.Im[vn])),Le.createElement("li",{className:jt.error},Le.createElement("a",{onClick:Oi},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",Le.createElement(Ut.Z,null)," ")),Le.createElement("li",null,Le.createElement(Te.Link,{to:`/problems/${on}/record-detail/${yn}?backId=${Zi==null?void 0:Zi.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),vn!==Zt.h.OK?Le.createElement(Le.Fragment,null,Le.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),Le.createElement("pre",null,!Kn&&Cn,Kn&&Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Xt.LR)(xi,Cn)},Cn)),Le.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),Le.createElement("pre",null,(vn===4||vn===5)&&St.Base64.decode(li),vn!=4&&vn!=5&&(Kn?Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Xt.LR)(Vn,jn)},jn):St.Base64.decode(jn))),Le.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),Le.createElement("pre",null,!Kn&&St.Base64.decode(ti),Kn&&Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Xt.LR)(mi,ti)},ti))):null):null,(Ri==null?void 0:Ri.length)>0?Le.createElement(un.default,{dataSource:Ri,rowKey:"id",pagination:!1},Le.createElement(Be,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(Ii,ar)=>Le.createElement("span",null," ",ze()(Ii).format("YYYY-MM-DD HH:mm:ss"))}),Le.createElement(Be,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(Ii,ar)=>{var ei;return Le.createElement(Te.Link,{className:Ii===0?"c-green":"c-red",to:`/problems/${on}/record-detail/${ar.id}?backId=${Zi==null?void 0:Zi.save_identifier}`},(ei=Bt.Im[Ii])==null?void 0:ei.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),Le.createElement(Be,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),Le.createElement(Be,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),Le.createElement(Be,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,Di>15?Le.createElement(Vt.Z,{className:jt.pagination,current:Sn,pageSize:15,total:Di,onChange:hn}):null)},Qe=Ee(57816),Ue=Ee(12563),Xe=Ee(81327),Re={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Ae=Ee(99325),Ge=Ee(59301);const Ke={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var Ze=({hack:pt,onTriggerPraise:_t,toDiscuss:Lt})=>{const{language:Sn,difficulty:hn,time_limit:on,username:vn,user_path:yn,user_praise:Cn,comments_count:jn,praises_count:ti,description:Kn,pass_count:xi,submit_count:Vn}=pt,mi=(0,Te.useLocation)();console.log(pt.language,"language");const li=Ke[hn];return Ge.createElement(Ge.Fragment,null,Ge.createElement("ul",{className:Re.info},Ge.createElement("li",null,"\u96BE\u5EA6\uFF1A",Ge.createElement(Ue.default,{color:li==null?void 0:li.color},li==null?void 0:li.name)),Ge.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",Ge.createElement("b",null,on,"\u79D2"))),Ge.createElement(Ae.Z,{value:Kn,className:Re.desc}),Ge.createElement("ul",{className:Re["commit-info"]},Ge.createElement("li",null,Ge.createElement(Xe.Z,{size:4},Ge.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",Ge.createElement("b",null,xi))),Ge.createElement("li",null,Ge.createElement(Xe.Z,{size:4},Ge.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",Ge.createElement("b",null,Vn))," "),Ge.createElement("li",{style:{flex:"1 0 0"}}),Ge.createElement("li",null,Ge.createElement(Xe.Z,{size:4},Ge.createElement("i",{className:"iconfont icon-huifu1",onClick:Lt})," ",Ge.createElement("b",null,jn))," ")))},at=Ee(50484),xt=Object.defineProperty,tn=Object.getOwnPropertySymbols,nn=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable,mn=(pt,_t,Lt)=>_t in pt?xt(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,kn=(pt,_t)=>{for(var Lt in _t||(_t={}))nn.call(_t,Lt)&&mn(pt,Lt,_t[Lt]);if(tn)for(var Lt of tn(_t))Jt.call(_t,Lt)&&mn(pt,Lt,_t[Lt]);return pt};const fn=pt=>React.createElement("svg",kn({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},pt),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 Mn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Zn=Ee(7660);function Tn(pt){return(0,Zn.U2)("comments.json",pt)}function ci(pt){return(0,Zn.v_)(`/discusses/${pt}/plus.json`,{container_type:"Discuss",type:1})}function ai(pt){return(0,Zn.v_)("comments/reply.json",pt)}function ki(pt){return(0,Zn.v_)("comments.json",pt)}function Ci(pt){return(0,Zn.v_)(`comments/${pt==null?void 0:pt.id}/hidden.json`,pt)}function or(pt){return(0,Zn.IV)(`comments/${pt==null?void 0:pt.id}.json`)}var tr=Ee(52649),pr=Ee(73898);function cr({author:pt}){return Le.createElement("a",{href:`/users/${pt.login}`,target:"_blank"},Le.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${ve.Z.IMG_SERVER}/images/${pt.image_url}`,width:"50"}))}function to({data:pt,index:_t,parentDiscussIndex:Lt,user:Sn,onSetActionType:hn}){const{author:on,can_delete:vn,content:yn,id:Cn,time:jn}=pt;function ti(){hn({id:Cn,index:_t,type:"delete-discuss",parentDiscussIndex:Lt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Kn=Sn.admin||vn||on.user_id===Sn.user_id;return Le.createElement("div",{className:"discuss-item-container second-discuss "},Le.createElement(cr,{author:on}),Le.createElement("section",null,Le.createElement("div",{className:"discuss-info"},Le.createElement("a",{href:`/users/${on.login}`,target:"_blank"},on.name),Le.createElement("span",{className:"grey"},jn),Le.createElement("div",{className:"btn-group",style:{marginBottom:0}},Kn?Le.createElement("a",{onClick:ti,title:"\u5220\u9664"},Le.createElement("i",{className:"iconfont icon-shanchu"})):null)),Le.createElement(Ae.Z,{className:"discuss-content",value:yn})))}var no=({user:pt,data:_t,index:Lt,onPlusDiscuss:Sn,onSetActionType:hn,activeDiscussIndex:on,onReplyDiscuss:vn,onSetActiveDiscussIndex:yn})=>{const{content:Cn,children:jn,hidden:ti,id:Kn,praise_count:xi,time:Vn,user_praise:mi,can_delete:li,author:Ri}=_t;console.log(li&&(!jn||jn.length==0),"children22");function Di(){yn(Kn)}function Zi(){Sn(Kn,!mi,Lt)}function Oi(){hn({id:Kn,index:Lt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Ii(){hn({id:Kn,index:Lt,params:{hidden:ti?"0":"1"},type:"hidden-discuss",message:ti?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const ar=pt.admin||pt.user_id===Ri.user_id;return Le.createElement("div",{className:"discuss-item-container",key:Kn},Le.createElement(cr,{author:Ri}),Le.createElement("section",null,Le.createElement("div",{className:"discuss-info"},Le.createElement("a",{href:`/users/${Ri.login}`,target:"_blank"}," ",Ri.name," "),Le.createElement("span",{className:"grey"},Vn)),Le.createElement(Ae.Z,{className:"discuss-content",value:Cn}),jn&&jn.length>0?Le.createElement("div",{className:"reply-discuss-container"},jn.map((ei,Hi)=>Le.createElement(to,{key:ei.id,data:ei,index:Hi,user:pt,onSetActionType:hn,parentDiscussIndex:Lt}))):null,Le.createElement("div",{className:"btn-group"},(0,pr.Ny)()?Le.createElement("a",{onClick:Ii,title:ti?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},Le.createElement("i",{className:ti?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,li&&(!jn||jn.length==0)?Le.createElement("a",{onClick:Oi,title:"\u5220\u9664"},Le.createElement("i",{className:"iconfont icon-shanchu"})):null,Le.createElement("a",{onClick:Di,title:"\u56DE\u590D"}," ",Le.createElement("i",{className:"iconfont icon-huifu1"})," "),Le.createElement("a",{onClick:Zi,className:mi?"c-orange":""},Le.createElement("i",{className:mi?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),Le.createElement("span",null,xi||""))),Le.createElement(tr.Z,{id:Kn,activeDiscussIndex:on,onReplyDiscuss:vn})))},di=Ee(85469),Cr=Ee(64726),zi=(pt,_t,Lt)=>new Promise((Sn,hn)=>{var on=Cn=>{try{yn(Lt.next(Cn))}catch(jn){hn(jn)}},vn=Cn=>{try{yn(Lt.throw(Cn))}catch(jn){hn(jn)}},yn=Cn=>Cn.done?Sn(Cn.value):Promise.resolve(Cn.value).then(on,vn);yn((Lt=Lt.apply(pt,_t)).next())}),st=({user_praise:pt,praise_count:_t,praisePlus:Lt,onCreateDiscuss:Sn,discuss_count:hn})=>{const[on,vn]=(0,Le.useState)(!1),[yn,Cn]=(0,Le.useState)("");function jn(Vn){Cn(Vn)}function ti(){vn(!0)}function Kn(){vn(!1)}function xi(){return zi(this,null,function*(){Sn(yn),Cn(""),vn(!1)})}return Le.createElement("div",{className:`dis-input-editor-container ${on?"active":""} `},Le.createElement("div",{className:on?"text-area hide":"text-area"},Le.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:ti}),Le.createElement("a",{style:{alignItems:"center"}}," ",Le.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",hn," "),Le.createElement("a",{className:"c-light-black",onClick:Lt,style:{alignItems:"center"},title:pt?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Le.createElement("i",{className:`mr3 ${pt?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),_t?Le.createElement("span",null,_t):"")),on?Le.createElement("div",{className:"input-mask",onClick:Kn}):null,Le.createElement("div",{className:on?"md-container":"md-container hide"},Le.createElement(Cr.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:yn,height:240,onChange:jn}),Le.createElement("div",{className:"tip-container",onClick:Kn},Le.createElement("a",{className:"btn-send",onClick:xi}," \u53D1\u9001 "))))},Dr=Object.defineProperty,Mr=Object.defineProperties,xo=Object.getOwnPropertyDescriptors,Gr=Object.getOwnPropertySymbols,uo=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,co=(pt,_t,Lt)=>_t in pt?Dr(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,cn=(pt,_t)=>{for(var Lt in _t||(_t={}))uo.call(_t,Lt)&&co(pt,Lt,_t[Lt]);if(Gr)for(var Lt of Gr(_t))Zr.call(_t,Lt)&&co(pt,Lt,_t[Lt]);return pt},$e=(pt,_t)=>Mr(pt,xo(_t)),tt=(pt,_t,Lt)=>new Promise((Sn,hn)=>{var on=Cn=>{try{yn(Lt.next(Cn))}catch(jn){hn(jn)}},vn=Cn=>{try{yn(Lt.throw(Cn))}catch(jn){hn(jn)}},yn=Cn=>Cn.done?Sn(Cn.value):Promise.resolve(Cn.value).then(on,vn);yn((Lt=Lt.apply(pt,_t)).next())});const et={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var Pt=(pt=>(pt[pt.GET_DISCUSSES=0]="GET_DISCUSSES",pt[pt.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",pt[pt.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",pt[pt.PLUS_DISCUSS=3]="PLUS_DISCUSS",pt[pt.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",pt[pt.SET_PAGE=5]="SET_PAGE",pt[pt.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",pt))(Pt||{});function At(pt,_t){switch(_t.type){case 6:return $e(cn({},pt),{loading:!0});case 0:return cn(cn({},pt),_t.payload);case 1:return cn(cn({},pt),_t.payload);case 4:return cn(cn({},pt),_t.payload);case 3:return cn(cn({},pt),_t.payload);case 5:return cn(cn({},pt),_t.payload);case 2:return cn(cn({},pt),_t.payload);default:throw new Error}}var kt=({user:pt,identifier:_t,hack:Lt,onTriggerPraise:Sn,setDiscussTotal:hn})=>{const[on,vn]=(0,Le.useReducer)(At,et),{loading:yn,page:Cn,data:jn,count:ti,actionType:Kn,activeDiscussIndex:xi}=on;console.log("---",on);const Vn=(0,Le.useCallback)(()=>tt(void 0,null,function*(){vn({type:6});const ei=yield Tn({container_type:"Practice",container_identifier:_t,limit:10,page:Cn}),{comments:Hi,disscuss_count:Li}=ei;vn({type:0,payload:{data:Hi,count:Li,loading:!1}}),hn(Li)}),[Cn,_t]);(0,Le.useEffect)(()=>{Vn()},[_t,Cn]);function mi(ei){vn({type:5,payload:{page:ei}})}function li(ei){vn({type:4,payload:{actionType:ei}})}function Ri(ei){vn(xi===ei?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:ei}})}function Di(ei,Hi,Li){return tt(this,null,function*(){try{const bi=yield ci(ei);jn[Li].user_praise=Hi,jn[Li].praise_count=bi.praise_count,vn({type:3,payload:{data:[...jn]}})}catch(bi){console.log(bi)}})}function Zi(){return tt(this,null,function*(){const{id:ei,params:Hi,type:Li,index:bi,parentDiscussIndex:Xi}=Kn;Li==="hidden-discuss"&&(console.log(Hi,"params"),yield Ci(cn({id:ei,container_type:"Practice",container_identifier:_t},Hi)),Xi?jn[Xi].children[bi].hidden=Hi.hidden==1:jn[bi].hidden=Hi.hidden==1,vn({type:4,payload:{actionType:null,data:[...jn]}})),Li==="delete-discuss"&&(yield or({id:ei,container_type:"Practice",container_identifier:_t}),vn({type:4,payload:{actionType:null}}),yield Vn())})}function Oi(){vn({type:4,payload:{actionType:null}})}function Ii(ei,Hi){return tt(this,null,function*(){try{yield ai({container_type:"Practice",container_identifier:_t,comments:{content:Hi,parent_id:ei}}),Vn()}catch(Li){console.log(Li)}})}function ar(ei){return tt(this,null,function*(){vn({type:6}),yield ki({comments:{content:ei},container_type:"Practice",container_identifier:_t}),Vn()})}return Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"discuss-panel"},jn.length===0?Le.createElement(Qe.Z,null):Le.createElement(Se.Z,{spinning:yn},jn.map((ei,Hi)=>Le.createElement(no,{onReplyDiscuss:Ii,onPlusDiscuss:Di,onSetActiveDiscussIndex:Ri,onSetActionType:li,data:ei,index:Hi,user:pt,activeDiscussIndex:xi}))),ti>10?Le.createElement("div",{className:"pagination-container mt10 mb10"},Le.createElement(Vt.Z,{showQuickJumper:!0,onChange:mi,current:Cn,total:ti,showTotal:ei=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},ei),"\u6761\u6570\u636E")})):null),Le.createElement(st,{user_praise:Lt.user_praise,praise_count:Lt.praises_count,praisePlus:Sn,discuss_count:Lt.comments_count,onCreateDiscuss:ar}),Le.createElement(ee.Z,null,Le.createElement(he.default,{centered:!0,title:"\u63D0\u793A",open:!!Kn,onOk:Zi,onCancel:Oi},Le.createElement("p",null,Kn?Kn.message:"")),Le.createElement(di.Z,null)))},Ct={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"},_n=Object.defineProperty,zn=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,$t=(pt,_t,Lt)=>_t in pt?_n(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,bn=(pt,_t)=>{for(var Lt in _t||(_t={}))wn.call(_t,Lt)&&$t(pt,Lt,_t[Lt]);if(zn)for(var Lt of zn(_t))Ft.call(_t,Lt)&&$t(pt,Lt,_t[Lt]);return pt};const An=pt=>React.createElement("svg",bn({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},pt),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 Gt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",sn=Object.defineProperty,Bn=Object.getOwnPropertySymbols,Nn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable,Gn=(pt,_t,Lt)=>_t in pt?sn(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,Jn=(pt,_t)=>{for(var Lt in _t||(_t={}))Nn.call(_t,Lt)&&Gn(pt,Lt,_t[Lt]);if(Bn)for(var Lt of Bn(_t))qn.call(_t,Lt)&&Gn(pt,Lt,_t[Lt]);return pt};const Dn=pt=>React.createElement("svg",Jn({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},pt),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 ri="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",Mi=Object.defineProperty,Hn=Object.getOwnPropertySymbols,oi=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable,lr=(pt,_t,Lt)=>_t in pt?Mi(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,Ai=(pt,_t)=>{for(var Lt in _t||(_t={}))oi.call(_t,Lt)&&lr(pt,Lt,_t[Lt]);if(Hn)for(var Lt of Hn(_t))Bi.call(_t,Lt)&&lr(pt,Lt,_t[Lt]);return pt};const an=pt=>React.createElement("svg",Ai({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},pt),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 si="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",wi=Object.defineProperty,pi=Object.getOwnPropertySymbols,Wi=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable,hr=(pt,_t,Lt)=>_t in pt?wi(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,Fi=(pt,_t)=>{for(var Lt in _t||(_t={}))Wi.call(_t,Lt)&&hr(pt,Lt,_t[Lt]);if(pi)for(var Lt of pi(_t))Ni.call(_t,Lt)&&hr(pt,Lt,_t[Lt]);return pt};const Ki=pt=>React.createElement("svg",Fi({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},pt),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 _r="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",On=Object.defineProperty,Jr=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,fo=(pt,_t,Lt)=>_t in pt?On(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,Pr=(pt,_t)=>{for(var Lt in _t||(_t={}))In.call(_t,Lt)&&fo(pt,Lt,_t[Lt]);if(Jr)for(var Lt of Jr(_t))Sr.call(_t,Lt)&&fo(pt,Lt,_t[Lt]);return pt};const Do=pt=>React.createElement("svg",Pr({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},pt),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 ro="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",er=({style:pt={},onClick:_t,onAssist:Lt,onHide:Sn,data:hn,active:on,showLine:vn})=>Le.createElement(Le.Fragment,null,Le.createElement("div",{className:on===(hn==null?void 0:hn.id)?`${dn.list} ${dn.active}`:dn.list,style:pt,onClick:()=>_t(hn)},(hn==null?void 0:hn.video)&&Le.createElement("div",{className:dn.left},Le.createElement("img",{src:hn==null?void 0:hn.video_cover}),Le.createElement("div",null,Le.createElement("img",{src:Gt}),Le.createElement("span",null,hn==null?void 0:hn.video_duration)),Le.createElement("div",{className:dn.mask})),Le.createElement("div",{className:dn.right},Le.createElement("div",{className:dn.name},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(hn==null?void 0:hn.image_url),width:30,height:30}),Le.createElement("div",{title:hn==null?void 0:hn.name,className:dn.title},hn==null?void 0:hn.name),(hn==null?void 0:hn.is_authority)&&Le.createElement("div",{className:dn.b},"\u5B98\u65B9"),(hn==null?void 0:hn.is_excellent)&&Le.createElement("div",{className:dn.a},"\u7CBE\u9009")),Le.createElement("div",{className:dn.des},Le.createElement(Ae.Z,{showLines:2,showTextOnly:!0,value:(hn==null?void 0:hn.content)||"\u6682\u65E0\u5185\u5BB9"})),Le.createElement("div",{className:dn.tag},Le.createElement("span",{className:"current",onClick:yn=>{yn.stopPropagation(),Lt(hn)}},Le.createElement("img",{src:hn!=null&&hn.user_liker?si:ri}),Le.createElement("span",{style:{color:hn!=null&&hn.user_liker?"#0152d9":"#656f87"}},hn==null?void 0:hn.praises_count)),Le.createElement("span",null,Le.createElement("img",{src:_r}),Le.createElement("span",null,hn==null?void 0:hn.discusses_count)),Le.createElement("span",null,Le.createElement("img",{src:ro}),Le.createElement("span",null,hn==null?void 0:hn.viewed_count)),(0,pr.Ny)()&&Le.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:yn=>{yn.stopPropagation(),Sn(hn)}},hn!=null&&hn.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),vn&&Le.createElement("div",{className:dn.line})),dr={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"},Tr=Ee(6848),hi=Ee(60918),Tt=Object.defineProperty,xr=Object.getOwnPropertySymbols,Po=Object.prototype.hasOwnProperty,Wo=Object.prototype.propertyIsEnumerable,Co=(pt,_t,Lt)=>_t in pt?Tt(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,qo=(pt,_t)=>{for(var Lt in _t||(_t={}))Po.call(_t,Lt)&&Co(pt,Lt,_t[Lt]);if(xr)for(var Lt of xr(_t))Wo.call(_t,Lt)&&Co(pt,Lt,_t[Lt]);return pt};const Zo=pt=>React.createElement("svg",qo({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},pt),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 wr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",vr=Object.defineProperty,Qi=Object.getOwnPropertySymbols,Qr=Object.prototype.hasOwnProperty,Gi=Object.prototype.propertyIsEnumerable,Ui=(pt,_t,Lt)=>_t in pt?vr(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,qi=(pt,_t)=>{for(var Lt in _t||(_t={}))Qr.call(_t,Lt)&&Ui(pt,Lt,_t[Lt]);if(Qi)for(var Lt of Qi(_t))Gi.call(_t,Lt)&&Ui(pt,Lt,_t[Lt]);return pt};const Xn=pt=>React.createElement("svg",qi({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},pt),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 qr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",_o=Object.defineProperty,Ko=Object.getOwnPropertySymbols,Eo=Object.prototype.hasOwnProperty,rs=Object.prototype.propertyIsEnumerable,ms=(pt,_t,Lt)=>_t in pt?_o(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,Ls=(pt,_t)=>{for(var Lt in _t||(_t={}))Eo.call(_t,Lt)&&ms(pt,Lt,_t[Lt]);if(Ko)for(var Lt of Ko(_t))rs.call(_t,Lt)&&ms(pt,Lt,_t[Lt]);return pt};const ws=pt=>React.createElement("svg",Ls({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},pt),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 ta="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",aa=Object.defineProperty,Ln=Object.getOwnPropertySymbols,Os=Object.prototype.hasOwnProperty,hl=Object.prototype.propertyIsEnumerable,dl=(pt,_t,Lt)=>_t in pt?aa(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,vs=(pt,_t)=>{for(var Lt in _t||(_t={}))Os.call(_t,Lt)&&dl(pt,Lt,_t[Lt]);if(Ln)for(var Lt of Ln(_t))hl.call(_t,Lt)&&dl(pt,Lt,_t[Lt]);return pt},ja=(pt,_t,Lt)=>new Promise((Sn,hn)=>{var on=Cn=>{try{yn(Lt.next(Cn))}catch(jn){hn(jn)}},vn=Cn=>{try{yn(Lt.throw(Cn))}catch(jn){hn(jn)}},yn=Cn=>Cn.done?Sn(Cn.value):Promise.resolve(Cn.value).then(on,vn);yn((Lt=Lt.apply(pt,_t)).next())});const lu=(pt,_t)=>{var Lt,Sn,hn;const{uploadInfo:on={}}=_t.payload;switch(_t.type){case"addVideo":return{videoList:[...pt.videoList,{name:on.file.name,size:on.file.size,type:on.file.type,fileHash:on.fileHash,state:on.state,video_id:on.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:pt.videoList.filter(vn=>vn.name!==_t.payload.name)};case"replaceVideo":return{videoList:_t.payload};case"removeAll":return[];case"updateProgress":return{videoList:pt.videoList.map(vn=>vn.name===_t.payload.uploadInfo.file.name?vs(vs({},vn),{loaded:_t.payload.progressPercent,video_id:on.videoId,fileHash:on.fileHash}):vn)};case"updateTitle":return{videoList:(Lt=pt.videoList)==null?void 0:Lt.map(vn=>vn.name===_t.payload.item.name?vs(vs({},vn),{title:_t.payload.title}):vn)};case"updateImg":return{videoList:(Sn=pt.videoList)==null?void 0:Sn.map(vn=>vn.name===_t.payload.item.name?vs(vs({},vn),{attachment_id:_t.payload.attachment_id}):vn)};case"updateImg":return{videoList:(hn=pt.videoList)==null?void 0:hn.map(vn=>vn.name===_t.payload.item.name?vs(vs({},vn),{attachment_id:_t.payload.attachment_id}):vn)};default:return[]}};var ho=({onClose:pt,onOk:_t,identifier:Lt,active:Sn})=>{var hn,on;const[vn]=it.default.useForm(),[yn,Cn]=(0,Le.useState)({}),[jn,ti]=(0,Le.useState)(!1),[Kn,xi]=(0,Le.useState)(!1),[Vn,mi]=(0,Le.useReducer)(lu,{videoList:[]}),li=(0,pr.eY)(),Ri=(0,Te.useParams)(),Di=(0,Le.useRef)();(0,Le.useEffect)(()=>{Sn&&Zi()},[Sn]);const Zi=()=>ja(void 0,null,function*(){var Vi,mr,ir,So,Lo,ts,ao,Nr,No,Ir;const Vr=yield(0,ge.M3)(Lt,{active:Sn});if((Vr==null?void 0:Vr.status)===0){const ns={name:(Vi=Vr==null?void 0:Vr.data)==null?void 0:Vi.name,content:(mr=Vr==null?void 0:Vr.data)==null?void 0:mr.content};vn.setFieldsValue(ns),Cn(ns),(So=(ir=Vr==null?void 0:Vr.data)==null?void 0:ir.videos)!=null&&So[0]&&mi({type:"replaceVideo",payload:[{video_id:(ao=(ts=(Lo=Vr==null?void 0:Vr.data)==null?void 0:Lo.videos)==null?void 0:ts[0])==null?void 0:ao.video_id,name:(Ir=(No=(Nr=Vr==null?void 0:Vr.data)==null?void 0:Nr.videos)==null?void 0:No[0])==null?void 0:Ir.title,loaded:100}]})}}),Oi=(Vi,mr)=>{Cn(vs({},mr))},Ii=Vi=>ja(void 0,null,function*(){const mr={videos:Vn.videoList,articles:Vi};xi(!0);let ir;Sn?(mr.active=Sn,ir=yield(0,ge.gu)(Lt,mr)):ir=yield(0,ge.bx)(Lt,mr),(ir==null?void 0:ir.status)===0&&(console.log(Sn||(ir==null?void 0:ir.id),44),_t(Sn||(ir==null?void 0:ir.id))),xi(!1)}),ar=()=>{const Vi=document.getElementById("fileUpload");Vi.value=""},ei=Vi=>{var mr='{"Vod":{}}';if(ti(!0),Di.current){Di.current.addFile(Vi,null,null,null,mr);return}(0,hi.o)(li==null?void 0:li.login,"",{create:!Di,addFileSuccess:ir=>{mi({type:"addVideo",payload:{uploadInfo:ir}})},onUploadProgress:(ir,So,Lo)=>{const ts=Math.ceil(Lo*100);mi({type:"updateProgress",payload:{uploadInfo:ir,progressPercent:ts}}),ar()},onUploadFailed:ir=>{_e.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:ir=>{ti(!1)},onUploadSucceed:ir=>{ti(!1)},onUploadError:ir=>{ti(!1)},gotUploader:ir=>{ir.addFile(Vi,null,null,null,mr),Di.current=ir}})},Hi=Vi=>{var mr;const So=Vi.target.files[0];if(!So){ar();return}let Lo=So.name.toLowerCase();if(Lo&&Lo.indexOf(".avi")==-1&&Lo.indexOf(".flv")==-1&&Lo.indexOf(".f4v")==-1&&Lo.indexOf(".m4v")==-1&&Lo.indexOf(".mov")==-1&&Lo.indexOf(".mp4")==-1&&Lo.indexOf(".rmvb")==-1&&Lo.indexOf(".swf")==-1&&Lo.indexOf(".webm")==-1&&Lo.indexOf(".wmv")==-1){_e.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),ar();return}if(So.size>1024*1024*1024){_e.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),ar();return}if((mr=Vn.videoList)!=null&&mr.find(ts=>ts.name===So.name)){_e.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),ar();return}ei(So)},Li=(Vi,mr)=>{he.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:Le.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",mr?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{ar(),mi({type:"removeVideo",payload:{name:Vi}})}})},bi=()=>Le.createElement("label",{htmlFor:"fileUpload",className:dr.main},Le.createElement("img",{src:wr,alt:""}),Le.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Xi=Vi=>Le.createElement("div",{className:dr.mainLoading},Le.createElement("div",{className:dr.proWarp},Le.createElement("div",{className:dr.pro},Le.createElement("div",{style:{width:Vi}})),Le.createElement("span",null,Vi||0,"%")),Le.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),Le.createElement("div",{className:dr.tip},Le.createElement(Tr.Z,{getPopupContainer:mr=>mr.parentNode,title:Le.createElement("div",null,Le.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",Le.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"),Le.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),Le.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},Le.createElement("img",{src:ta,alt:""})))),gi=Vi=>Le.createElement("div",{className:dr.mainSucceed},Le.createElement("img",{src:qr,alt:""}),Le.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),Le.createElement("div",{className:dr.tip},Le.createElement(Tr.Z,{getPopupContainer:mr=>mr.parentNode,title:Le.createElement("div",null,Le.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",Le.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"),Le.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),Le.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},Le.createElement("img",{src:ta,alt:""}))),Le.createElement("div",{className:dr.del,onClick:()=>Li(Vi.name,Vi.loaded==100)},Le.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),ur=()=>{var Vi;return Le.createElement(Le.Fragment,null,(Vi=Vn.videoList)==null?void 0:Vi.map((mr,ir)=>Le.createElement(Le.Fragment,{key:ir},mr.loaded==100?gi(mr):Xi(mr.loaded))))},Ji=()=>{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:pt})},_i=(hn=Vn.videoList)==null?void 0:hn.length;return Le.createElement("div",{className:dr.listForm},Le.createElement("header",null,Sn?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),Le.createElement("section",{className:dr.scroll,id:"sss"},Le.createElement("div",{className:dr.formWrap}," ",Le.createElement(it.default,{form:vn,scrollToFirstError:!0,layout:"vertical",onValuesChange:Oi,onFinish:Ii},Le.createElement(it.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"}]},Le.createElement(ht.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((on=yn.name)==null?void 0:on.length)||0}/60`})),Le.createElement(it.default.Item,{name:"content",label:"\u5185\u5BB9:"},Le.createElement(Cr.Z,{defaultValue:yn.content||"",watch:!0})))),Le.createElement("div",{className:dr.upload},_i?ur():bi(),Le.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:Hi,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),Le.createElement("div",{className:dr.btns},Le.createElement(dt.ZP,{onClick:Ji,type:"primary",ghost:!0},"\u5173\u95ED"),Le.createElement(dt.ZP,{loading:Kn,disabled:jn,onClick:()=>vn.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Er={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"},na=Ee(61621),Rr=Object.defineProperty,io=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable,ls=(pt,_t,Lt)=>_t in pt?Rr(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,Ms=(pt,_t)=>{for(var Lt in _t||(_t={}))Kr.call(_t,Lt)&&ls(pt,Lt,_t[Lt]);if(io)for(var Lt of io(_t))Ei.call(_t,Lt)&&ls(pt,Lt,_t[Lt]);return pt};const ba=pt=>React.createElement("svg",Ms({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},pt),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 za="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Ja=Object.defineProperty,yi=Object.getOwnPropertySymbols,fs=Object.prototype.hasOwnProperty,$s=Object.prototype.propertyIsEnumerable,Qa=(pt,_t,Lt)=>_t in pt?Ja(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,wl=(pt,_t)=>{for(var Lt in _t||(_t={}))fs.call(_t,Lt)&&Qa(pt,Lt,_t[Lt]);if(yi)for(var Lt of yi(_t))$s.call(_t,Lt)&&Qa(pt,Lt,_t[Lt]);return pt};const Il=pt=>React.createElement("svg",wl({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},pt),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 Fr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",nc=Object.defineProperty,Aa=Object.getOwnPropertySymbols,Ha=Object.prototype.hasOwnProperty,Ta=Object.prototype.propertyIsEnumerable,$l=(pt,_t,Lt)=>_t in pt?nc(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,Pu=(pt,_t)=>{for(var Lt in _t||(_t={}))Ha.call(_t,Lt)&&$l(pt,Lt,_t[Lt]);if(Aa)for(var Lt of Aa(_t))Ta.call(_t,Lt)&&$l(pt,Lt,_t[Lt]);return pt};const Ua=pt=>React.createElement("svg",Pu({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},pt),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 Ga="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),Dl={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=(pt,_t,Lt)=>new Promise((Sn,hn)=>{var on=Cn=>{try{yn(Lt.next(Cn))}catch(jn){hn(jn)}},vn=Cn=>{try{yn(Lt.throw(Cn))}catch(jn){hn(jn)}},yn=Cn=>Cn.done?Sn(Cn.value):Promise.resolve(Cn.value).then(on,vn);yn((Lt=Lt.apply(pt,_t)).next())});const Gu=({id:pt,cb:_t})=>{const[Lt,Sn]=(0,Le.useState)("");return Le.createElement("aside",{className:"mt10"},Le.createElement(Cr.Z,{defaultValue:Lt,id:"writeForumsReviewId",onChange:hn=>{Sn(hn)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Le.createElement(yc.Z,null,Le.createElement(Eu.Z,{flex:"1"}),Le.createElement(Eu.Z,null,Le.createElement(dt.ZP,{type:"primary",size:"middle",onClick:()=>Sc(void 0,null,function*(){Lt===""?_e.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):_t(pt,Lt)})},"\u53D1\u9001"))))},Lu=({data:pt})=>{var _t;return Le.createElement("div",{className:Dl.thirdlyLevelDiscuss},Le.createElement("span",{className:"c-grey-333"},Le.createElement("span",{className:"font 14 c-light-primary"},(_t=pt==null?void 0:pt.author)==null?void 0:_t.name),"@",Le.createElement("span",{className:"font 14 c-light-primary"},pt==null?void 0:pt.parent_name),":"),Le.createElement(Ae.Z,{value:pt==null?void 0:pt.content}))},bl=({data:pt,onReplyDiscuss:_t,thirdlyReply:Lt,setThirdlyReply:Sn})=>{var hn,on,vn,yn;const Cn=(0,pr.eY)();return console.log(Cn,"user"),Le.createElement("div",{className:Dl.list},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+((hn=pt==null?void 0:pt.author)==null?void 0:hn.image_url)}),Le.createElement("div",{className:Dl.wrap},Le.createElement("div",{className:"font14",style:{marginBottom:6}},Le.createElement("span",{className:"c-grey-333"},(on=pt==null?void 0:pt.author)==null?void 0:on.name),(Cn==null?void 0:Cn.login)!==((vn=pt==null?void 0:pt.author)==null?void 0:vn.login)&&Le.createElement("span",{onClick:()=>Sn(pt==null?void 0:pt.id),className:"c-grey-999 current",style:{float:"right"}},Le.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),Le.createElement("span",null,"\u56DE\u590D"))),Le.createElement(Ae.Z,{value:pt==null?void 0:pt.content}),(yn=pt==null?void 0:pt.children)==null?void 0:yn.map(jn=>Le.createElement(Lu,{key:jn.id,data:jn})),Lt===(pt==null?void 0:pt.id)&&Le.createElement("div",null,Le.createElement(Gu,{id:pt==null?void 0:pt.id,cb:_t}),Le.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>Sn(null),className:"c-light-primary current"},Le.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),Le.createElement("div",{className:Dl.line})))};var xc=({data:pt,onReplyDiscuss:_t,secondReply:Lt,setSecondReply:Sn,thirdlyReply:hn,setThirdlyReply:on,onPlusDiscuss:vn})=>{var yn,Cn,jn,ti;const[Kn,xi]=(0,Le.useState)(!1);return console.log(pt,"data"),Le.createElement("div",{className:Dl.discussItem},Le.createElement("div",{className:Dl.list},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+((yn=pt==null?void 0:pt.author)==null?void 0:yn.image_url)}),Le.createElement("div",{className:Dl.wrap},Le.createElement("div",{className:"font14",style:{marginBottom:6}},Le.createElement("span",{className:"c-grey-333 mr30"},(Cn=pt==null?void 0:pt.author)==null?void 0:Cn.name),Le.createElement("span",{className:"c-grey-999"},pt==null?void 0:pt.time)),Le.createElement(Ae.Z,{value:pt==null?void 0:pt.content}),Le.createElement("div",{className:Dl.btns},Le.createElement("div",{onClick:()=>vn(pt==null?void 0:pt.id),className:pt!=null&&pt.user_praise?"c-light-primary":"c-grey-999"},Le.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),Le.createElement("span",null,pt==null?void 0:pt.praise_count)),Le.createElement("div",{onClick:()=>{var Vn;((Vn=pt==null?void 0:pt.children)==null?void 0:Vn.length)!==0&&(Sn(null),xi(!Kn))},style:{color:Kn?"#0152d9":"#999999"}},Le.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),Le.createElement("span",null,Kn?"\u6536\u8D77\u8BC4\u8BBA":(jn=pt==null?void 0:pt.children)==null?void 0:jn.length)),Le.createElement("div",{onClick:()=>{xi(!1),Sn(Lt===(pt==null?void 0:pt.id)?null:pt==null?void 0:pt.id)},style:{color:Lt===(pt==null?void 0:pt.id)?"#0152d9":"#999999"}},Le.createElement("i",{className:"iconfont icon-huifu3 mr3"}),Le.createElement("span",null,Lt===(pt==null?void 0:pt.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Lt===(pt==null?void 0:pt.id)&&Le.createElement(Gu,{id:pt==null?void 0:pt.id,cb:(Vn,mi)=>{_t(Vn,mi),xi(!0)}}),Kn&&Le.createElement("div",{className:Dl.secondLevelDiscuss},(ti=pt==null?void 0:pt.children)==null?void 0:ti.map(Vn=>Le.createElement(bl,{thirdlyReply:hn,setThirdlyReply:on,key:Vn.id,data:Vn,onReplyDiscuss:_t}))))))},uu=(pt,_t,Lt)=>new Promise((Sn,hn)=>{var on=Cn=>{try{yn(Lt.next(Cn))}catch(jn){hn(jn)}},vn=Cn=>{try{yn(Lt.throw(Cn))}catch(jn){hn(jn)}},yn=Cn=>Cn.done?Sn(Cn.value):Promise.resolve(Cn.value).then(on,vn);yn((Lt=Lt.apply(pt,_t)).next())}),jo=({identifier:pt,active:_t,onOk:Lt})=>{const[Sn,hn]=(0,Le.useState)(""),[on,vn]=(0,Le.useState)(1),[yn,Cn]=(0,Le.useState)([]),[jn,ti]=(0,Le.useState)(0),[Kn,xi]=(0,Le.useState)(null),[Vn,mi]=(0,Le.useState)(null);(0,Le.useEffect)(()=>{li(1),vn(1)},[_t]);const li=Ii=>uu(void 0,null,function*(){const ar=yield Tn({container_type:"QuestionSolutionArticle",container_identifier:_t,limit:5,page:Ii});ar!=null&&ar.comments&&(Cn((ar==null?void 0:ar.comments)||[]),vn(Ii),ti(ar==null?void 0:ar.disscuss_count))}),Ri=()=>uu(void 0,null,function*(){if(Sn===""){_e.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const Ii=yield ki({comments:{content:Sn},container_type:"QuestionSolutionArticle",container_identifier:_t});Ii!=null&&Ii.discuss&&(hn(""),li(on),Lt())}),Di=(Ii,ar,ei)=>uu(void 0,null,function*(){const Hi=yield ai({container_type:"QuestionSolutionArticle",container_identifier:_t,comments:{content:ar,parent_id:Ii}});xi(null),mi(null),li(on)}),Zi=Ii=>uu(void 0,null,function*(){const ar=yield ci(Ii);li(on)}),Oi=Ii=>{vn(Ii),li(Ii)};return Le.createElement("div",{className:Uu.discuss},Le.createElement("aside",{className:Uu.reply,style:{borderWidth:jn?1:0}},Le.createElement(Cr.Z,{defaultValue:Sn,id:"writeForumsReviewId",onChange:Ii=>{hn(Ii)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Le.createElement(yc.Z,null,Le.createElement(Eu.Z,{flex:"1"}),Le.createElement(Eu.Z,null,Le.createElement(dt.ZP,{type:"primary",size:"middle",onClick:()=>Ri()},"\u53D1\u9001")))),yn==null?void 0:yn.map(Ii=>Le.createElement(xc,{secondReply:Kn,setSecondReply:xi,thirdlyReply:Vn,setThirdlyReply:mi,key:Ii.id,data:Ii,onReplyDiscuss:Di,onPlusDiscuss:Zi})),Le.createElement(Vt.Z,{className:Uu.pagination,showTotal:Ii=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},Ii),"\u6761\u6570\u636E"),current:on,onChange:Oi,total:jn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},La=Ee(71628),ia=Object.defineProperty,Is=Object.getOwnPropertySymbols,bs=Object.prototype.hasOwnProperty,Ts=Object.prototype.propertyIsEnumerable,Gs=(pt,_t,Lt)=>_t in pt?ia(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,Ws=(pt,_t)=>{for(var Lt in _t||(_t={}))bs.call(_t,Lt)&&Gs(pt,Lt,_t[Lt]);if(Is)for(var Lt of Is(_t))Ts.call(_t,Lt)&&Gs(pt,Lt,_t[Lt]);return pt},Yl=(pt,_t,Lt)=>new Promise((Sn,hn)=>{var on=Cn=>{try{yn(Lt.next(Cn))}catch(jn){hn(jn)}},vn=Cn=>{try{yn(Lt.throw(Cn))}catch(jn){hn(jn)}},yn=Cn=>Cn.done?Sn(Cn.value):Promise.resolve(Cn.value).then(on,vn);yn((Lt=Lt.apply(pt,_t)).next())}),Ds=({active:pt,identifier:_t,onAssist:Lt,onEdit:Sn,onArticlesSkip:hn,onClose:on,onOk:vn,onDelete:yn,detailsIndex:Cn,btnShowStatus:jn})=>{var ti,Kn,xi,Vn,mi,li,Ri,Di,Zi,Oi;const[Ii,ar]=(0,Le.useState)(!0),[ei,Hi]=(0,Le.useState)({});(0,Le.useEffect)(()=>{pt&&Li()},[pt,Cn]);const Li=(Ji=!0)=>Yl(void 0,null,function*(){Ji&&ar(!0);const _i=yield(0,ge.wO)(_t,{active:pt});(_i==null?void 0:_i.status)===0&&Hi((_i==null?void 0:_i.data)||{}),ar(!1)}),bi=Ji=>Yl(void 0,null,function*(){const _i=yield(0,ge.qe)(_t,Ws({active:pt},Ji));(_i==null?void 0:_i.status)===0&&(Li(!1),vn())}),Xi=Ji=>Yl(void 0,null,function*(){(yield(0,ge.Rg)(_t,{active:Ji==null?void 0:Ji.id})).status===0&&(Li(!1),vn())}),gi=Ji=>{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:()=>yn(Ji)})},ur=()=>{Li(!1),vn()};return Le.createElement("div",{className:Er.listDetails},Le.createElement(na.Z,{className:"pt20 pl20 pr20",loading:Ii,active:!0,paragraph:{rows:5}},Le.createElement("div",{className:Er.head},Le.createElement("div",{className:Er.name},Le.createElement("div",{title:ei==null?void 0:ei.name,className:Er.title},ei==null?void 0:ei.name),(ei==null?void 0:ei.is_authority)&&Le.createElement("div",{className:Er.b},"\u5B98\u65B9"),(ei==null?void 0:ei.is_excellent)&&Le.createElement("div",{className:Er.a},"\u7CBE\u9009")),Le.createElement("div",{className:Er.tag},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(ei==null?void 0:ei.image_url)}),Le.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},ei==null?void 0:ei.username),Le.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",ze()(ei==null?void 0:ei.created_at).format("YYYY-MM-DD")),Le.createElement("span",null,Le.createElement("img",{src:ri}),Le.createElement("span",null,ei==null?void 0:ei.praises_count)),Le.createElement("span",null,Le.createElement("img",{src:_r}),Le.createElement("span",null,ei==null?void 0:ei.discusses_count)),Le.createElement("span",null,Le.createElement("img",{src:ro}),Le.createElement("span",null,ei==null?void 0:ei.viewed_count)),Le.createElement("div",{className:Er.btn},((0,pr.Ny)()||(ei==null?void 0:ei.is_self))&&Le.createElement(Le.Fragment,null,Le.createElement(dt.ZP,{onClick:()=>gi(ei),type:"primary",ghost:!0},"\u5220\u9664"),Le.createElement(dt.ZP,{onClick:()=>Sn(ei),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,pr.Ny)()&&Le.createElement(dt.ZP,{onClick:()=>bi({is_authority:!(ei!=null&&ei.is_authority)}),type:"primary"},Le.createElement("img",{src:Fr}),ei!=null&&ei.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,pr.Ny)()&&Le.createElement(dt.ZP,{onClick:()=>bi({is_excellent:!(ei!=null&&ei.is_excellent)}),type:"primary"},Le.createElement("img",{src:za}),ei!=null&&ei.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),Le.createElement("div",{className:Er.scroll},((Kn=(ti=ei==null?void 0:ei.videos)==null?void 0:ti[0])==null?void 0:Kn.id)&&Le.createElement("div",{className:Er.video},Le.createElement(Se.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Vn=(xi=ei==null?void 0:ei.videos)==null?void 0:xi[0])!=null&&Vn.transcoded)},Le.createElement(La.Z,{poster:(li=(mi=ei==null?void 0:ei.videos)==null?void 0:mi[0])==null?void 0:li.cover_url,src:((Di=(Ri=ei==null?void 0:ei.videos)==null?void 0:Ri[0])==null?void 0:Di.play_url)||"",videoId:(Oi=(Zi=ei==null?void 0:ei.videos)==null?void 0:Zi[0])==null?void 0:Oi.id,logWatchHistory:()=>{}}))),Le.createElement(Ae.Z,{className:Er.html,value:(ei==null?void 0:ei.content)||""}),Le.createElement("div",{onClick:()=>Xi(ei),className:Er.g},Le.createElement("img",{className:"mr10",src:(ei!=null&&ei.user_liker,Ga)}),Le.createElement("span",null,ei==null?void 0:ei.praises_count)),Le.createElement(jo,{onOk:ur,active:pt,identifier:_t})),Le.createElement("div",{className:Er.btns},Le.createElement(dt.ZP,{onClick:()=>on(),type:"primary",ghost:!0},"\u5173\u95ED"),jn[0]&&Le.createElement(dt.ZP,{onClick:Ji=>hn(Ji,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),jn[1]&&Le.createElement(dt.ZP,{onClick:Ji=>hn(Ji,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},xh=Object.defineProperty,nh=Object.getOwnPropertySymbols,wc=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,bc=(pt,_t,Lt)=>_t in pt?xh(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,rn=(pt,_t)=>{for(var Lt in _t||(_t={}))wc.call(_t,Lt)&&bc(pt,Lt,_t[Lt]);if(nh)for(var Lt of nh(_t))gr.call(_t,Lt)&&bc(pt,Lt,_t[Lt]);return pt};const Qn=pt=>React.createElement("svg",rn({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},pt),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,Zs=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable,Na=(pt,_t,Lt)=>_t in pt?Tu(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,Ks=(pt,_t)=>{for(var Lt in _t||(_t={}))Zs.call(_t,Lt)&&Na(pt,Lt,_t[Lt]);if(Cc)for(var Lt of Cc(_t))Wr.call(_t,Lt)&&Na(pt,Lt,_t[Lt]);return pt},Ps=(pt,_t)=>Wu(pt,bh(_t)),wo=(pt,_t,Lt)=>new Promise((Sn,hn)=>{var on=Cn=>{try{yn(Lt.next(Cn))}catch(jn){hn(jn)}},vn=Cn=>{try{yn(Lt.throw(Cn))}catch(jn){hn(jn)}},yn=Cn=>Cn.done?Sn(Cn.value):Promise.resolve(Cn.value).then(on,vn);yn((Lt=Lt.apply(pt,_t)).next())}),fl=({identifier:pt,tabStatus:_t,setFilterListTotal:Lt,setListStatus:Sn})=>{const hn={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[on,vn]=(0,Le.useState)(Ks({},hn));const[yn,Cn]=(0,Le.useState)(!1),[jn,ti]=(0,Le.useState)(0),[Kn,xi]=(0,Le.useState)(1),[Vn,mi]=(0,Le.useState)(null),[li,Ri]=(0,Le.useState)([]),[Di,Zi]=(0,Le.useState)([!0,!0]),[Oi,Ii]=(0,Le.useState)(0),ar=(0,Le.useRef)(null);(0,Le.useEffect)(()=>{Vi()},[_t]),(0,Le.useEffect)(()=>{ei()},[Vn]),(0,Le.useEffect)(()=>{Li(Ks({},hn)),Vi()},[pt]),(0,Le.useEffect)(()=>(window.addEventListener("resize",Hi),Sn(Oi),()=>{window.removeEventListener("resize",Hi)}),[Oi]);const ei=()=>wo(void 0,null,function*(){if(!Vn){Zi([!0,!0]);return}const Ir=[!0,!0],Vr=li==null?void 0:li.findIndex(ns=>ns.id===Vn);Vr===0&&on.page===1&&(Ir[0]=!1),(on.page-1)*on.limit+(Vr+1)===on.total&&(Ir[1]=!1),Zi(Ir)}),Hi=()=>{var Ir;if(Oi){const Vr=window.innerWidth-((Ir=ar.current)==null?void 0:Ir.clientWidth);ti(Vr)}},Li=Ir=>wo(void 0,null,function*(){var Vr,ns,Hr;Cn(!0);const kr=yield(0,ge.WH)(pt,Ir);return(kr==null?void 0:kr.status)===0&&(Ri(((Vr=kr==null?void 0:kr.data)==null?void 0:Vr.articles)||[]),vn(Ps(Ks({},Ir),{total:(ns=kr==null?void 0:kr.data)==null?void 0:ns.articles_count})),Lt((Hr=kr==null?void 0:kr.data)==null?void 0:Hr.articles_count)),Cn(!1),kr}),bi=()=>{(on==null?void 0:on.sort_direction)===null?on.sort_direction="asc":(on==null?void 0:on.sort_direction)==="asc"?on.sort_direction="desc":(on==null?void 0:on.sort_direction)==="desc"&&(on.sort_direction=null),on.page=1,Vi(),vn(Ks({},on)),Li(on)},Xi=()=>{on.page=1,on.search=on==null?void 0:on.save_search,Vi(),vn(Ks({},on)),Li(on)},gi=()=>{var Ir;const Vr=document.getElementsByClassName("btn-resize");Vr[0].style.visibility="hidden";const ns=window.innerWidth-((Ir=ar.current)==null?void 0:Ir.clientWidth);ti(ns)},ur=()=>{gi(),Ii(1)},Ji=Ir=>{gi(),mi(Ir==null?void 0:Ir.id),Ii(3)},_i=Ir=>{gi(),mi(Ir==null?void 0:Ir.id),Ii(2)},Vi=()=>{const Ir=document.getElementsByClassName("btn-resize");Ir[0].style.visibility="visible",ti(0),Ii(0),mi(null)},mr=Ir=>{Ii(3),mi(Ir),on.page=1,vn(Ks({},on)),Li(on)},ir=Ir=>{Ii(3),mi(Ir),vn(Ks({},on)),Li(on)},So=Ir=>{vn(Ks({},on)),Li(on)},Lo=Ir=>wo(void 0,null,function*(){(yield(0,ge.Rg)(pt,{active:Ir==null?void 0:Ir.id})).status===0&&(Li(on),xi(Kn+1))}),ts=Ir=>wo(void 0,null,function*(){(yield(0,ge.rL)(pt,{active:Ir==null?void 0:Ir.id})).status===0&&(Li(on),xi(Kn+1))}),ao=Ir=>wo(void 0,null,function*(){(yield(0,ge.de)(pt,{active:Ir==null?void 0:Ir.id})).status===0&&(Vi(),Li(on))}),Nr=Ir=>{on.page=Ir,vn(Ks({},on)),Li(on)},No=(Ir,Vr)=>wo(void 0,null,function*(){var ns,Hr,kr,$r;const Lr=li==null?void 0:li.findIndex(lo=>lo.id===Vn);if(console.log(Lr,Vr,22),Vr==="prev"){if(Lr===void 0){_e.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Lr===0){if(on.page===1){_e.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(on.page!==1){on.page=on.page-1,vn(Ks({},on));const lo=yield Li(on);if((lo==null?void 0:lo.status)===0){const Ar=(kr=lo==null?void 0:lo.data)==null?void 0:kr.articles[((Hr=(ns=lo==null?void 0:lo.data)==null?void 0:ns.articles)==null?void 0:Hr.length)-1];mi(Ar==null?void 0:Ar.id),console.log(Ir.target,555)}}}else{const lo=li[Lr-1];mi(lo==null?void 0:lo.id)}}if(Vr==="next"){if(Lr===void 0){_e.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((on.page-1)*on.limit+(Lr+1)===on.total){_e.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Lr+1===on.limit){on.page=on.page+1,vn(Ks({},on));const lo=yield Li(on);if((lo==null?void 0:lo.status)===0){const Ar=($r=lo==null?void 0:lo.data)==null?void 0:$r.articles[0];mi(Ar==null?void 0:Ar.id)}}else{const lo=li[Lr+1];mi(lo==null?void 0:lo.id)}}});return Le.createElement("div",{className:Ct.wrap,ref:ar},Le.createElement("div",{className:Ct.head},Le.createElement("div",{className:Ct.sort,onClick:bi},Le.createElement("span",null,"\u6700\u65B0"),Le.createElement("aside",null,Le.createElement(Qh.Z,{style:{color:(on==null?void 0:on.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),Le.createElement(Mu.Z,{style:{color:(on==null?void 0:on.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),Le.createElement(ht.default.Search,{value:on.save_search,className:Ct["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:Ir=>{on.save_search=Ir.target.value,vn(Ks({},on))},onSearch:Xi}),Le.createElement("div",{onClick:ur,className:Ct.btn},Le.createElement("img",{src:wh}),"\u5199\u9898\u89E3")),Le.createElement("div",{className:Ct.listWarp},Le.createElement(Se.Z,{spinning:yn,className:"mt20"},li==null?void 0:li.map((Ir,Vr)=>{let ns=!0;return Vr+1===li.length&&Vr!==0&&(ns=!1),Le.createElement(er,{active:Vn,key:Ir.id,data:Ir,showLine:ns,onClick:Ji,onAssist:Lo,onHide:ts})}),(li==null?void 0:li.length)===0&&Le.createElement(Qe.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),Le.createElement(Vt.Z,{className:Ct.pagination,showTotal:Ir=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},Ir),"\u6761\u6570\u636E"),total:on.total,showSizeChanger:!1,current:on==null?void 0:on.page,onChange:Nr,hideOnSinglePage:!0,showQuickJumper:!0}),Oi>0&&Le.createElement("div",{className:Ct.fixedRight,style:{width:jn}},Oi===1&&Le.createElement(ho,{identifier:pt,onClose:Vi,onOk:mr}),Oi===2&&Le.createElement(ho,{active:Vn,identifier:pt,onClose:Vi,onOk:ir}),Oi===3&&Le.createElement(Ds,{btnShowStatus:Di,onArticlesSkip:No,detailsIndex:Kn,active:Vn,identifier:pt,onClose:Vi,onOk:So,onEdit:_i,onAssist:Lo,onDelete:ao})))},ss={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,Ca=Object.defineProperties,_c=Object.getOwnPropertyDescriptors,zo=Object.getOwnPropertySymbols,Wa=Object.prototype.hasOwnProperty,Vo=Object.prototype.propertyIsEnumerable,ps=(pt,_t,Lt)=>_t in pt?Cl(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,us=(pt,_t)=>{for(var Lt in _t||(_t={}))Wa.call(_t,Lt)&&ps(pt,Lt,_t[Lt]);if(zo)for(var Lt of zo(_t))Vo.call(_t,Lt)&&ps(pt,Lt,_t[Lt]);return pt},Rs=(pt,_t)=>Ca(pt,_c(_t)),Ro=(pt,_t,Lt)=>new Promise((Sn,hn)=>{var on=Cn=>{try{yn(Lt.next(Cn))}catch(jn){hn(jn)}},vn=Cn=>{try{yn(Lt.throw(Cn))}catch(jn){hn(jn)}},yn=Cn=>Cn.done?Sn(Cn.value):Promise.resolve(Cn.value).then(on,vn);yn((Lt=Lt.apply(pt,_t)).next())}),zr=({visible:pt,onVisible:_t,value:Lt,onChange:Sn,setIndex:hn})=>{var on;const vn={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[yn,Cn]=(0,Le.useState)(vn);const[jn,ti]=(0,Le.useState)([]),[Kn,xi]=(0,Le.useState)([]),[Vn,mi]=(0,Le.useState)(!1),li=(0,Le.useRef)([]),Ri=(0,Le.useRef)(null),Di=(0,Te.useParams)();(0,Le.useEffect)(()=>(Di!=null&&Di.id&&(Ri.current=setInterval(()=>{Zi(30)},3e4)),()=>{clearInterval(Ri.current)}),[]);const Zi=gi=>Ro(void 0,null,function*(){const ur=yield(0,ge.uc)(Di==null?void 0:Di.id,{practice_time:gi})});(0,Le.useEffect)(()=>{Li(yn),ei()},[]),(0,Le.useEffect)(()=>(window.addEventListener("click",Ii),()=>{window.removeEventListener("click",Ii)}),[Di==null?void 0:Di.save_identifier,pt]),(0,Le.useEffect)(()=>{const gi=li.current.findIndex(mr=>mr.identifier===(Di==null?void 0:Di.save_identifier)),ur=li.current[gi-1],Ji=li.current[gi+1],_i=document.getElementById("oj-prev"),Vi=document.getElementById("oj-next");ur?_i.style.display="block":_i.style.display="none",Ji?Vi.style.display="block":Vi.style.display="none"},[Di==null?void 0:Di.save_identifier,li.current]);const Oi=(gi,ur)=>{if(gi.id===ur)return gi;for(let Ji=0,_i=gi;_i=_i.parentNode;Ji++){if(_i.id===ur)return _i;if(_i==document.documentElement)return!1}},Ii=gi=>Ro(void 0,null,function*(){!Oi(gi.target,"oj-drawer")&&pt&&_t(!1);const ur=li.current.findIndex(Vi=>Vi.identifier===(Di==null?void 0:Di.save_identifier)),Ji=li.current[ur-1],_i=li.current[ur+1];if(gi.target.id==="oj-prev"){if(!Ji||ur===-1){_e.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}gi.target.style.pointerEvents="none",gi.target.style.cursor="not-allowed",yield bi(Ji==null?void 0:Ji.identifier),hn("0"),setTimeout(()=>{gi.target.style.pointerEvents="auto",gi.target.style.cursor="pointer"},400)}if(gi.target.id==="oj-next"||gi.target.id==="oj-modal-next"){if(!_i||ur===-1){_e.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}gi.target.style.pointerEvents="none",gi.target.style.cursor="not-allowed",yield bi(_i==null?void 0:_i.identifier),hn("0"),setTimeout(()=>{gi.target.style.pointerEvents="auto",gi.target.style.cursor="pointer"},400)}});(0,Le.useEffect)(()=>{Sn(Di==null?void 0:Di.save_identifier);const gi=Kn.findIndex(ur=>ur.some(Ji=>Ji.identifier===(Di==null?void 0:Di.save_identifier)));Cn(gi===-1?Rs(us({},yn),{page:1}):Rs(us({},yn),{page:gi+1}))},[Di==null?void 0:Di.save_identifier,Kn]);const ar=gi=>{yn.page=1,yn.tag_discipline_id=gi,Cn(us({},yn)),Li(yn)},ei=()=>Ro(void 0,null,function*(){const gi=yield(0,Zn.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});ti(gi.tag_disciplines||[])}),Hi=gi=>{yn.page=1,yn.difficulty=typeof gi=="number"?gi:null,Cn(us({},yn)),Li(yn)},Li=gi=>Ro(void 0,null,function*(){var ur,Ji;mi(!0);const _i=yield(0,ge.KC)(gi);if(_i!=null&&_i.practices_list){for(var Vi=(ur=_i==null?void 0:_i.practices_list)==null?void 0:ur.length,mr=[],ir=0;ir<Vi;ir+=yn==null?void 0:yn.per_page)mr.push((Ji=_i==null?void 0:_i.practices_list)==null?void 0:Ji.slice(ir,ir+(yn==null?void 0:yn.per_page)));Cn(Rs(us({},yn),{total:_i==null?void 0:_i.practices_count})),li.current=(_i==null?void 0:_i.practices_list)||[],xi(mr)}mi(!1)}),bi=(gi,ur)=>Ro(void 0,null,function*(){const Ji=yield(0,Zn.ZP)(`/api/practices/${gi}/start`,{method:"get"});(Ji==null?void 0:Ji.status)===0&&Te.history.push(`/problems/${Ji==null?void 0:Ji.identifier}/oj/${gi}`)}),Xi=gi=>{yn.page=gi,Cn(us({},yn))};return Le.createElement("div",{className:ss.wrap,id:"oj-drawer",style:{left:pt?0:-700}},Le.createElement("div",{className:ss.head},Le.createElement("div",{className:ss.title},"\u9898\u76EE\u5217\u8868"),Le.createElement(ht.default.Search,{value:yn==null?void 0:yn.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:gi=>{yn.save_search=gi.target.value,Cn(us({},yn))},onSearch:()=>{yn.page=1,yn.search=yn.save_search,Cn(us({},yn)),Li(yn)}}),Le.createElement(xe.default,{value:yn==null?void 0:yn.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:gi=>gi.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:ar},jn.map(gi=>Le.createElement(xe.default.Option,{key:gi.id,value:gi.id},gi.name))),Le.createElement(xe.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:gi=>gi.parentNode,value:yn==null?void 0:yn.difficulty,onChange:Hi},Le.createElement(xe.default.Option,{value:1},"\u7B80\u5355"),Le.createElement(xe.default.Option,{value:2},"\u9002\u4E2D"),Le.createElement(xe.default.Option,{value:3},"\u56F0\u96BE"))),Le.createElement("div",{className:ss.content},Le.createElement(Se.Z,{spinning:Vn},(on=Kn==null?void 0:Kn[yn.page-1])==null?void 0:on.map(gi=>Le.createElement("div",{key:gi.identifier,className:ss.list,onClick:ur=>bi(gi.identifier,ur)},Le.createElement("i",{style:{visibility:Lt===gi.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),Le.createElement("span",{style:{fontWeight:Lt===gi.identifier?"bold":400,color:Lt===gi.identifier?"#ffffff":"#bac4cd"},title:gi==null?void 0:gi.name},gi.name),(gi==null?void 0:gi.difficulty)===1&&Le.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(gi==null?void 0:gi.difficulty)===2&&Le.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(gi==null?void 0:gi.difficulty)===3&&Le.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),Le.createElement("div",{className:ss.footer},Le.createElement(Vt.Z,{showTotal:gi=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},gi),"\u6761\u6570\u636E"),total:yn.total,pageSize:yn==null?void 0:yn.per_page,current:yn==null?void 0:yn.page,showSizeChanger:!1,onChange:Xi,showQuickJumper:!0,hideOnSinglePage:!0})))},Ad=({hack:pt,onTriggerPraise:_t,topicId:Lt,page:Sn,onPageChange:hn,user:on,submitRecords:vn,submitting:yn,submitResult:Cn})=>{const[jn]=(0,Te.useSearchParams)(),ti=(0,Te.useLocation)(),[Kn,xi]=(0,Le.useState)(jn.get("tab")||"0"),[Vn,mi]=(0,Le.useState)(0),[li,Ri]=(0,Le.useState)(0),[Di,Zi]=(0,Le.useState)(0),[Oi,Ii]=(0,Le.useState)(),[ar,ei]=(0,Le.useState)(!1);function Hi(bi){const Xi=bi.target.id;if(Kn==="3"&&Xi!==Kn&&(li===1||li===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:()=>{xi(Xi)}});return}xi(Xi)}(0,Le.useEffect)(()=>at.Z.subscribe("to-commit-info",()=>{xi("1")}),[]);function Li(){xi("2")}return Le.createElement("div",{className:Rt["left-panel"]},Le.createElement("ul",{className:`${Rt["s-navs"]} ${Rt["bg-white"]} ${Rt.b1}`},Le.createElement("li",{className:"mr40 current"},Le.createElement("img",{onClick:()=>ei(!0),src:Mn})),Le.createElement("li",{className:Rt["oj-mr"]},Le.createElement("a",{className:Kn==="0"?Rt.active:"",id:"0",onClick:Hi},"\u4EFB\u52A1\u63CF\u8FF0")),Le.createElement("li",{className:Rt["oj-mr"]},Le.createElement("a",{className:Kn==="3"?Rt.active:"",id:"3",onClick:Hi},"\u9898\u89E3",Di?`(${Di})`:"")),Le.createElement("li",{className:Rt["oj-mr"]},Le.createElement("a",{className:Kn==="2"?Rt.active:"",id:"2",onClick:Hi},"\u8BC4\u8BBA",Vn?`(${Vn})`:"")),Le.createElement("li",null,Le.createElement("a",{className:Kn==="1"?Rt.active:"",id:"1",onClick:Hi},"\u63D0\u4EA4\u8BB0\u5F55"))),Le.createElement("div",{className:`${Rt["tab-panel-body"]} ${Kn==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},Le.createElement(Ze,{hack:pt,onTriggerPraise:_t,toDiscuss:Li})),Le.createElement("div",{className:`${Rt["tab-panel-body"]} ${Kn==="1"?"":"hide"}`},vn!=null&&vn.records_count?Le.createElement(qe,{page:Sn,onPageChange:hn,topicId:Lt,submitting:yn,submitRecords:vn,submitResult:Cn}):Le.createElement(Qe.Z,null)),Le.createElement("div",{className:`${Rt["tab-panel-body"]} ${Kn==="2"?"":"hide"}`,style:{padding:0}},Le.createElement(kt,{setDiscussTotal:mi,user:on,identifier:pt.identifier,hack:pt,onTriggerPraise:_t})),Le.createElement("div",{className:`${Rt["tab-panel-body"]} ${Kn==="3"?"":"hide"}`,style:{padding:0}},Le.createElement(fl,{setListStatus:Ri,setFilterListTotal:Zi,tabStatus:Kn,identifier:pt.identifier})),Le.createElement(zr,{visible:ar,setIndex:xi,onVisible:bi=>ei(bi),value:Oi,onChange:bi=>Ii(bi)}))},Ho=Ee(46942),Nd=Ee(62522),ih=Ee(54318),rh=Ee(71302),Od=Ee(89392),Ch=Ee.n(Od),ic=Ee(56102),oo=Ee(59301),es=Object.defineProperty,ku=Object.defineProperties,qh=Object.getOwnPropertyDescriptors,Au=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,cu=Object.prototype.propertyIsEnumerable,Bl=(pt,_t,Lt)=>_t in pt?es(pt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[_t]=Lt,hs=(pt,_t)=>{for(var Lt in _t||(_t={}))ed.call(_t,Lt)&&Bl(pt,Lt,_t[Lt]);if(Au)for(var Lt of Au(_t))cu.call(_t,Lt)&&Bl(pt,Lt,_t[Lt]);return pt},Bs=(pt,_t)=>ku(pt,qh(_t)),rc=(pt,_t)=>{var Lt={};for(var Sn in pt)ed.call(pt,Sn)&&_t.indexOf(Sn)<0&&(Lt[Sn]=pt[Sn]);if(pt!=null&&Au)for(var Sn of Au(pt))_t.indexOf(Sn)<0&&cu.call(pt,Sn)&&(Lt[Sn]=pt[Sn]);return Lt},qa=(pt,_t,Lt)=>new Promise((Sn,hn)=>{var on=Cn=>{try{yn(Lt.next(Cn))}catch(jn){hn(jn)}},vn=Cn=>{try{yn(Lt.throw(Cn))}catch(jn){hn(jn)}},yn=Cn=>Cn.done?Sn(Cn.value):Promise.resolve(Cn.value).then(on,vn);yn((Lt=Lt.apply(pt,_t)).next())});const{Countdown:Id}=Ce.default,td={Java:"java",C:"c",Python:"py","C++":"c"};var Dd=(pt=>(pt[pt.SET_LOADING=0]="SET_LOADING",pt[pt.GET_DATA=1]="GET_DATA",pt[pt.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",pt[pt.SET_DATA=3]="SET_DATA",pt[pt.SET_DEBUGING=4]="SET_DEBUGING",pt[pt.SET_SUBMITING=5]="SET_SUBMITING",pt[pt.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",pt[pt.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",pt[pt.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",pt[pt.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",pt[pt.SET_PAGE=10]="SET_PAGE",pt[pt.GET_LANGUAGE=11]="GET_LANGUAGE",pt[pt.GET_DRAWER=12]="GET_DRAWER",pt))(Dd||{});function ka(){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(pt,_t){switch(_t.type){case 1:return hs(hs({},pt),_t.payload);case 3:return Bs(hs({},pt),{data:_t.payload});case 0:return Bs(hs({},pt),{loading:_t.payload});case 11:return Bs(hs({},pt),{languageList:_t.payload});case 12:return Bs(hs({},pt),{drawerData:_t.payload});case 9:return Bs(hs({},pt),{showNote:_t.payload});case 4:return Bs(hs({},pt),{debuging:_t.payload});case 5:return Bs(hs({},pt),{submitting:_t.payload});case 2:return Bs(hs({},pt),{submitRecords:_t.payload});case 10:return Bs(hs({},pt),{submitRecordPage:_t.payload});case 6:return Bs(hs({},pt),{executingMessage:_t.payload});case 7:return hs(hs({},pt),_t.payload);case 8:return hs(hs({},pt),_t.payload);default:throw new Error}}var Dt=({children:pt})=>{var _t,Lt,Sn,hn;const[on,vn]=(0,Le.useReducer)(gf,oc),{id:yn}=(0,Te.useParams)(),Cn=(0,Te.useLocation)(),[jn]=(0,Te.useSearchParams)(),{languageValue:ti,languageList:Kn,loading:xi,data:Vn,debugResult:mi,submitResult:li,submitRecords:Ri,submitRecordPage:Di,showNote:Zi,debuging:Oi,submitting:Ii,executingMessage:ar}=on,[ei,Hi]=(0,Le.useState)("#FFF"),[Li,bi]=(0,Le.useState)(null),[Xi,gi]=(0,Le.useState)({}),[ur,Ji]=(0,Le.useState)(!1),_i=(0,Le.useRef)(null),Vi=(0,Le.useRef)(null),mr=Vn==null?void 0:Vn.user,ir=Vn==null?void 0:Vn.hack;(0,Le.useEffect)(()=>((0,Te.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Te.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Te.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Te.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,Le.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,Le.useEffect)(()=>{var Yr;if(ur){const Io=document.getElementById("oj-next"),Cs=document.getElementById("oj-modal-next");((Yr=Io==null?void 0:Io.style)==null?void 0:Yr.display)==="none"?Cs.style.display="none":Cs.style.display="block"}},[ur]),(0,Le.useEffect)(()=>{function Yr(){return qa(this,null,function*(){var Io,Cs,To;const Yo=yield(0,ge.fu)(yn);if(Yo.status===401)document.location.href="/user/login";else{Yo.hack=Yo.practice,Yo.hack.code=St.Base64.decode((Io=Yo==null?void 0:Yo.hack)==null?void 0:Io.code);const ys=`${mr==null?void 0:mr.login}-language`;localStorage.getItem(ys)&&(Yo.hack.language=localStorage.getItem(ys)),Vi.current=Ch().cloneDeep(Yo),Vi.current.language=(Cs=Yo==null?void 0:Yo.hack)==null?void 0:Cs.language,vn({type:1,payload:{loading:!1,data:Yo}}),vn({type:8,payload:{languageValue:(To=Yo==null?void 0:Yo.hack)==null?void 0:To.language}})}})}yn&&Yr()},[yn]),(0,Le.useEffect)(()=>{vn({type:8,payload:{debugResult:void 0}}),ts(),Ji(!1)},[yn]),(0,Le.useEffect)(()=>{clearTimeout(_i.current)},[yn]),(0,Le.useEffect)(()=>{Lo()},[yn,Di]);const So=()=>{window.parent.postMessage("backExercise","*")};function Lo(){return qa(this,null,function*(){try{const Yr=yield(0,ge.zO)(yn,{limit:15,page:Di});vn({type:2,payload:Yr})}catch(Yr){console.log(Yr)}})}function ts(){return qa(this,null,function*(){try{const Yr=yield(0,ge.dd)(yn);vn({type:11,payload:Yr==null?void 0:Yr.data})}catch(Yr){console.log(Yr)}})}function ao(Yr){vn({type:10,payload:Yr})}function Nr(Yr){return qa(this,null,function*(){var Io,Cs,To;const Yo=((To=(Cs=(Io=window==null?void 0:window.location)==null?void 0:Io.pathname)==null?void 0:Cs.split("/"))==null?void 0:To[2])||yn;return yield(0,ge.n4)(Yo,Yr||{code:St.Base64.encode(ir.code),language:ti})})}function No(){return qa(this,null,function*(){var Yr;if(!ir.code||((Yr=ir.code)==null?void 0:Yr.trim())===""){_e.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(!Ii){vn({type:5,payload:!0});try{if(at.Z.publish("to-commit-info"),(yield Nr()).status===0){let _l=function(){return qa(this,null,function*(){const{status:Xo,data:Jo}=yield(0,ge.rX)(yn,"submit"),Es=ka()-Ys>(Yo*ys+3)*1e3;if(Xo!==0&&!Es&&setTimeout(_l,1e3),Es){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),vn({type:5,payload:!1});return}if(Xo===0){Jo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const pa=yield(0,ge.zO)(yn,{limit:15,page:Di});vn({type:8,payload:Bs(hs({},on),{submitResult:Jo,submitting:!1,submitRecords:pa})}),(Jo==null?void 0:Jo.status)===0&&Ji(!0)}})},Cs={};if((yield(0,ge.bM)(yn,Cs)).status===-1&&jn.get("exercisesId")){window.parent.location.href=`/classrooms/${jn.get("coursesId")}/exercise/${jn.get("exercisesId")}/detail`;return}const{time_limit:Yo,test_case_size:ys}=ir,Ys=ka();_l()}}catch(Io){vn({type:5,payload:!1})}}})}function Ir(){return qa(this,null,function*(){var Yr;if(!ir.code||((Yr=ir.code)==null?void 0:Yr.trim())===""){_e.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}on.debuging=!0,vn({type:4,payload:!0});try{if((yield Nr()).status===0){let Ys=function(){return qa(this,null,function*(){const{status:_l,message:Xo,data:Jo}=yield(0,ge.rX)(yn,"debug"),Es=ka()-ys>(Cs+3)*1e3;if(_l!==0&&!Es&&(vn({type:6,payload:Xo}),setTimeout(Ys,1e3)),Es){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),vn({type:4,payload:!1});return}_l===0&&(vn({type:4,payload:!1}),Jo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),vn({type:7,payload:Bs(hs({},on),{debugResult:Jo,debuging:!1})}))})};const{time_limit:Cs}=ir;let To={input:encodeURIComponent(Vn.test_case.input)};if((yield(0,ge.MU)(yn,To)).status===-1&&jn.get("exercisesId")){window.parent.location.href=`/classrooms/${jn.get("coursesId")}/exercise/${jn.get("exercisesId")}/detail`;return}const ys=ka();Ys()}else vn({type:4,payload:!1})}catch(Io){console.log(Io)}finally{}})}function Vr(Yr){var Io;clearTimeout(_i.current),_i.current=setTimeout(()=>{var Cs;Nr({code:St.Base64.encode(Yr),language:(Cs=Vi==null?void 0:Vi.current)==null?void 0:Cs.language})},2e3),vn({type:3,payload:Bs(hs({},Vi==null?void 0:Vi.current),{hack:Bs(hs({},(Io=Vi==null?void 0:Vi.current)==null?void 0:Io.hack),{code:Yr})})})}function ns(Yr){let Io=Yr.target.value;vn({type:3,payload:Bs(hs({},Vn),{test_case:{input:Io}})})}const Hr=Yr=>qa(void 0,null,function*(){var Io;if(vn({type:0,payload:!0}),(yield Nr()).status===0){vn({type:8,payload:{languageValue:Yr}}),Vi.current.language=Yr;const To=`${mr==null?void 0:mr.login}-language`;localStorage.setItem(To,Yr);const Yo=yield(0,ge.dd)(yn);if(Yo.status===0){const ys=(Io=Yo==null?void 0:Yo.data)==null?void 0:Io.find(Ys=>Ys.language===Yr);Vr(St.Base64.decode(ys.code))}setTimeout(()=>{vn({type:0,payload:!1})},300)}});function kr(){return qa(this,null,function*(){try{const Yr=yield(0,ge.H7)(yn,{language:ti});Yr.status===401?Te.history.replace("/login",{from:Cn.pathname}):(Vr(St.Base64.decode(Yr.code)),ts())}catch(Yr){console.log(Yr)}})}function $r(){he.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:oo.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",oo.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return qa(this,null,function*(){const Yr=yield(0,ge.fi)(yn,{language:ti});Yr.status===401?Te.history.replace("/login",{from:Cn.pathname}):Vr(St.Base64.decode(Yr.code))})}})}function Lr(){vn({type:9,payload:!0})}function lo(){vn({type:9,payload:!1})}function Ar(Yr){return qa(this,null,function*(){yield(0,ge.MK)(yn,Yr),vn({type:1,payload:{showNote:!1,data:Bs(hs({},Vn),{hack:Bs(hs({},ir),{notes:Yr.notes})})}})})}const po={input:(_t=Vn==null?void 0:Vn.test_case)==null?void 0:_t.input,is_file:(Lt=Vn==null?void 0:Vn.test_case)==null?void 0:Lt.is_file,language:((Sn=Vi.current)==null?void 0:Sn.language)||(ir==null?void 0:ir.language),code:ir==null?void 0:ir.code,title:"main."+td[ir==null?void 0:ir.language],modify_code:ir==null?void 0:ir.modify_code,notes:ir==null?void 0:ir.notes,debugResult:mi,debuging:Oi,submitting:Ii,executingMessage:ar,id:yn,languageValue:ti,languageList:Kn,onChangeLanguage:Hr,onCancelNote:lo,onAddNote:Ar,showNote:Zi,onShowNote:Lr,onSubmitCode:No,onChangeCode:Vr,onChangeInput:ns,onDebugCode:Ir,onResetCode:kr,onSyncCode:$r,onUpdateCode:Nr};function Uo(){return qa(this,null,function*(){const{praise_count:Yr}=yield(0,ge.vl)(ir.id,{container_type:"Hack",type:1});let Io=Bs(hs({},Vn),{hack:Bs(hs({},ir),{praises_count:Yr,user_praise:!ir.user_praise})});vn({type:3,payload:Io})})}const Go={topicId:yn,submitResult:li,submitRecords:Ri,submitting:Ii,page:Di,onPageChange:ao,hack:ir,user:Vn==null?void 0:Vn.user,onTriggerPraise:Uo};return console.log(Vn,Vi==null?void 0:Vi.current,"data--------"),oo.createElement(oo.Fragment,null,oo.createElement(Se.Z,{className:"oj-custom-large-spin",size:"large",spinning:xi},Vn?oo.createElement("div",{className:"oj-custom-warp"},oo.createElement("header",{className:ct.Z.header,style:{minWidth:1200}},oo.createElement("div",null,oo.createElement("img",{src:`${ve.Z.IMG_SERVER}/images/${mr.image_url}`,alt:"user",width:30}),oo.createElement("span",null,mr.name)),oo.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},oo.createElement("div",null,ir.name),oo.createElement(Ho.Z,{onChange:Yr=>{},className:"font12 c-grey-999"})),oo.createElement(ic.CopyToClipboard,{text:`${(hn=window.location)==null?void 0:hn.origin}/problems/${ir.identifier}/share`,onCopy:()=>_e.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},oo.createElement("span",{className:ct.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",oo.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),ir.edit_privilege?oo.createElement(Te.Link,{className:ct.Z.btn_back,to:`/problems/${ir.identifier}/ojedit`,style:{marginRight:10}}," ",oo.createElement(me.Z,null)," \u7F16\u8F91"):null,oo.createElement(Te.Link,{className:ct.Z.btn_back,onClick:()=>{},to:"/problems"}," ",oo.createElement(Ie.Z,null),"\u9000\u51FA")),oo.createElement(ce.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:oo.createElement(Ad,hs({},Go)),rightChild:oo.createElement(ln,hs({},po))})):null),oo.createElement(he.default,{centered:!0,closable:!1,width:680,footer:null,open:ur,className:"oj-modal"},oo.createElement("section",{className:"oj-modal-content"},oo.createElement("div",{className:"oj-modal-head"},oo.createElement("img",{src:Nd,alt:""}),oo.createElement("i",{onClick:()=>Ji(!1),className:"iconfont icon-guanbi1"})),oo.createElement("aside",null,oo.createElement("img",{className:"mr30",src:rh.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",oo.createElement("span",{style:{color:"#75d6ba",marginRight:100}},li==null?void 0:li.execute_time,"s"),"\u4F18\u4E8E",oo.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(li==null?void 0:li.time_better_than)||100,"%"),"\u7684\u7528\u6237"),oo.createElement("aside",{className:"mb50"},oo.createElement("img",{src:ih.Z,className:"mr30"}),oo.createElement("span",{className:"oj-modal-tt"},oo.createElement("span",null,oo.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),oo.createElement("span",{className:"c-light-primary"},li==null?void 0:li.execute_memory,"mb")),oo.createElement("span",null,oo.createElement("span",null))),"\u4F18\u4E8E",oo.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(li==null?void 0:li.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),oo.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function zt({languageValue:pt,languageList:_t,onChangeLanguage:Lt,title:Sn,modify_code:hn,onSyncCode:on,onShowCodeSetting:vn,onResetCode:yn}){const Cn=(0,Te.useLocation)(),jn=()=>{he.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:oo.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:yn})};return oo.createElement("div",{className:"action-bar"},oo.createElement(xe.default,{className:"oj-select",value:pt,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Lt},_t==null?void 0:_t.map(ti=>oo.createElement(xe.default.Option,{key:ti.language,value:ti.language},ti.language))),oo.createElement("span",null),oo.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:jn},oo.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),oo.createElement("a",{onClick:vn},oo.createElement("i",{className:"iconfont icon-shezhi"})))}function ln(pt){var _t=pt,{id:Lt,input:Sn,is_file:hn,showNote:on,onShowNote:vn,notes:yn,onCancelNote:Cn,onAddNote:jn,debugResult:ti,language:Kn,debuging:xi,submitting:Vn,executingMessage:mi,code:li,onSubmitCode:Ri,onDebugCode:Di,onChangeCode:Zi,onChangeInput:Oi,onUpdateCode:Ii}=_t,ar=rc(_t,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function ei(Li){return oo.createElement(zt,Bs(hs({},ar),{onShowCodeSetting:Li}))}const Hi={id:Lt,input:Sn,debugResult:ti,debuging:xi,is_file:hn,submitting:Vn,executingMessage:mi,onDebugCode:Di,onChangeCode:Zi,onSubmitCode:Ri,onChangeInput:Oi};return oo.createElement("div",{className:"right-panel"},oo.createElement(bt,{onUpdateCode:()=>{},language:Kn,value:li,onChange:Zi,ActionBarRender:ei}),oo.createElement("div",{className:`note-form-area ${on?"active":""}`},oo.createElement(vt,{onCancel:Cn,notes:yn,callback:jn})),oo.createElement(Bt.ZP,hs({},Hi)))}},86723:function(Pn,qt,Ee){"use strict";Ee.d(qt,{h:function(){return Le}});var Le=(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))(Le||{})},53576:function(Pn,qt,Ee){"use strict";Ee.d(qt,{H7:function(){return xe},KC:function(){return ue},M3:function(){return ie},MK:function(){return Se},MU:function(){return Te},Rg:function(){return ye},WH:function(){return z},X6:function(){return _e},bM:function(){return Ie},bx:function(){return ee},dd:function(){return ve},de:function(){return be},fi:function(){return ge},fu:function(){return me},gu:function(){return oe},n4:function(){return ce},qe:function(){return le},rL:function(){return we},rX:function(){return he},uc:function(){return ke},vl:function(){return de},wO:function(){return se},zO:function(){return Ce}});var Le=Ee(7660);function me(Ne){return(0,Le.U2)(`mypractices/${Ne}.json`,{hidePopLogin:!0})}function Ie(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/code_submit.json`,je)}function Te(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/code_debug.json`,je)}function Ce(Ne,je){return je.language&&(je.language=encodeURIComponent(je.language)),(0,Le.U2)(`mypractices/${Ne}/submit_records.json`,je)}function _e(Ne){return(0,Le.U2)("mypractices/record_detail.json",{id:Ne})}function he(Ne,je){return(0,Le.U2)(`mypractices/${Ne}/result.json`,{mode:je})}function Se(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/add_notes.json`,je)}function xe(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/restore_initial_code.json`,je)}function ge(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/sync_code.json`,je)}function ce(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/update_code.json`,je)}function ve(Ne){return(0,Le.v_)(`mypractices/${Ne}/initial_codes.json`)}function de(Ne,je){return(0,Le.v_)(`discusses/${Ne}/plus.json`,je)}function ue(Ne){return(0,Le.U2)("practices/practices_list.json",Ne)}function z(Ne,je){return(0,Le.U2)(`practices/${Ne}/question_solution_articles`,je)}function ee(Ne,je){return(0,Le.v_)(`practices/${Ne}/question_solution_articles`,je)}function oe(Ne,je){return(0,Le.gz)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}`,je)}function ie(Ne,je){return(0,Le.U2)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}/edit`,je)}function se(Ne,je){return(0,Le.U2)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}`,je)}function le(Ne,je){return(0,Le.v_)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}/set_authority_or_excellent`,je)}function ye(Ne,je){return(0,Le.v_)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}/praise_or_treads`,je)}function we(Ne,je){return(0,Le.v_)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}/hide`)}function be(Ne,je){return(0,Le.IV)(`practices/${Ne}/question_solution_articles/${je==null?void 0:je.active}`,je)}function ke(Ne,je){return(0,Le.v_)(`mypractices/${Ne}/update_practice_time_sum`,je)}},52649:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return de}});var Le=Ee(59301),me=Ee(8591),Ie=Ee(6848),Te=Ee(71418),Ce=Ee(95237),_e=Ee(43604),he=Ee(58421),Se=Ee(3113),xe=Ee(64726),ge=Ee(7660),ce=Ee(99325),ve=(z,ee,oe)=>new Promise((ie,se)=>{var le=be=>{try{we(oe.next(be))}catch(ke){se(ke)}},ye=be=>{try{we(oe.throw(be))}catch(ke){se(ke)}},we=be=>be.done?ie(be.value):Promise.resolve(be.value).then(le,ye);we((oe=oe.apply(z,ee)).next())}),de=({id:z,activeDiscussIndex:ee,onReplyDiscuss:oe,adminOrOperator:ie})=>{const[se,le]=(0,Le.useState)(""),[ye,we]=(0,Le.useState)(!1);function be(Ne){le(Ne)}function ke(){if(!se){me.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}oe(z,se),le("")}return(0,Le.useEffect)(()=>{ee!=z&&we(!1)},[ee]),Le.createElement("div",{key:z,className:"discuss-item-editor",style:{display:ee===z?"block":"none",width:"100%"}},Le.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:be,extraUse:ie&&Le.createElement(Ie.Z,{color:"#fff",open:ye,destroyTooltipOnHide:!0,title:ue({id:z,isOpen:ye,activeDiscussIndex:ee,onChange:be,setIsOpen:we}),overlayStyle:{maxWidth:600}},Le.createElement("a",{title:ye?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>we(!ye)},Le.createElement("i",{className:"iconfont icon-dianzan11"})))}),Le.createElement("a",{onClick:ke,className:"btn-send"},"\u53D1\u9001"))};const ue=z=>{const[ee,oe]=(0,Le.useState)(!1),[ie,se]=(0,Le.useState)([]),[le,ye]=(0,Le.useState)(1);(0,Le.useEffect)(()=>{z!=null&&z.isOpen?we():(ye(1),se([]))},[z==null?void 0:z.isOpen]);const we=()=>ve(void 0,null,function*(){oe(!0);const be=yield(0,ge.ZP)(`/api/discusses/${z==null?void 0:z.id}/recommend_answer.json`,{method:"get"});(be==null?void 0:be.status)==0&&se(be==null?void 0:be.answer),oe(!1)});return Le.createElement(Te.Z,{spinning:ee},Le.createElement("div",{style:{color:"#000"}},Le.createElement(ce.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(ie==null?void 0:ie[le-1])||""}),Le.createElement(Ce.Z,{justify:"end",align:"middle"},Le.createElement(_e.Z,null,Le.createElement(he.Z,{simple:!0,current:le,pageSize:1,total:(ie==null?void 0:ie.length)||0,onChange:be=>{ye(be)}})),Le.createElement(_e.Z,null,Le.createElement(Se.ZP,{onClick:()=>ve(void 0,null,function*(){z==null||z.onChange(ie==null?void 0:ie[le-1]),z==null||z.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},60918:function(Pn,qt,Ee){"use strict";Ee.d(qt,{o:function(){return xe}});var Le=Ee(7660),me=Ee(93125),Ie=Ee.n(me);let Te="",Ce,_e="";function he(ge){Se(ge)}function Se(ge){Ce=new(Ie()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(ce){console.log("addFileSuccess: "+ce.file.name),ge.addFileSuccess&&ge.addFileSuccess(ce),Ce.startUpload()},onUploadstarted:function(ce){const ve=ce.file.name;if(ce.videoId){var ue=`/api/users/${Te}/video_auths.json`;(0,Le.ZP)(ue,{method:"put",body:{video_id:ce.videoId,title:ve,file_name:ve,virtual_classroom_id:_e}}).then(z=>{if(z.status==-1){ge.onUploadError&&ge.onUploadError(ce);return}const ee=z.data;var oe=ee.UploadAuth,ie=ee.UploadAddress,se=ee.VideoId;Ce.setUploadAuthAndAddress(ce,oe,ie)}).catch(z=>{Ce.deleteFile(Ce._curIndex),Ce.nextUpload(),console.log(z)})}else{var de=`/api/users/${Te}/video_auths.json`;const z="";(0,Le.ZP)(de,{method:"Post",body:{title:z+ve,file_name:z+ve,virtual_classroom_id:_e}}).then(ee=>{if(ee){const le=ee.data;var oe=le.UploadAuth,ie=le.UploadAddress,se=le.VideoId;Ce.setUploadAuthAndAddress(ce,oe,ie,se)}}).catch(ee=>{Ce.deleteFile(Ce._curIndex),Ce.nextUpload(),console.log(ee)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(ce){ge.onUploadSucceed&&ge.onUploadSucceed(ce),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(ce,ve,de){ge.onUploadFailed&&ge.onUploadFailed(ce),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(ce,ve,de){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(ce,ve,de){ge.onUploadProgress&&ge.onUploadProgress(ce,ve,de);var ue=Math.ceil(de*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(ce){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var ve=`/api/users/${Te}/video_auths.json`;(0,Le.ZP)(ve,{method:"put",body:{video_id:ce.videoId}}).then(de=>{var z=de.data.UploadAuth;Ce.resumeUploadWithAuth(z)}).catch(de=>{console.log(de)})},onUploadEnd:function(ce){ge.onUploadEnd&&ge.onUploadEnd(ce),console.log("onUploadEnd: uploaded all the files")}}),ge.gotUploader&&ge.gotUploader(Ce)}function xe(ge,ce,ve){ge&&(Te=ge),ce&&(_e=ce),he(ve)}},20736:function(Pn,qt,Ee){"use strict";Ee.d(qt,{BU:function(){return me},Dj:function(){return Le},gH:function(){return Ie},vp:function(){return Te}});function Le(Ce){try{Ce.mozRequestFullScreen?Ce.mozRequestFullScreen():Ce.webkitRequestFullScreen&&Ce.webkitRequestFullScreen()}catch(_e){console.log(_e,":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 Ie=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function Te(){var Ce=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,_e=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",Ce),window.isFullScreen?window.isFullScreen:Ce!=null}},85187:function(Pn,qt,Ee){"use strict";Ee.d(qt,{AL:function(){return ye},Iy:function(){return ce},Qv:function(){return ue},ez:function(){return le},jb:function(){return ve}});var Le=Ee(32834),me=Ee.n(Le),Ie=Ee(11690),Te=Ee.n(Ie);let Ce=1;function _e(je,Ve){const Je=je.match(/^(\s+)(?:```)/);if(Je===null)return Ve;const We=Je[1];return Ve.split(`
|
|
|
`).map(gt=>{const ut=gt.match(/^\s+/);if(ut===null)return gt;const[bt]=ut;return bt.length>=We.length?gt.slice(We.length):gt}).join(`
|
|
|
`)}let he=[],Se=["<ul>"];const xe=new(me()).Renderer,ge=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ce(){he.length=0,Se=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function de(je,Ve,Je,We){if(Ve>=je.length||je[Ve].level<=Je)return Ve;var gt=je[Ve];We.push("<li><a href='#"+Ce+gt.anchor+"'>"+gt.text+"</a>"),Ve++;var ut=[];return Ve=de(je,Ve,gt.level,ut),ut.length>0&&(We.push("<ul>"),ut.forEach(function(bt){We.push(bt)}),We.push("</ul>")),We.push("</li>"),Ve=de(je,Ve,Je,We),Ve}function ue(){return de(he,0,0,Se),Se.push("</ul>"),Se.join("")}const z={heading(je){const Ve=ge.exec(je);if(Ce+=1,Ve)return{type:"heading",raw:Ve[0],depth:Ve[1].length,text:Ve[2]}},fences(je){const Ve=this.rules.block.fences.exec(je);if(Ve){const Je=Ve[0];let We=_e(Je,Ve[3]||"");const gt=Ve[2]?Ve[2].trim():Ve[2];if(["latex","katex","math"].indexOf(gt)>=0){const ut=ie(),bt=We;We=ut,se[ut]={type:"block",expression:bt}}return{type:"code",raw:Je,lang:gt,text:We}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let oe=0;const ie=()=>`__special_katext_id_${oe++}__`;let se={};function le(){return se}function ye(){oe=0,se={}}function we(je){return je=je.replace(ee,(Ve,Je)=>{const We=ie();return se[We]={type:"inline",expression:Je},We}),je}const be=xe.listitem;xe.listitem=function(je){return be(we(je))};const ke=xe.paragraph;xe.paragraph=function(je){return ke(we(je))};const Ne=xe.tablecell;xe.tablecell=function(je,Ve){return Ne(we(je),Ve)},xe.code=function(je,Ve,Je){const We=(Ve||"").match(/\S*/)[0];return We?["latex","katex","math"].indexOf(We)>=0?`<p class='editormd-tex'>${je}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ve}">${Je?je:(0,Ie.escape)(je,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Je?je:(0,Ie.escape)(je,!0))+"</code></pre>"},xe.heading=function(je,Ve,Je){let We=this.options.headerPrefix+Je.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return he.push({anchor:We,level:Ve,text:je}),"<h"+Ve+' id="'+Ce+We+'">'+je+"</h"+Ve+">"},me().setOptions({silent:!0,gfm:!0,pedantic:!1}),me().use({tokenizer:z,renderer:xe}),qt.ZP=me()},90691:function(Pn,qt,Ee){"use strict";Ee.d(qt,{G:function(){return Ce},t:function(){return Te}});var Le=Ee(7062),me=Ee.n(Le);const Ie=null;function Te(_e,he){let Se=me().get("__ec");Se||(Se={}),Se[_e]=he,me().set("__ec",Se)}function Ce(_e,he){let Se=me().get("__ec");return Se?Se[_e]===void 0?he:Se[_e]:he}},44860:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return co}});class Le{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function($e,tt){return $e.__proto__=tt,$e},Object.assign=Object.assign||function($e){if($e==null)throw new TypeError("Cannot convert undefined or null to object");let tt=Object($e);for(let et=1;et<arguments.length;et++){let Pt=arguments[et];if(Pt!=null)for(let At in Pt)Pt.hasOwnProperty(At)&&(tt[At]=Pt[At])}return tt},typeof self.Promise!="function"&&Ee(3867).polyfill()}}Le.install();var me=Le,Ie=Ee(86204),Te=Ee.n(Ie);class Ce{static e($e,tt){(!$e||Ce.FORCE_GLOBAL_TAG)&&($e=Ce.GLOBAL_TAG);let et=`[${$e}] > ${tt}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","error",et),Ce.ENABLE_ERROR&&(console.error?console.error(et):console.warn?console.warn(et):console.log(et))}static i($e,tt){(!$e||Ce.FORCE_GLOBAL_TAG)&&($e=Ce.GLOBAL_TAG);let et=`[${$e}] > ${tt}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","info",et),Ce.ENABLE_INFO&&(console.info?console.info(et):console.log(et))}static w($e,tt){(!$e||Ce.FORCE_GLOBAL_TAG)&&($e=Ce.GLOBAL_TAG);let et=`[${$e}] > ${tt}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","warn",et),Ce.ENABLE_WARN&&(console.warn?console.warn(et):console.log(et))}static d($e,tt){(!$e||Ce.FORCE_GLOBAL_TAG)&&($e=Ce.GLOBAL_TAG);let et=`[${$e}] > ${tt}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","debug",et),Ce.ENABLE_DEBUG&&(console.debug?console.debug(et):console.log(et))}static v($e,tt){(!$e||Ce.FORCE_GLOBAL_TAG)&&($e=Ce.GLOBAL_TAG);let et=`[${$e}] > ${tt}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","verbose",et),Ce.ENABLE_VERBOSE&&console.log(et)}}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(Te());var _e=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($e){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=$e,this._totalBytes+=$e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=$e,this._totalBytes+=$e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=$e,this._totalBytes+=$e,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let $e=(this._now()-this._lastCheckpoint)/1e3;return $e==0&&($e=1),this._intervalBytes/$e/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let $e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/$e/1024}}var Se=he;class xe{constructor($e){this._message=$e}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class ge extends xe{constructor($e){super($e)}get name(){return"IllegalStateException"}}class ce extends xe{constructor($e){super($e)}get name(){return"InvalidArgumentException"}}class ve extends xe{constructor($e){super($e)}get name(){return"NotImplementedException"}}const de={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},ue={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class z{constructor($e){this._type=$e||"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($e){this._onContentLengthKnown=$e}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect($e){this._onURLRedirect=$e}get onDataArrival(){return this._onDataArrival}set onDataArrival($e){this._onDataArrival=$e}get onError(){return this._onError}set onError($e){this._onError=$e}get onComplete(){return this._onComplete}set onComplete($e){this._onComplete=$e}open($e,tt){throw new ve("Unimplemented abstract function!")}abort(){throw new ve("Unimplemented abstract function!")}}let ee={};function oe(){let cn=self.navigator.userAgent.toLowerCase(),$e=/(edge)\/([\w.]+)/.exec(cn)||/(opr)[\/]([\w.]+)/.exec(cn)||/(chrome)[ \/]([\w.]+)/.exec(cn)||/(iemobile)[\/]([\w.]+)/.exec(cn)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(cn)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(cn)||/(webkit)[ \/]([\w.]+)/.exec(cn)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(cn)||/(msie) ([\w.]+)/.exec(cn)||cn.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(cn)||cn.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(cn)||[],tt=/(ipad)/.exec(cn)||/(ipod)/.exec(cn)||/(windows phone)/.exec(cn)||/(iphone)/.exec(cn)||/(kindle)/.exec(cn)||/(android)/.exec(cn)||/(windows)/.exec(cn)||/(mac)/.exec(cn)||/(linux)/.exec(cn)||/(cros)/.exec(cn)||[],et={browser:$e[5]||$e[3]||$e[1]||"",version:$e[2]||$e[4]||"0",majorVersion:$e[4]||$e[2]||"0",platform:tt[0]||""},Pt={};if(et.browser){Pt[et.browser]=!0;let At=et.majorVersion.split(".");Pt.version={major:parseInt(et.majorVersion,10),string:et.version},At.length>1&&(Pt.version.minor=parseInt(At[1],10)),At.length>2&&(Pt.version.build=parseInt(At[2],10))}if(et.platform&&(Pt[et.platform]=!0),(Pt.chrome||Pt.opr||Pt.safari)&&(Pt.webkit=!0),Pt.rv||Pt.iemobile){Pt.rv&&delete Pt.rv;let At="msie";et.browser=At,Pt[At]=!0}if(Pt.edge){delete Pt.edge;let At="msedge";et.browser=At,Pt[At]=!0}if(Pt.opr){let At="opera";et.browser=At,Pt[At]=!0}if(Pt.safari&&Pt.android){let At="android";et.browser=At,Pt[At]=!0}Pt.name=et.browser,Pt.platform=et.platform;for(let At in ee)ee.hasOwnProperty(At)&&delete ee[At];Object.assign(ee,Pt)}oe();var ie=ee;class se extends z{static isSupported(){try{let $e=ie.msedge&&ie.version.minor>=15048,tt=ie.msedge?$e:!0;return self.fetch&&self.ReadableStream&&tt}catch($e){return!1}}constructor($e,tt){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=$e,this._config=tt,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open($e,tt){this._dataSource=$e,this._range=tt;let et=$e.url;this._config.reuseRedirectedURL&&$e.redirectedURL!=null&&(et=$e.redirectedURL);let Pt=this._seekHandler.getConfig(et,tt),At=new self.Headers;if(typeof Pt.headers=="object"){let Ct=Pt.headers;for(let dn in Ct)Ct.hasOwnProperty(dn)&&At.append(dn,Ct[dn])}let kt={method:"GET",headers:At,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let Ct in this._config.headers)At.append(Ct,this._config.headers[Ct]);$e.cors===!1&&(kt.mode="same-origin"),$e.withCredentials&&(kt.credentials="include"),$e.referrerPolicy&&(kt.referrerPolicy=$e.referrerPolicy),this._status=de.kConnecting,self.fetch(Pt.url,kt).then(Ct=>{if(this._requestAbort){this._requestAbort=!1,this._status=de.kIdle;return}if(Ct.ok&&Ct.status>=200&&Ct.status<=299){if(Ct.url!==Pt.url&&this._onURLRedirect){let _n=this._seekHandler.removeURLParameters(Ct.url);this._onURLRedirect(_n)}let dn=Ct.headers.get("Content-Length");return dn!=null&&(this._contentLength=parseInt(dn),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,Ct.body.getReader())}else if(this._status=de.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Ct.status,msg:Ct.statusText});else throw new xe("FetchStreamLoader: Http code invalid, "+Ct.status+" "+Ct.statusText)}).catch(Ct=>{if(this._status=de.kError,this._onError)this._onError(ue.EXCEPTION,{code:-1,msg:Ct.message});else throw Ct})}abort(){this._requestAbort=!0}_pump($e){return $e.read().then(tt=>{if(tt.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=de.kError;let et=ue.EARLY_EOF,Pt={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(et,Pt);else throw new xe(Pt.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,$e.cancel();this._status=de.kBuffering;let et=tt.value.buffer,Pt=this._range.from+this._receivedLength;this._receivedLength+=et.byteLength,this._onDataArrival&&this._onDataArrival(et,Pt,this._receivedLength),this._pump($e)}}).catch(tt=>{if(tt.code===11&&ie.msedge)return;this._status=de.kError;let et=0,Pt=null;if((tt.code===19||tt.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(et=ue.EARLY_EOF,Pt={code:tt.code,msg:"Fetch stream meet Early-EOF"}):(et=ue.EXCEPTION,Pt={code:tt.code,msg:tt.message}),this._onError)this._onError(et,Pt);else throw new xe(Pt.msg)})}}var le=se;class ye extends z{static isSupported(){try{let $e=new XMLHttpRequest;return $e.open("GET","https://example.com",!0),$e.responseType="moz-chunked-arraybuffer",$e.responseType==="moz-chunked-arraybuffer"}catch($e){return _e.w("MozChunkedLoader",$e.message),!1}}constructor($e,tt){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=$e,this._config=tt,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($e,tt){this._dataSource=$e,this._range=tt;let et=$e.url;this._config.reuseRedirectedURL&&$e.redirectedURL!=null&&(et=$e.redirectedURL);let Pt=this._seekHandler.getConfig(et,tt);this._requestURL=Pt.url;let At=this._xhr=new XMLHttpRequest;if(At.open("GET",Pt.url,!0),At.responseType="moz-chunked-arraybuffer",At.onreadystatechange=this._onReadyStateChange.bind(this),At.onprogress=this._onProgress.bind(this),At.onloadend=this._onLoadEnd.bind(this),At.onerror=this._onXhrError.bind(this),$e.withCredentials&&(At.withCredentials=!0),typeof Pt.headers=="object"){let kt=Pt.headers;for(let Ct in kt)kt.hasOwnProperty(Ct)&&At.setRequestHeader(Ct,kt[Ct])}if(typeof this._config.headers=="object"){let kt=this._config.headers;for(let Ct in kt)kt.hasOwnProperty(Ct)&&At.setRequestHeader(Ct,kt[Ct])}this._status=de.kConnecting,At.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=de.kComplete}_onReadyStateChange($e){let tt=$e.target;if(tt.readyState===2){if(tt.responseURL!=null&&tt.responseURL!==this._requestURL&&this._onURLRedirect){let et=this._seekHandler.removeURLParameters(tt.responseURL);this._onURLRedirect(et)}if(tt.status!==0&&(tt.status<200||tt.status>299))if(this._status=de.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:tt.status,msg:tt.statusText});else throw new xe("MozChunkedLoader: Http code invalid, "+tt.status+" "+tt.statusText);else this._status=de.kBuffering}}_onProgress($e){if(this._status===de.kError)return;this._contentLength===null&&$e.total!==null&&$e.total!==0&&(this._contentLength=$e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let tt=$e.target.response,et=this._range.from+this._receivedLength;this._receivedLength+=tt.byteLength,this._onDataArrival&&this._onDataArrival(tt,et,this._receivedLength)}_onLoadEnd($e){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($e){this._status=de.kError;let tt=0,et=null;if(this._contentLength&&$e.loaded<this._contentLength?(tt=ue.EARLY_EOF,et={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(tt=ue.EXCEPTION,et={code:-1,msg:$e.constructor.name+" "+$e.type}),this._onError)this._onError(tt,et);else throw new xe(et.msg)}}var we=ye;class be extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let $e=new XMLHttpRequest;return $e.open("GET","https://example.com",!0),$e.responseType="ms-stream",$e.responseType==="ms-stream"}catch($e){return Log.w("MSStreamLoader",$e.message),!1}}constructor($e,tt){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=$e,this._config=tt,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($e,tt){this._internalOpen($e,tt,!1)}_internalOpen($e,tt,et){this._dataSource=$e,et?this._currentRange=tt:this._totalRange=tt;let Pt=$e.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Pt=this._currentRedirectedURL:$e.redirectedURL!=null&&(Pt=$e.redirectedURL));let At=this._seekHandler.getConfig(Pt,tt);this._currentRequestURL=At.url;let kt=this._reader=new self.MSStreamReader;kt.onprogress=this._msrOnProgress.bind(this),kt.onload=this._msrOnLoad.bind(this),kt.onerror=this._msrOnError.bind(this);let Ct=this._xhr=new XMLHttpRequest;if(Ct.open("GET",At.url,!0),Ct.responseType="ms-stream",Ct.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Ct.onerror=this._xhrOnError.bind(this),$e.withCredentials&&(Ct.withCredentials=!0),typeof At.headers=="object"){let dn=At.headers;for(let _n in dn)dn.hasOwnProperty(_n)&&Ct.setRequestHeader(_n,dn[_n])}if(typeof this._config.headers=="object"){let dn=this._config.headers;for(let _n in dn)dn.hasOwnProperty(_n)&&Ct.setRequestHeader(_n,dn[_n])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,Ct.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($e){let tt=$e.target;if(tt.readyState===2)if(tt.status>=200&&tt.status<=299){if(this._status=LoaderStatus.kBuffering,tt.responseURL!=null){let Pt=this._seekHandler.removeURLParameters(tt.responseURL);tt.responseURL!==this._currentRequestURL&&Pt!==this._currentRedirectedURL&&(this._currentRedirectedURL=Pt,this._onURLRedirect&&this._onURLRedirect(Pt))}let et=tt.getResponseHeader("Content-Length");if(et!=null&&this._contentLength==null){let Pt=parseInt(et);Pt>0&&(this._contentLength=Pt,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:tt.status,msg:tt.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+tt.status+" "+tt.statusText);else if(tt.readyState===3&&tt.status>=200&&tt.status<=299){this._status=LoaderStatus.kBuffering;let et=tt.response;this._reader.readAsArrayBuffer(et)}}_xhrOnError($e){this._status=LoaderStatus.kError;let tt=LoaderErrors.EXCEPTION,et={code:-1,msg:$e.constructor.name+" "+$e.type};if(this._onError)this._onError(tt,et);else throw new RuntimeException(et.msg)}_msrOnProgress($e){let et=$e.target.result;if(et==null){this._doReconnectIfNeeded();return}let Pt=et.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=et.byteLength;let At=this._totalRange.from+this._receivedLength;this._receivedLength+=Pt.byteLength,this._onDataArrival&&this._onDataArrival(Pt,At,this._receivedLength),et.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${At+Pt.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let $e={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,$e,!0)}}_msrOnLoad($e){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError($e){this._status=LoaderStatus.kError;let tt=0,et=null;if(this._contentLength&&this._receivedLength<this._contentLength?(tt=LoaderErrors.EARLY_EOF,et={code:-1,msg:"MSStream meet Early-Eof"}):(tt=LoaderErrors.EARLY_EOF,et={code:-1,msg:$e.constructor.name+" "+$e.type}),this._onError)this._onError(tt,et);else throw new RuntimeException(et.msg)}}var ke=null;class Ne extends z{static isSupported(){try{let $e=new XMLHttpRequest;return $e.open("GET","https://example.com",!0),$e.responseType="arraybuffer",$e.responseType==="arraybuffer"}catch($e){return _e.w("RangeLoader",$e.message),!1}}constructor($e,tt){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=$e,this._config=tt,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 Se,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($e,tt){this._dataSource=$e,this._range=tt,this._status=de.kConnecting;let et=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(et=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!et?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let $e=this._currentChunkSizeKB*1024,tt=this._range.from+this._receivedLength,et=tt+$e;this._contentLength!=null&&et-this._range.from>=this._contentLength&&(et=this._range.from+this._contentLength-1),this._currentRequestRange={from:tt,to:et},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen($e,tt){this._lastTimeLoaded=0;let et=$e.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?et=this._currentRedirectedURL:$e.redirectedURL!=null&&(et=$e.redirectedURL));let Pt=this._seekHandler.getConfig(et,tt);this._currentRequestURL=Pt.url;let At=this._xhr=new XMLHttpRequest;if(At.open("GET",Pt.url,!0),At.responseType="arraybuffer",At.onreadystatechange=this._onReadyStateChange.bind(this),At.onprogress=this._onProgress.bind(this),At.onload=this._onLoad.bind(this),At.onerror=this._onXhrError.bind(this),$e.withCredentials&&(At.withCredentials=!0),typeof Pt.headers=="object"){let kt=Pt.headers;for(let Ct in kt)kt.hasOwnProperty(Ct)&&At.setRequestHeader(Ct,kt[Ct])}if(typeof this._config.headers=="object"){let kt=this._config.headers;for(let Ct in kt)kt.hasOwnProperty(Ct)&&At.setRequestHeader(Ct,kt[Ct])}At.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($e){let tt=$e.target;if(tt.readyState===2){if(tt.responseURL!=null){let et=this._seekHandler.removeURLParameters(tt.responseURL);tt.responseURL!==this._currentRequestURL&&et!==this._currentRedirectedURL&&(this._currentRedirectedURL=et,this._onURLRedirect&&this._onURLRedirect(et))}if(tt.status>=200&&tt.status<=299){if(this._waitForTotalLength)return;this._status=de.kBuffering}else if(this._status=de.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:tt.status,msg:tt.statusText});else throw new xe("RangeLoader: Http code invalid, "+tt.status+" "+tt.statusText)}}_onProgress($e){if(this._status===de.kError)return;if(this._contentLength===null){let et=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,et=!0;let Pt=$e.total;this._internalAbort(),Pt!=null&Pt!==0&&(this._totalLength=Pt)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,et){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let tt=$e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=$e.loaded,this._speedSampler.addBytes(tt)}_normalizeSpeed($e){let tt=this._chunkSizeKBList,et=tt.length-1,Pt=0,At=0,kt=et;if($e<tt[0])return tt[0];for(;At<=kt;){if(Pt=At+Math.floor((kt-At)/2),Pt===et||$e>=tt[Pt]&&$e<tt[Pt+1])return tt[Pt];tt[Pt]<$e?At=Pt+1:kt=Pt-1}}_onLoad($e){if(this._status===de.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let tt=this._speedSampler.lastSecondKBps;if(tt===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(tt=this._speedSampler.currentKBps)),tt!==0){let kt=this._normalizeSpeed(tt);this._currentSpeedNormalized!==kt&&(this._currentSpeedNormalized=kt,this._currentChunkSizeKB=kt)}let et=$e.target.response,Pt=this._range.from+this._receivedLength;this._receivedLength+=et.byteLength;let At=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():At=!0,this._onDataArrival&&this._onDataArrival(et,Pt,this._receivedLength),At&&(this._status=de.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError($e){this._status=de.kError;let tt=0,et=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(tt=ue.EARLY_EOF,et={code:-1,msg:"RangeLoader meet Early-Eof"}):(tt=ue.EXCEPTION,et={code:-1,msg:$e.constructor.name+" "+$e.type}),this._onError)this._onError(tt,et);else throw new xe(et.msg)}}var je=Ne;class Ve extends z{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch($e){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($e){try{let tt=this._ws=new self.WebSocket($e.url);tt.binaryType="arraybuffer",tt.onopen=this._onWebSocketOpen.bind(this),tt.onclose=this._onWebSocketClose.bind(this),tt.onmessage=this._onWebSocketMessage.bind(this),tt.onerror=this._onWebSocketError.bind(this),this._status=de.kConnecting}catch(tt){this._status=de.kError;let et={code:tt.code,msg:tt.message};if(this._onError)this._onError(ue.EXCEPTION,et);else throw new xe(et.msg)}}abort(){let $e=this._ws;$e&&($e.readyState===0||$e.readyState===1)&&(this._requestAbort=!0,$e.close()),this._ws=null,this._status=de.kComplete}_onWebSocketOpen($e){this._status=de.kBuffering}_onWebSocketClose($e){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=de.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage($e){if($e.data instanceof ArrayBuffer)this._dispatchArrayBuffer($e.data);else if($e.data instanceof Blob){let tt=new FileReader;tt.onload=()=>{this._dispatchArrayBuffer(tt.result)},tt.readAsArrayBuffer($e.data)}else{this._status=de.kError;let tt={code:-1,msg:"Unsupported WebSocket message type: "+$e.data.constructor.name};if(this._onError)this._onError(ue.EXCEPTION,tt);else throw new xe(tt.msg)}}_dispatchArrayBuffer($e){let tt=$e,et=this._receivedLength;this._receivedLength+=tt.byteLength,this._onDataArrival&&this._onDataArrival(tt,et,this._receivedLength)}_onWebSocketError($e){this._status=de.kError;let tt={code:$e.code,msg:$e.message};if(this._onError)this._onError(ue.EXCEPTION,tt);else throw new xe(tt.msg)}}var Je=Ve;class We{constructor($e){this._zeroStart=$e||!1}getConfig($e,tt){let et={};if(tt.from!==0||tt.to!==-1){let Pt;tt.to!==-1?Pt=`bytes=${tt.from.toString()}-${tt.to.toString()}`:Pt=`bytes=${tt.from.toString()}-`,et.Range=Pt}else this._zeroStart&&(et.Range="bytes=0-");return{url:$e,headers:et}}removeURLParameters($e){return $e}}var gt=We;class ut{constructor($e,tt){this._startName=$e,this._endName=tt}getConfig($e,tt){let et=$e;if(tt.from!==0||tt.to!==-1){let Pt=!0;et.indexOf("?")===-1&&(et+="?",Pt=!1),Pt&&(et+="&"),et+=`${this._startName}=${tt.from.toString()}`,tt.to!==-1&&(et+=`&${this._endName}=${tt.to.toString()}`)}return{url:et,headers:{}}}removeURLParameters($e){let tt=$e.split("?")[0],et,Pt=$e.indexOf("?");Pt!==-1&&(et=$e.substring(Pt+1));let At="";if(et!=null&&et.length>0){let kt=et.split("&");for(let Ct=0;Ct<kt.length;Ct++){let dn=kt[Ct].split("="),_n=Ct>0;dn[0]!==this._startName&&dn[0]!==this._endName&&(_n&&(At+="&"),At+=kt[Ct])}}return At.length===0?tt:tt+"?"+At}}var bt=ut;class rt{constructor($e,tt,et){this.TAG="IOController",this._config=tt,this._extraData=et,this._stashInitialSize=1024*384,tt.stashInitialSize!=null&&tt.stashInitialSize>0&&(this._stashInitialSize=tt.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,tt.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=$e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test($e.url),this._refTotalLength=$e.filesize?$e.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new Se,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($e){this._extraData=$e}get onDataArrival(){return this._onDataArrival}set onDataArrival($e){this._onDataArrival=$e}get onSeeked(){return this._onSeeked}set onSeeked($e){this._onSeeked=$e}get onError(){return this._onError}set onError($e){this._onError=$e}get onComplete(){return this._onComplete}set onComplete($e){this._onComplete=$e}get onRedirect(){return this._onRedirect}set onRedirect($e){this._onRedirect=$e}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof($e){this._onRecoveredEarlyEof=$e}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===je?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let $e=this._config;if($e.seekType==="range")this._seekHandler=new gt(this._config.rangeLoadZeroStart);else if($e.seekType==="param"){let tt=$e.seekParamStart||"bstart",et=$e.seekParamEnd||"bend";this._seekHandler=new bt(tt,et)}else if($e.seekType==="custom"){if(typeof $e.customSeekHandler!="function")throw new ce("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new $e.customSeekHandler}else throw new ce(`Invalid seekType in config: ${$e.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=Je;else if(le.isSupported())this._loaderClass=le;else if(we.isSupported())this._loaderClass=we;else if(je.isSupported())this._loaderClass=je;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($e){this._currentRange={from:0,to:-1},$e&&(this._currentRange.from=$e),this._speedSampler.reset(),$e||(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 $e=this._resumeFrom;this._resumeFrom=0,this._internalSeek($e,!0)}}seek($e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek($e,!0)}_internalSeek($e,tt){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(tt),this._loader.destroy(),this._loader=null;let et={from:$e,to:-1};this._currentRange={from:et.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,et),this._onSeeked&&this._onSeeked()}updateUrl($e){if(!$e||typeof $e!="string"||$e.length===0)throw new ce("Url must be a non-empty string!");this._dataSource.url=$e}_expandBuffer($e){let tt=this._stashSize;for(;tt+1024*1024*1<$e;)tt*=2;if(tt+=1024*1024*1,tt===this._bufferSize)return;let et=new ArrayBuffer(tt);if(this._stashUsed>0){let Pt=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(et,0,tt).set(Pt,0)}this._stashBuffer=et,this._bufferSize=tt}_normalizeSpeed($e){let tt=this._speedNormalizeList,et=tt.length-1,Pt=0,At=0,kt=et;if($e<tt[0])return tt[0];for(;At<=kt;){if(Pt=At+Math.floor((kt-At)/2),Pt===et||$e>=tt[Pt]&&$e<tt[Pt+1])return tt[Pt];tt[Pt]<$e?At=Pt+1:kt=Pt-1}}_adjustStashSize($e){let tt=0;this._config.isLive||$e<512?tt=$e:$e>=512&&$e<=1024?tt=Math.floor($e*1.5):tt=$e*2,tt>8192&&(tt=8192);let et=tt*1024+1024*1024*1;this._bufferSize<et&&this._expandBuffer(et),this._stashSize=tt*1024}_dispatchChunks($e,tt){return this._currentRange.to=tt+$e.byteLength-1,this._onDataArrival($e,tt)}_onURLRedirect($e){this._redirectedURL=$e,this._onRedirect&&this._onRedirect($e)}_onContentLengthKnown($e){$e&&this._fullRequestFlag&&(this._totalLength=$e,this._fullRequestFlag=!1)}_onLoaderChunkArrival($e,tt,et){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($e.byteLength);let Pt=this._speedSampler.lastSecondKBps;if(Pt!==0){let At=this._normalizeSpeed(Pt);this._speedNormalized!==At&&(this._speedNormalized=At,this._adjustStashSize(At))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=tt),this._stashUsed+$e.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array($e),this._stashUsed),this._stashUsed+=$e.byteLength;else{let At=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let kt=this._stashBuffer.slice(0,this._stashUsed),Ct=this._dispatchChunks(kt,this._stashByteStart);if(Ct<kt.byteLength){if(Ct>0){let dn=new Uint8Array(kt,Ct);At.set(dn,0),this._stashUsed=dn.byteLength,this._stashByteStart+=Ct}}else this._stashUsed=0,this._stashByteStart+=Ct;this._stashUsed+$e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+$e.byteLength),At=new Uint8Array(this._stashBuffer,0,this._bufferSize)),At.set(new Uint8Array($e),this._stashUsed),this._stashUsed+=$e.byteLength}else{let kt=this._dispatchChunks($e,tt);if(kt<$e.byteLength){let Ct=$e.byteLength-kt;Ct>this._bufferSize&&(this._expandBuffer(Ct),At=new Uint8Array(this._stashBuffer,0,this._bufferSize)),At.set(new Uint8Array($e,kt),0),this._stashUsed+=Ct,this._stashByteStart=tt+kt}}}else if(this._stashUsed===0){let At=this._dispatchChunks($e,tt);if(At<$e.byteLength){let kt=$e.byteLength-At;kt>this._bufferSize&&this._expandBuffer(kt),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array($e,At),0),this._stashUsed+=kt,this._stashByteStart=tt+At}}else{this._stashUsed+$e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+$e.byteLength);let At=new Uint8Array(this._stashBuffer,0,this._bufferSize);At.set(new Uint8Array($e),this._stashUsed),this._stashUsed+=$e.byteLength;let kt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(kt<this._stashUsed&&kt>0){let Ct=new Uint8Array(this._stashBuffer,kt);At.set(Ct,0)}this._stashUsed-=kt,this._stashByteStart+=kt}}_flushStashBuffer($e){if(this._stashUsed>0){let tt=this._stashBuffer.slice(0,this._stashUsed),et=this._dispatchChunks(tt,this._stashByteStart),Pt=tt.byteLength-et;if(et<tt.byteLength)if($e)_e.w(this.TAG,`${Pt} bytes unconsumed data remain when flush buffer, dropped`);else{if(et>0){let At=new Uint8Array(this._stashBuffer,0,this._bufferSize),kt=new Uint8Array(tt,et);At.set(kt,0),this._stashUsed=kt.byteLength,this._stashByteStart+=et}return 0}return this._stashUsed=0,this._stashByteStart=0,Pt}return 0}_onLoaderComplete($e,tt){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError($e,tt){switch(_e.e(this.TAG,`Loader error, code = ${tt.code}, msg = ${tt.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,$e=ue.UNRECOVERABLE_EARLY_EOF),$e){case ue.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let et=this._currentRange.to+1;et<this._totalLength&&(_e.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(et,!1));return}$e=ue.UNRECOVERABLE_EARLY_EOF;break}case ue.UNRECOVERABLE_EARLY_EOF:case ue.CONNECTING_TIMEOUT:case ue.HTTP_STATUS_CODE_INVALID:case ue.EXCEPTION:break}if(this._onError)this._onError($e,tt);else throw new xe("IOException: "+tt.msg)}}var St=rt;const ct={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 Bt(){return Object.assign({},ct)}class ht{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let $e=new St({},Bt()),tt=$e.loaderType;return $e.destroy(),tt=="fetch-stream-loader"||tt=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let $e=new St({},Bt()),tt=$e.loaderType;return $e.destroy(),tt}static supportNativeMediaPlayback($e){ht.videoElement==null&&(ht.videoElement=window.document.createElement("video"));let tt=ht.videoElement.canPlayType($e);return tt==="probably"||tt=="maybe"}static getFeatureList(){let $e={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return $e.mseFlvPlayback=ht.supportMSEH264Playback(),$e.networkStreamIO=ht.supportNetworkStreamIO(),$e.networkLoaderName=ht.getNetworkLoaderTypeName(),$e.mseLiveFlvPlayback=$e.mseFlvPlayback&&$e.networkStreamIO,$e.nativeMP4H264Playback=ht.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),$e.nativeWebmVP8Playback=ht.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),$e.nativeWebmVP9Playback=ht.supportNativeMediaPlayback('video/webm; codecs="vp9"'),$e}}var it=ht,yt={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 Et{static get forceGlobalTag(){return _e.FORCE_GLOBAL_TAG}static set forceGlobalTag($e){_e.FORCE_GLOBAL_TAG=$e,Et._notifyChange()}static get globalTag(){return _e.GLOBAL_TAG}static set globalTag($e){_e.GLOBAL_TAG=$e,Et._notifyChange()}static get enableAll(){return _e.ENABLE_VERBOSE&&_e.ENABLE_DEBUG&&_e.ENABLE_INFO&&_e.ENABLE_WARN&&_e.ENABLE_ERROR}static set enableAll($e){_e.ENABLE_VERBOSE=$e,_e.ENABLE_DEBUG=$e,_e.ENABLE_INFO=$e,_e.ENABLE_WARN=$e,_e.ENABLE_ERROR=$e,Et._notifyChange()}static get enableDebug(){return _e.ENABLE_DEBUG}static set enableDebug($e){_e.ENABLE_DEBUG=$e,Et._notifyChange()}static get enableVerbose(){return _e.ENABLE_VERBOSE}static set enableVerbose($e){_e.ENABLE_VERBOSE=$e,Et._notifyChange()}static get enableInfo(){return _e.ENABLE_INFO}static set enableInfo($e){_e.ENABLE_INFO=$e,Et._notifyChange()}static get enableWarn(){return _e.ENABLE_WARN}static set enableWarn($e){_e.ENABLE_WARN=$e,Et._notifyChange()}static get enableError(){return _e.ENABLE_ERROR}static set enableError($e){_e.ENABLE_ERROR=$e,Et._notifyChange()}static getConfig(){return{globalTag:_e.GLOBAL_TAG,forceGlobalTag:_e.FORCE_GLOBAL_TAG,enableVerbose:_e.ENABLE_VERBOSE,enableDebug:_e.ENABLE_DEBUG,enableInfo:_e.ENABLE_INFO,enableWarn:_e.ENABLE_WARN,enableError:_e.ENABLE_ERROR,enableCallback:_e.ENABLE_CALLBACK}}static applyConfig($e){_e.GLOBAL_TAG=$e.globalTag,_e.FORCE_GLOBAL_TAG=$e.forceGlobalTag,_e.ENABLE_VERBOSE=$e.enableVerbose,_e.ENABLE_DEBUG=$e.enableDebug,_e.ENABLE_INFO=$e.enableInfo,_e.ENABLE_WARN=$e.enableWarn,_e.ENABLE_ERROR=$e.enableError,_e.ENABLE_CALLBACK=$e.enableCallback}static _notifyChange(){let $e=Et.emitter;if($e.listenerCount("change")>0){let tt=Et.getConfig();$e.emit("change",tt)}}static registerListener($e){Et.emitter.addListener("change",$e)}static removeListener($e){Et.emitter.removeListener("change",$e)}static addLogListener($e){_e.emitter.addListener("log",$e),_e.emitter.listenerCount("log")>0&&(_e.ENABLE_CALLBACK=!0,Et._notifyChange())}static removeLogListener($e){_e.emitter.removeListener("log",$e),_e.emitter.listenerCount("log")===0&&(_e.ENABLE_CALLBACK=!1,Et._notifyChange())}}Et.emitter=new(Te());var vt=Et;class Rt{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 $e=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,tt=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&&$e&&tt}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe($e){if(this.keyframesIndex==null)return null;let tt=this.keyframesIndex,et=this._search(tt.times,$e);return{index:et,milliseconds:tt.times[et],fileposition:tt.filepositions[et]}}_search($e,tt){let et=0,Pt=$e.length-1,At=0,kt=0,Ct=Pt;for(tt<$e[0]&&(et=0,kt=Ct+1);kt<=Ct;)if(At=kt+Math.floor((Ct-kt)/2),At===Pt||tt>=$e[At]&&tt<$e[At+1]){et=At;break}else $e[At]<tt?kt=At+1:Ct=At-1;return et}}var jt=Rt;function un(cn,$e,tt){let et=cn;if($e+tt<et.length){for(;tt--;)if((et[++$e]&192)!==128)return!1;return!0}else return!1}function Vt(cn){let $e=[],tt=cn,et=0,Pt=cn.length;for(;et<Pt;){if(tt[et]<128){$e.push(String.fromCharCode(tt[et])),++et;continue}else if(!(tt[et]<192)){if(tt[et]<224){if(un(tt,et,1)){let At=(tt[et]&31)<<6|tt[et+1]&63;if(At>=128){$e.push(String.fromCharCode(At&65535)),et+=2;continue}}}else if(tt[et]<240){if(un(tt,et,2)){let At=(tt[et]&15)<<12|(tt[et+1]&63)<<6|tt[et+2]&63;if(At>=2048&&(At&63488)!==55296){$e.push(String.fromCharCode(At&65535)),et+=3;continue}}}else if(tt[et]<248&&un(tt,et,3)){let At=(tt[et]&7)<<18|(tt[et+1]&63)<<12|(tt[et+2]&63)<<6|tt[et+3]&63;if(At>65536&&At<1114112){At-=65536,$e.push(String.fromCharCode(At>>>10|55296)),$e.push(String.fromCharCode(At&1023|56320)),et+=4;continue}}}$e.push("\uFFFD"),++et}return $e.join("")}var xn=Vt;let Ut=function(){let cn=new ArrayBuffer(2);return new DataView(cn).setInt16(0,256,!0),new Int16Array(cn)[0]===256}();class Zt{static parseScriptData($e,tt,et){let Pt={};try{let At=Zt.parseValue($e,tt,et),kt=Zt.parseValue($e,tt+At.size,et-At.size);Pt[At.data]=kt.data}catch(At){_e.e("AMF",At.toString())}return Pt}static parseObject($e,tt,et){if(et<3)throw new ge("Data not enough when parse ScriptDataObject");let Pt=Zt.parseString($e,tt,et),At=Zt.parseValue($e,tt+Pt.size,et-Pt.size),kt=At.objectEnd;return{data:{name:Pt.data,value:At.data},size:Pt.size+At.size,objectEnd:kt}}static parseVariable($e,tt,et){return Zt.parseObject($e,tt,et)}static parseString($e,tt,et){if(et<2)throw new ge("Data not enough when parse String");let At=new DataView($e,tt,et).getUint16(0,!Ut),kt;return At>0?kt=xn(new Uint8Array($e,tt+2,At)):kt="",{data:kt,size:2+At}}static parseLongString($e,tt,et){if(et<4)throw new ge("Data not enough when parse LongString");let At=new DataView($e,tt,et).getUint32(0,!Ut),kt;return At>0?kt=xn(new Uint8Array($e,tt+4,At)):kt="",{data:kt,size:4+At}}static parseDate($e,tt,et){if(et<10)throw new ge("Data size invalid when parse Date");let Pt=new DataView($e,tt,et),At=Pt.getFloat64(0,!Ut),kt=Pt.getInt16(8,!Ut);return At+=kt*60*1e3,{data:new Date(At),size:10}}static parseValue($e,tt,et){if(et<1)throw new ge("Data not enough when parse Value");let Pt=new DataView($e,tt,et),At=1,kt=Pt.getUint8(0),Ct,dn=!1;try{switch(kt){case 0:Ct=Pt.getFloat64(1,!Ut),At+=8;break;case 1:{Ct=!!Pt.getUint8(1),At+=1;break}case 2:{let _n=Zt.parseString($e,tt+1,et-1);Ct=_n.data,At+=_n.size;break}case 3:{Ct={};let _n=0;for((Pt.getUint32(et-4,!Ut)&16777215)===9&&(_n=3);At<et-4;){let zn=Zt.parseObject($e,tt+At,et-At-_n);if(zn.objectEnd)break;Ct[zn.data.name]=zn.data.value,At+=zn.size}At<=et-3&&(Pt.getUint32(At-1,!Ut)&16777215)===9&&(At+=3);break}case 8:{Ct={},At+=4;let _n=0;for((Pt.getUint32(et-4,!Ut)&16777215)===9&&(_n=3);At<et-8;){let zn=Zt.parseVariable($e,tt+At,et-At-_n);if(zn.objectEnd)break;Ct[zn.data.name]=zn.data.value,At+=zn.size}At<=et-3&&(Pt.getUint32(At-1,!Ut)&16777215)===9&&(At+=3);break}case 9:Ct=void 0,At=1,dn=!0;break;case 10:{Ct=[];let _n=Pt.getUint32(1,!Ut);At+=4;for(let zn=0;zn<_n;zn++){let wn=Zt.parseValue($e,tt+At,et-At);Ct.push(wn.data),At+=wn.size}break}case 11:{let _n=Zt.parseDate($e,tt+1,et-1);Ct=_n.data,At+=_n.size;break}case 12:{let _n=Zt.parseString($e,tt+1,et-1);Ct=_n.data,At+=_n.size;break}default:At=et,_e.w("AMF","Unsupported AMF value type "+kt)}}catch(_n){_e.e("AMF",_n.toString())}return{data:Ct,size:At,objectEnd:dn}}}var Xt=Zt;class mt{constructor($e){this.TAG="ExpGolomb",this._buffer=$e,this._buffer_index=0,this._total_bytes=$e.byteLength,this._total_bits=$e.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let $e=this._total_bytes-this._buffer_index;if($e<=0)throw new ge("ExpGolomb: _fillCurrentWord() but no bytes available");let tt=Math.min(4,$e),et=new Uint8Array(4);et.set(this._buffer.subarray(this._buffer_index,this._buffer_index+tt)),this._current_word=new DataView(et.buffer).getUint32(0,!1),this._buffer_index+=tt,this._current_word_bits_left=tt*8}readBits($e){if($e>32)throw new ce("ExpGolomb: readBits() bits exceeded max 32bits!");if($e<=this._current_word_bits_left){let kt=this._current_word>>>32-$e;return this._current_word<<=$e,this._current_word_bits_left-=$e,kt}let tt=this._current_word_bits_left?this._current_word:0;tt=tt>>>32-this._current_word_bits_left;let et=$e-this._current_word_bits_left;this._fillCurrentWord();let Pt=Math.min(et,this._current_word_bits_left),At=this._current_word>>>32-Pt;return this._current_word<<=Pt,this._current_word_bits_left-=Pt,tt=tt<<Pt|At,tt}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let $e;for($e=0;$e<this._current_word_bits_left;$e++)if(this._current_word&2147483648>>>$e)return this._current_word<<=$e,this._current_word_bits_left-=$e,$e;return this._fillCurrentWord(),$e+this._skipLeadingZero()}readUEG(){let $e=this._skipLeadingZero();return this.readBits($e+1)-1}readSEG(){let $e=this.readUEG();return $e&1?$e+1>>>1:-1*($e>>>1)}}var ze=mt;class Be{static _ebsp2rbsp($e){let tt=$e,et=tt.byteLength,Pt=new Uint8Array(et),At=0;for(let kt=0;kt<et;kt++)kt>=2&&tt[kt]===3&&tt[kt-1]===0&&tt[kt-2]===0||(Pt[At]=tt[kt],At++);return new Uint8Array(Pt.buffer,0,At)}static parseSPS($e){let tt=Be._ebsp2rbsp($e),et=new ze(tt);et.readByte();let Pt=et.readByte();et.readByte();let At=et.readByte();et.readUEG();let kt=Be.getProfileString(Pt),Ct=Be.getLevelString(At),dn=1,_n=420,zn=[0,420,422,444],wn=8;if((Pt===100||Pt===110||Pt===122||Pt===244||Pt===44||Pt===83||Pt===86||Pt===118||Pt===128||Pt===138||Pt===144)&&(dn=et.readUEG(),dn===3&&et.readBits(1),dn<=3&&(_n=zn[dn]),wn=et.readUEG()+8,et.readUEG(),et.readBits(1),et.readBool())){let Wi=dn!==3?8:12;for(let Ni=0;Ni<Wi;Ni++)et.readBool()&&(Ni<6?Be._skipScalingList(et,16):Be._skipScalingList(et,64))}et.readUEG();let Ft=et.readUEG();if(Ft===0)et.readUEG();else if(Ft===1){et.readBits(1),et.readSEG(),et.readSEG();let Wi=et.readUEG();for(let Ni=0;Ni<Wi;Ni++)et.readSEG()}let $t=et.readUEG();et.readBits(1);let bn=et.readUEG(),An=et.readUEG(),Gt=et.readBits(1);Gt===0&&et.readBits(1),et.readBits(1);let sn=0,Bn=0,Nn=0,qn=0;et.readBool()&&(sn=et.readUEG(),Bn=et.readUEG(),Nn=et.readUEG(),qn=et.readUEG());let Jn=1,Dn=1,ri=0,Mi=!0,Hn=0,oi=0;if(et.readBool()){if(et.readBool()){let Wi=et.readByte(),Ni=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],hr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Wi>0&&Wi<16?(Jn=Ni[Wi-1],Dn=hr[Wi-1]):Wi===255&&(Jn=et.readByte()<<8|et.readByte(),Dn=et.readByte()<<8|et.readByte())}if(et.readBool()&&et.readBool(),et.readBool()&&(et.readBits(4),et.readBool()&&et.readBits(24)),et.readBool()&&(et.readUEG(),et.readUEG()),et.readBool()){let Wi=et.readBits(32),Ni=et.readBits(32);Mi=et.readBool(),Hn=Ni,oi=Wi*2,ri=Hn/oi}}let lr=1;(Jn!==1||Dn!==1)&&(lr=Jn/Dn);let Ai=0,an=0;if(dn===0)Ai=1,an=2-Gt;else{let Wi=dn===3?1:2,Ni=dn===1?2:1;Ai=Wi,an=Ni*(2-Gt)}let si=(bn+1)*16,wi=(2-Gt)*((An+1)*16);si-=(sn+Bn)*Ai,wi-=(Nn+qn)*an;let pi=Math.ceil(si*lr);return et.destroy(),et=null,{profile_string:kt,level_string:Ct,bit_depth:wn,ref_frames:$t,chroma_format:_n,chroma_format_string:Be.getChromaFormatString(_n),frame_rate:{fixed:Mi,fps:ri,fps_den:oi,fps_num:Hn},sar_ratio:{width:Jn,height:Dn},codec_size:{width:si,height:wi},present_size:{width:pi,height:wi}}}static _skipScalingList($e,tt){let et=8,Pt=8,At=0;for(let kt=0;kt<tt;kt++)Pt!==0&&(At=$e.readSEG(),Pt=(et+At+256)%256),et=Pt===0?et:Pt}static getProfileString($e){switch($e){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($e){return($e/10).toFixed(1)}static getChromaFormatString($e){switch($e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var qe=Be,Ue={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function Xe(cn){return cn>>>8&255|(cn&255)<<8}function Re(cn){return(cn&4278190080)>>>24|(cn&16711680)>>>8|(cn&65280)<<8|(cn&255)<<24}function Ae(cn,$e){return cn[$e]<<24|cn[$e+1]<<16|cn[$e+2]<<8|cn[$e+3]}class Ge{constructor($e,tt){this.TAG="FLVDemuxer",this._config=tt,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=$e.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=$e.hasAudioTrack,this._hasVideo=$e.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new jt,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let et=new ArrayBuffer(2);return new DataView(et).setInt16(0,256,!0),new Int16Array(et)[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($e){let tt=new Uint8Array($e),et={match:!1};if(tt[0]!==70||tt[1]!==76||tt[2]!==86||tt[3]!==1)return et;let Pt=(tt[4]&4)>>>2!==0,At=(tt[4]&1)!==0,kt=Ae(tt,5);return kt<9?et:{match:!0,consumed:kt,dataOffset:kt,hasAudioTrack:Pt,hasVideoTrack:At}}bindDataSource($e){return $e.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata($e){this._onTrackMetadata=$e}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo($e){this._onMediaInfo=$e}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived($e){this._onMetaDataArrived=$e}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived($e){this._onScriptDataArrived=$e}get onError(){return this._onError}set onError($e){this._onError=$e}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable($e){this._onDataAvailable=$e}get timestampBase(){return this._timestampBase}set timestampBase($e){this._timestampBase=$e}get overridedDuration(){return this._duration}set overridedDuration($e){this._durationOverrided=!0,this._duration=$e,this._mediaInfo.duration=$e}set overridedHasAudio($e){this._hasAudioFlagOverrided=!0,this._hasAudio=$e,this._mediaInfo.hasAudio=$e}set overridedHasVideo($e){this._hasVideoFlagOverrided=!0,this._hasVideo=$e,this._mediaInfo.hasVideo=$e}resetMediaInfo(){this._mediaInfo=new jt}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks($e,tt){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new ge("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let et=0,Pt=this._littleEndian;if(tt===0)if($e.byteLength>13)et=Ge.probe($e).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,tt+et!==this._dataOffset&&_e.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView($e,et).getUint32(0,!Pt)!==0&&_e.w(this.TAG,"PrevTagSize0 !== 0 !!!"),et+=4);et<$e.byteLength;){this._dispatch=!0;let At=new DataView($e,et);if(et+11+4>$e.byteLength)break;let kt=At.getUint8(0),Ct=At.getUint32(0,!Pt)&16777215;if(et+11+Ct+4>$e.byteLength)break;if(kt!==8&&kt!==9&&kt!==18){_e.w(this.TAG,`Unsupported tag type ${kt}, skipped`),et+=11+Ct+4;continue}let dn=At.getUint8(4),_n=At.getUint8(5),zn=At.getUint8(6),wn=At.getUint8(7),Ft=zn|_n<<8|dn<<16|wn<<24;(At.getUint32(7,!Pt)&16777215)!==0&&_e.w(this.TAG,"Meet tag which has StreamID != 0!");let bn=et+11;switch(kt){case 8:this._parseAudioData($e,bn,Ct,Ft);break;case 9:this._parseVideoData($e,bn,Ct,Ft,tt+et);break;case 18:this._parseScriptData($e,bn,Ct);break}let An=At.getUint32(11+Ct,!Pt);An!==11+Ct&&_e.w(this.TAG,`Invalid PrevTagSize ${An}`),et+=11+Ct+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),et}_parseScriptData($e,tt,et){let Pt=Xt.parseScriptData($e,tt,et);if(Pt.hasOwnProperty("onMetaData")){if(Pt.onMetaData==null||typeof Pt.onMetaData!="object"){_e.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&_e.w(this.TAG,"Found another onMetaData tag!"),this._metadata=Pt;let At=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},At)),typeof At.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=At.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof At.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=At.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof At.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=At.audiodatarate),typeof At.videodatarate=="number"&&(this._mediaInfo.videoDataRate=At.videodatarate),typeof At.width=="number"&&(this._mediaInfo.width=At.width),typeof At.height=="number"&&(this._mediaInfo.height=At.height),typeof At.duration=="number"){if(!this._durationOverrided){let kt=Math.floor(At.duration*this._timescale);this._duration=kt,this._mediaInfo.duration=kt}}else this._mediaInfo.duration=0;if(typeof At.framerate=="number"){let kt=Math.floor(At.framerate*1e3);if(kt>0){let Ct=kt/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Ct,this._referenceFrameRate.fps_num=kt,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Ct}}if(typeof At.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let kt=At.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(kt),At.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=At,_e.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(Pt).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},Pt))}_parseKeyframesIndex($e){let tt=[],et=[];for(let Pt=1;Pt<$e.times.length;Pt++){let At=this._timestampBase+Math.floor($e.times[Pt]*1e3);tt.push(At),et.push($e.filepositions[Pt])}return{times:tt,filepositions:et}}_parseAudioData($e,tt,et,Pt){if(et<=1){_e.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let At=this._littleEndian,Ct=new DataView($e,tt,et).getUint8(0),dn=Ct>>>4;if(dn!==2&&dn!==10){this._onError(Ue.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+dn);return}let _n=0,zn=(Ct&12)>>>2;if(zn>=0&&zn<=4)_n=this._flvSoundRateTable[zn];else{this._onError(Ue.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+zn);return}let wn=(Ct&2)>>>1,Ft=Ct&1,$t=this._audioMetadata,bn=this._audioTrack;if($t||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),$t=this._audioMetadata={},$t.type="audio",$t.id=bn.id,$t.timescale=this._timescale,$t.duration=this._duration,$t.audioSampleRate=_n,$t.channelCount=Ft===0?1:2),dn===10){let An=this._parseAACAudioData($e,tt+1,et-1);if(An==null)return;if(An.packetType===0){$t.config&&_e.w(this.TAG,"Found another AudioSpecificConfig!");let Gt=An.data;$t.audioSampleRate=Gt.samplingRate,$t.channelCount=Gt.channelCount,$t.codec=Gt.codec,$t.originalCodec=Gt.originalCodec,$t.config=Gt.config,$t.refSampleDuration=1024/$t.audioSampleRate*$t.timescale,_e.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",$t);let sn=this._mediaInfo;sn.audioCodec=$t.originalCodec,sn.audioSampleRate=$t.audioSampleRate,sn.audioChannelCount=$t.channelCount,sn.hasVideo?sn.videoCodec!=null&&(sn.mimeType='video/x-flv; codecs="'+sn.videoCodec+","+sn.audioCodec+'"'):sn.mimeType='video/x-flv; codecs="'+sn.audioCodec+'"',sn.isComplete()&&this._onMediaInfo(sn)}else if(An.packetType===1){let Gt=this._timestampBase+Pt,sn={unit:An.data,length:An.data.byteLength,dts:Gt,pts:Gt};bn.samples.push(sn),bn.length+=An.data.length}else _e.e(this.TAG,`Flv: Unsupported AAC data type ${An.packetType}`)}else if(dn===2){if(!$t.codec){let Bn=this._parseMP3AudioData($e,tt+1,et-1,!0);if(Bn==null)return;$t.audioSampleRate=Bn.samplingRate,$t.channelCount=Bn.channelCount,$t.codec=Bn.codec,$t.originalCodec=Bn.originalCodec,$t.refSampleDuration=1152/$t.audioSampleRate*$t.timescale,_e.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",$t);let Nn=this._mediaInfo;Nn.audioCodec=$t.codec,Nn.audioSampleRate=$t.audioSampleRate,Nn.audioChannelCount=$t.channelCount,Nn.audioDataRate=Bn.bitRate,Nn.hasVideo?Nn.videoCodec!=null&&(Nn.mimeType='video/x-flv; codecs="'+Nn.videoCodec+","+Nn.audioCodec+'"'):Nn.mimeType='video/x-flv; codecs="'+Nn.audioCodec+'"',Nn.isComplete()&&this._onMediaInfo(Nn)}let An=this._parseMP3AudioData($e,tt+1,et-1,!1);if(An==null)return;let Gt=this._timestampBase+Pt,sn={unit:An,length:An.byteLength,dts:Gt,pts:Gt};bn.samples.push(sn),bn.length+=An.length}}_parseAACAudioData($e,tt,et){if(et<=1){_e.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let Pt={},At=new Uint8Array($e,tt,et);return Pt.packetType=At[0],At[0]===0?Pt.data=this._parseAACAudioSpecificConfig($e,tt+1,et-1):Pt.data=At.subarray(1),Pt}_parseAACAudioSpecificConfig($e,tt,et){let Pt=new Uint8Array($e,tt,et),At=null,kt=0,Ct=0,dn=null,_n=0,zn=null;if(kt=Ct=Pt[0]>>>3,_n=(Pt[0]&7)<<1|Pt[1]>>>7,_n<0||_n>=this._mpegSamplingRates.length){this._onError(Ue.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let wn=this._mpegSamplingRates[_n],Ft=(Pt[1]&120)>>>3;if(Ft<0||Ft>=8){this._onError(Ue.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}kt===5&&(zn=(Pt[1]&7)<<1|Pt[2]>>>7,dn=(Pt[2]&124)>>>2);let $t=self.navigator.userAgent.toLowerCase();return $t.indexOf("firefox")!==-1?_n>=6?(kt=5,At=new Array(4),zn=_n-3):(kt=2,At=new Array(2),zn=_n):$t.indexOf("android")!==-1?(kt=2,At=new Array(2),zn=_n):(kt=5,zn=_n,At=new Array(4),_n>=6?zn=_n-3:Ft===1&&(kt=2,At=new Array(2),zn=_n)),At[0]=kt<<3,At[0]|=(_n&15)>>>1,At[1]=(_n&15)<<7,At[1]|=(Ft&15)<<3,kt===5&&(At[1]|=(zn&15)>>>1,At[2]=(zn&1)<<7,At[2]|=8,At[3]=0),{config:At,samplingRate:wn,channelCount:Ft,codec:"mp4a.40."+kt,originalCodec:"mp4a.40."+Ct}}_parseMP3AudioData($e,tt,et,Pt){if(et<4){_e.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let At=this._littleEndian,kt=new Uint8Array($e,tt,et),Ct=null;if(Pt){if(kt[0]!==255)return;let dn=kt[1]>>>3&3,_n=(kt[1]&6)>>1,zn=(kt[2]&240)>>>4,wn=(kt[2]&12)>>>2,$t=(kt[3]>>>6&3)!==3?2:1,bn=0,An=0,Gt=34,sn="mp3";switch(dn){case 0:bn=this._mpegAudioV25SampleRateTable[wn];break;case 2:bn=this._mpegAudioV20SampleRateTable[wn];break;case 3:bn=this._mpegAudioV10SampleRateTable[wn];break}switch(_n){case 1:Gt=34,zn<this._mpegAudioL3BitRateTable.length&&(An=this._mpegAudioL3BitRateTable[zn]);break;case 2:Gt=33,zn<this._mpegAudioL2BitRateTable.length&&(An=this._mpegAudioL2BitRateTable[zn]);break;case 3:Gt=32,zn<this._mpegAudioL1BitRateTable.length&&(An=this._mpegAudioL1BitRateTable[zn]);break}Ct={bitRate:An,samplingRate:bn,channelCount:$t,codec:sn,originalCodec:sn}}else Ct=kt;return Ct}_parseVideoData($e,tt,et,Pt,At){if(et<=1){_e.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let kt=new Uint8Array($e,tt,et)[0],Ct=(kt&240)>>>4,dn=kt&15;if(dn!==7){this._onError(Ue.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${dn}`);return}this._parseAVCVideoPacket($e,tt+1,et-1,Pt,At,Ct)}_parseAVCVideoPacket($e,tt,et,Pt,At,kt){if(et<4){_e.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let Ct=this._littleEndian,dn=new DataView($e,tt,et),_n=dn.getUint8(0),wn=(dn.getUint32(0,!Ct)&16777215)<<8>>8;if(_n===0)this._parseAVCDecoderConfigurationRecord($e,tt+4,et-4);else if(_n===1)this._parseAVCVideoData($e,tt+4,et-4,Pt,At,kt,wn);else if(_n!==2){this._onError(Ue.FORMAT_ERROR,`Flv: Invalid video packet type ${_n}`);return}}_parseAVCDecoderConfigurationRecord($e,tt,et){if(et<7){_e.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let Pt=this._videoMetadata,At=this._videoTrack,kt=this._littleEndian,Ct=new DataView($e,tt,et);Pt?typeof Pt.avcc!="undefined"&&_e.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),Pt=this._videoMetadata={},Pt.type="video",Pt.id=At.id,Pt.timescale=this._timescale,Pt.duration=this._duration);let dn=Ct.getUint8(0),_n=Ct.getUint8(1),zn=Ct.getUint8(2),wn=Ct.getUint8(3);if(dn!==1||_n===0){this._onError(Ue.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Ct.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(Ue.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let Ft=Ct.getUint8(5)&31;if(Ft===0){this._onError(Ue.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Ft>1&&_e.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${Ft}`);let $t=6;for(let An=0;An<Ft;An++){let Gt=Ct.getUint16($t,!kt);if($t+=2,Gt===0)continue;let sn=new Uint8Array($e,tt+$t,Gt);$t+=Gt;let Bn=qe.parseSPS(sn);if(An!==0)continue;Pt.codecWidth=Bn.codec_size.width,Pt.codecHeight=Bn.codec_size.height,Pt.presentWidth=Bn.present_size.width,Pt.presentHeight=Bn.present_size.height,Pt.profile=Bn.profile_string,Pt.level=Bn.level_string,Pt.bitDepth=Bn.bit_depth,Pt.chromaFormat=Bn.chroma_format,Pt.sarRatio=Bn.sar_ratio,Pt.frameRate=Bn.frame_rate,(Bn.frame_rate.fixed===!1||Bn.frame_rate.fps_num===0||Bn.frame_rate.fps_den===0)&&(Pt.frameRate=this._referenceFrameRate);let Nn=Pt.frameRate.fps_den,qn=Pt.frameRate.fps_num;Pt.refSampleDuration=Pt.timescale*(Nn/qn);let Gn=sn.subarray(1,4),Jn="avc1.";for(let ri=0;ri<3;ri++){let Mi=Gn[ri].toString(16);Mi.length<2&&(Mi="0"+Mi),Jn+=Mi}Pt.codec=Jn;let Dn=this._mediaInfo;Dn.width=Pt.codecWidth,Dn.height=Pt.codecHeight,Dn.fps=Pt.frameRate.fps,Dn.profile=Pt.profile,Dn.level=Pt.level,Dn.refFrames=Bn.ref_frames,Dn.chromaFormat=Bn.chroma_format_string,Dn.sarNum=Pt.sarRatio.width,Dn.sarDen=Pt.sarRatio.height,Dn.videoCodec=Jn,Dn.hasAudio?Dn.audioCodec!=null&&(Dn.mimeType='video/x-flv; codecs="'+Dn.videoCodec+","+Dn.audioCodec+'"'):Dn.mimeType='video/x-flv; codecs="'+Dn.videoCodec+'"',Dn.isComplete()&&this._onMediaInfo(Dn)}let bn=Ct.getUint8($t);if(bn===0){this._onError(Ue.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else bn>1&&_e.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${bn}`);$t++;for(let An=0;An<bn;An++){let Gt=Ct.getUint16($t,!kt);$t+=2,Gt!==0&&($t+=Gt)}Pt.avcc=new Uint8Array(et),Pt.avcc.set(new Uint8Array($e,tt,et),0),_e.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",Pt)}_parseAVCVideoData($e,tt,et,Pt,At,kt,Ct){let dn=this._littleEndian,_n=new DataView($e,tt,et),zn=[],wn=0,Ft=0;const $t=this._naluLengthSize;let bn=this._timestampBase+Pt,An=kt===1;for(;Ft<et;){if(Ft+4>=et){_e.w(this.TAG,`Malformed Nalu near timestamp ${bn}, offset = ${Ft}, dataSize = ${et}`);break}let Gt=_n.getUint32(Ft,!dn);if($t===3&&(Gt>>>=8),Gt>et-$t){_e.w(this.TAG,`Malformed Nalus near timestamp ${bn}, NaluSize > DataSize!`);return}let sn=_n.getUint8(Ft+$t)&31;sn===5&&(An=!0);let Bn=new Uint8Array($e,tt+Ft,$t+Gt),Nn={type:sn,data:Bn};zn.push(Nn),wn+=Bn.byteLength,Ft+=$t+Gt}if(zn.length){let Gt=this._videoTrack,sn={units:zn,length:wn,isKeyframe:An,dts:bn,cts:Ct,pts:bn+Ct};An&&(sn.fileposition=At),Gt.samples.push(sn),Gt.length+=wn}}}var Ke=Ge;class Ze{static init(){Ze.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 tt in Ze.types)Ze.types.hasOwnProperty(tt)&&(Ze.types[tt]=[tt.charCodeAt(0),tt.charCodeAt(1),tt.charCodeAt(2),tt.charCodeAt(3)]);let $e=Ze.constants={};$e.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),$e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),$e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),$e.STSC=$e.STCO=$e.STTS,$e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),$e.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]),$e.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]),$e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),$e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),$e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box($e){let tt=8,et=null,Pt=Array.prototype.slice.call(arguments,1),At=Pt.length;for(let Ct=0;Ct<At;Ct++)tt+=Pt[Ct].byteLength;et=new Uint8Array(tt),et[0]=tt>>>24&255,et[1]=tt>>>16&255,et[2]=tt>>>8&255,et[3]=tt&255,et.set($e,4);let kt=8;for(let Ct=0;Ct<At;Ct++)et.set(Pt[Ct],kt),kt+=Pt[Ct].byteLength;return et}static generateInitSegment($e){let tt=Ze.box(Ze.types.ftyp,Ze.constants.FTYP),et=Ze.moov($e),Pt=new Uint8Array(tt.byteLength+et.byteLength);return Pt.set(tt,0),Pt.set(et,tt.byteLength),Pt}static moov($e){let tt=Ze.mvhd($e.timescale,$e.duration),et=Ze.trak($e),Pt=Ze.mvex($e);return Ze.box(Ze.types.moov,tt,et,Pt)}static mvhd($e,tt){return Ze.box(Ze.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,$e>>>24&255,$e>>>16&255,$e>>>8&255,$e&255,tt>>>24&255,tt>>>16&255,tt>>>8&255,tt&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($e){return Ze.box(Ze.types.trak,Ze.tkhd($e),Ze.mdia($e))}static tkhd($e){let tt=$e.id,et=$e.duration,Pt=$e.presentWidth,At=$e.presentHeight;return Ze.box(Ze.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,tt>>>24&255,tt>>>16&255,tt>>>8&255,tt&255,0,0,0,0,et>>>24&255,et>>>16&255,et>>>8&255,et&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,Pt>>>8&255,Pt&255,0,0,At>>>8&255,At&255,0,0]))}static mdia($e){return Ze.box(Ze.types.mdia,Ze.mdhd($e),Ze.hdlr($e),Ze.minf($e))}static mdhd($e){let tt=$e.timescale,et=$e.duration;return Ze.box(Ze.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,tt>>>24&255,tt>>>16&255,tt>>>8&255,tt&255,et>>>24&255,et>>>16&255,et>>>8&255,et&255,85,196,0,0]))}static hdlr($e){let tt=null;return $e.type==="audio"?tt=Ze.constants.HDLR_AUDIO:tt=Ze.constants.HDLR_VIDEO,Ze.box(Ze.types.hdlr,tt)}static minf($e){let tt=null;return $e.type==="audio"?tt=Ze.box(Ze.types.smhd,Ze.constants.SMHD):tt=Ze.box(Ze.types.vmhd,Ze.constants.VMHD),Ze.box(Ze.types.minf,tt,Ze.dinf(),Ze.stbl($e))}static dinf(){return Ze.box(Ze.types.dinf,Ze.box(Ze.types.dref,Ze.constants.DREF))}static stbl($e){return Ze.box(Ze.types.stbl,Ze.stsd($e),Ze.box(Ze.types.stts,Ze.constants.STTS),Ze.box(Ze.types.stsc,Ze.constants.STSC),Ze.box(Ze.types.stsz,Ze.constants.STSZ),Ze.box(Ze.types.stco,Ze.constants.STCO))}static stsd($e){return $e.type==="audio"?$e.codec==="mp3"?Ze.box(Ze.types.stsd,Ze.constants.STSD_PREFIX,Ze.mp3($e)):Ze.box(Ze.types.stsd,Ze.constants.STSD_PREFIX,Ze.mp4a($e)):Ze.box(Ze.types.stsd,Ze.constants.STSD_PREFIX,Ze.avc1($e))}static mp3($e){let tt=$e.channelCount,et=$e.audioSampleRate,Pt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,tt,0,16,0,0,0,0,et>>>8&255,et&255,0,0]);return Ze.box(Ze.types[".mp3"],Pt)}static mp4a($e){let tt=$e.channelCount,et=$e.audioSampleRate,Pt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,tt,0,16,0,0,0,0,et>>>8&255,et&255,0,0]);return Ze.box(Ze.types.mp4a,Pt,Ze.esds($e))}static esds($e){let tt=$e.config||[],et=tt.length,Pt=new Uint8Array([0,0,0,0,3,23+et,0,1,0,4,15+et,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([et]).concat(tt).concat([6,1,2]));return Ze.box(Ze.types.esds,Pt)}static avc1($e){let tt=$e.avcc,et=$e.codecWidth,Pt=$e.codecHeight,At=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,et>>>8&255,et&255,Pt>>>8&255,Pt&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 Ze.box(Ze.types.avc1,At,Ze.box(Ze.types.avcC,tt))}static mvex($e){return Ze.box(Ze.types.mvex,Ze.trex($e))}static trex($e){let tt=$e.id,et=new Uint8Array([0,0,0,0,tt>>>24&255,tt>>>16&255,tt>>>8&255,tt&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Ze.box(Ze.types.trex,et)}static moof($e,tt){return Ze.box(Ze.types.moof,Ze.mfhd($e.sequenceNumber),Ze.traf($e,tt))}static mfhd($e){let tt=new Uint8Array([0,0,0,0,$e>>>24&255,$e>>>16&255,$e>>>8&255,$e&255]);return Ze.box(Ze.types.mfhd,tt)}static traf($e,tt){let et=$e.id,Pt=Ze.box(Ze.types.tfhd,new Uint8Array([0,0,0,0,et>>>24&255,et>>>16&255,et>>>8&255,et&255])),At=Ze.box(Ze.types.tfdt,new Uint8Array([0,0,0,0,tt>>>24&255,tt>>>16&255,tt>>>8&255,tt&255])),kt=Ze.sdtp($e),Ct=Ze.trun($e,kt.byteLength+16+16+8+16+8+8);return Ze.box(Ze.types.traf,Pt,At,Ct,kt)}static sdtp($e){let tt=$e.samples||[],et=tt.length,Pt=new Uint8Array(4+et);for(let At=0;At<et;At++){let kt=tt[At].flags;Pt[At+4]=kt.isLeading<<6|kt.dependsOn<<4|kt.isDependedOn<<2|kt.hasRedundancy}return Ze.box(Ze.types.sdtp,Pt)}static trun($e,tt){let et=$e.samples||[],Pt=et.length,At=12+16*Pt,kt=new Uint8Array(At);tt+=8+At,kt.set([0,0,15,1,Pt>>>24&255,Pt>>>16&255,Pt>>>8&255,Pt&255,tt>>>24&255,tt>>>16&255,tt>>>8&255,tt&255],0);for(let Ct=0;Ct<Pt;Ct++){let dn=et[Ct].duration,_n=et[Ct].size,zn=et[Ct].flags,wn=et[Ct].cts;kt.set([dn>>>24&255,dn>>>16&255,dn>>>8&255,dn&255,_n>>>24&255,_n>>>16&255,_n>>>8&255,_n&255,zn.isLeading<<2|zn.dependsOn,zn.isDependedOn<<6|zn.hasRedundancy<<4|zn.isNonSync,0,0,wn>>>24&255,wn>>>16&255,wn>>>8&255,wn&255],12+16*Ct)}return Ze.box(Ze.types.trun,kt)}static mdat($e){return Ze.box(Ze.types.mdat,$e)}}Ze.init();var at=Ze;class xt{static getSilentFrame($e,tt){if($e==="mp4a.40.2"){if(tt===1)return new Uint8Array([0,200,0,128,35,128]);if(tt===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(tt===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(tt===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(tt===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(tt===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(tt===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(tt===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(tt===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 tn=xt;class nn{constructor($e,tt,et,Pt,At){this.dts=$e,this.pts=tt,this.duration=et,this.originalDts=Pt,this.isSyncPoint=At,this.fileposition=null}}class Jt{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($e){$e.isSyncPoint=!0,this.syncPoints.push($e)}}class mn{constructor(){this._list=[]}clear(){this._list=[]}appendArray($e){let tt=this._list;$e.length!==0&&(tt.length>0&&$e[0].originalDts<tt[tt.length-1].originalDts&&this.clear(),Array.prototype.push.apply(tt,$e))}getLastSyncPointBeforeDts($e){if(this._list.length==0)return null;let tt=this._list,et=0,Pt=tt.length-1,At=0,kt=0,Ct=Pt;for($e<tt[0].dts&&(et=0,kt=Ct+1);kt<=Ct;)if(At=kt+Math.floor((Ct-kt)/2),At===Pt||$e>=tt[At].dts&&$e<tt[At+1].dts){et=At;break}else tt[At].dts<$e?kt=At+1:Ct=At-1;return this._list[et]}}class kn{constructor($e){this._type=$e,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($e){let tt=this._list;if(tt.length===0)return-2;let et=tt.length-1,Pt=0,At=0,kt=et,Ct=0;if($e<tt[0].originalBeginDts)return Ct=-1,Ct;for(;At<=kt;)if(Pt=At+Math.floor((kt-At)/2),Pt===et||$e>tt[Pt].lastSample.originalDts&&$e<tt[Pt+1].originalBeginDts){Ct=Pt;break}else tt[Pt].originalBeginDts<$e?At=Pt+1:kt=Pt-1;return Ct}_searchNearestSegmentAfter($e){return this._searchNearestSegmentBefore($e)+1}append($e){let tt=this._list,et=$e,Pt=this._lastAppendLocation,At=0;Pt!==-1&&Pt<tt.length&&et.originalBeginDts>=tt[Pt].lastSample.originalDts&&(Pt===tt.length-1||Pt<tt.length-1&&et.originalBeginDts<tt[Pt+1].originalBeginDts)?At=Pt+1:tt.length>0&&(At=this._searchNearestSegmentBefore(et.originalBeginDts)+1),this._lastAppendLocation=At,this._list.splice(At,0,et)}getLastSegmentBefore($e){let tt=this._searchNearestSegmentBefore($e);return tt>=0?this._list[tt]:null}getLastSampleBefore($e){let tt=this.getLastSegmentBefore($e);return tt!=null?tt.lastSample:null}getLastSyncPointBefore($e){let tt=this._searchNearestSegmentBefore($e),et=this._list[tt].syncPoints;for(;et.length===0&&tt>0;)tt--,et=this._list[tt].syncPoints;return et.length>0?et[et.length-1]:null}}class fn{constructor($e){this.TAG="MP4Remuxer",this._config=$e,this._isLive=$e.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 kn("audio"),this._videoSegmentInfoList=new kn("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($e){return $e.onDataAvailable=this.remux.bind(this),$e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment($e){this._onInitSegment=$e}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment($e){this._onMediaSegment=$e}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek($e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux($e,tt){if(!this._onMediaSegment)throw new ge("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase($e,tt),this._remuxVideo(tt),this._remuxAudio($e)}_onTrackMetadataReceived($e,tt){let et=null,Pt="mp4",At=tt.codec;if($e==="audio")this._audioMeta=tt,tt.codec==="mp3"&&this._mp3UseMpegAudio?(Pt="mpeg",At="",et=new Uint8Array):et=at.generateInitSegment(tt);else if($e==="video")this._videoMeta=tt,et=at.generateInitSegment(tt);else return;if(!this._onInitSegment)throw new ge("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment($e,{type:$e,data:et.buffer,codec:At,container:`${$e}/${Pt}`,mediaDuration:tt.duration})}_calculateDtsBase($e,tt){this._dtsBaseInited||($e.samples&&$e.samples.length&&(this._audioDtsBase=$e.samples[0].dts),tt.samples&&tt.samples.length&&(this._videoDtsBase=tt.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let $e=this._videoStashedLastSample,tt=this._audioStashedLastSample,et={type:"video",id:1,sequenceNumber:0,samples:[],length:0};$e!=null&&(et.samples.push($e),et.length=$e.length);let Pt={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};tt!=null&&(Pt.samples.push(tt),Pt.length=tt.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(et,!0),this._remuxAudio(Pt,!0)}_remuxAudio($e,tt){if(this._audioMeta==null)return;let et=$e,Pt=et.samples,At,kt=-1,Ct=-1,dn=-1,_n=this._audioMeta.refSampleDuration,zn=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,wn=this._dtsBaseInited&&this._audioNextDts===void 0,Ft=!1;if(!Pt||Pt.length===0||Pt.length===1&&!tt)return;let $t=0,bn=null,An=0;zn?($t=0,An=et.length):($t=8,An=8+et.length);let Gt=null;if(Pt.length>1&&(Gt=Pt.pop(),An-=Gt.length),this._audioStashedLastSample!=null){let Dn=this._audioStashedLastSample;this._audioStashedLastSample=null,Pt.unshift(Dn),An+=Dn.length}Gt!=null&&(this._audioStashedLastSample=Gt);let sn=Pt[0].dts-this._dtsBase;if(this._audioNextDts)At=sn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())At=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(Ft=!0);else{let Dn=this._audioSegmentInfoList.getLastSampleBefore(sn);if(Dn!=null){let ri=sn-(Dn.originalDts+Dn.duration);ri<=3&&(ri=0);let Mi=Dn.dts+Dn.duration+ri;At=sn-Mi}else At=0}if(Ft){let Dn=sn-At,ri=this._videoSegmentInfoList.getLastSegmentBefore(sn);if(ri!=null&&ri.beginDts<Dn){let Mi=tn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(Mi){let Hn=ri.beginDts,oi=Dn-ri.beginDts;_e.v(this.TAG,`InsertPrefixSilentAudio: dts: ${Hn}, duration: ${oi}`),Pt.unshift({unit:Mi,dts:Hn,pts:Hn}),An+=Mi.byteLength}}else Ft=!1}let Bn=[];for(let Dn=0;Dn<Pt.length;Dn++){let ri=Pt[Dn],Mi=ri.unit,Hn=ri.dts-this._dtsBase,oi=Hn-At;kt===-1&&(kt=oi);let Bi=0;Dn!==Pt.length-1?Bi=Pt[Dn+1].dts-this._dtsBase-At-oi:Gt!=null?Bi=Gt.dts-this._dtsBase-At-oi:Bn.length>=1?Bi=Bn[Bn.length-1].duration:Bi=Math.floor(_n);let lr=!1,Ai=null;if(Bi>_n*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!ie.safari){lr=!0;let an=Math.abs(Bi-_n),si=Math.ceil(an/_n),wi=oi+_n;_e.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${oi+Bi} ms, expected: ${oi+Math.round(_n)} ms, delta: ${Math.round(an)} ms, generate: ${si} frames`);let pi=tn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);pi==null&&(_e.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),pi=Mi),Ai=[];for(let Ni=0;Ni<si;Ni++){let hr=Math.round(wi);if(Ai.length>0){let Ki=Ai[Ai.length-1];Ki.duration=hr-Ki.dts}let Fi={dts:hr,pts:hr,cts:0,unit:pi,size:pi.byteLength,duration:0,originalDts:Hn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Ai.push(Fi),An+=Fi.size,wi+=_n}let Wi=Ai[Ai.length-1];Wi.duration=oi+Bi-Wi.dts,Bi=Math.round(_n)}Bn.push({dts:oi,pts:oi,cts:0,unit:ri.unit,size:ri.unit.byteLength,duration:Bi,originalDts:Hn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),lr&&Bn.push.apply(Bn,Ai)}zn?bn=new Uint8Array(An):(bn=new Uint8Array(An),bn[0]=An>>>24&255,bn[1]=An>>>16&255,bn[2]=An>>>8&255,bn[3]=An&255,bn.set(at.types.mdat,4));for(let Dn=0;Dn<Bn.length;Dn++){let ri=Bn[Dn].unit;bn.set(ri,$t),$t+=ri.byteLength}let Nn=Bn[Bn.length-1];Ct=Nn.dts+Nn.duration,this._audioNextDts=Ct;let qn=new Jt;qn.beginDts=kt,qn.endDts=Ct,qn.beginPts=kt,qn.endPts=Ct,qn.originalBeginDts=Bn[0].originalDts,qn.originalEndDts=Nn.originalDts+Nn.duration,qn.firstSample=new nn(Bn[0].dts,Bn[0].pts,Bn[0].duration,Bn[0].originalDts,!1),qn.lastSample=new nn(Nn.dts,Nn.pts,Nn.duration,Nn.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(qn),et.samples=Bn,et.sequenceNumber++;let Gn=null;zn?Gn=new Uint8Array:Gn=at.moof(et,kt),et.samples=[],et.length=0;let Jn={type:"audio",data:this._mergeBoxes(Gn,bn).buffer,sampleCount:Bn.length,info:qn};zn&&wn&&(Jn.timestampOffset=kt),this._onMediaSegment("audio",Jn)}_remuxVideo($e,tt){if(this._videoMeta==null)return;let et=$e,Pt=et.samples,At,kt=-1,Ct=-1,dn=-1,_n=-1;if(!Pt||Pt.length===0||Pt.length===1&&!tt)return;let zn=8,wn=null,Ft=8+$e.length,$t=null;if(Pt.length>1&&($t=Pt.pop(),Ft-=$t.length),this._videoStashedLastSample!=null){let Nn=this._videoStashedLastSample;this._videoStashedLastSample=null,Pt.unshift(Nn),Ft+=Nn.length}$t!=null&&(this._videoStashedLastSample=$t);let bn=Pt[0].dts-this._dtsBase;if(this._videoNextDts)At=bn-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())At=0;else{let Nn=this._videoSegmentInfoList.getLastSampleBefore(bn);if(Nn!=null){let qn=bn-(Nn.originalDts+Nn.duration);qn<=3&&(qn=0);let Gn=Nn.dts+Nn.duration+qn;At=bn-Gn}else At=0}let An=new Jt,Gt=[];for(let Nn=0;Nn<Pt.length;Nn++){let qn=Pt[Nn],Gn=qn.dts-this._dtsBase,Jn=qn.isKeyframe,Dn=Gn-At,ri=qn.cts,Mi=Dn+ri;kt===-1&&(kt=Dn,dn=Mi);let Hn=0;if(Nn!==Pt.length-1?Hn=Pt[Nn+1].dts-this._dtsBase-At-Dn:$t!=null?Hn=$t.dts-this._dtsBase-At-Dn:Gt.length>=1?Hn=Gt[Gt.length-1].duration:Hn=Math.floor(this._videoMeta.refSampleDuration),Jn){let oi=new nn(Dn,Mi,Hn,qn.dts,!0);oi.fileposition=qn.fileposition,An.appendSyncPoint(oi)}Gt.push({dts:Dn,pts:Mi,cts:ri,units:qn.units,size:qn.length,isKeyframe:Jn,duration:Hn,originalDts:Gn,flags:{isLeading:0,dependsOn:Jn?2:1,isDependedOn:Jn?1:0,hasRedundancy:0,isNonSync:Jn?0:1}})}wn=new Uint8Array(Ft),wn[0]=Ft>>>24&255,wn[1]=Ft>>>16&255,wn[2]=Ft>>>8&255,wn[3]=Ft&255,wn.set(at.types.mdat,4);for(let Nn=0;Nn<Gt.length;Nn++){let qn=Gt[Nn].units;for(;qn.length;){let Jn=qn.shift().data;wn.set(Jn,zn),zn+=Jn.byteLength}}let sn=Gt[Gt.length-1];if(Ct=sn.dts+sn.duration,_n=sn.pts+sn.duration,this._videoNextDts=Ct,An.beginDts=kt,An.endDts=Ct,An.beginPts=dn,An.endPts=_n,An.originalBeginDts=Gt[0].originalDts,An.originalEndDts=sn.originalDts+sn.duration,An.firstSample=new nn(Gt[0].dts,Gt[0].pts,Gt[0].duration,Gt[0].originalDts,Gt[0].isKeyframe),An.lastSample=new nn(sn.dts,sn.pts,sn.duration,sn.originalDts,sn.isKeyframe),this._isLive||this._videoSegmentInfoList.append(An),et.samples=Gt,et.sequenceNumber++,this._forceFirstIDR){let Nn=Gt[0].flags;Nn.dependsOn=2,Nn.isNonSync=0}let Bn=at.moof(et,kt);et.samples=[],et.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Bn,wn).buffer,sampleCount:Gt.length,info:An})}_mergeBoxes($e,tt){let et=new Uint8Array($e.byteLength+tt.byteLength);return et.set($e,0),et.set(tt,$e.byteLength),et}}var Mn=fn,Tn={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 ci{constructor($e,tt){this.TAG="TransmuxingController",this._emitter=new(Te()),this._config=tt,$e.segments||($e.segments=[{duration:$e.duration,filesize:$e.filesize,url:$e.url}]),typeof $e.cors!="boolean"&&($e.cors=!0),typeof $e.withCredentials!="boolean"&&($e.withCredentials=!1),this._mediaDataSource=$e,this._currentSegmentIndex=0;let et=0;this._mediaDataSource.segments.forEach(Pt=>{Pt.timestampBase=et,et+=Pt.duration,Pt.cors=$e.cors,Pt.withCredentials=$e.withCredentials,tt.referrerPolicy&&(Pt.referrerPolicy=tt.referrerPolicy)}),!isNaN(et)&&this._mediaDataSource.duration!==et&&(this._mediaDataSource.duration=et),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($e,tt){this._emitter.addListener($e,tt)}off($e,tt){this._emitter.removeListener($e,tt)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment($e,tt){this._currentSegmentIndex=$e;let et=this._mediaDataSource.segments[$e],Pt=this._ioctl=new St(et,this._config,$e);Pt.onError=this._onIOException.bind(this),Pt.onSeeked=this._onIOSeeked.bind(this),Pt.onComplete=this._onIOComplete.bind(this),Pt.onRedirect=this._onIORedirect.bind(this),Pt.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),tt?this._demuxer.bindDataSource(this._ioctl):Pt.onDataArrival=this._onInitChunkArrival.bind(this),Pt.open(tt)}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($e){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let tt=this._searchSegmentIndexContains($e);if(tt===this._currentSegmentIndex){let et=this._mediaInfo.segments[tt];if(et==null)this._pendingSeekTime=$e;else{let Pt=et.getNearestKeyframe($e);this._remuxer.seek(Pt.milliseconds),this._ioctl.seek(Pt.fileposition),this._pendingResolveSeekPoint=Pt.milliseconds}}else{let et=this._mediaInfo.segments[tt];if(et==null)this._pendingSeekTime=$e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(tt);else{let Pt=et.getNearestKeyframe($e);this._internalAbort(),this._remuxer.seek($e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[tt].timestampBase,this._loadSegment(tt,Pt.fileposition),this._pendingResolveSeekPoint=Pt.milliseconds,this._reportSegmentMediaInfo(tt)}}this._enableStatisticsReporter()}_searchSegmentIndexContains($e){let tt=this._mediaDataSource.segments,et=tt.length-1;for(let Pt=0;Pt<tt.length;Pt++)if($e<tt[Pt].timestampBase){et=Pt-1;break}return et}_onInitChunkArrival($e,tt){let et=null,Pt=0;if(tt>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,Pt=this._demuxer.parseChunks($e,tt);else if((et=Ke.probe($e)).match){this._demuxer=new Ke(et,this._config),this._remuxer||(this._remuxer=new Mn(this._config));let At=this._mediaDataSource;At.duration!=null&&!isNaN(At.duration)&&(this._demuxer.overridedDuration=At.duration),typeof At.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=At.hasAudio),typeof At.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=At.hasVideo),this._demuxer.timestampBase=At.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),Pt=this._demuxer.parseChunks($e,tt)}else et=null,_e.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(Tn.DEMUX_ERROR,Ue.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),Pt=0;return Pt}_onMediaInfo($e){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},$e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,jt.prototype));let tt=Object.assign({},$e);Object.setPrototypeOf(tt,jt.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=tt,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let et=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(et)})}_onMetaDataArrived($e){this._emitter.emit(Tn.METADATA_ARRIVED,$e)}_onScriptDataArrived($e){this._emitter.emit(Tn.SCRIPTDATA_ARRIVED,$e)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete($e){let et=$e+1;et<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(et)):(this._remuxer.flushStashedSamples(),this._emitter.emit(Tn.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect($e){let tt=this._ioctl.extraData;this._mediaDataSource.segments[tt].redirectedURL=$e}_onIORecoveredEarlyEof(){this._emitter.emit(Tn.RECOVERED_EARLY_EOF)}_onIOException($e,tt){_e.e(this.TAG,`IOException: type = ${$e}, code = ${tt.code}, msg = ${tt.msg}`),this._emitter.emit(Tn.IO_ERROR,$e,tt),this._disableStatisticsReporter()}_onDemuxException($e,tt){_e.e(this.TAG,`DemuxException: type = ${$e}, info = ${tt}`),this._emitter.emit(Tn.DEMUX_ERROR,$e,tt)}_onRemuxerInitSegmentArrival($e,tt){this._emitter.emit(Tn.INIT_SEGMENT,$e,tt)}_onRemuxerMediaSegmentArrival($e,tt){if(this._pendingSeekTime==null&&(this._emitter.emit(Tn.MEDIA_SEGMENT,$e,tt),this._pendingResolveSeekPoint!=null&&$e==="video")){let et=tt.info.syncPoints,Pt=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,ie.safari&&et.length>0&&et[0].originalDts===Pt&&(Pt=et[0].pts),this._emitter.emit(Tn.RECOMMEND_SEEKPOINT,Pt)}}_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($e){let tt=this._mediaInfo.segments[$e],et=Object.assign({},tt);et.duration=this._mediaInfo.duration,et.segmentCount=this._mediaInfo.segmentCount,delete et.segments,delete et.keyframesIndex,this._emitter.emit(Tn.MEDIA_INFO,et)}_reportStatisticsInfo(){let $e={};$e.url=this._ioctl.currentURL,$e.hasRedirect=this._ioctl.hasRedirect,$e.hasRedirect&&($e.redirectedURL=this._ioctl.currentRedirectedURL),$e.speed=this._ioctl.currentSpeed,$e.loaderType=this._ioctl.loaderType,$e.currentSegmentIndex=this._currentSegmentIndex,$e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Tn.STATISTICS_INFO,$e)}}var ai=ci,Ci=function(cn){let $e="TransmuxingWorker",tt=null,et=An.bind(this);me.install(),cn.addEventListener("message",function(Gt){switch(Gt.data.cmd){case"init":tt=new ai(Gt.data.param[0],Gt.data.param[1]),tt.on(Tn.IO_ERROR,Ft.bind(this)),tt.on(Tn.DEMUX_ERROR,$t.bind(this)),tt.on(Tn.INIT_SEGMENT,Pt.bind(this)),tt.on(Tn.MEDIA_SEGMENT,At.bind(this)),tt.on(Tn.LOADING_COMPLETE,kt.bind(this)),tt.on(Tn.RECOVERED_EARLY_EOF,Ct.bind(this)),tt.on(Tn.MEDIA_INFO,dn.bind(this)),tt.on(Tn.METADATA_ARRIVED,_n.bind(this)),tt.on(Tn.SCRIPTDATA_ARRIVED,zn.bind(this)),tt.on(Tn.STATISTICS_INFO,wn.bind(this)),tt.on(Tn.RECOMMEND_SEEKPOINT,bn.bind(this));break;case"destroy":tt&&(tt.destroy(),tt=null),cn.postMessage({msg:"destroyed"});break;case"start":tt.start();break;case"stop":tt.stop();break;case"seek":tt.seek(Gt.data.param);break;case"pause":tt.pause();break;case"resume":tt.resume();break;case"logging_config":{let sn=Gt.data.param;vt.applyConfig(sn),sn.enableCallback===!0?vt.addLogListener(et):vt.removeLogListener(et);break}}});function Pt(Gt,sn){let Bn={msg:Tn.INIT_SEGMENT,data:{type:Gt,data:sn}};cn.postMessage(Bn,[sn.data])}function At(Gt,sn){let Bn={msg:Tn.MEDIA_SEGMENT,data:{type:Gt,data:sn}};cn.postMessage(Bn,[sn.data])}function kt(){let Gt={msg:Tn.LOADING_COMPLETE};cn.postMessage(Gt)}function Ct(){let Gt={msg:Tn.RECOVERED_EARLY_EOF};cn.postMessage(Gt)}function dn(Gt){let sn={msg:Tn.MEDIA_INFO,data:Gt};cn.postMessage(sn)}function _n(Gt){let sn={msg:Tn.METADATA_ARRIVED,data:Gt};cn.postMessage(sn)}function zn(Gt){let sn={msg:Tn.SCRIPTDATA_ARRIVED,data:Gt};cn.postMessage(sn)}function wn(Gt){let sn={msg:Tn.STATISTICS_INFO,data:Gt};cn.postMessage(sn)}function Ft(Gt,sn){cn.postMessage({msg:Tn.IO_ERROR,data:{type:Gt,info:sn}})}function $t(Gt,sn){cn.postMessage({msg:Tn.DEMUX_ERROR,data:{type:Gt,info:sn}})}function bn(Gt){cn.postMessage({msg:Tn.RECOMMEND_SEEKPOINT,data:Gt})}function An(Gt,sn){cn.postMessage({msg:"logcat_callback",data:{type:Gt,logcat:sn}})}};class or{constructor($e,tt){if(this.TAG="Transmuxer",this._emitter=new(Te()),tt.enableWorker&&typeof Worker!="undefined")try{let et=Ee(82059);this._worker=et(Ci),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[$e,tt]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},vt.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:vt.getConfig()})}catch(et){_e.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ai($e,tt)}else this._controller=new ai($e,tt);if(this._controller){let et=this._controller;et.on(Tn.IO_ERROR,this._onIOError.bind(this)),et.on(Tn.DEMUX_ERROR,this._onDemuxError.bind(this)),et.on(Tn.INIT_SEGMENT,this._onInitSegment.bind(this)),et.on(Tn.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),et.on(Tn.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),et.on(Tn.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),et.on(Tn.MEDIA_INFO,this._onMediaInfo.bind(this)),et.on(Tn.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),et.on(Tn.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),et.on(Tn.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),et.on(Tn.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),vt.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on($e,tt){this._emitter.addListener($e,tt)}off($e,tt){this._emitter.removeListener($e,tt)}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($e){this._worker?this._worker.postMessage({cmd:"seek",param:$e}):this._controller.seek($e)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment($e,tt){Promise.resolve().then(()=>{this._emitter.emit(Tn.INIT_SEGMENT,$e,tt)})}_onMediaSegment($e,tt){Promise.resolve().then(()=>{this._emitter.emit(Tn.MEDIA_SEGMENT,$e,tt)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(Tn.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(Tn.RECOVERED_EARLY_EOF)})}_onMediaInfo($e){Promise.resolve().then(()=>{this._emitter.emit(Tn.MEDIA_INFO,$e)})}_onMetaDataArrived($e){Promise.resolve().then(()=>{this._emitter.emit(Tn.METADATA_ARRIVED,$e)})}_onScriptDataArrived($e){Promise.resolve().then(()=>{this._emitter.emit(Tn.SCRIPTDATA_ARRIVED,$e)})}_onStatisticsInfo($e){Promise.resolve().then(()=>{this._emitter.emit(Tn.STATISTICS_INFO,$e)})}_onIOError($e,tt){Promise.resolve().then(()=>{this._emitter.emit(Tn.IO_ERROR,$e,tt)})}_onDemuxError($e,tt){Promise.resolve().then(()=>{this._emitter.emit(Tn.DEMUX_ERROR,$e,tt)})}_onRecommendSeekpoint($e){Promise.resolve().then(()=>{this._emitter.emit(Tn.RECOMMEND_SEEKPOINT,$e)})}_onLoggingConfigChanged($e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:$e})}_onWorkerMessage($e){let tt=$e.data,et=tt.data;if(tt.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(tt.msg){case Tn.INIT_SEGMENT:case Tn.MEDIA_SEGMENT:this._emitter.emit(tt.msg,et.type,et.data);break;case Tn.LOADING_COMPLETE:case Tn.RECOVERED_EARLY_EOF:this._emitter.emit(tt.msg);break;case Tn.MEDIA_INFO:Object.setPrototypeOf(et,jt.prototype),this._emitter.emit(tt.msg,et);break;case Tn.METADATA_ARRIVED:case Tn.SCRIPTDATA_ARRIVED:case Tn.STATISTICS_INFO:this._emitter.emit(tt.msg,et);break;case Tn.IO_ERROR:case Tn.DEMUX_ERROR:this._emitter.emit(tt.msg,et.type,et.info);break;case Tn.RECOMMEND_SEEKPOINT:this._emitter.emit(tt.msg,et);break;case"logcat_callback":_e.emitter.emit("log",et.type,et.logcat);break;default:break}}}var tr=or,cr={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class to{constructor($e){this.TAG="MSEController",this._config=$e,this._emitter=new(Te()),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 mn}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on($e,tt){this._emitter.addListener($e,tt)}off($e,tt){this._emitter.removeListener($e,tt)}attachMediaElement($e){if(this._mediaSource)throw new ge("MediaSource has been attached to an HTMLMediaElement!");let tt=this._mediaSource=new window.MediaSource;tt.addEventListener("sourceopen",this.e.onSourceOpen),tt.addEventListener("sourceended",this.e.onSourceEnded),tt.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=$e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),$e.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let $e=this._mediaSource;for(let tt in this._sourceBuffers){let et=this._pendingSegments[tt];et.splice(0,et.length),this._pendingSegments[tt]=null,this._pendingRemoveRanges[tt]=null,this._lastInitSegments[tt]=null;let Pt=this._sourceBuffers[tt];if(Pt){if($e.readyState!=="closed"){try{$e.removeSourceBuffer(Pt)}catch(At){_e.e(this.TAG,At.message)}Pt.removeEventListener("error",this.e.onSourceBufferError),Pt.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[tt]=null,this._sourceBuffers[tt]=null}}if($e.readyState==="open")try{$e.endOfStream()}catch(tt){_e.e(this.TAG,tt.message)}$e.removeEventListener("sourceopen",this.e.onSourceOpen),$e.removeEventListener("sourceended",this.e.onSourceEnded),$e.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($e,tt){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push($e),this._pendingSegments[$e.type].push($e);return}let et=$e,Pt=`${et.container}`;et.codec&&et.codec.length>0&&(Pt+=`;codecs=${et.codec}`);let At=!1;if(_e.v(this.TAG,"Received Initialization Segment, mimeType: "+Pt),this._lastInitSegments[et.type]=et,Pt!==this._mimeTypes[et.type]){if(this._mimeTypes[et.type])_e.v(this.TAG,`Notice: ${et.type} mimeType changed, origin: ${this._mimeTypes[et.type]}, target: ${Pt}`);else{At=!0;try{let kt=this._sourceBuffers[et.type]=this._mediaSource.addSourceBuffer(Pt);kt.addEventListener("error",this.e.onSourceBufferError),kt.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(kt){_e.e(this.TAG,kt.message),this._emitter.emit(cr.ERROR,{code:kt.code,msg:kt.message});return}}this._mimeTypes[et.type]=Pt}tt||this._pendingSegments[et.type].push(et),At||this._sourceBuffers[et.type]&&!this._sourceBuffers[et.type].updating&&this._doAppendSegments(),ie.safari&&et.container==="audio/mpeg"&&et.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=et.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment($e){let tt=$e;this._pendingSegments[tt.type].push(tt),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let et=this._sourceBuffers[tt.type];et&&!et.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek($e){for(let tt in this._sourceBuffers){if(!this._sourceBuffers[tt])continue;let et=this._sourceBuffers[tt];if(this._mediaSource.readyState==="open")try{et.abort()}catch(At){_e.e(this.TAG,At.message)}this._idrList.clear();let Pt=this._pendingSegments[tt];if(Pt.splice(0,Pt.length),this._mediaSource.readyState!=="closed"){for(let At=0;At<et.buffered.length;At++){let kt=et.buffered.start(At),Ct=et.buffered.end(At);this._pendingRemoveRanges[tt].push({start:kt,end:Ct})}if(et.updating||this._doRemoveRanges(),ie.safari){let At=this._lastInitSegments[tt];At&&(this._pendingSegments[tt].push(At),et.updating||this._doAppendSegments())}}}}endOfStream(){let $e=this._mediaSource,tt=this._sourceBuffers;if(!$e||$e.readyState!=="open"){$e&&$e.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}tt.video&&tt.video.updating||tt.audio&&tt.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,$e.endOfStream())}getNearestKeyframe($e){return this._idrList.getLastSyncPointBeforeDts($e)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let $e=this._mediaElement.currentTime;for(let tt in this._sourceBuffers){let et=this._sourceBuffers[tt];if(et){let Pt=et.buffered;if(Pt.length>=1&&$e-Pt.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let $e=this._mediaElement.currentTime;for(let tt in this._sourceBuffers){let et=this._sourceBuffers[tt];if(et){let Pt=et.buffered,At=!1;for(let kt=0;kt<Pt.length;kt++){let Ct=Pt.start(kt),dn=Pt.end(kt);if(Ct<=$e&&$e<dn+3){if($e-Ct>=this._config.autoCleanupMaxBackwardDuration){At=!0;let _n=$e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[tt].push({start:Ct,end:_n})}}else dn<$e&&(At=!0,this._pendingRemoveRanges[tt].push({start:Ct,end:dn}))}At&&!et.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let $e=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||$e.video&&$e.video.updating||$e.audio&&$e.audio.updating)return;let tt=this._mediaSource.duration,et=this._pendingMediaDuration;et>0&&(isNaN(tt)||et>tt)&&(_e.v(this.TAG,`Update MediaSource duration from ${tt} to ${et}`),this._mediaSource.duration=et),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let $e in this._pendingRemoveRanges){if(!this._sourceBuffers[$e]||this._sourceBuffers[$e].updating)continue;let tt=this._sourceBuffers[$e],et=this._pendingRemoveRanges[$e];for(;et.length&&!tt.updating;){let Pt=et.shift();tt.remove(Pt.start,Pt.end)}}}_doAppendSegments(){let $e=this._pendingSegments;for(let tt in $e)if(!(!this._sourceBuffers[tt]||this._sourceBuffers[tt].updating)&&$e[tt].length>0){let et=$e[tt].shift();if(et.timestampOffset){let Pt=this._sourceBuffers[tt].timestampOffset,At=et.timestampOffset/1e3;Math.abs(Pt-At)>.1&&(_e.v(this.TAG,`Update MPEG audio timestampOffset from ${Pt} to ${At}`),this._sourceBuffers[tt].timestampOffset=At),delete et.timestampOffset}if(!et.data||et.data.byteLength===0)continue;try{this._sourceBuffers[tt].appendBuffer(et.data),this._isBufferFull=!1,tt==="video"&&et.hasOwnProperty("info")&&this._idrList.appendArray(et.info.syncPoints)}catch(Pt){this._pendingSegments[tt].unshift(et),Pt.code===22?(this._isBufferFull||this._emitter.emit(cr.BUFFER_FULL),this._isBufferFull=!0):(_e.e(this.TAG,Pt.message),this._emitter.emit(cr.ERROR,{code:Pt.code,msg:Pt.message}))}}}_onSourceOpen(){if(_e.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let $e=this._pendingSourceBufferInit;for(;$e.length;){let tt=$e.shift();this.appendInitSegment(tt,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(cr.SOURCE_OPEN)}_onSourceEnded(){_e.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){_e.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 $e=this._pendingSegments;return $e.video.length>0||$e.audio.length>0}_hasPendingRemoveRanges(){let $e=this._pendingRemoveRanges;return $e.video.length>0||$e.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(cr.UPDATE_END)}_onSourceBufferError($e){_e.e(this.TAG,`SourceBuffer Error: ${$e}`)}}var no=to;const di={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Cr={NETWORK_EXCEPTION:ue.EXCEPTION,NETWORK_STATUS_CODE_INVALID:ue.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:ue.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:ue.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Ue.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Ue.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Ue.CODEC_UNSUPPORTED};class zi{constructor($e,tt){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(Te()),this._config=Bt(),typeof tt=="object"&&Object.assign(this._config,tt),$e.type.toLowerCase()!=="flv")throw new ce("FlvPlayer requires an flv MediaDataSource input!");$e.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=$e,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 et=ie.chrome&&(ie.version.major<50||ie.version.major===50&&ie.version.build<2661);this._alwaysSeekKeyframe=!!(et||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($e,tt){$e===yt.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}):$e===yt.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener($e,tt)}off($e,tt){this._emitter.removeListener($e,tt)}attachMediaElement($e){if(this._mediaElement=$e,$e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),$e.addEventListener("seeking",this.e.onvSeeking),$e.addEventListener("canplay",this.e.onvCanPlay),$e.addEventListener("stalled",this.e.onvStalled),$e.addEventListener("progress",this.e.onvProgress),this._msectl=new no(this._config),this._msectl.on(cr.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(cr.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(cr.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(cr.ERROR,tt=>{this._emitter.emit(yt.ERROR,di.MEDIA_ERROR,Cr.MEDIA_MSE_ERROR,tt)}),this._msectl.attachMediaElement($e),this._pendingSeekTime!=null)try{$e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(tt){}}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 tr(this._mediaDataSource,this._config),this._transmuxer.on(Tn.INIT_SEGMENT,($e,tt)=>{this._msectl.appendInitSegment(tt)}),this._transmuxer.on(Tn.MEDIA_SEGMENT,($e,tt)=>{if(this._msectl.appendMediaSegment(tt),this._config.lazyLoad&&!this._config.isLive){let et=this._mediaElement.currentTime;tt.info.endDts>=(et+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(_e.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(Tn.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(yt.LOADING_COMPLETE)}),this._transmuxer.on(Tn.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(yt.RECOVERED_EARLY_EOF)}),this._transmuxer.on(Tn.IO_ERROR,($e,tt)=>{this._emitter.emit(yt.ERROR,di.NETWORK_ERROR,$e,tt)}),this._transmuxer.on(Tn.DEMUX_ERROR,($e,tt)=>{this._emitter.emit(yt.ERROR,di.MEDIA_ERROR,$e,{code:-1,msg:tt})}),this._transmuxer.on(Tn.MEDIA_INFO,$e=>{this._mediaInfo=$e,this._emitter.emit(yt.MEDIA_INFO,Object.assign({},$e))}),this._transmuxer.on(Tn.METADATA_ARRIVED,$e=>{this._emitter.emit(yt.METADATA_ARRIVED,$e)}),this._transmuxer.on(Tn.SCRIPTDATA_ARRIVED,$e=>{this._emitter.emit(yt.SCRIPTDATA_ARRIVED,$e)}),this._transmuxer.on(Tn.STATISTICS_INFO,$e=>{this._statisticsInfo=this._fillStatisticsInfo($e),this._emitter.emit(yt.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(Tn.RECOMMEND_SEEKPOINT,$e=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=$e/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($e){this._mediaElement.volume=$e}get muted(){return this._mediaElement.muted}set muted($e){this._mediaElement.muted=$e}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime($e){this._mediaElement?this._internalSeek($e):this._pendingSeekTime=$e}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($e){if($e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return $e;let tt=!0,et=0,Pt=0;if(this._mediaElement.getVideoPlaybackQuality){let At=this._mediaElement.getVideoPlaybackQuality();et=At.totalVideoFrames,Pt=At.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(et=this._mediaElement.webkitDecodedFrameCount,Pt=this._mediaElement.webkitDroppedFrameCount):tt=!1;return tt&&($e.decodedFrames=et,$e.droppedFrames=Pt),$e}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let $e=this._mediaElement.buffered,tt=this._mediaElement.currentTime,et=0,Pt=0;for(let At=0;At<$e.length;At++){let kt=$e.start(At),Ct=$e.end(At);if(kt<=tt&&tt<Ct){et=kt,Pt=Ct;break}}Pt>=tt+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(_e.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){_e.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 $e=this._mediaElement.currentTime,tt=this._mediaElement.buffered,et=!1;for(let Pt=0;Pt<tt.length;Pt++){let At=tt.start(Pt),kt=tt.end(Pt);if($e>=At&&$e<kt){$e>=kt-this._config.lazyLoadRecoverDuration&&(et=!0);break}}et&&(window.clearInterval(this._progressChecker),this._progressChecker=null,et&&(_e.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered($e){let tt=this._mediaElement.buffered;for(let et=0;et<tt.length;et++){let Pt=tt.start(et),At=tt.end(et);if($e>=Pt&&$e<At)return!0}return!1}_internalSeek($e){let tt=this._isTimepointBuffered($e),et=!1,Pt=0;if($e<1&&this._mediaElement.buffered.length>0){let At=this._mediaElement.buffered.start(0);(At<1&&$e<At||ie.safari)&&(et=!0,Pt=ie.safari?.1:At)}if(et)this._requestSetTime=!0,this._mediaElement.currentTime=Pt;else if(tt){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=$e;else{let At=this._msectl.getNearestKeyframe(Math.floor($e*1e3));this._requestSetTime=!0,At!=null?this._mediaElement.currentTime=At.dts/1e3:this._mediaElement.currentTime=$e}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek($e),this._transmuxer.seek(Math.floor($e*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=$e)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let $e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered($e)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek($e),this._transmuxer.seek(Math.floor($e*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=$e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback($e){let tt=this._mediaElement;if($e||!this._receivedCanPlay||tt.readyState<2){let et=tt.buffered;et.length>0&&tt.currentTime<et.start(0)&&(_e.w(this.TAG,`Playback seems stuck at ${tt.currentTime}, seek to ${et.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=et.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata($e){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking($e){let tt=this._mediaElement.currentTime,et=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(tt<1&&et.length>0){let Pt=et.start(0);if(Pt<1&&tt<Pt||ie.safari){this._requestSetTime=!0,this._mediaElement.currentTime=ie.safari?.1:Pt;return}}if(this._isTimepointBuffered(tt)){if(this._alwaysSeekKeyframe){let Pt=this._msectl.getNearestKeyframe(Math.floor(tt*1e3));Pt!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=Pt.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:tt,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay($e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled($e){this._checkAndResumeStuckPlayback(!0)}_onvProgress($e){this._checkAndResumeStuckPlayback()}}var st=zi;class Dr{constructor($e,tt){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(Te()),this._config=Bt(),typeof tt=="object"&&Object.assign(this._config,tt),$e.type.toLowerCase()==="flv")throw new ce("NativePlayer does't support flv MediaDataSource input!");if($e.hasOwnProperty("segments"))throw new ce(`NativePlayer(${$e.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=$e,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on($e,tt){$e===yt.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}):$e===yt.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener($e,tt)}off($e,tt){this._emitter.removeListener($e,tt)}attachMediaElement($e){if(this._mediaElement=$e,$e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{$e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(tt){}}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($e){this._mediaElement.volume=$e}get muted(){return this._mediaElement.muted}set muted($e){this._mediaElement.muted=$e}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime($e){this._mediaElement?this._mediaElement.currentTime=$e:this._pendingSeekTime=$e}get mediaInfo(){let tt={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(tt.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(tt.width=this._mediaElement.videoWidth,tt.height=this._mediaElement.videoHeight)),tt}get statisticsInfo(){let $e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return $e;let tt=!0,et=0,Pt=0;if(this._mediaElement.getVideoPlaybackQuality){let At=this._mediaElement.getVideoPlaybackQuality();et=At.totalVideoFrames,Pt=At.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(et=this._mediaElement.webkitDecodedFrameCount,Pt=this._mediaElement.webkitDroppedFrameCount):tt=!1;return tt&&($e.decodedFrames=et,$e.droppedFrames=Pt),$e}_onvLoadedMetadata($e){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}}var Mr=Dr;me.install();function xo(cn,$e){let tt=cn;if(tt==null||typeof tt!="object")throw new ce("MediaDataSource must be an javascript object!");if(!tt.hasOwnProperty("type"))throw new ce("MediaDataSource must has type field to indicate video file type!");switch(tt.type){case"flv":return new st(tt,$e);default:return new Mr(tt,$e)}}function Gr(){return it.supportMSEH264Playback()}function uo(){return it.getFeatureList()}let Zr={};Zr.createPlayer=xo,Zr.isSupported=Gr,Zr.getFeatureList=uo,Zr.BaseLoader=z,Zr.LoaderStatus=de,Zr.LoaderErrors=ue,Zr.Events=yt,Zr.ErrorTypes=di,Zr.ErrorDetails=Cr,Zr.FlvPlayer=st,Zr.NativePlayer=Mr,Zr.LoggingControl=vt,Object.defineProperty(Zr,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var co=Zr},93125:function(Pn,qt,Ee){(function(Le){if(1)window.OSS=Le(),Pn.exports=Le();else var me})(function(){var Le;return function(){function me(Ie,Te,Ce){function _e(xe,ge){if(!Te[xe]){if(!Ie[xe]){var ce=void 0;if(!ge&&ce)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=Te[xe]={exports:{}};Ie[xe][0].call(de.exports,function(ue){return _e(Ie[xe][1][ue]||ue)},de,de.exports,me,Ie,Te,Ce)}return Te[xe].exports}for(var he=void 0,Se=0;Se<Ce.length;Se++)_e(Ce[Se]);return _e}return me}()({1:[function(me,Ie,Te){"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,Ie.exports=Ce},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(me,Ie,Te){(function(Ce,_e){"use strict";function he(it){return it&&it.__esModule?it:{default:it}}function Se(it,dt){return it[dt]||it[dt.toLowerCase()]}function xe(it,dt){var yt=je.parse(it);if(!yt.protocol){var Et=dt?"https://":"http://";yt=je.parse(Et+it)}if(yt.protocol!=="http:"&&yt.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return yt}function ge(it,dt,yt){var Et=yt?"https://":"http://",vt=dt?"-internal.aliyuncs.com":".aliyuncs.com";return it.substr(0,14)==="vpc100-oss-cn-"&&(vt=".aliyuncs.com"),je.parse(Et+it+vt)}function ce(){return document&&document.location&&document.location.protocol==="https:"}function ve(it,dt){if(!(this instanceof ve))return new ve(it,dt);it&&it.inited?this.options=it:this.options=ve.initOptions(it),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=gt,this.agent=this.options.agent||Bt),this.ctx=dt,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var de=me("babel-runtime/regenerator"),ue=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"),le=me("copy-to"),ye=me("mime"),we=me("xml2js"),be=me("humanize-ms"),ke=me("agentkeepalive"),Ne=me("merge-descriptors"),je=me("url"),Ve=me("is-type-of"),Je=me("platform"),We=me("utility"),gt=me("urllib"),ut=me("./version"),bt=me("dateformat"),rt=me("bowser"),St=me("../common/signUtils"),ct=me("../common/utils"),Bt=new ke;Ie.exports=ve,ve.initOptions=function(it){if(!it||!it.accessKeyId||!it.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var dt=ce(),yt={region:"oss-cn-hangzhou",internal:!1,secure:dt,bucket:null,endpoint:null,cname:!1};if((0,ee.default)(it).forEach(function(Et){it[Et]!==void 0&&(yt[Et]=it[Et])}),yt.accessKeyId=yt.accessKeyId.trim(),yt.accessKeySecret=yt.accessKeySecret.trim(),yt.timeout&&(yt.timeout=be(yt.timeout)),yt.endpoint)yt.endpoint=xe(yt.endpoint,yt.secure);else{if(!yt.region)throw new Error("require options.endpoint or options.region");yt.endpoint=ge(yt.region,yt.internal,yt.secure)}return yt.inited=!0,yt};var ht=ve.prototype;Ne(ht,me("./object")),Ne(ht,me("./managed_upload")),Ne(ht,me("../common/multipart")),Ne(ht,me("../common/thunkpool.js")),ve.Wrapper=me("./wrapper"),ht.signature=function(it){return oe("authorization stringToSign: %s",it),St.computeSignature(this.options.accessKeySecret,it)},ht.authorization=function(it,dt,yt,Et){var vt=St.buildCanonicalString(it.toUpperCase(),dt,{headers:Et,parameters:yt});return St.authorization(this.options.accessKeyId,this.options.accessKeySecret,vt)},ht.createRequest=function(it){var dt={"x-oss-date":bt(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(dt["x-oss-security-token"]=this.options.stsToken),le(it.headers).to(dt),Se(dt,"Content-Type")||(it.mime===ye.default_type&&(it.mime=""),it.mime&&it.mime.indexOf("/")>0?dt["Content-Type"]=it.mime:dt["Content-Type"]=ye.getType(it.mime||se.extname(it.object||""))||"application/octet-stream"),it.content&&(dt["Content-Md5"]=ie.createHash("md5").update(new _e(it.content,"utf8")).digest("base64"),dt["Content-Length"]||(dt["Content-Length"]=it.content.length));var yt=this._getResource(it);dt.authorization=this.authorization(it.method,yt,it.subres,dt);var Et=this._getReqUrl(it);oe("request %s %s, with headers %j, !!stream: %s",it.method,Et,dt,!!it.stream);var vt=it.timeout||this.options.timeout;return{url:Et,params:{agent:this.agent,method:it.method,content:it.content,stream:it.stream,headers:dt,timeout:vt,writeStream:it.writeStream,customResponse:it.customResponse,ctx:it.ctx||this.ctx}}},ht.request=ue.default.mark(function it(dt){var yt,Et,vt,Rt;return ue.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return yt=this.createRequest(dt),Et=void 0,vt=void 0,jt.prev=3,jt.next=6,this.urllib.request(yt.url,yt.params);case 6:Et=jt.sent,oe("response %s %s, got %s, headers: %j",dt.method,yt.url,Et.status,Et.headers),jt.next=13;break;case 10:jt.prev=10,jt.t0=jt.catch(3),vt=jt.t0;case 13:if(Rt=void 0,!Et||!dt.successStatuses||dt.successStatuses.indexOf(Et.status)!==-1){jt.next=26;break}return jt.next=17,this.requestError(Et);case 17:if(Rt=jt.sent,Rt.code!=="RequestTimeTooSkewed"){jt.next=23;break}return this.options.amendTimeSkewed=+new Date(Rt.serverTime)-new Date,jt.next=22,this.request(dt);case 22:return jt.abrupt("return",jt.sent);case 23:Rt.params=dt,jt.next=30;break;case 26:if(!vt){jt.next=30;break}return jt.next=29,this.requestError(vt);case 29:Rt=jt.sent;case 30:if(!Rt){jt.next=32;break}throw Rt;case 32:if(!dt.xmlResponse){jt.next=36;break}return jt.next=35,this.parseXML(Et.data);case 35:Et.data=jt.sent;case 36:return jt.abrupt("return",Et);case 37:case"end":return jt.stop()}},it,this,[[3,10]])}),ht._getResource=function(it){var dt="/";return it.bucket&&(dt+=it.bucket+"/"),it.object&&(dt+=it.object),dt},ht._isIP=function(it){return ct._isIP(it)},ht._escape=function(it){return We.encodeURIComponent(it).replace(/%2F/g,"/")},ht._getReqUrl=function(it){var dt={};le(this.options.endpoint).to(dt);var yt=this._isIP(dt.hostname),Et=this.options.cname;!it.bucket||Et||yt||(dt.host=it.bucket+"."+dt.host);var vt="/";it.bucket&&yt&&(vt+=it.bucket+"/"),it.object&&(vt+=this._escape(it.object).replace(/\+/g,"%2B")),dt.pathname=vt;var Rt={};if(it.query&&Ne(Rt,it.query),it.subres){var jt={};Ve.string(it.subres)?jt[it.subres]="":Ve.array(it.subres)?it.subres.forEach(function(un){jt[un]=""}):jt=it.subres,Ne(Rt,jt)}return dt.query=Rt,je.format(dt)},ht._getUserAgent=function(){var it=Ce&&Ce.browser?"js":"nodejs",dt="aliyun-sdk-"+it+"/"+ut.version,yt=Je.description;return!yt&&Ce&&(yt="Node.js "+Ce.version.slice(1)+" on "+Ce.platform+" "+Ce.arch),this._checkUserAgent(dt+" "+yt)},ht._checkUserAgent=function(it){return it.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},ht.checkBrowserAndVersion=function(it,dt){return rt.name===it&&rt.version.split(".")[0]===dt},ht.parseXML=function(it){return function(dt){_e.isBuffer(it)&&(it=it.toString()),we.parseString(it,{explicitRoot:!1,explicitArray:!1},dt)}},ht.requestError=ue.default.mark(function it(dt){var yt,Et,vt,Rt;return ue.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(yt=null,dt.data&&dt.data.length){jt.next=5;break}dt.status===-1||dt.status===-2?(yt=new Error(dt.message),yt.name=dt.name,yt.status=dt.status,yt.code=dt.name):(dt.status===404?(yt=new Error("Object not exists"),yt.name="NoSuchKeyError",yt.status=404,yt.code="NoSuchKey"):dt.status===412?(yt=new Error("Pre condition failed"),yt.name="PreconditionFailedError",yt.status=412,yt.code="PreconditionFailed"):(yt=new Error("Unknow error, status: "+dt.status),yt.name="UnknowError",yt.status=dt.status),yt.requestId=dt.headers["x-oss-request-id"],yt.host=""),jt.next=30;break;case 5:return Et=String(dt.data),oe("request response error data: %s",Et),vt=void 0,jt.prev=8,jt.next=11,this.parseXML(Et)||{};case 11:vt=jt.sent,jt.next=21;break;case 14:return jt.prev=14,jt.t0=jt.catch(8),oe(Et),jt.t0.message+=`
|
|
|
raw xml: `+Et,jt.t0.status=dt.status,jt.t0.requestId=dt.headers["x-oss-request-id"],jt.abrupt("return",jt.t0);case 21:Rt=vt.Message||"unknow request error, status: "+dt.status,vt.Condition&&(Rt+=" (condition: "+vt.Condition+")"),yt=new Error(Rt),yt.name=vt.Code?vt.Code+"Error":"UnknowError",yt.status=dt.status,yt.code=vt.Code,yt.requestId=vt.RequestId,yt.hostId=vt.HostId,yt.serverTime=vt.ServerTime;case 30:return oe("generate error %j",yt),jt.abrupt("return",yt);case 32:case"end":return jt.stop()}},it,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,Ie,Te){(function(Ce){"use strict";function _e(le){return le&&le.__esModule?le:{default:le}}function he(le,ye){if(!(this instanceof he))return new he(le,ye);se.call(this,ye),this.file=le,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var Se=me("babel-runtime/core-js/array/from"),xe=_e(Se),ge=me("babel-runtime/regenerator"),ce=_e(ge),ve=me("is-type-of"),de=me("util"),ue=me("path"),z=me("mime"),ee=me("copy-to"),oe=Te;oe.multipartUpload=ce.default.mark(function le(ye,we,be){var ke,Ne,je,Ve,Je,We,gt,ut,bt;return ce.default.wrap(function(rt){for(;;)switch(rt.prev=rt.next){case 0:if(this.resetCancelFlag(),be=be||{},!be.checkpoint||!be.checkpoint.uploadId){rt.next=6;break}return rt.next=5,this._resumeMultipart(be.checkpoint,be);case 5:return rt.abrupt("return",rt.sent);case 6:return ke=102400,be.mime||(ve.file(we)?be.mime=z.getType(ue.extname(we.name)):ve.blob(we)?be.mime=we.type:be.mime=z.getType(ue.extname(we))),be.headers=be.headers||{},this._convertMetaToHeaders(be.meta,be.headers),rt.next=12,this._getFileSize(we);case 12:if(!((Ne=rt.sent)<ke)){rt.next=25;break}return je=this._createStream(we,0,Ne),be.contentLength=Ne,rt.next=18,this.putStream(ye,je,be);case 18:if(Ve=rt.sent,!be||!be.progress){rt.next=22;break}return rt.next=22,be.progress(1);case 22:return Je={res:Ve.res,bucket:this.options.bucket,name:ye,etag:Ve.res.headers.etag},(be.headers&&be.headers["x-oss-callback"]||be.callback)&&(Je.data=Ve.data),rt.abrupt("return",Je);case 25:if(!(be.partSize&&be.partSize<ke)){rt.next=27;break}throw new Error("partSize must not be smaller than "+ke);case 27:return rt.next=29,this.initMultipartUpload(ye,be);case 29:if(We=rt.sent,gt=We.uploadId,ut=this._getPartSize(Ne,be.partSize),bt={file:we,name:ye,fileSize:Ne,partSize:ut,uploadId:gt,doneParts:[]},!be||!be.progress){rt.next=36;break}return rt.next=36,be.progress(0,bt,We.res);case 36:return rt.next=38,this._resumeMultipart(bt,be);case 38:return rt.abrupt("return",rt.sent);case 39:case"end":return rt.stop()}},le,this)}),oe._resumeMultipart=ce.default.mark(function le(ye,we){var be,ke,Ne,je,Ve,Je,We,gt,ut,bt,rt,St,ct,Bt,ht,it,dt,yt,Et,vt,Rt;return ce.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(!this.isCancel()){jt.next=2;break}throw this._makeCancelEvent();case 2:if(be=ye.file,ke=ye.fileSize,Ne=ye.partSize,je=ye.uploadId,Ve=ye.doneParts,Je=ye.name,We=[],Ve.length>0&&ee(Ve).to(We),gt=this._divideParts(ke,Ne),ut=gt.length,bt=!1,rt=ce.default.mark(function un(Vt,xn){var Ut,Zt,Xt;return ce.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:if(Vt.isCancel()){mt.next=21;break}return mt.prev=1,Ut=gt[xn-1],Zt={stream:Vt._createStream(be,Ut.start,Ut.end),size:Ut.end-Ut.start},mt.next=6,Vt._uploadPart(Je,je,xn,Zt);case 6:if(Xt=mt.sent,Vt.isCancel()||bt){mt.next=13;break}if(ye.doneParts.push({number:xn,etag:Xt.res.headers.etag}),We.push({number:xn,etag:Xt.res.headers.etag}),!we||!we.progress){mt.next=13;break}return mt.next=13,we.progress(Ve.length/ut,ye,Xt.res);case 13:mt.next=21;break;case 15:if(mt.prev=15,mt.t0=mt.catch(1),Vt.isCancel()){mt.next=21;break}throw Vt.cancel(),mt.t0.partNum=xn,mt.t0;case 21:case"end":return mt.stop()}},un,this,[[1,15]])}),St=(0,xe.default)(new Array(ut),function(un,Vt){return Vt+1}),ct=We.map(function(un){return un.number}),Bt=St.filter(function(un){return ct.indexOf(un)<0}),ht=5,it=we.parallel||ht,!this.checkBrowserAndVersion("Internet Explorer","10")&&it!==1){jt.next=26;break}dt=0;case 16:if(!(dt<Bt.length)){jt.next=24;break}if(!this.isCancel()){jt.next=19;break}throw this._makeCancelEvent();case 19:return jt.next=21,rt(this,Bt[dt]);case 21:dt++,jt.next=16;break;case 24:jt.next=40;break;case 26:for(yt=[],Et=0;Et<Bt.length;Et++)yt.push(rt(this,Bt[Et]));return jt.next=30,this._thunkPool(yt,it);case 30:if(vt=jt.sent,bt=!0,!(vt&&vt.length>0)){jt.next=37;break}throw this.resetCancelFlag(),Rt=vt[0],Rt.message="Failed to upload some parts with error: "+Rt.toString()+" part_num: "+Rt.partNum,Rt;case 37:if(!this.isCancel()){jt.next=40;break}throw yt=null,this._makeCancelEvent();case 40:return jt.next=42,this.completeMultipartUpload(Je,je,We,we);case 42:return jt.abrupt("return",jt.sent);case 43:case"end":return jt.stop()}},le,this)}),ve.file=function(le){return typeof File!="undefined"&&le instanceof File},ve.blob=function(le){return typeof Blob!="undefined"&&le instanceof Blob},oe._getFileSize=ce.default.mark(function le(ye){var we;return ce.default.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(!ve.buffer(ye)){be.next=4;break}return be.abrupt("return",ye.length);case 4:if(!ve.blob(ye)&&!ve.file(ye)){be.next=6;break}return be.abrupt("return",ye.size);case 6:if(!ve.string(ye)){be.next=11;break}return be.next=9,this._statFile(ye);case 9:return we=be.sent,be.abrupt("return",we.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return be.stop()}},le,this)});var ie=me("stream"),se=ie.Readable;de.inherits(he,se),he.prototype.readFileAndPush=function(le){if(this.fileBuffer)for(var ye=!0;ye&&this.fileBuffer&&this.start<this.fileBuffer.length;){var we=this.start,be=we+le;be=be>this.fileBuffer.length?this.fileBuffer.length:be,this.start=be,ye=this.push(this.fileBuffer.slice(we,be))}},he.prototype._read=function(le){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);le=le||16384;var ye=this;this.reader.onload=function(we){ye.fileBuffer=new Ce(new Uint8Array(we.target.result)),ye.file=null,ye.readFileAndPush(le)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(le)},oe._createStream=function(le,ye,we){if(ve.blob(le)||ve.file(le))return new he(le.slice(ye,we));throw new Error("_createStream requires File/String.")},oe._getPartSize=function(le,ye){return ye?Math.max(Math.ceil(le/1e4),ye):1048576},oe._divideParts=function(le,ye){for(var we=Math.ceil(le/ye),be=[],ke=0;ke<we;ke++){var Ne=ye*ke,je=Math.min(Ne+ye,le);be.push({start:Ne,end:je})}return be},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,Ie,Te){"use strict";function Ce(ye){return ye&&ye.__esModule?ye:{default:ye}}var _e=me("babel-runtime/core-js/object/keys"),he=Ce(_e),Se=me("babel-runtime/regenerator"),xe=Ce(Se),ge=me("debug")("ali-oss:object"),ce=me("utility"),ve=me("fs"),de=me("is-type-of"),ue=me("url"),z=me("copy-to"),ee=me("path"),oe=me("mime"),ie=me("../common/callback"),se=me("../common/signUtils"),le=Te;le.append=xe.default.mark(function ye(we,be,ke){var Ne;return xe.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ke=ke||{},ke.position===void 0&&(ke.position="0"),ke.subres={append:"",position:ke.position},ke.method="POST",je.next=6,this.put(we,be,ke);case 6:return Ne=je.sent,Ne.nextAppendPosition=Ne.res.headers["x-oss-next-append-position"],je.abrupt("return",Ne);case 9:case"end":return je.stop()}},ye,this)}),le.put=xe.default.mark(function ye(we,be,ke){var Ne,je,Ve,Je,We,gt;return xe.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(Ne=void 0,ke=ke||{},!de.buffer(be)){ut.next=6;break}Ne=be,ut.next=18;break;case 6:if(!de.blob(be)&&!de.file(be)){ut.next=17;break}return ke.mime||(de.file(be)?ke.mime=oe.getType(ee.extname(be.name)):ke.mime=be.type),je=this._createStream(be,0,be.size),ut.next=11,this._getFileSize(be);case 11:return ke.contentLength=ut.sent,ut.next=14,this.putStream(we,je,ke);case 14:return ut.abrupt("return",ut.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return ke.headers=ke.headers||{},this._convertMetaToHeaders(ke.meta,ke.headers),Ve=ke.method||"PUT",Je=this._objectRequestParams(Ve,we,ke),ie.encodeCallback(Je,ke),Je.mime=ke.mime,Je.content=Ne,Je.successStatuses=[200],ut.next=28,this.request(Je);case 28:return We=ut.sent,gt={name:we,url:this._objectUrl(we),res:We.res},Je.headers&&Je.headers["x-oss-callback"]&&(gt.data=JSON.parse(We.data.toString())),ut.abrupt("return",gt);case 32:case"end":return ut.stop()}},ye,this)}),le.putStream=xe.default.mark(function ye(we,be,ke){var Ne,je,Ve,Je;return xe.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return ke=ke||{},ke.headers=ke.headers||{},ke.contentLength?ke.headers["Content-Length"]=ke.contentLength:ke.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(ke.meta,ke.headers),Ne=ke.method||"PUT",je=this._objectRequestParams(Ne,we,ke),ie.encodeCallback(je,ke),je.mime=ke.mime,je.stream=be,je.successStatuses=[200],We.next=12,this.request(je);case 12:return Ve=We.sent,Je={name:we,url:this._objectUrl(we),res:Ve.res},je.headers&&je.headers["x-oss-callback"]&&(Je.data=JSON.parse(Ve.data.toString())),We.abrupt("return",Je);case 16:case"end":return We.stop()}},ye,this)}),le.head=xe.default.mark(function ye(we,be){var ke,Ne,je;return xe.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return ke=this._objectRequestParams("HEAD",we,be),ke.successStatuses=[200,304],Ve.next=4,this.request(ke);case 4:return Ne=Ve.sent,je={meta:null,res:Ne.res,status:Ne.status},Ne.status===200&&(0,he.default)(Ne.headers).forEach(function(Je){Je.indexOf("x-oss-meta-")===0&&(je.meta||(je.meta={}),je.meta[Je.substring(11)]=Ne.headers[Je])}),Ve.abrupt("return",je);case 8:case"end":return Ve.stop()}},ye,this)}),le.get=xe.default.mark(function ye(we,be,ke){var Ne,je,Ve,Je;return xe.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return Ne=null,je=!1,de.writableStream(be)?Ne=be:de.string(be)?(Ne=ve.createWriteStream(be),je=!0):ke=be,ke=ke||{},ke.process&&(ke.subres=ke.subres||{},ke.subres["x-oss-process"]=ke.process),Ve=void 0,We.prev=6,Je=this._objectRequestParams("GET",we,ke),Je.writeStream=Ne,Je.successStatuses=[200,206,304],We.next=12,this.request(Je);case 12:Ve=We.sent,je&&Ne.destroy(),We.next=24;break;case 16:if(We.prev=16,We.t0=We.catch(6),!je){We.next=23;break}return Ne.destroy(),ge("get error: %s, delete the exists file %s",We.t0,be),We.next=23,this._deleteFileSafe(be);case 23:throw We.t0;case 24:return We.abrupt("return",{res:Ve.res,content:Ve.data});case 25:case"end":return We.stop()}},ye,this,[[6,16]])}),le.getStream=xe.default.mark(function ye(we,be){var ke,Ne;return xe.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return be=be||{},ke=this._objectRequestParams("GET",we,be),ke.customResponse=!0,ke.successStatuses=[200,206,304],je.next=6,this.request(ke);case 6:return Ne=je.sent,je.abrupt("return",{stream:Ne.res,res:{status:Ne.status,headers:Ne.headers}});case 8:case"end":return je.stop()}},ye,this)}),le.delete=xe.default.mark(function ye(we,be){var ke,Ne;return xe.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ke=this._objectRequestParams("DELETE",we,be),ke.successStatuses=[204],je.next=4,this.request(ke);case 4:return Ne=je.sent,je.abrupt("return",{res:Ne.res});case 6:case"end":return je.stop()}},ye,this)}),le.deleteMulti=xe.default.mark(function ye(we,be){var ke,Ne,je,Ve,Je,We;return xe.default.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:for(be=be||{},ke=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,be.quiet?ke+=` <Quiet>true</Quiet>
|
|
|
`:ke+=` <Quiet>false</Quiet>
|
|
|
`,Ne=0;Ne<we.length;Ne++)ke+=" <Object><Key>"+ce.escape(this._objectName(we[Ne]))+`</Key></Object>
|
|
|
`;return ke+="</Delete>",ge("delete multi objects: %s",ke),be.subres="delete",je=this._objectRequestParams("POST","",be),je.mime="xml",je.content=ke,je.xmlResponse=!0,je.successStatuses=[200],gt.next=14,this.request(je);case 14:return Ve=gt.sent,Je=Ve.data,We=Je&&Je.Deleted||null,We&&(Array.isArray(We)||(We=[We]),We=We.map(function(ut){return ut.Key})),gt.abrupt("return",{res:Ve.res,deleted:We});case 19:case"end":return gt.stop()}},ye,this)}),le.copy=xe.default.mark(function ye(we,be,ke){var Ne,je,Ve;return xe.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return ke=ke||{},ke.headers=ke.headers||{},(0,he.default)(ke.headers).forEach(function(We){ke.headers["x-oss-copy-source-"+We.toLowerCase()]=ke.headers[We]}),ke.meta&&(ke.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ke.meta,ke.headers),be=be[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(be):"/"+encodeURIComponent(be.slice(1)),ke.headers["x-oss-copy-source"]=be,Ne=this._objectRequestParams("PUT",we,ke),Ne.xmlResponse=!0,Ne.successStatuses=[200,304],Je.next=12,this.request(Ne);case 12:return je=Je.sent,Ve=je.data,Ve&&(Ve={etag:Ve.ETag,lastModified:Ve.LastModified}),Je.abrupt("return",{data:Ve,res:je.res});case 16:case"end":return Je.stop()}},ye,this)}),le.putMeta=xe.default.mark(function ye(we,be,ke){return xe.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.next=2,this.copy(we,we,{meta:be||{},timeout:ke&&ke.timeout,ctx:ke&&ke.ctx});case 2:return Ne.abrupt("return",Ne.sent);case 3:case"end":return Ne.stop()}},ye,this)}),le.list=xe.default.mark(function ye(we,be){var ke,Ne,je,Ve,Je;return xe.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return ke=this._objectRequestParams("GET","",be),ke.query=we,ke.xmlResponse=!0,ke.successStatuses=[200],We.next=6,this.request(ke);case 6:return Ne=We.sent,je=Ne.data.Contents,Ve=this,je&&(Array.isArray(je)||(je=[je]),je=je.map(function(gt){return{name:gt.Key,url:Ve._objectUrl(gt.Key),lastModified:gt.LastModified,etag:gt.ETag,type:gt.Type,size:Number(gt.Size),storageClass:gt.StorageClass,owner:{id:gt.Owner.ID,displayName:gt.Owner.DisplayName}}})),Je=Ne.data.CommonPrefixes||null,Je&&(Array.isArray(Je)||(Je=[Je]),Je=Je.map(function(gt){return gt.Prefix})),We.abrupt("return",{res:Ne.res,objects:je,prefixes:Je,nextMarker:Ne.data.NextMarker||null,isTruncated:Ne.data.IsTruncated==="true"});case 13:case"end":return We.stop()}},ye,this)}),le.putACL=xe.default.mark(function ye(we,be,ke){var Ne,je;return xe.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return ke=ke||{},ke.subres="acl",ke.headers=ke.headers||{},ke.headers["x-oss-object-acl"]=be,we=this._objectName(we),Ne=this._objectRequestParams("PUT",we,ke),Ne.successStatuses=[200],Ve.next=9,this.request(Ne);case 9:return je=Ve.sent,Ve.abrupt("return",{res:je.res});case 11:case"end":return Ve.stop()}},ye,this)}),le.getACL=xe.default.mark(function ye(we,be){var ke,Ne;return xe.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return be=be||{},be.subres="acl",we=this._objectName(we),ke=this._objectRequestParams("GET",we,be),ke.successStatuses=[200],ke.xmlResponse=!0,je.next=8,this.request(ke);case 8:return Ne=je.sent,je.abrupt("return",{acl:Ne.data.AccessControlList.Grant,owner:{id:Ne.data.Owner.ID,displayName:Ne.data.Owner.DisplayName},res:Ne.res});case 10:case"end":return je.stop()}},ye,this)}),le.restore=xe.default.mark(function ye(we,be){var ke,Ne;return xe.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return be=be||{},be.subres="restore",ke=this._objectRequestParams("POST",we,be),ke.successStatuses=[202],je.next=6,this.request(ke);case 6:return Ne=je.sent,je.abrupt("return",{res:Ne.res});case 8:case"end":return je.stop()}},ye,this)}),le.signatureUrl=function(ye,we){we=we||{},ye=this._objectName(ye),we.method=we.method||"GET";var be=ce.timestamp()+(we.expires||1800),ke={bucket:this.options.bucket,object:ye},Ne=this._getResource(ke);this.options.stsToken&&(we["security-token"]=this.options.stsToken);var je=se._signatureForURL(this.options.accessKeySecret,we,Ne,be),Ve=ue.parse(this._getReqUrl(ke));return Ve.query={OSSAccessKeyId:this.options.accessKeyId,Expires:be,Signature:je.Signature},z(je.subResource).to(Ve.query),Ve.format()},le.getObjectUrl=function(ye,we){return we?we[we.length-1]!=="/"&&(we+="/"):we=this.options.endpoint.format(),we+this._escape(this._objectName(ye))},le._objectUrl=function(ye){return this._getReqUrl({bucket:this.options.bucket,object:ye})},le.generateObjectUrl=function(ye,we){if(we)we[we.length-1]!=="/"&&(we+="/");else{we=this.options.endpoint.format();var be=ue.parse(we),ke=this.options.bucket;be.hostname=ke+"."+be.hostname,be.host=ke+"."+be.host,we=be.format()}return we+this._escape(this._objectName(ye))},le._objectRequestParams=function(ye,we,be){if(!this.options.bucket)throw new Error("Please create a bucket first");be=be||{},we=this._objectName(we);var ke={object:we,bucket:this.options.bucket,method:ye,subres:be&&be.subres,timeout:be&&be.timeout,ctx:be&&be.ctx};return be.headers&&(ke.headers={},z(be.headers).to(ke.headers)),ke},le._objectName=function(ye){return ye.replace(/^\/+/,"")},le._statFile=function(ye){return function(we){ve.stat(ye,we)}},le._convertMetaToHeaders=function(ye,we){ye&&(0,he.default)(ye).forEach(function(be){we["x-oss-meta-"+be]=ye[be]})},le._deleteFileSafe=function(ye){return function(we){ve.exists(ye,function(be){be?ve.unlink(ye,function(ke){ke&&ge("unlink %j error: %s",ye,ke),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,Ie,Te){"use strict";Te.version="5.3.1"},{}],6:[function(me,Ie,Te){"use strict";function Ce(ee){return ee&&ee.__esModule?ee:{default:ee}}function _e(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"||_e(oe.prototype)||_e(ee.prototype))}function Se(ee,oe){var ie=new ee(oe),se=(0,de.default)(ie),le=(0,de.default)((0,ce.default)(ie));se.concat(le).forEach(function(ye){he(ie[ye])?this[ye]=ue.wrap(ie[ye]).bind(ie):this[ye]=ie[ye]},this)}function xe(ee){if(!(this instanceof xe))return new xe(ee);Se.call(this,z,ee)}var ge=me("babel-runtime/core-js/object/get-prototype-of"),ce=Ce(ge),ve=me("babel-runtime/core-js/object/keys"),de=Ce(ve),ue=me("co"),z=me("./client");Ie.exports=xe,xe.STS=function ee(oe){if(!(this instanceof ee))return new ee(oe);Se.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,Ie,Te){(function(Ce){"use strict";function _e(ce){return ce&&ce.__esModule?ce:{default:ce}}var he=me("babel-runtime/core-js/object/keys"),Se=_e(he),xe=me("babel-runtime/core-js/json/stringify"),ge=_e(xe);Te.encodeCallback=function(ce,ve){if(ce.headers=ce.headers||{},!Object.prototype.hasOwnProperty.call(ce.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 ue=new Ce((0,ge.default)(de)).toString("base64");if(ce.headers["x-oss-callback"]=ue,ve.callback.customValue){var z={};(0,Se.default)(ve.callback.customValue).forEach(function(ee){z["x:"+ee]=ve.callback.customValue[ee]}),ce.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,Ie,Te){"use strict";var Ce=me("babel-runtime/regenerator"),_e=function(ge){return ge&&ge.__esModule?ge:{default:ge}}(Ce),he=me("copy-to"),Se=me("./callback"),xe=Te;xe.listUploads=_e.default.mark(function ge(ce,ve){var de,ue,z,ee;return _e.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return ve=ve||{},de={},he(ve).to(de),de.subres="uploads",ue=this._objectRequestParams("GET","",de),ue.query=ce,ue.xmlResponse=!0,ue.successStatuses=[200],oe.next=10,this.request(ue);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=_e.default.mark(function ge(ce,ve,de,ue){var z,ee,oe;return _e.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return ue=ue||{},z={},he(ue).to(z),z.subres={uploadId:ve},ee=this._objectRequestParams("GET",ce,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=_e.default.mark(function ge(ce,ve,de){var ue,z,ee;return _e.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return this.cancel(),de=de||{},ue={},he(de).to(ue),ue.subres={uploadId:ve},z=this._objectRequestParams("DELETE",ce,ue),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=_e.default.mark(function ge(ce,ve){var de,ue,z;return _e.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",ue=this._objectRequestParams("POST",ce,de),ue.mime=ve.mime,ue.xmlResponse=!0,ue.successStatuses=[200],ee.next=12,this.request(ue);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=_e.default.mark(function ge(ce,ve,de,ue,z,ee,oe){var ie;return _e.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return ie={stream:this._createStream(ue,z,ee),size:ee-z},se.next=3,this._uploadPart(ce,ve,de,ie,oe);case 3:return se.abrupt("return",se.sent);case 4:case"end":return se.stop()}},ge,this)}),xe.completeMultipartUpload=_e.default.mark(function ge(ce,ve,de,ue){var z,ee,oe,ie,se,le,ye,we;return _e.default.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:for(z=de.concat().sort(function(ke,Ne){return ke.number-Ne.number}).filter(function(ke,Ne,je){return!Ne||ke.number!==je[Ne-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>",ue=ue||{},se={},he(ue).to(se),se.subres={uploadId:ve},le=this._objectRequestParams("POST",ce,se),Se.encodeCallback(le,se),le.mime="xml",le.content=ee,le.headers&&le.headers["x-oss-callback"]||(le.xmlResponse=!0),le.successStatuses=[200],be.next=16,this.request(le);case 16:return ye=be.sent,we={res:ye.res,bucket:le.bucket,name:ce,etag:ye.res.headers.etag},le.headers&&le.headers["x-oss-callback"]&&(we.data=JSON.parse(ye.data.toString())),be.abrupt("return",we);case 20:case"end":return be.stop()}},ge,this)}),xe._uploadPart=_e.default.mark(function ge(ce,ve,de,ue,z){var ee,oe,ie;return _e.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return z=z||{},ee={},he(z).to(ee),ee.headers={"Content-Length":ue.size},ee.subres={partNumber:de,uploadId:ve},oe=this._objectRequestParams("PUT",ce,ee),oe.mime=ee.mime,oe.stream=ue.stream,oe.successStatuses=[200],se.next=11,this.request(oe);case 11:return ie=se.sent,ue.stream=null,oe.stream=null,se.abrupt("return",{name:ce,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,Ie,Te){(function(Ce){"use strict";function _e(de){return de&&de.__esModule?de:{default:de}}var he=me("babel-runtime/core-js/json/stringify"),Se=_e(he),xe=me("babel-runtime/core-js/object/keys"),ge=_e(xe),ce=me("./../../shims/crypto/crypto.js"),ve=me("is-type-of");Te.buildCanonicalizedResource=function(de,ue){var z=""+de,ee="?";if(ve.string(ue)&&ue.trim()!=="")z+=ee+ue;else if(ve.array(ue))ue.sort(),z+=ee+ue.join("&");else if(ue){var oe=function(se,le){return se[0]>le[0]?1:se[0]<le[0]?-1:0},ie=function(se){z+=ee+se,ue[se]&&(z+="="+ue[se]),ee="&"};(0,ge.default)(ue).sort(oe).forEach(ie)}return z},Te.buildCanonicalString=function(de,ue,z,ee){z=z||{};var oe=z.headers||{},ie=[],se={},le=[de.toUpperCase(),oe["Content-Md5"]||"",oe["Content-Type"]||oe["Content-Type".toLowerCase()],ee||oe["x-oss-date"]];return(0,ge.default)(oe).forEach(function(ye){var we=ye.toLowerCase();we.indexOf("x-oss-")===0&&(se[we]=String(oe[ye]).trim())}),(0,ge.default)(se).sort().forEach(function(ye){ie.push(ye+":"+se[ye])}),le=le.concat(ie),le.push(this.buildCanonicalizedResource(ue,z.parameters)),le.join(`
|
|
|
`)},Te.computeSignature=function(de,ue){return ce.createHmac("sha1",de).update(new Ce(ue,"utf8")).digest("base64")},Te.authorization=function(de,ue,z){return"OSS "+de+":"+this.computeSignature(ue,z)},Te._signatureForURL=function(de,ue,z,ee){var oe={},ie={};if(ue.process&&(ie["x-oss-process"]=ue.process),ue.response&&(0,ge.default)(ue.response).forEach(function(we){var be="response-"+we.toLowerCase();ie[be]=ue.response[we]}),(0,ge.default)(ue).forEach(function(we){var be=we.toLowerCase(),ke=ue[we];be.indexOf("x-oss-")===0?oe[be]=ke:be.indexOf("content-md5")===0||be.indexOf("content-type")===0?oe[we]=ke:be!=="expires"&&be!=="response"&&be!=="process"&&be!=="method"&&(ie[be]=ke)}),Object.prototype.hasOwnProperty.call(ue,"security-token")&&(ie["security-token"]=ue["security-token"]),Object.prototype.hasOwnProperty.call(ue,"callback")){var se={callbackUrl:encodeURI(ue.callback.url),callbackBody:ue.callback.body};if(ue.callback.host&&(se.callbackHost=ue.callback.host),ue.callback.contentType&&(se.callbackBodyType=ue.callback.contentType),ie.callback=new Ce((0,Se.default)(se)).toString("base64"),ue.callback.customValue){var le={};(0,ge.default)(ue.callback.customValue).forEach(function(we){le["x:"+we]=ue.callback.customValue[we]}),ie["callback-var"]=new Ce((0,Se.default)(le)).toString("base64")}}var ye=this.buildCanonicalString(ue.method,z,{headers:oe,parameters:ie},ee.toString());return{Signature:this.computeSignature(de,ye),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,Ie,Te){"use strict";var Ce=me("babel-runtime/regenerator"),_e=function(ce){return ce&&ce.__esModule?ce:{default:ce}}(Ce),he=me("co"),Se=me("co-priority-queue"),xe=me("any-promise"),ge=Te;ge._thunkPool=function(ce,ve){function de(ie,se){++ee===ie.length&&se(oe)}function ue(ie,se){function le(){var je;return _e.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:je=void 0;case 1:if(z.isCancel()){Ve.next=9;break}return Ve.next=4,be.next();case 4:return je=Ve.sent,Ve.next=7,je();case 7:Ve.next=1;break;case 9:ke+=1,ke===ie&&(be.fns=[],be.buffer=[],se(oe));case 11:case"end":return Ve.stop()}},we,this)}function ye(je){console.error(je.stack)}for(var we=_e.default.mark(le),be=new Se,ke=0,Ne=0;Ne<ie;Ne++)he(le).catch(ye);return function(je,Ve){return function(Je){be.push(_e.default.mark(function We(){return _e.default.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.prev=0,gt.t0=Je,gt.next=4,je;case 4:gt.t1=gt.sent,(0,gt.t0)(null,gt.t1),gt.next=11;break;case 8:gt.prev=8,gt.t2=gt.catch(0),Je(gt.t2);case 11:case"end":return gt.stop()}},We,this,[[0,8]])}),Ve)}}}var z=this,ee=0,oe=[];return new xe(function(ie){function se(ke){return _e.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.next=2,we(ce[ke]);case 2:de(ce,ie);case 3:case"end":return Ne.stop()}},ye,this)}function le(ke){oe.push(ke),de(ce,ie)}for(var ye=_e.default.mark(se),we=new ue(ve,ie),be=0;be<ce.length;be++)he(se(be)).catch(le)})},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,Ie,Te){"use strict";Te._isIP=function(Ce){var _e=/^(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 _e.test(Ce)||he.test(Ce)}},{}],12:[function(me,Ie,Te){function Ce(){}Ie.exports=Ce,Ie.exports.HttpsAgent=Ce},{}],13:[function(me,Ie,Te){Ie.exports=me("./register")().Promise},{"./register":15}],14:[function(me,Ie,Te){"use strict";var Ce=null;Ie.exports=function(_e,he){return function(Se,xe){Se=Se||null,xe=xe||{};var ge=xe.global!==!1;if(Ce===null&&ge&&(Ce=_e["@@any-promise/REGISTRATION"]||null),Ce!==null&&Se!==null&&Ce.implementation!==Se)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=Se!==null&&xe.Promise!==void 0?{Promise:xe.Promise,implementation:Se}:he(Se),ge&&(_e["@@any-promise/REGISTRATION"]=Ce)),Ce}}},{}],15:[function(me,Ie,Te){"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"}}Ie.exports=me("./loader")(window,Ce)},{"./loader":14}],16:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(me,Ie,Te){Ie.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,Ie,Te){Ie.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,Ie,Te){Ie.exports={default:me("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(me,Ie,Te){Ie.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,Ie,Te){Ie.exports={default:me("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(me,Ie,Te){Ie.exports={default:me("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(me,Ie,Te){"use strict";Te.__esModule=!0,Te.default=function(Ce,_e){if(!(Ce instanceof _e))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(me,Ie,Te){"use strict";Te.__esModule=!0;var Ce=me("../core-js/object/define-property"),_e=function(he){return he&&he.__esModule?he:{default:he}}(Ce);Te.default=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),(0,_e.default)(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}()},{"../core-js/object/define-property":20}],32:[function(me,Ie,Te){"use strict";function Ce(ce){return ce&&ce.__esModule?ce:{default:ce}}Te.__esModule=!0;var _e=me("../core-js/symbol/iterator"),he=Ce(_e),Se=me("../core-js/symbol"),xe=Ce(Se),ge=typeof xe.default=="function"&&typeof he.default=="symbol"?function(ce){return typeof ce}:function(ce){return ce&&typeof xe.default=="function"&&ce.constructor===xe.default&&ce!==xe.default.prototype?"symbol":typeof ce};Te.default=typeof xe.default=="function"&&ge(he.default)==="symbol"?function(ce){return ce===void 0?"undefined":ge(ce)}:function(ce){return ce&&typeof xe.default=="function"&&ce.constructor===xe.default&&ce!==xe.default.prototype?"symbol":ce===void 0?"undefined":ge(ce)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(me,Ie,Te){Ie.exports=me("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(me,Ie,Te){"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 le=ie.indexOf("=");return le===-1&&(le=se),[le,le===se?0:4-le%4]}function _e(ie){var se=Ce(ie),le=se[0],ye=se[1];return 3*(le+ye)/4-ye}function he(ie,se,le){return 3*(se+le)/4-le}function Se(ie){for(var se,le=Ce(ie),ye=le[0],we=le[1],be=new ue(he(ie,ye,we)),ke=0,Ne=we>0?ye-4:ye,je=0;je<Ne;je+=4)se=de[ie.charCodeAt(je)]<<18|de[ie.charCodeAt(je+1)]<<12|de[ie.charCodeAt(je+2)]<<6|de[ie.charCodeAt(je+3)],be[ke++]=se>>16&255,be[ke++]=se>>8&255,be[ke++]=255&se;return we===2&&(se=de[ie.charCodeAt(je)]<<2|de[ie.charCodeAt(je+1)]>>4,be[ke++]=255&se),we===1&&(se=de[ie.charCodeAt(je)]<<10|de[ie.charCodeAt(je+1)]<<4|de[ie.charCodeAt(je+2)]>>2,be[ke++]=se>>8&255,be[ke++]=255&se),be}function xe(ie){return ve[ie>>18&63]+ve[ie>>12&63]+ve[ie>>6&63]+ve[63&ie]}function ge(ie,se,le){for(var ye,we=[],be=se;be<le;be+=3)ye=(ie[be]<<16&16711680)+(ie[be+1]<<8&65280)+(255&ie[be+2]),we.push(xe(ye));return we.join("")}function ce(ie){for(var se,le=ie.length,ye=le%3,we=[],be=0,ke=le-ye;be<ke;be+=16383)we.push(ge(ie,be,be+16383>ke?ke:be+16383));return ye===1?(se=ie[le-1],we.push(ve[se>>2]+ve[se<<4&63]+"==")):ye===2&&(se=(ie[le-2]<<8)+ie[le-1],we.push(ve[se>>10]+ve[se>>4&63]+ve[se<<2&63]+"=")),we.join("")}Te.byteLength=_e,Te.toByteArray=Se,Te.fromByteArray=ce;for(var ve=[],de=[],ue=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,Ie,Te){(function(Ce,_e,he){Ie!==void 0&&Ie.exports?Ie.exports=he():typeof Le=="function"&&Le.amd?Le("bowser",he):Ce.bowser=he()})(this,0,function(){function Ce(de){function ue(it){var dt=de.match(it);return dt&&dt.length>1&&dt[1]||""}function z(it){var dt=de.match(it);return dt&&dt.length>1&&dt[2]||""}var ee,oe=ue(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(de),se=!ie&&/android/i.test(de),le=/nexus\s*[0-6]\s*/i.test(de),ye=!le&&/nexus\s*[0-9]+/i.test(de),we=/CrOS/.test(de),be=/silk/i.test(de),ke=/sailfish/i.test(de),Ne=/tizen/i.test(de),je=/(web|hpw)os/i.test(de),Ve=/windows phone/i.test(de),Je=(/SamsungBrowser/i.test(de),!Ve&&/windows/i.test(de)),We=!oe&&!be&&/macintosh/i.test(de),gt=!se&&!ke&&!Ne&&!je&&/linux/i.test(de),ut=z(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),bt=ue(/version\/(\d+(\.\d+)?)/i),rt=/tablet/i.test(de)&&!/tablet pc/i.test(de),St=!rt&&/[^-]mobi/i.test(de),ct=/xbox/i.test(de);/opera/i.test(de)?ee={name:"Opera",opera:ce,version:bt||ue(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(de)?ee={name:"Opera",opera:ce,version:ue(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||bt}:/SamsungBrowser/i.test(de)?ee={name:"Samsung Internet for Android",samsungBrowser:ce,version:bt||ue(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(de)?ee={name:"Opera Coast",coast:ce,version:bt||ue(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(de)?ee={name:"Yandex Browser",yandexbrowser:ce,version:bt||ue(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(de)?ee={name:"UC Browser",ucbrowser:ce,version:ue(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(de)?ee={name:"Maxthon",maxthon:ce,version:ue(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(de)?ee={name:"Epiphany",epiphany:ce,version:ue(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(de)?ee={name:"Puffin",puffin:ce,version:ue(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(de)?ee={name:"Sleipnir",sleipnir:ce,version:ue(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(de)?ee={name:"K-Meleon",kMeleon:ce,version:ue(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ve?(ee={name:"Windows Phone",osname:"Windows Phone",windowsphone:ce},ut?(ee.msedge=ce,ee.version=ut):(ee.msie=ce,ee.version=ue(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(de)?ee={name:"Internet Explorer",msie:ce,version:ue(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:we?ee={name:"Chrome",osname:"Chrome OS",chromeos:ce,chromeBook:ce,chrome:ce,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(de)?ee={name:"Microsoft Edge",msedge:ce,version:ut}:/vivaldi/i.test(de)?ee={name:"Vivaldi",vivaldi:ce,version:ue(/vivaldi\/(\d+(\.\d+)?)/i)||bt}:ke?ee={name:"Sailfish",osname:"Sailfish OS",sailfish:ce,version:ue(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(de)?ee={name:"SeaMonkey",seamonkey:ce,version:ue(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(de)?(ee={name:"Firefox",firefox:ce,version:ue(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(de)&&(ee.firefoxos=ce,ee.osname="Firefox OS")):be?ee={name:"Amazon Silk",silk:ce,version:ue(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(de)?ee={name:"PhantomJS",phantom:ce,version:ue(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(de)?ee={name:"SlimerJS",slimer:ce,version:ue(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(de)||/rim\stablet/i.test(de)?ee={name:"BlackBerry",osname:"BlackBerry OS",blackberry:ce,version:bt||ue(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:je?(ee={name:"WebOS",osname:"WebOS",webos:ce,version:bt||ue(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(de)&&(ee.touchpad=ce)):/bada/i.test(de)?ee={name:"Bada",osname:"Bada",bada:ce,version:ue(/dolfin\/(\d+(\.\d+)?)/i)}:Ne?ee={name:"Tizen",osname:"Tizen",tizen:ce,version:ue(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||bt}:/qupzilla/i.test(de)?ee={name:"QupZilla",qupzilla:ce,version:ue(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||bt}:/chromium/i.test(de)?ee={name:"Chromium",chromium:ce,version:ue(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||bt}:/chrome|crios|crmo/i.test(de)?ee={name:"Chrome",chrome:ce,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:se?ee={name:"Android",version:bt}:/safari|applewebkit/i.test(de)?(ee={name:"Safari",safari:ce},bt&&(ee.version=bt)):oe?(ee={name:oe=="iphone"?"iPhone":oe=="ipad"?"iPad":"iPod"},bt&&(ee.version=bt)):ee=/googlebot/i.test(de)?{name:"Googlebot",googlebot:ce,version:ue(/googlebot\/(\d+(\.\d+))/i)||bt}:{name:ue(/^(.*)\/(.*) /),version:z(/^(.*)\/(.*) /)},!ee.msedge&&/(apple)?webkit/i.test(de)?(/(apple)?webkit\/537\.36/i.test(de)?(ee.name=ee.name||"Blink",ee.blink=ce):(ee.name=ee.name||"Webkit",ee.webkit=ce),!ee.version&&bt&&(ee.version=bt)):!ee.opera&&/gecko\//i.test(de)&&(ee.name=ee.name||"Gecko",ee.gecko=ce,ee.version=ee.version||ue(/gecko\/(\d+(\.\d+)?)/i)),ee.windowsphone||!se&&!ee.silk?!ee.windowsphone&&oe?(ee[oe]=ce,ee.ios=ce,ee.osname="iOS"):We?(ee.mac=ce,ee.osname="macOS"):ct?(ee.xbox=ce,ee.osname="Xbox"):Je?(ee.windows=ce,ee.osname="Windows"):gt&&(ee.linux=ce,ee.osname="Linux"):(ee.android=ce,ee.osname="Android");var Bt="";ee.windows?Bt=function(it){switch(it){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}}(ue(/Windows ((NT|XP)( \d\d?.\d)?)/i)):ee.windowsphone?Bt=ue(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):ee.mac?(Bt=ue(/Mac OS X (\d+([_\.\s]\d+)*)/i),Bt=Bt.replace(/[_\s]/g,".")):oe?(Bt=ue(/os (\d+([_\s]\d+)*) like mac os x/i),Bt=Bt.replace(/[_\s]/g,".")):se?Bt=ue(/android[ \/-](\d+(\.\d+)*)/i):ee.webos?Bt=ue(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):ee.blackberry?Bt=ue(/rim\stablet\sos\s(\d+(\.\d+)*)/i):ee.bada?Bt=ue(/bada\/(\d+(\.\d+)*)/i):ee.tizen&&(Bt=ue(/tizen[\/\s](\d+(\.\d+)*)/i)),Bt&&(ee.osversion=Bt);var ht=!ee.windows&&Bt.split(".")[0];return rt||ye||oe=="ipad"||se&&(ht==3||ht>=4&&!St)||ee.silk?ee.tablet=ce:(St||oe=="iphone"||oe=="ipod"||se||le||ee.blackberry||ee.webos||ee.bada)&&(ee.mobile=ce),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=ce: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=ce:ee.x=ce,ee}function _e(de){return de.split(".").length}function he(de,ue){var z,ee=[];if(Array.prototype.map)return Array.prototype.map.call(de,ue);for(z=0;z<de.length;z++)ee.push(ue(de[z]));return ee}function Se(de){for(var ue=Math.max(_e(de[0]),_e(de[1])),z=he(de,function(ee){var oe=ue-_e(ee);return ee+=new Array(oe+1).join(".0"),he(ee.split("."),function(ie){return new Array(20-ie.length).join("0")+ie}).reverse()});--ue>=0;){if(z[0][ue]>z[1][ue])return 1;if(z[0][ue]!==z[1][ue])return-1;if(ue===0)return 0}}function xe(de,ue,z){var ee=ve;typeof ue=="string"&&(z=ue,ue=void 0),ue===void 0&&(ue=!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 Se([oe,de[ie]])<0}return ue}function ge(de,ue,z){return!xe(de,ue,z)}var ce=!0,ve=Ce(typeof navigator!="undefined"&&navigator.userAgent||"");return ve.test=function(de){for(var ue=0;ue<de.length;++ue){var z=de[ue];if(typeof z=="string"&&z in ve)return!0}return!1},ve.isUnsupportedBrowser=xe,ve.compareVersions=Se,ve.check=ge,ve._detect=Ce,ve.detect=Ce,ve})},{}],36:[function(me,Ie,Te){},{}],37:[function(me,Ie,Te){function Ce(ve){if(ve&&!ge(ve))throw new Error("Unknown encoding: "+ve)}function _e(ve){return ve.toString(this.encoding)}function he(ve){this.charReceived=ve.length%2,this.charLength=this.charReceived?2:0}function Se(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}},ce=Te.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=Se;break;default:return void(this.write=_e)}this.charBuffer=new xe(6),this.charReceived=0,this.charLength=0};ce.prototype.write=function(ve){for(var de="";this.charLength;){var ue=ve.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:ve.length;if(ve.copy(this.charBuffer,this.charReceived,0,ue),this.charReceived+=ue,this.charReceived<this.charLength)return"";ve=ve.slice(ue,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},ce.prototype.detectIncompleteChar=function(ve){for(var de=ve.length>=3?3:ve.length;de>0;de--){var ue=ve[ve.length-de];if(de==1&&ue>>5==6){this.charLength=2;break}if(de<=2&&ue>>4==14){this.charLength=3;break}if(de<=3&&ue>>3==30){this.charLength=4;break}}this.charReceived=de},ce.prototype.end=function(ve){var de="";if(ve&&ve.length&&(de=this.write(ve)),this.charReceived){var ue=this.charReceived,z=this.charBuffer,ee=this.encoding;de+=z.slice(0,ue).toString(ee)}return de}},{buffer:38}],38:[function(me,Ie,Te){(function(Ce){"use strict";function _e(){return Se.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function he(Re,Ae){if(_e()<Ae)throw new RangeError("Invalid typed array length");return Se.TYPED_ARRAY_SUPPORT?(Re=new Uint8Array(Ae),Re.__proto__=Se.prototype):(Re===null&&(Re=new Se(Ae)),Re.length=Ae),Re}function Se(Re,Ae,Ge){if(!(Se.TYPED_ARRAY_SUPPORT||this instanceof Se))return new Se(Re,Ae,Ge);if(typeof Re=="number"){if(typeof Ae=="string")throw new Error("If encoding is specified then the first argument must be a string");return ve(this,Re)}return xe(this,Re,Ae,Ge)}function xe(Re,Ae,Ge,Ke){if(typeof Ae=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Ae instanceof ArrayBuffer?z(Re,Ae,Ge,Ke):typeof Ae=="string"?de(Re,Ae,Ge):ee(Re,Ae)}function ge(Re){if(typeof Re!="number")throw new TypeError('"size" argument must be a number');if(Re<0)throw new RangeError('"size" argument must not be negative')}function ce(Re,Ae,Ge,Ke){return ge(Ae),Ae<=0?he(Re,Ae):Ge!==void 0?typeof Ke=="string"?he(Re,Ae).fill(Ge,Ke):he(Re,Ae).fill(Ge):he(Re,Ae)}function ve(Re,Ae){if(ge(Ae),Re=he(Re,Ae<0?0:0|oe(Ae)),!Se.TYPED_ARRAY_SUPPORT)for(var Ge=0;Ge<Ae;++Ge)Re[Ge]=0;return Re}function de(Re,Ae,Ge){if(typeof Ge=="string"&&Ge!==""||(Ge="utf8"),!Se.isEncoding(Ge))throw new TypeError('"encoding" must be a valid string encoding');var Ke=0|se(Ae,Ge);Re=he(Re,Ke);var Ze=Re.write(Ae,Ge);return Ze!==Ke&&(Re=Re.slice(0,Ze)),Re}function ue(Re,Ae){var Ge=Ae.length<0?0:0|oe(Ae.length);Re=he(Re,Ge);for(var Ke=0;Ke<Ge;Ke+=1)Re[Ke]=255&Ae[Ke];return Re}function z(Re,Ae,Ge,Ke){if(Ae.byteLength,Ge<0||Ae.byteLength<Ge)throw new RangeError("'offset' is out of bounds");if(Ae.byteLength<Ge+(Ke||0))throw new RangeError("'length' is out of bounds");return Ae=Ge===void 0&&Ke===void 0?new Uint8Array(Ae):Ke===void 0?new Uint8Array(Ae,Ge):new Uint8Array(Ae,Ge,Ke),Se.TYPED_ARRAY_SUPPORT?(Re=Ae,Re.__proto__=Se.prototype):Re=ue(Re,Ae),Re}function ee(Re,Ae){if(Se.isBuffer(Ae)){var Ge=0|oe(Ae.length);return Re=he(Re,Ge),Re.length===0||Ae.copy(Re,0,0,Ge),Re}if(Ae){if(typeof ArrayBuffer!="undefined"&&Ae.buffer instanceof ArrayBuffer||"length"in Ae)return typeof Ae.length!="number"||ze(Ae.length)?he(Re,0):ue(Re,Ae);if(Ae.type==="Buffer"&&Qe(Ae.data))return ue(Re,Ae.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(Re){if(Re>=_e())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_e().toString(16)+" bytes");return 0|Re}function ie(Re){return+Re!=Re&&(Re=0),Se.alloc(+Re)}function se(Re,Ae){if(Se.isBuffer(Re))return Re.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Re)||Re instanceof ArrayBuffer))return Re.byteLength;typeof Re!="string"&&(Re=""+Re);var Ge=Re.length;if(Ge===0)return 0;for(var Ke=!1;;)switch(Ae){case"ascii":case"latin1":case"binary":return Ge;case"utf8":case"utf-8":case void 0:return xn(Re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ge;case"hex":return Ge>>>1;case"base64":return Xt(Re).length;default:if(Ke)return xn(Re).length;Ae=(""+Ae).toLowerCase(),Ke=!0}}function le(Re,Ae,Ge){var Ke=!1;if((Ae===void 0||Ae<0)&&(Ae=0),Ae>this.length||((Ge===void 0||Ge>this.length)&&(Ge=this.length),Ge<=0)||(Ge>>>=0,Ae>>>=0,Ge<=Ae))return"";for(Re||(Re="utf8");;)switch(Re){case"hex":return ct(this,Ae,Ge);case"utf8":case"utf-8":return ut(this,Ae,Ge);case"ascii":return rt(this,Ae,Ge);case"latin1":case"binary":return St(this,Ae,Ge);case"base64":return gt(this,Ae,Ge);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,Ae,Ge);default:if(Ke)throw new TypeError("Unknown encoding: "+Re);Re=(Re+"").toLowerCase(),Ke=!0}}function ye(Re,Ae,Ge){var Ke=Re[Ae];Re[Ae]=Re[Ge],Re[Ge]=Ke}function we(Re,Ae,Ge,Ke,Ze){if(Re.length===0)return-1;if(typeof Ge=="string"?(Ke=Ge,Ge=0):Ge>2147483647?Ge=2147483647:Ge<-2147483648&&(Ge=-2147483648),Ge=+Ge,isNaN(Ge)&&(Ge=Ze?0:Re.length-1),Ge<0&&(Ge=Re.length+Ge),Ge>=Re.length){if(Ze)return-1;Ge=Re.length-1}else if(Ge<0){if(!Ze)return-1;Ge=0}if(typeof Ae=="string"&&(Ae=Se.from(Ae,Ke)),Se.isBuffer(Ae))return Ae.length===0?-1:be(Re,Ae,Ge,Ke,Ze);if(typeof Ae=="number")return Ae&=255,Se.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ze?Uint8Array.prototype.indexOf.call(Re,Ae,Ge):Uint8Array.prototype.lastIndexOf.call(Re,Ae,Ge):be(Re,[Ae],Ge,Ke,Ze);throw new TypeError("val must be string, number or Buffer")}function be(Re,Ae,Ge,Ke,Ze){function at(Mn,Zn){return xt===1?Mn[Zn]:Mn.readUInt16BE(Zn*xt)}var xt=1,tn=Re.length,nn=Ae.length;if(Ke!==void 0&&((Ke=String(Ke).toLowerCase())==="ucs2"||Ke==="ucs-2"||Ke==="utf16le"||Ke==="utf-16le")){if(Re.length<2||Ae.length<2)return-1;xt=2,tn/=2,nn/=2,Ge/=2}var Jt;if(Ze){var mn=-1;for(Jt=Ge;Jt<tn;Jt++)if(at(Re,Jt)===at(Ae,mn===-1?0:Jt-mn)){if(mn===-1&&(mn=Jt),Jt-mn+1===nn)return mn*xt}else mn!==-1&&(Jt-=Jt-mn),mn=-1}else for(Ge+nn>tn&&(Ge=tn-nn),Jt=Ge;Jt>=0;Jt--){for(var kn=!0,fn=0;fn<nn;fn++)if(at(Re,Jt+fn)!==at(Ae,fn)){kn=!1;break}if(kn)return Jt}return-1}function ke(Re,Ae,Ge,Ke){Ge=Number(Ge)||0;var Ze=Re.length-Ge;Ke?(Ke=Number(Ke))>Ze&&(Ke=Ze):Ke=Ze;var at=Ae.length;if(at%2!=0)throw new TypeError("Invalid hex string");Ke>at/2&&(Ke=at/2);for(var xt=0;xt<Ke;++xt){var tn=parseInt(Ae.substr(2*xt,2),16);if(isNaN(tn))return xt;Re[Ge+xt]=tn}return xt}function Ne(Re,Ae,Ge,Ke){return mt(xn(Ae,Re.length-Ge),Re,Ge,Ke)}function je(Re,Ae,Ge,Ke){return mt(Ut(Ae),Re,Ge,Ke)}function Ve(Re,Ae,Ge,Ke){return je(Re,Ae,Ge,Ke)}function Je(Re,Ae,Ge,Ke){return mt(Xt(Ae),Re,Ge,Ke)}function We(Re,Ae,Ge,Ke){return mt(Zt(Ae,Re.length-Ge),Re,Ge,Ke)}function gt(Re,Ae,Ge){return Ae===0&&Ge===Re.length?Be.fromByteArray(Re):Be.fromByteArray(Re.slice(Ae,Ge))}function ut(Re,Ae,Ge){Ge=Math.min(Re.length,Ge);for(var Ke=[],Ze=Ae;Ze<Ge;){var at=Re[Ze],xt=null,tn=at>239?4:at>223?3:at>191?2:1;if(Ze+tn<=Ge){var nn,Jt,mn,kn;switch(tn){case 1:at<128&&(xt=at);break;case 2:nn=Re[Ze+1],(192&nn)==128&&(kn=(31&at)<<6|63&nn)>127&&(xt=kn);break;case 3:nn=Re[Ze+1],Jt=Re[Ze+2],(192&nn)==128&&(192&Jt)==128&&(kn=(15&at)<<12|(63&nn)<<6|63&Jt)>2047&&(kn<55296||kn>57343)&&(xt=kn);break;case 4:nn=Re[Ze+1],Jt=Re[Ze+2],mn=Re[Ze+3],(192&nn)==128&&(192&Jt)==128&&(192&mn)==128&&(kn=(15&at)<<18|(63&nn)<<12|(63&Jt)<<6|63&mn)>65535&&kn<1114112&&(xt=kn)}}xt===null?(xt=65533,tn=1):xt>65535&&(xt-=65536,Ke.push(xt>>>10&1023|55296),xt=56320|1023&xt),Ke.push(xt),Ze+=tn}return bt(Ke)}function bt(Re){var Ae=Re.length;if(Ae<=Ue)return String.fromCharCode.apply(String,Re);for(var Ge="",Ke=0;Ke<Ae;)Ge+=String.fromCharCode.apply(String,Re.slice(Ke,Ke+=Ue));return Ge}function rt(Re,Ae,Ge){var Ke="";Ge=Math.min(Re.length,Ge);for(var Ze=Ae;Ze<Ge;++Ze)Ke+=String.fromCharCode(127&Re[Ze]);return Ke}function St(Re,Ae,Ge){var Ke="";Ge=Math.min(Re.length,Ge);for(var Ze=Ae;Ze<Ge;++Ze)Ke+=String.fromCharCode(Re[Ze]);return Ke}function ct(Re,Ae,Ge){var Ke=Re.length;(!Ae||Ae<0)&&(Ae=0),(!Ge||Ge<0||Ge>Ke)&&(Ge=Ke);for(var Ze="",at=Ae;at<Ge;++at)Ze+=Vt(Re[at]);return Ze}function Bt(Re,Ae,Ge){for(var Ke=Re.slice(Ae,Ge),Ze="",at=0;at<Ke.length;at+=2)Ze+=String.fromCharCode(Ke[at]+256*Ke[at+1]);return Ze}function ht(Re,Ae,Ge){if(Re%1!=0||Re<0)throw new RangeError("offset is not uint");if(Re+Ae>Ge)throw new RangeError("Trying to access beyond buffer length")}function it(Re,Ae,Ge,Ke,Ze,at){if(!Se.isBuffer(Re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ae>Ze||Ae<at)throw new RangeError('"value" argument is out of bounds');if(Ge+Ke>Re.length)throw new RangeError("Index out of range")}function dt(Re,Ae,Ge,Ke){Ae<0&&(Ae=65535+Ae+1);for(var Ze=0,at=Math.min(Re.length-Ge,2);Ze<at;++Ze)Re[Ge+Ze]=(Ae&255<<8*(Ke?Ze:1-Ze))>>>8*(Ke?Ze:1-Ze)}function yt(Re,Ae,Ge,Ke){Ae<0&&(Ae=4294967295+Ae+1);for(var Ze=0,at=Math.min(Re.length-Ge,4);Ze<at;++Ze)Re[Ge+Ze]=Ae>>>8*(Ke?Ze:3-Ze)&255}function Et(Re,Ae,Ge,Ke,Ze,at){if(Ge+Ke>Re.length)throw new RangeError("Index out of range");if(Ge<0)throw new RangeError("Index out of range")}function vt(Re,Ae,Ge,Ke,Ze){return Ze||Et(Re,Ae,Ge,4,34028234663852886e22,-34028234663852886e22),qe.write(Re,Ae,Ge,Ke,23,4),Ge+4}function Rt(Re,Ae,Ge,Ke,Ze){return Ze||Et(Re,Ae,Ge,8,17976931348623157e292,-17976931348623157e292),qe.write(Re,Ae,Ge,Ke,52,8),Ge+8}function jt(Re){if(Re=un(Re).replace(Xe,""),Re.length<2)return"";for(;Re.length%4!=0;)Re+="=";return Re}function un(Re){return Re.trim?Re.trim():Re.replace(/^\s+|\s+$/g,"")}function Vt(Re){return Re<16?"0"+Re.toString(16):Re.toString(16)}function xn(Re,Ae){Ae=Ae||1/0;for(var Ge,Ke=Re.length,Ze=null,at=[],xt=0;xt<Ke;++xt){if((Ge=Re.charCodeAt(xt))>55295&&Ge<57344){if(!Ze){if(Ge>56319){(Ae-=3)>-1&&at.push(239,191,189);continue}if(xt+1===Ke){(Ae-=3)>-1&&at.push(239,191,189);continue}Ze=Ge;continue}if(Ge<56320){(Ae-=3)>-1&&at.push(239,191,189),Ze=Ge;continue}Ge=65536+(Ze-55296<<10|Ge-56320)}else Ze&&(Ae-=3)>-1&&at.push(239,191,189);if(Ze=null,Ge<128){if((Ae-=1)<0)break;at.push(Ge)}else if(Ge<2048){if((Ae-=2)<0)break;at.push(Ge>>6|192,63&Ge|128)}else if(Ge<65536){if((Ae-=3)<0)break;at.push(Ge>>12|224,Ge>>6&63|128,63&Ge|128)}else{if(!(Ge<1114112))throw new Error("Invalid code point");if((Ae-=4)<0)break;at.push(Ge>>18|240,Ge>>12&63|128,Ge>>6&63|128,63&Ge|128)}}return at}function Ut(Re){for(var Ae=[],Ge=0;Ge<Re.length;++Ge)Ae.push(255&Re.charCodeAt(Ge));return Ae}function Zt(Re,Ae){for(var Ge,Ke,Ze,at=[],xt=0;xt<Re.length&&!((Ae-=2)<0);++xt)Ge=Re.charCodeAt(xt),Ke=Ge>>8,Ze=Ge%256,at.push(Ze),at.push(Ke);return at}function Xt(Re){return Be.toByteArray(jt(Re))}function mt(Re,Ae,Ge,Ke){for(var Ze=0;Ze<Ke&&!(Ze+Ge>=Ae.length||Ze>=Re.length);++Ze)Ae[Ze+Ge]=Re[Ze];return Ze}function ze(Re){return Re!==Re}var Be=me("base64-js"),qe=me("ieee754"),Qe=me("isarray");Te.Buffer=Se,Te.SlowBuffer=ie,Te.INSPECT_MAX_BYTES=50,Se.TYPED_ARRAY_SUPPORT=Ce.TYPED_ARRAY_SUPPORT!==void 0?Ce.TYPED_ARRAY_SUPPORT:function(){try{var Re=new Uint8Array(1);return Re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Re.foo()===42&&typeof Re.subarray=="function"&&Re.subarray(1,1).byteLength===0}catch(Ae){return!1}}(),Te.kMaxLength=_e(),Se.poolSize=8192,Se._augment=function(Re){return Re.__proto__=Se.prototype,Re},Se.from=function(Re,Ae,Ge){return xe(null,Re,Ae,Ge)},Se.TYPED_ARRAY_SUPPORT&&(Se.prototype.__proto__=Uint8Array.prototype,Se.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&Se[Symbol.species]===Se&&Object.defineProperty(Se,Symbol.species,{value:null,configurable:!0})),Se.alloc=function(Re,Ae,Ge){return ce(null,Re,Ae,Ge)},Se.allocUnsafe=function(Re){return ve(null,Re)},Se.allocUnsafeSlow=function(Re){return ve(null,Re)},Se.isBuffer=function(Re){return!(Re==null||!Re._isBuffer)},Se.compare=function(Re,Ae){if(!Se.isBuffer(Re)||!Se.isBuffer(Ae))throw new TypeError("Arguments must be Buffers");if(Re===Ae)return 0;for(var Ge=Re.length,Ke=Ae.length,Ze=0,at=Math.min(Ge,Ke);Ze<at;++Ze)if(Re[Ze]!==Ae[Ze]){Ge=Re[Ze],Ke=Ae[Ze];break}return Ge<Ke?-1:Ke<Ge?1:0},Se.isEncoding=function(Re){switch(String(Re).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}},Se.concat=function(Re,Ae){if(!Qe(Re))throw new TypeError('"list" argument must be an Array of Buffers');if(Re.length===0)return Se.alloc(0);var Ge;if(Ae===void 0)for(Ae=0,Ge=0;Ge<Re.length;++Ge)Ae+=Re[Ge].length;var Ke=Se.allocUnsafe(Ae),Ze=0;for(Ge=0;Ge<Re.length;++Ge){var at=Re[Ge];if(!Se.isBuffer(at))throw new TypeError('"list" argument must be an Array of Buffers');at.copy(Ke,Ze),Ze+=at.length}return Ke},Se.byteLength=se,Se.prototype._isBuffer=!0,Se.prototype.swap16=function(){var Re=this.length;if(Re%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ae=0;Ae<Re;Ae+=2)ye(this,Ae,Ae+1);return this},Se.prototype.swap32=function(){var Re=this.length;if(Re%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ae=0;Ae<Re;Ae+=4)ye(this,Ae,Ae+3),ye(this,Ae+1,Ae+2);return this},Se.prototype.swap64=function(){var Re=this.length;if(Re%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ae=0;Ae<Re;Ae+=8)ye(this,Ae,Ae+7),ye(this,Ae+1,Ae+6),ye(this,Ae+2,Ae+5),ye(this,Ae+3,Ae+4);return this},Se.prototype.toString=function(){var Re=0|this.length;return Re===0?"":arguments.length===0?ut(this,0,Re):le.apply(this,arguments)},Se.prototype.equals=function(Re){if(!Se.isBuffer(Re))throw new TypeError("Argument must be a Buffer");return this===Re||Se.compare(this,Re)===0},Se.prototype.inspect=function(){var Re="",Ae=Te.INSPECT_MAX_BYTES;return this.length>0&&(Re=this.toString("hex",0,Ae).match(/.{2}/g).join(" "),this.length>Ae&&(Re+=" ... ")),"<Buffer "+Re+">"},Se.prototype.compare=function(Re,Ae,Ge,Ke,Ze){if(!Se.isBuffer(Re))throw new TypeError("Argument must be a Buffer");if(Ae===void 0&&(Ae=0),Ge===void 0&&(Ge=Re?Re.length:0),Ke===void 0&&(Ke=0),Ze===void 0&&(Ze=this.length),Ae<0||Ge>Re.length||Ke<0||Ze>this.length)throw new RangeError("out of range index");if(Ke>=Ze&&Ae>=Ge)return 0;if(Ke>=Ze)return-1;if(Ae>=Ge)return 1;if(Ae>>>=0,Ge>>>=0,Ke>>>=0,Ze>>>=0,this===Re)return 0;for(var at=Ze-Ke,xt=Ge-Ae,tn=Math.min(at,xt),nn=this.slice(Ke,Ze),Jt=Re.slice(Ae,Ge),mn=0;mn<tn;++mn)if(nn[mn]!==Jt[mn]){at=nn[mn],xt=Jt[mn];break}return at<xt?-1:xt<at?1:0},Se.prototype.includes=function(Re,Ae,Ge){return this.indexOf(Re,Ae,Ge)!==-1},Se.prototype.indexOf=function(Re,Ae,Ge){return we(this,Re,Ae,Ge,!0)},Se.prototype.lastIndexOf=function(Re,Ae,Ge){return we(this,Re,Ae,Ge,!1)},Se.prototype.write=function(Re,Ae,Ge,Ke){if(Ae===void 0)Ke="utf8",Ge=this.length,Ae=0;else if(Ge===void 0&&typeof Ae=="string")Ke=Ae,Ge=this.length,Ae=0;else{if(!isFinite(Ae))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Ae|=0,isFinite(Ge)?(Ge|=0,Ke===void 0&&(Ke="utf8")):(Ke=Ge,Ge=void 0)}var Ze=this.length-Ae;if((Ge===void 0||Ge>Ze)&&(Ge=Ze),Re.length>0&&(Ge<0||Ae<0)||Ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ke||(Ke="utf8");for(var at=!1;;)switch(Ke){case"hex":return ke(this,Re,Ae,Ge);case"utf8":case"utf-8":return Ne(this,Re,Ae,Ge);case"ascii":return je(this,Re,Ae,Ge);case"latin1":case"binary":return Ve(this,Re,Ae,Ge);case"base64":return Je(this,Re,Ae,Ge);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return We(this,Re,Ae,Ge);default:if(at)throw new TypeError("Unknown encoding: "+Ke);Ke=(""+Ke).toLowerCase(),at=!0}},Se.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ue=4096;Se.prototype.slice=function(Re,Ae){var Ge=this.length;Re=~~Re,Ae=Ae===void 0?Ge:~~Ae,Re<0?(Re+=Ge)<0&&(Re=0):Re>Ge&&(Re=Ge),Ae<0?(Ae+=Ge)<0&&(Ae=0):Ae>Ge&&(Ae=Ge),Ae<Re&&(Ae=Re);var Ke;if(Se.TYPED_ARRAY_SUPPORT)Ke=this.subarray(Re,Ae),Ke.__proto__=Se.prototype;else{var Ze=Ae-Re;Ke=new Se(Ze,void 0);for(var at=0;at<Ze;++at)Ke[at]=this[at+Re]}return Ke},Se.prototype.readUIntLE=function(Re,Ae,Ge){Re|=0,Ae|=0,Ge||ht(Re,Ae,this.length);for(var Ke=this[Re],Ze=1,at=0;++at<Ae&&(Ze*=256);)Ke+=this[Re+at]*Ze;return Ke},Se.prototype.readUIntBE=function(Re,Ae,Ge){Re|=0,Ae|=0,Ge||ht(Re,Ae,this.length);for(var Ke=this[Re+--Ae],Ze=1;Ae>0&&(Ze*=256);)Ke+=this[Re+--Ae]*Ze;return Ke},Se.prototype.readUInt8=function(Re,Ae){return Ae||ht(Re,1,this.length),this[Re]},Se.prototype.readUInt16LE=function(Re,Ae){return Ae||ht(Re,2,this.length),this[Re]|this[Re+1]<<8},Se.prototype.readUInt16BE=function(Re,Ae){return Ae||ht(Re,2,this.length),this[Re]<<8|this[Re+1]},Se.prototype.readUInt32LE=function(Re,Ae){return Ae||ht(Re,4,this.length),(this[Re]|this[Re+1]<<8|this[Re+2]<<16)+16777216*this[Re+3]},Se.prototype.readUInt32BE=function(Re,Ae){return Ae||ht(Re,4,this.length),16777216*this[Re]+(this[Re+1]<<16|this[Re+2]<<8|this[Re+3])},Se.prototype.readIntLE=function(Re,Ae,Ge){Re|=0,Ae|=0,Ge||ht(Re,Ae,this.length);for(var Ke=this[Re],Ze=1,at=0;++at<Ae&&(Ze*=256);)Ke+=this[Re+at]*Ze;return Ze*=128,Ke>=Ze&&(Ke-=Math.pow(2,8*Ae)),Ke},Se.prototype.readIntBE=function(Re,Ae,Ge){Re|=0,Ae|=0,Ge||ht(Re,Ae,this.length);for(var Ke=Ae,Ze=1,at=this[Re+--Ke];Ke>0&&(Ze*=256);)at+=this[Re+--Ke]*Ze;return Ze*=128,at>=Ze&&(at-=Math.pow(2,8*Ae)),at},Se.prototype.readInt8=function(Re,Ae){return Ae||ht(Re,1,this.length),128&this[Re]?-1*(255-this[Re]+1):this[Re]},Se.prototype.readInt16LE=function(Re,Ae){Ae||ht(Re,2,this.length);var Ge=this[Re]|this[Re+1]<<8;return 32768&Ge?4294901760|Ge:Ge},Se.prototype.readInt16BE=function(Re,Ae){Ae||ht(Re,2,this.length);var Ge=this[Re+1]|this[Re]<<8;return 32768&Ge?4294901760|Ge:Ge},Se.prototype.readInt32LE=function(Re,Ae){return Ae||ht(Re,4,this.length),this[Re]|this[Re+1]<<8|this[Re+2]<<16|this[Re+3]<<24},Se.prototype.readInt32BE=function(Re,Ae){return Ae||ht(Re,4,this.length),this[Re]<<24|this[Re+1]<<16|this[Re+2]<<8|this[Re+3]},Se.prototype.readFloatLE=function(Re,Ae){return Ae||ht(Re,4,this.length),qe.read(this,Re,!0,23,4)},Se.prototype.readFloatBE=function(Re,Ae){return Ae||ht(Re,4,this.length),qe.read(this,Re,!1,23,4)},Se.prototype.readDoubleLE=function(Re,Ae){return Ae||ht(Re,8,this.length),qe.read(this,Re,!0,52,8)},Se.prototype.readDoubleBE=function(Re,Ae){return Ae||ht(Re,8,this.length),qe.read(this,Re,!1,52,8)},Se.prototype.writeUIntLE=function(Re,Ae,Ge,Ke){Re=+Re,Ae|=0,Ge|=0,!Ke&&it(this,Re,Ae,Ge,Math.pow(2,8*Ge)-1,0);var Ze=1,at=0;for(this[Ae]=255ℜ++at<Ge&&(Ze*=256);)this[Ae+at]=Re/Ze&255;return Ae+Ge},Se.prototype.writeUIntBE=function(Re,Ae,Ge,Ke){Re=+Re,Ae|=0,Ge|=0,!Ke&&it(this,Re,Ae,Ge,Math.pow(2,8*Ge)-1,0);var Ze=Ge-1,at=1;for(this[Ae+Ze]=255ℜ--Ze>=0&&(at*=256);)this[Ae+Ze]=Re/at&255;return Ae+Ge},Se.prototype.writeUInt8=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||it(this,Re,Ae,1,255,0),Se.TYPED_ARRAY_SUPPORT||(Re=Math.floor(Re)),this[Ae]=255&Re,Ae+1},Se.prototype.writeUInt16LE=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||it(this,Re,Ae,2,65535,0),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=255&Re,this[Ae+1]=Re>>>8):dt(this,Re,Ae,!0),Ae+2},Se.prototype.writeUInt16BE=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||it(this,Re,Ae,2,65535,0),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=Re>>>8,this[Ae+1]=255&Re):dt(this,Re,Ae,!1),Ae+2},Se.prototype.writeUInt32LE=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||it(this,Re,Ae,4,4294967295,0),Se.TYPED_ARRAY_SUPPORT?(this[Ae+3]=Re>>>24,this[Ae+2]=Re>>>16,this[Ae+1]=Re>>>8,this[Ae]=255&Re):yt(this,Re,Ae,!0),Ae+4},Se.prototype.writeUInt32BE=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||it(this,Re,Ae,4,4294967295,0),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=Re>>>24,this[Ae+1]=Re>>>16,this[Ae+2]=Re>>>8,this[Ae+3]=255&Re):yt(this,Re,Ae,!1),Ae+4},Se.prototype.writeIntLE=function(Re,Ae,Ge,Ke){if(Re=+Re,Ae|=0,!Ke){var Ze=Math.pow(2,8*Ge-1);it(this,Re,Ae,Ge,Ze-1,-Ze)}var at=0,xt=1,tn=0;for(this[Ae]=255ℜ++at<Ge&&(xt*=256);)Re<0&&tn===0&&this[Ae+at-1]!==0&&(tn=1),this[Ae+at]=(Re/xt>>0)-tn&255;return Ae+Ge},Se.prototype.writeIntBE=function(Re,Ae,Ge,Ke){if(Re=+Re,Ae|=0,!Ke){var Ze=Math.pow(2,8*Ge-1);it(this,Re,Ae,Ge,Ze-1,-Ze)}var at=Ge-1,xt=1,tn=0;for(this[Ae+at]=255ℜ--at>=0&&(xt*=256);)Re<0&&tn===0&&this[Ae+at+1]!==0&&(tn=1),this[Ae+at]=(Re/xt>>0)-tn&255;return Ae+Ge},Se.prototype.writeInt8=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||it(this,Re,Ae,1,127,-128),Se.TYPED_ARRAY_SUPPORT||(Re=Math.floor(Re)),Re<0&&(Re=255+Re+1),this[Ae]=255&Re,Ae+1},Se.prototype.writeInt16LE=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||it(this,Re,Ae,2,32767,-32768),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=255&Re,this[Ae+1]=Re>>>8):dt(this,Re,Ae,!0),Ae+2},Se.prototype.writeInt16BE=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||it(this,Re,Ae,2,32767,-32768),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=Re>>>8,this[Ae+1]=255&Re):dt(this,Re,Ae,!1),Ae+2},Se.prototype.writeInt32LE=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||it(this,Re,Ae,4,2147483647,-2147483648),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=255&Re,this[Ae+1]=Re>>>8,this[Ae+2]=Re>>>16,this[Ae+3]=Re>>>24):yt(this,Re,Ae,!0),Ae+4},Se.prototype.writeInt32BE=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||it(this,Re,Ae,4,2147483647,-2147483648),Re<0&&(Re=4294967295+Re+1),Se.TYPED_ARRAY_SUPPORT?(this[Ae]=Re>>>24,this[Ae+1]=Re>>>16,this[Ae+2]=Re>>>8,this[Ae+3]=255&Re):yt(this,Re,Ae,!1),Ae+4},Se.prototype.writeFloatLE=function(Re,Ae,Ge){return vt(this,Re,Ae,!0,Ge)},Se.prototype.writeFloatBE=function(Re,Ae,Ge){return vt(this,Re,Ae,!1,Ge)},Se.prototype.writeDoubleLE=function(Re,Ae,Ge){return Rt(this,Re,Ae,!0,Ge)},Se.prototype.writeDoubleBE=function(Re,Ae,Ge){return Rt(this,Re,Ae,!1,Ge)},Se.prototype.copy=function(Re,Ae,Ge,Ke){if(Ge||(Ge=0),Ke||Ke===0||(Ke=this.length),Ae>=Re.length&&(Ae=Re.length),Ae||(Ae=0),Ke>0&&Ke<Ge&&(Ke=Ge),Ke===Ge||Re.length===0||this.length===0)return 0;if(Ae<0)throw new RangeError("targetStart out of bounds");if(Ge<0||Ge>=this.length)throw new RangeError("sourceStart out of bounds");if(Ke<0)throw new RangeError("sourceEnd out of bounds");Ke>this.length&&(Ke=this.length),Re.length-Ae<Ke-Ge&&(Ke=Re.length-Ae+Ge);var Ze,at=Ke-Ge;if(this===Re&&Ge<Ae&&Ae<Ke)for(Ze=at-1;Ze>=0;--Ze)Re[Ze+Ae]=this[Ze+Ge];else if(at<1e3||!Se.TYPED_ARRAY_SUPPORT)for(Ze=0;Ze<at;++Ze)Re[Ze+Ae]=this[Ze+Ge];else Uint8Array.prototype.set.call(Re,this.subarray(Ge,Ge+at),Ae);return at},Se.prototype.fill=function(Re,Ae,Ge,Ke){if(typeof Re=="string"){if(typeof Ae=="string"?(Ke=Ae,Ae=0,Ge=this.length):typeof Ge=="string"&&(Ke=Ge,Ge=this.length),Re.length===1){var Ze=Re.charCodeAt(0);Ze<256&&(Re=Ze)}if(Ke!==void 0&&typeof Ke!="string")throw new TypeError("encoding must be a string");if(typeof Ke=="string"&&!Se.isEncoding(Ke))throw new TypeError("Unknown encoding: "+Ke)}else typeof Re=="number"&&(Re&=255);if(Ae<0||this.length<Ae||this.length<Ge)throw new RangeError("Out of range index");if(Ge<=Ae)return this;Ae>>>=0,Ge=Ge===void 0?this.length:Ge>>>0,Re||(Re=0);var at;if(typeof Re=="number")for(at=Ae;at<Ge;++at)this[at]=Re;else{var xt=Se.isBuffer(Re)?Re:xn(new Se(Re,Ke).toString()),tn=xt.length;for(at=0;at<Ge-Ae;++at)this[at+Ae]=xt[at%tn]}return this};var Xe=/[^+\/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,Ie,Te){Ie.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,Ie,Te){"use strict";var Ce=function(){this.buffer=[],this.fns=[]};Ce.prototype.push=function(he,Se){if(this.fns.length)return this.fns.shift()(null,he);var xe={data:he,priority:Se},ge=_e(this.buffer,xe,function(ce){return ce.priority});this.buffer.splice(ge,0,xe)},Ce.prototype.next=function(){var he=this;return function(Se){if(he.buffer.length)return Se(null,he.buffer.pop().data);he.fns.push(Se)}};var _e=function(he,Se,xe){Se=xe(Se);for(var ge=0,ce=he?he.length:ge;ge<ce;){var ve=ge+ce>>>1;xe(he[ve])<Se?ge=ve+1:ce=ve}return ge};Ie.exports=Ce},{}],41:[function(me,Ie,Te){function Ce(z){var ee=this,oe=ue.call(arguments,1);return new Promise(function(ie,se){function le(be){var ke;try{ke=z.next(be)}catch(Ne){return se(Ne)}we(ke)}function ye(be){var ke;try{ke=z.throw(be)}catch(Ne){return se(Ne)}we(ke)}function we(be){if(be.done)return ie(be.value);var ke=_e.call(ee,be.value);return ke&&ge(ke)?ke.then(le,ye):ye(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(be.value)+'"'))}if(typeof z=="function"&&(z=z.apply(ee,oe)),!z||typeof z.next!="function")return ie(z);le()})}function _e(z){return z&&(ge(z)?z:ve(z)||ce(z)?Ce.call(this,z):typeof z=="function"?he.call(this,z):Array.isArray(z)?Se.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,le){if(se)return ie(se);arguments.length>2&&(le=ue.call(arguments,1)),oe(le)})})}function Se(z){return Promise.all(z.map(_e,this))}function xe(z){for(var ee=new z.constructor,oe=Object.keys(z),ie=[],se=0;se<oe.length;se++){var le=oe[se],ye=_e.call(this,z[le]);ye&&ge(ye)?function(we,be){ee[be]=void 0,ie.push(we.then(function(ke){ee[be]=ke}))}(ye,le):ee[le]=z[le]}return Promise.all(ie).then(function(){return ee})}function ge(z){return typeof z.then=="function"}function ce(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"||ce(ee.prototype))}function de(z){return Object==z.constructor}var ue=Array.prototype.slice;Ie.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,Ie,Te){Ie.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,Ie,Te){"use strict";function Ce(Se,xe){if(!(this instanceof Ce))return new Ce(Se,xe);this.src=Se,this._withAccess=xe}function _e(Se,xe){return Se[xe]===void 0&&Se.__lookupGetter__(xe)===void 0&&Se.__lookupSetter__(xe)===void 0}var he=Array.prototype.slice;Ie.exports=Ce,Ce.prototype.withAccess=function(Se){return this._withAccess=Se!==!1,this},Ce.prototype.pick=function(Se){return Array.isArray(Se)||(Se=he.call(arguments)),Se.length&&(this.keys=Se),this},Ce.prototype.to=function(Se){if(Se=Se||{},!this.src)return Se;var xe=this.keys||Object.keys(this.src);if(!this._withAccess){for(var ge=0;ge<xe.length;ge++)ce=xe[ge],Se[ce]===void 0&&(Se[ce]=this.src[ce]);return Se}for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];if(_e(Se,ce)){var ve=this.src.__lookupGetter__(ce),de=this.src.__lookupSetter__(ce);ve&&Se.__defineGetter__(ce,ve),de&&Se.__defineSetter__(ce,de),ve||de||(Se[ce]=this.src[ce])}}return Se},Ce.prototype.toCover=function(Se){for(var xe=this.keys||Object.keys(this.src),ge=0;ge<xe.length;ge++){var ce=xe[ge];delete Se[ce];var ve=this.src.__lookupGetter__(ce),de=this.src.__lookupSetter__(ce);ve&&Se.__defineGetter__(ce,ve),de&&Se.__defineSetter__(ce,de),ve||de||(Se[ce]=this.src[ce])}},Ce.prototype.override=Ce.prototype.toCover,Ce.prototype.and=function(Se){var xe={};return this.to(xe),this.src=Se,this.to(xe),this.src=xe,this}},{}],44:[function(me,Ie,Te){me("../../modules/es6.string.iterator"),me("../../modules/es6.array.from"),Ie.exports=me("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(me,Ie,Te){var Ce=me("../../modules/_core"),_e=Ce.JSON||(Ce.JSON={stringify:JSON.stringify});Ie.exports=function(he){return _e.stringify.apply(_e,arguments)}},{"../../modules/_core":65}],46:[function(me,Ie,Te){me("../../modules/es6.object.assign"),Ie.exports=me("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(me,Ie,Te){me("../../modules/es6.object.create");var Ce=me("../../modules/_core").Object;Ie.exports=function(_e,he){return Ce.create(_e,he)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(me,Ie,Te){me("../../modules/es6.object.define-property");var Ce=me("../../modules/_core").Object;Ie.exports=function(_e,he,Se){return Ce.defineProperty(_e,he,Se)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(me,Ie,Te){me("../../modules/es6.object.get-own-property-names");var Ce=me("../../modules/_core").Object;Ie.exports=function(_e){return Ce.getOwnPropertyNames(_e)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(me,Ie,Te){me("../../modules/es6.object.get-prototype-of"),Ie.exports=me("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(me,Ie,Te){me("../../modules/es6.object.keys"),Ie.exports=me("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(me,Ie,Te){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"),Ie.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,Ie,Te){me("../modules/web.immediate"),Ie.exports=me("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(me,Ie,Te){me("../../modules/es6.string.from-code-point"),Ie.exports=me("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(me,Ie,Te){me("../../modules/es6.function.has-instance"),Ie.exports=me("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(me,Ie,Te){me("../../modules/es6.symbol"),me("../../modules/es6.object.to-string"),me("../../modules/es7.symbol.async-iterator"),me("../../modules/es7.symbol.observable"),Ie.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,Ie,Te){me("../../modules/es6.string.iterator"),me("../../modules/web.dom.iterable"),Ie.exports=me("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(me,Ie,Te){Ie.exports=function(Ce){if(typeof Ce!="function")throw TypeError(Ce+" is not a function!");return Ce}},{}],59:[function(me,Ie,Te){Ie.exports=function(){}},{}],60:[function(me,Ie,Te){Ie.exports=function(Ce,_e,he,Se){if(!(Ce instanceof _e)||Se!==void 0&&Se in Ce)throw TypeError(he+": incorrect invocation!");return Ce}},{}],61:[function(me,Ie,Te){var Ce=me("./_is-object");Ie.exports=function(_e){if(!Ce(_e))throw TypeError(_e+" is not an object!");return _e}},{"./_is-object":85}],62:[function(me,Ie,Te){var Ce=me("./_to-iobject"),_e=me("./_to-length"),he=me("./_to-absolute-index");Ie.exports=function(Se){return function(xe,ge,ce){var ve,de=Ce(xe),ue=_e(de.length),z=he(ce,ue);if(Se&&ge!=ge){for(;ue>z;)if((ve=de[z++])!=ve)return!0}else for(;ue>z;z++)if((Se||z in de)&&de[z]===ge)return Se||z||0;return!Se&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(me,Ie,Te){var Ce=me("./_cof"),_e=me("./_wks")("toStringTag"),he=Ce(function(){return arguments}())=="Arguments",Se=function(xe,ge){try{return xe[ge]}catch(ce){}};Ie.exports=function(xe){var ge,ce,ve;return xe===void 0?"Undefined":xe===null?"Null":typeof(ce=Se(ge=Object(xe),_e))=="string"?ce:he?Ce(ge):(ve=Ce(ge))=="Object"&&typeof ge.callee=="function"?"Arguments":ve}},{"./_cof":64,"./_wks":131}],64:[function(me,Ie,Te){var Ce={}.toString;Ie.exports=function(_e){return Ce.call(_e).slice(8,-1)}},{}],65:[function(me,Ie,Te){var Ce=Ie.exports={version:"2.5.7"};typeof __e=="number"&&(__e=Ce)},{}],66:[function(me,Ie,Te){"use strict";var Ce=me("./_object-dp"),_e=me("./_property-desc");Ie.exports=function(he,Se,xe){Se in he?Ce.f(he,Se,_e(0,xe)):he[Se]=xe}},{"./_object-dp":98,"./_property-desc":111}],67:[function(me,Ie,Te){var Ce=me("./_a-function");Ie.exports=function(_e,he,Se){if(Ce(_e),he===void 0)return _e;switch(Se){case 1:return function(xe){return _e.call(he,xe)};case 2:return function(xe,ge){return _e.call(he,xe,ge)};case 3:return function(xe,ge,ce){return _e.call(he,xe,ge,ce)}}return function(){return _e.apply(he,arguments)}}},{"./_a-function":58}],68:[function(me,Ie,Te){Ie.exports=function(Ce){if(Ce==null)throw TypeError("Can't call method on "+Ce);return Ce}},{}],69:[function(me,Ie,Te){Ie.exports=!me("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(me,Ie,Te){var Ce=me("./_is-object"),_e=me("./_global").document,he=Ce(_e)&&Ce(_e.createElement);Ie.exports=function(Se){return he?_e.createElement(Se):{}}},{"./_global":76,"./_is-object":85}],71:[function(me,Ie,Te){Ie.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(me,Ie,Te){var Ce=me("./_object-keys"),_e=me("./_object-gops"),he=me("./_object-pie");Ie.exports=function(Se){var xe=Ce(Se),ge=_e.f;if(ge)for(var ce,ve=ge(Se),de=he.f,ue=0;ve.length>ue;)de.call(Se,ce=ve[ue++])&&xe.push(ce);return xe}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(me,Ie,Te){var Ce=me("./_global"),_e=me("./_core"),he=me("./_ctx"),Se=me("./_hide"),xe=me("./_has"),ge=function(ce,ve,de){var ue,z,ee,oe=ce&ge.F,ie=ce&ge.G,se=ce&ge.S,le=ce&ge.P,ye=ce&ge.B,we=ce&ge.W,be=ie?_e:_e[ve]||(_e[ve]={}),ke=be.prototype,Ne=ie?Ce:se?Ce[ve]:(Ce[ve]||{}).prototype;ie&&(de=ve);for(ue in de)(z=!oe&&Ne&&Ne[ue]!==void 0)&&xe(be,ue)||(ee=z?Ne[ue]:de[ue],be[ue]=ie&&typeof Ne[ue]!="function"?de[ue]:ye&&z?he(ee,Ce):we&&Ne[ue]==ee?function(je){var Ve=function(Je,We,gt){if(this instanceof je){switch(arguments.length){case 0:return new je;case 1:return new je(Je);case 2:return new je(Je,We)}return new je(Je,We,gt)}return je.apply(this,arguments)};return Ve.prototype=je.prototype,Ve}(ee):le&&typeof ee=="function"?he(Function.call,ee):ee,le&&((be.virtual||(be.virtual={}))[ue]=ee,ce&ge.R&&ke&&!ke[ue]&&Se(ke,ue,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,Ie.exports=ge},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(me,Ie,Te){Ie.exports=function(Ce){try{return!!Ce()}catch(_e){return!0}}},{}],75:[function(me,Ie,de){var Ce=me("./_ctx"),_e=me("./_iter-call"),he=me("./_is-array-iter"),Se=me("./_an-object"),xe=me("./_to-length"),ge=me("./core.get-iterator-method"),ce={},ve={},de=Ie.exports=function(ue,z,ee,oe,ie){var se,le,ye,we,be=ie?function(){return ue}:ge(ue),ke=Ce(ee,oe,z?2:1),Ne=0;if(typeof be!="function")throw TypeError(ue+" is not iterable!");if(he(be)){for(se=xe(ue.length);se>Ne;Ne++)if((we=z?ke(Se(le=ue[Ne])[0],le[1]):ke(ue[Ne]))===ce||we===ve)return we}else for(ye=be.call(ue);!(le=ye.next()).done;)if((we=_e(ye,ke,le.value,z))===ce||we===ve)return we};de.BREAK=ce,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,Ie,Te){var Ce=Ie.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,Ie,Te){var Ce={}.hasOwnProperty;Ie.exports=function(_e,he){return Ce.call(_e,he)}},{}],78:[function(me,Ie,Te){var Ce=me("./_object-dp"),_e=me("./_property-desc");Ie.exports=me("./_descriptors")?function(he,Se,xe){return Ce.f(he,Se,_e(1,xe))}:function(he,Se,xe){return he[Se]=xe,he}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(me,Ie,Te){var Ce=me("./_global").document;Ie.exports=Ce&&Ce.documentElement},{"./_global":76}],80:[function(me,Ie,Te){Ie.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,Ie,Te){Ie.exports=function(Ce,_e,he){var Se=he===void 0;switch(_e.length){case 0:return Se?Ce():Ce.call(he);case 1:return Se?Ce(_e[0]):Ce.call(he,_e[0]);case 2:return Se?Ce(_e[0],_e[1]):Ce.call(he,_e[0],_e[1]);case 3:return Se?Ce(_e[0],_e[1],_e[2]):Ce.call(he,_e[0],_e[1],_e[2]);case 4:return Se?Ce(_e[0],_e[1],_e[2],_e[3]):Ce.call(he,_e[0],_e[1],_e[2],_e[3])}return Ce.apply(he,_e)}},{}],82:[function(me,Ie,Te){var Ce=me("./_cof");Ie.exports=Object("z").propertyIsEnumerable(0)?Object:function(_e){return Ce(_e)=="String"?_e.split(""):Object(_e)}},{"./_cof":64}],83:[function(me,Ie,Te){var Ce=me("./_iterators"),_e=me("./_wks")("iterator"),he=Array.prototype;Ie.exports=function(Se){return Se!==void 0&&(Ce.Array===Se||he[_e]===Se)}},{"./_iterators":91,"./_wks":131}],84:[function(me,Ie,Te){var Ce=me("./_cof");Ie.exports=Array.isArray||function(_e){return Ce(_e)=="Array"}},{"./_cof":64}],85:[function(me,Ie,Te){Ie.exports=function(Ce){return typeof Ce=="object"?Ce!==null:typeof Ce=="function"}},{}],86:[function(me,Ie,Te){var Ce=me("./_an-object");Ie.exports=function(_e,he,Se,xe){try{return xe?he(Ce(Se)[0],Se[1]):he(Se)}catch(ce){var ge=_e.return;throw ge!==void 0&&Ce(ge.call(_e)),ce}}},{"./_an-object":61}],87:[function(me,Ie,Te){"use strict";var Ce=me("./_object-create"),_e=me("./_property-desc"),he=me("./_set-to-string-tag"),Se={};me("./_hide")(Se,me("./_wks")("iterator"),function(){return this}),Ie.exports=function(xe,ge,ce){xe.prototype=Ce(Se,{next:_e(1,ce)}),he(xe,ge+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(me,Ie,Te){"use strict";var Ce=me("./_library"),_e=me("./_export"),he=me("./_redefine"),Se=me("./_hide"),xe=me("./_iterators"),ge=me("./_iter-create"),ce=me("./_set-to-string-tag"),ve=me("./_object-gpo"),de=me("./_wks")("iterator"),ue=!([].keys&&"next"in[].keys()),z=function(){return this};Ie.exports=function(ee,oe,ie,se,le,ye,we){ge(ie,oe,se);var be,ke,Ne,je=function(ct){if(!ue&&ct in gt)return gt[ct];switch(ct){case"keys":case"values":return function(){return new ie(this,ct)}}return function(){return new ie(this,ct)}},Ve=oe+" Iterator",Je=le=="values",We=!1,gt=ee.prototype,ut=gt[de]||gt["@@iterator"]||le&>[le],bt=ut||je(le),rt=le?Je?je("entries"):bt:void 0,St=oe=="Array"&>.entries||ut;if(St&&(Ne=ve(St.call(new ee)))!==Object.prototype&&Ne.next&&(ce(Ne,Ve,!0),Ce||typeof Ne[de]=="function"||Se(Ne,de,z)),Je&&ut&&ut.name!=="values"&&(We=!0,bt=function(){return ut.call(this)}),Ce&&!we||!ue&&!We&>[de]||Se(gt,de,bt),xe[oe]=bt,xe[Ve]=z,le)if(be={values:Je?bt:je("values"),keys:ye?bt:je("keys"),entries:rt},we)for(ke in be)ke in gt||he(gt,ke,be[ke]);else _e(_e.P+_e.F*(ue||We),oe,be);return be}},{"./_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,Ie,Te){var Ce=me("./_wks")("iterator"),_e=!1;try{var he=[7][Ce]();he.return=function(){_e=!0},Array.from(he,function(){throw 2})}catch(Se){}Ie.exports=function(Se,xe){if(!xe&&!_e)return!1;var ge=!1;try{var ce=[7],ve=ce[Ce]();ve.next=function(){return{done:ge=!0}},ce[Ce]=function(){return ve},Se(ce)}catch(de){}return ge}},{"./_wks":131}],90:[function(me,Ie,Te){Ie.exports=function(Ce,_e){return{value:_e,done:!!Ce}}},{}],91:[function(me,Ie,Te){Ie.exports={}},{}],92:[function(me,Ie,Te){Ie.exports=!0},{}],93:[function(me,Ie,Te){var Ce=me("./_uid")("meta"),_e=me("./_is-object"),he=me("./_has"),Se=me("./_object-dp").f,xe=0,ge=Object.isExtensible||function(){return!0},ce=!me("./_fails")(function(){return ge(Object.preventExtensions({}))}),ve=function(oe){Se(oe,Ce,{value:{i:"O"+ ++xe,w:{}}})},de=function(oe,ie){if(!_e(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},ue=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 ce&&ee.NEED&&ge(oe)&&!he(oe,Ce)&&ve(oe),oe},ee=Ie.exports={KEY:Ce,NEED:!1,fastKey:de,getWeak:ue,onFreeze:z}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(me,Ie,Te){var Ce=me("./_global"),_e=me("./_task").set,he=Ce.MutationObserver||Ce.WebKitMutationObserver,Se=Ce.process,xe=Ce.Promise,ge=me("./_cof")(Se)=="process";Ie.exports=function(){var ce,ve,de,ue=function(){var ie,se;for(ge&&(ie=Se.domain)&&ie.exit();ce;){se=ce.fn,ce=ce.next;try{se()}catch(le){throw ce?de():ve=void 0,le}}ve=void 0,ie&&ie.enter()};if(ge)de=function(){Se.nextTick(ue)};else if(!he||Ce.navigator&&Ce.navigator.standalone)if(xe&&xe.resolve){var z=xe.resolve(void 0);de=function(){z.then(ue)}}else de=function(){_e.call(Ce,ue)};else{var ee=!0,oe=document.createTextNode("");new he(ue).observe(oe,{characterData:!0}),de=function(){oe.data=ee=!ee}}return function(ie){var se={fn:ie,next:void 0};ve&&(ve.next=se),ce||(ce=se,de()),ve=se}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(me,Ie,Te){"use strict";function Ce(he){var Se,xe;this.promise=new he(function(ge,ce){if(Se!==void 0||xe!==void 0)throw TypeError("Bad Promise constructor");Se=ge,xe=ce}),this.resolve=_e(Se),this.reject=_e(xe)}var _e=me("./_a-function");Ie.exports.f=function(he){return new Ce(he)}},{"./_a-function":58}],96:[function(me,Ie,Te){"use strict";var Ce=me("./_object-keys"),_e=me("./_object-gops"),he=me("./_object-pie"),Se=me("./_to-object"),xe=me("./_iobject"),ge=Object.assign;Ie.exports=!ge||me("./_fails")(function(){var ce={},ve={},de=Symbol(),ue="abcdefghijklmnopqrst";return ce[de]=7,ue.split("").forEach(function(z){ve[z]=z}),ge({},ce)[de]!=7||Object.keys(ge({},ve)).join("")!=ue})?function(ce,ve){for(var de=Se(ce),ue=arguments.length,z=1,ee=_e.f,oe=he.f;ue>z;)for(var ie,se=xe(arguments[z++]),le=ee?Ce(se).concat(ee(se)):Ce(se),ye=le.length,we=0;ye>we;)oe.call(se,ie=le[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,Ie,Te){var Ce=me("./_an-object"),_e=me("./_object-dps"),he=me("./_enum-bug-keys"),Se=me("./_shared-key")("IE_PROTO"),xe=function(){},ge=function(){var ce,ve=me("./_dom-create")("iframe"),de=he.length;for(ve.style.display="none",me("./_html").appendChild(ve),ve.src="javascript:",ce=ve.contentWindow.document,ce.open(),ce.write("<script>document.F=Object<\/script>"),ce.close(),ge=ce.F;de--;)delete ge.prototype[he[de]];return ge()};Ie.exports=Object.create||function(ce,ve){var de;return ce!==null?(xe.prototype=Ce(ce),de=new xe,xe.prototype=null,de[Se]=ce):de=ge(),ve===void 0?de:_e(de,ve)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(me,Ie,Te){var Ce=me("./_an-object"),_e=me("./_ie8-dom-define"),he=me("./_to-primitive"),Se=Object.defineProperty;Te.f=me("./_descriptors")?Object.defineProperty:function(xe,ge,ce){if(Ce(xe),ge=he(ge,!0),Ce(ce),_e)try{return Se(xe,ge,ce)}catch(ve){}if("get"in ce||"set"in ce)throw TypeError("Accessors not supported!");return"value"in ce&&(xe[ge]=ce.value),xe}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(me,Ie,Te){var Ce=me("./_object-dp"),_e=me("./_an-object"),he=me("./_object-keys");Ie.exports=me("./_descriptors")?Object.defineProperties:function(Se,xe){_e(Se);for(var ge,ce=he(xe),ve=ce.length,de=0;ve>de;)Ce.f(Se,ge=ce[de++],xe[ge]);return Se}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(me,Ie,Te){var Ce=me("./_object-pie"),_e=me("./_property-desc"),he=me("./_to-iobject"),Se=me("./_to-primitive"),xe=me("./_has"),ge=me("./_ie8-dom-define"),ce=Object.getOwnPropertyDescriptor;Te.f=me("./_descriptors")?ce:function(ve,de){if(ve=he(ve),de=Se(de,!0),ge)try{return ce(ve,de)}catch(ue){}if(xe(ve,de))return _e(!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,Ie,Te){var Ce=me("./_to-iobject"),_e=me("./_object-gopn").f,he={}.toString,Se=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],xe=function(ge){try{return _e(ge)}catch(ce){return Se.slice()}};Ie.exports.f=function(ge){return Se&&he.call(ge)=="[object Window]"?xe(ge):_e(Ce(ge))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(me,Ie,Te){var Ce=me("./_object-keys-internal"),_e=me("./_enum-bug-keys").concat("length","prototype");Te.f=Object.getOwnPropertyNames||function(he){return Ce(he,_e)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(me,Ie,Te){Te.f=Object.getOwnPropertySymbols},{}],104:[function(me,Ie,Te){var Ce=me("./_has"),_e=me("./_to-object"),he=me("./_shared-key")("IE_PROTO"),Se=Object.prototype;Ie.exports=Object.getPrototypeOf||function(xe){return xe=_e(xe),Ce(xe,he)?xe[he]:typeof xe.constructor=="function"&&xe instanceof xe.constructor?xe.constructor.prototype:xe instanceof Object?Se:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(me,Ie,Te){var Ce=me("./_has"),_e=me("./_to-iobject"),he=me("./_array-includes")(!1),Se=me("./_shared-key")("IE_PROTO");Ie.exports=function(xe,ge){var ce,ve=_e(xe),de=0,ue=[];for(ce in ve)ce!=Se&&Ce(ve,ce)&&ue.push(ce);for(;ge.length>de;)Ce(ve,ce=ge[de++])&&(~he(ue,ce)||ue.push(ce));return ue}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(me,Ie,Te){var Ce=me("./_object-keys-internal"),_e=me("./_enum-bug-keys");Ie.exports=Object.keys||function(he){return Ce(he,_e)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(me,Ie,Te){Te.f={}.propertyIsEnumerable},{}],108:[function(me,Ie,Te){var Ce=me("./_export"),_e=me("./_core"),he=me("./_fails");Ie.exports=function(Se,xe){var ge=(_e.Object||{})[Se]||Object[Se],ce={};ce[Se]=xe(ge),Ce(Ce.S+Ce.F*he(function(){ge(1)}),"Object",ce)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(me,Ie,Te){Ie.exports=function(Ce){try{return{e:!1,v:Ce()}}catch(_e){return{e:!0,v:_e}}}},{}],110:[function(me,Ie,Te){var Ce=me("./_an-object"),_e=me("./_is-object"),he=me("./_new-promise-capability");Ie.exports=function(Se,xe){if(Ce(Se),_e(xe)&&xe.constructor===Se)return xe;var ge=he.f(Se);return(0,ge.resolve)(xe),ge.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(me,Ie,Te){Ie.exports=function(Ce,_e){return{enumerable:!(1&Ce),configurable:!(2&Ce),writable:!(4&Ce),value:_e}}},{}],112:[function(me,Ie,Te){var Ce=me("./_hide");Ie.exports=function(_e,he,Se){for(var xe in he)Se&&_e[xe]?_e[xe]=he[xe]:Ce(_e,xe,he[xe]);return _e}},{"./_hide":78}],113:[function(me,Ie,Te){Ie.exports=me("./_hide")},{"./_hide":78}],114:[function(me,Ie,Te){"use strict";var Ce=me("./_global"),_e=me("./_core"),he=me("./_object-dp"),Se=me("./_descriptors"),xe=me("./_wks")("species");Ie.exports=function(ge){var ce=typeof _e[ge]=="function"?_e[ge]:Ce[ge];Se&&ce&&!ce[xe]&&he.f(ce,xe,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(me,Ie,Te){var Ce=me("./_object-dp").f,_e=me("./_has"),he=me("./_wks")("toStringTag");Ie.exports=function(Se,xe,ge){Se&&!_e(Se=ge?Se:Se.prototype,he)&&Ce(Se,he,{configurable:!0,value:xe})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(me,Ie,Te){var Ce=me("./_shared")("keys"),_e=me("./_uid");Ie.exports=function(he){return Ce[he]||(Ce[he]=_e(he))}},{"./_shared":117,"./_uid":127}],117:[function(me,Ie,Te){var Ce=me("./_core"),_e=me("./_global"),he=_e["__core-js_shared__"]||(_e["__core-js_shared__"]={});(Ie.exports=function(Se,xe){return he[Se]||(he[Se]=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,Ie,Te){var Ce=me("./_an-object"),_e=me("./_a-function"),he=me("./_wks")("species");Ie.exports=function(Se,xe){var ge,ce=Ce(Se).constructor;return ce===void 0||(ge=Ce(ce)[he])==null?xe:_e(ge)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(me,Ie,Te){var Ce=me("./_to-integer"),_e=me("./_defined");Ie.exports=function(he){return function(Se,xe){var ge,ce,ve=String(_e(Se)),de=Ce(xe),ue=ve.length;return de<0||de>=ue?he?"":void 0:(ge=ve.charCodeAt(de),ge<55296||ge>56319||de+1===ue||(ce=ve.charCodeAt(de+1))<56320||ce>57343?he?ve.charAt(de):ge:he?ve.slice(de,de+2):ce-56320+(ge-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(me,Ie,Te){var Ce,_e,he,Se=me("./_ctx"),xe=me("./_invoke"),ge=me("./_html"),ce=me("./_dom-create"),ve=me("./_global"),de=ve.process,ue=ve.setImmediate,z=ve.clearImmediate,ee=ve.MessageChannel,oe=ve.Dispatch,ie=0,se={},le=function(){var we=+this;if(se.hasOwnProperty(we)){var be=se[we];delete se[we],be()}},ye=function(we){le.call(we.data)};ue&&z||(ue=function(we){for(var be=[],ke=1;arguments.length>ke;)be.push(arguments[ke++]);return se[++ie]=function(){xe(typeof we=="function"?we:Function(we),be)},Ce(ie),ie},z=function(we){delete se[we]},me("./_cof")(de)=="process"?Ce=function(we){de.nextTick(Se(le,we,1))}:oe&&oe.now?Ce=function(we){oe.now(Se(le,we,1))}:ee?(_e=new ee,he=_e.port2,_e.port1.onmessage=ye,Ce=Se(he.postMessage,he,1)):ve.addEventListener&&typeof postMessage=="function"&&!ve.importScripts?(Ce=function(we){ve.postMessage(we+"","*")},ve.addEventListener("message",ye,!1)):Ce="onreadystatechange"in ce("script")?function(we){ge.appendChild(ce("script")).onreadystatechange=function(){ge.removeChild(this),le.call(we)}}:function(we){setTimeout(Se(le,we,1),0)}),Ie.exports={set:ue,clear:z}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(me,Ie,Te){var Ce=me("./_to-integer"),_e=Math.max,he=Math.min;Ie.exports=function(Se,xe){return Se=Ce(Se),Se<0?_e(Se+xe,0):he(Se,xe)}},{"./_to-integer":122}],122:[function(me,Ie,Te){var Ce=Math.ceil,_e=Math.floor;Ie.exports=function(he){return isNaN(he=+he)?0:(he>0?_e:Ce)(he)}},{}],123:[function(me,Ie,Te){var Ce=me("./_iobject"),_e=me("./_defined");Ie.exports=function(he){return Ce(_e(he))}},{"./_defined":68,"./_iobject":82}],124:[function(me,Ie,Te){var Ce=me("./_to-integer"),_e=Math.min;Ie.exports=function(he){return he>0?_e(Ce(he),9007199254740991):0}},{"./_to-integer":122}],125:[function(me,Ie,Te){var Ce=me("./_defined");Ie.exports=function(_e){return Object(Ce(_e))}},{"./_defined":68}],126:[function(me,Ie,Te){var Ce=me("./_is-object");Ie.exports=function(_e,he){if(!Ce(_e))return _e;var Se,xe;if(he&&typeof(Se=_e.toString)=="function"&&!Ce(xe=Se.call(_e))||typeof(Se=_e.valueOf)=="function"&&!Ce(xe=Se.call(_e))||!he&&typeof(Se=_e.toString)=="function"&&!Ce(xe=Se.call(_e)))return xe;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(me,Ie,Te){var Ce=0,_e=Math.random();Ie.exports=function(he){return"Symbol(".concat(he===void 0?"":he,")_",(++Ce+_e).toString(36))}},{}],128:[function(me,Ie,Te){var Ce=me("./_global"),_e=Ce.navigator;Ie.exports=_e&&_e.userAgent||""},{"./_global":76}],129:[function(me,Ie,Te){var Ce=me("./_global"),_e=me("./_core"),he=me("./_library"),Se=me("./_wks-ext"),xe=me("./_object-dp").f;Ie.exports=function(ge){var ce=_e.Symbol||(_e.Symbol=he?{}:Ce.Symbol||{});ge.charAt(0)=="_"||ge in ce||xe(ce,ge,{value:Se.f(ge)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(me,Ie,Te){Te.f=me("./_wks")},{"./_wks":131}],131:[function(me,Ie,Te){var Ce=me("./_shared")("wks"),_e=me("./_uid"),he=me("./_global").Symbol,Se=typeof he=="function";(Ie.exports=function(xe){return Ce[xe]||(Ce[xe]=Se&&he[xe]||(Se?he:_e)("Symbol."+xe))}).store=Ce},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(me,Ie,Te){var Ce=me("./_classof"),_e=me("./_wks")("iterator"),he=me("./_iterators");Ie.exports=me("./_core").getIteratorMethod=function(Se){if(Se!=null)return Se[_e]||Se["@@iterator"]||he[Ce(Se)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(me,Ie,Te){"use strict";var Ce=me("./_ctx"),_e=me("./_export"),he=me("./_to-object"),Se=me("./_iter-call"),xe=me("./_is-array-iter"),ge=me("./_to-length"),ce=me("./_create-property"),ve=me("./core.get-iterator-method");_e(_e.S+_e.F*!me("./_iter-detect")(function(de){Array.from(de)}),"Array",{from:function(de){var ue,z,ee,oe,ie=he(de),se=typeof this=="function"?this:Array,le=arguments.length,ye=le>1?arguments[1]:void 0,we=ye!==void 0,be=0,ke=ve(ie);if(we&&(ye=Ce(ye,le>2?arguments[2]:void 0,2)),ke==null||se==Array&&xe(ke))for(ue=ge(ie.length),z=new se(ue);ue>be;be++)ce(z,be,we?ye(ie[be],be):ie[be]);else for(oe=ke.call(ie),z=new se;!(ee=oe.next()).done;be++)ce(z,be,we?Se(oe,ye,[ee.value,be],!0):ee.value);return z.length=be,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,Ie,Te){"use strict";var Ce=me("./_add-to-unscopables"),_e=me("./_iter-step"),he=me("./_iterators"),Se=me("./_to-iobject");Ie.exports=me("./_iter-define")(Array,"Array",function(xe,ge){this._t=Se(xe),this._i=0,this._k=ge},function(){var xe=this._t,ge=this._k,ce=this._i++;return!xe||ce>=xe.length?(this._t=void 0,_e(1)):ge=="keys"?_e(0,ce):ge=="values"?_e(0,xe[ce]):_e(0,[ce,xe[ce]])},"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,Ie,Te){"use strict";var Ce=me("./_is-object"),_e=me("./_object-gpo"),he=me("./_wks")("hasInstance"),Se=Function.prototype;he in Se||me("./_object-dp").f(Se,he,{value:function(xe){if(typeof this!="function"||!Ce(xe))return!1;if(!Ce(this.prototype))return xe instanceof this;for(;xe=_e(xe);)if(this.prototype===xe)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(me,Ie,Te){var Ce=me("./_export");Ce(Ce.S+Ce.F,"Object",{assign:me("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(me,Ie,Te){var Ce=me("./_export");Ce(Ce.S,"Object",{create:me("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(me,Ie,Te){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,Ie,Te){me("./_object-sap")("getOwnPropertyNames",function(){return me("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(me,Ie,Te){var Ce=me("./_to-object"),_e=me("./_object-gpo");me("./_object-sap")("getPrototypeOf",function(){return function(he){return _e(Ce(he))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(me,Ie,Te){var Ce=me("./_to-object"),_e=me("./_object-keys");me("./_object-sap")("keys",function(){return function(he){return _e(Ce(he))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(me,Ie,Te){arguments[4][36][0].apply(Te,arguments)},{dup:36}],143:[function(me,Ie,Te){"use strict";var Ce,_e,he,Se,xe=me("./_library"),ge=me("./_global"),ce=me("./_ctx"),ve=me("./_classof"),de=me("./_export"),ue=me("./_is-object"),z=me("./_a-function"),ee=me("./_an-instance"),oe=me("./_for-of"),ie=me("./_species-constructor"),se=me("./_task").set,le=me("./_microtask")(),ye=me("./_new-promise-capability"),we=me("./_perform"),be=me("./_user-agent"),ke=me("./_promise-resolve"),Ne=ge.TypeError,je=ge.process,Ve=je&&je.versions,Je=Ve&&Ve.v8||"",We=ge.Promise,gt=ve(je)=="process",ut=function(){},bt=_e=ye.f,rt=!!function(){try{var Et=We.resolve(1),vt=(Et.constructor={})[me("./_wks")("species")]=function(Rt){Rt(ut,ut)};return(gt||typeof PromiseRejectionEvent=="function")&&Et.then(ut)instanceof vt&&Je.indexOf("6.6")!==0&&be.indexOf("Chrome/66")===-1}catch(Rt){}}(),St=function(Et){var vt;return!(!ue(Et)||typeof(vt=Et.then)!="function")&&vt},ct=function(Et,vt){if(!Et._n){Et._n=!0;var Rt=Et._c;le(function(){for(var jt=Et._v,un=Et._s==1,Vt=0;Rt.length>Vt;)(function(xn){var Ut,Zt,Xt,mt=un?xn.ok:xn.fail,ze=xn.resolve,Be=xn.reject,qe=xn.domain;try{mt?(un||(Et._h==2&&it(Et),Et._h=1),mt===!0?Ut=jt:(qe&&qe.enter(),Ut=mt(jt),qe&&(qe.exit(),Xt=!0)),Ut===xn.promise?Be(Ne("Promise-chain cycle")):(Zt=St(Ut))?Zt.call(Ut,ze,Be):ze(Ut)):Be(jt)}catch(Qe){qe&&!Xt&&qe.exit(),Be(Qe)}})(Rt[Vt++]);Et._c=[],Et._n=!1,vt&&!Et._h&&Bt(Et)})}},Bt=function(Et){se.call(ge,function(){var vt,Rt,jt,un=Et._v,Vt=ht(Et);if(Vt&&(vt=we(function(){gt?je.emit("unhandledRejection",un,Et):(Rt=ge.onunhandledrejection)?Rt({promise:Et,reason:un}):(jt=ge.console)&&jt.error&&jt.error("Unhandled promise rejection",un)}),Et._h=gt||ht(Et)?2:1),Et._a=void 0,Vt&&vt.e)throw vt.v})},ht=function(Et){return Et._h!==1&&(Et._a||Et._c).length===0},it=function(Et){se.call(ge,function(){var vt;gt?je.emit("rejectionHandled",Et):(vt=ge.onrejectionhandled)&&vt({promise:Et,reason:Et._v})})},dt=function(Et){var vt=this;vt._d||(vt._d=!0,vt=vt._w||vt,vt._v=Et,vt._s=2,vt._a||(vt._a=vt._c.slice()),ct(vt,!0))},yt=function(Et){var vt,Rt=this;if(!Rt._d){Rt._d=!0,Rt=Rt._w||Rt;try{if(Rt===Et)throw Ne("Promise can't be resolved itself");(vt=St(Et))?le(function(){var jt={_w:Rt,_d:!1};try{vt.call(Et,ce(yt,jt,1),ce(dt,jt,1))}catch(un){dt.call(jt,un)}}):(Rt._v=Et,Rt._s=1,ct(Rt,!1))}catch(jt){dt.call({_w:Rt,_d:!1},jt)}}};rt||(We=function(Et){ee(this,We,"Promise","_h"),z(Et),Ce.call(this);try{Et(ce(yt,this,1),ce(dt,this,1))}catch(vt){dt.call(this,vt)}},Ce=function(Et){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")(We.prototype,{then:function(Et,vt){var Rt=bt(ie(this,We));return Rt.ok=typeof Et!="function"||Et,Rt.fail=typeof vt=="function"&&vt,Rt.domain=gt?je.domain:void 0,this._c.push(Rt),this._a&&this._a.push(Rt),this._s&&ct(this,!1),Rt.promise},catch:function(Et){return this.then(void 0,Et)}}),he=function(){var Et=new Ce;this.promise=Et,this.resolve=ce(yt,Et,1),this.reject=ce(dt,Et,1)},ye.f=bt=function(Et){return Et===We||Et===Se?new he(Et):_e(Et)}),de(de.G+de.W+de.F*!rt,{Promise:We}),me("./_set-to-string-tag")(We,"Promise"),me("./_set-species")("Promise"),Se=me("./_core").Promise,de(de.S+de.F*!rt,"Promise",{reject:function(Et){var vt=bt(this);return(0,vt.reject)(Et),vt.promise}}),de(de.S+de.F*(xe||!rt),"Promise",{resolve:function(Et){return ke(xe&&this===Se?We:this,Et)}}),de(de.S+de.F*!(rt&&me("./_iter-detect")(function(Et){We.all(Et).catch(ut)})),"Promise",{all:function(Et){var vt=this,Rt=bt(vt),jt=Rt.resolve,un=Rt.reject,Vt=we(function(){var xn=[],Ut=0,Zt=1;oe(Et,!1,function(Xt){var mt=Ut++,ze=!1;xn.push(void 0),Zt++,vt.resolve(Xt).then(function(Be){ze||(ze=!0,xn[mt]=Be,--Zt||jt(xn))},un)}),--Zt||jt(xn)});return Vt.e&&un(Vt.v),Rt.promise},race:function(Et){var vt=this,Rt=bt(vt),jt=Rt.reject,un=we(function(){oe(Et,!1,function(Vt){vt.resolve(Vt).then(Rt.resolve,jt)})});return un.e&&jt(un.v),Rt.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,Ie,Te){var Ce=me("./_export"),_e=me("./_to-absolute-index"),he=String.fromCharCode,Se=String.fromCodePoint;Ce(Ce.S+Ce.F*(!!Se&&Se.length!=1),"String",{fromCodePoint:function(xe){for(var ge,ce=[],ve=arguments.length,de=0;ve>de;){if(ge=+arguments[de++],_e(ge,1114111)!==ge)throw RangeError(ge+" is not a valid code point");ce.push(ge<65536?he(ge):he(55296+((ge-=65536)>>10),ge%1024+56320))}return ce.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(me,Ie,Te){"use strict";var Ce=me("./_string-at")(!0);me("./_iter-define")(String,"String",function(_e){this._t=String(_e),this._i=0},function(){var _e,he=this._t,Se=this._i;return Se>=he.length?{value:void 0,done:!0}:(_e=Ce(he,Se),this._i+=_e.length,{value:_e,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(me,Ie,Te){"use strict";var Ce=me("./_global"),_e=me("./_has"),he=me("./_descriptors"),Se=me("./_export"),xe=me("./_redefine"),ge=me("./_meta").KEY,ce=me("./_fails"),ve=me("./_shared"),de=me("./_set-to-string-tag"),ue=me("./_uid"),z=me("./_wks"),ee=me("./_wks-ext"),oe=me("./_wks-define"),ie=me("./_enum-keys"),se=me("./_is-array"),le=me("./_an-object"),ye=me("./_is-object"),we=me("./_to-iobject"),be=me("./_to-primitive"),ke=me("./_property-desc"),Ne=me("./_object-create"),je=me("./_object-gopn-ext"),Ve=me("./_object-gopd"),Je=me("./_object-dp"),We=me("./_object-keys"),gt=Ve.f,ut=Je.f,bt=je.f,rt=Ce.Symbol,St=Ce.JSON,ct=St&&St.stringify,Bt=z("_hidden"),ht=z("toPrimitive"),it={}.propertyIsEnumerable,dt=ve("symbol-registry"),yt=ve("symbols"),Et=ve("op-symbols"),vt=Object.prototype,Rt=typeof rt=="function",jt=Ce.QObject,un=!jt||!jt.prototype||!jt.prototype.findChild,Vt=he&&ce(function(){return Ne(ut({},"a",{get:function(){return ut(this,"a",{value:7}).a}})).a!=7})?function(Ge,Ke,Ze){var at=gt(vt,Ke);at&&delete vt[Ke],ut(Ge,Ke,Ze),at&&Ge!==vt&&ut(vt,Ke,at)}:ut,xn=function(Ge){var Ke=yt[Ge]=Ne(rt.prototype);return Ke._k=Ge,Ke},Ut=Rt&&typeof rt.iterator=="symbol"?function(Ge){return typeof Ge=="symbol"}:function(Ge){return Ge instanceof rt},Zt=function(Ge,Ke,Ze){return Ge===vt&&Zt(Et,Ke,Ze),le(Ge),Ke=be(Ke,!0),le(Ze),_e(yt,Ke)?(Ze.enumerable?(_e(Ge,Bt)&&Ge[Bt][Ke]&&(Ge[Bt][Ke]=!1),Ze=Ne(Ze,{enumerable:ke(0,!1)})):(_e(Ge,Bt)||ut(Ge,Bt,ke(1,{})),Ge[Bt][Ke]=!0),Vt(Ge,Ke,Ze)):ut(Ge,Ke,Ze)},Xt=function(Ge,Ke){le(Ge);for(var Ze,at=ie(Ke=we(Ke)),xt=0,tn=at.length;tn>xt;)Zt(Ge,Ze=at[xt++],Ke[Ze]);return Ge},mt=function(Ge,Ke){return Ke===void 0?Ne(Ge):Xt(Ne(Ge),Ke)},ze=function(Ge){var Ke=it.call(this,Ge=be(Ge,!0));return!(this===vt&&_e(yt,Ge)&&!_e(Et,Ge))&&(!(Ke||!_e(this,Ge)||!_e(yt,Ge)||_e(this,Bt)&&this[Bt][Ge])||Ke)},Be=function(Ge,Ke){if(Ge=we(Ge),Ke=be(Ke,!0),Ge!==vt||!_e(yt,Ke)||_e(Et,Ke)){var Ze=gt(Ge,Ke);return!Ze||!_e(yt,Ke)||_e(Ge,Bt)&&Ge[Bt][Ke]||(Ze.enumerable=!0),Ze}},qe=function(Ge){for(var Ke,Ze=bt(we(Ge)),at=[],xt=0;Ze.length>xt;)_e(yt,Ke=Ze[xt++])||Ke==Bt||Ke==ge||at.push(Ke);return at},Qe=function(Ge){for(var Ke,Ze=Ge===vt,at=bt(Ze?Et:we(Ge)),xt=[],tn=0;at.length>tn;)!_e(yt,Ke=at[tn++])||Ze&&!_e(vt,Ke)||xt.push(yt[Ke]);return xt};Rt||(rt=function(){if(this instanceof rt)throw TypeError("Symbol is not a constructor!");var Ge=ue(arguments.length>0?arguments[0]:void 0),Ke=function(Ze){this===vt&&Ke.call(Et,Ze),_e(this,Bt)&&_e(this[Bt],Ge)&&(this[Bt][Ge]=!1),Vt(this,Ge,ke(1,Ze))};return he&&un&&Vt(vt,Ge,{configurable:!0,set:Ke}),xn(Ge)},xe(rt.prototype,"toString",function(){return this._k}),Ve.f=Be,Je.f=Zt,me("./_object-gopn").f=je.f=qe,me("./_object-pie").f=ze,me("./_object-gops").f=Qe,he&&!me("./_library")&&xe(vt,"propertyIsEnumerable",ze,!0),ee.f=function(Ge){return xn(z(Ge))}),Se(Se.G+Se.W+Se.F*!Rt,{Symbol:rt});for(var Ue="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Xe=0;Ue.length>Xe;)z(Ue[Xe++]);for(var Re=We(z.store),Ae=0;Re.length>Ae;)oe(Re[Ae++]);Se(Se.S+Se.F*!Rt,"Symbol",{for:function(Ge){return _e(dt,Ge+="")?dt[Ge]:dt[Ge]=rt(Ge)},keyFor:function(Ge){if(!Ut(Ge))throw TypeError(Ge+" is not a symbol!");for(var Ke in dt)if(dt[Ke]===Ge)return Ke},useSetter:function(){un=!0},useSimple:function(){un=!1}}),Se(Se.S+Se.F*!Rt,"Object",{create:mt,defineProperty:Zt,defineProperties:Xt,getOwnPropertyDescriptor:Be,getOwnPropertyNames:qe,getOwnPropertySymbols:Qe}),St&&Se(Se.S+Se.F*(!Rt||ce(function(){var Ge=rt();return ct([Ge])!="[null]"||ct({a:Ge})!="{}"||ct(Object(Ge))!="{}"})),"JSON",{stringify:function(Ge){for(var Ke,Ze,at=[Ge],xt=1;arguments.length>xt;)at.push(arguments[xt++]);if(Ze=Ke=at[1],(ye(Ke)||Ge!==void 0)&&!Ut(Ge))return se(Ke)||(Ke=function(tn,nn){if(typeof Ze=="function"&&(nn=Ze.call(this,tn,nn)),!Ut(nn))return nn}),at[1]=Ke,ct.apply(St,at)}}),rt.prototype[ht]||me("./_hide")(rt.prototype,ht,rt.prototype.valueOf),de(rt,"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,Ie,Te){"use strict";var Ce=me("./_export"),_e=me("./_core"),he=me("./_global"),Se=me("./_species-constructor"),xe=me("./_promise-resolve");Ce(Ce.P+Ce.R,"Promise",{finally:function(ge){var ce=Se(this,_e.Promise||he.Promise),ve=typeof ge=="function";return this.then(ve?function(de){return xe(ce,ge()).then(function(){return de})}:ge,ve?function(de){return xe(ce,ge()).then(function(){throw de})}:ge)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(me,Ie,Te){"use strict";var Ce=me("./_export"),_e=me("./_new-promise-capability"),he=me("./_perform");Ce(Ce.S,"Promise",{try:function(Se){var xe=_e.f(this),ge=he(Se);return(ge.e?xe.reject:xe.resolve)(ge.v),xe.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(me,Ie,Te){me("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(me,Ie,Te){me("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(me,Ie,Te){me("./es6.array.iterator");for(var Ce=me("./_global"),_e=me("./_hide"),he=me("./_iterators"),Se=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 ce=xe[ge],ve=Ce[ce],de=ve&&ve.prototype;de&&!de[Se]&&_e(de,Se,ce),he[ce]=he.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(me,Ie,Te){var Ce=me("./_export"),_e=me("./_task");Ce(Ce.G+Ce.B,{setImmediate:_e.set,clearImmediate:_e.clear})},{"./_export":73,"./_task":120}],153:[function(me,Ie,Te){(function(Ce){"use strict";function _e(be){return Array.isArray?Array.isArray(be):le(be)==="[object Array]"}function he(be){return typeof be=="boolean"}function Se(be){return be===null}function xe(be){return be==null}function ge(be){return typeof be=="number"}function ce(be){return typeof be=="string"}function ve(be){return(be===void 0?"undefined":(0,we.default)(be))==="symbol"}function de(be){return be===void 0}function ue(be){return le(be)==="[object RegExp]"}function z(be){return(be===void 0?"undefined":(0,we.default)(be))==="object"&&be!==null}function ee(be){return le(be)==="[object Date]"}function oe(be){return le(be)==="[object Error]"||be instanceof Error}function ie(be){return typeof be=="function"}function se(be){return be===null||typeof be=="boolean"||typeof be=="number"||typeof be=="string"||(be===void 0?"undefined":(0,we.default)(be))==="symbol"||be===void 0}function le(be){return Object.prototype.toString.call(be)}var ye=me("babel-runtime/helpers/typeof"),we=function(be){return be&&be.__esModule?be:{default:be}}(ye);Te.isArray=_e,Te.isBoolean=he,Te.isNull=Se,Te.isNullOrUndefined=xe,Te.isNumber=ge,Te.isString=ce,Te.isSymbol=ve,Te.isUndefined=de,Te.isRegExp=ue,Te.isObject=z,Te.isDate=ee,Te.isError=oe,Te.isFunction=ie,Te.isPrimitive=se,Te.isBuffer=Ce.isBuffer}).call(this,{isBuffer:me("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(me,Ie,Te){"use strict";var Ce=me("babel-runtime/helpers/typeof"),_e=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(he){function Se(de,ue){for(de=String(de),ue=ue||2;de.length<ue;)de="0"+de;return de}function xe(de){var ue=new Date(de.getFullYear(),de.getMonth(),de.getDate());ue.setDate(ue.getDate()-(ue.getDay()+6)%7+3);var z=new Date(ue.getFullYear(),0,4);z.setDate(z.getDate()-(z.getDay()+6)%7+3);var ee=ue.getTimezoneOffset()-z.getTimezoneOffset();ue.setHours(ue.getHours()-ee);var oe=(ue-z)/6048e5;return 1+Math.floor(oe)}function ge(de){var ue=de.getDay();return ue===0&&(ue=7),ue}function ce(de){return de===null?"null":de===void 0?"undefined":(de===void 0?"undefined":(0,_e.default)(de))!=="object"?de===void 0?"undefined":(0,_e.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,ue=/\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||ce(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 le=oe.slice(0,4);le!=="UTC:"&&le!=="GMT:"||(oe=oe.slice(4),ie=!0,le==="GMT:"&&(se=!0));var ye=ie?"getUTC":"get",we=ee[ye+"Date"](),be=ee[ye+"Day"](),ke=ee[ye+"Month"](),Ne=ee[ye+"FullYear"](),je=ee[ye+"Hours"](),Ve=ee[ye+"Minutes"](),Je=ee[ye+"Seconds"](),We=ee[ye+"Milliseconds"](),gt=ie?0:ee.getTimezoneOffset(),ut=xe(ee),bt=ge(ee),rt={d:we,dd:Se(we),ddd:ve.i18n.dayNames[be],dddd:ve.i18n.dayNames[be+7],m:ke+1,mm:Se(ke+1),mmm:ve.i18n.monthNames[ke],mmmm:ve.i18n.monthNames[ke+12],yy:String(Ne).slice(2),yyyy:Ne,h:je%12||12,hh:Se(je%12||12),H:je,HH:Se(je),M:Ve,MM:Se(Ve),s:Je,ss:Se(Je),l:Se(We,3),L:Se(Math.round(We/10)),t:je<12?"a":"p",tt:je<12?"am":"pm",T:je<12?"A":"P",TT:je<12?"AM":"PM",Z:se?"GMT":ie?"UTC":(String(ee).match(ue)||[""]).pop().replace(z,""),o:(gt>0?"-":"+")+Se(100*Math.floor(Math.abs(gt)/60)+Math.abs(gt)%60,4),S:["th","st","nd","rd"][we%10>3?0:(we%100-we%10!=10)*we%10],W:ut,N:bt};return oe.replace(de,function(St){return St in rt?rt[St]:St.slice(1,St.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 Le=="function"&&Le.amd?Le(function(){return ve}):(Te===void 0?"undefined":(0,_e.default)(Te))==="object"?Ie.exports=ve:he.dateFormat=ve})(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(me,Ie,Te){(function(Ce){function _e(){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(ce){var ve=this.useColors;if(ce[0]=(ve?"%c":"")+this.namespace+(ve?" %c":" ")+ce[0]+(ve?"%c ":" ")+"+"+Te.humanize(this.diff),ve){var de="color: "+this.color;ce.splice(1,0,de,"color: inherit");var ue=0,z=0;ce[0].replace(/%[a-zA-Z%]/g,function(ee){ee!=="%%"&&(ue++,ee==="%c"&&(z=ue))}),ce.splice(z,0,de)}}function Se(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function xe(ce){try{ce==null?Te.storage.removeItem("debug"):Te.storage.debug=ce}catch(ve){}}function ge(){var ce;try{ce=Te.storage.debug}catch(ve){}return!ce&&Ce!==void 0&&"env"in Ce&&(ce=Ce.env.DEBUG),ce}Te=Ie.exports=me("./debug"),Te.log=Se,Te.formatArgs=he,Te.save=xe,Te.load=ge,Te.useColors=_e,Te.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(ce){}}(),Te.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],Te.formatters.j=function(ce){try{return JSON.stringify(ce)}catch(ve){return"[UnexpectedJSONParseError]: "+ve.message}},Te.enable(ge())}).call(this,me("_process"))},{"./debug":156,_process:173}],156:[function(me,Ie,Te){function Ce(ve){var de,ue=0;for(de in ve)ue=(ue<<5)-ue+ve.charCodeAt(de),ue|=0;return Te.colors[Math.abs(ue)%Te.colors.length]}function _e(ve){function de(){if(de.enabled){var ue=de,z=+new Date,ee=z-(ce||z);ue.diff=ee,ue.prev=ce,ue.curr=z,ce=z;for(var oe=new Array(arguments.length),ie=0;ie<oe.length;ie++)oe[ie]=arguments[ie];oe[0]=Te.coerce(oe[0]),typeof oe[0]!="string"&&oe.unshift("%O");var se=0;oe[0]=oe[0].replace(/%([a-zA-Z%])/g,function(le,ye){if(le==="%%")return le;se++;var we=Te.formatters[ye];if(typeof we=="function"){var be=oe[se];le=we.call(ue,be),oe.splice(se,1),se--}return le}),Te.formatArgs.call(ue,oe),(de.log||Te.log||console.log.bind(console)).apply(ue,oe)}}return de.namespace=ve,de.enabled=Te.enabled(ve),de.useColors=Te.useColors(),de.color=Ce(ve),typeof Te.init=="function"&&Te.init(de),de}function he(ve){Te.save(ve),Te.names=[],Te.skips=[];for(var de=(typeof ve=="string"?ve:"").split(/[\s,]+/),ue=de.length,z=0;z<ue;z++)de[z]&&(ve=de[z].replace(/\*/g,".*?"),ve[0]==="-"?Te.skips.push(new RegExp("^"+ve.substr(1)+"$")):Te.names.push(new RegExp("^"+ve+"$")))}function Se(){Te.enable("")}function xe(ve){var de,ue;for(de=0,ue=Te.skips.length;de<ue;de++)if(Te.skips[de].test(ve))return!1;for(de=0,ue=Te.names.length;de<ue;de++)if(Te.names[de].test(ve))return!0;return!1}function ge(ve){return ve instanceof Error?ve.stack||ve.message:ve}Te=Ie.exports=_e.debug=_e.default=_e,Te.coerce=ge,Te.disable=Se,Te.enable=he,Te.enabled=xe,Te.humanize=me("ms"),Te.names=[],Te.skips=[],Te.formatters={};var ce},{ms:169}],157:[function(me,Ie,Te){"use strict";function Ce(he){var Se=""+he,xe=_e.exec(Se);if(!xe)return Se;var ge,ce="",ve=0,de=0;for(ve=xe.index;ve<Se.length;ve++){switch(Se.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&&(ce+=Se.substring(de,ve)),de=ve+1,ce+=ge}return de!==ve?ce+Se.substring(de,ve):ce}var _e=/["'&<>]/;Ie.exports=Ce},{}],158:[function(me,Ie,Te){function Ce(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function _e(ge){return typeof ge=="function"}function he(ge){return typeof ge=="number"}function Se(ge){return typeof ge=="object"&&ge!==null}function xe(ge){return ge===void 0}Ie.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 ce,ve,de,ue,z,ee;if(this._events||(this._events={}),ge==="error"&&(!this._events.error||Se(this._events.error)&&!this._events.error.length)){if((ce=arguments[1])instanceof Error)throw ce;var oe=new Error('Uncaught, unspecified "error" event. ('+ce+")");throw oe.context=ce,oe}if(ve=this._events[ge],xe(ve))return!1;if(_e(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:ue=Array.prototype.slice.call(arguments,1),ve.apply(this,ue)}else if(Se(ve))for(ue=Array.prototype.slice.call(arguments,1),ee=ve.slice(),de=ee.length,z=0;z<de;z++)ee[z].apply(this,ue);return!0},Ce.prototype.addListener=function(ge,ce){var ve;if(!_e(ce))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",ge,_e(ce.listener)?ce.listener:ce),this._events[ge]?Se(this._events[ge])?this._events[ge].push(ce):this._events[ge]=[this._events[ge],ce]:this._events[ge]=ce,Se(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,ce){function ve(){this.removeListener(ge,ve),de||(de=!0,ce.apply(this,arguments))}if(!_e(ce))throw TypeError("listener must be a function");var de=!1;return ve.listener=ce,this.on(ge,ve),this},Ce.prototype.removeListener=function(ge,ce){var ve,de,ue,z;if(!_e(ce))throw TypeError("listener must be a function");if(!this._events||!this._events[ge])return this;if(ve=this._events[ge],ue=ve.length,de=-1,ve===ce||_e(ve.listener)&&ve.listener===ce)delete this._events[ge],this._events.removeListener&&this.emit("removeListener",ge,ce);else if(Se(ve)){for(z=ue;z-- >0;)if(ve[z]===ce||ve[z].listener&&ve[z].listener===ce){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,ce)}return this},Ce.prototype.removeAllListeners=function(ge){var ce,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(ce in this._events)ce!=="removeListener"&&this.removeAllListeners(ce);return this.removeAllListeners("removeListener"),this._events={},this}if(ve=this._events[ge],_e(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]?_e(this._events[ge])?[this._events[ge]]:this._events[ge].slice():[]},Ce.prototype.listenerCount=function(ge){if(this._events){var ce=this._events[ge];if(_e(ce))return 1;if(ce)return ce.length}return 0},Ce.listenerCount=function(ge,ce){return ge.listenerCount(ce)}},{}],159:[function(me,Ie,Te){var Ce=me("http"),_e=Ie.exports;for(var he in Ce)Ce.hasOwnProperty(he)&&(_e[he]=Ce[he]);_e.request=function(Se,xe){return Se||(Se={}),Se.scheme="https",Se.protocol="https:",Ce.request.call(this,Se,xe)}},{http:196}],160:[function(me,Ie,Te){"use strict";var Ce=me("util"),_e=me("ms");Ie.exports=function(he){if(typeof he=="number")return he;var Se=_e(he);if(Se===void 0){var xe=new Error(Ce.format("humanize-ms(%j) result undefined",he));console.warn(xe.stack)}return Se}},{ms:169,util:207}],161:[function(me,Ie,Te){Te.read=function(Ce,_e,he,Se,xe){var ge,ce,ve=8*xe-Se-1,de=(1<<ve)-1,ue=de>>1,z=-7,ee=he?xe-1:0,oe=he?-1:1,ie=Ce[_e+ee];for(ee+=oe,ge=ie&(1<<-z)-1,ie>>=-z,z+=ve;z>0;ge=256*ge+Ce[_e+ee],ee+=oe,z-=8);for(ce=ge&(1<<-z)-1,ge>>=-z,z+=Se;z>0;ce=256*ce+Ce[_e+ee],ee+=oe,z-=8);if(ge===0)ge=1-ue;else{if(ge===de)return ce?NaN:1/0*(ie?-1:1);ce+=Math.pow(2,Se),ge-=ue}return(ie?-1:1)*ce*Math.pow(2,ge-Se)},Te.write=function(Ce,_e,he,Se,xe,ge){var ce,ve,de,ue=8*ge-xe-1,z=(1<<ue)-1,ee=z>>1,oe=xe===23?Math.pow(2,-24)-Math.pow(2,-77):0,ie=Se?0:ge-1,se=Se?1:-1,le=_e<0||_e===0&&1/_e<0?1:0;for(_e=Math.abs(_e),isNaN(_e)||_e===1/0?(ve=isNaN(_e)?1:0,ce=z):(ce=Math.floor(Math.log(_e)/Math.LN2),_e*(de=Math.pow(2,-ce))<1&&(ce--,de*=2),_e+=ce+ee>=1?oe/de:oe*Math.pow(2,1-ee),_e*de>=2&&(ce++,de/=2),ce+ee>=z?(ve=0,ce=z):ce+ee>=1?(ve=(_e*de-1)*Math.pow(2,xe),ce+=ee):(ve=_e*Math.pow(2,ee-1)*Math.pow(2,xe),ce=0));xe>=8;Ce[he+ie]=255&ve,ie+=se,ve/=256,xe-=8);for(ce=ce<<xe|ve,ue+=xe;ue>0;Ce[he+ie]=255&ce,ie+=se,ce/=256,ue-=8);Ce[he+ie-se]|=128*le}},{}],162:[function(me,Ie,Te){typeof Object.create=="function"?Ie.exports=function(Ce,_e){Ce.super_=_e,Ce.prototype=Object.create(_e.prototype,{constructor:{value:Ce,enumerable:!1,writable:!0,configurable:!0}})}:Ie.exports=function(Ce,_e){Ce.super_=_e;var he=function(){};he.prototype=_e.prototype,Ce.prototype=new he,Ce.prototype.constructor=Ce}},{}],163:[function(me,Ie,Te){function Ce(he){return!!he.constructor&&typeof he.constructor.isBuffer=="function"&&he.constructor.isBuffer(he)}function _e(he){return typeof he.readFloatLE=="function"&&typeof he.slice=="function"&&Ce(he.slice(0,0))}Ie.exports=function(he){return he!=null&&(Ce(he)||_e(he)||!!he._isBuffer)}},{}],164:[function(me,Ie,Te){(function(Ce){function _e(xe){return Se.call(xe).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function he(xe){return typeof xe=="function"&&(/^class(\s|\{\}$)/.test(Se.call(xe))||/^.*classCallCheck\(/.test(_e(xe)))}var Se=Function.prototype.toString;Te!==void 0?(Ie!==void 0&&Ie.exports&&(Te=Ie.exports=he),Te.isClass=he):typeof Le=="function"&&Le.amd?Le([],function(){return he}):Ce.isClass=he})(this)},{}],165:[function(me,Ie,Te){"use strict";function Ce(ge){var ce=ge.slice(2);return ce=ce[0].toLowerCase()+ce.slice(1)}var _e=me("core-util-is"),he=me("isstream"),Se=me("is-class");Object.keys(_e).map(function(ge){Te[Ce(ge)]=_e[ge]}),Te.stream=he,Te.readableStream=he.isReadable,Te.writableStream=he.isWritable,Te.duplexStream=he.isDuplex,Te.class=Se,Te.finite=function(ge){return Number.isFinite(ge)},Te.NaN=function(ge){return Number.isNaN(ge)},Te.generator=function(ge){return ge&&typeof ge.next=="function"&&typeof ge.throw=="function"},Te.generatorFunction=function(ge){return ge&&ge.constructor&&ge.constructor.name==="GeneratorFunction"},Te.asyncFunction=function(ge){return ge&&ge.constructor&&ge.constructor.name==="AsyncFunction"},Te.promise=function(ge){return ge&&typeof ge.then=="function"};var xe=Math.pow(2,31);Te.int=function(ge){return _e.isNumber(ge)&&ge%1==0},Te.int32=function(ge){return Te.int(ge)&&ge<xe&&ge>=-xe},Te.long=function(ge){return Te.int(ge)&&(ge>=xe||ge<-xe)},Te.Long=function(ge){return Te.object(ge)&&Te.number(ge.high)&&Te.number(ge.low)},Te.double=function(ge){return _e.isNumber(ge)&&!isNaN(ge)&&ge%1!=0},Te.date=function(ge){return ge instanceof Date},Te.regExp=function(ge){return ge instanceof RegExp},Te.regexp=Te.regExp,Te.error=function(ge){return ge instanceof Error},Te.array=function(ge){return Array.isArray(ge)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(me,Ie,Te){var Ce={}.toString;Ie.exports=Array.isArray||function(_e){return Ce.call(_e)=="[object Array]"}},{}],167:[function(me,Ie,Te){function Ce(ge){return ge instanceof xe.Stream}function _e(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 Se(ge){return _e(ge)&&he(ge)}var xe=me("stream");Ie.exports=Ce,Ie.exports.isReadable=_e,Ie.exports.isWritable=he,Ie.exports.isDuplex=Se},{stream:195}],168:[function(me,Ie,Te){"use strict";function Ce(he,Se,xe){if(!he)throw new TypeError("argument dest is required");if(!Se)throw new TypeError("argument src is required");return xe===void 0&&(xe=!0),Object.getOwnPropertyNames(Se).forEach(function(ge){if(xe||!_e.call(he,ge)){var ce=Object.getOwnPropertyDescriptor(Se,ge);Object.defineProperty(he,ge,ce)}}),he}Ie.exports=Ce;var _e=Object.prototype.hasOwnProperty},{}],169:[function(me,Ie,Te){function Ce(ue){if(ue=String(ue),!(ue.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(ue);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*ce;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 _e(ue){return ue>=ve?Math.round(ue/ve)+"d":ue>=ce?Math.round(ue/ce)+"h":ue>=ge?Math.round(ue/ge)+"m":ue>=xe?Math.round(ue/xe)+"s":ue+"ms"}function he(ue){return Se(ue,ve,"day")||Se(ue,ce,"hour")||Se(ue,ge,"minute")||Se(ue,xe,"second")||ue+" ms"}function Se(ue,z,ee){if(!(ue<z))return ue<1.5*z?Math.floor(ue/z)+" "+ee:Math.ceil(ue/z)+" "+ee+"s"}var xe=1e3,ge=60*xe,ce=60*ge,ve=24*ce,de=365.25*ve;Ie.exports=function(ue,z){z=z||{};var ee=typeof ue;if(ee==="string"&&ue.length>0)return Ce(ue);if(ee==="number"&&isNaN(ue)===!1)return z.long?he(ue):_e(ue);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ue))}},{}],170:[function(me,Ie,Te){(function(Ce){function _e(ge,ce){for(var ve=0,de=ge.length-1;de>=0;de--){var ue=ge[de];ue==="."?ge.splice(de,1):ue===".."?(ge.splice(de,1),ve++):ve&&(ge.splice(de,1),ve--)}if(ce)for(;ve--;ve)ge.unshift("..");return ge}function he(ge){typeof ge!="string"&&(ge+="");var ce,ve=0,de=-1,ue=!0;for(ce=ge.length-1;ce>=0;--ce)if(ge.charCodeAt(ce)===47){if(!ue){ve=ce+1;break}}else de===-1&&(ue=!1,de=ce+1);return de===-1?"":ge.slice(ve,de)}function Se(ge,ce){if(ge.filter)return ge.filter(ce);for(var ve=[],de=0;de<ge.length;de++)ce(ge[de],de,ge)&&ve.push(ge[de]);return ve}Te.resolve=function(){for(var ge="",ce=!1,ve=arguments.length-1;ve>=-1&&!ce;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,ce=de.charAt(0)==="/")}return ge=_e(Se(ge.split("/"),function(ue){return!!ue}),!ce).join("/"),(ce?"/":"")+ge||"."},Te.normalize=function(ge){var ce=Te.isAbsolute(ge),ve=xe(ge,-1)==="/";return ge=_e(Se(ge.split("/"),function(de){return!!de}),!ce).join("/"),ge||ce||(ge="."),ge&&ve&&(ge+="/"),(ce?"/":"")+ge},Te.isAbsolute=function(ge){return ge.charAt(0)==="/"},Te.join=function(){var ge=Array.prototype.slice.call(arguments,0);return Te.normalize(Se(ge,function(ce,ve){if(typeof ce!="string")throw new TypeError("Arguments to path.join must be strings");return ce}).join("/"))},Te.relative=function(ge,ce){function ve(se){for(var le=0;le<se.length&&se[le]==="";le++);for(var ye=se.length-1;ye>=0&&se[ye]==="";ye--);return le>ye?[]:se.slice(le,ye-le+1)}ge=Te.resolve(ge).substr(1),ce=Te.resolve(ce).substr(1);for(var de=ve(ge.split("/")),ue=ve(ce.split("/")),z=Math.min(de.length,ue.length),ee=z,oe=0;oe<z;oe++)if(de[oe]!==ue[oe]){ee=oe;break}for(var ie=[],oe=ee;oe<de.length;oe++)ie.push("..");return ie=ie.concat(ue.slice(ee)),ie.join("/")},Te.sep="/",Te.delimiter=":",Te.dirname=function(ge){if(typeof ge!="string"&&(ge+=""),ge.length===0)return".";for(var ce=ge.charCodeAt(0),ve=ce===47,de=-1,ue=!0,z=ge.length-1;z>=1;--z)if((ce=ge.charCodeAt(z))===47){if(!ue){de=z;break}}else ue=!1;return de===-1?ve?"/":".":ve&&de===1?"/":ge.slice(0,de)},Te.basename=function(ge,ce){var ve=he(ge);return ce&&ve.substr(-1*ce.length)===ce&&(ve=ve.substr(0,ve.length-ce.length)),ve},Te.extname=function(ge){typeof ge!="string"&&(ge+="");for(var ce=-1,ve=0,de=-1,ue=!0,z=0,ee=ge.length-1;ee>=0;--ee){var oe=ge.charCodeAt(ee);if(oe!==47)de===-1&&(ue=!1,de=ee+1),oe===46?ce===-1?ce=ee:z!==1&&(z=1):ce!==-1&&(z=-1);else if(!ue){ve=ee+1;break}}return ce===-1||de===-1||z===0||z===1&&ce===de-1&&ce===ve+1?"":ge.slice(ce,de)};var xe=function(ge,ce,ve){return ge.substr(ce,ve)}}).call(this,me("_process"))},{_process:173}],171:[function(me,Ie,Te){(function(Ce){(function(){"use strict";function _e(Je){return Je=String(Je),Je.charAt(0).toUpperCase()+Je.slice(1)}function he(Je,We,gt){var ut={"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 We&>&&/^Win/i.test(Je)&&!/^Windows Phone /i.test(Je)&&(ut=ut[/[\d.]+$/.exec(Je)])&&(Je="Windows "+ut),Je=String(Je),We&>&&(Je=Je.replace(RegExp(We,"i"),gt)),Je=xe(Je.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 Se(Je,We){var gt=-1,ut=Je?Je.length:0;if(typeof ut=="number"&&ut>-1&&ut<=we)for(;++gt<ut;)We(Je[gt],gt,Je);else ge(Je,We)}function xe(Je){return Je=z(Je),/^(?:webOS|i(?:OS|P))/.test(Je)?Je:_e(Je)}function ge(Je,We){for(var gt in Je)Ne.call(Je,gt)&&We(Je[gt],gt,Je)}function ce(Je){return Je==null?_e(Je):je.call(Je).slice(8,-1)}function ve(Je,We){var gt=Je!=null?typeof Je[We]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(gt)||gt=="object"&&!Je[We])}function de(Je){return String(Je).replace(/([ -])(?!$)/g,"$1?")}function ue(Je,We){var gt=null;return Se(Je,function(ut,bt){gt=We(gt,ut,bt,Je)}),gt}function z(Je){return String(Je).replace(/^ +| +$/g,"")}function ee(Je){function We(Ge){return ue(Ge,function(Ke,Ze){var at=Ze.pattern||de(Ze);return!Ke&&(Ke=RegExp("\\b"+at+" *\\d+[.\\w_]*","i").exec(Je)||RegExp("\\b"+at+" *\\w+-[\\w]*","i").exec(Je)||RegExp("\\b"+at+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Je))&&((Ke=String(Ze.label&&!RegExp(at,"i").test(Ze.label)?Ze.label:Ke).split("/"))[1]&&!/[\d.]+/.test(Ke[0])&&(Ke[0]+=" "+Ke[1]),Ze=Ze.label||Ze,Ke=xe(Ke[0].replace(RegExp(at,"i"),Ze).replace(RegExp("; *(?:"+Ze+"[_-])?","i")," ").replace(RegExp("("+Ze+")[-_.]?(\\w)","i"),"$1 $2"))),Ke})}function gt(){return this.description||""}var ut=ie,bt=Je&&typeof Je=="object"&&ce(Je)!="String";bt&&(ut=Je,Je=null);var rt=ut.navigator||{},St=rt.userAgent||"";Je||(Je=St);var ct,Bt,ht=bt?!!rt.likeChrome:/\bChrome\b/.test(Je)&&!/internal|\n/i.test(je.toString()),it=bt?"Object":"ScriptBridgingProxyObject",dt=bt?"Object":"Environment",yt=bt&&ut.java?"JavaPackage":ce(ut.java),Et=bt?"Object":"RuntimeObject",vt=/\bJava/.test(yt)&&ut.java,Rt=vt&&ce(ut.environment)==dt,jt=vt?"a":"\u4F2A",un=vt?"b":"\u5C3E",Vt=ut.document||{},xn=ut.operamini||ut.opera,Ut=be.test(Ut=bt&&xn?xn["[[Class]]"]:ce(xn))?Ut:xn=null,Zt=Je,Xt=[],mt=null,ze=Je==St,Be=ze&&xn&&typeof xn.version=="function"&&xn.version(),qe=function(Ge){return ue(Ge,function(Ke,Ze){return Ke||RegExp("\\b"+(Ze.pattern||de(Ze))+"\\b","i").exec(Je)&&(Ze.label||Ze)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Qe=function(Ge){return ue(Ge,function(Ke,Ze){return Ke||RegExp("\\b"+(Ze.pattern||de(Ze))+"\\b","i").exec(Je)&&(Ze.label||Ze)})}(["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"]),Ue=We([{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"]),Xe=function(Ge){return ue(Ge,function(Ke,Ze,at){return Ke||(Ze[Ue]||Ze[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ue)]||RegExp("\\b"+de(at)+"(?:\\b|\\w*\\d)","i").exec(Je))&&at})}({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}}),Re=function(Ge){return ue(Ge,function(Ke,Ze){var at=Ze.pattern||de(Ze);return!Ke&&(Ke=RegExp("\\b"+at+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Je))&&(Ke=he(Ke,at,Ze.label||Ze)),Ke})}(["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(qe&&(qe=[qe]),Xe&&!Ue&&(Ue=We([Xe])),(ct=/\bGoogle TV\b/.exec(Ue))&&(Ue=ct[0]),/\bSimulator\b/i.test(Je)&&(Ue=(Ue?Ue+" ":"")+"Simulator"),Qe=="Opera Mini"&&/\bOPiOS\b/.test(Je)&&Xt.push("running in Turbo/Uncompressed mode"),Qe=="IE"&&/\blike iPhone OS\b/.test(Je)?(ct=ee(Je.replace(/like iPhone OS/,"")),Xe=ct.manufacturer,Ue=ct.product):/^iP/.test(Ue)?(Qe||(Qe="Safari"),Re="iOS"+((ct=/ OS ([\d_]+)/i.exec(Je))?" "+ct[1].replace(/_/g,"."):"")):Qe!="Konqueror"||/buntu/i.test(Re)?Xe&&Xe!="Google"&&(/Chrome/.test(Qe)&&!/\bMobile Safari\b/i.test(Je)||/\bVita\b/.test(Ue))||/\bAndroid\b/.test(Re)&&/^Chrome/.test(Qe)&&/\bVersion\//i.test(Je)?(Qe="Android Browser",Re=/\bAndroid\b/.test(Re)?Re:"Android"):Qe=="Silk"?(/\bMobi/i.test(Je)||(Re="Android",Xt.unshift("desktop mode")),/Accelerated *= *true/i.test(Je)&&Xt.unshift("accelerated")):Qe=="PaleMoon"&&(ct=/\bFirefox\/([\d.]+)\b/.exec(Je))?Xt.push("identifying as Firefox "+ct[1]):Qe=="Firefox"&&(ct=/\b(Mobile|Tablet|TV)\b/i.exec(Je))?(Re||(Re="Firefox OS"),Ue||(Ue=ct[1])):!Qe||(ct=!/\bMinefield\b/i.test(Je)&&/\b(?:Firefox|Safari)\b/.exec(Qe))?(Qe&&!Ue&&/[\/,]|^[^(]+?\)/.test(Je.slice(Je.indexOf(ct+"/")+8))&&(Qe=null),(ct=Ue||Xe||Re)&&(Ue||Xe||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Re))&&(Qe=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Re)?Re:ct)+" Browser")):Qe=="Electron"&&(ct=(/\bChrome\/([\d.]+)\b/.exec(Je)||0)[1])&&Xt.push("Chromium "+ct):Re="Kubuntu",Be||(Be=function(Ge){return ue(Ge,function(Ke,Ze){return Ke||(RegExp(Ze+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Je)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",de(Qe),"(?:Firefox|Minefield|NetFront)"])),(ct=qe=="iCab"&&parseFloat(Be)>3&&"WebKit"||/\bOpera\b/.test(Qe)&&(/\bOPR\b/.test(Je)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Je)&&!/^(?:Trident|EdgeHTML)$/.test(qe)&&"WebKit"||!qe&&/\bMSIE\b/i.test(Je)&&(Re=="Mac OS"?"Tasman":"Trident")||qe=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Qe)&&"NetFront")&&(qe=[ct]),Qe=="IE"&&(ct=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Je)||0)[1])?(Qe+=" Mobile",Re="Windows Phone "+(/\+$/.test(ct)?ct:ct+".x"),Xt.unshift("desktop mode")):/\bWPDesktop\b/i.test(Je)?(Qe="IE Mobile",Re="Windows Phone 8.x",Xt.unshift("desktop mode"),Be||(Be=(/\brv:([\d.]+)/.exec(Je)||0)[1])):Qe!="IE"&&qe=="Trident"&&(ct=/\brv:([\d.]+)/.exec(Je))&&(Qe&&Xt.push("identifying as "+Qe+(Be?" "+Be:"")),Qe="IE",Be=ct[1]),ze){if(ve(ut,"global"))if(vt&&(ct=vt.lang.System,Zt=ct.getProperty("os.arch"),Re=Re||ct.getProperty("os.name")+" "+ct.getProperty("os.version")),Rt){try{Be=ut.require("ringo/engine").version.join("."),Qe="RingoJS"}catch(Ge){(ct=ut.system)&&ct.global.system==ut.system&&(Qe="Narwhal",Re||(Re=ct[0].os||null))}Qe||(Qe="Rhino")}else typeof ut.process=="object"&&!ut.process.browser&&(ct=ut.process)&&(typeof ct.versions=="object"&&(typeof ct.versions.electron=="string"?(Xt.push("Node "+ct.versions.node),Qe="Electron",Be=ct.versions.electron):typeof ct.versions.nw=="string"&&(Xt.push("Chromium "+Be,"Node "+ct.versions.node),Qe="NW.js",Be=ct.versions.nw)),Qe||(Qe="Node.js",Zt=ct.arch,Re=ct.platform,Be=/[\d.]+/.exec(ct.version),Be=Be?Be[0]:null));else ce(ct=ut.runtime)==it?(Qe="Adobe AIR",Re=ct.flash.system.Capabilities.os):ce(ct=ut.phantom)==Et?(Qe="PhantomJS",Be=(ct=ct.version||null)&&ct.major+"."+ct.minor+"."+ct.patch):typeof Vt.documentMode=="number"&&(ct=/\bTrident\/(\d+)/i.exec(Je))?(Be=[Be,Vt.documentMode],(ct=+ct[1]+4)!=Be[1]&&(Xt.push("IE "+Be[1]+" mode"),qe&&(qe[1]=""),Be[1]=ct),Be=Qe=="IE"?String(Be[1].toFixed(1)):Be[0]):typeof Vt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Qe)&&(Xt.push("masking as "+Qe+" "+Be),Qe="IE",Be="11.0",qe=["Trident"],Re="Windows");Re=Re&&xe(Re)}if(Be&&(ct=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(Be)||/(?:alpha|beta)(?: ?\d)?/i.exec(Je+";"+(ze&&rt.appMinorVersion))||/\bMinefield\b/i.test(Je)&&"a")&&(mt=/b/i.test(ct)?"beta":"alpha",Be=Be.replace(RegExp(ct+"\\+?$"),"")+(mt=="beta"?un:jt)+(/\d+\+?/.exec(ct)||"")),Qe=="Fennec"||Qe=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Re))Qe="Firefox Mobile";else if(Qe=="Maxthon"&&Be)Be=Be.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ue))Ue=="Xbox 360"&&(Re=null),Ue=="Xbox 360"&&/\bIEMobile\b/.test(Je)&&Xt.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Qe)&&(!Qe||Ue||/Browser|Mobi/.test(Qe))||Re!="Windows CE"&&!/Mobi/i.test(Je))if(Qe=="IE"&&ze)try{ut.external===null&&Xt.unshift("platform preview")}catch(Ge){Xt.unshift("embedded")}else(/\bBlackBerry\b/.test(Ue)||/\bBB10\b/.test(Je))&&(ct=(RegExp(Ue.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Je)||0)[1]||Be)?(ct=[ct,/BB10/.test(Je)],Re=(ct[1]?(Ue=null,Xe="BlackBerry"):"Device Software")+" "+ct[0],Be=null):this!=ge&&Ue!="Wii"&&(ze&&xn||/Opera/.test(Qe)&&/\b(?:MSIE|Firefox)\b/i.test(Je)||Qe=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Re)||Qe=="IE"&&(Re&&!/^Win/.test(Re)&&Be>5.5||/\bWindows XP\b/.test(Re)&&Be>8||Be==8&&!/\bTrident\b/.test(Je)))&&!be.test(ct=ee.call(ge,Je.replace(be,"")+";"))&&ct.name&&(ct="ing as "+ct.name+((ct=ct.version)?" "+ct:""),be.test(Qe)?(/\bIE\b/.test(ct)&&Re=="Mac OS"&&(Re=null),ct="identify"+ct):(ct="mask"+ct,Qe=Ut?xe(Ut.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(ct)&&(Re=null),ze||(Be=null)),qe=["Presto"],Xt.push(ct));else Qe+=" Mobile";(ct=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Je)||0)[1])&&(ct=[parseFloat(ct.replace(/\.(\d)$/,".0$1")),ct],Qe=="Safari"&&ct[1].slice(-1)=="+"?(Qe="WebKit Nightly",mt="alpha",Be=ct[1].slice(0,-1)):Be!=ct[1]&&Be!=(ct[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Je)||0)[1])||(Be=null),ct[1]=(/\bChrome\/([\d.]+)/i.exec(Je)||0)[1],ct[0]==537.36&&ct[2]==537.36&&parseFloat(ct[1])>=28&&qe=="WebKit"&&(qe=["Blink"]),ze&&(ht||ct[1])?(qe&&(qe[1]="like Chrome"),ct=ct[1]||(ct=ct[0],ct<530?1:ct<532?2:ct<532.05?3:ct<533?4:ct<534.03?5:ct<534.07?6:ct<534.1?7:ct<534.13?8:ct<534.16?9:ct<534.24?10:ct<534.3?11:ct<535.01?12:ct<535.02?"13+":ct<535.07?15:ct<535.11?16:ct<535.19?17:ct<536.05?18:ct<536.1?19:ct<537.01?20:ct<537.11?"21+":ct<537.13?23:ct<537.18?24:ct<537.24?25:ct<537.36?26:qe!="Blink"?"27":"28")):(qe&&(qe[1]="like Safari"),ct=ct[0],ct=ct<400?1:ct<500?2:ct<526?3:ct<533?4:ct<534?"4+":ct<535?5:ct<537?6:ct<538?7:ct<601?8:"8"),qe&&(qe[1]+=" "+(ct+=typeof ct=="number"?".x":/[.+]/.test(ct)?"":"+")),Qe=="Safari"&&(!Be||parseInt(Be)>45)&&(Be=ct)),Qe=="Opera"&&(ct=/\bzbov|zvav$/.exec(Re))?(Qe+=" ",Xt.unshift("desktop mode"),ct=="zvav"?(Qe+="Mini",Be=null):Qe+="Mobile",Re=Re.replace(RegExp(" *"+ct+"$"),"")):Qe=="Safari"&&/\bChrome\b/.exec(qe&&qe[1])&&(Xt.unshift("desktop mode"),Qe="Chrome Mobile",Be=null,/\bOS X\b/.test(Re)?(Xe="Apple",Re="iOS 4.3+"):Re=null),Be&&Be.indexOf(ct=/[\d.]+$/.exec(Re))==0&&Je.indexOf("/"+ct+"-")>-1&&(Re=z(Re.replace(ct,""))),qe&&!/\b(?:Avant|Nook)\b/.test(Qe)&&(/Browser|Lunascape|Maxthon/.test(Qe)||Qe!="Safari"&&/^iOS/.test(Re)&&/\bSafari\b/.test(qe[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Qe)&&qe[1])&&(ct=qe[qe.length-1])&&Xt.push(ct),Xt.length&&(Xt=["("+Xt.join("; ")+")"]),Xe&&Ue&&Ue.indexOf(Xe)<0&&Xt.push("on "+Xe),Ue&&Xt.push((/^on /.test(Xt[Xt.length-1])?"":"on ")+Ue),Re&&(ct=/ ([\d.+]+)$/.exec(Re),Bt=ct&&Re.charAt(Re.length-ct[0].length-1)=="/",Re={architecture:32,family:ct&&!Bt?Re.replace(ct[0],""):Re,version:ct?ct[1]:null,toString:function(){var Ge=this.version;return this.family+(Ge&&!Bt?" "+Ge:"")+(this.architecture==64?" 64-bit":"")}}),(ct=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Zt))&&!/\bi686\b/i.test(Zt)?(Re&&(Re.architecture=64,Re.family=Re.family.replace(RegExp(" *"+ct),"")),Qe&&(/\bWOW64\b/i.test(Je)||ze&&/\w(?:86|32)$/.test(rt.cpuClass||rt.platform)&&!/\bWin64; x64\b/i.test(Je))&&Xt.unshift("32-bit")):Re&&/^OS X/.test(Re.family)&&Qe=="Chrome"&&parseFloat(Be)>=39&&(Re.architecture=64),Je||(Je=null);var Ae={};return Ae.description=Je,Ae.layout=qe&&qe[0],Ae.manufacturer=Xe,Ae.name=Qe,Ae.prerelease=mt,Ae.product=Ue,Ae.ua=Je,Ae.version=Qe&&Be,Ae.os=Re||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ae.parse=ee,Ae.toString=gt,Ae.version&&Xt.unshift(Be),Ae.name&&Xt.unshift(Qe),Re&&Qe&&(Re!=String(Re).split(" ")[0]||Re!=Qe.split(" ")[0]&&!Ue)&&Xt.push(Ue?"("+Re+")":"on "+Re),Xt.length&&(Ae.description=Xt.join(" ")),Ae}var oe={function:!0,object:!0},ie=oe[typeof window]&&window||this,se=oe[typeof Te]&&Te,le=oe[typeof Ie]&&Ie&&!Ie.nodeType&&Ie,ye=se&&le&&typeof Ce=="object"&&Ce;!ye||ye.global!==ye&&ye.window!==ye&&ye.self!==ye||(ie=ye);var we=Math.pow(2,53)-1,be=/\bOpera/,ke=Object.prototype,Ne=ke.hasOwnProperty,je=ke.toString,Ve=ee();typeof Le=="function"&&typeof Le.amd=="object"&&Le.amd?(ie.platform=Ve,Le(function(){return Ve})):se&&le?ge(Ve,function(Je,We){se[We]=Je}):ie.platform=Ve}).call(this)}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(me,Ie,Te){(function(Ce){"use strict";function _e(he,Se,xe,ge){if(typeof he!="function")throw new TypeError('"callback" argument must be a function');var ce,ve,de=arguments.length;switch(de){case 0:case 1:return Ce.nextTick(he);case 2:return Ce.nextTick(function(){he.call(null,Se)});case 3:return Ce.nextTick(function(){he.call(null,Se,xe)});case 4:return Ce.nextTick(function(){he.call(null,Se,xe,ge)});default:for(ce=new Array(de-1),ve=0;ve<ce.length;)ce[ve++]=arguments[ve];return Ce.nextTick(function(){he.apply(null,ce)})}}!Ce.version||Ce.version.indexOf("v0.")===0||Ce.version.indexOf("v1.")===0&&Ce.version.indexOf("v1.8.")!==0?Ie.exports={nextTick:_e}:Ie.exports=Ce}).call(this,me("_process"))},{_process:173}],173:[function(me,Ie,Te){function Ce(){throw new Error("setTimeout has not been defined")}function _e(){throw new Error("clearTimeout has not been defined")}function he(le){if(de===setTimeout)return setTimeout(le,0);if((de===Ce||!de)&&setTimeout)return de=setTimeout,setTimeout(le,0);try{return de(le,0)}catch(ye){try{return de.call(null,le,0)}catch(we){return de.call(this,le,0)}}}function Se(le){if(ue===clearTimeout)return clearTimeout(le);if((ue===_e||!ue)&&clearTimeout)return ue=clearTimeout,clearTimeout(le);try{return ue(le)}catch(ye){try{return ue.call(null,le)}catch(we){return ue.call(this,le)}}}function xe(){ie&&ee&&(ie=!1,ee.length?oe=ee.concat(oe):se=-1,oe.length&&ge())}function ge(){if(!ie){var le=he(xe);ie=!0;for(var ye=oe.length;ye;){for(ee=oe,oe=[];++se<ye;)ee&&ee[se].run();se=-1,ye=oe.length}ee=null,ie=!1,Se(le)}}function ce(le,ye){this.fun=le,this.array=ye}function ve(){}var de,ue,z=Ie.exports={};(function(){try{de=typeof setTimeout=="function"?setTimeout:Ce}catch(le){de=Ce}try{ue=typeof clearTimeout=="function"?clearTimeout:_e}catch(le){ue=_e}})();var ee,oe=[],ie=!1,se=-1;z.nextTick=function(le){var ye=new Array(arguments.length-1);if(arguments.length>1)for(var we=1;we<arguments.length;we++)ye[we-1]=arguments[we];oe.push(new ce(le,ye)),oe.length!==1||ie||he(ge)},ce.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(le){return[]},z.binding=function(le){throw new Error("process.binding is not supported")},z.cwd=function(){return"/"},z.chdir=function(le){throw new Error("process.chdir is not supported")},z.umask=function(){return 0}},{}],174:[function(me,Ie,Te){(function(Ce){(function(_e){function he(yt){throw new RangeError(Bt[yt])}function Se(yt,Et){for(var vt=yt.length,Rt=[];vt--;)Rt[vt]=Et(yt[vt]);return Rt}function xe(yt,Et){var vt=yt.split("@"),Rt="";return vt.length>1&&(Rt=vt[0]+"@",yt=vt[1]),yt=yt.replace(ct,"."),Rt+Se(yt.split("."),Et).join(".")}function ge(yt){for(var Et,vt,Rt=[],jt=0,un=yt.length;jt<un;)Et=yt.charCodeAt(jt++),Et>=55296&&Et<=56319&&jt<un?(vt=yt.charCodeAt(jt++),(64512&vt)==56320?Rt.push(((1023&Et)<<10)+(1023&vt)+65536):(Rt.push(Et),jt--)):Rt.push(Et);return Rt}function ce(yt){return Se(yt,function(Et){var vt="";return Et>65535&&(Et-=65536,vt+=dt(Et>>>10&1023|55296),Et=56320|1023&Et),vt+=dt(Et)}).join("")}function ve(yt){return yt-48<10?yt-22:yt-65<26?yt-65:yt-97<26?yt-97:Ne}function de(yt,Et){return yt+22+75*(yt<26)-((Et!=0)<<5)}function ue(yt,Et,vt){var Rt=0;for(yt=vt?it(yt/We):yt>>1,yt+=it(yt/Et);yt>ht*Ve>>1;Rt+=Ne)yt=it(yt/ht);return it(Rt+(ht+1)*yt/(yt+Je))}function z(yt){var Et,vt,Rt,jt,un,Vt,xn,Ut,Zt,Xt,mt=[],ze=yt.length,Be=0,qe=ut,Qe=gt;for(vt=yt.lastIndexOf(bt),vt<0&&(vt=0),Rt=0;Rt<vt;++Rt)yt.charCodeAt(Rt)>=128&&he("not-basic"),mt.push(yt.charCodeAt(Rt));for(jt=vt>0?vt+1:0;jt<ze;){for(un=Be,Vt=1,xn=Ne;jt>=ze&&he("invalid-input"),Ut=ve(yt.charCodeAt(jt++)),(Ut>=Ne||Ut>it((ke-Be)/Vt))&&he("overflow"),Be+=Ut*Vt,Zt=xn<=Qe?je:xn>=Qe+Ve?Ve:xn-Qe,!(Ut<Zt);xn+=Ne)Xt=Ne-Zt,Vt>it(ke/Xt)&&he("overflow"),Vt*=Xt;Et=mt.length+1,Qe=ue(Be-un,Et,un==0),it(Be/Et)>ke-qe&&he("overflow"),qe+=it(Be/Et),Be%=Et,mt.splice(Be++,0,qe)}return ce(mt)}function ee(yt){var Et,vt,Rt,jt,un,Vt,xn,Ut,Zt,Xt,mt,ze,Be,qe,Qe,Ue=[];for(yt=ge(yt),ze=yt.length,Et=ut,vt=0,un=gt,Vt=0;Vt<ze;++Vt)(mt=yt[Vt])<128&&Ue.push(dt(mt));for(Rt=jt=Ue.length,jt&&Ue.push(bt);Rt<ze;){for(xn=ke,Vt=0;Vt<ze;++Vt)(mt=yt[Vt])>=Et&&mt<xn&&(xn=mt);for(Be=Rt+1,xn-Et>it((ke-vt)/Be)&&he("overflow"),vt+=(xn-Et)*Be,Et=xn,Vt=0;Vt<ze;++Vt)if(mt=yt[Vt],mt<Et&&++vt>ke&&he("overflow"),mt==Et){for(Ut=vt,Zt=Ne;Xt=Zt<=un?je:Zt>=un+Ve?Ve:Zt-un,!(Ut<Xt);Zt+=Ne)Qe=Ut-Xt,qe=Ne-Xt,Ue.push(dt(de(Xt+Qe%qe,0))),Ut=it(Qe/qe);Ue.push(dt(de(Ut,0))),un=ue(vt,Be,Rt==jt),vt=0,++Rt}++vt,++Et}return Ue.join("")}function oe(yt){return xe(yt,function(Et){return rt.test(Et)?z(Et.slice(4).toLowerCase()):Et})}function ie(yt){return xe(yt,function(Et){return St.test(Et)?"xn--"+ee(Et):Et})}var se=typeof Te=="object"&&Te&&!Te.nodeType&&Te,le=typeof Ie=="object"&&Ie&&!Ie.nodeType&&Ie,ye=typeof Ce=="object"&&Ce;ye.global!==ye&&ye.window!==ye&&ye.self!==ye||(_e=ye);var we,be,ke=2147483647,Ne=36,je=1,Ve=26,Je=38,We=700,gt=72,ut=128,bt="-",rt=/^xn--/,St=/[^\x20-\x7E]/,ct=/[\x2E\u3002\uFF0E\uFF61]/g,Bt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ht=Ne-je,it=Math.floor,dt=String.fromCharCode;if(we={version:"1.4.1",ucs2:{decode:ge,encode:ce},decode:z,encode:ee,toASCII:ie,toUnicode:oe},typeof Le=="function"&&typeof Le.amd=="object"&&Le.amd)Le("punycode",function(){return we});else if(se&&le)if(Ie.exports==se)le.exports=we;else for(be in we)we.hasOwnProperty(be)&&(se[be]=we[be]);else _e.punycode=we})(this)}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(me,Ie,Te){"use strict";function Ce(he,Se){return Object.prototype.hasOwnProperty.call(he,Se)}Ie.exports=function(he,Se,xe,ge){Se=Se||"&",xe=xe||"=";var ce={};if(typeof he!="string"||he.length===0)return ce;var ve=/\+/g;he=he.split(Se);var de=1e3;ge&&typeof ge.maxKeys=="number"&&(de=ge.maxKeys);var ue=he.length;de>0&&ue>de&&(ue=de);for(var z=0;z<ue;++z){var ee,oe,ie,se,le=he[z].replace(ve,"%20"),ye=le.indexOf(xe);ye>=0?(ee=le.substr(0,ye),oe=le.substr(ye+1)):(ee=le,oe=""),ie=decodeURIComponent(ee),se=decodeURIComponent(oe),Ce(ce,ie)?_e(ce[ie])?ce[ie].push(se):ce[ie]=[ce[ie],se]:ce[ie]=se}return ce};var _e=Array.isArray||function(he){return Object.prototype.toString.call(he)==="[object Array]"}},{}],176:[function(me,Ie,Te){"use strict";function Ce(xe,ge){if(xe.map)return xe.map(ge);for(var ce=[],ve=0;ve<xe.length;ve++)ce.push(ge(xe[ve],ve));return ce}var _e=function(xe){switch(typeof xe){case"string":return xe;case"boolean":return xe?"true":"false";case"number":return isFinite(xe)?xe:"";default:return""}};Ie.exports=function(xe,ge,ce,ve){return ge=ge||"&",ce=ce||"=",xe===null&&(xe=void 0),typeof xe=="object"?Ce(Se(xe),function(de){var ue=encodeURIComponent(_e(de))+ce;return he(xe[de])?Ce(xe[de],function(z){return ue+encodeURIComponent(_e(z))}).join(ge):ue+encodeURIComponent(_e(xe[de]))}).join(ge):ve?encodeURIComponent(_e(ve))+ce+encodeURIComponent(_e(xe)):""};var he=Array.isArray||function(xe){return Object.prototype.toString.call(xe)==="[object Array]"},Se=Object.keys||function(xe){var ge=[];for(var ce in xe)Object.prototype.hasOwnProperty.call(xe,ce)&&ge.push(ce);return ge}},{}],177:[function(me,Ie,Te){"use strict";Te.decode=Te.parse=me("./decode"),Te.encode=Te.stringify=me("./encode")},{"./decode":175,"./encode":176}],178:[function(me,Ie,Te){Ie.exports=me("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(me,Ie,Te){"use strict";function Ce(ie){if(!(this instanceof Ce))return new Ce(ie);de.call(this,ie),ue.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",_e)}function _e(){this.allowHalfOpen||this._writableState.ended||ge.nextTick(he,this)}function he(ie){ie.end()}var Se=me("babel-runtime/core-js/object/keys"),xe=function(ie){return ie&&ie.__esModule?ie:{default:ie}}(Se),ge=me("process-nextick-args"),ce=xe.default||function(ie){var se=[];for(var le in ie)se.push(le);return se};Ie.exports=Ce;var ve=me("core-util-is");ve.inherits=me("inherits");var de=me("./_stream_readable"),ue=me("./_stream_writable");ve.inherits(Ce,de);for(var z=ce(ue.prototype),ee=0;ee<z.length;ee++){var oe=z[ee];Ce.prototype[oe]||(Ce.prototype[oe]=ue.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,Ie,Te){"use strict";function Ce(Se){if(!(this instanceof Ce))return new Ce(Se);_e.call(this,Se)}Ie.exports=Ce;var _e=me("./_stream_transform"),he=me("core-util-is");he.inherits=me("inherits"),he.inherits(Ce,_e),Ce.prototype._transform=function(Se,xe,ge){ge(null,Se)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(me,Ie,Te){(function(Ce,_e){"use strict";function he(ze){return vt.from(ze)}function Se(ze){return vt.isBuffer(ze)||ze instanceof Rt}function xe(ze,Be,qe){if(typeof ze.prependListener=="function")return ze.prependListener(Be,qe);ze._events&&ze._events[Be]?dt(ze._events[Be])?ze._events[Be].unshift(qe):ze._events[Be]=[qe,ze._events[Be]]:ze.on(Be,qe)}function ge(ze,Be){it=it||me("./_stream_duplex"),ze=ze||{};var qe=Be instanceof it;this.objectMode=!!ze.objectMode,qe&&(this.objectMode=this.objectMode||!!ze.readableObjectMode);var Qe=ze.highWaterMark,Ue=ze.readableHighWaterMark,Xe=this.objectMode?16:16384;this.highWaterMark=Qe||Qe===0?Qe:qe&&(Ue||Ue===0)?Ue:Xe,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Ut,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=ze.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ze.encoding&&(xn||(xn=me("string_decoder/").StringDecoder),this.decoder=new xn(ze.encoding),this.encoding=ze.encoding)}function ce(ze){if(it=it||me("./_stream_duplex"),!(this instanceof ce))return new ce(ze);this._readableState=new ge(ze,this),this.readable=!0,ze&&(typeof ze.read=="function"&&(this._read=ze.read),typeof ze.destroy=="function"&&(this._destroy=ze.destroy)),Et.call(this)}function ve(ze,Be,qe,Qe,Ue){var Xe=ze._readableState;if(Be===null)Xe.reading=!1,ie(ze,Xe);else{var Re;Ue||(Re=ue(Xe,Be)),Re?ze.emit("error",Re):Xe.objectMode||Be&&Be.length>0?(typeof Be=="string"||Xe.objectMode||(0,Bt.default)(Be)===vt.prototype||(Be=he(Be)),Qe?Xe.endEmitted?ze.emit("error",new Error("stream.unshift() after end event")):de(ze,Xe,Be,!0):Xe.ended?ze.emit("error",new Error("stream.push() after EOF")):(Xe.reading=!1,Xe.decoder&&!qe?(Be=Xe.decoder.write(Be),Xe.objectMode||Be.length!==0?de(ze,Xe,Be,!1):ye(ze,Xe)):de(ze,Xe,Be,!1))):Qe||(Xe.reading=!1)}return z(Xe)}function de(ze,Be,qe,Qe){Be.flowing&&Be.length===0&&!Be.sync?(ze.emit("data",qe),ze.read(0)):(Be.length+=Be.objectMode?1:qe.length,Qe?Be.buffer.unshift(qe):Be.buffer.push(qe),Be.needReadable&&se(ze)),ye(ze,Be)}function ue(ze,Be){var qe;return Se(Be)||typeof Be=="string"||Be===void 0||ze.objectMode||(qe=new TypeError("Invalid non-string/buffer chunk")),qe}function z(ze){return!ze.ended&&(ze.needReadable||ze.length<ze.highWaterMark||ze.length===0)}function ee(ze){return ze>=mt?ze=mt:(ze--,ze|=ze>>>1,ze|=ze>>>2,ze|=ze>>>4,ze|=ze>>>8,ze|=ze>>>16,ze++),ze}function oe(ze,Be){return ze<=0||Be.length===0&&Be.ended?0:Be.objectMode?1:ze!==ze?Be.flowing&&Be.length?Be.buffer.head.data.length:Be.length:(ze>Be.highWaterMark&&(Be.highWaterMark=ee(ze)),ze<=Be.length?ze:Be.ended?Be.length:(Be.needReadable=!0,0))}function ie(ze,Be){if(!Be.ended){if(Be.decoder){var qe=Be.decoder.end();qe&&qe.length&&(Be.buffer.push(qe),Be.length+=Be.objectMode?1:qe.length)}Be.ended=!0,se(ze)}}function se(ze){var Be=ze._readableState;Be.needReadable=!1,Be.emittedReadable||(Vt("emitReadable",Be.flowing),Be.emittedReadable=!0,Be.sync?ht.nextTick(le,ze):le(ze))}function le(ze){Vt("emit readable"),ze.emit("readable"),Ve(ze)}function ye(ze,Be){Be.readingMore||(Be.readingMore=!0,ht.nextTick(we,ze,Be))}function we(ze,Be){for(var qe=Be.length;!Be.reading&&!Be.flowing&&!Be.ended&&Be.length<Be.highWaterMark&&(Vt("maybeReadMore read 0"),ze.read(0),qe!==Be.length);)qe=Be.length;Be.readingMore=!1}function be(ze){return function(){var Be=ze._readableState;Vt("pipeOnDrain",Be.awaitDrain),Be.awaitDrain&&Be.awaitDrain--,Be.awaitDrain===0&&yt(ze,"data")&&(Be.flowing=!0,Ve(ze))}}function ke(ze){Vt("readable nexttick read 0"),ze.read(0)}function Ne(ze,Be){Be.resumeScheduled||(Be.resumeScheduled=!0,ht.nextTick(je,ze,Be))}function je(ze,Be){Be.reading||(Vt("resume read 0"),ze.read(0)),Be.resumeScheduled=!1,Be.awaitDrain=0,ze.emit("resume"),Ve(ze),Be.flowing&&!Be.reading&&ze.read(0)}function Ve(ze){var Be=ze._readableState;for(Vt("flow",Be.flowing);Be.flowing&&ze.read()!==null;);}function Je(ze,Be){if(Be.length===0)return null;var qe;return Be.objectMode?qe=Be.buffer.shift():!ze||ze>=Be.length?(qe=Be.decoder?Be.buffer.join(""):Be.buffer.length===1?Be.buffer.head.data:Be.buffer.concat(Be.length),Be.buffer.clear()):qe=We(ze,Be.buffer,Be.decoder),qe}function We(ze,Be,qe){var Qe;return ze<Be.head.data.length?(Qe=Be.head.data.slice(0,ze),Be.head.data=Be.head.data.slice(ze)):Qe=ze===Be.head.data.length?Be.shift():qe?gt(ze,Be):ut(ze,Be),Qe}function gt(ze,Be){var qe=Be.head,Qe=1,Ue=qe.data;for(ze-=Ue.length;qe=qe.next;){var Xe=qe.data,Re=ze>Xe.length?Xe.length:ze;if(Re===Xe.length?Ue+=Xe:Ue+=Xe.slice(0,ze),(ze-=Re)===0){Re===Xe.length?(++Qe,qe.next?Be.head=qe.next:Be.head=Be.tail=null):(Be.head=qe,qe.data=Xe.slice(Re));break}++Qe}return Be.length-=Qe,Ue}function ut(ze,Be){var qe=vt.allocUnsafe(ze),Qe=Be.head,Ue=1;for(Qe.data.copy(qe),ze-=Qe.data.length;Qe=Qe.next;){var Xe=Qe.data,Re=ze>Xe.length?Xe.length:ze;if(Xe.copy(qe,qe.length-ze,0,Re),(ze-=Re)===0){Re===Xe.length?(++Ue,Qe.next?Be.head=Qe.next:Be.head=Be.tail=null):(Be.head=Qe,Qe.data=Xe.slice(Re));break}++Ue}return Be.length-=Ue,qe}function bt(ze){var Be=ze._readableState;if(Be.length>0)throw new Error('"endReadable()" called on non-empty stream');Be.endEmitted||(Be.ended=!0,ht.nextTick(rt,Be,ze))}function rt(ze,Be){ze.endEmitted||ze.length!==0||(ze.endEmitted=!0,Be.readable=!1,Be.emit("end"))}function St(ze,Be){for(var qe=0,Qe=ze.length;qe<Qe;qe++)if(ze[qe]===Be)return qe;return-1}var ct=me("babel-runtime/core-js/object/get-prototype-of"),Bt=function(ze){return ze&&ze.__esModule?ze:{default:ze}}(ct),ht=me("process-nextick-args");Ie.exports=ce;var it,dt=me("isarray");ce.ReadableState=ge;var yt=(me("events").EventEmitter,function(ze,Be){return ze.listeners(Be).length}),Et=me("./internal/streams/stream"),vt=me("safe-buffer").Buffer,Rt=_e.Uint8Array||function(){},jt=me("core-util-is");jt.inherits=me("inherits");var un=me("util"),Vt=void 0;Vt=un&&un.debuglog?un.debuglog("stream"):function(){};var xn,Ut=me("./internal/streams/BufferList"),Zt=me("./internal/streams/destroy");jt.inherits(ce,Et);var Xt=["error","close","destroy","pause","resume"];Object.defineProperty(ce.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(ze){this._readableState&&(this._readableState.destroyed=ze)}}),ce.prototype.destroy=Zt.destroy,ce.prototype._undestroy=Zt.undestroy,ce.prototype._destroy=function(ze,Be){this.push(null),Be(ze)},ce.prototype.push=function(ze,Be){var qe,Qe=this._readableState;return Qe.objectMode?qe=!0:typeof ze=="string"&&(Be=Be||Qe.defaultEncoding,Be!==Qe.encoding&&(ze=vt.from(ze,Be),Be=""),qe=!0),ve(this,ze,Be,!1,qe)},ce.prototype.unshift=function(ze){return ve(this,ze,null,!0,!1)},ce.prototype.isPaused=function(){return this._readableState.flowing===!1},ce.prototype.setEncoding=function(ze){return xn||(xn=me("string_decoder/").StringDecoder),this._readableState.decoder=new xn(ze),this._readableState.encoding=ze,this};var mt=8388608;ce.prototype.read=function(ze){Vt("read",ze),ze=parseInt(ze,10);var Be=this._readableState,qe=ze;if(ze!==0&&(Be.emittedReadable=!1),ze===0&&Be.needReadable&&(Be.length>=Be.highWaterMark||Be.ended))return Vt("read: emitReadable",Be.length,Be.ended),Be.length===0&&Be.ended?bt(this):se(this),null;if((ze=oe(ze,Be))===0&&Be.ended)return Be.length===0&&bt(this),null;var Qe=Be.needReadable;Vt("need readable",Qe),(Be.length===0||Be.length-ze<Be.highWaterMark)&&(Qe=!0,Vt("length less than watermark",Qe)),Be.ended||Be.reading?(Qe=!1,Vt("reading or ended",Qe)):Qe&&(Vt("do read"),Be.reading=!0,Be.sync=!0,Be.length===0&&(Be.needReadable=!0),this._read(Be.highWaterMark),Be.sync=!1,Be.reading||(ze=oe(qe,Be)));var Ue;return Ue=ze>0?Je(ze,Be):null,Ue===null?(Be.needReadable=!0,ze=0):Be.length-=ze,Be.length===0&&(Be.ended||(Be.needReadable=!0),qe!==ze&&Be.ended&&bt(this)),Ue!==null&&this.emit("data",Ue),Ue},ce.prototype._read=function(ze){this.emit("error",new Error("_read() is not implemented"))},ce.prototype.pipe=function(ze,Be){function qe(kn,fn){Vt("onunpipe"),kn===Ze&&fn&&fn.hasUnpiped===!1&&(fn.hasUnpiped=!0,Ue())}function Qe(){Vt("onend"),ze.end()}function Ue(){Vt("cleanup"),ze.removeListener("close",Ae),ze.removeListener("finish",Ge),ze.removeListener("drain",nn),ze.removeListener("error",Re),ze.removeListener("unpipe",qe),Ze.removeListener("end",Qe),Ze.removeListener("end",Ke),Ze.removeListener("data",Xe),Jt=!0,!at.awaitDrain||ze._writableState&&!ze._writableState.needDrain||nn()}function Xe(kn){Vt("ondata"),mn=!1,ze.write(kn)!==!1||mn||((at.pipesCount===1&&at.pipes===ze||at.pipesCount>1&&St(at.pipes,ze)!==-1)&&!Jt&&(Vt("false write response, pause",Ze._readableState.awaitDrain),Ze._readableState.awaitDrain++,mn=!0),Ze.pause())}function Re(kn){Vt("onerror",kn),Ke(),ze.removeListener("error",Re),yt(ze,"error")===0&&ze.emit("error",kn)}function Ae(){ze.removeListener("finish",Ge),Ke()}function Ge(){Vt("onfinish"),ze.removeListener("close",Ae),Ke()}function Ke(){Vt("unpipe"),Ze.unpipe(ze)}var Ze=this,at=this._readableState;switch(at.pipesCount){case 0:at.pipes=ze;break;case 1:at.pipes=[at.pipes,ze];break;default:at.pipes.push(ze)}at.pipesCount+=1,Vt("pipe count=%d opts=%j",at.pipesCount,Be);var xt=(!Be||Be.end!==!1)&&ze!==Ce.stdout&&ze!==Ce.stderr,tn=xt?Qe:Ke;at.endEmitted?ht.nextTick(tn):Ze.once("end",tn),ze.on("unpipe",qe);var nn=be(Ze);ze.on("drain",nn);var Jt=!1,mn=!1;return Ze.on("data",Xe),xe(ze,"error",Re),ze.once("close",Ae),ze.once("finish",Ge),ze.emit("pipe",Ze),at.flowing||(Vt("pipe resume"),Ze.resume()),ze},ce.prototype.unpipe=function(ze){var Be=this._readableState,qe={hasUnpiped:!1};if(Be.pipesCount===0)return this;if(Be.pipesCount===1)return ze&&ze!==Be.pipes?this:(ze||(ze=Be.pipes),Be.pipes=null,Be.pipesCount=0,Be.flowing=!1,ze&&ze.emit("unpipe",this,qe),this);if(!ze){var Qe=Be.pipes,Ue=Be.pipesCount;Be.pipes=null,Be.pipesCount=0,Be.flowing=!1;for(var Xe=0;Xe<Ue;Xe++)Qe[Xe].emit("unpipe",this,qe);return this}var Re=St(Be.pipes,ze);return Re===-1?this:(Be.pipes.splice(Re,1),Be.pipesCount-=1,Be.pipesCount===1&&(Be.pipes=Be.pipes[0]),ze.emit("unpipe",this,qe),this)},ce.prototype.on=function(ze,Be){var qe=Et.prototype.on.call(this,ze,Be);if(ze==="data")this._readableState.flowing!==!1&&this.resume();else if(ze==="readable"){var Qe=this._readableState;Qe.endEmitted||Qe.readableListening||(Qe.readableListening=Qe.needReadable=!0,Qe.emittedReadable=!1,Qe.reading?Qe.length&&se(this):ht.nextTick(ke,this))}return qe},ce.prototype.addListener=ce.prototype.on,ce.prototype.resume=function(){var ze=this._readableState;return ze.flowing||(Vt("resume"),ze.flowing=!0,Ne(this,ze)),this},ce.prototype.pause=function(){return Vt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Vt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},ce.prototype.wrap=function(ze){var Be=this,qe=this._readableState,Qe=!1;ze.on("end",function(){if(Vt("wrapped end"),qe.decoder&&!qe.ended){var Re=qe.decoder.end();Re&&Re.length&&Be.push(Re)}Be.push(null)}),ze.on("data",function(Re){Vt("wrapped data"),qe.decoder&&(Re=qe.decoder.write(Re)),(!qe.objectMode||Re!=null)&&(qe.objectMode||Re&&Re.length)&&(Be.push(Re)||(Qe=!0,ze.pause()))});for(var Ue in ze)this[Ue]===void 0&&typeof ze[Ue]=="function"&&(this[Ue]=function(Re){return function(){return ze[Re].apply(ze,arguments)}}(Ue));for(var Xe=0;Xe<Xt.length;Xe++)ze.on(Xt[Xe],this.emit.bind(this,Xt[Xe]));return this._read=function(Re){Vt("wrapped _read",Re),Qe&&(Qe=!1,ze.resume())},this},Object.defineProperty(ce.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),ce._fromList=Je}).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,Ie,Te){"use strict";function Ce(ce,ve){var de=this._transformState;de.transforming=!1;var ue=de.writecb;if(!ue)return this.emit("error",new Error("write callback called multiple times"));de.writechunk=null,de.writecb=null,ve!=null&&this.push(ve),ue(ce);var z=this._readableState;z.reading=!1,(z.needReadable||z.length<z.highWaterMark)&&this._read(z.highWaterMark)}function _e(ce){if(!(this instanceof _e))return new _e(ce);xe.call(this,ce),this._transformState={afterTransform:Ce.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,ce&&(typeof ce.transform=="function"&&(this._transform=ce.transform),typeof ce.flush=="function"&&(this._flush=ce.flush)),this.on("prefinish",he)}function he(){var ce=this;typeof this._flush=="function"?this._flush(function(ve,de){Se(ce,ve,de)}):Se(this,null,null)}function Se(ce,ve,de){if(ve)return ce.emit("error",ve);if(de!=null&&ce.push(de),ce._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(ce._transformState.transforming)throw new Error("Calling transform done when still transforming");return ce.push(null)}Ie.exports=_e;var xe=me("./_stream_duplex"),ge=me("core-util-is");ge.inherits=me("inherits"),ge.inherits(_e,xe),_e.prototype.push=function(ce,ve){return this._transformState.needTransform=!1,xe.prototype.push.call(this,ce,ve)},_e.prototype._transform=function(ce,ve,de){throw new Error("_transform() is not implemented")},_e.prototype._write=function(ce,ve,de){var ue=this._transformState;if(ue.writecb=de,ue.writechunk=ce,ue.writeencoding=ve,!ue.transforming){var z=this._readableState;(ue.needTransform||z.needReadable||z.length<z.highWaterMark)&&this._read(z.highWaterMark)}},_e.prototype._read=function(ce){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},_e.prototype._destroy=function(ce,ve){var de=this;xe.prototype._destroy.call(this,ce,function(ue){ve(ue),de.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(me,Ie,Te){(function(Ce,_e){"use strict";function he(Zt){return Zt&&Zt.__esModule?Zt:{default:Zt}}function Se(Zt){var Xt=this;this.next=null,this.entry=null,this.finish=function(){gt(Xt,Zt)}}function xe(Zt){return un.from(Zt)}function ge(Zt){return un.isBuffer(Zt)||Zt instanceof Vt}function ce(){}function ve(Zt,Xt){yt=yt||me("./_stream_duplex"),Zt=Zt||{};var mt=Xt instanceof yt;this.objectMode=!!Zt.objectMode,mt&&(this.objectMode=this.objectMode||!!Zt.writableObjectMode);var ze=Zt.highWaterMark,Be=Zt.writableHighWaterMark,qe=this.objectMode?16:16384;this.highWaterMark=ze||ze===0?ze:mt&&(Be||Be===0)?Be:qe,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 Qe=Zt.decodeStrings===!1;this.decodeStrings=!Qe,this.defaultEncoding=Zt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ue){ye(Xt,Ue)},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 Se(this)}function de(Zt){if(yt=yt||me("./_stream_duplex"),!(Ut.call(de,this)||this instanceof yt))return new de(Zt);this._writableState=new ve(Zt,this),this.writable=!0,Zt&&(typeof Zt.write=="function"&&(this._write=Zt.write),typeof Zt.writev=="function"&&(this._writev=Zt.writev),typeof Zt.destroy=="function"&&(this._destroy=Zt.destroy),typeof Zt.final=="function"&&(this._final=Zt.final)),jt.call(this)}function ue(Zt,Xt){var mt=new Error("write after end");Zt.emit("error",mt),dt.nextTick(Xt,mt)}function z(Zt,Xt,mt,ze){var Be=!0,qe=!1;return mt===null?qe=new TypeError("May not write null values to stream"):typeof mt=="string"||mt===void 0||Xt.objectMode||(qe=new TypeError("Invalid non-string/buffer chunk")),qe&&(Zt.emit("error",qe),dt.nextTick(ze,qe),Be=!1),Be}function ee(Zt,Xt,mt){return Zt.objectMode||Zt.decodeStrings===!1||typeof Xt!="string"||(Xt=un.from(Xt,mt)),Xt}function oe(Zt,Xt,mt,ze,Be,qe){if(!mt){var Qe=ee(Xt,ze,Be);ze!==Qe&&(mt=!0,Be="buffer",ze=Qe)}var Ue=Xt.objectMode?1:ze.length;Xt.length+=Ue;var Xe=Xt.length<Xt.highWaterMark;if(Xe||(Xt.needDrain=!0),Xt.writing||Xt.corked){var Re=Xt.lastBufferedRequest;Xt.lastBufferedRequest={chunk:ze,encoding:Be,isBuf:mt,callback:qe,next:null},Re?Re.next=Xt.lastBufferedRequest:Xt.bufferedRequest=Xt.lastBufferedRequest,Xt.bufferedRequestCount+=1}else ie(Zt,Xt,!1,Ue,ze,Be,qe);return Xe}function ie(Zt,Xt,mt,ze,Be,qe,Qe){Xt.writelen=ze,Xt.writecb=Qe,Xt.writing=!0,Xt.sync=!0,mt?Zt._writev(Be,Xt.onwrite):Zt._write(Be,qe,Xt.onwrite),Xt.sync=!1}function se(Zt,Xt,mt,ze,Be){--Xt.pendingcb,mt?(dt.nextTick(Be,ze),dt.nextTick(Je,Zt,Xt),Zt._writableState.errorEmitted=!0,Zt.emit("error",ze)):(Be(ze),Zt._writableState.errorEmitted=!0,Zt.emit("error",ze),Je(Zt,Xt))}function le(Zt){Zt.writing=!1,Zt.writecb=null,Zt.length-=Zt.writelen,Zt.writelen=0}function ye(Zt,Xt){var mt=Zt._writableState,ze=mt.sync,Be=mt.writecb;if(le(mt),Xt)se(Zt,mt,ze,Xt,Be);else{var qe=Ne(mt);qe||mt.corked||mt.bufferProcessing||!mt.bufferedRequest||ke(Zt,mt),ze?Et(we,Zt,mt,qe,Be):we(Zt,mt,qe,Be)}}function we(Zt,Xt,mt,ze){mt||be(Zt,Xt),Xt.pendingcb--,ze(),Je(Zt,Xt)}function be(Zt,Xt){Xt.length===0&&Xt.needDrain&&(Xt.needDrain=!1,Zt.emit("drain"))}function ke(Zt,Xt){Xt.bufferProcessing=!0;var mt=Xt.bufferedRequest;if(Zt._writev&&mt&&mt.next){var ze=Xt.bufferedRequestCount,Be=new Array(ze),qe=Xt.corkedRequestsFree;qe.entry=mt;for(var Qe=0,Ue=!0;mt;)Be[Qe]=mt,mt.isBuf||(Ue=!1),mt=mt.next,Qe+=1;Be.allBuffers=Ue,ie(Zt,Xt,!0,Xt.length,Be,"",qe.finish),Xt.pendingcb++,Xt.lastBufferedRequest=null,qe.next?(Xt.corkedRequestsFree=qe.next,qe.next=null):Xt.corkedRequestsFree=new Se(Xt),Xt.bufferedRequestCount=0}else{for(;mt;){var Xe=mt.chunk,Re=mt.encoding,Ae=mt.callback;if(ie(Zt,Xt,!1,Xt.objectMode?1:Xe.length,Xe,Re,Ae),mt=mt.next,Xt.bufferedRequestCount--,Xt.writing)break}mt===null&&(Xt.lastBufferedRequest=null)}Xt.bufferedRequest=mt,Xt.bufferProcessing=!1}function Ne(Zt){return Zt.ending&&Zt.length===0&&Zt.bufferedRequest===null&&!Zt.finished&&!Zt.writing}function je(Zt,Xt){Zt._final(function(mt){Xt.pendingcb--,mt&&Zt.emit("error",mt),Xt.prefinished=!0,Zt.emit("prefinish"),Je(Zt,Xt)})}function Ve(Zt,Xt){Xt.prefinished||Xt.finalCalled||(typeof Zt._final=="function"?(Xt.pendingcb++,Xt.finalCalled=!0,dt.nextTick(je,Zt,Xt)):(Xt.prefinished=!0,Zt.emit("prefinish")))}function Je(Zt,Xt){var mt=Ne(Xt);return mt&&(Ve(Zt,Xt),Xt.pendingcb===0&&(Xt.finished=!0,Zt.emit("finish"))),mt}function We(Zt,Xt,mt){Xt.ending=!0,Je(Zt,Xt),mt&&(Xt.finished?dt.nextTick(mt):Zt.once("finish",mt)),Xt.ended=!0,Zt.writable=!1}function gt(Zt,Xt,mt){var ze=Zt.entry;for(Zt.entry=null;ze;){var Be=ze.callback;Xt.pendingcb--,Be(mt),ze=ze.next}Xt.corkedRequestsFree?Xt.corkedRequestsFree.next=Zt:Xt.corkedRequestsFree=Zt}var ut=me("babel-runtime/core-js/object/define-property"),bt=he(ut),rt=me("babel-runtime/core-js/symbol/has-instance"),St=he(rt),ct=me("babel-runtime/core-js/symbol"),Bt=he(ct),ht=me("babel-runtime/core-js/set-immediate"),it=he(ht),dt=me("process-nextick-args");Ie.exports=de;var yt,Et=!Ce.browser&&["v0.10","v0.9."].indexOf(Ce.version.slice(0,5))>-1?it.default:dt.nextTick;de.WritableState=ve;var vt=me("core-util-is");vt.inherits=me("inherits");var Rt={deprecate:me("util-deprecate")},jt=me("./internal/streams/stream"),un=me("safe-buffer").Buffer,Vt=_e.Uint8Array||function(){},xn=me("./internal/streams/destroy");vt.inherits(de,jt),ve.prototype.getBuffer=function(){for(var Zt=this.bufferedRequest,Xt=[];Zt;)Xt.push(Zt),Zt=Zt.next;return Xt},function(){try{Object.defineProperty(ve.prototype,"buffer",{get:Rt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Zt){}}();var Ut;typeof Bt.default=="function"&&St.default&&typeof Function.prototype[St.default]=="function"?(Ut=Function.prototype[St.default],(0,bt.default)(de,St.default,{value:function(Zt){return!!Ut.call(this,Zt)||this===de&&Zt&&Zt._writableState instanceof ve}})):Ut=function(Zt){return Zt instanceof this},de.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},de.prototype.write=function(Zt,Xt,mt){var ze=this._writableState,Be=!1,qe=!ze.objectMode&&ge(Zt);return qe&&!un.isBuffer(Zt)&&(Zt=xe(Zt)),typeof Xt=="function"&&(mt=Xt,Xt=null),qe?Xt="buffer":Xt||(Xt=ze.defaultEncoding),typeof mt!="function"&&(mt=ce),ze.ended?ue(this,mt):(qe||z(this,ze,Zt,mt))&&(ze.pendingcb++,Be=oe(this,ze,qe,Zt,Xt,mt)),Be},de.prototype.cork=function(){this._writableState.corked++},de.prototype.uncork=function(){var Zt=this._writableState;Zt.corked&&(Zt.corked--,Zt.writing||Zt.corked||Zt.finished||Zt.bufferProcessing||!Zt.bufferedRequest||ke(this,Zt))},de.prototype.setDefaultEncoding=function(Zt){if(typeof Zt=="string"&&(Zt=Zt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Zt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Zt);return this._writableState.defaultEncoding=Zt,this},Object.defineProperty(de.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),de.prototype._write=function(Zt,Xt,mt){mt(new Error("_write() is not implemented"))},de.prototype._writev=null,de.prototype.end=function(Zt,Xt,mt){var ze=this._writableState;typeof Zt=="function"?(mt=Zt,Zt=null,Xt=null):typeof Xt=="function"&&(mt=Xt,Xt=null),Zt!=null&&this.write(Zt,Xt),ze.corked&&(ze.corked=1,this.uncork()),ze.ending||ze.finished||We(this,ze,mt)},Object.defineProperty(de.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Zt){this._writableState&&(this._writableState.destroyed=Zt)}}),de.prototype.destroy=xn.destroy,de.prototype._undestroy=xn.undestroy,de.prototype._destroy=function(Zt,Xt){this.end(),Xt(Zt)}}).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,Ie,Te){"use strict";function Ce(xe,ge){if(!(xe instanceof ge))throw new TypeError("Cannot call a class as a function")}function _e(xe,ge,ce){xe.copy(ge,ce)}var he=me("safe-buffer").Buffer,Se=me("util");Ie.exports=function(){function xe(){Ce(this,xe),this.head=null,this.tail=null,this.length=0}return xe.prototype.push=function(ge){var ce={data:ge,next:null};this.length>0?this.tail.next=ce:this.head=ce,this.tail=ce,++this.length},xe.prototype.unshift=function(ge){var ce={data:ge,next:this.head};this.length===0&&(this.tail=ce),this.head=ce,++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 ce=this.head,ve=""+ce.data;ce=ce.next;)ve+=ge+ce.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 ce=he.allocUnsafe(ge>>>0),ve=this.head,de=0;ve;)_e(ve.data,ce,de),de+=ve.data.length,ve=ve.next;return ce},xe}(),Se&&Se.inspect&&Se.inspect.custom&&(Ie.exports.prototype[Se.inspect.custom]=function(){var xe=Se.inspect({length:this.length});return this.constructor.name+" "+xe})},{"safe-buffer":193,util:36}],185:[function(me,Ie,Te){"use strict";function Ce(xe,ge){var ce=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||Se.nextTick(he,this,xe),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(xe||null,function(ue){!ge&&ue?(Se.nextTick(he,ce,ue),ce._writableState&&(ce._writableState.errorEmitted=!0)):ge&&ge(ue)}),this)}function _e(){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 Se=me("process-nextick-args");Ie.exports={destroy:Ce,undestroy:_e}},{"process-nextick-args":172}],186:[function(me,Ie,Te){"use strict";Ie.exports=me("events").EventEmitter},{events:158}],187:[function(me,Ie,Te){Ie.exports=me("./readable").PassThrough},{"./readable":188}],188:[function(me,Ie,Te){Te=Ie.exports=me("./lib/_stream_readable.js"),Te.Stream=Te,Te.Readable=Te,Te.Writable=me("./lib/_stream_writable.js"),Te.Duplex=me("./lib/_stream_duplex.js"),Te.Transform=me("./lib/_stream_transform.js"),Te.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,Ie,Te){Ie.exports=me("./readable").Transform},{"./readable":188}],190:[function(me,Ie,Te){Ie.exports=me("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(me,Ie,Te){var Ce=function(){return this}()||Function("return this")(),_e=Ce.regeneratorRuntime&&Object.getOwnPropertyNames(Ce).indexOf("regeneratorRuntime")>=0,he=_e&&Ce.regeneratorRuntime;if(Ce.regeneratorRuntime=void 0,Ie.exports=me("./runtime"),_e)Ce.regeneratorRuntime=he;else try{delete Ce.regeneratorRuntime}catch(Se){Ce.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(me,Ie,Te){(function(Ce){"use strict";function _e(it,dt,yt,Et){var vt=dt&&dt.prototype instanceof Se?dt:Se,Rt=Object.create(vt.prototype),jt=new oe(Et||[]);return Rt._invoke=de(it,yt,jt),Rt}function he(it,dt,yt){try{return{type:"normal",arg:it.call(dt,yt)}}catch(Et){return{type:"throw",arg:Et}}}function Se(){}function xe(){}function ge(){}function ce(it){["next","throw","return"].forEach(function(dt){it[dt]=function(yt){return this._invoke(dt,yt)}})}function ve(it){function dt(vt,Rt,jt,un){var Vt=he(it[vt],it,Rt);if(Vt.type!=="throw"){var xn=Vt.arg,Ut=xn.value;return Ut&&typeof Ut=="object"&&we.call(Ut,"__await")?Promise.resolve(Ut.__await).then(function(Zt){dt("next",Zt,jt,un)},function(Zt){dt("throw",Zt,jt,un)}):Promise.resolve(Ut).then(function(Zt){xn.value=Zt,jt(xn)},un)}un(Vt.arg)}function yt(vt,Rt){function jt(){return new Promise(function(un,Vt){dt(vt,Rt,un,Vt)})}return Et=Et?Et.then(jt,jt):jt()}var Et;this._invoke=yt}function de(it,dt,yt){var Et=We;return function(vt,Rt){if(Et===ut)throw new Error("Generator is already running");if(Et===bt){if(vt==="throw")throw Rt;return se()}for(yt.method=vt,yt.arg=Rt;;){var jt=yt.delegate;if(jt){var un=ue(jt,yt);if(un){if(un===rt)continue;return un}}if(yt.method==="next")yt.sent=yt._sent=yt.arg;else if(yt.method==="throw"){if(Et===We)throw Et=bt,yt.arg;yt.dispatchException(yt.arg)}else yt.method==="return"&&yt.abrupt("return",yt.arg);Et=ut;var Vt=he(it,dt,yt);if(Vt.type==="normal"){if(Et=yt.done?bt:gt,Vt.arg===rt)continue;return{value:Vt.arg,done:yt.done}}Vt.type==="throw"&&(Et=bt,yt.method="throw",yt.arg=Vt.arg)}}}function ue(it,dt){var yt=it.iterator[dt.method];if(yt===le){if(dt.delegate=null,dt.method==="throw"){if(it.iterator.return&&(dt.method="return",dt.arg=le,ue(it,dt),dt.method==="throw"))return rt;dt.method="throw",dt.arg=new TypeError("The iterator does not provide a 'throw' method")}return rt}var Et=he(yt,it.iterator,dt.arg);if(Et.type==="throw")return dt.method="throw",dt.arg=Et.arg,dt.delegate=null,rt;var vt=Et.arg;return vt?vt.done?(dt[it.resultName]=vt.value,dt.next=it.nextLoc,dt.method!=="return"&&(dt.method="next",dt.arg=le),dt.delegate=null,rt):vt:(dt.method="throw",dt.arg=new TypeError("iterator result is not an object"),dt.delegate=null,rt)}function z(it){var dt={tryLoc:it[0]};1 in it&&(dt.catchLoc=it[1]),2 in it&&(dt.finallyLoc=it[2],dt.afterLoc=it[3]),this.tryEntries.push(dt)}function ee(it){var dt=it.completion||{};dt.type="normal",delete dt.arg,it.completion=dt}function oe(it){this.tryEntries=[{tryLoc:"root"}],it.forEach(z,this),this.reset(!0)}function ie(it){if(it){var dt=it[ke];if(dt)return dt.call(it);if(typeof it.next=="function")return it;if(!isNaN(it.length)){var yt=-1,Et=function vt(){for(;++yt<it.length;)if(we.call(it,yt))return vt.value=it[yt],vt.done=!1,vt;return vt.value=le,vt.done=!0,vt};return Et.next=Et}}return{next:se}}function se(){return{value:le,done:!0}}var le,ye=Object.prototype,we=ye.hasOwnProperty,be=typeof Symbol=="function"?Symbol:{},ke=be.iterator||"@@iterator",Ne=be.asyncIterator||"@@asyncIterator",je=be.toStringTag||"@@toStringTag",Ve=typeof Ie=="object",Je=Ce.regeneratorRuntime;if(Je)return void(Ve&&(Ie.exports=Je));Je=Ce.regeneratorRuntime=Ve?Ie.exports:{},Je.wrap=_e;var We="suspendedStart",gt="suspendedYield",ut="executing",bt="completed",rt={},St={};St[ke]=function(){return this};var ct=Object.getPrototypeOf,Bt=ct&&ct(ct(ie([])));Bt&&Bt!==ye&&we.call(Bt,ke)&&(St=Bt);var ht=ge.prototype=Se.prototype=Object.create(St);xe.prototype=ht.constructor=ge,ge.constructor=xe,ge[je]=xe.displayName="GeneratorFunction",Je.isGeneratorFunction=function(it){var dt=typeof it=="function"&&it.constructor;return!!dt&&(dt===xe||(dt.displayName||dt.name)==="GeneratorFunction")},Je.mark=function(it){return Object.setPrototypeOf?Object.setPrototypeOf(it,ge):(it.__proto__=ge,je in it||(it[je]="GeneratorFunction")),it.prototype=Object.create(ht),it},Je.awrap=function(it){return{__await:it}},ce(ve.prototype),ve.prototype[Ne]=function(){return this},Je.AsyncIterator=ve,Je.async=function(it,dt,yt,Et){var vt=new ve(_e(it,dt,yt,Et));return Je.isGeneratorFunction(dt)?vt:vt.next().then(function(Rt){return Rt.done?Rt.value:vt.next()})},ce(ht),ht[je]="Generator",ht[ke]=function(){return this},ht.toString=function(){return"[object Generator]"},Je.keys=function(it){var dt=[];for(var yt in it)dt.push(yt);return dt.reverse(),function Et(){for(;dt.length;){var vt=dt.pop();if(vt in it)return Et.value=vt,Et.done=!1,Et}return Et.done=!0,Et}},Je.values=ie,oe.prototype={constructor:oe,reset:function(it){if(this.prev=0,this.next=0,this.sent=this._sent=le,this.done=!1,this.delegate=null,this.method="next",this.arg=le,this.tryEntries.forEach(ee),!it)for(var dt in this)dt.charAt(0)==="t"&&we.call(this,dt)&&!isNaN(+dt.slice(1))&&(this[dt]=le)},stop:function(){this.done=!0;var it=this.tryEntries[0],dt=it.completion;if(dt.type==="throw")throw dt.arg;return this.rval},dispatchException:function(it){function dt(Vt,xn){return Rt.type="throw",Rt.arg=it,yt.next=Vt,xn&&(yt.method="next",yt.arg=le),!!xn}if(this.done)throw it;for(var yt=this,Et=this.tryEntries.length-1;Et>=0;--Et){var vt=this.tryEntries[Et],Rt=vt.completion;if(vt.tryLoc==="root")return dt("end");if(vt.tryLoc<=this.prev){var jt=we.call(vt,"catchLoc"),un=we.call(vt,"finallyLoc");if(jt&&un){if(this.prev<vt.catchLoc)return dt(vt.catchLoc,!0);if(this.prev<vt.finallyLoc)return dt(vt.finallyLoc)}else if(jt){if(this.prev<vt.catchLoc)return dt(vt.catchLoc,!0)}else{if(!un)throw new Error("try statement without catch or finally");if(this.prev<vt.finallyLoc)return dt(vt.finallyLoc)}}}},abrupt:function(it,dt){for(var yt=this.tryEntries.length-1;yt>=0;--yt){var Et=this.tryEntries[yt];if(Et.tryLoc<=this.prev&&we.call(Et,"finallyLoc")&&this.prev<Et.finallyLoc){var vt=Et;break}}vt&&(it==="break"||it==="continue")&&vt.tryLoc<=dt&&dt<=vt.finallyLoc&&(vt=null);var Rt=vt?vt.completion:{};return Rt.type=it,Rt.arg=dt,vt?(this.method="next",this.next=vt.finallyLoc,rt):this.complete(Rt)},complete:function(it,dt){if(it.type==="throw")throw it.arg;return it.type==="break"||it.type==="continue"?this.next=it.arg:it.type==="return"?(this.rval=this.arg=it.arg,this.method="return",this.next="end"):it.type==="normal"&&dt&&(this.next=dt),rt},finish:function(it){for(var dt=this.tryEntries.length-1;dt>=0;--dt){var yt=this.tryEntries[dt];if(yt.finallyLoc===it)return this.complete(yt.completion,yt.afterLoc),ee(yt),rt}},catch:function(it){for(var dt=this.tryEntries.length-1;dt>=0;--dt){var yt=this.tryEntries[dt];if(yt.tryLoc===it){var Et=yt.completion;if(Et.type==="throw"){var vt=Et.arg;ee(yt)}return vt}}throw new Error("illegal catch attempt")},delegateYield:function(it,dt,yt){return this.delegate={iterator:ie(it),resultName:dt,nextLoc:yt},this.method==="next"&&(this.arg=le),rt}}})(function(){return this}()||Function("return this")())},{}],193:[function(me,Ie,Te){function Ce(xe,ge){for(var ce in xe)ge[ce]=xe[ce]}function _e(xe,ge,ce){return Se(xe,ge,ce)}var he=me("buffer"),Se=he.Buffer;Se.from&&Se.alloc&&Se.allocUnsafe&&Se.allocUnsafeSlow?Ie.exports=he:(Ce(he,Te),Te.Buffer=_e),Ce(Se,_e),_e.from=function(xe,ge,ce){if(typeof xe=="number")throw new TypeError("Argument must not be a number");return Se(xe,ge,ce)},_e.alloc=function(xe,ge,ce){if(typeof xe!="number")throw new TypeError("Argument must be a number");var ve=Se(xe);return ge!==void 0?typeof ce=="string"?ve.fill(ge,ce):ve.fill(ge):ve.fill(0),ve},_e.allocUnsafe=function(xe){if(typeof xe!="number")throw new TypeError("Argument must be a number");return Se(xe)},_e.allocUnsafeSlow=function(xe){if(typeof xe!="number")throw new TypeError("Argument must be a number");return he.SlowBuffer(xe)}},{buffer:38}],194:[function(me,Ie,Te){(function(Ce){"use strict";function _e(se){return se&&se.__esModule?se:{default:se}}var he=me("babel-runtime/core-js/string/from-code-point"),Se=_e(he),xe=me("babel-runtime/core-js/json/stringify"),ge=_e(xe),ce=me("babel-runtime/helpers/typeof"),ve=_e(ce),de=me("babel-runtime/core-js/object/define-property"),ue=_e(de),z=me("babel-runtime/core-js/object/keys"),ee=_e(z),oe=me("babel-runtime/core-js/object/create"),ie=_e(oe);(function(se){function le(Ke,Ze){if(!(this instanceof le))return new le(Ke,Ze);var at=this;we(at),at.q=at.c="",at.bufferCheckPosition=se.MAX_BUFFER_LENGTH,at.opt=Ze||{},at.opt.lowercase=at.opt.lowercase||at.opt.lowercasetags,at.looseCase=at.opt.lowercase?"toLowerCase":"toUpperCase",at.tags=[],at.closed=at.closedRoot=at.sawRoot=!1,at.tag=at.error=null,at.strict=!!Ke,at.noscript=!(!Ke&&!at.opt.noscript),at.state=Ae.BEGIN,at.strictEntities=at.opt.strictEntities,at.ENTITIES=at.strictEntities?(0,ie.default)(se.XML_ENTITIES):(0,ie.default)(se.ENTITIES),at.attribList=[],at.opt.xmlns&&(at.ns=(0,ie.default)(qe)),at.trackPosition=at.opt.position!==!1,at.trackPosition&&(at.position=at.line=at.column=0),ut(at,"onready")}function ye(Ke){for(var Ze=Math.max(se.MAX_BUFFER_LENGTH,10),at=0,xt=0,tn=xn.length;xt<tn;xt++){var nn=Ke[xn[xt]].length;if(nn>Ze)switch(xn[xt]){case"textNode":rt(Ke);break;case"cdata":bt(Ke,"oncdata",Ke.cdata),Ke.cdata="";break;case"script":bt(Ke,"onscript",Ke.script),Ke.script="";break;default:ct(Ke,"Max buffer length exceeded: "+xn[xt])}at=Math.max(at,nn)}var Jt=se.MAX_BUFFER_LENGTH-at;Ke.bufferCheckPosition=Jt+Ke.position}function we(Ke){for(var Ze=0,at=xn.length;Ze<at;Ze++)Ke[xn[Ze]]=""}function be(Ke){rt(Ke),Ke.cdata!==""&&(bt(Ke,"oncdata",Ke.cdata),Ke.cdata=""),Ke.script!==""&&(bt(Ke,"onscript",Ke.script),Ke.script="")}function ke(Ke,Ze){return new Ne(Ke,Ze)}function Ne(Ke,Ze){if(!(this instanceof Ne))return new Ne(Ke,Ze);Ut.apply(this),this._parser=new le(Ke,Ze),this.writable=!0,this.readable=!0;var at=this;this._parser.onend=function(){at.emit("end")},this._parser.onerror=function(xt){at.emit("error",xt),at._parser.error=null},this._decoder=null,Zt.forEach(function(xt){(0,ue.default)(at,"on"+xt,{get:function(){return at._parser["on"+xt]},set:function(tn){if(!tn)return at.removeAllListeners(xt),at._parser["on"+xt]=tn,tn;at.on(xt,tn)},enumerable:!0,configurable:!1})})}function je(Ke){return Ke===" "||Ke===`
|
|
|
`||Ke==="\r"||Ke===" "}function Ve(Ke){return Ke==='"'||Ke==="'"}function Je(Ke){return Ke===">"||je(Ke)}function We(Ke,Ze){return Ke.test(Ze)}function gt(Ke,Ze){return!We(Ke,Ze)}function ut(Ke,Ze,at){Ke[Ze]&&Ke[Ze](at)}function bt(Ke,Ze,at){Ke.textNode&&rt(Ke),ut(Ke,Ze,at)}function rt(Ke){Ke.textNode=St(Ke.opt,Ke.textNode),Ke.textNode&&ut(Ke,"ontext",Ke.textNode),Ke.textNode=""}function St(Ke,Ze){return Ke.trim&&(Ze=Ze.trim()),Ke.normalize&&(Ze=Ze.replace(/\s+/g," ")),Ze}function ct(Ke,Ze){return rt(Ke),Ke.trackPosition&&(Ze+=`
|
|
|
Line: `+Ke.line+`
|
|
|
Column: `+Ke.column+`
|
|
|
Char: `+Ke.c),Ze=new Error(Ze),Ke.error=Ze,ut(Ke,"onerror",Ze),Ke}function Bt(Ke){return Ke.sawRoot&&!Ke.closedRoot&&ht(Ke,"Unclosed root tag"),Ke.state!==Ae.BEGIN&&Ke.state!==Ae.BEGIN_WHITESPACE&&Ke.state!==Ae.TEXT&&ct(Ke,"Unexpected end"),rt(Ke),Ke.c="",Ke.closed=!0,ut(Ke,"onend"),le.call(Ke,Ke.strict,Ke.opt),Ke}function ht(Ke,Ze){if((Ke===void 0?"undefined":(0,ve.default)(Ke))!=="object"||!(Ke instanceof le))throw new Error("bad call to strictFail");Ke.strict&&ct(Ke,Ze)}function it(Ke){Ke.strict||(Ke.tagName=Ke.tagName[Ke.looseCase]());var Ze=Ke.tags[Ke.tags.length-1]||Ke,at=Ke.tag={name:Ke.tagName,attributes:{}};Ke.opt.xmlns&&(at.ns=Ze.ns),Ke.attribList.length=0,bt(Ke,"onopentagstart",at)}function dt(Ke,Ze){var at=Ke.indexOf(":"),xt=at<0?["",Ke]:Ke.split(":"),tn=xt[0],nn=xt[1];return Ze&&Ke==="xmlns"&&(tn="xmlns",nn=""),{prefix:tn,local:nn}}function yt(Ke){if(Ke.strict||(Ke.attribName=Ke.attribName[Ke.looseCase]()),Ke.attribList.indexOf(Ke.attribName)!==-1||Ke.tag.attributes.hasOwnProperty(Ke.attribName))return void(Ke.attribName=Ke.attribValue="");if(Ke.opt.xmlns){var Ze=dt(Ke.attribName,!0),at=Ze.prefix,xt=Ze.local;if(at==="xmlns")if(xt==="xml"&&Ke.attribValue!==ze)ht(Ke,"xml: prefix must be bound to "+ze+`
|
|
|
Actual: `+Ke.attribValue);else if(xt==="xmlns"&&Ke.attribValue!==Be)ht(Ke,"xmlns: prefix must be bound to "+Be+`
|
|
|
Actual: `+Ke.attribValue);else{var tn=Ke.tag,nn=Ke.tags[Ke.tags.length-1]||Ke;tn.ns===nn.ns&&(tn.ns=(0,ie.default)(nn.ns)),tn.ns[xt]=Ke.attribValue}Ke.attribList.push([Ke.attribName,Ke.attribValue])}else Ke.tag.attributes[Ke.attribName]=Ke.attribValue,bt(Ke,"onattribute",{name:Ke.attribName,value:Ke.attribValue});Ke.attribName=Ke.attribValue=""}function Et(Ke,Ze){if(Ke.opt.xmlns){var at=Ke.tag,xt=dt(Ke.tagName);at.prefix=xt.prefix,at.local=xt.local,at.uri=at.ns[xt.prefix]||"",at.prefix&&!at.uri&&(ht(Ke,"Unbound namespace prefix: "+(0,ge.default)(Ke.tagName)),at.uri=xt.prefix);var tn=Ke.tags[Ke.tags.length-1]||Ke;at.ns&&tn.ns!==at.ns&&(0,ee.default)(at.ns).forEach(function(ki){bt(Ke,"onopennamespace",{prefix:ki,uri:at.ns[ki]})});for(var nn=0,Jt=Ke.attribList.length;nn<Jt;nn++){var mn=Ke.attribList[nn],kn=mn[0],fn=mn[1],Mn=dt(kn,!0),Zn=Mn.prefix,Tn=Mn.local,ci=Zn===""?"":at.ns[Zn]||"",ai={name:kn,value:fn,prefix:Zn,local:Tn,uri:ci};Zn&&Zn!=="xmlns"&&!ci&&(ht(Ke,"Unbound namespace prefix: "+(0,ge.default)(Zn)),ai.uri=Zn),Ke.tag.attributes[kn]=ai,bt(Ke,"onattribute",ai)}Ke.attribList.length=0}Ke.tag.isSelfClosing=!!Ze,Ke.sawRoot=!0,Ke.tags.push(Ke.tag),bt(Ke,"onopentag",Ke.tag),Ze||(Ke.noscript||Ke.tagName.toLowerCase()!=="script"?Ke.state=Ae.TEXT:Ke.state=Ae.SCRIPT,Ke.tag=null,Ke.tagName=""),Ke.attribName=Ke.attribValue="",Ke.attribList.length=0}function vt(Ke){if(!Ke.tagName)return ht(Ke,"Weird empty close tag."),Ke.textNode+="</>",void(Ke.state=Ae.TEXT);if(Ke.script){if(Ke.tagName!=="script")return Ke.script+="</"+Ke.tagName+">",Ke.tagName="",void(Ke.state=Ae.SCRIPT);bt(Ke,"onscript",Ke.script),Ke.script=""}var Ze=Ke.tags.length,at=Ke.tagName;Ke.strict||(at=at[Ke.looseCase]());for(var xt=at;Ze--&&Ke.tags[Ze].name!==xt;)ht(Ke,"Unexpected close tag");if(Ze<0)return ht(Ke,"Unmatched closing tag: "+Ke.tagName),Ke.textNode+="</"+Ke.tagName+">",void(Ke.state=Ae.TEXT);Ke.tagName=at;for(var tn=Ke.tags.length;tn-- >Ze;){var nn=Ke.tag=Ke.tags.pop();Ke.tagName=Ke.tag.name,bt(Ke,"onclosetag",Ke.tagName);var Jt={};for(var mn in nn.ns)Jt[mn]=nn.ns[mn];var kn=Ke.tags[Ke.tags.length-1]||Ke;Ke.opt.xmlns&&nn.ns!==kn.ns&&(0,ee.default)(nn.ns).forEach(function(fn){var Mn=nn.ns[fn];bt(Ke,"onclosenamespace",{prefix:fn,uri:Mn})})}Ze===0&&(Ke.closedRoot=!0),Ke.tagName=Ke.attribValue=Ke.attribName="",Ke.attribList.length=0,Ke.state=Ae.TEXT}function Rt(Ke){var Ze,at=Ke.entity,xt=at.toLowerCase(),tn="";return Ke.ENTITIES[at]?Ke.ENTITIES[at]:Ke.ENTITIES[xt]?Ke.ENTITIES[xt]:(at=xt,at.charAt(0)==="#"&&(at.charAt(1)==="x"?(at=at.slice(2),Ze=parseInt(at,16),tn=Ze.toString(16)):(at=at.slice(1),Ze=parseInt(at,10),tn=Ze.toString(10))),at=at.replace(/^0+/,""),isNaN(Ze)||tn.toLowerCase()!==at?(ht(Ke,"Invalid character entity"),"&"+Ke.entity+";"):(0,Se.default)(Ze))}function jt(Ke,Ze){Ze==="<"?(Ke.state=Ae.OPEN_WAKA,Ke.startTagPosition=Ke.position):je(Ze)||(ht(Ke,"Non-whitespace before first tag."),Ke.textNode=Ze,Ke.state=Ae.TEXT)}function un(Ke,Ze){var at="";return Ze<Ke.length&&(at=Ke.charAt(Ze)),at}function Vt(Ke){var Ze=this;if(this.error)throw this.error;if(Ze.closed)return ct(Ze,"Cannot write after close. Assign an onready handler.");if(Ke===null)return Bt(Ze);(Ke===void 0?"undefined":(0,ve.default)(Ke))==="object"&&(Ke=Ke.toString());for(var at=0,xt="";xt=un(Ke,at++),Ze.c=xt,!!xt;)switch(Ze.trackPosition&&(Ze.position++,xt===`
|
|
|
`?(Ze.line++,Ze.column=0):Ze.column++),Ze.state){case Ae.BEGIN:if(Ze.state=Ae.BEGIN_WHITESPACE,xt==="\uFEFF")continue;jt(Ze,xt);continue;case Ae.BEGIN_WHITESPACE:jt(Ze,xt);continue;case Ae.TEXT:if(Ze.sawRoot&&!Ze.closedRoot){for(var tn=at-1;xt&&xt!=="<"&&xt!=="&";)(xt=un(Ke,at++))&&Ze.trackPosition&&(Ze.position++,xt===`
|
|
|
`?(Ze.line++,Ze.column=0):Ze.column++);Ze.textNode+=Ke.substring(tn,at-1)}xt!=="<"||Ze.sawRoot&&Ze.closedRoot&&!Ze.strict?(je(xt)||Ze.sawRoot&&!Ze.closedRoot||ht(Ze,"Text data outside of root node."),xt==="&"?Ze.state=Ae.TEXT_ENTITY:Ze.textNode+=xt):(Ze.state=Ae.OPEN_WAKA,Ze.startTagPosition=Ze.position);continue;case Ae.SCRIPT:xt==="<"?Ze.state=Ae.SCRIPT_ENDING:Ze.script+=xt;continue;case Ae.SCRIPT_ENDING:xt==="/"?Ze.state=Ae.CLOSE_TAG:(Ze.script+="<"+xt,Ze.state=Ae.SCRIPT);continue;case Ae.OPEN_WAKA:if(xt==="!")Ze.state=Ae.SGML_DECL,Ze.sgmlDecl="";else if(!je(xt))if(We(Qe,xt))Ze.state=Ae.OPEN_TAG,Ze.tagName=xt;else if(xt==="/")Ze.state=Ae.CLOSE_TAG,Ze.tagName="";else if(xt==="?")Ze.state=Ae.PROC_INST,Ze.procInstName=Ze.procInstBody="";else{if(ht(Ze,"Unencoded <"),Ze.startTagPosition+1<Ze.position){var nn=Ze.position-Ze.startTagPosition;xt=new Array(nn).join(" ")+xt}Ze.textNode+="<"+xt,Ze.state=Ae.TEXT}continue;case Ae.SGML_DECL:(Ze.sgmlDecl+xt).toUpperCase()===Xt?(bt(Ze,"onopencdata"),Ze.state=Ae.CDATA,Ze.sgmlDecl="",Ze.cdata=""):Ze.sgmlDecl+xt==="--"?(Ze.state=Ae.COMMENT,Ze.comment="",Ze.sgmlDecl=""):(Ze.sgmlDecl+xt).toUpperCase()===mt?(Ze.state=Ae.DOCTYPE,(Ze.doctype||Ze.sawRoot)&&ht(Ze,"Inappropriately located doctype declaration"),Ze.doctype="",Ze.sgmlDecl=""):xt===">"?(bt(Ze,"onsgmldeclaration",Ze.sgmlDecl),Ze.sgmlDecl="",Ze.state=Ae.TEXT):(Ve(xt)&&(Ze.state=Ae.SGML_DECL_QUOTED),Ze.sgmlDecl+=xt);continue;case Ae.SGML_DECL_QUOTED:xt===Ze.q&&(Ze.state=Ae.SGML_DECL,Ze.q=""),Ze.sgmlDecl+=xt;continue;case Ae.DOCTYPE:xt===">"?(Ze.state=Ae.TEXT,bt(Ze,"ondoctype",Ze.doctype),Ze.doctype=!0):(Ze.doctype+=xt,xt==="["?Ze.state=Ae.DOCTYPE_DTD:Ve(xt)&&(Ze.state=Ae.DOCTYPE_QUOTED,Ze.q=xt));continue;case Ae.DOCTYPE_QUOTED:Ze.doctype+=xt,xt===Ze.q&&(Ze.q="",Ze.state=Ae.DOCTYPE);continue;case Ae.DOCTYPE_DTD:Ze.doctype+=xt,xt==="]"?Ze.state=Ae.DOCTYPE:Ve(xt)&&(Ze.state=Ae.DOCTYPE_DTD_QUOTED,Ze.q=xt);continue;case Ae.DOCTYPE_DTD_QUOTED:Ze.doctype+=xt,xt===Ze.q&&(Ze.state=Ae.DOCTYPE_DTD,Ze.q="");continue;case Ae.COMMENT:xt==="-"?Ze.state=Ae.COMMENT_ENDING:Ze.comment+=xt;continue;case Ae.COMMENT_ENDING:xt==="-"?(Ze.state=Ae.COMMENT_ENDED,Ze.comment=St(Ze.opt,Ze.comment),Ze.comment&&bt(Ze,"oncomment",Ze.comment),Ze.comment=""):(Ze.comment+="-"+xt,Ze.state=Ae.COMMENT);continue;case Ae.COMMENT_ENDED:xt!==">"?(ht(Ze,"Malformed comment"),Ze.comment+="--"+xt,Ze.state=Ae.COMMENT):Ze.state=Ae.TEXT;continue;case Ae.CDATA:xt==="]"?Ze.state=Ae.CDATA_ENDING:Ze.cdata+=xt;continue;case Ae.CDATA_ENDING:xt==="]"?Ze.state=Ae.CDATA_ENDING_2:(Ze.cdata+="]"+xt,Ze.state=Ae.CDATA);continue;case Ae.CDATA_ENDING_2:xt===">"?(Ze.cdata&&bt(Ze,"oncdata",Ze.cdata),bt(Ze,"onclosecdata"),Ze.cdata="",Ze.state=Ae.TEXT):xt==="]"?Ze.cdata+="]":(Ze.cdata+="]]"+xt,Ze.state=Ae.CDATA);continue;case Ae.PROC_INST:xt==="?"?Ze.state=Ae.PROC_INST_ENDING:je(xt)?Ze.state=Ae.PROC_INST_BODY:Ze.procInstName+=xt;continue;case Ae.PROC_INST_BODY:if(!Ze.procInstBody&&je(xt))continue;xt==="?"?Ze.state=Ae.PROC_INST_ENDING:Ze.procInstBody+=xt;continue;case Ae.PROC_INST_ENDING:xt===">"?(bt(Ze,"onprocessinginstruction",{name:Ze.procInstName,body:Ze.procInstBody}),Ze.procInstName=Ze.procInstBody="",Ze.state=Ae.TEXT):(Ze.procInstBody+="?"+xt,Ze.state=Ae.PROC_INST_BODY);continue;case Ae.OPEN_TAG:We(Ue,xt)?Ze.tagName+=xt:(it(Ze),xt===">"?Et(Ze):xt==="/"?Ze.state=Ae.OPEN_TAG_SLASH:(je(xt)||ht(Ze,"Invalid character in tag name"),Ze.state=Ae.ATTRIB));continue;case Ae.OPEN_TAG_SLASH:xt===">"?(Et(Ze,!0),vt(Ze)):(ht(Ze,"Forward-slash in opening tag not followed by >"),Ze.state=Ae.ATTRIB);continue;case Ae.ATTRIB:if(je(xt))continue;xt===">"?Et(Ze):xt==="/"?Ze.state=Ae.OPEN_TAG_SLASH:We(Qe,xt)?(Ze.attribName=xt,Ze.attribValue="",Ze.state=Ae.ATTRIB_NAME):ht(Ze,"Invalid attribute name");continue;case Ae.ATTRIB_NAME:xt==="="?Ze.state=Ae.ATTRIB_VALUE:xt===">"?(ht(Ze,"Attribute without value"),Ze.attribValue=Ze.attribName,yt(Ze),Et(Ze)):je(xt)?Ze.state=Ae.ATTRIB_NAME_SAW_WHITE:We(Ue,xt)?Ze.attribName+=xt:ht(Ze,"Invalid attribute name");continue;case Ae.ATTRIB_NAME_SAW_WHITE:if(xt==="=")Ze.state=Ae.ATTRIB_VALUE;else{if(je(xt))continue;ht(Ze,"Attribute without value"),Ze.tag.attributes[Ze.attribName]="",Ze.attribValue="",bt(Ze,"onattribute",{name:Ze.attribName,value:""}),Ze.attribName="",xt===">"?Et(Ze):We(Qe,xt)?(Ze.attribName=xt,Ze.state=Ae.ATTRIB_NAME):(ht(Ze,"Invalid attribute name"),Ze.state=Ae.ATTRIB)}continue;case Ae.ATTRIB_VALUE:if(je(xt))continue;Ve(xt)?(Ze.q=xt,Ze.state=Ae.ATTRIB_VALUE_QUOTED):(ht(Ze,"Unquoted attribute value"),Ze.state=Ae.ATTRIB_VALUE_UNQUOTED,Ze.attribValue=xt);continue;case Ae.ATTRIB_VALUE_QUOTED:if(xt!==Ze.q){xt==="&"?Ze.state=Ae.ATTRIB_VALUE_ENTITY_Q:Ze.attribValue+=xt;continue}yt(Ze),Ze.q="",Ze.state=Ae.ATTRIB_VALUE_CLOSED;continue;case Ae.ATTRIB_VALUE_CLOSED:je(xt)?Ze.state=Ae.ATTRIB:xt===">"?Et(Ze):xt==="/"?Ze.state=Ae.OPEN_TAG_SLASH:We(Qe,xt)?(ht(Ze,"No whitespace between attributes"),Ze.attribName=xt,Ze.attribValue="",Ze.state=Ae.ATTRIB_NAME):ht(Ze,"Invalid attribute name");continue;case Ae.ATTRIB_VALUE_UNQUOTED:if(!Je(xt)){xt==="&"?Ze.state=Ae.ATTRIB_VALUE_ENTITY_U:Ze.attribValue+=xt;continue}yt(Ze),xt===">"?Et(Ze):Ze.state=Ae.ATTRIB;continue;case Ae.CLOSE_TAG:if(Ze.tagName)xt===">"?vt(Ze):We(Ue,xt)?Ze.tagName+=xt:Ze.script?(Ze.script+="</"+Ze.tagName,Ze.tagName="",Ze.state=Ae.SCRIPT):(je(xt)||ht(Ze,"Invalid tagname in closing tag"),Ze.state=Ae.CLOSE_TAG_SAW_WHITE);else{if(je(xt))continue;gt(Qe,xt)?Ze.script?(Ze.script+="</"+xt,Ze.state=Ae.SCRIPT):ht(Ze,"Invalid tagname in closing tag."):Ze.tagName=xt}continue;case Ae.CLOSE_TAG_SAW_WHITE:if(je(xt))continue;xt===">"?vt(Ze):ht(Ze,"Invalid characters in closing tag");continue;case Ae.TEXT_ENTITY:case Ae.ATTRIB_VALUE_ENTITY_Q:case Ae.ATTRIB_VALUE_ENTITY_U:var Jt,mn;switch(Ze.state){case Ae.TEXT_ENTITY:Jt=Ae.TEXT,mn="textNode";break;case Ae.ATTRIB_VALUE_ENTITY_Q:Jt=Ae.ATTRIB_VALUE_QUOTED,mn="attribValue";break;case Ae.ATTRIB_VALUE_ENTITY_U:Jt=Ae.ATTRIB_VALUE_UNQUOTED,mn="attribValue"}xt===";"?(Ze[mn]+=Rt(Ze),Ze.entity="",Ze.state=Jt):We(Ze.entity.length?Re:Xe,xt)?Ze.entity+=xt:(ht(Ze,"Invalid character in entity name"),Ze[mn]+="&"+Ze.entity+xt,Ze.entity="",Ze.state=Jt);continue;default:throw new Error(Ze,"Unknown state: "+Ze.state)}return Ze.position>=Ze.bufferCheckPosition&&ye(Ze),Ze}se.parser=function(Ke,Ze){return new le(Ke,Ze)},se.SAXParser=le,se.SAXStream=Ne,se.createStream=ke,se.MAX_BUFFER_LENGTH=65536;var xn=["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(Ke){function Ze(){}return Ze.prototype=Ke,new Ze}),ee.default||(Object.keys=function(Ke){var Ze=[];for(var at in Ke)Ke.hasOwnProperty(at)&&Ze.push(at);return Ze}),le.prototype={end:function(){Bt(this)},write:Vt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){be(this)}};var Ut;try{Ut=me("stream").Stream}catch(Ke){Ut=function(){}}var Zt=se.EVENTS.filter(function(Ke){return Ke!=="error"&&Ke!=="end"});Ne.prototype=(0,ie.default)(Ut.prototype,{constructor:{value:Ne}}),Ne.prototype.write=function(Ke){if(typeof Ce=="function"&&typeof Ce.isBuffer=="function"&&Ce.isBuffer(Ke)){if(!this._decoder){var Ze=me("string_decoder").StringDecoder;this._decoder=new Ze("utf8")}Ke=this._decoder.write(Ke)}return this._parser.write(Ke.toString()),this.emit("data",Ke),!0},Ne.prototype.end=function(Ke){return Ke&&Ke.length&&this.write(Ke),this._parser.end(),!0},Ne.prototype.on=function(Ke,Ze){var at=this;return at._parser["on"+Ke]||Zt.indexOf(Ke)===-1||(at._parser["on"+Ke]=function(){var xt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);xt.splice(0,0,Ke),at.emit.apply(at,xt)}),Ut.prototype.on.call(at,Ke,Ze)};var Xt="[CDATA[",mt="DOCTYPE",ze="http://www.w3.org/XML/1998/namespace",Be="http://www.w3.org/2000/xmlns/",qe={xml:ze,xmlns:Be},Qe=/[:_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]/,Ue=/[:_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-]/,Xe=/[#:_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]/,Re=/[#:_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-]/,Ae=0;se.STATE={BEGIN:Ae++,BEGIN_WHITESPACE:Ae++,TEXT:Ae++,TEXT_ENTITY:Ae++,OPEN_WAKA:Ae++,SGML_DECL:Ae++,SGML_DECL_QUOTED:Ae++,DOCTYPE:Ae++,DOCTYPE_QUOTED:Ae++,DOCTYPE_DTD:Ae++,DOCTYPE_DTD_QUOTED:Ae++,COMMENT_STARTING:Ae++,COMMENT:Ae++,COMMENT_ENDING:Ae++,COMMENT_ENDED:Ae++,CDATA:Ae++,CDATA_ENDING:Ae++,CDATA_ENDING_2:Ae++,PROC_INST:Ae++,PROC_INST_BODY:Ae++,PROC_INST_ENDING:Ae++,OPEN_TAG:Ae++,OPEN_TAG_SLASH:Ae++,ATTRIB:Ae++,ATTRIB_NAME:Ae++,ATTRIB_NAME_SAW_WHITE:Ae++,ATTRIB_VALUE:Ae++,ATTRIB_VALUE_QUOTED:Ae++,ATTRIB_VALUE_CLOSED:Ae++,ATTRIB_VALUE_UNQUOTED:Ae++,ATTRIB_VALUE_ENTITY_Q:Ae++,ATTRIB_VALUE_ENTITY_U:Ae++,CLOSE_TAG:Ae++,CLOSE_TAG_SAW_WHITE:Ae++,SCRIPT:Ae++,SCRIPT_ENDING:Ae++},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(Ke){var Ze=se.ENTITIES[Ke],at=typeof Ze=="number"?String.fromCharCode(Ze):Ze;se.ENTITIES[Ke]=at});for(var Ge in se.STATE)se.STATE[se.STATE[Ge]]=Ge;Ae=se.STATE,Se.default||function(){var Ke=String.fromCharCode,Ze=Math.floor,at=function(){var xt,tn,nn=[],Jt=-1,mn=arguments.length;if(!mn)return"";for(var kn="";++Jt<mn;){var fn=Number(arguments[Jt]);if(!isFinite(fn)||fn<0||fn>1114111||Ze(fn)!==fn)throw RangeError("Invalid code point: "+fn);fn<=65535?nn.push(fn):(fn-=65536,xt=55296+(fn>>10),tn=fn%1024+56320,nn.push(xt,tn)),(Jt+1===mn||nn.length>16384)&&(kn+=Ke.apply(null,nn),nn.length=0)}return kn};ue.default?Object.defineProperty(String,"fromCodePoint",{value:at,configurable:!0,writable:!0}):String.fromCodePoint=at}()})(Te===void 0?(void 0).sax={}:Te)}).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,Ie,Te){function Ce(){_e.call(this)}Ie.exports=Ce;var _e=me("events").EventEmitter;me("inherits")(Ce,_e),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,Se){function xe(oe){he.writable&&he.write(oe)===!1&&z.pause&&z.pause()}function ge(){z.readable&&z.resume&&z.resume()}function ce(){ee||(ee=!0,he.end())}function ve(){ee||(ee=!0,typeof he.destroy=="function"&&he.destroy())}function de(oe){if(ue(),_e.listenerCount(this,"error")===0)throw oe}function ue(){z.removeListener("data",xe),he.removeListener("drain",ge),z.removeListener("end",ce),z.removeListener("close",ve),z.removeListener("error",de),he.removeListener("error",de),z.removeListener("end",ue),z.removeListener("close",ue),he.removeListener("close",ue)}var z=this;z.on("data",xe),he.on("drain",ge),he._isStdio||Se&&Se.end===!1||(z.on("end",ce),z.on("close",ve));var ee=!1;return z.on("error",de),he.on("error",de),z.on("end",ue),z.on("close",ue),he.on("close",ue),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,Ie,Te){(function(Ce){var _e=me("./lib/request"),he=me("./lib/response"),Se=me("xtend"),xe=me("builtin-status-codes"),ge=me("url"),ce=Te;ce.request=function(ve,de){ve=typeof ve=="string"?ge.parse(ve):Se(ve);var ue=Ce.location.protocol.search(/^https?:$/)===-1?"http:":"",z=ve.protocol||ue,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 _e(ve);return de&&se.on("response",de),se},ce.get=function(ve,de){var ue=ce.request(ve,de);return ue.end(),ue},ce.ClientRequest=_e,ce.IncomingMessage=he.IncomingMessage,ce.Agent=function(){},ce.Agent.defaultMaxSockets=4,ce.globalAgent=new ce.Agent,ce.STATUS_CODES=xe,ce.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,Ie,Te){(function(Ce){"use strict";function _e(){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=_e();if(!de)return!1;try{return de.responseType=ve,de.responseType===ve}catch(ue){}return!1}function Se(ve){return typeof ve=="function"}Te.fetch=Se(Ce.fetch)&&Se(Ce.ReadableStream),Te.writableStream=Se(Ce.WritableStream),Te.abortController=Se(Ce.AbortController),Te.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Te.blobConstructor=!0}catch(ve){}var xe,ge=Ce.ArrayBuffer!==void 0,ce=ge&&Se(Ce.ArrayBuffer.prototype.slice);Te.arraybuffer=Te.fetch||ge&&he("arraybuffer"),Te.msstream=!Te.fetch&&ce&&he("ms-stream"),Te.mozchunkedarraybuffer=!Te.fetch&&ge&&he("moz-chunked-arraybuffer"),Te.overrideMimeType=Te.fetch||!!_e()&&Se(_e().overrideMimeType),Te.vbArray=Se(Ce.VBArray),xe=null}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(me,Ie,Te){(function(Ce,_e,he){"use strict";function Se(ye,we){return ve.fetch&&we?"fetch":ve.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ve.msstream?"ms-stream":ve.arraybuffer&&ye?"arraybuffer":ve.vbArray&&ye?"text:vbarray":"text"}function xe(ye){try{var we=ye.status;return we!==null&&we!==0}catch(be){return!1}}var ge=me("babel-runtime/core-js/object/keys"),ce=function(ye){return ye&&ye.__esModule?ye:{default:ye}}(ge),ve=me("./capability"),de=me("inherits"),ue=me("./response"),z=me("readable-stream"),ee=me("to-arraybuffer"),oe=ue.IncomingMessage,ie=ue.readyStates,se=Ie.exports=function(ye){var we=this;z.Writable.call(we),we._opts=ye,we._body=[],we._headers={},ye.auth&&we.setHeader("Authorization","Basic "+new he(ye.auth).toString("base64")),(0,ce.default)(ye.headers).forEach(function(Ne){we.setHeader(Ne,ye.headers[Ne])});var be,ke=!0;if(ye.mode==="disable-fetch"||"requestTimeout"in ye&&!ve.abortController)ke=!1,be=!0;else if(ye.mode==="prefer-streaming")be=!1;else if(ye.mode==="allow-wrong-content-type")be=!ve.overrideMimeType;else{if(ye.mode&&ye.mode!=="default"&&ye.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");be=!0}we._mode=Se(be,ke),we._fetchTimer=null,we.on("finish",function(){we._onFinish()})};de(se,z.Writable),se.prototype.setHeader=function(ye,we){var be=this,ke=ye.toLowerCase();le.indexOf(ke)===-1&&(be._headers[ke]={name:ye,value:we})},se.prototype.getHeader=function(ye){var we=this._headers[ye.toLowerCase()];return we?we.value:null},se.prototype.removeHeader=function(ye){delete this._headers[ye.toLowerCase()]},se.prototype._onFinish=function(){var ye=this;if(!ye._destroyed){var we=ye._opts,be=ye._headers,ke=null;we.method!=="GET"&&we.method!=="HEAD"&&(ke=ve.arraybuffer?ee(he.concat(ye._body)):ve.blobConstructor?new _e.Blob(ye._body.map(function(We){return ee(We)}),{type:(be["content-type"]||{}).value||""}):he.concat(ye._body).toString());var Ne=[];if((0,ce.default)(be).forEach(function(We){var gt=be[We].name,ut=be[We].value;Array.isArray(ut)?ut.forEach(function(bt){Ne.push([gt,bt])}):Ne.push([gt,ut])}),ye._mode==="fetch"){var je=null;if(ve.abortController){var Ve=new AbortController;je=Ve.signal,ye._fetchAbortController=Ve,"requestTimeout"in we&&we.requestTimeout!==0&&(ye._fetchTimer=_e.setTimeout(function(){ye.emit("requestTimeout"),ye._fetchAbortController&&ye._fetchAbortController.abort()},we.requestTimeout))}_e.fetch(ye._opts.url,{method:ye._opts.method,headers:Ne,body:ke||void 0,mode:"cors",credentials:we.withCredentials?"include":"same-origin",signal:je}).then(function(We){ye._fetchResponse=We,ye._connect()},function(We){_e.clearTimeout(ye._fetchTimer),ye._destroyed||ye.emit("error",We)})}else{var Je=ye._xhr=new _e.XMLHttpRequest;try{Je.open(ye._opts.method,ye._opts.url,!0)}catch(We){return void Ce.nextTick(function(){ye.emit("error",We)})}"responseType"in Je&&(Je.responseType=ye._mode.split(":")[0]),"withCredentials"in Je&&(Je.withCredentials=!!we.withCredentials),ye._mode==="text"&&"overrideMimeType"in Je&&Je.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in we&&(Je.timeout=we.requestTimeout,Je.ontimeout=function(){ye.emit("requestTimeout")}),Ne.forEach(function(We){Je.setRequestHeader(We[0],We[1])}),ye._response=null,Je.onreadystatechange=function(){switch(Je.readyState){case ie.LOADING:case ie.DONE:ye._onXHRProgress()}},ye._mode==="moz-chunked-arraybuffer"&&(Je.onprogress=function(){ye._onXHRProgress()}),Je.onerror=function(){ye._destroyed||ye.emit("error",new Error("XHR error"))};try{Je.send(ke)}catch(We){return void Ce.nextTick(function(){ye.emit("error",We)})}}}},se.prototype._onXHRProgress=function(){var ye=this;xe(ye._xhr)&&!ye._destroyed&&(ye._response||ye._connect(),ye._response._onXHRProgress())},se.prototype._connect=function(){var ye=this;ye._destroyed||(ye._response=new oe(ye._xhr,ye._fetchResponse,ye._mode,ye._fetchTimer),ye._response.on("error",function(we){ye.emit("error",we)}),ye.emit("response",ye._response))},se.prototype._write=function(ye,we,be){this._body.push(ye),be()},se.prototype.abort=se.prototype.destroy=function(){var ye=this;ye._destroyed=!0,_e.clearTimeout(ye._fetchTimer),ye._response&&(ye._response._destroyed=!0),ye._xhr?ye._xhr.abort():ye._fetchAbortController&&ye._fetchAbortController.abort()},se.prototype.end=function(ye,we,be){var ke=this;typeof ye=="function"&&(be=ye,ye=void 0),z.Writable.prototype.end.call(ke,ye,we,be)},se.prototype.flushHeaders=function(){},se.prototype.setTimeout=function(){},se.prototype.setNoDelay=function(){},se.prototype.setSocketKeepAlive=function(){};var le=["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,Ie,Te){(function(Ce,_e,he){"use strict";var Se=me("babel-runtime/core-js/promise"),xe=function(z){return z&&z.__esModule?z:{default:z}}(Se),ge=me("./capability"),ce=me("inherits"),ve=me("readable-stream"),de=Te.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},ue=Te.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(ke,Ne){se.headers[Ne.toLowerCase()]=ke,se.rawHeaders.push(Ne,ke)}),ge.writableStream){var le=new WritableStream({write:function(ke){return new xe.default(function(Ne,je){se._destroyed?je():se.push(new he(ke))?Ne():se._resumeFetch=Ne})},close:function(){_e.clearTimeout(ie),se._destroyed||se.push(null)},abort:function(ke){se._destroyed||se.emit("error",ke)}});try{return void ee.body.pipeTo(le).catch(function(ke){_e.clearTimeout(ie),se._destroyed||se.emit("error",ke)})}catch(ke){}}var ye=ee.body.getReader();(function ke(){ye.read().then(function(Ne){if(!se._destroyed){if(Ne.done)return _e.clearTimeout(ie),void se.push(null);se.push(new he(Ne.value)),ke()}}).catch(function(Ne){_e.clearTimeout(ie),se._destroyed||se.emit("error",Ne)})})()}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(ke){var Ne=ke.match(/^([^:]+):\s*(.*)/);if(Ne){var je=Ne[1].toLowerCase();je==="set-cookie"?(se.headers[je]===void 0&&(se.headers[je]=[]),se.headers[je].push(Ne[2])):se.headers[je]!==void 0?se.headers[je]+=", "+Ne[2]:se.headers[je]=Ne[2],se.rawHeaders.push(Ne[1],Ne[2])}}),se._charset="x-user-defined",!ge.overrideMimeType){var we=se.rawHeaders["mime-type"];if(we){var be=we.match(/;\s*charset=([^;])(;|$)/);be&&(se._charset=be[1].toLowerCase())}se._charset||(se._charset="utf-8")}};ce(ue,ve.Readable),ue.prototype._read=function(){var z=this,ee=z._resumeFetch;ee&&(z._resumeFetch=null,ee())},ue.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 _e.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),le=0;le<ie.length;le++)se[le]=255&ie.charCodeAt(le);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 ye=new _e.MSStreamReader;ye.onprogress=function(){ye.result.byteLength>z._pos&&(z.push(new he(new Uint8Array(ye.result.slice(z._pos)))),z._pos=ye.result.byteLength)},ye.onload=function(){z.push(null)},ye.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,Ie,Te){"use strict";function Ce(we){if(!we)return"utf8";for(var be;;)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(be)return;we=(""+we).toLowerCase(),be=!0}}function _e(we){var be=Ce(we);if(typeof be!="string"&&(le.isEncoding===ye||!ye(we)))throw new Error("Unknown encoding: "+we);return be||we}function he(we){this.encoding=_e(we);var be;switch(this.encoding){case"utf16le":this.text=ue,this.end=z,be=4;break;case"utf8":this.fillLast=ce,be=4;break;case"base64":this.text=ee,this.end=oe,be=3;break;default:return this.write=ie,void(this.end=se)}this.lastNeed=0,this.lastTotal=0,this.lastChar=le.allocUnsafe(be)}function Se(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,be,ke){var Ne=be.length-1;if(Ne<ke)return 0;var je=Se(be[Ne]);return je>=0?(je>0&&(we.lastNeed=je-1),je):--Ne<ke||je===-2?0:(je=Se(be[Ne]))>=0?(je>0&&(we.lastNeed=je-2),je):--Ne<ke||je===-2?0:(je=Se(be[Ne]),je>=0?(je>0&&(je===2?je=0:we.lastNeed=je-3),je):0)}function ge(we,be,ke){if((192&be[0])!=128)return we.lastNeed=0,"\u951F\uFFFD";if(we.lastNeed>1&&be.length>1){if((192&be[1])!=128)return we.lastNeed=1,"\u951F\uFFFD";if(we.lastNeed>2&&be.length>2&&(192&be[2])!=128)return we.lastNeed=2,"\u951F\uFFFD"}}function ce(we){var be=this.lastTotal-this.lastNeed,ke=ge(this,we,be);return ke!==void 0?ke:this.lastNeed<=we.length?(we.copy(this.lastChar,be,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(we.copy(this.lastChar,be,0,we.length),void(this.lastNeed-=we.length))}function ve(we,be){var ke=xe(this,we,be);if(!this.lastNeed)return we.toString("utf8",be);this.lastTotal=ke;var Ne=we.length-(ke-this.lastNeed);return we.copy(this.lastChar,0,Ne),we.toString("utf8",be,Ne)}function de(we){var be=we&&we.length?this.write(we):"";return this.lastNeed?be+"\u951F\uFFFD":be}function ue(we,be){if((we.length-be)%2==0){var ke=we.toString("utf16le",be);if(ke){var Ne=ke.charCodeAt(ke.length-1);if(Ne>=55296&&Ne<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=we[we.length-2],this.lastChar[1]=we[we.length-1],ke.slice(0,-1)}return ke}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=we[we.length-1],we.toString("utf16le",be,we.length-1)}function z(we){var be=we&&we.length?this.write(we):"";if(this.lastNeed){var ke=this.lastTotal-this.lastNeed;return be+this.lastChar.toString("utf16le",0,ke)}return be}function ee(we,be){var ke=(we.length-be)%3;return ke===0?we.toString("base64",be):(this.lastNeed=3-ke,this.lastTotal=3,ke===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",be,we.length-ke))}function oe(we){var be=we&&we.length?this.write(we):"";return this.lastNeed?be+this.lastChar.toString("base64",0,3-this.lastNeed):be}function ie(we){return we.toString(this.encoding)}function se(we){return we&&we.length?this.write(we):""}var le=me("safe-buffer").Buffer,ye=le.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}};Te.StringDecoder=he,he.prototype.write=function(we){if(we.length===0)return"";var be,ke;if(this.lastNeed){if((be=this.fillLast(we))===void 0)return"";ke=this.lastNeed,this.lastNeed=0}else ke=0;return ke<we.length?be?be+this.text(we,ke):this.text(we,ke):be||""},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,Ie,Te){(function(Ce,_e){function he(de,ue){this._id=de,this._clearFn=ue}var Se=me("process/browser.js").nextTick,xe=Function.prototype.apply,ge=Array.prototype.slice,ce={},ve=0;Te.setTimeout=function(){return new he(xe.call(setTimeout,window,arguments),clearTimeout)},Te.setInterval=function(){return new he(xe.call(setInterval,window,arguments),clearInterval)},Te.clearTimeout=Te.clearInterval=function(de){de.close()},he.prototype.unref=he.prototype.ref=function(){},he.prototype.close=function(){this._clearFn.call(window,this._id)},Te.enroll=function(de,ue){clearTimeout(de._idleTimeoutId),de._idleTimeout=ue},Te.unenroll=function(de){clearTimeout(de._idleTimeoutId),de._idleTimeout=-1},Te._unrefActive=Te.active=function(de){clearTimeout(de._idleTimeoutId);var ue=de._idleTimeout;ue>=0&&(de._idleTimeoutId=setTimeout(function(){de._onTimeout&&de._onTimeout()},ue))},Te.setImmediate=typeof Ce=="function"?Ce:function(de){var ue=ve++,z=!(arguments.length<2)&&ge.call(arguments,1);return ce[ue]=!0,Se(function(){ce[ue]&&(z?de.apply(null,z):de.call(null),Te.clearImmediate(ue))}),ue},Te.clearImmediate=typeof _e=="function"?_e:function(de){delete ce[de]}}).call(this,me("timers").setImmediate,me("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(me,Ie,Te){var Ce=me("buffer").Buffer;Ie.exports=function(_e){if(_e instanceof Uint8Array){if(_e.byteOffset===0&&_e.byteLength===_e.buffer.byteLength)return _e.buffer;if(typeof _e.buffer.slice=="function")return _e.buffer.slice(_e.byteOffset,_e.byteOffset+_e.byteLength)}if(Ce.isBuffer(_e)){for(var he=new Uint8Array(_e.length),Se=_e.length,xe=0;xe<Se;xe++)he[xe]=_e[xe];return he.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(me,Ie,Te){"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 _e(je,Ve,Je){if(je&&ce.isObject(je)&&je instanceof Ce)return je;var We=new Ce;return We.parse(je,Ve,Je),We}function he(je){return ce.isString(je)&&(je=_e(je)),je instanceof Ce?je.format():Ce.prototype.format.call(je)}function Se(je,Ve){return _e(je,!1,!0).resolve(Ve)}function xe(je,Ve){return je?_e(je,!1,!0).resolveObject(Ve):Ve}var ge=me("punycode"),ce=me("./util");Te.parse=_e,Te.resolve=Se,Te.resolveObject=xe,Te.format=he,Te.Url=Ce;var ve=/^([a-z0-9.+-]+:)/i,de=/:[0-9]*$/,ue=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,z=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],ee=["{","}","|","\\","^","`"].concat(z),oe=["'"].concat(ee),ie=["%","/","?",";","#"].concat(oe),se=["/","?","#"],le=/^[+a-z0-9A-Z_-]{0,63}$/,ye=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,we={javascript:!0,"javascript:":!0},be={javascript:!0,"javascript:":!0},ke={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Ne=me("querystring");Ce.prototype.parse=function(je,Ve,Je){if(!ce.isString(je))throw new TypeError("Parameter 'url' must be a string, not "+typeof je);var We=je.indexOf("?"),gt=We!==-1&&We<je.indexOf("#")?"?":"#",ut=je.split(gt),bt=/\\/g;ut[0]=ut[0].replace(bt,"/"),je=ut.join(gt);var rt=je;if(rt=rt.trim(),!Je&&je.split("#").length===1){var St=ue.exec(rt);if(St)return this.path=rt,this.href=rt,this.pathname=St[1],St[2]?(this.search=St[2],this.query=Ve?Ne.parse(this.search.substr(1)):this.search.substr(1)):Ve&&(this.search="",this.query={}),this}var ct=ve.exec(rt);if(ct){ct=ct[0];var Bt=ct.toLowerCase();this.protocol=Bt,rt=rt.substr(ct.length)}if(Je||ct||rt.match(/^\/\/[^@\/]+@[^@\/]+/)){var ht=rt.substr(0,2)==="//";!ht||ct&&be[ct]||(rt=rt.substr(2),this.slashes=!0)}if(!be[ct]&&(ht||ct&&!ke[ct])){for(var it=-1,dt=0;dt<se.length;dt++){var yt=rt.indexOf(se[dt]);yt!==-1&&(it===-1||yt<it)&&(it=yt)}var Et,vt;vt=it===-1?rt.lastIndexOf("@"):rt.lastIndexOf("@",it),vt!==-1&&(Et=rt.slice(0,vt),rt=rt.slice(vt+1),this.auth=decodeURIComponent(Et)),it=-1;for(var dt=0;dt<ie.length;dt++){var yt=rt.indexOf(ie[dt]);yt!==-1&&(it===-1||yt<it)&&(it=yt)}it===-1&&(it=rt.length),this.host=rt.slice(0,it),rt=rt.slice(it),this.parseHost(),this.hostname=this.hostname||"";var Rt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Rt)for(var jt=this.hostname.split(/\./),dt=0,un=jt.length;dt<un;dt++){var Vt=jt[dt];if(Vt&&!Vt.match(le)){for(var xn="",Ut=0,Zt=Vt.length;Ut<Zt;Ut++)Vt.charCodeAt(Ut)>127?xn+="x":xn+=Vt[Ut];if(!xn.match(le)){var Xt=jt.slice(0,dt),mt=jt.slice(dt+1),ze=Vt.match(ye);ze&&(Xt.push(ze[1]),mt.unshift(ze[2])),mt.length&&(rt="/"+mt.join(".")+rt),this.hostname=Xt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Rt||(this.hostname=ge.toASCII(this.hostname));var Be=this.port?":"+this.port:"",qe=this.hostname||"";this.host=qe+Be,this.href+=this.host,Rt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),rt[0]!=="/"&&(rt="/"+rt))}if(!we[Bt])for(var dt=0,un=oe.length;dt<un;dt++){var Qe=oe[dt];if(rt.indexOf(Qe)!==-1){var Ue=encodeURIComponent(Qe);Ue===Qe&&(Ue=escape(Qe)),rt=rt.split(Qe).join(Ue)}}var Xe=rt.indexOf("#");Xe!==-1&&(this.hash=rt.substr(Xe),rt=rt.slice(0,Xe));var Re=rt.indexOf("?");if(Re!==-1?(this.search=rt.substr(Re),this.query=rt.substr(Re+1),Ve&&(this.query=Ne.parse(this.query)),rt=rt.slice(0,Re)):Ve&&(this.search="",this.query={}),rt&&(this.pathname=rt),ke[Bt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Be=this.pathname||"",Ae=this.search||"";this.path=Be+Ae}return this.href=this.format(),this},Ce.prototype.format=function(){var je=this.auth||"";je&&(je=encodeURIComponent(je),je=je.replace(/%3A/i,":"),je+="@");var Ve=this.protocol||"",Je=this.pathname||"",We=this.hash||"",gt=!1,ut="";this.host?gt=je+this.host:this.hostname&&(gt=je+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(gt+=":"+this.port)),this.query&&ce.isObject(this.query)&&Object.keys(this.query).length&&(ut=Ne.stringify(this.query));var bt=this.search||ut&&"?"+ut||"";return Ve&&Ve.substr(-1)!==":"&&(Ve+=":"),this.slashes||(!Ve||ke[Ve])&>!==!1?(gt="//"+(gt||""),Je&&Je.charAt(0)!=="/"&&(Je="/"+Je)):gt||(gt=""),We&&We.charAt(0)!=="#"&&(We="#"+We),bt&&bt.charAt(0)!=="?"&&(bt="?"+bt),Je=Je.replace(/[?#]/g,function(rt){return encodeURIComponent(rt)}),bt=bt.replace("#","%23"),Ve+gt+Je+bt+We},Ce.prototype.resolve=function(je){return this.resolveObject(_e(je,!1,!0)).format()},Ce.prototype.resolveObject=function(je){if(ce.isString(je)){var Ve=new Ce;Ve.parse(je,!1,!0),je=Ve}for(var Je=new Ce,We=Object.keys(this),gt=0;gt<We.length;gt++){var ut=We[gt];Je[ut]=this[ut]}if(Je.hash=je.hash,je.href==="")return Je.href=Je.format(),Je;if(je.slashes&&!je.protocol){for(var bt=Object.keys(je),rt=0;rt<bt.length;rt++){var St=bt[rt];St!=="protocol"&&(Je[St]=je[St])}return ke[Je.protocol]&&Je.hostname&&!Je.pathname&&(Je.path=Je.pathname="/"),Je.href=Je.format(),Je}if(je.protocol&&je.protocol!==Je.protocol){if(!ke[je.protocol]){for(var ct=Object.keys(je),Bt=0;Bt<ct.length;Bt++){var ht=ct[Bt];Je[ht]=je[ht]}return Je.href=Je.format(),Je}if(Je.protocol=je.protocol,je.host||be[je.protocol])Je.pathname=je.pathname;else{for(var un=(je.pathname||"").split("/");un.length&&!(je.host=un.shift()););je.host||(je.host=""),je.hostname||(je.hostname=""),un[0]!==""&&un.unshift(""),un.length<2&&un.unshift(""),Je.pathname=un.join("/")}if(Je.search=je.search,Je.query=je.query,Je.host=je.host||"",Je.auth=je.auth,Je.hostname=je.hostname||je.host,Je.port=je.port,Je.pathname||Je.search){var it=Je.pathname||"",dt=Je.search||"";Je.path=it+dt}return Je.slashes=Je.slashes||je.slashes,Je.href=Je.format(),Je}var yt=Je.pathname&&Je.pathname.charAt(0)==="/",Et=je.host||je.pathname&&je.pathname.charAt(0)==="/",vt=Et||yt||Je.host&&je.pathname,Rt=vt,jt=Je.pathname&&Je.pathname.split("/")||[],un=je.pathname&&je.pathname.split("/")||[],Vt=Je.protocol&&!ke[Je.protocol];if(Vt&&(Je.hostname="",Je.port=null,Je.host&&(jt[0]===""?jt[0]=Je.host:jt.unshift(Je.host)),Je.host="",je.protocol&&(je.hostname=null,je.port=null,je.host&&(un[0]===""?un[0]=je.host:un.unshift(je.host)),je.host=null),vt=vt&&(un[0]===""||jt[0]==="")),Et)Je.host=je.host||je.host===""?je.host:Je.host,Je.hostname=je.hostname||je.hostname===""?je.hostname:Je.hostname,Je.search=je.search,Je.query=je.query,jt=un;else if(un.length)jt||(jt=[]),jt.pop(),jt=jt.concat(un),Je.search=je.search,Je.query=je.query;else if(!ce.isNullOrUndefined(je.search)){if(Vt){Je.hostname=Je.host=jt.shift();var xn=!!(Je.host&&Je.host.indexOf("@")>0)&&Je.host.split("@");xn&&(Je.auth=xn.shift(),Je.host=Je.hostname=xn.shift())}return Je.search=je.search,Je.query=je.query,ce.isNull(Je.pathname)&&ce.isNull(Je.search)||(Je.path=(Je.pathname?Je.pathname:"")+(Je.search?Je.search:"")),Je.href=Je.format(),Je}if(!jt.length)return Je.pathname=null,Je.search?Je.path="/"+Je.search:Je.path=null,Je.href=Je.format(),Je;for(var Ut=jt.slice(-1)[0],Zt=(Je.host||je.host||jt.length>1)&&(Ut==="."||Ut==="..")||Ut==="",Xt=0,mt=jt.length;mt>=0;mt--)Ut=jt[mt],Ut==="."?jt.splice(mt,1):Ut===".."?(jt.splice(mt,1),Xt++):Xt&&(jt.splice(mt,1),Xt--);if(!vt&&!Rt)for(;Xt--;Xt)jt.unshift("..");!vt||jt[0]===""||jt[0]&&jt[0].charAt(0)==="/"||jt.unshift(""),Zt&&jt.join("/").substr(-1)!=="/"&&jt.push("");var ze=jt[0]===""||jt[0]&&jt[0].charAt(0)==="/";if(Vt){Je.hostname=Je.host=ze?"":jt.length?jt.shift():"";var xn=!!(Je.host&&Je.host.indexOf("@")>0)&&Je.host.split("@");xn&&(Je.auth=xn.shift(),Je.host=Je.hostname=xn.shift())}return vt=vt||Je.host&&jt.length,vt&&!ze&&jt.unshift(""),jt.length?Je.pathname=jt.join("/"):(Je.pathname=null,Je.path=null),ce.isNull(Je.pathname)&&ce.isNull(Je.search)||(Je.path=(Je.pathname?Je.pathname:"")+(Je.search?Je.search:"")),Je.auth=je.auth||Je.auth,Je.slashes=Je.slashes||je.slashes,Je.href=Je.format(),Je},Ce.prototype.parseHost=function(){var je=this.host,Ve=de.exec(je);Ve&&(Ve=Ve[0],Ve!==":"&&(this.port=Ve.substr(1)),je=je.substr(0,je.length-Ve.length)),je&&(this.hostname=je)}},{"./util":204,punycode:174,querystring:177}],204:[function(me,Ie,Te){"use strict";Ie.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,Ie,Te){(function(Ce){function _e(Se,xe){function ge(){if(!ce){if(he("throwDeprecation"))throw new Error(xe);he("traceDeprecation")?console.trace(xe):console.warn(xe),ce=!0}return Se.apply(this,arguments)}if(he("noDeprecation"))return Se;var ce=!1;return ge}function he(Se){try{if(!Ce.localStorage)return!1}catch(ge){return!1}var xe=Ce.localStorage[Se];return xe!=null&&String(xe).toLowerCase()==="true"}Ie.exports=_e}).call(this,typeof Ee.g!="undefined"?Ee.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(me,Ie,Te){Ie.exports=function(Ce){return Ce&&typeof Ce=="object"&&typeof Ce.copy=="function"&&typeof Ce.fill=="function"&&typeof Ce.readUInt8=="function"}},{}],207:[function(me,Ie,Te){(function(Ce,_e){function he(dt,yt){var Et={seen:[],stylize:xe};return arguments.length>=3&&(Et.depth=arguments[2]),arguments.length>=4&&(Et.colors=arguments[3]),ie(yt)?Et.showHidden=yt:yt&&Te._extend(Et,yt),ke(Et.showHidden)&&(Et.showHidden=!1),ke(Et.depth)&&(Et.depth=2),ke(Et.colors)&&(Et.colors=!1),ke(Et.customInspect)&&(Et.customInspect=!0),Et.colors&&(Et.stylize=Se),ce(Et,dt,Et.depth)}function Se(dt,yt){var Et=he.styles[yt];return Et?"\x1B["+he.colors[Et][0]+"m"+dt+"\x1B["+he.colors[Et][1]+"m":dt}function xe(dt,yt){return dt}function ge(dt){var yt={};return dt.forEach(function(Et,vt){yt[Et]=!0}),yt}function ce(dt,yt,Et){if(dt.customInspect&&yt&&We(yt.inspect)&&yt.inspect!==Te.inspect&&(!yt.constructor||yt.constructor.prototype!==yt)){var vt=yt.inspect(Et,dt);return we(vt)||(vt=ce(dt,vt,Et)),vt}var Rt=ve(dt,yt);if(Rt)return Rt;var jt=Object.keys(yt),un=ge(jt);if(dt.showHidden&&(jt=Object.getOwnPropertyNames(yt)),Je(yt)&&(jt.indexOf("message")>=0||jt.indexOf("description")>=0))return de(yt);if(jt.length===0){if(We(yt)){var Vt=yt.name?": "+yt.name:"";return dt.stylize("[Function"+Vt+"]","special")}if(Ne(yt))return dt.stylize(RegExp.prototype.toString.call(yt),"regexp");if(Ve(yt))return dt.stylize(Date.prototype.toString.call(yt),"date");if(Je(yt))return de(yt)}var xn="",Ut=!1,Zt=["{","}"];if(oe(yt)&&(Ut=!0,Zt=["[","]"]),We(yt)&&(xn=" [Function"+(yt.name?": "+yt.name:"")+"]"),Ne(yt)&&(xn=" "+RegExp.prototype.toString.call(yt)),Ve(yt)&&(xn=" "+Date.prototype.toUTCString.call(yt)),Je(yt)&&(xn=" "+de(yt)),jt.length===0&&(!Ut||yt.length==0))return Zt[0]+xn+Zt[1];if(Et<0)return Ne(yt)?dt.stylize(RegExp.prototype.toString.call(yt),"regexp"):dt.stylize("[Object]","special");dt.seen.push(yt);var Xt;return Xt=Ut?ue(dt,yt,Et,un,jt):jt.map(function(mt){return z(dt,yt,Et,un,mt,Ut)}),dt.seen.pop(),ee(Xt,xn,Zt)}function ve(dt,yt){if(ke(yt))return dt.stylize("undefined","undefined");if(we(yt)){var Et="'"+JSON.stringify(yt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return dt.stylize(Et,"string")}return ye(yt)?dt.stylize(""+yt,"number"):ie(yt)?dt.stylize(""+yt,"boolean"):se(yt)?dt.stylize("null","null"):void 0}function de(dt){return"["+Error.prototype.toString.call(dt)+"]"}function ue(dt,yt,Et,vt,Rt){for(var jt=[],un=0,Vt=yt.length;un<Vt;++un)St(yt,String(un))?jt.push(z(dt,yt,Et,vt,String(un),!0)):jt.push("");return Rt.forEach(function(xn){xn.match(/^\d+$/)||jt.push(z(dt,yt,Et,vt,xn,!0))}),jt}function z(dt,yt,Et,vt,Rt,jt){var un,Vt,xn;if(xn=Object.getOwnPropertyDescriptor(yt,Rt)||{value:yt[Rt]},xn.get?Vt=xn.set?dt.stylize("[Getter/Setter]","special"):dt.stylize("[Getter]","special"):xn.set&&(Vt=dt.stylize("[Setter]","special")),St(vt,Rt)||(un="["+Rt+"]"),Vt||(dt.seen.indexOf(xn.value)<0?(Vt=se(Et)?ce(dt,xn.value,null):ce(dt,xn.value,Et-1),Vt.indexOf(`
|
|
|
`)>-1&&(Vt=jt?Vt.split(`
|
|
|
`).map(function(Ut){return" "+Ut}).join(`
|
|
|
`).substr(2):`
|
|
|
`+Vt.split(`
|
|
|
`).map(function(Ut){return" "+Ut}).join(`
|
|
|
`))):Vt=dt.stylize("[Circular]","special")),ke(un)){if(jt&&Rt.match(/^\d+$/))return Vt;un=JSON.stringify(""+Rt),un.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(un=un.substr(1,un.length-2),un=dt.stylize(un,"name")):(un=un.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),un=dt.stylize(un,"string"))}return un+": "+Vt}function ee(dt,yt,Et){var vt=0;return dt.reduce(function(Rt,jt){return vt++,jt.indexOf(`
|
|
|
`)>=0&&vt++,Rt+jt.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?Et[0]+(yt===""?"":yt+`
|
|
|
`)+" "+dt.join(`,
|
|
|
`)+" "+Et[1]:Et[0]+yt+" "+dt.join(", ")+" "+Et[1]}function oe(dt){return Array.isArray(dt)}function ie(dt){return typeof dt=="boolean"}function se(dt){return dt===null}function le(dt){return dt==null}function ye(dt){return typeof dt=="number"}function we(dt){return typeof dt=="string"}function be(dt){return typeof dt=="symbol"}function ke(dt){return dt===void 0}function Ne(dt){return je(dt)&&ut(dt)==="[object RegExp]"}function je(dt){return typeof dt=="object"&&dt!==null}function Ve(dt){return je(dt)&&ut(dt)==="[object Date]"}function Je(dt){return je(dt)&&(ut(dt)==="[object Error]"||dt instanceof Error)}function We(dt){return typeof dt=="function"}function gt(dt){return dt===null||typeof dt=="boolean"||typeof dt=="number"||typeof dt=="string"||typeof dt=="symbol"||dt===void 0}function ut(dt){return Object.prototype.toString.call(dt)}function bt(dt){return dt<10?"0"+dt.toString(10):dt.toString(10)}function rt(){var dt=new Date,yt=[bt(dt.getHours()),bt(dt.getMinutes()),bt(dt.getSeconds())].join(":");return[dt.getDate(),it[dt.getMonth()],yt].join(" ")}function St(dt,yt){return Object.prototype.hasOwnProperty.call(dt,yt)}var ct=/%[sdj%]/g;Te.format=function(dt){if(!we(dt)){for(var yt=[],Et=0;Et<arguments.length;Et++)yt.push(he(arguments[Et]));return yt.join(" ")}for(var Et=1,vt=arguments,Rt=vt.length,jt=String(dt).replace(ct,function(xn){if(xn==="%%")return"%";if(Et>=Rt)return xn;switch(xn){case"%s":return String(vt[Et++]);case"%d":return Number(vt[Et++]);case"%j":try{return JSON.stringify(vt[Et++])}catch(Ut){return"[Circular]"}default:return xn}}),un=vt[Et];Et<Rt;un=vt[++Et])se(un)||!je(un)?jt+=" "+un:jt+=" "+he(un);return jt},Te.deprecate=function(dt,yt){function Et(){if(!vt){if(Ce.throwDeprecation)throw new Error(yt);Ce.traceDeprecation?console.trace(yt):console.error(yt),vt=!0}return dt.apply(this,arguments)}if(ke(_e.process))return function(){return Te.deprecate(dt,yt).apply(this,arguments)};if(Ce.noDeprecation===!0)return dt;var vt=!1;return Et};var Bt,ht={};Te.debuglog=function(dt){if(ke(Bt)&&(Bt=Ce.env.NODE_DEBUG||""),dt=dt.toUpperCase(),!ht[dt])if(new RegExp("\\b"+dt+"\\b","i").test(Bt)){var yt=Ce.pid;ht[dt]=function(){var Et=Te.format.apply(Te,arguments);console.error("%s %d: %s",dt,yt,Et)}}else ht[dt]=function(){};return ht[dt]},Te.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"},Te.isArray=oe,Te.isBoolean=ie,Te.isNull=se,Te.isNullOrUndefined=le,Te.isNumber=ye,Te.isString=we,Te.isSymbol=be,Te.isUndefined=ke,Te.isRegExp=Ne,Te.isObject=je,Te.isDate=Ve,Te.isError=Je,Te.isFunction=We,Te.isPrimitive=gt,Te.isBuffer=me("./support/isBuffer");var it=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Te.log=function(){console.log("%s - %s",rt(),Te.format.apply(Te,arguments))},Te.inherits=me("inherits"),Te._extend=function(dt,yt){if(!yt||!je(yt))return dt;for(var Et=Object.keys(yt),vt=Et.length;vt--;)dt[Et[vt]]=yt[Et[vt]];return dt}}).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,Ie,Te){"use strict";(function(){Te.stripBOM=function(Ce){return Ce[0]==="\uFEFF"?Ce.substring(1):Ce}}).call(void 0)},{}],209:[function(me,Ie,Te){"use strict";function Ce(ge){return ge&&ge.__esModule?ge:{default:ge}}var _e=me("babel-runtime/helpers/typeof"),he=Ce(_e),Se=me("babel-runtime/core-js/object/keys"),xe=Ce(Se);(function(){var ge,ce,ve,de,ue,z={}.hasOwnProperty;ge=me("xmlbuilder"),ce=me("./defaults").defaults,de=function(ee){return typeof ee=="string"&&(ee.indexOf("&")>=0||ee.indexOf(">")>=0||ee.indexOf("<")>=0)},ue=function(ee){return"<![CDATA["+ve(ee)+"]]>"},ve=function(ee){return ee.replace("]]>","]]]]><![CDATA[>")},Te.Builder=function(){function ee(oe){var ie,se,le;this.options={},se=ce[.2];for(ie in se)z.call(se,ie)&&(le=se[ie],this.options[ie]=le);for(ie in oe)z.call(oe,ie)&&(le=oe[ie],this.options[ie]=le)}return ee.prototype.buildObject=function(oe){var ie,se,le,ye,we;return ie=this.options.attrkey,se=this.options.charkey,(0,xe.default)(oe).length===1&&this.options.rootName===ce[.2].rootName?(we=(0,xe.default)(oe)[0],oe=oe[we]):we=this.options.rootName,le=function(be){return function(ke,Ne){var je,Ve,Je,We,gt,ut;if((Ne===void 0?"undefined":(0,he.default)(Ne))!=="object")be.options.cdata&&de(Ne)?ke.raw(ue(Ne)):ke.txt(Ne);else if(Array.isArray(Ne)){for(We in Ne)if(z.call(Ne,We)){Ve=Ne[We];for(gt in Ve)Je=Ve[gt],ke=le(ke.ele(gt),Je).up()}}else for(gt in Ne)if(z.call(Ne,gt))if(Ve=Ne[gt],gt===ie){if((Ve===void 0?"undefined":(0,he.default)(Ve))==="object")for(je in Ve)ut=Ve[je],ke=ke.att(je,ut)}else if(gt===se)ke=be.options.cdata&&de(Ve)?ke.raw(ue(Ve)):ke.txt(Ve);else if(Array.isArray(Ve))for(We in Ve)z.call(Ve,We)&&(Je=Ve[We],ke=typeof Je=="string"?be.options.cdata&&de(Je)?ke.ele(gt).raw(ue(Je)).up():ke.ele(gt,Je).up():le(ke.ele(gt),Je).up());else(Ve===void 0?"undefined":(0,he.default)(Ve))==="object"?ke=le(ke.ele(gt),Ve).up():typeof Ve=="string"&&be.options.cdata&&de(Ve)?ke=ke.ele(gt).raw(ue(Ve)).up():(Ve==null&&(Ve=""),ke=ke.ele(gt,Ve.toString()).up());return ke}}(this),ye=ge.create(we,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),le(ye,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,Ie,Te){"use strict";(function(){Te.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,Ie,Te){"use strict";function Ce(ve){return ve&&ve.__esModule?ve:{default:ve}}var _e=me("babel-runtime/core-js/object/get-own-property-names"),he=Ce(_e),Se=me("babel-runtime/core-js/object/keys"),xe=Ce(Se),ge=me("babel-runtime/helpers/typeof"),ce=Ce(ge);(function(){var ve,de,ue,z,ee,oe,ie,se,le=function(be,ke){return function(){return be.apply(ke,arguments)}},ye=function(be,ke){function Ne(){this.constructor=be}for(var je in ke)we.call(ke,je)&&(be[je]=ke[je]);return Ne.prototype=ke.prototype,be.prototype=new Ne,be.__super__=ke.prototype,be},we={}.hasOwnProperty;ie=me("sax"),ue=me("events"),ve=me("./bom"),oe=me("./processors"),se=me("timers").setImmediate,de=me("./defaults").defaults,z=function(be){return(be===void 0?"undefined":(0,ce.default)(be))==="object"&&be!=null&&(0,xe.default)(be).length===0},ee=function(be,ke,Ne){var je,Ve,Je;for(je=0,Ve=be.length;je<Ve;je++)Je=be[je],ke=Je(ke,Ne);return ke},Te.Parser=function(be){function ke(Ne){this.parseString=le(this.parseString,this),this.reset=le(this.reset,this),this.assignOrPush=le(this.assignOrPush,this),this.processAsync=le(this.processAsync,this);var je,Ve,Je;if(!(this instanceof Te.Parser))return new Te.Parser(Ne);this.options={},Ve=de[.2];for(je in Ve)we.call(Ve,je)&&(Je=Ve[je],this.options[je]=Je);for(je in Ne)we.call(Ne,je)&&(Je=Ne[je],this.options[je]=Je);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 ye(ke,be),ke.prototype.processAsync=function(){var Ne,je;try{return this.remaining.length<=this.options.chunkSize?(Ne=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(Ne),this.saxParser.close()):(Ne=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(Ne),se(this.processAsync))}catch(Ve){if(je=Ve,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(je)}},ke.prototype.assignOrPush=function(Ne,je,Ve){return je in Ne?(Ne[je]instanceof Array||(Ne[je]=[Ne[je]]),Ne[je].push(Ve)):this.options.explicitArray?Ne[je]=[Ve]:Ne[je]=Ve},ke.prototype.reset=function(){var Ne,je,Ve,Je;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(We){return function(gt){if(We.saxParser.resume(),!We.saxParser.errThrown)return We.saxParser.errThrown=!0,We.emit("error",gt)}}(this),this.saxParser.onend=function(We){return function(){if(!We.saxParser.ended)return We.saxParser.ended=!0,We.emit("end",We.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,Je=[],Ne=this.options.attrkey,je=this.options.charkey,this.saxParser.onopentag=function(We){return function(gt){var ut,bt,rt,St,ct;if(rt={},rt[je]="",!We.options.ignoreAttrs){ct=gt.attributes;for(ut in ct)we.call(ct,ut)&&(Ne in rt||We.options.mergeAttrs||(rt[Ne]={}),bt=We.options.attrValueProcessors?ee(We.options.attrValueProcessors,gt.attributes[ut],ut):gt.attributes[ut],St=We.options.attrNameProcessors?ee(We.options.attrNameProcessors,ut):ut,We.options.mergeAttrs?We.assignOrPush(rt,St,bt):rt[Ne][St]=bt)}return rt["#name"]=We.options.tagNameProcessors?ee(We.options.tagNameProcessors,gt.name):gt.name,We.options.xmlns&&(rt[We.options.xmlnskey]={uri:gt.uri,local:gt.local}),Je.push(rt)}}(this),this.saxParser.onclosetag=function(We){return function(){var gt,ut,bt,rt,St,ct,Bt,ht,it,dt;if(ct=Je.pop(),St=ct["#name"],We.options.explicitChildren&&We.options.preserveChildrenOrder||delete ct["#name"],ct.cdata===!0&&(gt=ct.cdata,delete ct.cdata),it=Je[Je.length-1],ct[je].match(/^\s*$/)&&!gt?(ut=ct[je],delete ct[je]):(We.options.trim&&(ct[je]=ct[je].trim()),We.options.normalize&&(ct[je]=ct[je].replace(/\s{2,}/g," ").trim()),ct[je]=We.options.valueProcessors?ee(We.options.valueProcessors,ct[je],St):ct[je],(0,xe.default)(ct).length===1&&je in ct&&!We.EXPLICIT_CHARKEY&&(ct=ct[je])),z(ct)&&(ct=We.options.emptyTag!==""?We.options.emptyTag:ut),We.options.validator!=null&&(dt="/"+function(){var yt,Et,vt;for(vt=[],yt=0,Et=Je.length;yt<Et;yt++)rt=Je[yt],vt.push(rt["#name"]);return vt}().concat(St).join("/"),function(){var yt;try{ct=We.options.validator(dt,it&&it[St],ct)}catch(Et){return yt=Et,We.emit("error",yt)}}()),We.options.explicitChildren&&!We.options.mergeAttrs&&(ct===void 0?"undefined":(0,ce.default)(ct))==="object")if(We.options.preserveChildrenOrder){if(it){it[We.options.childkey]=it[We.options.childkey]||[],Bt={};for(bt in ct)we.call(ct,bt)&&(Bt[bt]=ct[bt]);it[We.options.childkey].push(Bt),delete ct["#name"],(0,xe.default)(ct).length===1&&je in ct&&!We.EXPLICIT_CHARKEY&&(ct=ct[je])}}else rt={},We.options.attrkey in ct&&(rt[We.options.attrkey]=ct[We.options.attrkey],delete ct[We.options.attrkey]),!We.options.charsAsChildren&&We.options.charkey in ct&&(rt[We.options.charkey]=ct[We.options.charkey],delete ct[We.options.charkey]),(0,he.default)(ct).length>0&&(rt[We.options.childkey]=ct),ct=rt;return Je.length>0?We.assignOrPush(it,St,ct):(We.options.explicitRoot&&(ht=ct,ct={},ct[St]=ht),We.resultObject=ct,We.saxParser.ended=!0,We.emit("end",We.resultObject))}}(this),Ve=function(We){return function(gt){var ut,bt;if(bt=Je[Je.length-1])return bt[je]+=gt,We.options.explicitChildren&&We.options.preserveChildrenOrder&&We.options.charsAsChildren&&(We.options.includeWhiteChars||gt.replace(/\\n/g,"").trim()!=="")&&(bt[We.options.childkey]=bt[We.options.childkey]||[],ut={"#name":"__text__"},ut[je]=gt,We.options.normalize&&(ut[je]=ut[je].replace(/\s{2,}/g," ").trim()),bt[We.options.childkey].push(ut)),bt}}(this),this.saxParser.ontext=Ve,this.saxParser.oncdata=function(We){return function(gt){var ut;if(ut=Ve(gt))return ut.cdata=!0}}()},ke.prototype.parseString=function(Ne,je){var Ve;je!=null&&typeof je=="function"&&(this.on("end",function(Je){return this.reset(),je(null,Je)}),this.on("error",function(Je){return this.reset(),je(Je)}));try{return Ne=Ne.toString(),Ne.trim()===""?(this.emit("end",null),!0):(Ne=ve.stripBOM(Ne),this.options.async?(this.remaining=Ne,se(this.processAsync),this.saxParser):this.saxParser.write(Ne).close())}catch(Je){if(Ve=Je,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",Ve),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw Ve}},ke}(ue.EventEmitter),Te.parseString=function(be,ke,Ne){var je,Ve,Je;return Ne!=null?(typeof Ne=="function"&&(je=Ne),(ke===void 0?"undefined":(0,ce.default)(ke))==="object"&&(Ve=ke)):(typeof ke=="function"&&(je=ke),Ve={}),Je=new Te.Parser(Ve),Je.parseString(be,je)}}).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,Ie,Te){"use strict";(function(){var Ce;Ce=new RegExp(/(?!xmlns)^.*:/),Te.normalize=function(_e){return _e.toLowerCase()},Te.firstCharLowerCase=function(_e){return _e.charAt(0).toLowerCase()+_e.slice(1)},Te.stripPrefix=function(_e){return _e.replace(Ce,"")},Te.parseNumbers=function(_e){return isNaN(_e)||(_e=_e%1==0?parseInt(_e,10):parseFloat(_e)),_e},Te.parseBooleans=function(_e){return/^(?:true|false)$/i.test(_e)&&(_e=_e.toLowerCase()==="true"),_e}}).call(void 0)},{}],213:[function(me,Ie,Te){"use strict";(function(){var Ce,_e,he,Se,xe=function(ce,ve){function de(){this.constructor=ce}for(var ue in ve)ge.call(ve,ue)&&(ce[ue]=ve[ue]);return de.prototype=ve.prototype,ce.prototype=new de,ce.__super__=ve.prototype,ce},ge={}.hasOwnProperty;_e=me("./defaults"),Ce=me("./builder"),he=me("./parser"),Se=me("./processors"),Te.defaults=_e.defaults,Te.processors=Se,Te.ValidationError=function(ce){function ve(de){this.message=de}return xe(ve,ce),ve}(Error),Te.Builder=Ce.Builder,Te.Parser=he.Parser,Te.parseString=he.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(me,Ie,Te){"use strict";function Ce(ve){return ve&&ve.__esModule?ve:{default:ve}}var _e=me("babel-runtime/core-js/object/get-prototype-of"),he=Ce(_e),Se=me("babel-runtime/helpers/typeof"),xe=Ce(Se),ge=me("babel-runtime/core-js/object/assign"),ce=Ce(ge);(function(){var ve,de,ue,z,ee,oe,ie=[].slice,se={}.hasOwnProperty;ve=function(){var le,ye,we,be,ke,Ne;if(Ne=arguments[0],ke=2<=arguments.length?ie.call(arguments,1):[],z(ce.default))ce.default.apply(null,arguments);else for(le=0,we=ke.length;le<we;le++)if((be=ke[le])!=null)for(ye in be)se.call(be,ye)&&(Ne[ye]=be[ye]);return Ne},z=function(le){return!!le&&Object.prototype.toString.call(le)==="[object Function]"},ee=function(le){var ye;return!!le&&((ye=le===void 0?"undefined":(0,xe.default)(le))==="function"||ye==="object")},de=function(le){return z(Array.isArray)?Array.isArray(le):Object.prototype.toString.call(le)==="[object Array]"},ue=function(le){var ye;if(de(le))return!le.length;for(ye in le)if(se.call(le,ye))return!1;return!0},oe=function(le){var ye,we;return ee(le)&&(we=(0,he.default)(le))&&(ye=we.constructor)&&typeof ye=="function"&&ye instanceof ye&&Function.prototype.toString.call(ye)===Function.prototype.toString.call(Object)},Ie.exports.assign=ve,Ie.exports.isFunction=z,Ie.exports.isObject=ee,Ie.exports.isArray=de,Ie.exports.isEmpty=ue,Ie.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,Ie,Te){"use strict";var Ce=me("babel-runtime/core-js/object/create"),_e=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){Ie.exports=function(){function he(Se,xe,ge){if(this.options=Se.options,this.stringify=Se.stringify,xe==null)throw new Error("Missing attribute name of element "+Se.name);if(ge==null)throw new Error("Missing attribute value for attribute "+xe+" of element "+Se.name);this.name=this.stringify.attName(xe),this.value=this.stringify.attValue(ge)}return he.prototype.clone=function(){return(0,_e.default)(this)},he.prototype.toString=function(Se){return this.options.writer.set(Se).attribute(this)},he}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(me,Ie,Te){"use strict";var Ce=me("babel-runtime/core-js/object/create"),_e=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,Se=function(ge,ce){function ve(){this.constructor=ge}for(var de in ce)xe.call(ce,de)&&(ge[de]=ce[de]);return ve.prototype=ce.prototype,ge.prototype=new ve,ge.__super__=ce.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Ie.exports=function(ge){function ce(ve,de){if(ce.__super__.constructor.call(this,ve),de==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(de)}return Se(ce,ge),ce.prototype.clone=function(){return(0,_e.default)(this)},ce.prototype.toString=function(ve){return this.options.writer.set(ve).cdata(this)},ce}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(me,Ie,Te){"use strict";var Ce=me("babel-runtime/core-js/object/create"),_e=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,Se=function(ge,ce){function ve(){this.constructor=ge}for(var de in ce)xe.call(ce,de)&&(ge[de]=ce[de]);return ve.prototype=ce.prototype,ge.prototype=new ve,ge.__super__=ce.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Ie.exports=function(ge){function ce(ve,de){if(ce.__super__.constructor.call(this,ve),de==null)throw new Error("Missing comment text");this.text=this.stringify.comment(de)}return Se(ce,ge),ce.prototype.clone=function(){return(0,_e.default)(this)},ce.prototype.toString=function(ve){return this.options.writer.set(ve).comment(this)},ce}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(me,Ie,Te){"use strict";(function(){var Ce,_e=function(Se,xe){function ge(){this.constructor=Se}for(var ce in xe)he.call(xe,ce)&&(Se[ce]=xe[ce]);return ge.prototype=xe.prototype,Se.prototype=new ge,Se.__super__=xe.prototype,Se},he={}.hasOwnProperty;Ce=me("./XMLNode"),Ie.exports=function(Se){function xe(ge,ce,ve,de,ue,z){if(xe.__super__.constructor.call(this,ge),ce==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(!ue)throw new Error("Missing DTD attribute default");if(ue.indexOf("#")!==0&&(ue="#"+ue),!ue.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(z&&!ue.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(ce),this.attributeName=this.stringify.attName(ve),this.attributeType=this.stringify.dtdAttType(de),this.defaultValue=this.stringify.dtdAttDefault(z),this.defaultValueType=ue}return _e(xe,Se),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdAttList(this)},xe}(Ce)}).call(void 0)},{"./XMLNode":227}],219:[function(me,Ie,Te){"use strict";(function(){var Ce,_e=function(Se,xe){function ge(){this.constructor=Se}for(var ce in xe)he.call(xe,ce)&&(Se[ce]=xe[ce]);return ge.prototype=xe.prototype,Se.prototype=new ge,Se.__super__=xe.prototype,Se},he={}.hasOwnProperty;Ce=me("./XMLNode"),Ie.exports=function(Se){function xe(ge,ce,ve){if(xe.__super__.constructor.call(this,ge),ce==null)throw new Error("Missing DTD element name");ve||(ve="(#PCDATA)"),Array.isArray(ve)&&(ve="("+ve.join(",")+")"),this.name=this.stringify.eleName(ce),this.value=this.stringify.dtdElementValue(ve)}return _e(xe,Se),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdElement(this)},xe}(Ce)}).call(void 0)},{"./XMLNode":227}],220:[function(me,Ie,Te){"use strict";(function(){var Ce,_e,he=function(xe,ge){function ce(){this.constructor=xe}for(var ve in ge)Se.call(ge,ve)&&(xe[ve]=ge[ve]);return ce.prototype=ge.prototype,xe.prototype=new ce,xe.__super__=ge.prototype,xe},Se={}.hasOwnProperty;_e=me("./Utility").isObject,Ce=me("./XMLNode"),Ie.exports=function(xe){function ge(ce,ve,de,ue){if(ge.__super__.constructor.call(this,ce),de==null)throw new Error("Missing entity name");if(ue==null)throw new Error("Missing entity value");if(this.pe=!!ve,this.name=this.stringify.eleName(de),_e(ue)){if(!ue.pubID&&!ue.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(ue.pubID&&!ue.sysID)throw new Error("System identifier is required for a public external entity");if(ue.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ue.pubID)),ue.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ue.sysID)),ue.nData!=null&&(this.nData=this.stringify.dtdNData(ue.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(ue)}return he(ge,xe),ge.prototype.toString=function(ce){return this.options.writer.set(ce).dtdEntity(this)},ge}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(me,Ie,Te){"use strict";(function(){var Ce,_e=function(Se,xe){function ge(){this.constructor=Se}for(var ce in xe)he.call(xe,ce)&&(Se[ce]=xe[ce]);return ge.prototype=xe.prototype,Se.prototype=new ge,Se.__super__=xe.prototype,Se},he={}.hasOwnProperty;Ce=me("./XMLNode"),Ie.exports=function(Se){function xe(ge,ce,ve){if(xe.__super__.constructor.call(this,ge),ce==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(ce),ve.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ve.pubID)),ve.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ve.sysID))}return _e(xe,Se),xe.prototype.toString=function(ge){return this.options.writer.set(ge).dtdNotation(this)},xe}(Ce)}).call(void 0)},{"./XMLNode":227}],222:[function(me,Ie,Te){"use strict";(function(){var Ce,_e,he=function(xe,ge){function ce(){this.constructor=xe}for(var ve in ge)Se.call(ge,ve)&&(xe[ve]=ge[ve]);return ce.prototype=ge.prototype,xe.prototype=new ce,xe.__super__=ge.prototype,xe},Se={}.hasOwnProperty;_e=me("./Utility").isObject,Ce=me("./XMLNode"),Ie.exports=function(xe){function ge(ce,ve,de,ue){var z;ge.__super__.constructor.call(this,ce),_e(ve)&&(z=ve,ve=z.version,de=z.encoding,ue=z.standalone),ve||(ve="1.0"),this.version=this.stringify.xmlVersion(ve),de!=null&&(this.encoding=this.stringify.xmlEncoding(de)),ue!=null&&(this.standalone=this.stringify.xmlStandalone(ue))}return he(ge,xe),ge.prototype.toString=function(ce){return this.options.writer.set(ce).declaration(this)},ge}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(me,Ie,Te){"use strict";(function(){var Ce,_e,he,Se,xe,ge,ce=function(de,ue){function z(){this.constructor=de}for(var ee in ue)ve.call(ue,ee)&&(de[ee]=ue[ee]);return z.prototype=ue.prototype,de.prototype=new z,de.__super__=ue.prototype,de},ve={}.hasOwnProperty;ge=me("./Utility").isObject,xe=me("./XMLNode"),Ce=me("./XMLDTDAttList"),he=me("./XMLDTDEntity"),_e=me("./XMLDTDElement"),Se=me("./XMLDTDNotation"),Ie.exports=function(de){function ue(z,ee,oe){var ie,se;ue.__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 ce(ue,de),ue.prototype.element=function(z,ee){var oe;return oe=new _e(this,z,ee),this.children.push(oe),this},ue.prototype.attList=function(z,ee,oe,ie,se){var le;return le=new Ce(this,z,ee,oe,ie,se),this.children.push(le),this},ue.prototype.entity=function(z,ee){var oe;return oe=new he(this,!1,z,ee),this.children.push(oe),this},ue.prototype.pEntity=function(z,ee){var oe;return oe=new he(this,!0,z,ee),this.children.push(oe),this},ue.prototype.notation=function(z,ee){var oe;return oe=new Se(this,z,ee),this.children.push(oe),this},ue.prototype.toString=function(z){return this.options.writer.set(z).docType(this)},ue.prototype.ele=function(z,ee){return this.element(z,ee)},ue.prototype.att=function(z,ee,oe,ie,se){return this.attList(z,ee,oe,ie,se)},ue.prototype.ent=function(z,ee){return this.entity(z,ee)},ue.prototype.pent=function(z,ee){return this.pEntity(z,ee)},ue.prototype.not=function(z,ee){return this.notation(z,ee)},ue.prototype.up=function(){return this.root()||this.documentObject},ue}(xe)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(me,Ie,Te){"use strict";(function(){var Ce,_e,he,Se,xe=function(ce,ve){function de(){this.constructor=ce}for(var ue in ve)ge.call(ve,ue)&&(ce[ue]=ve[ue]);return de.prototype=ve.prototype,ce.prototype=new de,ce.__super__=ve.prototype,ce},ge={}.hasOwnProperty;Se=me("./Utility").isPlainObject,Ce=me("./XMLNode"),he=me("./XMLStringifier"),_e=me("./XMLStringWriter"),Ie.exports=function(ce){function ve(de){ve.__super__.constructor.call(this,null),de||(de={}),de.writer||(de.writer=new _e),this.options=de,this.stringify=new he(de),this.isDocument=!0}return xe(ve,ce),ve.prototype.end=function(de){var ue;return de?Se(de)&&(ue=de,de=this.options.writer.set(ue)):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,Ie,Te){"use strict";(function(){var Ce,_e,he,Se,xe,ge,ce,ve,de,ue,z,ee,oe,ie,se,le,ye,we,be,ke={}.hasOwnProperty;be=me("./Utility"),ye=be.isObject,le=be.isFunction,we=be.isPlainObject,ue=me("./XMLElement"),_e=me("./XMLCData"),he=me("./XMLComment"),ee=me("./XMLRaw"),se=me("./XMLText"),z=me("./XMLProcessingInstruction"),ve=me("./XMLDeclaration"),de=me("./XMLDocType"),Se=me("./XMLDTDAttList"),ge=me("./XMLDTDEntity"),xe=me("./XMLDTDElement"),ce=me("./XMLDTDNotation"),Ce=me("./XMLAttribute"),ie=me("./XMLStringifier"),oe=me("./XMLStringWriter"),Ie.exports=function(){function Ne(je,Ve,Je){var We;je||(je={}),je.writer?we(je.writer)&&(We=je.writer,je.writer=new oe(We)):je.writer=new oe(je),this.options=je,this.writer=je.writer,this.stringify=new ie(je),this.onDataCallback=Ve||function(){},this.onEndCallback=Je||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Ne.prototype.node=function(je,Ve,Je){var We;if(je==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(),je=je.valueOf(),Ve==null&&(Ve={}),Ve=Ve.valueOf(),ye(Ve)||(We=[Ve,Je],Je=We[0],Ve=We[1]),this.currentNode=new ue(this,je,Ve),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,Je!=null&&this.text(Je),this},Ne.prototype.element=function(je,Ve,Je){return this.currentNode&&this.currentNode instanceof de?this.dtdElement.apply(this,arguments):this.node(je,Ve,Je)},Ne.prototype.attribute=function(je,Ve){var Je,We;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(je!=null&&(je=je.valueOf()),ye(je))for(Je in je)ke.call(je,Je)&&(We=je[Je],this.attribute(Je,We));else le(Ve)&&(Ve=Ve.apply()),this.options.skipNullAttributes&&Ve==null||(this.currentNode.attributes[je]=new Ce(this,je,Ve));return this},Ne.prototype.text=function(je){var Ve;return this.openCurrent(),Ve=new se(this,je),this.onData(this.writer.text(Ve,this.currentLevel+1)),this},Ne.prototype.cdata=function(je){var Ve;return this.openCurrent(),Ve=new _e(this,je),this.onData(this.writer.cdata(Ve,this.currentLevel+1)),this},Ne.prototype.comment=function(je){var Ve;return this.openCurrent(),Ve=new he(this,je),this.onData(this.writer.comment(Ve,this.currentLevel+1)),this},Ne.prototype.raw=function(je){var Ve;return this.openCurrent(),Ve=new ee(this,je),this.onData(this.writer.raw(Ve,this.currentLevel+1)),this},Ne.prototype.instruction=function(je,Ve){var Je,We,gt,ut,bt;if(this.openCurrent(),je!=null&&(je=je.valueOf()),Ve!=null&&(Ve=Ve.valueOf()),Array.isArray(je))for(Je=0,ut=je.length;Je<ut;Je++)We=je[Je],this.instruction(We);else if(ye(je))for(We in je)ke.call(je,We)&&(gt=je[We],this.instruction(We,gt));else le(Ve)&&(Ve=Ve.apply()),bt=new z(this,je,Ve),this.onData(this.writer.processingInstruction(bt,this.currentLevel+1));return this},Ne.prototype.declaration=function(je,Ve,Je){var We;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return We=new ve(this,je,Ve,Je),this.onData(this.writer.declaration(We,this.currentLevel+1)),this},Ne.prototype.doctype=function(je,Ve,Je){if(this.openCurrent(),je==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,Ve,Je),this.currentNode.rootNodeName=je,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ne.prototype.dtdElement=function(je,Ve){var Je;return this.openCurrent(),Je=new xe(this,je,Ve),this.onData(this.writer.dtdElement(Je,this.currentLevel+1)),this},Ne.prototype.attList=function(je,Ve,Je,We,gt){var ut;return this.openCurrent(),ut=new Se(this,je,Ve,Je,We,gt),this.onData(this.writer.dtdAttList(ut,this.currentLevel+1)),this},Ne.prototype.entity=function(je,Ve){var Je;return this.openCurrent(),Je=new ge(this,!1,je,Ve),this.onData(this.writer.dtdEntity(Je,this.currentLevel+1)),this},Ne.prototype.pEntity=function(je,Ve){var Je;return this.openCurrent(),Je=new ge(this,!0,je,Ve),this.onData(this.writer.dtdEntity(Je,this.currentLevel+1)),this},Ne.prototype.notation=function(je,Ve){var Je;return this.openCurrent(),Je=new ce(this,je,Ve),this.onData(this.writer.dtdNotation(Je,this.currentLevel+1)),this},Ne.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},Ne.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ne.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ne.prototype.openNode=function(je){if(!je.isOpen)return!this.root&&this.currentLevel===0&&je instanceof ue&&(this.root=je),this.onData(this.writer.openNode(je,this.currentLevel)),je.isOpen=!0},Ne.prototype.closeNode=function(je){if(!je.isClosed)return this.onData(this.writer.closeNode(je,this.currentLevel)),je.isClosed=!0},Ne.prototype.onData=function(je){return this.documentStarted=!0,this.onDataCallback(je)},Ne.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ne.prototype.ele=function(){return this.element.apply(this,arguments)},Ne.prototype.nod=function(je,Ve,Je){return this.node(je,Ve,Je)},Ne.prototype.txt=function(je){return this.text(je)},Ne.prototype.dat=function(je){return this.cdata(je)},Ne.prototype.com=function(je){return this.comment(je)},Ne.prototype.ins=function(je,Ve){return this.instruction(je,Ve)},Ne.prototype.dec=function(je,Ve,Je){return this.declaration(je,Ve,Je)},Ne.prototype.dtd=function(je,Ve,Je){return this.doctype(je,Ve,Je)},Ne.prototype.e=function(je,Ve,Je){return this.element(je,Ve,Je)},Ne.prototype.n=function(je,Ve,Je){return this.node(je,Ve,Je)},Ne.prototype.t=function(je){return this.text(je)},Ne.prototype.d=function(je){return this.cdata(je)},Ne.prototype.c=function(je){return this.comment(je)},Ne.prototype.r=function(je){return this.raw(je)},Ne.prototype.i=function(je,Ve){return this.instruction(je,Ve)},Ne.prototype.att=function(){return this.currentNode&&this.currentNode instanceof de?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ne.prototype.a=function(){return this.currentNode&&this.currentNode instanceof de?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ne.prototype.ent=function(je,Ve){return this.entity(je,Ve)},Ne.prototype.pent=function(je,Ve){return this.pEntity(je,Ve)},Ne.prototype.not=function(je,Ve){return this.notation(je,Ve)},Ne}()}).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,Ie,Te){"use strict";var Ce=me("babel-runtime/core-js/object/create"),_e=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,Se,xe,ge,ce,ve=function(ue,z){function ee(){this.constructor=ue}for(var oe in z)de.call(z,oe)&&(ue[oe]=z[oe]);return ee.prototype=z.prototype,ue.prototype=new ee,ue.__super__=z.prototype,ue},de={}.hasOwnProperty;ce=me("./Utility"),ge=ce.isObject,xe=ce.isFunction,Se=me("./XMLNode"),he=me("./XMLAttribute"),Ie.exports=function(ue){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,ue),z.prototype.clone=function(){var ee,oe,ie,se;ie=(0,_e.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(le){var ye;return ye=le.clone(),ye.parent=ie,ie.children.push(ye)}),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}(Se)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(me,Ie,Te){"use strict";(function(){var Ce,_e,he,Se,xe,ge,ce,ve,de,ue,z,ee,oe={}.hasOwnProperty;ee=me("./Utility"),z=ee.isObject,ue=ee.isFunction,de=ee.isEmpty,xe=null,Ce=null,_e=null,he=null,Se=null,ce=null,ve=null,ge=null,Ie.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"),_e=me("./XMLComment"),he=me("./XMLDeclaration"),Se=me("./XMLDocType"),ce=me("./XMLRaw"),ve=me("./XMLText"),ge=me("./XMLProcessingInstruction"))}return ie.prototype.element=function(se,le,ye){var we,be,ke,Ne,je,Ve,Je,We,gt,ut;if(Ve=null,le==null&&(le={}),le=le.valueOf(),z(le)||(gt=[le,ye],ye=gt[0],le=gt[1]),se!=null&&(se=se.valueOf()),Array.isArray(se))for(ke=0,Je=se.length;ke<Je;ke++)be=se[ke],Ve=this.element(be);else if(ue(se))Ve=this.element(se.apply());else if(z(se)){for(je in se)if(oe.call(se,je))if(ut=se[je],ue(ut)&&(ut=ut.apply()),z(ut)&&de(ut)&&(ut=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&je.indexOf(this.stringify.convertAttKey)===0)Ve=this.attribute(je.substr(this.stringify.convertAttKey.length),ut);else if(!this.options.separateArrayItems&&Array.isArray(ut))for(Ne=0,We=ut.length;Ne<We;Ne++)be=ut[Ne],we={},we[je]=be,Ve=this.element(we);else z(ut)?(Ve=this.element(je),Ve.element(ut)):Ve=this.element(je,ut)}else Ve=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&se.indexOf(this.stringify.convertTextKey)===0?this.text(ye):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&se.indexOf(this.stringify.convertCDataKey)===0?this.cdata(ye):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&se.indexOf(this.stringify.convertCommentKey)===0?this.comment(ye):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&se.indexOf(this.stringify.convertRawKey)===0?this.raw(ye):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&se.indexOf(this.stringify.convertPIKey)===0?this.instruction(se.substr(this.stringify.convertPIKey.length),ye):this.node(se,le,ye);if(Ve==null)throw new Error("Could not create any elements with: "+se);return Ve},ie.prototype.insertBefore=function(se,le,ye){var we,be,ke;if(this.isRoot)throw new Error("Cannot insert elements at root level");return be=this.parent.children.indexOf(this),ke=this.parent.children.splice(be),we=this.parent.element(se,le,ye),Array.prototype.push.apply(this.parent.children,ke),we},ie.prototype.insertAfter=function(se,le,ye){var we,be,ke;if(this.isRoot)throw new Error("Cannot insert elements at root level");return be=this.parent.children.indexOf(this),ke=this.parent.children.splice(be+1),we=this.parent.element(se,le,ye),Array.prototype.push.apply(this.parent.children,ke),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,le,ye){var we,be;return se!=null&&(se=se.valueOf()),le||(le={}),le=le.valueOf(),z(le)||(be=[le,ye],ye=be[0],le=be[1]),we=new xe(this,se,le),ye!=null&&we.text(ye),this.children.push(we),we},ie.prototype.text=function(se){var le;return le=new ve(this,se),this.children.push(le),this},ie.prototype.cdata=function(se){var le;return le=new Ce(this,se),this.children.push(le),this},ie.prototype.comment=function(se){var le;return le=new _e(this,se),this.children.push(le),this},ie.prototype.commentBefore=function(se){var le,ye;return le=this.parent.children.indexOf(this),ye=this.parent.children.splice(le),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,ye),this},ie.prototype.commentAfter=function(se){var le,ye;return le=this.parent.children.indexOf(this),ye=this.parent.children.splice(le+1),this.parent.comment(se),Array.prototype.push.apply(this.parent.children,ye),this},ie.prototype.raw=function(se){var le;return le=new ce(this,se),this.children.push(le),this},ie.prototype.instruction=function(se,le){var ye,we,be,ke,Ne;if(se!=null&&(se=se.valueOf()),le!=null&&(le=le.valueOf()),Array.isArray(se))for(ke=0,Ne=se.length;ke<Ne;ke++)ye=se[ke],this.instruction(ye);else if(z(se))for(ye in se)oe.call(se,ye)&&(we=se[ye],this.instruction(ye,we));else ue(le)&&(le=le.apply()),be=new ge(this,se,le),this.children.push(be);return this},ie.prototype.instructionBefore=function(se,le){var ye,we;return ye=this.parent.children.indexOf(this),we=this.parent.children.splice(ye),this.parent.instruction(se,le),Array.prototype.push.apply(this.parent.children,we),this},ie.prototype.instructionAfter=function(se,le){var ye,we;return ye=this.parent.children.indexOf(this),we=this.parent.children.splice(ye+1),this.parent.instruction(se,le),Array.prototype.push.apply(this.parent.children,we),this},ie.prototype.declaration=function(se,le,ye){var we,be;return we=this.document(),be=new he(we,se,le,ye),we.children[0]instanceof he?we.children[0]=be:we.children.unshift(be),we.root()||we},ie.prototype.doctype=function(se,le){var ye,we,be,ke,Ne,je,Ve,Je,We,gt;for(we=this.document(),be=new Se(we,se,le),We=we.children,ke=Ne=0,Ve=We.length;Ne<Ve;ke=++Ne)if((ye=We[ke])instanceof Se)return we.children[ke]=be,be;for(gt=we.children,ke=je=0,Je=gt.length;je<Je;ke=++je)if(ye=gt[ke],ye.isRoot)return we.children.splice(ke,0,be),be;return we.children.push(be),be},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 le;return le=se.root().clone(),le.parent=this,le.isRoot=!1,this.children.push(le),this},ie.prototype.ele=function(se,le,ye){return this.element(se,le,ye)},ie.prototype.nod=function(se,le,ye){return this.node(se,le,ye)},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,le){return this.instruction(se,le)},ie.prototype.doc=function(){return this.document()},ie.prototype.dec=function(se,le,ye){return this.declaration(se,le,ye)},ie.prototype.dtd=function(se,le){return this.doctype(se,le)},ie.prototype.e=function(se,le,ye){return this.element(se,le,ye)},ie.prototype.n=function(se,le,ye){return this.node(se,le,ye)},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,le){return this.instruction(se,le)},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,Ie,Te){"use strict";var Ce=me("babel-runtime/core-js/object/create"),_e=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,Se=function(ge,ce){function ve(){this.constructor=ge}for(var de in ce)xe.call(ce,de)&&(ge[de]=ce[de]);return ve.prototype=ce.prototype,ge.prototype=new ve,ge.__super__=ce.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Ie.exports=function(ge){function ce(ve,de,ue){if(ce.__super__.constructor.call(this,ve),de==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(de),ue&&(this.value=this.stringify.insValue(ue))}return Se(ce,ge),ce.prototype.clone=function(){return(0,_e.default)(this)},ce.prototype.toString=function(ve){return this.options.writer.set(ve).processingInstruction(this)},ce}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(me,Ie,Te){"use strict";var Ce=me("babel-runtime/core-js/object/create"),_e=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,Se=function(ge,ce){function ve(){this.constructor=ge}for(var de in ce)xe.call(ce,de)&&(ge[de]=ce[de]);return ve.prototype=ce.prototype,ge.prototype=new ve,ge.__super__=ce.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Ie.exports=function(ge){function ce(ve,de){if(ce.__super__.constructor.call(this,ve),de==null)throw new Error("Missing raw text");this.value=this.stringify.raw(de)}return Se(ce,ge),ce.prototype.clone=function(){return(0,_e.default)(this)},ce.prototype.toString=function(ve){return this.options.writer.set(ve).raw(this)},ce}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(me,Ie,Te){"use strict";(function(){var Ce,_e,he,Se,xe,ge,ce,ve,de,ue,z,ee,oe,ie=function(le,ye){function we(){this.constructor=le}for(var be in ye)se.call(ye,be)&&(le[be]=ye[be]);return we.prototype=ye.prototype,le.prototype=new we,le.__super__=ye.prototype,le},se={}.hasOwnProperty;ce=me("./XMLDeclaration"),ve=me("./XMLDocType"),Ce=me("./XMLCData"),_e=me("./XMLComment"),de=me("./XMLElement"),z=me("./XMLRaw"),ee=me("./XMLText"),ue=me("./XMLProcessingInstruction"),he=me("./XMLDTDAttList"),Se=me("./XMLDTDElement"),xe=me("./XMLDTDEntity"),ge=me("./XMLDTDNotation"),oe=me("./XMLWriterBase"),Ie.exports=function(le){function ye(we,be){ye.__super__.constructor.call(this,be),this.stream=we}return ie(ye,le),ye.prototype.document=function(we){var be,ke,Ne,je,Ve,Je,We,gt;for(Je=we.children,ke=0,je=Je.length;ke<je;ke++)be=Je[ke],be.isLastRootNode=!1;for(we.children[we.children.length-1].isLastRootNode=!0,We=we.children,gt=[],Ne=0,Ve=We.length;Ne<Ve;Ne++)switch(be=We[Ne],!1){case!(be instanceof ce):gt.push(this.declaration(be));break;case!(be instanceof ve):gt.push(this.docType(be));break;case!(be instanceof _e):gt.push(this.comment(be));break;case!(be instanceof ue):gt.push(this.processingInstruction(be));break;default:gt.push(this.element(be))}return gt},ye.prototype.attribute=function(we){return this.stream.write(" "+we.name+'="'+we.value+'"')},ye.prototype.cdata=function(we,be){return this.stream.write(this.space(be)+"<![CDATA["+we.text+"]]>"+this.endline(we))},ye.prototype.comment=function(we,be){return this.stream.write(this.space(be)+"<!-- "+we.text+" -->"+this.endline(we))},ye.prototype.declaration=function(we,be){return this.stream.write(this.space(be)),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))},ye.prototype.docType=function(we,be){var ke,Ne,je,Ve;if(be||(be=0),this.stream.write(this.space(be)),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)),Ve=we.children,Ne=0,je=Ve.length;Ne<je;Ne++)switch(ke=Ve[Ne],!1){case!(ke instanceof he):this.dtdAttList(ke,be+1);break;case!(ke instanceof Se):this.dtdElement(ke,be+1);break;case!(ke instanceof xe):this.dtdEntity(ke,be+1);break;case!(ke instanceof ge):this.dtdNotation(ke,be+1);break;case!(ke instanceof Ce):this.cdata(ke,be+1);break;case!(ke instanceof _e):this.comment(ke,be+1);break;case!(ke instanceof ue):this.processingInstruction(ke,be+1);break;default:throw new Error("Unknown DTD node type: "+ke.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(we))},ye.prototype.element=function(we,be){var ke,Ne,je,Ve,Je,We,gt,ut;be||(be=0),ut=this.space(be),this.stream.write(ut+"<"+we.name),We=we.attributes;for(Je in We)se.call(We,Je)&&(ke=We[Je],this.attribute(ke));if(we.children.length===0||we.children.every(function(bt){return bt.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),gt=we.children,je=0,Ve=gt.length;je<Ve;je++)switch(Ne=gt[je],!1){case!(Ne instanceof Ce):this.cdata(Ne,be+1);break;case!(Ne instanceof _e):this.comment(Ne,be+1);break;case!(Ne instanceof de):this.element(Ne,be+1);break;case!(Ne instanceof z):this.raw(Ne,be+1);break;case!(Ne instanceof ee):this.text(Ne,be+1);break;case!(Ne instanceof ue):this.processingInstruction(Ne,be+1);break;default:throw new Error("Unknown XML node type: "+Ne.constructor.name)}this.stream.write(ut+"</"+we.name+">")}return this.stream.write(this.endline(we))},ye.prototype.processingInstruction=function(we,be){return this.stream.write(this.space(be)+"<?"+we.target),we.value&&this.stream.write(" "+we.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(we))},ye.prototype.raw=function(we,be){return this.stream.write(this.space(be)+we.value+this.endline(we))},ye.prototype.text=function(we,be){return this.stream.write(this.space(be)+we.value+this.endline(we))},ye.prototype.dtdAttList=function(we,be){return this.stream.write(this.space(be)+"<!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))},ye.prototype.dtdElement=function(we,be){return this.stream.write(this.space(be)+"<!ELEMENT "+we.name+" "+we.value),this.stream.write(this.spacebeforeslash+">"+this.endline(we))},ye.prototype.dtdEntity=function(we,be){return this.stream.write(this.space(be)+"<!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))},ye.prototype.dtdNotation=function(we,be){return this.stream.write(this.space(be)+"<!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))},ye.prototype.endline=function(we){return we.isLastRootNode?"":this.newline},ye}(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,Ie,Te){"use strict";(function(){var Ce,_e,he,Se,xe,ge,ce,ve,de,ue,z,ee,oe,ie=function(le,ye){function we(){this.constructor=le}for(var be in ye)se.call(ye,be)&&(le[be]=ye[be]);return we.prototype=ye.prototype,le.prototype=new we,le.__super__=ye.prototype,le},se={}.hasOwnProperty;ce=me("./XMLDeclaration"),ve=me("./XMLDocType"),Ce=me("./XMLCData"),_e=me("./XMLComment"),de=me("./XMLElement"),z=me("./XMLRaw"),ee=me("./XMLText"),ue=me("./XMLProcessingInstruction"),he=me("./XMLDTDAttList"),Se=me("./XMLDTDElement"),xe=me("./XMLDTDEntity"),ge=me("./XMLDTDNotation"),oe=me("./XMLWriterBase"),Ie.exports=function(le){function ye(we){ye.__super__.constructor.call(this,we)}return ie(ye,le),ye.prototype.document=function(we){var be,ke,Ne,je,Ve;for(this.textispresent=!1,je="",Ve=we.children,ke=0,Ne=Ve.length;ke<Ne;ke++)be=Ve[ke],je+=function(){switch(!1){case!(be instanceof ce):return this.declaration(be);case!(be instanceof ve):return this.docType(be);case!(be instanceof _e):return this.comment(be);case!(be instanceof ue):return this.processingInstruction(be);default:return this.element(be,0)}}.call(this);return this.pretty&&je.slice(-this.newline.length)===this.newline&&(je=je.slice(0,-this.newline.length)),je},ye.prototype.attribute=function(we){return" "+we.name+'="'+we.value+'"'},ye.prototype.cdata=function(we,be){return this.space(be)+"<![CDATA["+we.text+"]]>"+this.newline},ye.prototype.comment=function(we,be){return this.space(be)+"<!-- "+we.text+" -->"+this.newline},ye.prototype.declaration=function(we,be){var ke;return ke=this.space(be),ke+='<?xml version="'+we.version+'"',we.encoding!=null&&(ke+=' encoding="'+we.encoding+'"'),we.standalone!=null&&(ke+=' standalone="'+we.standalone+'"'),ke+=this.spacebeforeslash+"?>",ke+=this.newline},ye.prototype.docType=function(we,be){var ke,Ne,je,Ve,Je;if(be||(be=0),Ve=this.space(be),Ve+="<!DOCTYPE "+we.root().name,we.pubID&&we.sysID?Ve+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(Ve+=' SYSTEM "'+we.sysID+'"'),we.children.length>0){for(Ve+=" [",Ve+=this.newline,Je=we.children,Ne=0,je=Je.length;Ne<je;Ne++)ke=Je[Ne],Ve+=function(){switch(!1){case!(ke instanceof he):return this.dtdAttList(ke,be+1);case!(ke instanceof Se):return this.dtdElement(ke,be+1);case!(ke instanceof xe):return this.dtdEntity(ke,be+1);case!(ke instanceof ge):return this.dtdNotation(ke,be+1);case!(ke instanceof Ce):return this.cdata(ke,be+1);case!(ke instanceof _e):return this.comment(ke,be+1);case!(ke instanceof ue):return this.processingInstruction(ke,be+1);default:throw new Error("Unknown DTD node type: "+ke.constructor.name)}}.call(this);Ve+="]"}return Ve+=this.spacebeforeslash+">",Ve+=this.newline},ye.prototype.element=function(we,be){var ke,Ne,je,Ve,Je,We,gt,ut,bt,rt,St,ct,Bt;be||(be=0),Bt=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),ct=this.space(be),ut="",ut+=ct+"<"+we.name,bt=we.attributes;for(gt in bt)se.call(bt,gt)&&(ke=bt[gt],ut+=this.attribute(ke));if(we.children.length===0||we.children.every(function(ht){return ht.value===""}))this.allowEmpty?ut+="></"+we.name+">"+this.newline:ut+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&we.children.length===1&&we.children[0].value!=null)ut+=">",ut+=we.children[0].value,ut+="</"+we.name+">"+this.newline;else{if(this.dontprettytextnodes){for(rt=we.children,je=0,Je=rt.length;je<Je;je++)if(Ne=rt[je],Ne.value!=null){this.textispresent++,Bt=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,ct=this.space(be)),ut+=">"+this.newline,St=we.children,Ve=0,We=St.length;Ve<We;Ve++)Ne=St[Ve],ut+=function(){switch(!1){case!(Ne instanceof Ce):return this.cdata(Ne,be+1);case!(Ne instanceof _e):return this.comment(Ne,be+1);case!(Ne instanceof de):return this.element(Ne,be+1);case!(Ne instanceof z):return this.raw(Ne,be+1);case!(Ne instanceof ee):return this.text(Ne,be+1);case!(Ne instanceof ue):return this.processingInstruction(Ne,be+1);default:throw new Error("Unknown XML node type: "+Ne.constructor.name)}}.call(this);Bt&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),ut+=ct+"</"+we.name+">"+this.newline}return ut},ye.prototype.processingInstruction=function(we,be){var ke;return ke=this.space(be)+"<?"+we.target,we.value&&(ke+=" "+we.value),ke+=this.spacebeforeslash+"?>"+this.newline},ye.prototype.raw=function(we,be){return this.space(be)+we.value+this.newline},ye.prototype.text=function(we,be){return this.space(be)+we.value+this.newline},ye.prototype.dtdAttList=function(we,be){var ke;return ke=this.space(be)+"<!ATTLIST "+we.elementName+" "+we.attributeName+" "+we.attributeType,we.defaultValueType!=="#DEFAULT"&&(ke+=" "+we.defaultValueType),we.defaultValue&&(ke+=' "'+we.defaultValue+'"'),ke+=this.spacebeforeslash+">"+this.newline},ye.prototype.dtdElement=function(we,be){return this.space(be)+"<!ELEMENT "+we.name+" "+we.value+this.spacebeforeslash+">"+this.newline},ye.prototype.dtdEntity=function(we,be){var ke;return ke=this.space(be)+"<!ENTITY",we.pe&&(ke+=" %"),ke+=" "+we.name,we.value?ke+=' "'+we.value+'"':(we.pubID&&we.sysID?ke+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(ke+=' SYSTEM "'+we.sysID+'"'),we.nData&&(ke+=" NDATA "+we.nData)),ke+=this.spacebeforeslash+">"+this.newline},ye.prototype.dtdNotation=function(we,be){var ke;return ke=this.space(be)+"<!NOTATION "+we.name,we.pubID&&we.sysID?ke+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.pubID?ke+=' PUBLIC "'+we.pubID+'"':we.sysID&&(ke+=' SYSTEM "'+we.sysID+'"'),ke+=this.spacebeforeslash+">"+this.newline},ye.prototype.openNode=function(we,be){var ke,Ne,je,Ve;if(be||(be=0),we instanceof de){je=this.space(be)+"<"+we.name,Ve=we.attributes;for(Ne in Ve)se.call(Ve,Ne)&&(ke=Ve[Ne],je+=this.attribute(ke));return je+=(we.children?">":"/>")+this.newline}return je=this.space(be)+"<!DOCTYPE "+we.rootNodeName,we.pubID&&we.sysID?je+=' PUBLIC "'+we.pubID+'" "'+we.sysID+'"':we.sysID&&(je+=' SYSTEM "'+we.sysID+'"'),je+=(we.children?" [":">")+this.newline},ye.prototype.closeNode=function(we,be){switch(be||(be=0),!1){case!(we instanceof de):return this.space(be)+"</"+we.name+">"+this.newline;case!(we instanceof ve):return this.space(be)+"]>"+this.newline}},ye}(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,Ie,Te){"use strict";(function(){var Ce=function(he,Se){return function(){return he.apply(Se,arguments)}},_e={}.hasOwnProperty;Ie.exports=function(){function he(Se){this.assertLegalChar=Ce(this.assertLegalChar,this);var xe,ge,ce;Se||(Se={}),this.noDoubleEncoding=Se.noDoubleEncoding,ge=Se.stringify||{};for(xe in ge)_e.call(ge,xe)&&(ce=ge[xe],this[xe]=ce)}return he.prototype.eleName=function(Se){return Se=""+Se||"",this.assertLegalChar(Se)},he.prototype.eleText=function(Se){return Se=""+Se||"",this.assertLegalChar(this.elEscape(Se))},he.prototype.cdata=function(Se){return Se=""+Se||"",Se=Se.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(Se)},he.prototype.comment=function(Se){if(Se=""+Se||"",Se.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+Se);return this.assertLegalChar(Se)},he.prototype.raw=function(Se){return""+Se||""},he.prototype.attName=function(Se){return Se=""+Se||""},he.prototype.attValue=function(Se){return Se=""+Se||"",this.attEscape(Se)},he.prototype.insTarget=function(Se){return""+Se||""},he.prototype.insValue=function(Se){if(Se=""+Se||"",Se.match(/\?>/))throw new Error("Invalid processing instruction value: "+Se);return Se},he.prototype.xmlVersion=function(Se){if(Se=""+Se||"",!Se.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+Se);return Se},he.prototype.xmlEncoding=function(Se){if(Se=""+Se||"",!Se.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+Se);return Se},he.prototype.xmlStandalone=function(Se){return Se?"yes":"no"},he.prototype.dtdPubID=function(Se){return""+Se||""},he.prototype.dtdSysID=function(Se){return""+Se||""},he.prototype.dtdElementValue=function(Se){return""+Se||""},he.prototype.dtdAttType=function(Se){return""+Se||""},he.prototype.dtdAttDefault=function(Se){return Se!=null?""+Se||"":Se},he.prototype.dtdEntityValue=function(Se){return""+Se||""},he.prototype.dtdNData=function(Se){return""+Se||""},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(Se){var xe;if(xe=Se.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+Se+" at index "+xe.index);return Se},he.prototype.elEscape=function(Se){var xe;return xe=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(xe,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},he.prototype.attEscape=function(Se){var xe;return xe=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(xe,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},he}()}).call(void 0)},{}],233:[function(me,Ie,Te){"use strict";var Ce=me("babel-runtime/core-js/object/create"),_e=function(he){return he&&he.__esModule?he:{default:he}}(Ce);(function(){var he,Se=function(ge,ce){function ve(){this.constructor=ge}for(var de in ce)xe.call(ce,de)&&(ge[de]=ce[de]);return ve.prototype=ce.prototype,ge.prototype=new ve,ge.__super__=ce.prototype,ge},xe={}.hasOwnProperty;he=me("./XMLNode"),Ie.exports=function(ge){function ce(ve,de){if(ce.__super__.constructor.call(this,ve),de==null)throw new Error("Missing element text");this.value=this.stringify.eleText(de)}return Se(ce,ge),ce.prototype.clone=function(){return(0,_e.default)(this)},ce.prototype.toString=function(ve){return this.options.writer.set(ve).text(this)},ce}(he)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(me,Ie,Te){"use strict";(function(){var Ce={}.hasOwnProperty;Ie.exports=function(){function _e(he){var Se,xe,ge,ce,ve,de,ue,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=(ce=he.newline)!=null?ce:`
|
|
|
`,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=(ue=he.spacebeforeslash)!=null?ue:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,z=he.writer||{};for(Se in z)Ce.call(z,Se)&&(ee=z[Se],this[Se]=ee)}return _e.prototype.set=function(he){var Se,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(Se in xe)Ce.call(xe,Se)&&(ge=xe[Se],this[Se]=ge);return this},_e.prototype.space=function(he){var Se;return this.pretty?(Se=(he||0)+this.offset+1,Se>0?new Array(Se).join(this.indent):""):""},_e}()}).call(void 0)},{}],235:[function(me,Ie,Te){"use strict";(function(){var Ce,_e,he,Se,xe,ge,ce;ce=me("./Utility"),xe=ce.assign,ge=ce.isFunction,Ce=me("./XMLDocument"),_e=me("./XMLDocumentCB"),Se=me("./XMLStringWriter"),he=me("./XMLStreamWriter"),Ie.exports.create=function(ve,de,ue,z){var ee,oe;if(ve==null)throw new Error("Root element needs a name");return z=xe({},de,ue,z),ee=new Ce(z),oe=ee.element(ve),z.headless||(ee.declaration(z),z.pubID==null&&z.sysID==null||ee.doctype(z)),oe},Ie.exports.begin=function(ve,de,ue){var z;return ge(ve)&&(z=[ve,de],de=z[0],ue=z[1],ve={}),de?new _e(ve,de,ue):new Ce(ve)},Ie.exports.stringWriter=function(ve){return new Se(ve)},Ie.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,Ie,Te){function Ce(){for(var he={},Se=0;Se<arguments.length;Se++){var xe=arguments[Se];for(var ge in xe)_e.call(xe,ge)&&(he[ge]=xe[ge])}return he}Ie.exports=Ce;var _e=Object.prototype.hasOwnProperty},{}],237:[function(me,Ie,Te){"use strict";function Ce(z,ee,oe){Se.isBuffer(ee)||(ee=new Se(ee)),Se.isBuffer(oe)||(oe=new Se(oe)),ee.length>de?ee=z(ee):ee.length<de&&(ee=Se.concat([ee,ue],de));for(var ie=new Se(de),se=new Se(de),le=0;le<de;le++)ie[le]=54^ee[le],se[le]=92^ee[le];var ye=z(Se.concat([ie,oe]));return z(Se.concat([se,ye]))}function _e(z,ee){z=z||"sha1";var oe=ve[z],ie=[],se=0;return oe||he("algorithm:",z,"is not yet supported"),{update:function(le){return Se.isBuffer(le)||(le=new Se(le)),ie.push(le),se+=le.length,this},digest:function(le){var ye=Se.concat(ie),we=ee?Ce(oe,ee,ye):oe(ye);return ie=null,le?we.toString(le):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 Se=me("buffer").Buffer,xe=me("./sha"),ge=me("./sha256"),ce=me("./md5"),ve={sha1:xe,sha256:ge,md5:ce},de=64,ue=new Se(de);ue.fill(0),Te.createHash=function(z){return _e(z)},Te.createHmac=function(z,ee){return _e(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){Te[z]=function(){he("sorry,",z,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(me,Ie,Te){"use strict";function Ce(ve,de){if(ve.length%xe!=0){var ue=ve.length+(xe-ve.length%xe);ve=Se.concat([ve,ge],ue)}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 _e(ve,de,ue){for(var z=new Se(de),ee=ue?z.writeInt32BE:z.writeInt32LE,oe=0;oe<ve.length;oe++)ee.call(z,ve[oe],4*oe,!0);return z}function he(ve,de,ue,z){return Se.isBuffer(ve)||(ve=new Se(ve)),_e(de(Ce(ve,z),ve.length*ce),ue,z)}var Se=me("buffer").Buffer,xe=4,ge=new Se(xe);ge.fill(0);var ce=8;Ie.exports={hash:he}},{buffer:38}],239:[function(me,Ie,Te){"use strict";function Ce(ue,z){ue[z>>5]|=128<<z%32,ue[14+(z+64>>>9<<4)]=z;for(var ee=1732584193,oe=-271733879,ie=-1732584194,se=271733878,le=0;le<ue.length;le+=16){var ye=ee,we=oe,be=ie,ke=se;ee=he(ee,oe,ie,se,ue[le+0],7,-680876936),se=he(se,ee,oe,ie,ue[le+1],12,-389564586),ie=he(ie,se,ee,oe,ue[le+2],17,606105819),oe=he(oe,ie,se,ee,ue[le+3],22,-1044525330),ee=he(ee,oe,ie,se,ue[le+4],7,-176418897),se=he(se,ee,oe,ie,ue[le+5],12,1200080426),ie=he(ie,se,ee,oe,ue[le+6],17,-1473231341),oe=he(oe,ie,se,ee,ue[le+7],22,-45705983),ee=he(ee,oe,ie,se,ue[le+8],7,1770035416),se=he(se,ee,oe,ie,ue[le+9],12,-1958414417),ie=he(ie,se,ee,oe,ue[le+10],17,-42063),oe=he(oe,ie,se,ee,ue[le+11],22,-1990404162),ee=he(ee,oe,ie,se,ue[le+12],7,1804603682),se=he(se,ee,oe,ie,ue[le+13],12,-40341101),ie=he(ie,se,ee,oe,ue[le+14],17,-1502002290),oe=he(oe,ie,se,ee,ue[le+15],22,1236535329),ee=Se(ee,oe,ie,se,ue[le+1],5,-165796510),se=Se(se,ee,oe,ie,ue[le+6],9,-1069501632),ie=Se(ie,se,ee,oe,ue[le+11],14,643717713),oe=Se(oe,ie,se,ee,ue[le+0],20,-373897302),ee=Se(ee,oe,ie,se,ue[le+5],5,-701558691),se=Se(se,ee,oe,ie,ue[le+10],9,38016083),ie=Se(ie,se,ee,oe,ue[le+15],14,-660478335),oe=Se(oe,ie,se,ee,ue[le+4],20,-405537848),ee=Se(ee,oe,ie,se,ue[le+9],5,568446438),se=Se(se,ee,oe,ie,ue[le+14],9,-1019803690),ie=Se(ie,se,ee,oe,ue[le+3],14,-187363961),oe=Se(oe,ie,se,ee,ue[le+8],20,1163531501),ee=Se(ee,oe,ie,se,ue[le+13],5,-1444681467),se=Se(se,ee,oe,ie,ue[le+2],9,-51403784),ie=Se(ie,se,ee,oe,ue[le+7],14,1735328473),oe=Se(oe,ie,se,ee,ue[le+12],20,-1926607734),ee=xe(ee,oe,ie,se,ue[le+5],4,-378558),se=xe(se,ee,oe,ie,ue[le+8],11,-2022574463),ie=xe(ie,se,ee,oe,ue[le+11],16,1839030562),oe=xe(oe,ie,se,ee,ue[le+14],23,-35309556),ee=xe(ee,oe,ie,se,ue[le+1],4,-1530992060),se=xe(se,ee,oe,ie,ue[le+4],11,1272893353),ie=xe(ie,se,ee,oe,ue[le+7],16,-155497632),oe=xe(oe,ie,se,ee,ue[le+10],23,-1094730640),ee=xe(ee,oe,ie,se,ue[le+13],4,681279174),se=xe(se,ee,oe,ie,ue[le+0],11,-358537222),ie=xe(ie,se,ee,oe,ue[le+3],16,-722521979),oe=xe(oe,ie,se,ee,ue[le+6],23,76029189),ee=xe(ee,oe,ie,se,ue[le+9],4,-640364487),se=xe(se,ee,oe,ie,ue[le+12],11,-421815835),ie=xe(ie,se,ee,oe,ue[le+15],16,530742520),oe=xe(oe,ie,se,ee,ue[le+2],23,-995338651),ee=ge(ee,oe,ie,se,ue[le+0],6,-198630844),se=ge(se,ee,oe,ie,ue[le+7],10,1126891415),ie=ge(ie,se,ee,oe,ue[le+14],15,-1416354905),oe=ge(oe,ie,se,ee,ue[le+5],21,-57434055),ee=ge(ee,oe,ie,se,ue[le+12],6,1700485571),se=ge(se,ee,oe,ie,ue[le+3],10,-1894986606),ie=ge(ie,se,ee,oe,ue[le+10],15,-1051523),oe=ge(oe,ie,se,ee,ue[le+1],21,-2054922799),ee=ge(ee,oe,ie,se,ue[le+8],6,1873313359),se=ge(se,ee,oe,ie,ue[le+15],10,-30611744),ie=ge(ie,se,ee,oe,ue[le+6],15,-1560198380),oe=ge(oe,ie,se,ee,ue[le+13],21,1309151649),ee=ge(ee,oe,ie,se,ue[le+4],6,-145523070),se=ge(se,ee,oe,ie,ue[le+11],10,-1120210379),ie=ge(ie,se,ee,oe,ue[le+2],15,718787259),oe=ge(oe,ie,se,ee,ue[le+9],21,-343485551),ee=ce(ee,ye),oe=ce(oe,we),ie=ce(ie,be),se=ce(se,ke)}return Array(ee,oe,ie,se)}function _e(ue,z,ee,oe,ie,se){return ce(ve(ce(ce(z,ue),ce(oe,se)),ie),ee)}function he(ue,z,ee,oe,ie,se,le){return _e(z&ee|~z&oe,ue,z,ie,se,le)}function Se(ue,z,ee,oe,ie,se,le){return _e(z&oe|ee&~oe,ue,z,ie,se,le)}function xe(ue,z,ee,oe,ie,se,le){return _e(z^ee^oe,ue,z,ie,se,le)}function ge(ue,z,ee,oe,ie,se,le){return _e(ee^(z|~oe),ue,z,ie,se,le)}function ce(ue,z){var ee=(65535&ue)+(65535&z);return(ue>>16)+(z>>16)+(ee>>16)<<16|65535&ee}function ve(ue,z){return ue<<z|ue>>>32-z}var de=me("./helpers");Ie.exports=function(ue){return de.hash(ue,Ce,16)}},{"./helpers":238}],240:[function(me,Ie,Te){"use strict";function Ce(ce,ve){ce[ve>>5]|=128<<24-ve%32,ce[15+(ve+64>>9<<4)]=ve;for(var de=Array(80),ue=1732584193,z=-271733879,ee=-1732584194,oe=271733878,ie=-1009589776,se=0;se<ce.length;se+=16){for(var le=ue,ye=z,we=ee,be=oe,ke=ie,Ne=0;Ne<80;Ne++){de[Ne]=Ne<16?ce[se+Ne]:xe(de[Ne-3]^de[Ne-8]^de[Ne-14]^de[Ne-16],1);var je=Se(Se(xe(ue,5),_e(Ne,z,ee,oe)),Se(Se(ie,de[Ne]),he(Ne)));ie=oe,oe=ee,ee=xe(z,30),z=ue,ue=je}ue=Se(ue,le),z=Se(z,ye),ee=Se(ee,we),oe=Se(oe,be),ie=Se(ie,ke)}return Array(ue,z,ee,oe,ie)}function _e(ce,ve,de,ue){return ce<20?ve&de|~ve&ue:ce<40?ve^de^ue:ce<60?ve&de|ve&ue|de&ue:ve^de^ue}function he(ce){return ce<20?1518500249:ce<40?1859775393:ce<60?-1894007588:-899497514}function Se(ce,ve){var de=(65535&ce)+(65535&ve);return(ce>>16)+(ve>>16)+(de>>16)<<16|65535&de}function xe(ce,ve){return ce<<ve|ce>>>32-ve}var ge=me("./helpers");Ie.exports=function(ce){return ge.hash(ce,Ce,20,!0)}},{"./helpers":238}],241:[function(me,Ie,Te){"use strict";var Ce=me("./helpers"),_e=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},Se=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},ce=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)^Se(ee,3)},ue=function(ee){return he(ee,17)^he(ee,19)^Se(ee,10)},z=function(ee,oe){var ie,se,le,ye,we,be,ke,Ne,je,Ve,Je,We,gt=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),ut=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),bt=new Array(64);ee[oe>>5]|=128<<24-oe%32,ee[15+(oe+64>>9<<4)]=oe;for(var je=0;je<ee.length;je+=16){ie=ut[0],se=ut[1],le=ut[2],ye=ut[3],we=ut[4],be=ut[5],ke=ut[6],Ne=ut[7];for(var Ve=0;Ve<64;Ve++)bt[Ve]=Ve<16?ee[Ve+je]:_e(_e(_e(ue(bt[Ve-2]),bt[Ve-7]),de(bt[Ve-15])),bt[Ve-16]),Je=_e(_e(_e(_e(Ne,ve(we)),xe(we,be,ke)),gt[Ve]),bt[Ve]),We=_e(ce(ie),ge(ie,se,le)),Ne=ke,ke=be,be=we,we=_e(ye,Je),ye=le,le=se,se=ie,ie=_e(Je,We);ut[0]=_e(ie,ut[0]),ut[1]=_e(se,ut[1]),ut[2]=_e(le,ut[2]),ut[3]=_e(ye,ut[3]),ut[4]=_e(we,ut[4]),ut[5]=_e(be,ut[5]),ut[6]=_e(ke,ut[6]),ut[7]=_e(Ne,ut[7])}return ut};Ie.exports=function(ee){return Ce.hash(ee,z,32,!0)}},{"./helpers":238}],242:[function(me,Ie,Te){(function(Ce){"use strict";function _e(z){return z&&z.__esModule?z:{default:z}}var he=me("babel-runtime/core-js/object/create"),Se=_e(he),xe=me("babel-runtime/helpers/classCallCheck"),ge=_e(xe),ce=me("babel-runtime/helpers/createClass"),ve=_e(ce),de=me("babel-runtime/helpers/typeof"),ue=_e(de);(function(z){if((Te===void 0?"undefined":(0,ue.default)(Te))==="object"&&Ie!==void 0)Ie.exports=z();else if(typeof Le=="function"&&Le.amd)Le([],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,be){if(!oe[we]){if(!ee[we]){var ke=typeof me=="function"&&me;if(!be&&ke)return ke(we,!0);if(le)return le(we,!0);var Ne=new Error("Cannot find module '"+we+"'");throw Ne.code="MODULE_NOT_FOUND",Ne}var je=oe[we]={exports:{}};ee[we][0].call(je.exports,function(Ve){var Je=ee[we][1][Ve];return se(Je||Ve)},je,je.exports,z,ee,oe,ie)}return oe[we].exports}for(var le=typeof me=="function"&&me,ye=0;ye<ie.length;ye++)se(ie[ye]);return se}({1:[function(z,ee,oe){var ie=function(){function se(){(0,ge.default)(this,se),this._types=(0,Se.default)(null),this._extensions=(0,Se.default)(null);for(var le=0;le<arguments.length;le++)this.define(arguments[le])}return(0,ve.default)(se,[{key:"define",value:function(le,ye){for(var we in le){for(var be=le[we],ke=0;ke<be.length;ke++){var Ne=be[ke];if(!ye&&Ne in this._types)throw new Error('Attempt to change mapping for "'+Ne+'" extension from "'+this._types[Ne]+'" to "'+we+'". Pass `force=true` to allow this, otherwise remove "'+Ne+'" from the list of extensions for "'+we+'".');this._types[Ne]=we}!ye&&this._extensions[we]||(this._extensions[we]=be[0])}}},{key:"getType",value:function(le){le=String(le);var ye=le.replace(/^.*[\/\\]/,"").toLowerCase(),we=ye.replace(/^.*\./,"").toLowerCase(),be=ye.length<le.length;return(we.length<ye.length-1||!be)&&this._types[we]||null}},{key:"getExtension",value:function(le){return(le=/^\s*([^;\s]*)/.test(le)&&RegExp.$1)&&this._extensions[le.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,Ie,Te){"use strict";Te.encodeURIComponent=function(Ce){try{return encodeURIComponent(Ce)}catch(_e){return Ce}},Te.escape=me("escape-html"),Te.timestamp=function(Ce){if(Ce){var _e=Ce;return typeof _e=="string"&&(_e=Number(_e)),String(Ce).length===10&&(_e*=1e3),new Date(_e)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(me,Ie,Te){(function(Ce,_e){"use strict";function he(Ne){return Ne&&Ne.__esModule?Ne:{default:Ne}}function Se(Ne,je){return Ne===void 0?je:Ne}function xe(Ne,je){return function(Ve,Je,We){if(Ve)return je(Ve);Ne({data:Je,status:We.statusCode,headers:We.headers,res:We})}}var ge,ce=me("babel-runtime/core-js/json/stringify"),ve=he(ce),de=me("babel-runtime/helpers/typeof"),ue=he(de),z=me("util"),ee=me("url"),oe=me("http"),ie=me("https"),se=me("debug")("urllib"),le=me("humanize-ms"),ye=0,we=Math.pow(2,31)-10,be=/^https?:\/\//i;Te.TIMEOUTS=[le("300s"),le("300s")];var ke=["json","text"];Te.request=function(Ne,je,Ve){return arguments.length===2&&typeof je=="function"&&(Ve=je,je=null),typeof Ve=="function"?Te.requestWithCallback(Ne,je,Ve):(ge||(ge=me("any-promise")),new ge(function(Je,We){Te.requestWithCallback(Ne,je,xe(Je,We))}))},Te.requestWithCallback=function(Ne,je,Ve){function Je(){Ue&&(clearTimeout(Ue),Ue=null)}function We(){Xe&&(clearTimeout(Xe),Xe=null)}function gt(Mn,Zn,Tn){if(We(),!Ve)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),ht,Ce.pid,Vt.method,Ne),void(Mn&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),ht,Ce.pid,Mn.name,Mn.message,Mn.stack));var ci=Ve;Ve=null;var ai={};if(Tn&&(Ze=Tn.statusCode,ai=Tn.headers),Ze===401&&ai["www-authenticate"]&&(!je.headers||!je.headers.Authorization)&&je.digestAuth){var ki=ai["www-authenticate"];if(ki.indexOf("Digest ")>=0)return se("Request#%d %s: got digest auth header WWW-Authenticate: %s",ht,Ne,ki),je.headers=je.headers||{},je.headers.Authorization=digestAuthHeader(Vt.method,Vt.path,ki,je.digestAuth),se("Request#%d %s: auth with digest header: %s",ht,Ne,je.headers.Authorization),Tn.headers["set-cookie"]&&(je.headers.Cookie=Tn.headers["set-cookie"].join(";")),Te.requestWithCallback(Ne,je,ci)}var Ci=Date.now()-yt;nn&&(nn.contentDownload=Ci),se("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ci,Ke,Ze,Vt.method,Vt.host,Vt.path,Ge,nn);var or={status:Ze,statusCode:Ze,headers:ai,size:Ke,aborted:at,rt:Ci,keepAliveSocket:Ge,data:Zn,requestUrls:je.requestUrls,timing:nn,remoteAddress:xt,remotePort:tn};if(Mn){var tr="";jt&&typeof jt.getCurrentStatus=="function"&&(tr=", agent status: "+(0,ve.default)(jt.getCurrentStatus())),Mn.message+=", "+Vt.method+" "+Ne+" "+Ze+" (connected: "+Ae+", keepalive socket: "+Ge+tr+`)
|
|
|
headers: `+(0,ve.default)(ai),Mn.data=Zn,Mn.path=Vt.path,Mn.status=Ze,Mn.headers=ai,Mn.res=or}ci(Mn,Zn,je.streaming?Tn:or),je.emitter&&(it.url=Ne,it.socket=fn&&fn.connection,it.options=Vt,it.size=qe,je.emitter.emit("response",{requestId:ht,error:Mn,ctx:je.ctx,req:it,res:or}))}function ut(Mn){var Zn=null;if(je.followRedirect&&statuses.redirect[Mn.statusCode]){je._followRedirectCount=(je._followRedirectCount||0)+1;var Tn=Mn.headers.location;if(Tn){if(!(je._followRedirectCount>je.maxRedirects)){var ci=je.formatRedirectUrl?je.formatRedirectUrl(Ne,Tn):ee.resolve(Ne,Tn);se("Request#%d %s: `redirected` from %s to %s",ht,Vt.path,Ne,ci),We(),je.headers&&je.headers.Host&&be.test(Tn)&&(je.headers.Host=null);var ai=Ve;return Ve=null,Te.requestWithCallback(ci,je,ai),{redirect:!0,error:null}}Zn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Ne),Zn.name="MaxRedirectError"}else Zn=new Error("Got statusCode "+Mn.statusCode+" but cannot resolve next location from headers"),Zn.name="FollowRedirectError"}return{redirect:!1,error:Zn}}function bt(Mn,Zn,Tn){return Tn(null,Zn,Mn.headers["content-encoding"])}function rt(Mn){if(nn&&(nn.waiting=Date.now()-yt),se("Request#%d %s `req response` event emit: status %d, headers: %j",ht,Ne,Mn.statusCode,Mn.headers),je.streaming){var Zn=ut(Mn);return Zn.redirect?void Mn.resume():Zn.error?(Mn.resume(),gt(Zn.error,null,Mn)):gt(null,null,Mn)}if(Mn.on("close",function(){se("Request#%d %s: `res close` event emit, total size %d",ht,Ne,Ke)}),Mn.on("error",function(){se("Request#%d %s: `res error` event emit, total size %d",ht,Ne,Ke)}),Mn.on("aborted",function(){at=!0,se("Request#%d %s: `res aborted` event emit, total size %d",ht,Ne,Ke)}),Jt){var Zn=ut(Mn);return Zn.redirect?void Mn.resume():Zn.error?(Mn.resume(),Jt.end(),gt(Zn.error,null,Mn)):(je.consumeWriteStream===!1?Mn.on("end",gt.bind(null,null,null,Mn)):isNode010||isNode012?first([[Jt,"close"],[Mn,"aborted"]],function(ai,ki,Ci){se("Request#%d %s: writeStream or res %s event emitted",ht,Ne,Ci),gt(Re||null,null,Mn)}):Jt.on("close",function(){se("Request#%d %s: writeStream close event emitted",ht,Ne),gt(Re||null,null,Mn)}),Mn.pipe(Jt))}var Tn=[];Mn.on("data",function(ci){se("Request#%d %s: `res data` event emit, size %d",ht,Ne,ci.length),Ke+=ci.length,Tn.push(ci)}),Mn.on("end",function(){var ci=_e.concat(Tn,Ke);if(se("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",ht,Ne,Ke,Mn._dumped),Re)return gt(Re,ci,Mn);var ai=ut(Mn);if(ai.error)return gt(ai.error,ci,Mn);ai.redirect||bt(Mn,ci,function(ki,Ci,or){if(ki)return gt(ki,ci,Mn);if(!or&&ke.indexOf(je.dataType)>=0){try{Ci=decodeBodyByCharset(Ci,Mn)}catch(pr){return se("decodeBodyByCharset error: %s",pr),gt(null,Ci,Mn)}if(je.dataType==="json")if(Ke===0)Ci=null;else{var tr=parseJSON(Ci,un);tr.error?ki=tr.error:Ci=tr.data}}at&&se("Request#%d %s: Remote socket was terminated before `response.end()` was called",ht,Ne),gt(ki,Ci,Mn)})})}function St(){se("Response timer ticking, timeout: %d",kn),Xe=setTimeout(function(){Xe=null;var Mn="Response timeout for "+kn+"ms";Re=new Error(Mn),Re.name="ResponseTimeoutError",Re.requestId=ht,se("ResponseTimeout: Request#%d %s %s: %s, connected: %s",ht,Ne,Re.name,Mn,Ae),ct()},kn)}function ct(){se("Request#%d %s abort, connected: %s",ht,Ne,Ae),fn.socket||(Re.noSocket=!0,gt(Re)),fn.abort()}if(!Ne||typeof Ne!="string"&&(Ne===void 0?"undefined":(0,ue.default)(Ne))!=="object"){var Bt=z.format("expect request url to be a string or a http request options, but got %j",Ne);throw new Error(Bt)}arguments.length===2&&typeof je=="function"&&(Ve=je,je=null),je=je||{},ye>=we&&(ye=0);var ht=++ye;je.requestUrls=je.requestUrls||[];var it={requestId:ht,url:Ne,args:je,ctx:je.ctx};je.emitter&&je.emitter.emit("request",it),je.timeout=je.timeout||Te.TIMEOUTS,je.maxRedirects=je.maxRedirects||10,je.streaming=je.streaming||je.customResponse;var dt,yt=Date.now();typeof Ne=="string"?(be.test(Ne)||(Ne="http://"+Ne),dt=ee.parse(Ne)):dt=Ne;var Et=(je.type||je.method||dt.method||"GET").toUpperCase(),vt=dt.port||80,Rt=oe,jt=Se(je.agent,Te.agent),un=je.fixJSONCtlChars;dt.protocol==="https:"&&(Rt=ie,jt=Se(je.httpsAgent,Te.httpsAgent),dt.port||(vt=443));var Vt={host:dt.hostname||dt.host||"localhost",path:dt.path||"/",method:Et,port:vt,agent:jt,headers:je.headers||{},lookup:je.lookup};Array.isArray(je.timeout)?Vt.requestTimeout=je.timeout[je.timeout.length-1]:je.timeout!==void 0&&(Vt.requestTimeout=je.timeout);for(var xn=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Ut=0;Ut<xn.length;Ut++){var Zt=xn[Ut];je.hasOwnProperty(Zt)&&(Vt[Zt]=je[Zt])}Vt.rejectUnauthorized!==!1||Vt.hasOwnProperty("secureOptions")||(Vt.secureOptions=me("constants").SSL_OP_NO_TLSv1_2);var Xt=je.auth||dt.auth;Xt&&(Vt.auth=Xt);var mt=je.content||je.data,ze=Et==="GET"||Et==="HEAD"||je.dataAsQueryString;if(!je.content&&mt&&typeof mt!="string"&&!_e.isBuffer(mt))if(ze)mt=je.nestedQuerystring?qs.stringify(mt):querystring.stringify(mt);else{var Be=Vt.headers["Content-Type"]||Vt.headers["content-type"];Be||(Be=je.contentType==="json"?"application/json":"application/x-www-form-urlencoded",Vt.headers["Content-Type"]=Be),mt=parseContentType(Be).type==="application/json"?(0,ve.default)(mt):je.nestedQuerystring?qs.stringify(mt):querystring.stringify(mt)}ze&&mt&&(Vt.path+=(dt.query?"&":"?")+mt,mt=null);var qe=0;if(mt){var Qe=mt.length;_e.isBuffer(mt)||(Qe=_e.byteLength(mt)),qe=Vt.headers["Content-Length"]=Qe}je.dataType==="json"&&(Vt.headers.Accept="application/json"),typeof je.beforeRequest=="function"&&je.beforeRequest(Vt);var Ue=null,Xe=null,Re=null,Ae=!1,Ge=!1,Ke=0,Ze=-1,at=!1,xt="",tn="",nn=null;je.timing&&(nn={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),Vt.headers["User-Agent"]||Vt.headers["user-agent"]||(Vt.headers["User-Agent"]=navigator.userAgent),je.gzip&&(Vt.headers["Accept-Encoding"]||Vt.headers["accept-encoding"]||(Vt.headers["Accept-Encoding"]="gzip"));var Jt=je.writeStream;se("Request#%d %s %s with headers %j, options.path: %s",ht,Et,Ne,Vt.headers,Vt.path),je.requestUrls.push(Ne);var mn,kn;Array.isArray(je.timeout)?(mn=le(je.timeout[0]),kn=le(je.timeout[1])):mn=kn=le(je.timeout),se("ConnectTimeout: %d, ResponseTimeout: %d",mn,kn);var fn;try{fn=Rt.request(Vt,rt)}catch(Mn){return gt(Mn)}return typeof window=="undefined"?function(){se("Connect timer ticking, timeout: %d",mn),Ue=setTimeout(function(){Ue=null,Ze===-1&&(Ze=-2);var Mn="Connect timeout for "+mn+"ms",Zn="ConnectionTimeoutError";fn.socket||(Zn="SocketAssignTimeoutError",Mn+=", working sockets is full"),Re=new Error(Mn),Re.name=Zn,Re.requestId=ht,se("ConnectTimeout: Request#%d %s %s: %s, connected: %s",ht,Ne,Re.name,Mn,Ae),ct()},mn)}():fn.on("requestTimeout",function(){Ze===-1&&(Ze=-2);var Mn="Connect timeout for "+mn+"ms";Re=new Error(Mn),Re.name="ConnectionTimeoutError",Re.requestId=ht,ct()}),nn&&fn.on("finish",function(){nn.requestSent=Date.now()-yt}),fn.once("socket",function(Mn){nn&&(nn.queuing=Date.now()-yt),isNode010&&Mn.socket&&(Mn=Mn.socket);var Zn=Mn.readyState;if(Zn==="opening")return Mn.once("lookup",function(Tn,ci,ai){se("Request#%d %s lookup: %s, %s, %s",ht,Ne,Tn,ci,ai),nn&&(nn.dnslookup=Date.now()-yt),ci&&(xt=ci)}),void Mn.once("connect",function(){nn&&(nn.connected=Date.now()-yt),Je(),St(),se("Request#%d %s new socket connected",ht,Ne),Ae=!0,xt||(xt=Mn.remoteAddress),tn=Mn.remotePort});se("Request#%d %s reuse socket connected, readyState: %s",ht,Ne,Zn),Ae=!0,Ge=!0,xt||(xt=Mn.remoteAddress),tn=Mn.remotePort,Je(),St()}),fn.on("error",function(Mn){Mn.name!=="Error"&&Mn.name!=="TypeError"||(Mn.name=Ae?"ResponseError":"RequestError"),Mn.message+=' (req "error")',se("Request#%d %s `req error` event emit, %s: %s",ht,Ne,Mn.name,Mn.message),gt(Re||Mn)}),Jt&&Jt.once("error",function(Mn){Mn.message+=' (writeStream "error")',Re=Mn,se("Request#%d %s `writeStream error` event emit, %s: %s",ht,Ne,Mn.name,Mn.message),ct()}),je.stream?(je.stream.pipe(fn),je.stream.once("error",function(Mn){Mn.message+=' (stream "error")',Re=Mn,se("Request#%d %s `readStream error` event emit, %s: %s",ht,Ne,Mn.name,Mn.message),ct()})):fn.end(mt),fn.requestId=ht,fn}}).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(Le){function me(Te){if(Ie[Te])return Ie[Te].exports;var Ce=Ie[Te]={i:Te,l:!1,exports:{}};return Le[Te].call(Ce.exports,Ce,Ce.exports,me),Ce.l=!0,Ce.exports}var Ie={};me.m=Le,me.c=Ie,me.d=function(Te,Ce,_e){me.o(Te,Ce)||Object.defineProperty(Te,Ce,{configurable:!1,enumerable:!0,get:_e})},me.n=function(Te){var Ce=Te&&Te.__esModule?function(){return Te.default}:function(){return Te};return me.d(Ce,"a",Ce),Ce},me.o=function(Te,Ce){return Object.prototype.hasOwnProperty.call(Te,Ce)},me.p="",me(me.s=12)}([function(Le,me,Ie){(function(Te,Ce){Le.exports=me=Ce()})(0,function(){var Te=Te||function(Ce,_e){var he=Object.create||function(){function ie(){}return function(se){var le;return ie.prototype=se,le=new ie,ie.prototype=null,le}}(),Se={},xe=Se.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)}}}(),ce=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,le=ie.words,ye=this.sigBytes,we=ie.sigBytes;if(this.clamp(),ye%4)for(var be=0;be<we;be++){var ke=le[be>>>2]>>>24-be%4*8&255;se[ye+be>>>2]|=ke<<24-(ye+be)%4*8}else for(var be=0;be<we;be+=4)se[ye+be>>>2]=le[be>>>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,le=[],ye=0;ye<ie;ye+=4){var we=function(ke){var ke=ke,Ne=987654321,je=4294967295;return function(){Ne=36969*(65535&Ne)+(Ne>>16)&je,ke=18e3*(65535&ke)+(ke>>16)&je;var Ve=(Ne<<16)+ke&je;return Ve/=4294967296,(Ve+=.5)*(Ce.random()>.5?1:-1)}}(4294967296*(se||Ce.random()));se=987654071*we(),le.push(4294967296*we()|0)}return new ce.init(le,ie)}}),ve=Se.enc={},de=ve.Hex={stringify:function(ie){for(var se=ie.words,le=ie.sigBytes,ye=[],we=0;we<le;we++){var be=se[we>>>2]>>>24-we%4*8&255;ye.push((be>>>4).toString(16)),ye.push((15&be).toString(16))}return ye.join("")},parse:function(ie){for(var se=ie.length,le=[],ye=0;ye<se;ye+=2)le[ye>>>3]|=parseInt(ie.substr(ye,2),16)<<24-ye%8*4;return new ce.init(le,se/2)}},ue=ve.Latin1={stringify:function(ie){for(var se=ie.words,le=ie.sigBytes,ye=[],we=0;we<le;we++){var be=se[we>>>2]>>>24-we%4*8&255;ye.push(String.fromCharCode(be))}return ye.join("")},parse:function(ie){for(var se=ie.length,le=[],ye=0;ye<se;ye++)le[ye>>>2]|=(255&ie.charCodeAt(ye))<<24-ye%4*8;return new ce.init(le,se)}},z=ve.Utf8={stringify:function(ie){try{return decodeURIComponent(escape(ue.stringify(ie)))}catch(se){throw new Error("Malformed UTF-8 data")}},parse:function(ie){return ue.parse(unescape(encodeURIComponent(ie)))}},ee=xe.BufferedBlockAlgorithm=ge.extend({reset:function(){this._data=new ce.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,le=se.words,ye=se.sigBytes,we=this.blockSize,be=4*we,ke=ye/be;ke=ie?Ce.ceil(ke):Ce.max((0|ke)-this._minBufferSize,0);var Ne=ke*we,je=Ce.min(4*Ne,ye);if(Ne){for(var Ve=0;Ve<Ne;Ve+=we)this._doProcessBlock(le,Ve);var Je=le.splice(0,Ne);se.sigBytes-=je}return new ce.init(Je,je)},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,le){return new ie.init(le).finalize(se)}},_createHmacHelper:function(ie){return function(se,le){return new oe.HMAC.init(ie,le).finalize(se)}}}),Se.algo={});return Se}(Math);return Te})},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),_e=function(){function he(){Te(this,he)}return Ce(he,null,[{key:"detectIEVersion",value:function(){for(var Se=4,xe=document.createElement("div"),ge=xe.getElementsByTagName("i");xe.innerHTML="<!--[if gt IE "+Se+"]><i></i><![endif]-->",ge[0];)Se++;return Se>4&&Se}},{key:"extend",value:function(Se,xe){for(var ge in xe)Object.prototype.hasOwnProperty.call(xe,ge)&&xe[ge]&&(Se[ge]=xe[ge])}},{key:"isArray",value:function(Se){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(Se){return Se=Se.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(Se)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(Se)?"audio":/.bmp|.jpg|.jpeg|.png/.test(Se)?"img":"other"}},{key:"isImage",value:function(Se){return Se=Se.toLowerCase(),!!/.jpg|.jpeg|.png/.test(Se)}},{key:"ISODateString",value:function(Se){function xe(ge){return ge<10?"0"+ge:ge}return Se.getUTCFullYear()+"-"+xe(Se.getUTCMonth()+1)+"-"+xe(Se.getUTCDate())+"T"+xe(Se.getUTCHours())+":"+xe(Se.getUTCMinutes())+":"+xe(Se.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(Se){return!!/^\d+$/.test(Se)}}]),he}();me.default=_e},function(Le,me,Ie){(function(Te,Ce){Le.exports=me=Ce(Ie(0))})(0,function(Te){return function(Ce){function _e(oe,ie,se,le,ye,we,be){var ke=oe+(ie&se|~ie&le)+ye+be;return(ke<<we|ke>>>32-we)+ie}function he(oe,ie,se,le,ye,we,be){var ke=oe+(ie&le|se&~le)+ye+be;return(ke<<we|ke>>>32-we)+ie}function Se(oe,ie,se,le,ye,we,be){var ke=oe+(ie^se^le)+ye+be;return(ke<<we|ke>>>32-we)+ie}function xe(oe,ie,se,le,ye,we,be){var ke=oe+(se^(ie|~le))+ye+be;return(ke<<we|ke>>>32-we)+ie}var ge=Te,ce=ge.lib,ve=ce.WordArray,de=ce.Hasher,ue=ge.algo,z=[];(function(){for(var oe=0;oe<64;oe++)z[oe]=4294967296*Ce.abs(Ce.sin(oe+1))|0})();var ee=ue.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 le=ie+se,ye=oe[le];oe[le]=16711935&(ye<<8|ye>>>24)|4278255360&(ye<<24|ye>>>8)}var we=this._hash.words,be=oe[ie+0],ke=oe[ie+1],Ne=oe[ie+2],je=oe[ie+3],Ve=oe[ie+4],Je=oe[ie+5],We=oe[ie+6],gt=oe[ie+7],ut=oe[ie+8],bt=oe[ie+9],rt=oe[ie+10],St=oe[ie+11],ct=oe[ie+12],Bt=oe[ie+13],ht=oe[ie+14],it=oe[ie+15],dt=we[0],yt=we[1],Et=we[2],vt=we[3];dt=_e(dt,yt,Et,vt,be,7,z[0]),vt=_e(vt,dt,yt,Et,ke,12,z[1]),Et=_e(Et,vt,dt,yt,Ne,17,z[2]),yt=_e(yt,Et,vt,dt,je,22,z[3]),dt=_e(dt,yt,Et,vt,Ve,7,z[4]),vt=_e(vt,dt,yt,Et,Je,12,z[5]),Et=_e(Et,vt,dt,yt,We,17,z[6]),yt=_e(yt,Et,vt,dt,gt,22,z[7]),dt=_e(dt,yt,Et,vt,ut,7,z[8]),vt=_e(vt,dt,yt,Et,bt,12,z[9]),Et=_e(Et,vt,dt,yt,rt,17,z[10]),yt=_e(yt,Et,vt,dt,St,22,z[11]),dt=_e(dt,yt,Et,vt,ct,7,z[12]),vt=_e(vt,dt,yt,Et,Bt,12,z[13]),Et=_e(Et,vt,dt,yt,ht,17,z[14]),yt=_e(yt,Et,vt,dt,it,22,z[15]),dt=he(dt,yt,Et,vt,ke,5,z[16]),vt=he(vt,dt,yt,Et,We,9,z[17]),Et=he(Et,vt,dt,yt,St,14,z[18]),yt=he(yt,Et,vt,dt,be,20,z[19]),dt=he(dt,yt,Et,vt,Je,5,z[20]),vt=he(vt,dt,yt,Et,rt,9,z[21]),Et=he(Et,vt,dt,yt,it,14,z[22]),yt=he(yt,Et,vt,dt,Ve,20,z[23]),dt=he(dt,yt,Et,vt,bt,5,z[24]),vt=he(vt,dt,yt,Et,ht,9,z[25]),Et=he(Et,vt,dt,yt,je,14,z[26]),yt=he(yt,Et,vt,dt,ut,20,z[27]),dt=he(dt,yt,Et,vt,Bt,5,z[28]),vt=he(vt,dt,yt,Et,Ne,9,z[29]),Et=he(Et,vt,dt,yt,gt,14,z[30]),yt=he(yt,Et,vt,dt,ct,20,z[31]),dt=Se(dt,yt,Et,vt,Je,4,z[32]),vt=Se(vt,dt,yt,Et,ut,11,z[33]),Et=Se(Et,vt,dt,yt,St,16,z[34]),yt=Se(yt,Et,vt,dt,ht,23,z[35]),dt=Se(dt,yt,Et,vt,ke,4,z[36]),vt=Se(vt,dt,yt,Et,Ve,11,z[37]),Et=Se(Et,vt,dt,yt,gt,16,z[38]),yt=Se(yt,Et,vt,dt,rt,23,z[39]),dt=Se(dt,yt,Et,vt,Bt,4,z[40]),vt=Se(vt,dt,yt,Et,be,11,z[41]),Et=Se(Et,vt,dt,yt,je,16,z[42]),yt=Se(yt,Et,vt,dt,We,23,z[43]),dt=Se(dt,yt,Et,vt,bt,4,z[44]),vt=Se(vt,dt,yt,Et,ct,11,z[45]),Et=Se(Et,vt,dt,yt,it,16,z[46]),yt=Se(yt,Et,vt,dt,Ne,23,z[47]),dt=xe(dt,yt,Et,vt,be,6,z[48]),vt=xe(vt,dt,yt,Et,gt,10,z[49]),Et=xe(Et,vt,dt,yt,ht,15,z[50]),yt=xe(yt,Et,vt,dt,Je,21,z[51]),dt=xe(dt,yt,Et,vt,ct,6,z[52]),vt=xe(vt,dt,yt,Et,je,10,z[53]),Et=xe(Et,vt,dt,yt,rt,15,z[54]),yt=xe(yt,Et,vt,dt,ke,21,z[55]),dt=xe(dt,yt,Et,vt,ut,6,z[56]),vt=xe(vt,dt,yt,Et,it,10,z[57]),Et=xe(Et,vt,dt,yt,We,15,z[58]),yt=xe(yt,Et,vt,dt,Bt,21,z[59]),dt=xe(dt,yt,Et,vt,Ve,6,z[60]),vt=xe(vt,dt,yt,Et,St,10,z[61]),Et=xe(Et,vt,dt,yt,Ne,15,z[62]),yt=xe(yt,Et,vt,dt,bt,21,z[63]),we[0]=we[0]+dt|0,we[1]=we[1]+yt|0,we[2]=we[2]+Et|0,we[3]=we[3]+vt|0},_doFinalize:function(){var oe=this._data,ie=oe.words,se=8*this._nDataBytes,le=8*oe.sigBytes;ie[le>>>5]|=128<<24-le%32;var ye=Ce.floor(se/4294967296),we=se;ie[15+(le+64>>>9<<4)]=16711935&(ye<<8|ye>>>24)|4278255360&(ye<<24|ye>>>8),ie[14+(le+64>>>9<<4)]=16711935&(we<<8|we>>>24)|4278255360&(we<<24|we>>>8),oe.sigBytes=4*(ie.length+1),this._process();for(var be=this._hash,ke=be.words,Ne=0;Ne<4;Ne++){var je=ke[Ne];ke[Ne]=16711935&(je<<8|je>>>24)|4278255360&(je<<24|je>>>8)}return be},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),Te.MD5})},function(Le,me,Ie){"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(Le,me,Ie){"use strict";function Te(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 _e=function(){function ee(oe,ie){for(var se=0;se<ie.length;se++){var le=ie[se];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(oe,le.key,le)}}return function(oe,ie,se){return ie&&ee(oe.prototype,ie),se&&ee(oe,se),oe}}(),he=Ie(5),Se=Te(he),xe=Ie(25),ge=Te(xe),ce=Ie(6),ve=Te(ce),de=Ie(7),ue=Te(de),z=function(){function ee(oe){Ce(this,ee);var ie=ue.default.os.name,se=ue.default.os.version||"",le=ue.default.browser.name,ye=ue.default.browser.version||"",we=window.location.href,be="";we&&(be=ue.default.getHost(we));var ke="pc";ue.default.os.ipad?ke="pad":(ue.default.os.iphone||ue.default.os.android)&&(ke="phone"),this._ri=Se.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:le,ev:ye,uat:navigator.userAgent,app_n:be,tt:ke,dm:"h5",ut:""}}return _e(ee,[{key:"log",value:function(oe,ie){ie&&ie.ri?(this._ri=ie.ri,delete ie.ri):this._ri=Se.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 le in ie)se.push(le+"="+ie[le]);var ye=se.join("&");this.initParam.args=encodeURIComponent(ye==""?"0":ye);var we=[];for(var le in this.initParam)we.push(le+"="+this.initParam[le]);var be=we.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(be):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+be}}],[{key:"getUuid",value:function(){var oe=ge.default.get("p_h5_upload_u");return oe||(oe=Se.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=Se.default.create()),ge.default.set("p_h5_upload_clientId",oe,730),oe}}]),ee}();me.default=z},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),_e=function(){function he(){Te(this,he)}return Ce(he,null,[{key:"create",value:function(Se,xe){var ge,ce="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),ve=[];if(xe=xe||ce.length,Se)for(ge=0;ge<Se;ge++)ve[ge]=ce[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]=ce[ge==19?3&de|8:de])}return ve.join("")}}]),he}();me.default=_e},function(Le,me,Ie){"use strict";Object.defineProperty(me,"__esModule",{value:!0});var Te={version:"1.5.0"};me.default=Te},function(Le,me,Ie){"use strict";function Te(ce,ve){if(!(ce instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function ce(ve,de){for(var ue=0;ue<de.length;ue++){var z=de[ue];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ve,z.key,z)}}return function(ve,de,ue){return de&&ce(ve.prototype,de),ue&&ce(ve,ue),ve}}(),_e=function(ce){var ve=navigator.userAgent,de="other";if(ce.ios)return"iOS";if(ce.android)return"android";if(ve.indexOf("Baiduspider")>-1)return"Baiduspider";if(ve.indexOf("PlayStation")>-1)return"PS4";var ue=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"&&!ue&&!z&&(de="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(de="Linux"),ue?"windows":de},he=function(){var ce=navigator.userAgent,ve="";return(ce.indexOf("Windows NT 5.0")>-1||ce.indexOf("Windows 2000")>-1)&&(ve="2000"),(ce.indexOf("Windows NT 5.1")>-1||ce.indexOf("Windows XP")>-1)&&(ve="XP"),(ce.indexOf("Windows NT 5.2")>-1||ce.indexOf("Windows 2003")>-1)&&(ve="2003"),(ce.indexOf("Windows NT 6.0")>-1||ce.indexOf("Windows Vista")>-1)&&(ve="Vista"),(ce.indexOf("Windows NT 6.1")>-1||ce.indexOf("Windows 7")>-1)&&(ve="7"),(ce.indexOf("Windows NT 6.2")>-1||ce.indexOf("Windows 8")>-1)&&(ve="8"),(ce.indexOf("Windows NT 6.3")>-1||ce.indexOf("Windows 8.1")>-1)&&(ve="8.1"),(ce.indexOf("Windows NT 10")>-1||ce.indexOf("Windows 10")>-1)&&(ve="10"),ve},Se=function(ce){var ve=navigator.userAgent.toLowerCase();return ce.chrome?"Chrome":ce.firefox?"Firefox":ce.safari?"Safari":ce.webview?"webview":ce.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 ce={},ve={},de=navigator.userAgent,ue=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_]+))?/),le=!ie&&de.match(/(iPhone\sOS)\s([\d_]+)/),ye=de.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),we=/Win\d{2}|Windows/.test(ue),be=de.match(/Windows Phone ([\d.]+)/),ke=ye&&de.match(/TouchPad/),Ne=de.match(/Kindle\/([\d.]+)/),je=de.match(/Silk\/([\d._]+)/),Ve=de.match(/(BlackBerry).*Version\/([\d.]+)/),Je=de.match(/(BB10).*Version\/([\d.]+)/),We=de.match(/(RIM\sTablet\sOS)\s([\d.]+)/),gt=de.match(/PlayBook/),ut=de.match(/Chrome\/([\d.]+)/)||de.match(/CriOS\/([\d.]+)/),bt=de.match(/Firefox\/([\d.]+)/),rt=de.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),St=de.match(/MSIE\s([\d.]+)/)||de.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),ct=!ut&&de.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),Bt=ct||de.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((ve.webkit=!!z)&&(ve.version=z[1]),ee&&(ce.android=!0,ce.version=ee[2]),le&&!se&&(ce.ios=ce.iphone=!0,ce.version=le[2].replace(/_/g,".")),ie&&(ce.ios=ce.ipad=!0,ce.version=ie[2].replace(/_/g,".")),se&&(ce.ios=ce.ipod=!0,ce.version=se[3]?se[3].replace(/_/g,"."):null),be&&(ce.wp=!0,ce.version=be[1]),ye&&(ce.webos=!0,ce.version=ye[2]),ke&&(ce.touchpad=!0),Ve&&(ce.blackberry=!0,ce.version=Ve[2]),Je&&(ce.bb10=!0,ce.version=Je[2]),We&&(ce.rimtabletos=!0,ce.version=We[2]),gt&&(ve.playbook=!0),Ne&&(ce.kindle=!0,ce.version=Ne[1]),je&&(ve.silk=!0,ve.version=je[1]),!je&&ce.android&&de.match(/Kindle Fire/)&&(ve.silk=!0),ut&&(ve.chrome=!0,ve.version=ut[1]),bt&&(ve.firefox=!0,ve.version=bt[1]),rt&&(ce.firefoxos=!0,ce.version=rt[1]),St&&(ve.ie=!0,ve.version=St[1]),Bt&&(oe||ce.ios||we||ee)&&(ve.safari=!0,ce.ios||(ve.version=Bt[1])),ct&&(ve.webview=!0),oe){var ht=de.match(/[\d]*_[\d]*_[\d]*/);ht&&ht.length>0&&ht[0]&&(ce.version=ht[0].replace(/_/g,"."))}return ce.tablet=!!(ie||gt||ee&&!de.match(/Mobile/)||bt&&de.match(/Tablet/)||St&&!de.match(/Phone/)&&de.match(/Touch/)),ce.phone=!(ce.tablet||ce.ipod||!(ee||le||ye||Ve||Je||ut&&de.match(/Android/)||ut&&de.match(/CriOS\/([\d.]+)/)||bt&&de.match(/Mobile/)||St&&de.match(/Touch/))),ce.pc=!ce.tablet&&!ce.phone,oe?ce.name="macOS":we?(ce.name="windows",ce.version=he()):ce.name=_e(ce),ve.name=Se(ve),{os:ce,browser:ve}}(),ge=function(){function ce(){Te(this,ce)}return Ce(ce,null,[{key:"getHost",value:function(ve){var z="";if(ve===void 0||ve==null||ve=="")return"";var de=ve.indexOf("//"),ue=ve;de>-1&&(ue=ve.substring(de+2));var z=ue,ee=ue.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=Se()),ve}}]),ce}();me.default=ge},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),_e=function(){function he(){Te(this,he)}return Ce(he,null,[{key:"get",value:function(Se,xe,ge,ce,ve){var de;ge=ge||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(ue){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(ue){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(ue){}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{ce===void 0&&(ce=!0),de.open("GET",Se,ce),ve&&(de.withCredentials=!0)}catch(ue){return void ge(ue)}try{de.send()}catch(ue){ge(ue)}}}]),he}();me.default=_e},function(Le,me,Ie){"use strict";function Te(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,ce){for(var ve=0;ve<ce.length;ve++){var de=ce[ve];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ge,de.key,de)}}return function(ge,ce,ve){return ce&&xe(ge.prototype,ce),ve&&xe(ge,ve),ge}}(),_e=Ie(27),he=Ie(30),Se=(Ie(10),function(){function xe(){Te(this,xe)}return Ce(xe,null,[{key:"randomUUID",value:function(){for(var ge=[],ce="0123456789abcdef",ve=0;ve<36;ve++)ge[ve]=ce.substr(Math.floor(16*Math.random()),1);return ge[14]="4",ge[19]=ce.substr(3&ge[19]|8,1),ge[8]=ge[13]=ge[18]=ge[23]="-",ge.join("")}},{key:"aliyunEncodeURI",value:function(ge){var ce=encodeURIComponent(ge);return ce=ce.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,ce,ve){if(!ge)throw new Error("PrismPlayer Error: vid should not be null!");var de=[];for(var ue in ge)de.push(ue);for(var z=de.sort(),ee="",oe=z.length,ue=0;ue<oe;ue++){var ie=xe.aliyunEncodeURI(z[ue]),se=xe.aliyunEncodeURI(ge[z[ue]]);ee==""?ee=ie+ce+se:ee+=ve+ie+ce+se}return ee}},{key:"makeChangeSiga",value:function(ge,ce){if(!ge)throw new Error("PrismPlayer Error: vid should not be null!");return he.stringify(_e("GET&"+xe.aliyunEncodeURI("/")+"&"+xe.aliyunEncodeURI(xe.makeUTF8sort(ge,"=","&")),ce+"&"))}}]),xe}());me.default=Se},function(Le,me,Ie){(function(Te,Ce){Le.exports=me=Ce(Ie(0))})(0,function(Te){return Te.enc.Utf8})},function(Le,me,Ie){(function(Te,Ce){Le.exports=me=Ce(Ie(0))})(0,function(Te){return Te.enc.Hex})},function(Le,me,Ie){Le.exports=Ie(13)},function(Le,me,Ie){"use strict";var Te,Ce,_e=Ie(14),he=function(xe){return xe&&xe.__esModule?xe:{default:xe}}(_e),Se={Vod:he.default};Te=[],(Ce=function(){return Se}.apply(me,Te))!==void 0&&(Le.exports=Ce),window.AliyunUpload=Se,Pn.exports=AliyunUpload},function(Le,me,Ie){"use strict";function Te(Je){return Je&&Je.__esModule?Je:{default:Je}}function Ce(Je,We){if(!(Je instanceof We))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var _e=function(){function Je(We,gt){for(var ut=0;ut<gt.length;ut++){var bt=gt[ut];bt.enumerable=bt.enumerable||!1,bt.configurable=!0,"value"in bt&&(bt.writable=!0),Object.defineProperty(We,bt.key,bt)}}return function(We,gt,ut){return gt&&Je(We.prototype,gt),ut&&Je(We,ut),We}}(),he=Ie(15),Se=Ie(3),xe=Ie(16),ge=Te(xe),ce=Ie(18),ve=Te(ce),de=Ie(24),ue=Te(de),z=Ie(4),ee=Te(z),oe=Ie(1),ie=Te(oe),se=Ie(5),le=Te(se),ye=Ie(26),we=Te(ye),be=Ie(31),ke=Te(be),Ne=Ie(32),je=Te(Ne),Ve=(Ie(2),function(){function Je(We){Ce(this,Je),this.options=We,this.options.partSize=this.options.partSize||Se.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||Se.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 _e(Je,[{key:"init",value:function(We,gt,ut,bt){return this._retryCount=0,!(ut&&!bt||!ut&&bt)&&!(We&&!gt||!We&>)&&(this._ossCreditor.accessKeyId=We,this._ossCreditor.accessKeySecret=gt,this._ossCreditor.securityToken=ut,this._ossCreditor.expireTime=bt,!0)}},{key:"addFile",value:function(We,gt,ut,bt,rt,St){if(!We)return!1;if(We.size==0)try{this.options.onUploadFailed({file:We},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(it){console.log(it)}for(var ct=(this.options,0);ct<this._uploadList.length;ct++)if(this._uploadList[ct].file==We)return!1;var Bt=new Object;if(Bt.file=We,Bt._endpoint=gt,Bt._bucket=ut,Bt._object=bt,Bt.state=he.UPLOADSTATE.INIT,Bt.isImage=ie.default.isImage(We.name),!Bt.isImage&&this.options.enableUploadProgress){var ht=this;je.default.getMd5(We,function(it){Bt.fileHash=it;var dt=ht._getCheckoutpoint(Bt);ht.options.localCheckpoint||dt||ht._getCheckoutpointFromCloud(Bt,function(yt){if(yt.UploadPoint){var Et=JSON.parse(yt.UploadPoint);Et.loaded!=1&&(Bt.checkpoint=Et.checkpoint,Bt.loaded=Et.loaded,Bt.videoId=yt.VideoId,ht._saveCheckoutpoint(Bt,Et.checkpoint))}},function(yt){try{if((yt=JSON.parse(yt))&&yt.Code=="InvalidParameter"&&yt.Message.indexOf("UserId")>0){ht._invalidUserId=!0;var Et=yt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(Et)}}catch(vt){console.log(vt)}})})}rt&&(Bt.videoInfo=rt?JSON.parse(rt).Vod:{},Bt.userData=ve.default.encode(rt)),Bt.ri=le.default.create(),this._uploadList.push(Bt),this._reportLog("20001",Bt,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(Bt)}catch(it){console.log(it)}return!0}},{key:"deleteFile",value:function(We){return!!this.cancelFile(We)&&(this._uploadList.splice(We,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(We){if(this.options,We<0||We>=this._uploadList.length)return!1;var gt=this._uploadList[We];if(We==this._curIndex&>.state==he.UPLOADSTATE.UPLOADING){gt.state=he.UPLOADSTATE.CANCELED;var ut=this._getCheckoutpoint(gt);ut&&ut.checkpoint&&(ut=ut.checkpoint),ut&&this._ossUpload.abort(gt),this._removeCheckoutpoint(gt),this.nextUpload()}else gt.state!=he.UPLOADSTATE.SUCCESS&&(gt.state=he.UPLOADSTATE.CANCELED);return this._reportLog("20008",gt),!0}},{key:"resumeFile",value:function(We){if(this.options,We<0||We>=this._uploadList.length)return!1;var gt=this._uploadList[We];return gt.state==he.UPLOADSTATE.CANCELED&&(gt.state=he.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(We){return this._getCheckoutpoint({file:We})}},{key:"startUpload",value:function(We){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 gt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(gt),this._state=he.VODSTATE.START}},{key:"nextUpload",value:function(){var We=this.options;if(this._state==he.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var gt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(gt)}else{this._state=he.VODSTATE.END;try{We.onUploadEnd&&We.onUploadEnd(gt)}catch(ut){console.log(ut)}}}},{key:"clear",value:function(We){for(var gt=this.options,ut=0,bt=0;bt<this._uploadList.length;bt++)gt.uploadList[bt].state==he.UPLOADSTATE.SUCCESS&&ut++,this._uploadList[bt].state==We&&(gt.uploadList.splice(bt,1),bt--);gt.onClear&>.onClear(gt.uploadList.length,ut)}},{key:"stopUpload",value:function(){if((this._state==he.VODSTATE.START||this._state==he.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var We=this._uploadList[this._curIndex];this._state=he.VODSTATE.STOP,We.state=he.UPLOADSTATE.STOPED,this._changeState(We,he.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(We){var gt=this;if(!We)return!1;var ut=JSON.parse(ve.default.decode(We));return!!(ut.AccessKeyId&&ut.AccessKeySecret&&ut.SecurityToken&&ut.Expiration)&>.resumeUploadWithToken(ut.AccessKeyId,ut.AccessKeySecret,ut.SecurityToken,ut.Expiration)}},{key:"resumeUploadWithToken",value:function(We,gt,ut,bt){if(this.options,!(We&>&&ut&&bt)||this._state!=he.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var rt="";return this._uploadList.length>this._curIndex&&(rt=this._uploadList[this._curIndex]),rt&&(this.init(We,gt,ut,bt),this._state=he.VODSTATE.START,this._ossUpload=null,this._uploadCore(rt,rt.retry),rt.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(We,gt,ut){if(this._curIndex==-1||this._state!=he.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var bt=this._uploadList[this._curIndex];bt.object?this._refreshSTSTokenUpload(bt,We,gt,ut):this.setSTSToken(bt,We,gt,ut)}}},{key:"setSTSTokenDirectlyUpload",value:function(We,gt,ut,bt,rt){if(!(gt&&ut&&bt&&rt))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var St=We;this.init(gt,ut,bt,rt),St.endpoint=St._endpoint,St.bucket=St._bucket,St.object=St._object,this._ossUpload=null,this._uploadCore(St,We.retry),We.retry=!1}},{key:"setSTSToken",value:function(We,gt,ut,bt){if(!gt||!ut||!bt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var rt=We.videoInfo,St={accessKeyId:gt,securityToken:bt,accessKeySecret:ut,fileName:We.file.name,title:rt.Title,requestId:We.ri,region:this.options.region};rt.ImageType&&(St.imageType=rt.ImageType),rt.ImageExt&&(St.imageExt=rt.ImageExt),rt.FileSize&&(St.fileSize=rt.FileSize),rt.Description&&(St.description=rt.Description),rt.CateId&&(St.cateId=rt.CateId),rt.Tags&&(St.tags=rt.Tags),rt.TemplateGroupId&&(St.templateGroupId=rt.TemplateGroupId),rt.StorageLocation&&(St.storageLocation=rt.StorageLocation),rt.CoverURL&&(St.coverUrl=rt.CoverURL),rt.TransCodeMode&&(St.transCodeMode=rt.TransCodeMode),rt.UserData&&(St.userData=rt.UserData);var ct=this,Bt="getUploadAuth";We.videoId?(St.videoId=We.videoId,Bt="refreshUploadAuth"):We.isImage&&(Bt="getImageUploadAuth"),we.default[Bt](St,function(ht){We.videoId=ht.VideoId?ht.VideoId:We.videoId,ct.setUploadAuthAndAddress(We,ht.UploadAuth,ht.UploadAddress),ct._state=he.VODSTATE.START},function(ht){ct._error(We,{name:ht.Code,code:ht.Code,message:ht.Message,requestId:ht.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(We,gt,ut,bt){if(!We||!gt||!ut)return!1;var rt=JSON.parse(ve.default.decode(gt));if(!(rt.AccessKeyId&&rt.AccessKeySecret&&rt.SecurityToken&&rt.Expiration))return console.error("uploadauth is invalid"),!1;var St={},ct=We;if(ut){if(St=JSON.parse(ve.default.decode(ut)),!St.Endpoint||!St.Bucket||!St.FileName)return console.error("uploadAddress is invalid"),!1}else St.Endpoint=ct.endpoint,St.Bucket=ct.bucket,St.FileName=ct.object;this._ut="vod",this._uploadWay="vod",this.options.region=rt.Region||this.options.region,this.init(rt.AccessKeyId,rt.AccessKeySecret,rt.SecurityToken,rt.Expiration),ct.endpoint=ct._endpoint?ct._endpoint:St.Endpoint,ct.bucket=ct._bucket?ct._bucket:St.Bucket,ct.object=ct._object?ct._object:St.FileName,ct.region=this.options.region,bt&&(ct.videoId=bt),this._ossUpload=null,this._uploadCore(ct,We.retry),We.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(We,gt,ut,bt){if(!gt||!ut||!bt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var rt={accessKeyId:gt,securityToken:bt,accessKeySecret:ut,videoId:We.object,requestId:We.ri,region:this.options.region},St=this,ct="refreshUploadAuth";We.isImage&&(ct="getImageUploadAuth"),we.default[ct](rt,function(Bt){St.setUploadAuthAndAddress(We,Bt.UploadAuth,UploadAddress),St._state=he.VODSTATE.START},function(Bt){St._error(We,{name:Bt.Code,code:Bt.Code,message:Bt.Message,requestId:Bt.RequestId})})}},{key:"_upload",value:function(We){var gt=arguments.length>1&&arguments[1]!==void 0&&arguments[1],ut=this.options;if(We.retry=gt,ut.onUploadstarted&&!gt)try{var bt=this._getCheckoutpoint(We);bt&&bt.state!=he.UPLOADSTATE.UPLOADING&&(We.checkpoint=bt,We.videoId=bt.videoId),ut.onUploadstarted(We)}catch(rt){console.log(rt)}}},{key:"_uploadCore",value:function(We){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(We.state=he.UPLOADSTATE.UPLOADING,!this._ossUpload){We.endpoint=We.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var gt=this;this._ossUpload=new ge.default({bucket:We.bucket,endpoint:We.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(ht,it){gt._error.call(gt,ht,it)},oncomplete:function(ht,it){gt._complete.call(gt,ht,it)},onprogress:function(ht,it,dt){gt._progress.call(gt,ht,it,dt)}})}var ut=ie.default.getFileType(We.file.name),bt=this._getCheckoutpoint(We),rt="",St="";bt&&bt.checkpoint&&(St=bt.state,rt=bt.videoId,bt=bt.checkpoint),bt&&rt==We.videoId&&St!=he.UPLOADSTATE.UPLOADING&&(bt.file=We.file,We.checkpoint=bt,bt.uploadId);var ct=this._adjustPartSize(We);this._reportLog("20002",We,{ft:ut,fs:We.file.size,bu:We.bucket,ok:We.object,vid:We.videoId||"",fn:We.file.name,fw:null,fh:null,ps:ct});var Bt={headers:{"x-oss-notification":We.userData?We.userData:""},partSize:ct,parallel:this.options.parallel};this._ossUpload.upload(We,Bt)}},{key:"_findUploadIndex",value:function(){for(var We=-1,gt=0;gt<this._uploadList.length;gt++)if(this._uploadList[gt].state==he.UPLOADSTATE.INIT){We=gt;break}return We}},{key:"_error",value:function(We,gt){if(gt.name=="cancel")try{this.options.onUploadCanceled(We,gt)}catch(bt){console.log(bt)}else{if(gt.message.indexOf("InvalidAccessKeyIdError")>0||gt.name=="SignatureDoesNotMatchError"||gt.code=="SecurityTokenExpired"||gt.code=="InvalidSecurityToken.Expired"||gt.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=he.VODSTATE.EXPIRE,We.state=he.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(We,gt)}catch(bt){console.log(bt)}}return}if((gt.name=="RequestTimeoutError"||gt.name=="ConnectionTimeout"||gt.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var ut=this;return setTimeout(function(){ut._uploadCore(We,!0)},1e3*ut._retryDuration),void this._retryCount++}gt.name=="NoSuchUploadError"&&this._removeCheckoutpoint(We),this._handleError(We,gt)}}},{key:"_handleError",value:function(We,gt){var ut=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],bt=he.UPLOADSTATE.FAIlURE;if(We.state!=he.UPLOADSTATE.CANCELED&&(We.state=he.UPLOADSTATE.FAIlURE,this._state=he.VODSTATE.FAILURE,this.options.onUploadFailed&>&>.code&>.message))try{this.options.onUploadFailed(We,gt.code,gt.message)}catch(St){console.log(St)}if(ut&&this._changeState(We,bt),this._reportLog("20006",We,{code:gt.name,message:gt.message,requestId:gt.requestId,fs:We.file.size,bu:We.bucket,ok:We.object,fn:We.file.name}),this._reportLog("20004",We,{requestId:gt.requestId,fs:We.file.size,bu:We.bucket,ok:We.object,fn:We.file.name}),We.ri=le.default.create(),this._findUploadIndex()!=-1){var rt=this;this._state=he.VODSTATE.START,setTimeout(function(){rt.nextUpload()},100)}}},{key:"_complete",value:function(We,gt){if(We.state=he.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(We)}catch(rt){console.log(rt)}var ut=0;gt&>.res&>.res.headers&&(ut=gt.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(We);var bt=this;setTimeout(function(){bt.nextUpload()},100),this._retryCount=0,this._reportLog("20003",We,{requestId:ut})}},{key:"_progress",value:function(We,gt,ut){if(this.options.onUploadProgress)try{We.loaded=gt.loaded,this.options.onUploadProgress(We,gt.total,gt.loaded)}catch(it){console.log(it)}var bt=gt.checkpoint,rt=0;bt&&(We.checkpoint=bt,this._saveCheckoutpoint(We,bt,he.UPLOADSTATE.UPLOADING),rt=bt.uploadId),this._retryCount=0;var St=this._getPortNumber(bt),ct=0;if(ut&&ut.headers&&(ct=ut.headers["x-oss-request-id"]),gt.loaded!=0&&this._reportLog("20007",We,{pn:St,requestId:ct}),gt.loaded!=1&&this._reportLog("20005",We,{UploadId:rt,pn:St+1,pr:We.retry?1:0,fs:We.file.size,bu:We.bucket,ok:We.object,fn:We.file.name}),!this._invalidUserId&&!We.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var Bt={file:We.file,checkpoint:gt,userId:this.options.userId,videoId:We.videoId,region:this.options.region,fileHash:We.fileHash};try{var ht=this;ke.default.upload(Bt,function(){},function(it){if((it=JSON.parse(it))&&it.Code=="InvalidParameter"&&it.Message.indexOf("UserId")>0){ht._invalidUserId=!0;var dt=it.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(dt)}})}catch(it){console.log(it)}}}},{key:"_getPortNumber",value:function(We){if(We){var gt=We.doneParts;if(gt&>.length>0)return gt[gt.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(We){var gt=this._getCheckoutpointKey(We);ue.default.remove(gt)}},{key:"_getCheckoutpoint",value:function(We){var gt=this._getCheckoutpointKey(We),ut=ue.default.get(gt);if(ut)try{return JSON.parse(ut)}catch(bt){}return""}},{key:"_saveCheckoutpoint",value:function(We,gt,ut){if(gt){var bt=this._getCheckoutpointKey(We),rt=We.file,St={fileName:rt.name,lastModified:rt.lastModified,size:rt.size,object:We.object,videoId:We.videoId,bucket:We.bucket,endpoint:We.endpoint,checkpoint:gt,loaded:We.loaded,state:ut};ue.default.set(bt,JSON.stringify(St))}}},{key:"_changeState",value:function(We,gt){var ut=this._getCheckoutpoint(We);ut&&((this._onbeforeunload=!0)&&(gt=he.UPLOADSTATE.STOPED),this._saveCheckoutpoint(We,ut.checkpoint,gt))}},{key:"_getCheckoutpointKey",value:function(We){return"upload_"+We.file.lastModified+"_"+We.file.name+"_"+We.file.size}},{key:"_getCheckoutpointFromCloud",value:function(We,gt,ut){var bt={userId:this.options.userId,uploadInfoList:[{FileName:We.file.name,FileSize:We.file.size,FileCreateTime:We.file.lastModified,FileHash:We.fileHash}],region:this.options.region};ke.default.get(bt,function(rt){gt(rt)},ut)}},{key:"_reportLog",value:function(We,gt,ut){ut||(ut={}),ut.ri=gt.ri,this._ut&&(ut.ut=this._ut),this._log.log(We,ut)}},{key:"_initEvent",value:function(){var We=this;window&&(window.onbeforeunload=function(gt){if(We._onbeforeunload=!0,We._curIndex!=-1&&We._uploadList.length>We._curIndex){var ut=We._uploadList[We._curIndex];We._changeState(ut,he.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var We=0;We<this._uploadList.length;We++){var gt=this._uploadList[We];gt.state!=he.UPLOADSTATE.FAIlURE&>.state!=he.UPLOADSTATE.STOPED||(gt.state=he.UPLOADSTATE.INIT)}this._state=he.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(We){return We.file.size/this.options.partSize>1e4?We.file.size/9999:this.options.partSize}}]),Je}());me.default=Ve},function(Le,me,Ie){"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(Le,me,Ie){"use strict";function Te(ce){return ce&&ce.__esModule?ce:{default:ce}}function Ce(ce,ve){if(!(ce instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var _e=function(){function ce(ve,de){for(var ue=0;ue<de.length;ue++){var z=de[ue];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ve,z.key,z)}}return function(ve,de,ue){return de&&ce(ve.prototype,de),ue&&ce(ve,ue),ve}}(),he=Ie(3),Se=Ie(17),xe=(Te(Se),Ie(1)),ge=(Te(xe),function(){function ce(ve,de){if(Ce(this,ce),ve){this._config=ve,this.create(this._config),this._uploadInfo=null,this._callback={};var ue=function(){};this._callback.onerror=de.onerror||ue,this._callback.oncomplete=de.oncomplete||ue,this._callback.onprogress=de.onprogress||ue}}return _e(ce,[{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 ue=this,z=function(oe,ie,se){return function(le){ue._progress(oe,ie,se),le()}},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){ue._complete(oe)}).catch(function(oe){ue.oss.cancel&&(ue.oss&&ue.oss.isCancel()?console.log("oss is cancel as error"):ue.oss.cancel()),ue._error(oe)})}},{key:"header",value:function(ve,de,ue){this.oss.get(ve.object).then(function(z){de(z)}).catch(function(z){ue(z)})}},{key:"_progress",value:function(ve,de,ue){this._callback.onprogress(this._uploadInfo,{loaded:ve,total:this._uploadInfo.file.size,checkpoint:de},ue)}},{key:"_error",value:function(ve){this._callback.onerror(this._uploadInfo,ve)}},{key:"_complete",value:function(ve){this._callback.oncomplete(this._uploadInfo,ve)}}]),ce}());me.default=ge},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),_e=function(){function he(){Te(this,he)}return Ce(he,null,[{key:"format",value:function(Se){if(arguments.length<2)return null;for(var xe=arguments[1],ge=1;ge<arguments.length;ge++){var ce=new RegExp("\\{"+(ge-1)+"\\}","gm");xe=xe.replace(ce,arguments[ge+1])}return{code:Se,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=_e},function(Le,me,Ie){"use strict";(function(Te){function Ce(Se,xe){if(!(Se instanceof xe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var _e=function(){function Se(xe,ge){for(var ce=0;ce<ge.length;ce++){var ve=ge[ce];ve.enumerable=ve.enumerable||!1,ve.configurable=!0,"value"in ve&&(ve.writable=!0),Object.defineProperty(xe,ve.key,ve)}}return function(xe,ge,ce){return ge&&Se(xe.prototype,ge),ce&&Se(xe,ce),xe}}(),he=function(){function Se(){Ce(this,Se)}return _e(Se,null,[{key:"encode",value:function(xe){return new Te(xe).toString("base64")}},{key:"decode",value:function(xe){return new Te(xe,"base64").toString()}}]),Se}();me.default=he}).call(me,Ie(19).Buffer)},function(Le,me,Ie){"use strict";(function(Te){function Ce(){return he.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _e(Xe,Re){if(Ce()<Re)throw new RangeError("Invalid typed array length");return he.TYPED_ARRAY_SUPPORT?(Xe=new Uint8Array(Re),Xe.__proto__=he.prototype):(Xe===null&&(Xe=new he(Re)),Xe.length=Re),Xe}function he(Xe,Re,Ae){if(!(he.TYPED_ARRAY_SUPPORT||this instanceof he))return new he(Xe,Re,Ae);if(typeof Xe=="number"){if(typeof Re=="string")throw new Error("If encoding is specified then the first argument must be a string");return ce(this,Xe)}return Se(this,Xe,Re,Ae)}function Se(Xe,Re,Ae,Ge){if(typeof Re=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Re instanceof ArrayBuffer?ue(Xe,Re,Ae,Ge):typeof Re=="string"?ve(Xe,Re,Ae):z(Xe,Re)}function xe(Xe){if(typeof Xe!="number")throw new TypeError('"size" argument must be a number');if(Xe<0)throw new RangeError('"size" argument must not be negative')}function ge(Xe,Re,Ae,Ge){return xe(Re),Re<=0?_e(Xe,Re):Ae!==void 0?typeof Ge=="string"?_e(Xe,Re).fill(Ae,Ge):_e(Xe,Re).fill(Ae):_e(Xe,Re)}function ce(Xe,Re){if(xe(Re),Xe=_e(Xe,Re<0?0:0|ee(Re)),!he.TYPED_ARRAY_SUPPORT)for(var Ae=0;Ae<Re;++Ae)Xe[Ae]=0;return Xe}function ve(Xe,Re,Ae){if(typeof Ae=="string"&&Ae!==""||(Ae="utf8"),!he.isEncoding(Ae))throw new TypeError('"encoding" must be a valid string encoding');var Ge=0|ie(Re,Ae);Xe=_e(Xe,Ge);var Ke=Xe.write(Re,Ae);return Ke!==Ge&&(Xe=Xe.slice(0,Ke)),Xe}function de(Xe,Re){var Ae=Re.length<0?0:0|ee(Re.length);Xe=_e(Xe,Ae);for(var Ge=0;Ge<Ae;Ge+=1)Xe[Ge]=255&Re[Ge];return Xe}function ue(Xe,Re,Ae,Ge){if(Re.byteLength,Ae<0||Re.byteLength<Ae)throw new RangeError("'offset' is out of bounds");if(Re.byteLength<Ae+(Ge||0))throw new RangeError("'length' is out of bounds");return Re=Ae===void 0&&Ge===void 0?new Uint8Array(Re):Ge===void 0?new Uint8Array(Re,Ae):new Uint8Array(Re,Ae,Ge),he.TYPED_ARRAY_SUPPORT?(Xe=Re,Xe.__proto__=he.prototype):Xe=de(Xe,Re),Xe}function z(Xe,Re){if(he.isBuffer(Re)){var Ae=0|ee(Re.length);return Xe=_e(Xe,Ae),Xe.length===0||Re.copy(Xe,0,0,Ae),Xe}if(Re){if(typeof ArrayBuffer!="undefined"&&Re.buffer instanceof ArrayBuffer||"length"in Re)return typeof Re.length!="number"||mt(Re.length)?_e(Xe,0):de(Xe,Re);if(Re.type==="Buffer"&&qe(Re.data))return de(Xe,Re.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ee(Xe){if(Xe>=Ce())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ce().toString(16)+" bytes");return 0|Xe}function oe(Xe){return+Xe!=Xe&&(Xe=0),he.alloc(+Xe)}function ie(Xe,Re){if(he.isBuffer(Xe))return Xe.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Xe)||Xe instanceof ArrayBuffer))return Xe.byteLength;typeof Xe!="string"&&(Xe=""+Xe);var Ae=Xe.length;if(Ae===0)return 0;for(var Ge=!1;;)switch(Re){case"ascii":case"latin1":case"binary":return Ae;case"utf8":case"utf-8":case void 0:return Vt(Xe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ae;case"hex":return Ae>>>1;case"base64":return Zt(Xe).length;default:if(Ge)return Vt(Xe).length;Re=(""+Re).toLowerCase(),Ge=!0}}function se(Xe,Re,Ae){var Ge=!1;if((Re===void 0||Re<0)&&(Re=0),Re>this.length||((Ae===void 0||Ae>this.length)&&(Ae=this.length),Ae<=0)||(Ae>>>=0,Re>>>=0,Ae<=Re))return"";for(Xe||(Xe="utf8");;)switch(Xe){case"hex":return St(this,Re,Ae);case"utf8":case"utf-8":return gt(this,Re,Ae);case"ascii":return bt(this,Re,Ae);case"latin1":case"binary":return rt(this,Re,Ae);case"base64":return We(this,Re,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ct(this,Re,Ae);default:if(Ge)throw new TypeError("Unknown encoding: "+Xe);Xe=(Xe+"").toLowerCase(),Ge=!0}}function le(Xe,Re,Ae){var Ge=Xe[Re];Xe[Re]=Xe[Ae],Xe[Ae]=Ge}function ye(Xe,Re,Ae,Ge,Ke){if(Xe.length===0)return-1;if(typeof Ae=="string"?(Ge=Ae,Ae=0):Ae>2147483647?Ae=2147483647:Ae<-2147483648&&(Ae=-2147483648),Ae=+Ae,isNaN(Ae)&&(Ae=Ke?0:Xe.length-1),Ae<0&&(Ae=Xe.length+Ae),Ae>=Xe.length){if(Ke)return-1;Ae=Xe.length-1}else if(Ae<0){if(!Ke)return-1;Ae=0}if(typeof Re=="string"&&(Re=he.from(Re,Ge)),he.isBuffer(Re))return Re.length===0?-1:we(Xe,Re,Ae,Ge,Ke);if(typeof Re=="number")return Re&=255,he.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ke?Uint8Array.prototype.indexOf.call(Xe,Re,Ae):Uint8Array.prototype.lastIndexOf.call(Xe,Re,Ae):we(Xe,[Re],Ae,Ge,Ke);throw new TypeError("val must be string, number or Buffer")}function we(Xe,Re,Ae,Ge,Ke){function Ze(fn,Mn){return at===1?fn[Mn]:fn.readUInt16BE(Mn*at)}var at=1,xt=Xe.length,tn=Re.length;if(Ge!==void 0&&((Ge=String(Ge).toLowerCase())==="ucs2"||Ge==="ucs-2"||Ge==="utf16le"||Ge==="utf-16le")){if(Xe.length<2||Re.length<2)return-1;at=2,xt/=2,tn/=2,Ae/=2}var nn;if(Ke){var Jt=-1;for(nn=Ae;nn<xt;nn++)if(Ze(Xe,nn)===Ze(Re,Jt===-1?0:nn-Jt)){if(Jt===-1&&(Jt=nn),nn-Jt+1===tn)return Jt*at}else Jt!==-1&&(nn-=nn-Jt),Jt=-1}else for(Ae+tn>xt&&(Ae=xt-tn),nn=Ae;nn>=0;nn--){for(var mn=!0,kn=0;kn<tn;kn++)if(Ze(Xe,nn+kn)!==Ze(Re,kn)){mn=!1;break}if(mn)return nn}return-1}function be(Xe,Re,Ae,Ge){Ae=Number(Ae)||0;var Ke=Xe.length-Ae;Ge?(Ge=Number(Ge))>Ke&&(Ge=Ke):Ge=Ke;var Ze=Re.length;if(Ze%2!=0)throw new TypeError("Invalid hex string");Ge>Ze/2&&(Ge=Ze/2);for(var at=0;at<Ge;++at){var xt=parseInt(Re.substr(2*at,2),16);if(isNaN(xt))return at;Xe[Ae+at]=xt}return at}function ke(Xe,Re,Ae,Ge){return Xt(Vt(Re,Xe.length-Ae),Xe,Ae,Ge)}function Ne(Xe,Re,Ae,Ge){return Xt(xn(Re),Xe,Ae,Ge)}function je(Xe,Re,Ae,Ge){return Ne(Xe,Re,Ae,Ge)}function Ve(Xe,Re,Ae,Ge){return Xt(Zt(Re),Xe,Ae,Ge)}function Je(Xe,Re,Ae,Ge){return Xt(Ut(Re,Xe.length-Ae),Xe,Ae,Ge)}function We(Xe,Re,Ae){return Re===0&&Ae===Xe.length?ze.fromByteArray(Xe):ze.fromByteArray(Xe.slice(Re,Ae))}function gt(Xe,Re,Ae){Ae=Math.min(Xe.length,Ae);for(var Ge=[],Ke=Re;Ke<Ae;){var Ze=Xe[Ke],at=null,xt=Ze>239?4:Ze>223?3:Ze>191?2:1;if(Ke+xt<=Ae){var tn,nn,Jt,mn;switch(xt){case 1:Ze<128&&(at=Ze);break;case 2:tn=Xe[Ke+1],(192&tn)==128&&(mn=(31&Ze)<<6|63&tn)>127&&(at=mn);break;case 3:tn=Xe[Ke+1],nn=Xe[Ke+2],(192&tn)==128&&(192&nn)==128&&(mn=(15&Ze)<<12|(63&tn)<<6|63&nn)>2047&&(mn<55296||mn>57343)&&(at=mn);break;case 4:tn=Xe[Ke+1],nn=Xe[Ke+2],Jt=Xe[Ke+3],(192&tn)==128&&(192&nn)==128&&(192&Jt)==128&&(mn=(15&Ze)<<18|(63&tn)<<12|(63&nn)<<6|63&Jt)>65535&&mn<1114112&&(at=mn)}}at===null?(at=65533,xt=1):at>65535&&(at-=65536,Ge.push(at>>>10&1023|55296),at=56320|1023&at),Ge.push(at),Ke+=xt}return ut(Ge)}function ut(Xe){var Re=Xe.length;if(Re<=Qe)return String.fromCharCode.apply(String,Xe);for(var Ae="",Ge=0;Ge<Re;)Ae+=String.fromCharCode.apply(String,Xe.slice(Ge,Ge+=Qe));return Ae}function bt(Xe,Re,Ae){var Ge="";Ae=Math.min(Xe.length,Ae);for(var Ke=Re;Ke<Ae;++Ke)Ge+=String.fromCharCode(127&Xe[Ke]);return Ge}function rt(Xe,Re,Ae){var Ge="";Ae=Math.min(Xe.length,Ae);for(var Ke=Re;Ke<Ae;++Ke)Ge+=String.fromCharCode(Xe[Ke]);return Ge}function St(Xe,Re,Ae){var Ge=Xe.length;(!Re||Re<0)&&(Re=0),(!Ae||Ae<0||Ae>Ge)&&(Ae=Ge);for(var Ke="",Ze=Re;Ze<Ae;++Ze)Ke+=un(Xe[Ze]);return Ke}function ct(Xe,Re,Ae){for(var Ge=Xe.slice(Re,Ae),Ke="",Ze=0;Ze<Ge.length;Ze+=2)Ke+=String.fromCharCode(Ge[Ze]+256*Ge[Ze+1]);return Ke}function Bt(Xe,Re,Ae){if(Xe%1!=0||Xe<0)throw new RangeError("offset is not uint");if(Xe+Re>Ae)throw new RangeError("Trying to access beyond buffer length")}function ht(Xe,Re,Ae,Ge,Ke,Ze){if(!he.isBuffer(Xe))throw new TypeError('"buffer" argument must be a Buffer instance');if(Re>Ke||Re<Ze)throw new RangeError('"value" argument is out of bounds');if(Ae+Ge>Xe.length)throw new RangeError("Index out of range")}function it(Xe,Re,Ae,Ge){Re<0&&(Re=65535+Re+1);for(var Ke=0,Ze=Math.min(Xe.length-Ae,2);Ke<Ze;++Ke)Xe[Ae+Ke]=(Re&255<<8*(Ge?Ke:1-Ke))>>>8*(Ge?Ke:1-Ke)}function dt(Xe,Re,Ae,Ge){Re<0&&(Re=4294967295+Re+1);for(var Ke=0,Ze=Math.min(Xe.length-Ae,4);Ke<Ze;++Ke)Xe[Ae+Ke]=Re>>>8*(Ge?Ke:3-Ke)&255}function yt(Xe,Re,Ae,Ge,Ke,Ze){if(Ae+Ge>Xe.length)throw new RangeError("Index out of range");if(Ae<0)throw new RangeError("Index out of range")}function Et(Xe,Re,Ae,Ge,Ke){return Ke||yt(Xe,Re,Ae,4,34028234663852886e22,-34028234663852886e22),Be.write(Xe,Re,Ae,Ge,23,4),Ae+4}function vt(Xe,Re,Ae,Ge,Ke){return Ke||yt(Xe,Re,Ae,8,17976931348623157e292,-17976931348623157e292),Be.write(Xe,Re,Ae,Ge,52,8),Ae+8}function Rt(Xe){if(Xe=jt(Xe).replace(Ue,""),Xe.length<2)return"";for(;Xe.length%4!=0;)Xe+="=";return Xe}function jt(Xe){return Xe.trim?Xe.trim():Xe.replace(/^\s+|\s+$/g,"")}function un(Xe){return Xe<16?"0"+Xe.toString(16):Xe.toString(16)}function Vt(Xe,Re){Re=Re||1/0;for(var Ae,Ge=Xe.length,Ke=null,Ze=[],at=0;at<Ge;++at){if((Ae=Xe.charCodeAt(at))>55295&&Ae<57344){if(!Ke){if(Ae>56319){(Re-=3)>-1&&Ze.push(239,191,189);continue}if(at+1===Ge){(Re-=3)>-1&&Ze.push(239,191,189);continue}Ke=Ae;continue}if(Ae<56320){(Re-=3)>-1&&Ze.push(239,191,189),Ke=Ae;continue}Ae=65536+(Ke-55296<<10|Ae-56320)}else Ke&&(Re-=3)>-1&&Ze.push(239,191,189);if(Ke=null,Ae<128){if((Re-=1)<0)break;Ze.push(Ae)}else if(Ae<2048){if((Re-=2)<0)break;Ze.push(Ae>>6|192,63&Ae|128)}else if(Ae<65536){if((Re-=3)<0)break;Ze.push(Ae>>12|224,Ae>>6&63|128,63&Ae|128)}else{if(!(Ae<1114112))throw new Error("Invalid code point");if((Re-=4)<0)break;Ze.push(Ae>>18|240,Ae>>12&63|128,Ae>>6&63|128,63&Ae|128)}}return Ze}function xn(Xe){for(var Re=[],Ae=0;Ae<Xe.length;++Ae)Re.push(255&Xe.charCodeAt(Ae));return Re}function Ut(Xe,Re){for(var Ae,Ge,Ke,Ze=[],at=0;at<Xe.length&&!((Re-=2)<0);++at)Ae=Xe.charCodeAt(at),Ge=Ae>>8,Ke=Ae%256,Ze.push(Ke),Ze.push(Ge);return Ze}function Zt(Xe){return ze.toByteArray(Rt(Xe))}function Xt(Xe,Re,Ae,Ge){for(var Ke=0;Ke<Ge&&!(Ke+Ae>=Re.length||Ke>=Xe.length);++Ke)Re[Ke+Ae]=Xe[Ke];return Ke}function mt(Xe){return Xe!==Xe}var ze=Ie(21),Be=Ie(22),qe=Ie(23);me.Buffer=he,me.SlowBuffer=oe,me.INSPECT_MAX_BYTES=50,he.TYPED_ARRAY_SUPPORT=Te.TYPED_ARRAY_SUPPORT!==void 0?Te.TYPED_ARRAY_SUPPORT:function(){try{var Xe=new Uint8Array(1);return Xe.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Xe.foo()===42&&typeof Xe.subarray=="function"&&Xe.subarray(1,1).byteLength===0}catch(Re){return!1}}(),me.kMaxLength=Ce(),he.poolSize=8192,he._augment=function(Xe){return Xe.__proto__=he.prototype,Xe},he.from=function(Xe,Re,Ae){return Se(null,Xe,Re,Ae)},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(Xe,Re,Ae){return ge(null,Xe,Re,Ae)},he.allocUnsafe=function(Xe){return ce(null,Xe)},he.allocUnsafeSlow=function(Xe){return ce(null,Xe)},he.isBuffer=function(Xe){return!(Xe==null||!Xe._isBuffer)},he.compare=function(Xe,Re){if(!he.isBuffer(Xe)||!he.isBuffer(Re))throw new TypeError("Arguments must be Buffers");if(Xe===Re)return 0;for(var Ae=Xe.length,Ge=Re.length,Ke=0,Ze=Math.min(Ae,Ge);Ke<Ze;++Ke)if(Xe[Ke]!==Re[Ke]){Ae=Xe[Ke],Ge=Re[Ke];break}return Ae<Ge?-1:Ge<Ae?1:0},he.isEncoding=function(Xe){switch(String(Xe).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(Xe,Re){if(!qe(Xe))throw new TypeError('"list" argument must be an Array of Buffers');if(Xe.length===0)return he.alloc(0);var Ae;if(Re===void 0)for(Re=0,Ae=0;Ae<Xe.length;++Ae)Re+=Xe[Ae].length;var Ge=he.allocUnsafe(Re),Ke=0;for(Ae=0;Ae<Xe.length;++Ae){var Ze=Xe[Ae];if(!he.isBuffer(Ze))throw new TypeError('"list" argument must be an Array of Buffers');Ze.copy(Ge,Ke),Ke+=Ze.length}return Ge},he.byteLength=ie,he.prototype._isBuffer=!0,he.prototype.swap16=function(){var Xe=this.length;if(Xe%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Re=0;Re<Xe;Re+=2)le(this,Re,Re+1);return this},he.prototype.swap32=function(){var Xe=this.length;if(Xe%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Re=0;Re<Xe;Re+=4)le(this,Re,Re+3),le(this,Re+1,Re+2);return this},he.prototype.swap64=function(){var Xe=this.length;if(Xe%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Re=0;Re<Xe;Re+=8)le(this,Re,Re+7),le(this,Re+1,Re+6),le(this,Re+2,Re+5),le(this,Re+3,Re+4);return this},he.prototype.toString=function(){var Xe=0|this.length;return Xe===0?"":arguments.length===0?gt(this,0,Xe):se.apply(this,arguments)},he.prototype.equals=function(Xe){if(!he.isBuffer(Xe))throw new TypeError("Argument must be a Buffer");return this===Xe||he.compare(this,Xe)===0},he.prototype.inspect=function(){var Xe="",Re=me.INSPECT_MAX_BYTES;return this.length>0&&(Xe=this.toString("hex",0,Re).match(/.{2}/g).join(" "),this.length>Re&&(Xe+=" ... ")),"<Buffer "+Xe+">"},he.prototype.compare=function(Xe,Re,Ae,Ge,Ke){if(!he.isBuffer(Xe))throw new TypeError("Argument must be a Buffer");if(Re===void 0&&(Re=0),Ae===void 0&&(Ae=Xe?Xe.length:0),Ge===void 0&&(Ge=0),Ke===void 0&&(Ke=this.length),Re<0||Ae>Xe.length||Ge<0||Ke>this.length)throw new RangeError("out of range index");if(Ge>=Ke&&Re>=Ae)return 0;if(Ge>=Ke)return-1;if(Re>=Ae)return 1;if(Re>>>=0,Ae>>>=0,Ge>>>=0,Ke>>>=0,this===Xe)return 0;for(var Ze=Ke-Ge,at=Ae-Re,xt=Math.min(Ze,at),tn=this.slice(Ge,Ke),nn=Xe.slice(Re,Ae),Jt=0;Jt<xt;++Jt)if(tn[Jt]!==nn[Jt]){Ze=tn[Jt],at=nn[Jt];break}return Ze<at?-1:at<Ze?1:0},he.prototype.includes=function(Xe,Re,Ae){return this.indexOf(Xe,Re,Ae)!==-1},he.prototype.indexOf=function(Xe,Re,Ae){return ye(this,Xe,Re,Ae,!0)},he.prototype.lastIndexOf=function(Xe,Re,Ae){return ye(this,Xe,Re,Ae,!1)},he.prototype.write=function(Xe,Re,Ae,Ge){if(Re===void 0)Ge="utf8",Ae=this.length,Re=0;else if(Ae===void 0&&typeof Re=="string")Ge=Re,Ae=this.length,Re=0;else{if(!isFinite(Re))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Re|=0,isFinite(Ae)?(Ae|=0,Ge===void 0&&(Ge="utf8")):(Ge=Ae,Ae=void 0)}var Ke=this.length-Re;if((Ae===void 0||Ae>Ke)&&(Ae=Ke),Xe.length>0&&(Ae<0||Re<0)||Re>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ge||(Ge="utf8");for(var Ze=!1;;)switch(Ge){case"hex":return be(this,Xe,Re,Ae);case"utf8":case"utf-8":return ke(this,Xe,Re,Ae);case"ascii":return Ne(this,Xe,Re,Ae);case"latin1":case"binary":return je(this,Xe,Re,Ae);case"base64":return Ve(this,Xe,Re,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Je(this,Xe,Re,Ae);default:if(Ze)throw new TypeError("Unknown encoding: "+Ge);Ge=(""+Ge).toLowerCase(),Ze=!0}},he.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Qe=4096;he.prototype.slice=function(Xe,Re){var Ae=this.length;Xe=~~Xe,Re=Re===void 0?Ae:~~Re,Xe<0?(Xe+=Ae)<0&&(Xe=0):Xe>Ae&&(Xe=Ae),Re<0?(Re+=Ae)<0&&(Re=0):Re>Ae&&(Re=Ae),Re<Xe&&(Re=Xe);var Ge;if(he.TYPED_ARRAY_SUPPORT)Ge=this.subarray(Xe,Re),Ge.__proto__=he.prototype;else{var Ke=Re-Xe;Ge=new he(Ke,void 0);for(var Ze=0;Ze<Ke;++Ze)Ge[Ze]=this[Ze+Xe]}return Ge},he.prototype.readUIntLE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Bt(Xe,Re,this.length);for(var Ge=this[Xe],Ke=1,Ze=0;++Ze<Re&&(Ke*=256);)Ge+=this[Xe+Ze]*Ke;return Ge},he.prototype.readUIntBE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Bt(Xe,Re,this.length);for(var Ge=this[Xe+--Re],Ke=1;Re>0&&(Ke*=256);)Ge+=this[Xe+--Re]*Ke;return Ge},he.prototype.readUInt8=function(Xe,Re){return Re||Bt(Xe,1,this.length),this[Xe]},he.prototype.readUInt16LE=function(Xe,Re){return Re||Bt(Xe,2,this.length),this[Xe]|this[Xe+1]<<8},he.prototype.readUInt16BE=function(Xe,Re){return Re||Bt(Xe,2,this.length),this[Xe]<<8|this[Xe+1]},he.prototype.readUInt32LE=function(Xe,Re){return Re||Bt(Xe,4,this.length),(this[Xe]|this[Xe+1]<<8|this[Xe+2]<<16)+16777216*this[Xe+3]},he.prototype.readUInt32BE=function(Xe,Re){return Re||Bt(Xe,4,this.length),16777216*this[Xe]+(this[Xe+1]<<16|this[Xe+2]<<8|this[Xe+3])},he.prototype.readIntLE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Bt(Xe,Re,this.length);for(var Ge=this[Xe],Ke=1,Ze=0;++Ze<Re&&(Ke*=256);)Ge+=this[Xe+Ze]*Ke;return Ke*=128,Ge>=Ke&&(Ge-=Math.pow(2,8*Re)),Ge},he.prototype.readIntBE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Bt(Xe,Re,this.length);for(var Ge=Re,Ke=1,Ze=this[Xe+--Ge];Ge>0&&(Ke*=256);)Ze+=this[Xe+--Ge]*Ke;return Ke*=128,Ze>=Ke&&(Ze-=Math.pow(2,8*Re)),Ze},he.prototype.readInt8=function(Xe,Re){return Re||Bt(Xe,1,this.length),128&this[Xe]?-1*(255-this[Xe]+1):this[Xe]},he.prototype.readInt16LE=function(Xe,Re){Re||Bt(Xe,2,this.length);var Ae=this[Xe]|this[Xe+1]<<8;return 32768&Ae?4294901760|Ae:Ae},he.prototype.readInt16BE=function(Xe,Re){Re||Bt(Xe,2,this.length);var Ae=this[Xe+1]|this[Xe]<<8;return 32768&Ae?4294901760|Ae:Ae},he.prototype.readInt32LE=function(Xe,Re){return Re||Bt(Xe,4,this.length),this[Xe]|this[Xe+1]<<8|this[Xe+2]<<16|this[Xe+3]<<24},he.prototype.readInt32BE=function(Xe,Re){return Re||Bt(Xe,4,this.length),this[Xe]<<24|this[Xe+1]<<16|this[Xe+2]<<8|this[Xe+3]},he.prototype.readFloatLE=function(Xe,Re){return Re||Bt(Xe,4,this.length),Be.read(this,Xe,!0,23,4)},he.prototype.readFloatBE=function(Xe,Re){return Re||Bt(Xe,4,this.length),Be.read(this,Xe,!1,23,4)},he.prototype.readDoubleLE=function(Xe,Re){return Re||Bt(Xe,8,this.length),Be.read(this,Xe,!0,52,8)},he.prototype.readDoubleBE=function(Xe,Re){return Re||Bt(Xe,8,this.length),Be.read(this,Xe,!1,52,8)},he.prototype.writeUIntLE=function(Xe,Re,Ae,Ge){Xe=+Xe,Re|=0,Ae|=0,!Ge&&ht(this,Xe,Re,Ae,Math.pow(2,8*Ae)-1,0);var Ke=1,Ze=0;for(this[Re]=255&Xe;++Ze<Ae&&(Ke*=256);)this[Re+Ze]=Xe/Ke&255;return Re+Ae},he.prototype.writeUIntBE=function(Xe,Re,Ae,Ge){Xe=+Xe,Re|=0,Ae|=0,!Ge&&ht(this,Xe,Re,Ae,Math.pow(2,8*Ae)-1,0);var Ke=Ae-1,Ze=1;for(this[Re+Ke]=255&Xe;--Ke>=0&&(Ze*=256);)this[Re+Ke]=Xe/Ze&255;return Re+Ae},he.prototype.writeUInt8=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,1,255,0),he.TYPED_ARRAY_SUPPORT||(Xe=Math.floor(Xe)),this[Re]=255&Xe,Re+1},he.prototype.writeUInt16LE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,2,65535,0),he.TYPED_ARRAY_SUPPORT?(this[Re]=255&Xe,this[Re+1]=Xe>>>8):it(this,Xe,Re,!0),Re+2},he.prototype.writeUInt16BE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,2,65535,0),he.TYPED_ARRAY_SUPPORT?(this[Re]=Xe>>>8,this[Re+1]=255&Xe):it(this,Xe,Re,!1),Re+2},he.prototype.writeUInt32LE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,4,4294967295,0),he.TYPED_ARRAY_SUPPORT?(this[Re+3]=Xe>>>24,this[Re+2]=Xe>>>16,this[Re+1]=Xe>>>8,this[Re]=255&Xe):dt(this,Xe,Re,!0),Re+4},he.prototype.writeUInt32BE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,4,4294967295,0),he.TYPED_ARRAY_SUPPORT?(this[Re]=Xe>>>24,this[Re+1]=Xe>>>16,this[Re+2]=Xe>>>8,this[Re+3]=255&Xe):dt(this,Xe,Re,!1),Re+4},he.prototype.writeIntLE=function(Xe,Re,Ae,Ge){if(Xe=+Xe,Re|=0,!Ge){var Ke=Math.pow(2,8*Ae-1);ht(this,Xe,Re,Ae,Ke-1,-Ke)}var Ze=0,at=1,xt=0;for(this[Re]=255&Xe;++Ze<Ae&&(at*=256);)Xe<0&&xt===0&&this[Re+Ze-1]!==0&&(xt=1),this[Re+Ze]=(Xe/at>>0)-xt&255;return Re+Ae},he.prototype.writeIntBE=function(Xe,Re,Ae,Ge){if(Xe=+Xe,Re|=0,!Ge){var Ke=Math.pow(2,8*Ae-1);ht(this,Xe,Re,Ae,Ke-1,-Ke)}var Ze=Ae-1,at=1,xt=0;for(this[Re+Ze]=255&Xe;--Ze>=0&&(at*=256);)Xe<0&&xt===0&&this[Re+Ze+1]!==0&&(xt=1),this[Re+Ze]=(Xe/at>>0)-xt&255;return Re+Ae},he.prototype.writeInt8=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,1,127,-128),he.TYPED_ARRAY_SUPPORT||(Xe=Math.floor(Xe)),Xe<0&&(Xe=255+Xe+1),this[Re]=255&Xe,Re+1},he.prototype.writeInt16LE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,2,32767,-32768),he.TYPED_ARRAY_SUPPORT?(this[Re]=255&Xe,this[Re+1]=Xe>>>8):it(this,Xe,Re,!0),Re+2},he.prototype.writeInt16BE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,2,32767,-32768),he.TYPED_ARRAY_SUPPORT?(this[Re]=Xe>>>8,this[Re+1]=255&Xe):it(this,Xe,Re,!1),Re+2},he.prototype.writeInt32LE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,4,2147483647,-2147483648),he.TYPED_ARRAY_SUPPORT?(this[Re]=255&Xe,this[Re+1]=Xe>>>8,this[Re+2]=Xe>>>16,this[Re+3]=Xe>>>24):dt(this,Xe,Re,!0),Re+4},he.prototype.writeInt32BE=function(Xe,Re,Ae){return Xe=+Xe,Re|=0,Ae||ht(this,Xe,Re,4,2147483647,-2147483648),Xe<0&&(Xe=4294967295+Xe+1),he.TYPED_ARRAY_SUPPORT?(this[Re]=Xe>>>24,this[Re+1]=Xe>>>16,this[Re+2]=Xe>>>8,this[Re+3]=255&Xe):dt(this,Xe,Re,!1),Re+4},he.prototype.writeFloatLE=function(Xe,Re,Ae){return Et(this,Xe,Re,!0,Ae)},he.prototype.writeFloatBE=function(Xe,Re,Ae){return Et(this,Xe,Re,!1,Ae)},he.prototype.writeDoubleLE=function(Xe,Re,Ae){return vt(this,Xe,Re,!0,Ae)},he.prototype.writeDoubleBE=function(Xe,Re,Ae){return vt(this,Xe,Re,!1,Ae)},he.prototype.copy=function(Xe,Re,Ae,Ge){if(Ae||(Ae=0),Ge||Ge===0||(Ge=this.length),Re>=Xe.length&&(Re=Xe.length),Re||(Re=0),Ge>0&&Ge<Ae&&(Ge=Ae),Ge===Ae||Xe.length===0||this.length===0)return 0;if(Re<0)throw new RangeError("targetStart out of bounds");if(Ae<0||Ae>=this.length)throw new RangeError("sourceStart out of bounds");if(Ge<0)throw new RangeError("sourceEnd out of bounds");Ge>this.length&&(Ge=this.length),Xe.length-Re<Ge-Ae&&(Ge=Xe.length-Re+Ae);var Ke,Ze=Ge-Ae;if(this===Xe&&Ae<Re&&Re<Ge)for(Ke=Ze-1;Ke>=0;--Ke)Xe[Ke+Re]=this[Ke+Ae];else if(Ze<1e3||!he.TYPED_ARRAY_SUPPORT)for(Ke=0;Ke<Ze;++Ke)Xe[Ke+Re]=this[Ke+Ae];else Uint8Array.prototype.set.call(Xe,this.subarray(Ae,Ae+Ze),Re);return Ze},he.prototype.fill=function(Xe,Re,Ae,Ge){if(typeof Xe=="string"){if(typeof Re=="string"?(Ge=Re,Re=0,Ae=this.length):typeof Ae=="string"&&(Ge=Ae,Ae=this.length),Xe.length===1){var Ke=Xe.charCodeAt(0);Ke<256&&(Xe=Ke)}if(Ge!==void 0&&typeof Ge!="string")throw new TypeError("encoding must be a string");if(typeof Ge=="string"&&!he.isEncoding(Ge))throw new TypeError("Unknown encoding: "+Ge)}else typeof Xe=="number"&&(Xe&=255);if(Re<0||this.length<Re||this.length<Ae)throw new RangeError("Out of range index");if(Ae<=Re)return this;Re>>>=0,Ae=Ae===void 0?this.length:Ae>>>0,Xe||(Xe=0);var Ze;if(typeof Xe=="number")for(Ze=Re;Ze<Ae;++Ze)this[Ze]=Xe;else{var at=he.isBuffer(Xe)?Xe:Vt(new he(Xe,Ge).toString()),xt=at.length;for(Ze=0;Ze<Ae-Re;++Ze)this[Ze+Re]=at[Ze%xt]}return this};var Ue=/[^+\/0-9A-Za-z-_]/g}).call(me,Ie(20))},function(Le,me){var Ie;Ie=function(){return this}();try{Ie=Ie||Function("return this")()||(0,eval)("this")}catch(Te){typeof window=="object"&&(Ie=window)}Le.exports=Ie},function(Le,me,Ie){"use strict";function Te(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-Te(ee)}function _e(ee){var oe,ie,se,le,ye,we=ee.length;le=Te(ee),ye=new ve(3*we/4-le),ie=le>0?we-4:we;var be=0;for(oe=0;oe<ie;oe+=4)se=ce[ee.charCodeAt(oe)]<<18|ce[ee.charCodeAt(oe+1)]<<12|ce[ee.charCodeAt(oe+2)]<<6|ce[ee.charCodeAt(oe+3)],ye[be++]=se>>16&255,ye[be++]=se>>8&255,ye[be++]=255&se;return le===2?(se=ce[ee.charCodeAt(oe)]<<2|ce[ee.charCodeAt(oe+1)]>>4,ye[be++]=255&se):le===1&&(se=ce[ee.charCodeAt(oe)]<<10|ce[ee.charCodeAt(oe+1)]<<4|ce[ee.charCodeAt(oe+2)]>>2,ye[be++]=se>>8&255,ye[be++]=255&se),ye}function he(ee){return ge[ee>>18&63]+ge[ee>>12&63]+ge[ee>>6&63]+ge[63&ee]}function Se(ee,oe,ie){for(var se,le=[],ye=oe;ye<ie;ye+=3)se=(ee[ye]<<16)+(ee[ye+1]<<8)+ee[ye+2],le.push(he(se));return le.join("")}function xe(ee){for(var oe,ie=ee.length,se=ie%3,le="",ye=[],we=0,be=ie-se;we<be;we+=16383)ye.push(Se(ee,we,we+16383>be?be:we+16383));return se===1?(oe=ee[ie-1],le+=ge[oe>>2],le+=ge[oe<<4&63],le+="=="):se===2&&(oe=(ee[ie-2]<<8)+ee[ie-1],le+=ge[oe>>10],le+=ge[oe>>4&63],le+=ge[oe<<2&63],le+="="),ye.push(le),ye.join("")}me.byteLength=Ce,me.toByteArray=_e,me.fromByteArray=xe;for(var ge=[],ce=[],ve=typeof Uint8Array!="undefined"?Uint8Array:Array,de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue=0,z=de.length;ue<z;++ue)ge[ue]=de[ue],ce[de.charCodeAt(ue)]=ue;ce[45]=62,ce[95]=63},function(Le,me){me.read=function(Ie,Te,Ce,_e,he){var Se,xe,ge=8*he-_e-1,ce=(1<<ge)-1,ve=ce>>1,de=-7,ue=Ce?he-1:0,z=Ce?-1:1,ee=Ie[Te+ue];for(ue+=z,Se=ee&(1<<-de)-1,ee>>=-de,de+=ge;de>0;Se=256*Se+Ie[Te+ue],ue+=z,de-=8);for(xe=Se&(1<<-de)-1,Se>>=-de,de+=_e;de>0;xe=256*xe+Ie[Te+ue],ue+=z,de-=8);if(Se===0)Se=1-ve;else{if(Se===ce)return xe?NaN:1/0*(ee?-1:1);xe+=Math.pow(2,_e),Se-=ve}return(ee?-1:1)*xe*Math.pow(2,Se-_e)},me.write=function(Ie,Te,Ce,_e,he,Se){var xe,ge,ce,ve=8*Se-he-1,de=(1<<ve)-1,ue=de>>1,z=he===23?Math.pow(2,-24)-Math.pow(2,-77):0,ee=_e?0:Se-1,oe=_e?1:-1,ie=Te<0||Te===0&&1/Te<0?1:0;for(Te=Math.abs(Te),isNaN(Te)||Te===1/0?(ge=isNaN(Te)?1:0,xe=de):(xe=Math.floor(Math.log(Te)/Math.LN2),Te*(ce=Math.pow(2,-xe))<1&&(xe--,ce*=2),Te+=xe+ue>=1?z/ce:z*Math.pow(2,1-ue),Te*ce>=2&&(xe++,ce/=2),xe+ue>=de?(ge=0,xe=de):xe+ue>=1?(ge=(Te*ce-1)*Math.pow(2,he),xe+=ue):(ge=Te*Math.pow(2,ue-1)*Math.pow(2,he),xe=0));he>=8;Ie[Ce+ee]=255&ge,ee+=oe,ge/=256,he-=8);for(xe=xe<<he|ge,ve+=he;ve>0;Ie[Ce+ee]=255&xe,ee+=oe,xe/=256,ve-=8);Ie[Ce+ee-oe]|=128*ie}},function(Le,me){var Ie={}.toString;Le.exports=Array.isArray||function(Te){return Ie.call(Te)=="[object Array]"}},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),_e=function(){function he(){Te(this,he)}return Ce(he,null,[{key:"set",value:function(Se,xe){try{window.localStorage&&localStorage.setItem(Se,xe)}catch(ge){window[Se+"_localStorage"]=xe}}},{key:"get",value:function(Se){try{if(window.localStorage)return localStorage.getItem(Se)}catch(xe){return window[Se+"_localStorage"]}return""}},{key:"remove",value:function(Se){try{window.localStorage&&localStorage.removeItem(Se)}catch(xe){delete window[Se+"_localStorage"]}}}]),he}();me.default=_e},function(Le,me,Ie){"use strict";function Te(he,Se){if(!(he instanceof Se))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Ce=function(){function he(Se,xe){for(var ge=0;ge<xe.length;ge++){var ce=xe[ge];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Se,ce.key,ce)}}return function(Se,xe,ge){return xe&&he(Se.prototype,xe),ge&&he(Se,ge),Se}}(),_e=function(){function he(){Te(this,he)}return Ce(he,null,[{key:"get",value:function(Se){for(var xe=Se+"",ge=document.cookie.split(";"),ce=0;ce<ge.length;ce++){var ve=ge[ce].trim();if(ve.indexOf(xe)==0)return unescape(ve.substring(xe.length+1,ve.length))}return""}},{key:"set",value:function(Se,xe,ge){var ce=new Date;ce.setTime(ce.getTime()+24*ge*60*60*1e3);var ve="expires="+ce.toGMTString();document.cookie=Se+"="+escape(xe)+"; "+ve}}]),he}();me.default=_e},function(Le,me,Ie){"use strict";function Te(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 _e=function(){function ve(de,ue){for(var z=0;z<ue.length;z++){var ee=ue[z];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(de,ee.key,ee)}}return function(de,ue,z){return ue&&ve(de.prototype,ue),z&&ve(de,z),de}}(),he=Ie(8),Se=Te(he),xe=Ie(9),ge=Te(xe),ce=function(){function ve(){Ce(this,ve)}return _e(ve,null,[{key:"refreshUploadAuth",value:function(de,ue,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;Se.default.get(se,function(ye){var ye=JSON.parse(ye);ue&&ue(ye)},function(le){if(z){var ye=JSON.parse(le);z(ye)}})}},{key:"getUploadAuth",value:function(de,ue,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;Se.default.get(se,function(le){try{le=JSON.parse(le)}catch(ye){if(z)return void z({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}ue&&ue(le)},function(le){if(z){var ye={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{ye=JSON.parse(le)}catch(we){}z(ye)}})}},{key:"getImageUploadAuth",value:function(de,ue,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;Se.default.get(se,function(le){le=JSON.parse(le),ue&&ue(le)},function(le){if(z){var ye=JSON.parse(le);z(ye)}})}}]),ve}();me.default=ce},function(Le,me,Ie){(function(Te,Ce,_e){Le.exports=me=Ce(Ie(0),Ie(28),Ie(29))})(0,function(Te){return Te.HmacSHA1})},function(Le,me,Ie){(function(Te,Ce){Le.exports=me=Ce(Ie(0))})(0,function(Te){return function(){var Ce=Te,_e=Ce.lib,he=_e.WordArray,Se=_e.Hasher,xe=Ce.algo,ge=[],ce=xe.SHA1=Se.extend({_doReset:function(){this._hash=new he.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(ve,de){for(var ue=this._hash.words,z=ue[0],ee=ue[1],oe=ue[2],ie=ue[3],se=ue[4],le=0;le<80;le++){if(le<16)ge[le]=0|ve[de+le];else{var ye=ge[le-3]^ge[le-8]^ge[le-14]^ge[le-16];ge[le]=ye<<1|ye>>>31}var we=(z<<5|z>>>27)+se+ge[le];we+=le<20?1518500249+(ee&oe|~ee&ie):le<40?1859775393+(ee^oe^ie):le<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}ue[0]=ue[0]+z|0,ue[1]=ue[1]+ee|0,ue[2]=ue[2]+oe|0,ue[3]=ue[3]+ie|0,ue[4]=ue[4]+se|0},_doFinalize:function(){var ve=this._data,de=ve.words,ue=8*this._nDataBytes,z=8*ve.sigBytes;return de[z>>>5]|=128<<24-z%32,de[14+(z+64>>>9<<4)]=Math.floor(ue/4294967296),de[15+(z+64>>>9<<4)]=ue,ve.sigBytes=4*de.length,this._process(),this._hash},clone:function(){var ve=Se.clone.call(this);return ve._hash=this._hash.clone(),ve}});Ce.SHA1=Se._createHelper(ce),Ce.HmacSHA1=Se._createHmacHelper(ce)}(),Te.SHA1})},function(Le,me,Ie){(function(Te,Ce){Le.exports=me=Ce(Ie(0))})(0,function(Te){(function(){var Ce=Te,_e=Ce.lib,he=_e.Base,Se=Ce.enc,xe=Se.Utf8,ge=Ce.algo;ge.HMAC=he.extend({init:function(ce,ve){ce=this._hasher=new ce.init,typeof ve=="string"&&(ve=xe.parse(ve));var de=ce.blockSize,ue=4*de;ve.sigBytes>ue&&(ve=ce.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=ue,this.reset()},reset:function(){var ce=this._hasher;ce.reset(),ce.update(this._iKey)},update:function(ce){return this._hasher.update(ce),this},finalize:function(ce){var ve=this._hasher,de=ve.finalize(ce);return ve.reset(),ve.finalize(this._oKey.clone().concat(de))}})})()})},function(Le,me,Ie){(function(Te,Ce){Le.exports=me=Ce(Ie(0))})(0,function(Te){return function(){function Ce(ge,ce,ve){for(var de=[],ue=0,z=0;z<ce;z++)if(z%4){var ee=ve[ge.charCodeAt(z-1)]<<z%4*2,oe=ve[ge.charCodeAt(z)]>>>6-z%4*2;de[ue>>>2]|=(ee|oe)<<24-ue%4*8,ue++}return Se.create(de,ue)}var _e=Te,he=_e.lib,Se=he.WordArray,xe=_e.enc;xe.Base64={stringify:function(ge){var ce=ge.words,ve=ge.sigBytes,de=this._map;ge.clamp();for(var ue=[],z=0;z<ve;z+=3)for(var ee=ce[z>>>2]>>>24-z%4*8&255,oe=ce[z+1>>>2]>>>24-(z+1)%4*8&255,ie=ce[z+2>>>2]>>>24-(z+2)%4*8&255,se=ee<<16|oe<<8|ie,le=0;le<4&&z+.75*le<ve;le++)ue.push(de.charAt(se>>>6*(3-le)&63));var ye=de.charAt(64);if(ye)for(;ue.length%4;)ue.push(ye);return ue.join("")},parse:function(ge){var ce=ge.length,ve=this._map,de=this._reverseMap;if(!de){de=this._reverseMap=[];for(var ue=0;ue<ve.length;ue++)de[ve.charCodeAt(ue)]=ue}var z=ve.charAt(64);if(z){var ee=ge.indexOf(z);ee!==-1&&(ce=ee)}return Ce(ge,ce,de)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),Te.enc.Base64})},function(Le,me,Ie){"use strict";function Te(be){return be&&be.__esModule?be:{default:be}}function Ce(be,ke){if(!(be instanceof ke))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var _e=function(){function be(ke,Ne){for(var je=0;je<Ne.length;je++){var Ve=Ne[je];Ve.enumerable=Ve.enumerable||!1,Ve.configurable=!0,"value"in Ve&&(Ve.writable=!0),Object.defineProperty(ke,Ve.key,Ve)}}return function(ke,Ne,je){return Ne&&be(ke.prototype,Ne),je&&be(ke,je),ke}}(),he=Ie(8),Se=Te(he),xe=Ie(7),ge=Te(xe),ce=Ie(4),ve=Te(ce),de=Ie(6),ue=Te(de),z=Ie(1),ee=Te(z),oe=Ie(9),ie=Te(oe),se=Ie(2),le=Ie(11),ye=Ie(10),we=function(){function be(){Ce(this,be)}return _e(be,null,[{key:"getAuthInfo",value:function(ke,Ne,je){var Ve=ke+"|f#Ylm&^1TppeRhLg|"+je;return Ne&&(Ve=ke+"|"+Ne+"|f#Ylm&^1TppeRhLg|"+je),se(ye.parse(Ve)).toString(le)}},{key:"upload",value:function(ke,Ne,je){var Ve=ee.default.ISODateString(new Date),Je=Math.floor(new Date().valueOf()/1e3),We=ve.default.getClientId();We=ve.default.setClientId(We);var gt=be.getAuthInfo(ke.userId,We,Je),ut=ie.default.randomUUID(),bt={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ue.default.version,AuthTimestamp:Je,Timestamp:Ve,AuthInfo:gt,FileName:ke.file.name,FileSize:ke.file.size,FileCreateTime:ke.file.lastModified,FileHash:ke.fileHash,UploadId:ke.checkpoint.checkpoint.uploadId,PartSize:ke.checkpoint.checkpoint.partSize,DonePartsCount:ke.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(ke.checkpoint),UploadRatio:ke.checkpoint.loaded,UserId:ke.userId,VideoId:ke.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ut};We&&(bt.ClientId=We);var rt=ie.default.makeUTF8sort(bt,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(bt,ke.accessKeySecret)),St="https://vod."+ke.region+".aliyuncs.com/?"+rt;Se.default.get(St,function(ct){Ne&&Ne()},function(ct){ct&&(je(ct),console.log(ct))})}},{key:"get",value:function(ke,Ne,je){var Ve=ee.default.ISODateString(new Date),Je=Math.floor(new Date().valueOf()/1e3),We=ve.default.getClientId(),gt=be.getAuthInfo(ke.userId,We,Je),ut=ie.default.randomUUID(),bt={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:ge.default.browser.name+(ge.default.browser.version||""),AppVersion:ue.default.version,AuthTimestamp:Je,Timestamp:Ve,AuthInfo:gt,UserId:ke.userId,UploadInfoList:JSON.stringify(ke.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ut};We&&(bt.ClientId=We);var rt=ie.default.makeUTF8sort(bt,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(bt,ke.accessKeySecret)),St="https://vod."+ke.region+".aliyuncs.com/?"+rt;Se.default.get(St,function(ct){var Bt={},ht=We;ct=ct?JSON.parse(ct):{},ct.UploadProgress&&ct.UploadProgress.UploadProgressList&&ct.UploadProgress.UploadProgressList.length>0&&(Bt=ct.UploadProgress.UploadProgressList[0],ht=Bt.ClientId),ve.default.setClientId(ht),Ne&&Ne(Bt)},function(ct){ct&&(je(ct),console.log(ct))})}}]),be}();me.default=we},function(Le,me,Ie){"use strict";function Te(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,ce){for(var ve=0;ve<ce.length;ve++){var de=ce[ve];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ge,de.key,de)}}return function(ge,ce,ve){return ce&&xe(ge.prototype,ce),ve&&xe(ge,ve),ge}}(),_e=Ie(2),he=Ie(33),Se=(Ie(11),function(){function xe(){Te(this,xe)}return Ce(xe,null,[{key:"getMd5",value:function(ge,ce,ve){var de=new FileReader;de.onload=function(ee){try{if(ee&&ee.target){var oe=_e(he.parse(ee.target.result)),ie=oe.toString();ce(ie)}}catch(se){console.log(se)}},de.onerror=function(ee){console.log(ee),errorCallback(ee)};var ue=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,z=ue.call(ge,0,1024);de.readAsBinaryString(z)}}]),xe}());me.default=Se},function(Le,me,Ie){(function(Te,Ce){Le.exports=me=Ce(Ie(0))})(0,function(Te){return Te.enc.Latin1})}])},50371:function(Pn,qt){"use strict";function Ee(){const Le=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let me=1;me<arguments.length;me++){const Ie=me<0||arguments.length<=me?void 0:arguments[me];Ie&&Object.keys(Ie).forEach(Te=>{const Ce=Ie[Te];Ce!==void 0&&(Le[Te]=Ce)})}return Le}qt.Z=Ee},13845:function(Pn,qt,Ee){"use strict";Ee.d(qt,{F:function(){return Le},Z:function(){return me}});function Le(Ie){return Ie!=null&&Ie===Ie.window}function me(Ie,Te){var Ce,_e;if(typeof window=="undefined")return 0;const he=Te?"scrollTop":"scrollLeft";let Se=0;return Le(Ie)?Se=Ie[Te?"pageYOffset":"pageXOffset"]:Ie instanceof Document?Se=Ie.documentElement[he]:(Ie instanceof HTMLElement||Ie)&&(Se=Ie[he]),Ie&&!Le(Ie)&&typeof Se!="number"&&(Se=(_e=((Ce=Ie.ownerDocument)!==null&&Ce!==void 0?Ce:Ie).documentElement)===null||_e===void 0?void 0:_e[he]),Se}},56762:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});var Le=Ee(59301);function me(){const[,Ie]=Le.useReducer(Te=>Te+1,0);return Ie}},68031:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Te}});var Le=Ee(16089);function me(Ce,_e,he,Se){const xe=he-_e;return Ce/=Se/2,Ce<1?xe/2*Ce*Ce*Ce+_e:xe/2*((Ce-=2)*Ce*Ce+2)+_e}var Ie=Ee(13845);function Te(Ce){let _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:he=()=>window,callback:Se,duration:xe=450}=_e,ge=he(),ce=(0,Ie.Z)(ge,!0),ve=Date.now(),de=()=>{const z=Date.now()-ve,ee=me(z>xe?xe:z,ce,Ce,xe);(0,Ie.F)(ge)?ge.scrollTo(window.pageXOffset,ee):ge instanceof Document||ge.constructor.name==="HTMLDocument"?ge.documentElement.scrollTop=ee:ge.scrollTop=ee,z<xe?(0,Le.Z)(de):typeof Se=="function"&&Se()};(0,Le.Z)(de)}},24905:function(Pn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return ke}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(5630),Te=Ee(59301),Ce=Ee(36355),_e=Ee(1684),he=Ee(32441),xe=Te.createContext(null),ge=Ee(98447),ce=Ee(14088),ve=Ee(4572),de=function(Ne,je){var Ve={};for(var Je in Ne)Object.prototype.hasOwnProperty.call(Ne,Je)&&je.indexOf(Je)<0&&(Ve[Je]=Ne[Je]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,Je=Object.getOwnPropertySymbols(Ne);We<Je.length;We++)je.indexOf(Je[We])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Je[We])&&(Ve[Je[We]]=Ne[Je[We]]);return Ve};const ue=(Ne,je)=>{var Ve;const{prefixCls:Je,className:We,rootClassName:gt,children:ut,indeterminate:bt=!1,style:rt,onMouseEnter:St,onMouseLeave:ct,skipGroup:Bt=!1,disabled:ht}=Ne,it=de(Ne,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:dt,direction:yt,checkbox:Et}=Te.useContext(Ce.E_),vt=Te.useContext(xe),{isFormItemInput:Rt}=Te.useContext(he.aM),jt=Te.useContext(_e.Z),un=(Ve=(vt==null?void 0:vt.disabled)||ht)!==null&&Ve!==void 0?Ve:jt,Vt=Te.useRef(it.value);Te.useEffect(()=>{vt==null||vt.registerValue(it.value)},[]),Te.useEffect(()=>{if(!Bt)return it.value!==Vt.current&&(vt==null||vt.cancelValue(Vt.current),vt==null||vt.registerValue(it.value),Vt.current=it.value),()=>vt==null?void 0:vt.cancelValue(it.value)},[it.value]);const xn=dt("checkbox",Je),[Ut,Zt]=(0,ge.ZP)(xn),Xt=Object.assign({},it);vt&&!Bt&&(Xt.onChange=function(){it.onChange&&it.onChange.apply(it,arguments),vt.toggleOption&&vt.toggleOption({label:ut,value:it.value})},Xt.name=vt.name,Xt.checked=vt.value.includes(it.value));const mt=me()(`${xn}-wrapper`,{[`${xn}-rtl`]:yt==="rtl",[`${xn}-wrapper-checked`]:Xt.checked,[`${xn}-wrapper-disabled`]:un,[`${xn}-wrapper-in-form-item`]:Rt},Et==null?void 0:Et.className,We,gt,Zt),ze=me()({[`${xn}-indeterminate`]:bt},ve.A,Zt),Be=bt?"mixed":void 0;return Ut(Te.createElement(ce.Z,{component:"Checkbox",disabled:un},Te.createElement("label",{className:mt,style:Object.assign(Object.assign({},Et==null?void 0:Et.style),rt),onMouseEnter:St,onMouseLeave:ct},Te.createElement(Ie.Z,Object.assign({"aria-checked":Be},Xt,{prefixCls:xn,className:ze,disabled:un,ref:je})),ut!==void 0&&Te.createElement("span",null,ut))))};var ee=Te.forwardRef(ue),oe=Ee(26407),ie=Ee(2738),se=function(Ne,je){var Ve={};for(var Je in Ne)Object.prototype.hasOwnProperty.call(Ne,Je)&&je.indexOf(Je)<0&&(Ve[Je]=Ne[Je]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,Je=Object.getOwnPropertySymbols(Ne);We<Je.length;We++)je.indexOf(Je[We])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Je[We])&&(Ve[Je[We]]=Ne[Je[We]]);return Ve};const le=(Ne,je)=>{const{defaultValue:Ve,children:Je,options:We=[],prefixCls:gt,className:ut,rootClassName:bt,style:rt,onChange:St}=Ne,ct=se(Ne,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Bt,direction:ht}=Te.useContext(Ce.E_),[it,dt]=Te.useState(ct.value||Ve||[]),[yt,Et]=Te.useState([]);Te.useEffect(()=>{"value"in ct&&dt(ct.value||[])},[ct.value]);const vt=Te.useMemo(()=>We.map(qe=>typeof qe=="string"||typeof qe=="number"?{label:qe,value:qe}:qe),[We]),Rt=qe=>{Et(Qe=>Qe.filter(Ue=>Ue!==qe))},jt=qe=>{Et(Qe=>[].concat((0,oe.Z)(Qe),[qe]))},un=qe=>{const Qe=it.indexOf(qe.value),Ue=(0,oe.Z)(it);Qe===-1?Ue.push(qe.value):Ue.splice(Qe,1),"value"in ct||dt(Ue),St==null||St(Ue.filter(Xe=>yt.includes(Xe)).sort((Xe,Re)=>{const Ae=vt.findIndex(Ke=>Ke.value===Xe),Ge=vt.findIndex(Ke=>Ke.value===Re);return Ae-Ge}))},Vt=Bt("checkbox",gt),xn=`${Vt}-group`,[Ut,Zt]=(0,ge.ZP)(Vt),Xt=(0,ie.Z)(ct,["value","disabled"]),mt=We.length?vt.map(qe=>Te.createElement(ee,{prefixCls:Vt,key:qe.value.toString(),disabled:"disabled"in qe?qe.disabled:ct.disabled,value:qe.value,checked:it.includes(qe.value),onChange:qe.onChange,className:`${xn}-item`,style:qe.style,title:qe.title},qe.label)):Je,ze={toggleOption:un,value:it,disabled:ct.disabled,name:ct.name,registerValue:jt,cancelValue:Rt},Be=me()(xn,{[`${xn}-rtl`]:ht==="rtl"},ut,bt,Zt);return Ut(Te.createElement("div",Object.assign({className:Be,style:rt},Xt,{ref:je}),Te.createElement(xe.Provider,{value:ze},mt)))},ye=Te.forwardRef(le);var we=Te.memo(ye);const be=ee;be.Group=we,be.__ANT_CHECKBOX=!0;var ke=be},98447:function(Pn,qt,Ee){"use strict";Ee.d(qt,{C2:function(){return Ce}});var Le=Ee(17313),me=Ee(37613),Ie=Ee(83116);const Te=_e=>{const{checkboxCls:he}=_e,Se=`${he}-wrapper`;return[{[`${he}-group`]:Object.assign(Object.assign({},(0,Le.Wf)(_e)),{display:"inline-flex",flexWrap:"wrap",columnGap:_e.marginXS,[`> ${_e.antCls}-row`]:{flex:1}}),[Se]:Object.assign(Object.assign({},(0,Le.Wf)(_e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Se}`]:{marginInlineStart:0},[`&${Se}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[he]:Object.assign(Object.assign({},(0,Le.Wf)(_e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:_e.borderRadiusSM,alignSelf:"center",[`${he}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${he}-inner`]:Object.assign({},(0,Le.oN)(_e))},[`${he}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:_e.checkboxSize,height:_e.checkboxSize,direction:"ltr",backgroundColor:_e.colorBgContainer,border:`${_e.lineWidth}px ${_e.lineType} ${_e.colorBorder}`,borderRadius:_e.borderRadiusSM,borderCollapse:"separate",transition:`all ${_e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:_e.checkboxSize/14*5,height:_e.checkboxSize/14*8,border:`${_e.lineWidthBold}px solid ${_e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${_e.motionDurationFast} ${_e.motionEaseInBack}, opacity ${_e.motionDurationFast}`}},"& + span":{paddingInlineStart:_e.paddingXS,paddingInlineEnd:_e.paddingXS}})},{[`
|
|
|
${Se}:not(${Se}-disabled),
|
|
|
${he}:not(${he}-disabled)
|
|
|
`]:{[`&:hover ${he}-inner`]:{borderColor:_e.colorPrimary}},[`${Se}:not(${Se}-disabled)`]:{[`&:hover ${he}-checked:not(${he}-disabled) ${he}-inner`]:{backgroundColor:_e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${he}-checked:not(${he}-disabled):after`]:{borderColor:_e.colorPrimaryHover}}},{[`${he}-checked`]:{[`${he}-inner`]:{backgroundColor:_e.colorPrimary,borderColor:_e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${_e.motionDurationMid} ${_e.motionEaseOutBack} ${_e.motionDurationFast}`}}},[`
|
|
|
${Se}-checked:not(${Se}-disabled),
|
|
|
${he}-checked:not(${he}-disabled)
|
|
|
`]:{[`&:hover ${he}-inner`]:{backgroundColor:_e.colorPrimaryHover,borderColor:"transparent"}}},{[he]:{"&-indeterminate":{[`${he}-inner`]:{backgroundColor:_e.colorBgContainer,borderColor:_e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:_e.fontSizeLG/2,height:_e.fontSizeLG/2,backgroundColor:_e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Se}-disabled`]:{cursor:"not-allowed"},[`${he}-disabled`]:{[`&, ${he}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${he}-inner`]:{background:_e.colorBgContainerDisabled,borderColor:_e.colorBorder,"&:after":{borderColor:_e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:_e.colorTextDisabled},[`&${he}-indeterminate ${he}-inner::after`]:{background:_e.colorTextDisabled}}}]};function Ce(_e,he){const Se=(0,me.TS)(he,{checkboxCls:`.${_e}`,checkboxSize:he.controlInteractiveSize});return[Te(Se)]}qt.ZP=(0,Ie.Z)("Checkbox",(_e,he)=>{let{prefixCls:Se}=he;return[Ce(Se,_e)]})},93891:function(Pn,qt,Ee){"use strict";var Le=Ee(59301),me=Ee(36355),Ie=Ee(64165);const Te=Ce=>{const{componentName:_e}=Ce,{getPrefixCls:he}=(0,Le.useContext)(me.E_),Se=he("empty");switch(_e){case"Table":case"List":return Le.createElement(Ie.Z,{image:Ie.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Le.createElement(Ie.Z,{image:Ie.Z.PRESENTED_IMAGE_SIMPLE,className:`${Se}-small`});default:return Le.createElement(Ie.Z,null)}};qt.Z=Te},43428:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Ut}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(33708),Te=Ee(33606),Ce=Ee(43403),_e=Ee(34280),he=Ee(59301),Se=he.createContext(null),xe=he.createContext({}),ge=Se,ce=Ee(400),ve=Ee(92413),de=Ee(77900),ue=Ee(10228),z=Ee(26112),ee=Ee(70425),oe=function(Xt){var mt=Xt.prefixCls,ze=Xt.className,Be=Xt.style,qe=Xt.children,Qe=Xt.containerRef,Ue=Xt.id,Xe=Xt.onMouseEnter,Re=Xt.onMouseOver,Ae=Xt.onMouseLeave,Ge=Xt.onClick,Ke=Xt.onKeyDown,Ze=Xt.onKeyUp,at={onMouseEnter:Xe,onMouseOver:Re,onMouseLeave:Ae,onClick:Ge,onKeyDown:Ke,onKeyUp:Ze},xt=he.useContext(xe),tn=xt.panel,nn=(0,ee.useComposeRef)(tn,Qe);return he.createElement(he.Fragment,null,he.createElement("div",(0,ve.Z)({id:Ue,className:me()("".concat(mt,"-content"),ze),style:(0,Ie.Z)({},Be),"aria-modal":"true",role:"dialog",ref:nn},at),qe))},ie=oe,se=Ee(48736);function le(Zt){return typeof Zt=="string"&&String(Number(Zt))===Zt?((0,se.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Zt)):Zt}function ye(Zt){warning(!("wrapperClassName"in Zt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Zt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var we={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function be(Zt,Xt){var mt,ze,Be,qe,Qe=Zt.prefixCls,Ue=Zt.open,Xe=Zt.placement,Re=Zt.inline,Ae=Zt.push,Ge=Zt.forceRender,Ke=Zt.autoFocus,Ze=Zt.keyboard,at=Zt.rootClassName,xt=Zt.rootStyle,tn=Zt.zIndex,nn=Zt.className,Jt=Zt.id,mn=Zt.style,kn=Zt.motion,fn=Zt.width,Mn=Zt.height,Zn=Zt.children,Tn=Zt.contentWrapperStyle,ci=Zt.mask,ai=Zt.maskClosable,ki=Zt.maskMotion,Ci=Zt.maskClassName,or=Zt.maskStyle,tr=Zt.afterOpenChange,pr=Zt.onClose,cr=Zt.onMouseEnter,to=Zt.onMouseOver,no=Zt.onMouseLeave,di=Zt.onClick,Cr=Zt.onKeyDown,zi=Zt.onKeyUp,st=he.useRef(),Dr=he.useRef(),Mr=he.useRef();he.useImperativeHandle(Xt,function(){return st.current});var xo=function(wn){var Ft=wn.keyCode,$t=wn.shiftKey;switch(Ft){case ue.Z.TAB:{if(Ft===ue.Z.TAB){if(!$t&&document.activeElement===Mr.current){var bn;(bn=Dr.current)===null||bn===void 0||bn.focus({preventScroll:!0})}else if($t&&document.activeElement===Dr.current){var An;(An=Mr.current)===null||An===void 0||An.focus({preventScroll:!0})}}break}case ue.Z.ESC:{pr&&Ze&&(wn.stopPropagation(),pr(wn));break}}};he.useEffect(function(){if(Ue&&Ke){var zn;(zn=st.current)===null||zn===void 0||zn.focus({preventScroll:!0})}},[Ue]);var Gr=he.useState(!1),uo=(0,Te.Z)(Gr,2),Zr=uo[0],co=uo[1],cn=he.useContext(ge),$e;Ae===!1?$e={distance:0}:Ae===!0?$e={}:$e=Ae||{};var tt=(mt=(ze=(Be=$e)===null||Be===void 0?void 0:Be.distance)!==null&&ze!==void 0?ze:cn==null?void 0:cn.pushDistance)!==null&&mt!==void 0?mt:180,et=he.useMemo(function(){return{pushDistance:tt,push:function(){co(!0)},pull:function(){co(!1)}}},[tt]);he.useEffect(function(){if(Ue){var zn;cn==null||(zn=cn.push)===null||zn===void 0||zn.call(cn)}else{var wn;cn==null||(wn=cn.pull)===null||wn===void 0||wn.call(cn)}},[Ue]),he.useEffect(function(){return function(){var zn;cn==null||(zn=cn.pull)===null||zn===void 0||zn.call(cn)}},[]);var Pt=ci&&he.createElement(de.default,(0,ve.Z)({key:"mask"},ki,{visible:Ue}),function(zn,wn){var Ft=zn.className,$t=zn.style;return he.createElement("div",{className:me()("".concat(Qe,"-mask"),Ft,Ci),style:(0,Ie.Z)((0,Ie.Z)({},$t),or),onClick:ai&&Ue?pr:void 0,ref:wn})}),At=typeof kn=="function"?kn(Xe):kn,kt={};if(Zr&&tt)switch(Xe){case"top":kt.transform="translateY(".concat(tt,"px)");break;case"bottom":kt.transform="translateY(".concat(-tt,"px)");break;case"left":kt.transform="translateX(".concat(tt,"px)");break;default:kt.transform="translateX(".concat(-tt,"px)");break}Xe==="left"||Xe==="right"?kt.width=le(fn):kt.height=le(Mn);var Ct={onMouseEnter:cr,onMouseOver:to,onMouseLeave:no,onClick:di,onKeyDown:Cr,onKeyUp:zi},dn=he.createElement(de.default,(0,ve.Z)({key:"panel"},At,{visible:Ue,forceRender:Ge,onVisibleChanged:function(wn){tr==null||tr(wn)},removeOnLeave:!1,leavedClassName:"".concat(Qe,"-content-wrapper-hidden")}),function(zn,wn){var Ft=zn.className,$t=zn.style;return he.createElement("div",(0,ve.Z)({className:me()("".concat(Qe,"-content-wrapper"),Ft),style:(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},kt),$t),Tn)},(0,z.Z)(Zt,{data:!0})),he.createElement(ie,(0,ve.Z)({id:Jt,containerRef:wn,prefixCls:Qe,className:nn,style:mn},Ct),Zn))}),_n=(0,Ie.Z)({},xt);return tn&&(_n.zIndex=tn),he.createElement(ge.Provider,{value:et},he.createElement("div",{className:me()(Qe,"".concat(Qe,"-").concat(Xe),at,(qe={},(0,ce.Z)(qe,"".concat(Qe,"-open"),Ue),(0,ce.Z)(qe,"".concat(Qe,"-inline"),Re),qe)),style:_n,tabIndex:-1,ref:st,onKeyDown:xo},Pt,he.createElement("div",{tabIndex:0,ref:Dr,style:we,"aria-hidden":"true","data-sentinel":"start"}),dn,he.createElement("div",{tabIndex:0,ref:Mr,style:we,"aria-hidden":"true","data-sentinel":"end"})))}var ke=he.forwardRef(be),Ne=ke,je=function(Xt){var mt=Xt.open,ze=mt===void 0?!1:mt,Be=Xt.prefixCls,qe=Be===void 0?"rc-drawer":Be,Qe=Xt.placement,Ue=Qe===void 0?"right":Qe,Xe=Xt.autoFocus,Re=Xe===void 0?!0:Xe,Ae=Xt.keyboard,Ge=Ae===void 0?!0:Ae,Ke=Xt.width,Ze=Ke===void 0?378:Ke,at=Xt.mask,xt=at===void 0?!0:at,tn=Xt.maskClosable,nn=tn===void 0?!0:tn,Jt=Xt.getContainer,mn=Xt.forceRender,kn=Xt.afterOpenChange,fn=Xt.destroyOnClose,Mn=Xt.onMouseEnter,Zn=Xt.onMouseOver,Tn=Xt.onMouseLeave,ci=Xt.onClick,ai=Xt.onKeyDown,ki=Xt.onKeyUp,Ci=Xt.panelRef,or=he.useState(!1),tr=(0,Te.Z)(or,2),pr=tr[0],cr=tr[1],to=he.useState(!1),no=(0,Te.Z)(to,2),di=no[0],Cr=no[1];(0,_e.Z)(function(){Cr(!0)},[]);var zi=di?ze:!1,st=he.useRef(),Dr=he.useRef();(0,_e.Z)(function(){zi&&(Dr.current=document.activeElement)},[zi]);var Mr=function(co){var cn;if(cr(co),kn==null||kn(co),!co&&Dr.current&&!((cn=st.current)!==null&&cn!==void 0&&cn.contains(Dr.current))){var $e;($e=Dr.current)===null||$e===void 0||$e.focus({preventScroll:!0})}},xo=he.useMemo(function(){return{panel:Ci}},[Ci]);if(!mn&&!pr&&!zi&&fn)return null;var Gr={onMouseEnter:Mn,onMouseOver:Zn,onMouseLeave:Tn,onClick:ci,onKeyDown:ai,onKeyUp:ki},uo=(0,Ie.Z)((0,Ie.Z)({},Xt),{},{open:zi,prefixCls:qe,placement:Ue,autoFocus:Re,keyboard:Ge,width:Ze,mask:xt,maskClosable:nn,inline:Jt===!1,afterOpenChange:Mr,ref:st},Gr);return he.createElement(xe.Provider,{value:xo},he.createElement(Ce.Z,{open:zi||mn||pr,autoDestroy:!1,getContainer:Jt,autoLock:xt&&(zi||pr)},he.createElement(Ne,uo)))},Ve=je,Je=Ve,We=Ee(62892),gt=Ee(36355),ut=Ee(32441),bt=Ee(47729),St=Zt=>{const{prefixCls:Xt,title:mt,footer:ze,extra:Be,closeIcon:qe,closable:Qe,onClose:Ue,headerStyle:Xe,drawerStyle:Re,bodyStyle:Ae,footerStyle:Ge,children:Ke}=Zt,Ze=he.useCallback(Jt=>he.createElement("button",{type:"button",onClick:Ue,"aria-label":"Close",className:`${Xt}-close`},Jt),[Ue]),[at,xt]=(0,bt.Z)(Qe,qe,Ze,void 0,!0),tn=he.useMemo(()=>!mt&&!at?null:he.createElement("div",{style:Xe,className:me()(`${Xt}-header`,{[`${Xt}-header-close-only`]:at&&!mt&&!Be})},he.createElement("div",{className:`${Xt}-header-title`},xt,mt&&he.createElement("div",{className:`${Xt}-title`},mt)),Be&&he.createElement("div",{className:`${Xt}-extra`},Be)),[at,xt,Be,Xe,Xt,mt]),nn=he.useMemo(()=>{if(!ze)return null;const Jt=`${Xt}-footer`;return he.createElement("div",{className:Jt,style:Ge},ze)},[ze,Ge,Xt]);return he.createElement("div",{className:`${Xt}-wrapper-body`,style:Re},tn,he.createElement("div",{className:`${Xt}-body`,style:Ae},Ke),nn)},ct=Ee(33234),Bt=Ee(83116),ht=Ee(37613),dt=Zt=>{const{componentCls:Xt,motionDurationSlow:mt}=Zt,ze={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${mt}`}}};return{[Xt]:{[`${Xt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${mt}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Xt}-panel-motion`]:{"&-left":[ze,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[ze,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[ze,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[ze,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const yt=Zt=>{const{componentCls:Xt,zIndexPopup:mt,colorBgMask:ze,colorBgElevated:Be,motionDurationSlow:qe,motionDurationMid:Qe,padding:Ue,paddingLG:Xe,fontSizeLG:Re,lineHeightLG:Ae,lineWidth:Ge,lineType:Ke,colorSplit:Ze,marginSM:at,colorIcon:xt,colorIconHover:tn,colorText:nn,fontWeightStrong:Jt,footerPaddingBlock:mn,footerPaddingInline:kn}=Zt,fn=`${Xt}-content-wrapper`;return{[Xt]:{position:"fixed",inset:0,zIndex:mt,pointerEvents:"none","&-pure":{position:"relative",background:Be,[`&${Xt}-left`]:{boxShadow:Zt.boxShadowDrawerLeft},[`&${Xt}-right`]:{boxShadow:Zt.boxShadowDrawerRight},[`&${Xt}-top`]:{boxShadow:Zt.boxShadowDrawerUp},[`&${Xt}-bottom`]:{boxShadow:Zt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Xt}-mask`]:{position:"absolute",inset:0,zIndex:mt,background:ze,pointerEvents:"auto"},[fn]:{position:"absolute",zIndex:mt,maxWidth:"100vw",transition:`all ${qe}`,"&-hidden":{display:"none"}},[`&-left > ${fn}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Zt.boxShadowDrawerLeft},[`&-right > ${fn}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Zt.boxShadowDrawerRight},[`&-top > ${fn}`]:{top:0,insetInline:0,boxShadow:Zt.boxShadowDrawerUp},[`&-bottom > ${fn}`]:{bottom:0,insetInline:0,boxShadow:Zt.boxShadowDrawerDown},[`${Xt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Be,pointerEvents:"auto"},[`${Xt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Xt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Ue}px ${Xe}px`,fontSize:Re,lineHeight:Ae,borderBottom:`${Ge}px ${Ke} ${Ze}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Xt}-extra`]:{flex:"none"},[`${Xt}-close`]:{display:"inline-block",marginInlineEnd:at,color:xt,fontWeight:Jt,fontSize:Re,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${Qe}`,textRendering:"auto","&:focus, &:hover":{color:tn,textDecoration:"none"}},[`${Xt}-title`]:{flex:1,margin:0,color:nn,fontWeight:Zt.fontWeightStrong,fontSize:Re,lineHeight:Ae},[`${Xt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Xe,overflow:"auto"},[`${Xt}-footer`]:{flexShrink:0,padding:`${mn}px ${kn}px`,borderTop:`${Ge}px ${Ke} ${Ze}`},"&-rtl":{direction:"rtl"}}}};var Et=(0,Bt.Z)("Drawer",Zt=>{const Xt=(0,ht.TS)(Zt,{});return[yt(Xt),dt(Xt)]},Zt=>({zIndexPopup:Zt.zIndexPopupBase,footerPaddingBlock:Zt.paddingXS,footerPaddingInline:Zt.padding})),vt=Ee(11575),Rt=function(Zt,Xt){var mt={};for(var ze in Zt)Object.prototype.hasOwnProperty.call(Zt,ze)&&Xt.indexOf(ze)<0&&(mt[ze]=Zt[ze]);if(Zt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,ze=Object.getOwnPropertySymbols(Zt);Be<ze.length;Be++)Xt.indexOf(ze[Be])<0&&Object.prototype.propertyIsEnumerable.call(Zt,ze[Be])&&(mt[ze[Be]]=Zt[ze[Be]]);return mt};const jt=null,un={distance:180},Vt=Zt=>{var Xt;const{rootClassName:mt,width:ze,height:Be,size:qe="default",mask:Qe=!0,push:Ue=un,open:Xe,afterOpenChange:Re,onClose:Ae,prefixCls:Ge,getContainer:Ke,style:Ze,className:at,visible:xt,afterVisibleChange:tn}=Zt,nn=Rt(Zt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Jt,getPrefixCls:mn,direction:kn,drawer:fn}=he.useContext(gt.E_),Mn=mn("drawer",Ge),[Zn,Tn]=Et(Mn),ci=Ke===void 0&&Jt?()=>Jt(document.body):Ke,ai=me()({"no-mask":!Qe,[`${Mn}-rtl`]:kn==="rtl"},mt,Tn),ki=he.useMemo(()=>ze!=null?ze:qe==="large"?736:378,[ze,qe]),Ci=he.useMemo(()=>Be!=null?Be:qe==="large"?736:378,[Be,qe]),or={motionName:(0,We.m)(Mn,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},tr=cr=>({motionName:(0,We.m)(Mn,`panel-motion-${cr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),pr=(0,vt.H)();return Zn(he.createElement(ct.BR,null,he.createElement(ut.Ux,{status:!0,override:!0},he.createElement(Je,Object.assign({prefixCls:Mn,onClose:Ae,maskMotion:or,motion:tr},nn,{open:Xe!=null?Xe:xt,mask:Qe,push:Ue,width:ki,height:Ci,style:Object.assign(Object.assign({},fn==null?void 0:fn.style),Ze),className:me()(fn==null?void 0:fn.className,at),rootClassName:ai,getContainer:ci,afterOpenChange:Re!=null?Re:tn,panelRef:pr}),he.createElement(St,Object.assign({prefixCls:Mn},nn,{onClose:Ae}))))))},xn=Zt=>{const{prefixCls:Xt,style:mt,className:ze,placement:Be="right"}=Zt,qe=Rt(Zt,["prefixCls","style","className","placement"]),{getPrefixCls:Qe}=he.useContext(gt.E_),Ue=Qe("drawer",Xt),[Xe,Re]=Et(Ue),Ae=me()(Ue,`${Ue}-pure`,`${Ue}-${Be}`,Re,ze);return Xe(he.createElement("div",{className:Ae,style:mt},he.createElement(St,Object.assign({prefixCls:Ue},qe))))};Vt._InternalPanelDoNotUseOrYouWillBeFired=xn;var Ut=Vt},91857:function(Pn,qt,Ee){"use strict";var Le=Ee(59301),me=Ee(38819),Ie=Ee(92310),Te=Ee.n(Ie),Ce=Ee(31561),_e=Ee(70425),he=Ee(18929),Se=Ee(2738),xe=Ee(79676),ge=Ee(53487),ce=Ee(92343),ve=Ee(36355),de=Ee(20834),ue=Ee(40875),z=Ee(88088),ee=Ee(47211);const oe=null,ie=we=>{const{menu:be,arrow:ke,prefixCls:Ne,children:je,trigger:Ve,disabled:Je,dropdownRender:We,getPopupContainer:gt,overlayClassName:ut,rootClassName:bt,open:rt,onOpenChange:St,visible:ct,onVisibleChange:Bt,mouseEnterDelay:ht=.15,mouseLeaveDelay:it=.1,autoAdjustOverflow:dt=!0,placement:yt="",overlay:Et,transitionName:vt}=we,{getPopupContainer:Rt,getPrefixCls:jt,direction:un}=Le.useContext(ve.E_),Vt=Le.useMemo(()=>{const at=jt();return vt!==void 0?vt:yt.includes("top")?`${at}-slide-down`:`${at}-slide-up`},[jt,yt,vt]),xn=Le.useMemo(()=>yt?yt.includes("Center")?yt.slice(0,yt.indexOf("Center")):yt:un==="rtl"?"bottomRight":"bottomLeft",[yt,un]),Ut=jt("dropdown",Ne),[Zt,Xt]=(0,ee.Z)(Ut),[,mt]=(0,z.Z)(),ze=Le.Children.only(je),Be=(0,ce.Tm)(ze,{className:Te()(`${Ut}-trigger`,{[`${Ut}-rtl`]:un==="rtl"},ze.props.className),disabled:Je}),qe=Je?[]:Ve;let Qe;qe&&qe.includes("contextMenu")&&(Qe=!0);const[Ue,Xe]=(0,he.Z)(!1,{value:rt!=null?rt:ct}),Re=(0,_e.useEvent)(at=>{St==null||St(at),Bt==null||Bt(at),Xe(at)}),Ae=Te()(ut,bt,Xt,{[`${Ut}-rtl`]:un==="rtl"}),Ge=(0,xe.Z)({arrowPointAtCenter:typeof ke=="object"&&ke.pointAtCenter,autoAdjustOverflow:dt,offset:mt.marginXXS,arrowWidth:ke?mt.sizePopupArrow:0,borderRadius:mt.borderRadius}),Ke=Le.useCallback(()=>{Xe(!1)},[]),Ze=()=>{let at;return be!=null&&be.items?at=Le.createElement(de.default,Object.assign({},be)):typeof Et=="function"?at=Et():at=Et,We&&(at=We(at)),at=Le.Children.only(typeof at=="string"?Le.createElement("span",null,at):at),Le.createElement(ue.J,{prefixCls:`${Ut}-menu`,expandIcon:Le.createElement("span",{className:`${Ut}-menu-submenu-arrow`},Le.createElement(me.Z,{className:`${Ut}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Ke,validator:xt=>{let{mode:tn}=xt}},at)};return Zt(Le.createElement(Ce.Z,Object.assign({alignPoint:Qe},(0,Se.Z)(we,["rootClassName"]),{mouseEnterDelay:ht,mouseLeaveDelay:it,visible:Ue,builtinPlacements:Ge,arrow:!!ke,overlayClassName:Ae,prefixCls:Ut,getPopupContainer:gt||Rt,transitionName:Vt,trigger:qe,overlay:Ze,placement:xn,onVisibleChange:Re}),Be))};function se(we){return Object.assign(Object.assign({},we),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const le=(0,ge.Z)(ie,"dropdown",we=>we,se),ye=we=>Le.createElement(le,Object.assign({},we),Le.createElement("span",null));ie._InternalPanelDoNotUseOrYouWillBeFired=ye,qt.Z=ie},38854:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return z}});var Le=Ee(91857),me=Ee(92310),Ie=Ee.n(me),Te=Ee(59301),Ce=Ee(18785),_e=Ee(3113),he=Ee(36355),Se=Ee(81327),xe=Ee(33234),ge=Ee(47211),ce=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 le=0,se=Object.getOwnPropertySymbols(ee);le<se.length;le++)oe.indexOf(se[le])<0&&Object.prototype.propertyIsEnumerable.call(ee,se[le])&&(ie[se[le]]=ee[se[le]]);return ie};const ve=ee=>{const{getPopupContainer:oe,getPrefixCls:ie,direction:se}=Te.useContext(he.E_),{prefixCls:le,type:ye="default",danger:we,disabled:be,loading:ke,onClick:Ne,htmlType:je,children:Ve,className:Je,menu:We,arrow:gt,autoFocus:ut,overlay:bt,trigger:rt,align:St,open:ct,onOpenChange:Bt,placement:ht,getPopupContainer:it,href:dt,icon:yt=Te.createElement(Ce.Z,null),title:Et,buttonsRender:vt=Ze=>Ze,mouseEnterDelay:Rt,mouseLeaveDelay:jt,overlayClassName:un,overlayStyle:Vt,destroyPopupOnHide:xn,dropdownRender:Ut}=ee,Zt=ce(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"]),Xt=ie("dropdown",le),mt=`${Xt}-button`,[ze,Be]=(0,ge.Z)(Xt),qe={menu:We,arrow:gt,autoFocus:ut,align:St,disabled:be,trigger:be?[]:rt,onOpenChange:Bt,getPopupContainer:it||oe,mouseEnterDelay:Rt,mouseLeaveDelay:jt,overlayClassName:un,overlayStyle:Vt,destroyPopupOnHide:xn,dropdownRender:Ut},{compactSize:Qe,compactItemClassnames:Ue}=(0,xe.ri)(Xt,se),Xe=Ie()(mt,Ue,Je,Be);"overlay"in ee&&(qe.overlay=bt),"open"in ee&&(qe.open=ct),"placement"in ee?qe.placement=ht:qe.placement=se==="rtl"?"bottomLeft":"bottomRight";const Re=Te.createElement(_e.ZP,{type:ye,danger:we,disabled:be,loading:ke,onClick:Ne,htmlType:je,href:dt,title:Et},Ve),Ae=Te.createElement(_e.ZP,{type:ye,danger:we,icon:yt}),[Ge,Ke]=vt([Re,Ae]);return ze(Te.createElement(Se.Z.Compact,Object.assign({className:Xe,size:Qe,block:!0},Zt),Ge,Te.createElement(Le.Z,Object.assign({},qe),Ke)))};ve.__ANT_BUTTON=!0;var de=ve;const ue=Le.Z;ue.Button=de;var z=ue},47211:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return ce}});var Le=Ee(17313),me=Ee(13826),Ie=Ee(92899),Te=Ee(29878),Ce=Ee(19447),_e=Ee(83116),he=Ee(37613),xe=ve=>{const{componentCls:de,menuCls:ue,colorError:z,colorTextLightSolid:ee}=ve,oe=`${ue}-item`;return{[`${de}, ${de}-menu-submenu`]:{[`${ue} ${oe}`]:{[`&${oe}-danger:not(${oe}-disabled)`]:{color:z,"&:hover":{color:ee,backgroundColor:z}}}}}};const ge=ve=>{const{componentCls:de,menuCls:ue,zIndexPopup:z,dropdownArrowDistance:ee,sizePopupArrow:oe,antCls:ie,iconCls:se,motionDurationMid:le,dropdownPaddingVertical:ye,fontSize:we,dropdownEdgeChildPadding:be,colorTextDisabled:ke,fontSizeIcon:Ne,controlPaddingHorizontal:je,colorBgElevated:Ve}=ve;return[{[de]:Object.assign(Object.assign({},(0,Le.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:Ne}},[`${de}-wrap`]:{position:"relative",[`${ie}-btn > ${se}-down`]:{fontSize:Ne},[`${se}-down::before`]:{transition:`transform ${le}`}},[`${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:Ve,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${de} ${ue}`]:{position:"relative",margin:0},[`${ue}-submenu-popup`]:{position:"absolute",zIndex:z,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${de}, ${de}-menu-submenu`]:{[ue]:Object.assign(Object.assign({padding:be,listStyleType:"none",backgroundColor:Ve,backgroundClip:"padding-box",borderRadius:ve.borderRadiusLG,outline:"none",boxShadow:ve.boxShadowSecondary},(0,Le.Qy)(ve)),{[`${ue}-item-group-title`]:{padding:`${ye}px ${je}px`,color:ve.colorTextDescription,transition:`all ${le}`},[`${ue}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ue}-item-icon`]:{minWidth:we,marginInlineEnd:ve.marginXS,fontSize:ve.fontSizeSM},[`${ue}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${le}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ue}-item, ${ue}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${ye}px ${je}px`,color:ve.colorText,fontWeight:"normal",fontSize:we,lineHeight:ve.lineHeight,cursor:"pointer",transition:`all ${le}`,borderRadius:ve.borderRadiusSM,"&:hover, &-active":{backgroundColor:ve.controlItemBgHover}},(0,Le.Qy)(ve)),{"&-selected":{color:ve.colorPrimary,backgroundColor:ve.controlItemBgActive,"&:hover, &-active":{backgroundColor:ve.controlItemBgActiveHover}},"&-disabled":{color:ke,cursor:"not-allowed","&:hover":{color:ke,backgroundColor:Ve,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:Ne,fontStyle:"normal"}}}),[`${ue}-item-group-list`]:{margin:`0 ${ve.marginXS}px`,padding:0,listStyle:"none"},[`${ue}-submenu-title`]:{paddingInlineEnd:je+ve.fontSizeSM},[`${ue}-submenu-vertical`]:{position:"relative"},[`${ue}-submenu${ue}-submenu-disabled ${de}-menu-submenu-title`]:{[`&, ${de}-menu-submenu-arrow-icon`]:{color:ke,backgroundColor:Ve,cursor:"not-allowed"}},[`${ue}-submenu-selected ${de}-menu-submenu-title`]:{color:ve.colorPrimary}})}},[(0,me.oN)(ve,"slide-up"),(0,me.oN)(ve,"slide-down"),(0,Ie.Fm)(ve,"move-up"),(0,Ie.Fm)(ve,"move-down"),(0,Te._y)(ve,"zoom-big")]]};var ce=(0,_e.Z)("Dropdown",(ve,de)=>{let{rootPrefixCls:ue}=de;const{marginXXS:z,sizePopupArrow:ee,controlHeight:oe,fontSize:ie,lineHeight:se,paddingXXS:le,componentCls:ye,borderRadiusLG:we}=ve,be=(oe-ie*se)/2,{dropdownArrowOffset:ke}=(0,Ce.fS)({contentRadius:we}),Ne=(0,he.TS)(ve,{menuCls:`${ye}-menu`,rootPrefixCls:ue,dropdownArrowDistance:ee/2+z,dropdownArrowOffset:ke,dropdownPaddingVertical:be,dropdownEdgeChildPadding:le});return[ge(Ne),xe(Ne)]},ve=>({zIndexPopup:ve.zIndexPopupBase+50}))},64165:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return le}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(59301),Te=Ee(36355),Ce=Ee(9763),_e=Ee(64993),he=Ee(88088),xe=()=>{const[,ye]=(0,he.Z)(),be=new _e.C(ye.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Ie.createElement("svg",{style:be,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Ie.createElement("g",{fill:"none",fillRule:"evenodd"},Ie.createElement("g",{transform:"translate(24 31.67)"},Ie.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Ie.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"}),Ie.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)"}),Ie.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"}),Ie.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"})),Ie.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"}),Ie.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Ie.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Ie.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},ce=()=>{const[,ye]=(0,he.Z)(),{colorFill:we,colorFillTertiary:be,colorFillQuaternary:ke,colorBgContainer:Ne}=ye,{borderColor:je,shadowColor:Ve,contentColor:Je}=(0,Ie.useMemo)(()=>({borderColor:new _e.C(we).onBackground(Ne).toHexShortString(),shadowColor:new _e.C(be).onBackground(Ne).toHexShortString(),contentColor:new _e.C(ke).onBackground(Ne).toHexShortString()}),[we,be,ke,Ne]);return Ie.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Ie.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Ie.createElement("ellipse",{fill:Ve,cx:"32",cy:"33",rx:"32",ry:"7"}),Ie.createElement("g",{fillRule:"nonzero",stroke:je},Ie.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"}),Ie.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:Je}))))},ve=Ee(83116),de=Ee(37613);const ue=ye=>{const{componentCls:we,margin:be,marginXS:ke,marginXL:Ne,fontSize:je,lineHeight:Ve}=ye;return{[we]:{marginInline:ke,fontSize:je,lineHeight:Ve,textAlign:"center",[`${we}-image`]:{height:ye.emptyImgHeight,marginBottom:ke,opacity:ye.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${we}-description`]:{color:ye.colorText},[`${we}-footer`]:{marginTop:be},"&-normal":{marginBlock:Ne,color:ye.colorTextDisabled,[`${we}-description`]:{color:ye.colorTextDisabled},[`${we}-image`]:{height:ye.emptyImgHeightMD}},"&-small":{marginBlock:ke,color:ye.colorTextDisabled,[`${we}-image`]:{height:ye.emptyImgHeightSM}}}}};var z=(0,ve.Z)("Empty",ye=>{const{componentCls:we,controlHeightLG:be}=ye,ke=(0,de.TS)(ye,{emptyImgCls:`${we}-img`,emptyImgHeight:be*2.5,emptyImgHeightMD:be,emptyImgHeightSM:be*.875});return[ue(ke)]}),ee=function(ye,we){var be={};for(var ke in ye)Object.prototype.hasOwnProperty.call(ye,ke)&&we.indexOf(ke)<0&&(be[ke]=ye[ke]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,ke=Object.getOwnPropertySymbols(ye);Ne<ke.length;Ne++)we.indexOf(ke[Ne])<0&&Object.prototype.propertyIsEnumerable.call(ye,ke[Ne])&&(be[ke[Ne]]=ye[ke[Ne]]);return be};const oe=Ie.createElement(xe,null),ie=Ie.createElement(ce,null),se=ye=>{var{className:we,rootClassName:be,prefixCls:ke,image:Ne=oe,description:je,children:Ve,imageStyle:Je,style:We}=ye,gt=ee(ye,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ut,direction:bt,empty:rt}=Ie.useContext(Te.E_),St=ut("empty",ke),[ct,Bt]=z(St),[ht]=(0,Ce.Z)("Empty"),it=typeof je!="undefined"?je:ht==null?void 0:ht.description,dt=typeof it=="string"?it:"empty";let yt=null;return typeof Ne=="string"?yt=Ie.createElement("img",{alt:dt,src:Ne}):yt=Ne,ct(Ie.createElement("div",Object.assign({className:me()(Bt,St,rt==null?void 0:rt.className,{[`${St}-normal`]:Ne===ie,[`${St}-rtl`]:bt==="rtl"},we,be),style:Object.assign(Object.assign({},rt==null?void 0:rt.style),We)},gt),Ie.createElement("div",{className:`${St}-image`,style:Je},yt),it&&Ie.createElement("div",{className:`${St}-description`},it),Ve&&Ie.createElement("div",{className:`${St}-footer`},Ve)))};se.PRESENTED_IMAGE_DEFAULT=oe,se.PRESENTED_IMAGE_SIMPLE=ie;var le=se},78241:function(Pn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return tt}});var Le=Ee(26407),me=Ee(92310),Ie=Ee.n(me),Te=Ee(77900),Ce=Ee(59301),_e=Ee(62892),he=Ee(32441);function Se(et){const[Pt,At]=Ce.useState(et);return Ce.useEffect(()=>{const kt=setTimeout(()=>{At(et)},et.length?0:10);return()=>{clearTimeout(kt)}},[et]),Pt}var xe=Ee(17313),ge=Ee(29878),ce=Ee(8378),ve=Ee(37613),de=Ee(83116),z=et=>{const{componentCls:Pt}=et,At=`${Pt}-show-help`,kt=`${Pt}-show-help-item`;return{[At]:{transition:`opacity ${et.motionDurationSlow} ${et.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[kt]:{overflow:"hidden",transition:`height ${et.motionDurationSlow} ${et.motionEaseInOut},
|
|
|
opacity ${et.motionDurationSlow} ${et.motionEaseInOut},
|
|
|
transform ${et.motionDurationSlow} ${et.motionEaseInOut} !important`,[`&${kt}-appear, &${kt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${kt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=et=>({legend:{display:"block",width:"100%",marginBottom:et.marginLG,padding:0,color:et.colorTextDescription,fontSize:et.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${et.lineWidth}px ${et.lineType} ${et.colorBorder}`},label:{fontSize:et.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 ${et.controlOutlineWidth}px ${et.controlOutline}`},output:{display:"block",paddingTop:15,color:et.colorText,fontSize:et.fontSize,lineHeight:et.lineHeight}}),oe=(et,Pt)=>{const{formItemCls:At}=et;return{[At]:{[`${At}-label > label`]:{height:Pt},[`${At}-control-input`]:{minHeight:Pt}}}},ie=et=>{const{componentCls:Pt}=et;return{[et.componentCls]:Object.assign(Object.assign(Object.assign({},(0,xe.Wf)(et)),ee(et)),{[`${Pt}-text`]:{display:"inline-block",paddingInlineEnd:et.paddingSM},"&-small":Object.assign({},oe(et,et.controlHeightSM)),"&-large":Object.assign({},oe(et,et.controlHeightLG))})}},se=et=>{const{formItemCls:Pt,iconCls:At,componentCls:kt,rootPrefixCls:Ct,labelRequiredMarkColor:dn,labelColor:_n,labelFontSize:zn,labelHeight:wn,labelColonMarginInlineStart:Ft,labelColonMarginInlineEnd:$t,itemMarginBottom:bn}=et;return{[Pt]:Object.assign(Object.assign({},(0,xe.Wf)(et)),{marginBottom:bn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${Ct}-row`]:{display:"none"},"&-has-warning":{[`${Pt}-split`]:{color:et.colorError}},"&-has-error":{[`${Pt}-split`]:{color:et.colorWarning}},[`${Pt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${et.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:wn,color:_n,fontSize:zn,[`> ${At}`]:{fontSize:et.fontSize,verticalAlign:"top"},[`&${Pt}-required:not(${Pt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:et.marginXXS,color:dn,fontSize:et.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${kt}-hide-required-mark &`]:{display:"none"}},[`${Pt}-optional`]:{display:"inline-block",marginInlineStart:et.marginXXS,color:et.colorTextDescription,[`${kt}-hide-required-mark &`]:{display:"none"}},[`${Pt}-tooltip`]:{color:et.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:et.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Ft,marginInlineEnd:$t},[`&${Pt}-no-colon::after`]:{content:'"\\a0"'}}},[`${Pt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Ct}-col-'"]):not([class*="' ${Ct}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:et.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Pt]:{"&-explain, &-extra":{clear:"both",color:et.colorTextDescription,fontSize:et.fontSize,lineHeight:et.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:et.controlHeightSM,transition:`color ${et.motionDurationMid} ${et.motionEaseOut}`},"&-explain":{"&-error":{color:et.colorError},"&-warning":{color:et.colorWarning}}},[`&-with-help ${Pt}-explain`]:{height:"auto",opacity:1},[`${Pt}-feedback-icon`]:{fontSize:et.fontSize,textAlign:"center",visibility:"visible",animationName:ge.kr,animationDuration:et.motionDurationMid,animationTimingFunction:et.motionEaseOutBack,pointerEvents:"none","&-success":{color:et.colorSuccess},"&-error":{color:et.colorError},"&-warning":{color:et.colorWarning},"&-validating":{color:et.colorPrimary}}})}},le=et=>{const{componentCls:Pt,formItemCls:At}=et;return{[`${Pt}-horizontal`]:{[`${At}-label`]:{flexGrow:0},[`${At}-control`]:{flex:"1 1 0",minWidth:0},[`${At}-label[class$='-24'], ${At}-label[class*='-24 ']`]:{[`& + ${At}-control`]:{minWidth:"unset"}}}}},ye=et=>{const{componentCls:Pt,formItemCls:At}=et;return{[`${Pt}-inline`]:{display:"flex",flexWrap:"wrap",[At]:{flex:"none",marginInlineEnd:et.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${At}-label,
|
|
|
> ${At}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${At}-label`]:{flex:"none"},[`${Pt}-text`]:{display:"inline-block"},[`${At}-has-feedback`]:{display:"inline-block"}}}}},we=et=>({padding:et.verticalLabelPadding,margin:et.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),be=et=>{const{componentCls:Pt,formItemCls:At,rootPrefixCls:kt}=et;return{[`${At} ${At}-label`]:we(et),[Pt]:{[At]:{flexWrap:"wrap",[`${At}-label, ${At}-control`]:{[`&:not([class*=" ${kt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ke=et=>{const{componentCls:Pt,formItemCls:At,rootPrefixCls:kt}=et;return{[`${Pt}-vertical`]:{[At]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${Pt}-item-control`]:{width:"100%"}}},[`${Pt}-vertical ${At}-label,
|
|
|
.${kt}-col-24${At}-label,
|
|
|
.${kt}-col-xl-24${At}-label`]:we(et),[`@media (max-width: ${et.screenXSMax}px)`]:[be(et),{[Pt]:{[`.${kt}-col-xs-24${At}-label`]:we(et)}}],[`@media (max-width: ${et.screenSMMax}px)`]:{[Pt]:{[`.${kt}-col-sm-24${At}-label`]:we(et)}},[`@media (max-width: ${et.screenMDMax}px)`]:{[Pt]:{[`.${kt}-col-md-24${At}-label`]:we(et)}},[`@media (max-width: ${et.screenLGMax}px)`]:{[Pt]:{[`.${kt}-col-lg-24${At}-label`]:we(et)}}}},Ne=(et,Pt)=>(0,ve.TS)(et,{formItemCls:`${et.componentCls}-item`,rootPrefixCls:Pt});var je=(0,de.Z)("Form",(et,Pt)=>{let{rootPrefixCls:At}=Pt;const kt=Ne(et,At);return[ie(kt),se(kt),z(kt),le(kt),ye(kt),ke(kt),(0,ce.Z)(kt),ge.kr]},et=>({labelRequiredMarkColor:et.colorError,labelColor:et.colorTextHeading,labelFontSize:et.fontSize,labelHeight:et.controlHeight,labelColonMarginInlineStart:et.marginXXS/2,labelColonMarginInlineEnd:et.marginXS,itemMarginBottom:et.marginLG,verticalLabelPadding:`0 0 ${et.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Ve=[];function Je(et,Pt,At){let kt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof et=="string"?et:`${Pt}-${kt}`,error:et,errorStatus:At}}var gt=et=>{let{help:Pt,helpStatus:At,errors:kt=Ve,warnings:Ct=Ve,className:dn,fieldId:_n,onVisibleChanged:zn}=et;const{prefixCls:wn}=Ce.useContext(he.Rk),Ft=`${wn}-item-explain`,[,$t]=je(wn),bn=(0,Ce.useMemo)(()=>(0,_e.Z)(wn),[wn]),An=Se(kt),Gt=Se(Ct),sn=Ce.useMemo(()=>Pt!=null?[Je(Pt,"help",At)]:[].concat((0,Le.Z)(An.map((Nn,qn)=>Je(Nn,"error","error",qn))),(0,Le.Z)(Gt.map((Nn,qn)=>Je(Nn,"warning","warning",qn)))),[Pt,At,An,Gt]),Bn={};return _n&&(Bn.id=`${_n}_help`),Ce.createElement(Te.default,{motionDeadline:bn.motionDeadline,motionName:`${wn}-show-help`,visible:!!sn.length,onVisibleChanged:zn},Nn=>{const{className:qn,style:Gn}=Nn;return Ce.createElement("div",Object.assign({},Bn,{className:Ie()(Ft,qn,dn,$t),style:Gn,role:"alert"}),Ce.createElement(Te.CSSMotionList,Object.assign({keys:sn},(0,_e.Z)(wn),{motionName:`${wn}-show-help-item`,component:!1}),Jn=>{const{key:Dn,error:ri,errorStatus:Mi,className:Hn,style:oi}=Jn;return Ce.createElement("div",{key:Dn,className:Ie()(Hn,{[`${Ft}-${Mi}`]:Mi}),style:oi},ri)}))})},ut=Ee(95013),bt=Ee(36355),rt=Ee(1684),St=Ee(52946),ct=Ee(19716),Bt=Ee(16722);const ht=["parentNode"],it="form_item";function dt(et){return et===void 0||et===!1?[]:Array.isArray(et)?et:[et]}function yt(et,Pt){if(!et.length)return;const At=et.join("_");return Pt?`${Pt}_${At}`:ht.includes(At)?`${it}_${At}`:At}function Et(et,Pt,At,kt,Ct,dn){let _n=kt;return dn!==void 0?_n=dn:At.validating?_n="validating":et.length?_n="error":Pt.length?_n="warning":(At.touched||Ct&&At.validated)&&(_n="success"),_n}function vt(et){return dt(et).join("_")}function Rt(et){const[Pt]=(0,ut.useForm)(),At=Ce.useRef({}),kt=Ce.useMemo(()=>et!=null?et:Object.assign(Object.assign({},Pt),{__INTERNAL__:{itemRef:Ct=>dn=>{const _n=vt(Ct);dn?At.current[_n]=dn:delete At.current[_n]}},scrollToField:function(Ct){let dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const _n=dt(Ct),zn=yt(_n,kt.__INTERNAL__.name),wn=zn?document.getElementById(zn):null;wn&&(0,Bt.Z)(wn,Object.assign({scrollMode:"if-needed",block:"nearest"},dn))},getFieldInstance:Ct=>{const dn=vt(Ct);return At.current[dn]}}),[et,Pt]);return[kt]}var jt=Ee(28726),un=function(et,Pt){var At={};for(var kt in et)Object.prototype.hasOwnProperty.call(et,kt)&&Pt.indexOf(kt)<0&&(At[kt]=et[kt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,kt=Object.getOwnPropertySymbols(et);Ct<kt.length;Ct++)Pt.indexOf(kt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(et,kt[Ct])&&(At[kt[Ct]]=et[kt[Ct]]);return At};const Vt=(et,Pt)=>{const At=Ce.useContext(rt.Z),{getPrefixCls:kt,direction:Ct,form:dn}=Ce.useContext(bt.E_),{prefixCls:_n,className:zn,rootClassName:wn,size:Ft,disabled:$t=At,form:bn,colon:An,labelAlign:Gt,labelWrap:sn,labelCol:Bn,wrapperCol:Nn,hideRequiredMark:qn,layout:Gn="horizontal",scrollToFirstError:Jn,requiredMark:Dn,onFinishFailed:ri,name:Mi,style:Hn,feedbackIcons:oi}=et,Bi=un(et,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),lr=(0,ct.Z)(Ft),Ai=Ce.useContext(jt.Z),an=(0,Ce.useMemo)(()=>Dn!==void 0?Dn:dn&&dn.requiredMark!==void 0?dn.requiredMark:!qn,[qn,Dn,dn]),si=An!=null?An:dn==null?void 0:dn.colon,wi=kt("form",_n),[pi,Wi]=je(wi),Ni=Ie()(wi,`${wi}-${Gn}`,{[`${wi}-hide-required-mark`]:an===!1,[`${wi}-rtl`]:Ct==="rtl",[`${wi}-${lr}`]:lr},Wi,dn==null?void 0:dn.className,zn,wn),[hr]=Rt(bn),{__INTERNAL__:Fi}=hr;Fi.name=Mi;const Ki=(0,Ce.useMemo)(()=>({name:Mi,labelAlign:Gt,labelCol:Bn,labelWrap:sn,wrapperCol:Nn,vertical:Gn==="vertical",colon:si,requiredMark:an,itemRef:Fi.itemRef,form:hr,feedbackIcons:oi}),[Mi,Gt,Bn,Nn,Gn,si,an,hr,oi]);Ce.useImperativeHandle(Pt,()=>hr);const _r=(Jr,In)=>{if(Jr){let Sr={block:"nearest"};typeof Jr=="object"&&(Sr=Jr),hr.scrollToField(In,Sr)}},On=Jr=>{if(ri==null||ri(Jr),Jr.errorFields.length){const In=Jr.errorFields[0].name;if(Jn!==void 0){_r(Jn,In);return}dn&&dn.scrollToFirstError!==void 0&&_r(dn.scrollToFirstError,In)}};return pi(Ce.createElement(rt.n,{disabled:$t},Ce.createElement(St.q,{size:lr},Ce.createElement(he.RV,Object.assign({},{validateMessages:Ai}),Ce.createElement(he.q3.Provider,{value:Ki},Ce.createElement(ut.default,Object.assign({id:Mi},Bi,{name:Mi,onFinishFailed:On,form:hr,style:Object.assign(Object.assign({},dn==null?void 0:dn.style),Hn),className:Ni})))))))};var Ut=Ce.forwardRef(Vt),Zt=Ee(41799),Xt=Ee(8654),mt=Ee(92343),ze=Ee(11592);function Be(et){if(typeof et=="function")return et;const Pt=(0,ze.Z)(et);return Pt.length<=1?Pt[0]:Pt}const qe=()=>{const{status:et,errors:Pt=[],warnings:At=[]}=(0,Ce.useContext)(he.aM);return{status:et,errors:Pt,warnings:At}};qe.Context=he.aM;var Qe=qe,Ue=Ee(16089);function Xe(et){const[Pt,At]=Ce.useState(et),kt=(0,Ce.useRef)(null),Ct=(0,Ce.useRef)([]),dn=(0,Ce.useRef)(!1);Ce.useEffect(()=>(dn.current=!1,()=>{dn.current=!0,Ue.Z.cancel(kt.current),kt.current=null}),[]);function _n(zn){dn.current||(kt.current===null&&(Ct.current=[],kt.current=(0,Ue.Z)(()=>{kt.current=null,At(wn=>{let Ft=wn;return Ct.current.forEach($t=>{Ft=$t(Ft)}),Ft})})),Ct.current.push(zn))}return[Pt,_n]}function Re(){const{itemRef:et}=Ce.useContext(he.q3),Pt=Ce.useRef({});function At(kt,Ct){const dn=Ct&&typeof Ct=="object"&&Ct.ref,_n=kt.join("_");return(Pt.current.name!==_n||Pt.current.originRef!==dn)&&(Pt.current.name=_n,Pt.current.originRef=dn,Pt.current.ref=(0,Xt.sQ)(et(kt),dn)),Pt.current.ref}return At}var Ae=Ee(29194),Ge=Ee(34280),Ke=Ee(2738),Ze=Ee(27382),at=Ee(37028);const xt=et=>{const{formItemCls:Pt}=et;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Pt}-control`]:{display:"flex"}}}};var tn=(0,de.b)(["Form","item-item"],(et,Pt)=>{let{rootPrefixCls:At}=Pt;const kt=Ne(et,At);return[xt(kt)]}),Jt=et=>{const{prefixCls:Pt,status:At,wrapperCol:kt,children:Ct,errors:dn,warnings:_n,_internalItemRender:zn,extra:wn,help:Ft,fieldId:$t,marginBottom:bn,onErrorVisibleChanged:An}=et,Gt=`${Pt}-item`,sn=Ce.useContext(he.q3),Bn=kt||sn.wrapperCol||{},Nn=Ie()(`${Gt}-control`,Bn.className),qn=Ce.useMemo(()=>Object.assign({},sn),[sn]);delete qn.labelCol,delete qn.wrapperCol;const Gn=Ce.createElement("div",{className:`${Gt}-control-input`},Ce.createElement("div",{className:`${Gt}-control-input-content`},Ct)),Jn=Ce.useMemo(()=>({prefixCls:Pt,status:At}),[Pt,At]),Dn=bn!==null||dn.length||_n.length?Ce.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},Ce.createElement(he.Rk.Provider,{value:Jn},Ce.createElement(gt,{fieldId:$t,errors:dn,warnings:_n,help:Ft,helpStatus:At,className:`${Gt}-explain-connected`,onVisibleChanged:An})),!!bn&&Ce.createElement("div",{style:{width:0,height:bn}})):null,ri={};$t&&(ri.id=`${$t}_extra`);const Mi=wn?Ce.createElement("div",Object.assign({},ri,{className:`${Gt}-extra`}),wn):null,Hn=zn&&zn.mark==="pro_table_render"&&zn.render?zn.render(et,{input:Gn,errorList:Dn,extra:Mi}):Ce.createElement(Ce.Fragment,null,Gn,Dn,Mi);return Ce.createElement(he.q3.Provider,{value:qn},Ce.createElement(at.Z,Object.assign({},Bn,{className:Nn}),Hn),Ce.createElement(tn,{prefixCls:Pt}))},mn=Ee(61485),kn=Ee(31724),fn=Ee(9763),Mn=Ee(6848),Zn=function(et,Pt){var At={};for(var kt in et)Object.prototype.hasOwnProperty.call(et,kt)&&Pt.indexOf(kt)<0&&(At[kt]=et[kt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,kt=Object.getOwnPropertySymbols(et);Ct<kt.length;Ct++)Pt.indexOf(kt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(et,kt[Ct])&&(At[kt[Ct]]=et[kt[Ct]]);return At};function Tn(et){return et?typeof et=="object"&&!Ce.isValidElement(et)?et:{title:et}:null}var ai=et=>{let{prefixCls:Pt,label:At,htmlFor:kt,labelCol:Ct,labelAlign:dn,colon:_n,required:zn,requiredMark:wn,tooltip:Ft}=et;var $t;const[bn]=(0,fn.Z)("Form"),{vertical:An,labelAlign:Gt,labelCol:sn,labelWrap:Bn,colon:Nn}=Ce.useContext(he.q3);if(!At)return null;const qn=Ct||sn||{},Gn=dn||Gt,Jn=`${Pt}-item-label`,Dn=Ie()(Jn,Gn==="left"&&`${Jn}-left`,qn.className,{[`${Jn}-wrap`]:!!Bn});let ri=At;const Mi=_n===!0||Nn!==!1&&_n!==!1;Mi&&!An&&typeof At=="string"&&At.trim()!==""&&(ri=At.replace(/[:|:]\s*$/,""));const oi=Tn(Ft);if(oi){const{icon:an=Ce.createElement(mn.Z,null)}=oi,si=Zn(oi,["icon"]),wi=Ce.createElement(Mn.Z,Object.assign({},si),Ce.cloneElement(an,{className:`${Pt}-item-tooltip`,title:""}));ri=Ce.createElement(Ce.Fragment,null,ri,wi)}const Bi=wn==="optional",lr=typeof wn=="function";lr?ri=wn(ri,{required:!!zn}):Bi&&!zn&&(ri=Ce.createElement(Ce.Fragment,null,ri,Ce.createElement("span",{className:`${Pt}-item-optional`,title:""},(bn==null?void 0:bn.optional)||(($t=kn.Z.Form)===null||$t===void 0?void 0:$t.optional))));const Ai=Ie()({[`${Pt}-item-required`]:zn,[`${Pt}-item-required-mark-optional`]:Bi||lr,[`${Pt}-item-no-colon`]:!Mi});return Ce.createElement(at.Z,Object.assign({},qn,{className:Dn}),Ce.createElement("label",{htmlFor:kt,className:Ai,title:typeof At=="string"?At:""},ri))},ki=Ee(29679),Ci=Ee(19248),or=Ee(96512),tr=Ee(58617);const pr={success:ki.Z,warning:or.Z,error:Ci.Z,validating:tr.Z};function cr(et){let{children:Pt,errors:At,warnings:kt,hasFeedback:Ct,validateStatus:dn,prefixCls:_n,meta:zn,noStyle:wn}=et;const Ft=`${_n}-item`,{feedbackIcons:$t}=Ce.useContext(he.q3),bn=Et(At,kt,zn,null,!!Ct,dn),{isFormItemInput:An,status:Gt}=Ce.useContext(he.aM),sn=Ce.useMemo(()=>{var Bn;let Nn;if(Ct){const Jn=Ct!==!0&&Ct.icons||$t,Dn=bn&&((Bn=Jn==null?void 0:Jn({status:bn,errors:At,warnings:kt}))===null||Bn===void 0?void 0:Bn[bn]),ri=bn&&pr[bn];Nn=Dn!==!1&&ri?Ce.createElement("span",{className:Ie()(`${Ft}-feedback-icon`,`${Ft}-feedback-icon-${bn}`)},Dn||Ce.createElement(ri,null)):null}let qn=!0,Gn=bn||"";return wn&&(qn=An,Gn=(bn!=null?bn:Gt)||""),{status:Gn,errors:At,warnings:kt,hasFeedback:!!Ct,feedbackIcon:Nn,isFormItemInput:qn}},[bn,Ct,wn,An,Gt]);return Ce.createElement(he.aM.Provider,{value:sn},Pt)}var to=function(et,Pt){var At={};for(var kt in et)Object.prototype.hasOwnProperty.call(et,kt)&&Pt.indexOf(kt)<0&&(At[kt]=et[kt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,kt=Object.getOwnPropertySymbols(et);Ct<kt.length;Ct++)Pt.indexOf(kt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(et,kt[Ct])&&(At[kt[Ct]]=et[kt[Ct]]);return At};function no(et){const{prefixCls:Pt,className:At,rootClassName:kt,style:Ct,help:dn,errors:_n,warnings:zn,validateStatus:wn,meta:Ft,hasFeedback:$t,hidden:bn,children:An,fieldId:Gt,required:sn,isRequired:Bn,onSubItemMetaChange:Nn}=et,qn=to(et,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Gn=`${Pt}-item`,{requiredMark:Jn}=Ce.useContext(he.q3),Dn=Ce.useRef(null),ri=Se(_n),Mi=Se(zn),Hn=dn!=null,oi=!!(Hn||_n.length||zn.length),Bi=!!Dn.current&&(0,Ae.Z)(Dn.current),[lr,Ai]=Ce.useState(null);(0,Ge.Z)(()=>{if(oi&&Dn.current){const Wi=getComputedStyle(Dn.current);Ai(parseInt(Wi.marginBottom,10))}},[oi,Bi]);const an=Wi=>{Wi||Ai(null)},wi=function(){let Wi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Ni=Wi?ri:Ft.errors,hr=Wi?Mi:Ft.warnings;return Et(Ni,hr,Ft,"",!!$t,wn)}(),pi=Ie()(Gn,At,kt,{[`${Gn}-with-help`]:Hn||ri.length||Mi.length,[`${Gn}-has-feedback`]:wi&&$t,[`${Gn}-has-success`]:wi==="success",[`${Gn}-has-warning`]:wi==="warning",[`${Gn}-has-error`]:wi==="error",[`${Gn}-is-validating`]:wi==="validating",[`${Gn}-hidden`]:bn});return Ce.createElement("div",{className:pi,style:Ct,ref:Dn},Ce.createElement(Ze.Z,Object.assign({className:`${Gn}-row`},(0,Ke.Z)(qn,["_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:Gt},et,{requiredMark:Jn,required:sn!=null?sn:Bn,prefixCls:Pt})),Ce.createElement(Jt,Object.assign({},et,Ft,{errors:ri,warnings:Mi,prefixCls:Pt,status:wi,help:dn,marginBottom:lr,onErrorVisibleChanged:an}),Ce.createElement(he.qI.Provider,{value:Nn},Ce.createElement(cr,{prefixCls:Pt,meta:Ft,errors:Ft.errors,warnings:Ft.warnings,hasFeedback:$t,validateStatus:wi},An)))),!!lr&&Ce.createElement("div",{className:`${Gn}-margin-offset`,style:{marginBottom:-lr}}))}const di="__SPLIT__",Cr=null,zi=Ce.memo(et=>{let{children:Pt}=et;return Pt},(et,Pt)=>et.value===Pt.value&&et.update===Pt.update&&et.childProps.length===Pt.childProps.length&&et.childProps.every((At,kt)=>At===Pt.childProps[kt]));function st(et){return et!=null}function Dr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Mr(et){const{name:Pt,noStyle:At,className:kt,dependencies:Ct,prefixCls:dn,shouldUpdate:_n,rules:zn,children:wn,required:Ft,label:$t,messageVariables:bn,trigger:An="onChange",validateTrigger:Gt,hidden:sn,help:Bn}=et,{getPrefixCls:Nn}=Ce.useContext(bt.E_),{name:qn}=Ce.useContext(he.q3),Gn=Be(wn),Jn=typeof Gn=="function",Dn=Ce.useContext(he.qI),{validateTrigger:ri}=Ce.useContext(ut.FieldContext),Mi=Gt!==void 0?Gt:ri,Hn=st(Pt),oi=Nn("form",dn),[Bi,lr]=je(oi),Ai=Ce.useContext(ut.ListContext),an=Ce.useRef(),[si,wi]=Xe({}),[pi,Wi]=(0,Zt.Z)(()=>Dr()),Ni=In=>{const Sr=Ai==null?void 0:Ai.getKey(In.name);if(Wi(In.destroy?Dr():In,!0),At&&Bn!==!1&&Dn){let fo=In.name;if(In.destroy)fo=an.current||fo;else if(Sr!==void 0){const[Pr,Do]=Sr;fo=[Pr].concat((0,Le.Z)(Do)),an.current=fo}Dn(In,fo)}},hr=(In,Sr)=>{wi(fo=>{const Pr=Object.assign({},fo),ro=[].concat((0,Le.Z)(In.name.slice(0,-1)),(0,Le.Z)(Sr)).join(di);return In.destroy?delete Pr[ro]:Pr[ro]=In,Pr})},[Fi,Ki]=Ce.useMemo(()=>{const In=(0,Le.Z)(pi.errors),Sr=(0,Le.Z)(pi.warnings);return Object.values(si).forEach(fo=>{In.push.apply(In,(0,Le.Z)(fo.errors||[])),Sr.push.apply(Sr,(0,Le.Z)(fo.warnings||[]))}),[In,Sr]},[si,pi.errors,pi.warnings]),_r=Re();function On(In,Sr,fo){return At&&!sn?Ce.createElement(cr,{prefixCls:oi,hasFeedback:et.hasFeedback,validateStatus:et.validateStatus,meta:pi,errors:Fi,warnings:Ki,noStyle:!0},In):Ce.createElement(no,Object.assign({key:"row"},et,{className:Ie()(kt,lr),prefixCls:oi,fieldId:Sr,isRequired:fo,errors:Fi,warnings:Ki,meta:pi,onSubItemMetaChange:hr}),In)}if(!Hn&&!Jn&&!Ct)return Bi(On(Gn));let Jr={};return typeof $t=="string"?Jr.label=$t:Pt&&(Jr.label=String(Pt)),bn&&(Jr=Object.assign(Object.assign({},Jr),bn)),Bi(Ce.createElement(ut.Field,Object.assign({},et,{messageVariables:Jr,trigger:An,validateTrigger:Mi,onMetaChange:Ni}),(In,Sr,fo)=>{const Pr=dt(Pt).length&&Sr?Sr.name:[],Do=yt(Pr,qn),ro=Ft!==void 0?Ft:!!(zn&&zn.some(dr=>{if(dr&&typeof dr=="object"&&dr.required&&!dr.warningOnly)return!0;if(typeof dr=="function"){const Tr=dr(fo);return Tr&&Tr.required&&!Tr.warningOnly}return!1})),Yi=Object.assign({},In);let er=null;if(Array.isArray(Gn)&&Hn)er=Gn;else if(!(Jn&&(!(_n||Ct)||Hn))){if(!(Ct&&!Jn&&!Hn))if((0,mt.l$)(Gn)){const dr=Object.assign(Object.assign({},Gn.props),Yi);if(dr.id||(dr.id=Do),Bn||Fi.length>0||Ki.length>0||et.extra){const Tt=[];(Bn||Fi.length>0)&&Tt.push(`${Do}_help`),et.extra&&Tt.push(`${Do}_extra`),dr["aria-describedby"]=Tt.join(" ")}Fi.length>0&&(dr["aria-invalid"]="true"),ro&&(dr["aria-required"]="true"),(0,Xt.Yr)(Gn)&&(dr.ref=_r(Pr,Gn)),new Set([].concat((0,Le.Z)(dt(An)),(0,Le.Z)(dt(Mi)))).forEach(Tt=>{dr[Tt]=function(){for(var xr,Po,Wo,Co,qo,Zo=arguments.length,wr=new Array(Zo),vr=0;vr<Zo;vr++)wr[vr]=arguments[vr];(Wo=Yi[Tt])===null||Wo===void 0||(xr=Wo).call.apply(xr,[Yi].concat(wr)),(qo=(Co=Gn.props)[Tt])===null||qo===void 0||(Po=qo).call.apply(Po,[Co].concat(wr))}});const hi=[dr["aria-required"],dr["aria-invalid"],dr["aria-describedby"]];er=Ce.createElement(zi,{value:Yi[et.valuePropName||"value"],update:Gn,childProps:hi},(0,mt.Tm)(Gn,dr))}else Jn&&(_n||Ct)&&!Hn?er=Gn(fo):er=Gn}return On(er,Do,ro)}))}const xo=Mr;xo.useStatus=Qe;var Gr=xo,uo=function(et,Pt){var At={};for(var kt in et)Object.prototype.hasOwnProperty.call(et,kt)&&Pt.indexOf(kt)<0&&(At[kt]=et[kt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ct=0,kt=Object.getOwnPropertySymbols(et);Ct<kt.length;Ct++)Pt.indexOf(kt[Ct])<0&&Object.prototype.propertyIsEnumerable.call(et,kt[Ct])&&(At[kt[Ct]]=et[kt[Ct]]);return At},co=et=>{var{prefixCls:Pt,children:At}=et,kt=uo(et,["prefixCls","children"]);const{getPrefixCls:Ct}=Ce.useContext(bt.E_),dn=Ct("form",Pt),_n=Ce.useMemo(()=>({prefixCls:dn,status:"error"}),[dn]);return Ce.createElement(ut.List,Object.assign({},kt),(zn,wn,Ft)=>Ce.createElement(he.Rk.Provider,{value:_n},At(zn.map($t=>Object.assign(Object.assign({},$t),{fieldKey:$t.key})),wn,{errors:Ft.errors,warnings:Ft.warnings})))};function cn(){const{form:et}=(0,Ce.useContext)(he.q3);return et}const $e=Ut;$e.Item=Gr,$e.List=co,$e.ErrorList=gt,$e.useForm=Rt,$e.useFormInstance=cn,$e.useWatch=ut.useWatch,$e.Provider=he.RV,$e.create=()=>{};var tt=$e},8628:function(Pn,qt,Ee){"use strict";var Le=Ee(59301),me=Ee(34280),Ie=Ee(56762),Te=Ee(69507);function Ce(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const he=(0,Le.useRef)({}),Se=(0,Ie.Z)(),xe=(0,Te.ZP)();return(0,me.Z)(()=>{const ge=xe.subscribe(ce=>{he.current=ce,_e&&Se()});return()=>xe.unsubscribe(ge)},[]),he.current}qt.Z=Ce},9432:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return se},n:function(){return oe}});var Le=Ee(19248),me=Ee(92310),Ie=Ee.n(me),Te=Ee(93681),Ce=Ee(8654),_e=Ee(59301),he=Ee(19080),Se=Ee(36355),xe=Ee(1684),ge=Ee(19716),ce=Ee(32441),ve=Ee(33234),de=Ee(59412),ue=Ee(9937);function z(le){return!!(le.prefix||le.suffix||le.allowClear)}var ee=function(le,ye){var we={};for(var be in le)Object.prototype.hasOwnProperty.call(le,be)&&ye.indexOf(be)<0&&(we[be]=le[be]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ke=0,be=Object.getOwnPropertySymbols(le);ke<be.length;ke++)ye.indexOf(be[ke])<0&&Object.prototype.propertyIsEnumerable.call(le,be[ke])&&(we[be[ke]]=le[be[ke]]);return we};function oe(le,ye){if(!le)return;le.focus(ye);const{cursor:we}=ye||{};if(we){const be=le.value.length;switch(we){case"start":le.setSelectionRange(0,0);break;case"end":le.setSelectionRange(be,be);break;default:le.setSelectionRange(0,be);break}}}var se=(0,_e.forwardRef)((le,ye)=>{var we;const{prefixCls:be,bordered:ke=!0,status:Ne,size:je,disabled:Ve,onBlur:Je,onFocus:We,suffix:gt,allowClear:ut,addonAfter:bt,addonBefore:rt,className:St,style:ct,styles:Bt,rootClassName:ht,onChange:it,classNames:dt}=le,yt=ee(le,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Et,direction:vt,input:Rt}=_e.useContext(Se.E_),jt=Et("input",be),un=(0,_e.useRef)(null),[Vt,xn]=(0,ue.ZP)(jt),{compactSize:Ut,compactItemClassnames:Zt}=(0,ve.ri)(jt,vt),Xt=(0,ge.Z)(tn=>{var nn;return(nn=je!=null?je:Ut)!==null&&nn!==void 0?nn:tn}),mt=_e.useContext(xe.Z),ze=Ve!=null?Ve:mt,{status:Be,hasFeedback:qe,feedbackIcon:Qe}=(0,_e.useContext)(ce.aM),Ue=(0,he.F)(Be,Ne),Xe=z(le)||!!qe,Re=(0,_e.useRef)(Xe);(0,_e.useEffect)(()=>{var tn;Xe&&Re.current,Re.current=Xe},[Xe]);const Ae=(0,de.Z)(un,!0),Ge=tn=>{Ae(),Je==null||Je(tn)},Ke=tn=>{Ae(),We==null||We(tn)},Ze=tn=>{Ae(),it==null||it(tn)},at=(qe||gt)&&_e.createElement(_e.Fragment,null,gt,qe&&Qe);let xt;return typeof ut=="object"&&(ut!=null&&ut.clearIcon)?xt=ut:ut&&(xt={clearIcon:_e.createElement(Le.Z,null)}),Vt(_e.createElement(Te.default,Object.assign({ref:(0,Ce.sQ)(ye,un),prefixCls:jt,autoComplete:Rt==null?void 0:Rt.autoComplete},yt,{disabled:ze,onBlur:Ge,onFocus:Ke,style:Object.assign(Object.assign({},Rt==null?void 0:Rt.style),ct),styles:Object.assign(Object.assign({},Rt==null?void 0:Rt.styles),Bt),suffix:at,allowClear:xt,className:Ie()(St,ht,Zt,Rt==null?void 0:Rt.className),onChange:Ze,addonAfter:bt&&_e.createElement(ve.BR,null,_e.createElement(ce.Ux,{override:!0,status:!0},bt)),addonBefore:rt&&_e.createElement(ve.BR,null,_e.createElement(ce.Ux,{override:!0,status:!0},rt)),classNames:Object.assign(Object.assign(Object.assign({},dt),Rt==null?void 0:Rt.classNames),{input:Ie()({[`${jt}-sm`]:Xt==="small",[`${jt}-lg`]:Xt==="large",[`${jt}-rtl`]:vt==="rtl",[`${jt}-borderless`]:!ke},!Xe&&(0,he.Z)(jt,Ue),dt==null?void 0:dt.input,(we=Rt==null?void 0:Rt.classNames)===null||we===void 0?void 0:we.input,xn)}),classes:{affixWrapper:Ie()({[`${jt}-affix-wrapper-sm`]:Xt==="small",[`${jt}-affix-wrapper-lg`]:Xt==="large",[`${jt}-affix-wrapper-rtl`]:vt==="rtl",[`${jt}-affix-wrapper-borderless`]:!ke},(0,he.Z)(`${jt}-affix-wrapper`,Ue,qe),xn),wrapper:Ie()({[`${jt}-group-rtl`]:vt==="rtl"},xn),group:Ie()({[`${jt}-group-wrapper-sm`]:Xt==="small",[`${jt}-group-wrapper-lg`]:Xt==="large",[`${jt}-group-wrapper-rtl`]:vt==="rtl",[`${jt}-group-wrapper-disabled`]:ze},(0,he.Z)(`${jt}-group-wrapper`,Ue,qe),xn)}})))})},1643:function(Pn,qt,Ee){"use strict";var Le=Ee(19248),me=Ee(92310),Ie=Ee.n(me),Te=Ee(9296),Ce=Ee(59301),_e=Ee(19080),he=Ee(36355),Se=Ee(1684),xe=Ee(19716),ge=Ee(32441),ce=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 ue=(0,Ce.forwardRef)((z,ee)=>{const{prefixCls:oe,bordered:ie=!0,size:se,disabled:le,status:ye,allowClear:we,showCount:be,classNames:ke,rootClassName:Ne,className:je}=z,Ve=de(z,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Je,direction:We}=Ce.useContext(he.E_),gt=(0,xe.Z)(se),ut=Ce.useContext(Se.Z),bt=le!=null?le:ut,{status:rt,hasFeedback:St,feedbackIcon:ct}=Ce.useContext(ge.aM),Bt=(0,_e.F)(rt,ye),ht=Ce.useRef(null);Ce.useImperativeHandle(ee,()=>{var vt;return{resizableTextArea:(vt=ht.current)===null||vt===void 0?void 0:vt.resizableTextArea,focus:Rt=>{var jt,un;(0,ce.n)((un=(jt=ht.current)===null||jt===void 0?void 0:jt.resizableTextArea)===null||un===void 0?void 0:un.textArea,Rt)},blur:()=>{var Rt;return(Rt=ht.current)===null||Rt===void 0?void 0:Rt.blur()}}});const it=Je("input",oe);let dt;typeof we=="object"&&(we!=null&&we.clearIcon)?dt=we:we&&(dt={clearIcon:Ce.createElement(Le.Z,null)});const[yt,Et]=(0,ve.ZP)(it);return yt(Ce.createElement(Te.default,Object.assign({},Ve,{disabled:bt,allowClear:dt,className:Ie()(je,Ne),classes:{affixWrapper:Ie()(`${it}-textarea-affix-wrapper`,{[`${it}-affix-wrapper-rtl`]:We==="rtl",[`${it}-affix-wrapper-borderless`]:!ie,[`${it}-affix-wrapper-sm`]:gt==="small",[`${it}-affix-wrapper-lg`]:gt==="large",[`${it}-textarea-show-count`]:be},(0,_e.Z)(`${it}-affix-wrapper`,Bt),Et)},classNames:Object.assign(Object.assign({},ke),{textarea:Ie()({[`${it}-borderless`]:!ie,[`${it}-sm`]:gt==="small",[`${it}-lg`]:gt==="large"},(0,_e.Z)(it,Bt),Et,ke==null?void 0:ke.textarea)}),prefixCls:it,suffix:St&&Ce.createElement("span",{className:`${it}-textarea-suffix`},ct),showCount:be,ref:ht})))});qt.Z=ue},59412:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});var Le=Ee(59301);function me(Ie,Te){const Ce=(0,Le.useRef)([]),_e=()=>{Ce.current.push(setTimeout(()=>{var he,Se,xe,ge;!((he=Ie.current)===null||he===void 0)&&he.input&&((Se=Ie.current)===null||Se===void 0?void 0:Se.input.getAttribute("type"))==="password"&&(!((xe=Ie.current)===null||xe===void 0)&&xe.input.hasAttribute("value"))&&((ge=Ie.current)===null||ge===void 0||ge.input.removeAttribute("value"))}))};return(0,Le.useEffect)(()=>(Te&&_e(),()=>Ce.current.forEach(he=>{he&&clearTimeout(he)})),[]),_e}},92832:function(Pn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return gt}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(59301),Te=Ee(36355),Ce=Ee(32441),_e=Ee(9937),Se=ut=>{const{getPrefixCls:bt,direction:rt}=(0,Ie.useContext)(Te.E_),{prefixCls:St,className:ct}=ut,Bt=bt("input-group",St),ht=bt("input"),[it,dt]=(0,_e.ZP)(ht),yt=me()(Bt,{[`${Bt}-lg`]:ut.size==="large",[`${Bt}-sm`]:ut.size==="small",[`${Bt}-compact`]:ut.compact,[`${Bt}-rtl`]:rt==="rtl"},dt,ct),Et=(0,Ie.useContext)(Ce.aM),vt=(0,Ie.useMemo)(()=>Object.assign(Object.assign({},Et),{isFormItemInput:!1}),[Et]);return it(Ie.createElement("span",{className:yt,style:ut.style,onMouseEnter:ut.onMouseEnter,onMouseLeave:ut.onMouseLeave,onFocus:ut.onFocus,onBlur:ut.onBlur},Ie.createElement(Ce.aM.Provider,{value:vt},ut.children)))},xe=Ee(9432),ge=Ee(73331),ce=Ee(15277),ve=Ee(2738),de=Ee(8654),ue=Ee(59412),z=function(ut,bt){var rt={};for(var St in ut)Object.prototype.hasOwnProperty.call(ut,St)&&bt.indexOf(St)<0&&(rt[St]=ut[St]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,St=Object.getOwnPropertySymbols(ut);ct<St.length;ct++)bt.indexOf(St[ct])<0&&Object.prototype.propertyIsEnumerable.call(ut,St[ct])&&(rt[St[ct]]=ut[St[ct]]);return rt};const ee=ut=>ut?Ie.createElement(ce.Z,null):Ie.createElement(ge.Z,null),oe={click:"onClick",hover:"onMouseOver"};var se=Ie.forwardRef((ut,bt)=>{const{visibilityToggle:rt=!0}=ut,St=typeof rt=="object"&&rt.visible!==void 0,[ct,Bt]=(0,Ie.useState)(()=>St?rt.visible:!1),ht=(0,Ie.useRef)(null);Ie.useEffect(()=>{St&&Bt(rt.visible)},[St,rt]);const it=(0,ue.Z)(ht),dt=()=>{const{disabled:ze}=ut;ze||(ct&&it(),Bt(Be=>{var qe;const Qe=!Be;return typeof rt=="object"&&((qe=rt.onVisibleChange)===null||qe===void 0||qe.call(rt,Qe)),Qe}))},yt=ze=>{const{action:Be="click",iconRender:qe=ee}=ut,Qe=oe[Be]||"",Ue=qe(ct),Xe={[Qe]:dt,className:`${ze}-icon`,key:"passwordIcon",onMouseDown:Re=>{Re.preventDefault()},onMouseUp:Re=>{Re.preventDefault()}};return Ie.cloneElement(Ie.isValidElement(Ue)?Ue:Ie.createElement("span",null,Ue),Xe)},{className:Et,prefixCls:vt,inputPrefixCls:Rt,size:jt}=ut,un=z(ut,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Vt}=Ie.useContext(Te.E_),xn=Vt("input",Rt),Ut=Vt("input-password",vt),Zt=rt&&yt(Ut),Xt=me()(Ut,Et,{[`${Ut}-${jt}`]:!!jt}),mt=Object.assign(Object.assign({},(0,ve.Z)(un,["suffix","iconRender","visibilityToggle"])),{type:ct?"text":"password",className:Xt,prefixCls:xn,suffix:Zt});return jt&&(mt.size=jt),Ie.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(bt,ht)},mt))}),le=Ee(47472),ye=Ee(92343),we=Ee(3113),be=Ee(19716),ke=Ee(33234),Ne=function(ut,bt){var rt={};for(var St in ut)Object.prototype.hasOwnProperty.call(ut,St)&&bt.indexOf(St)<0&&(rt[St]=ut[St]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,St=Object.getOwnPropertySymbols(ut);ct<St.length;ct++)bt.indexOf(St[ct])<0&&Object.prototype.propertyIsEnumerable.call(ut,St[ct])&&(rt[St[ct]]=ut[St[ct]]);return rt},Ve=Ie.forwardRef((ut,bt)=>{const{prefixCls:rt,inputPrefixCls:St,className:ct,size:Bt,suffix:ht,enterButton:it=!1,addonAfter:dt,loading:yt,disabled:Et,onSearch:vt,onChange:Rt,onCompositionStart:jt,onCompositionEnd:un}=ut,Vt=Ne(ut,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:xn,direction:Ut}=Ie.useContext(Te.E_),Zt=Ie.useRef(!1),Xt=xn("input-search",rt),mt=xn("input",St),{compactSize:ze}=(0,ke.ri)(Xt,Ut),Be=(0,be.Z)(Jt=>{var mn;return(mn=Bt!=null?Bt:ze)!==null&&mn!==void 0?mn:Jt}),qe=Ie.useRef(null),Qe=Jt=>{Jt&&Jt.target&&Jt.type==="click"&&vt&&vt(Jt.target.value,Jt,{source:"clear"}),Rt&&Rt(Jt)},Ue=Jt=>{var mn;document.activeElement===((mn=qe.current)===null||mn===void 0?void 0:mn.input)&&Jt.preventDefault()},Xe=Jt=>{var mn,kn;vt&&vt((kn=(mn=qe.current)===null||mn===void 0?void 0:mn.input)===null||kn===void 0?void 0:kn.value,Jt,{source:"input"})},Re=Jt=>{Zt.current||yt||Xe(Jt)},Ae=typeof it=="boolean"?Ie.createElement(le.Z,null):null,Ge=`${Xt}-button`;let Ke;const Ze=it||{},at=Ze.type&&Ze.type.__ANT_BUTTON===!0;at||Ze.type==="button"?Ke=(0,ye.Tm)(Ze,Object.assign({onMouseDown:Ue,onClick:Jt=>{var mn,kn;(kn=(mn=Ze==null?void 0:Ze.props)===null||mn===void 0?void 0:mn.onClick)===null||kn===void 0||kn.call(mn,Jt),Xe(Jt)},key:"enterButton"},at?{className:Ge,size:Be}:{})):Ke=Ie.createElement(we.ZP,{className:Ge,type:it?"primary":void 0,size:Be,disabled:Et,key:"enterButton",onMouseDown:Ue,onClick:Xe,loading:yt,icon:Ae},it),dt&&(Ke=[Ke,(0,ye.Tm)(dt,{key:"addonAfter"})]);const xt=me()(Xt,{[`${Xt}-rtl`]:Ut==="rtl",[`${Xt}-${Be}`]:!!Be,[`${Xt}-with-button`]:!!it},ct),tn=Jt=>{Zt.current=!0,jt==null||jt(Jt)},nn=Jt=>{Zt.current=!1,un==null||un(Jt)};return Ie.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(qe,bt),onPressEnter:Re},Vt,{size:Be,onCompositionStart:tn,onCompositionEnd:nn,prefixCls:mt,addonAfter:Ke,suffix:ht,onChange:Qe,className:xt,disabled:Et}))}),Je=Ee(1643);const We=xe.Z;We.Group=Se,We.Search=Ve,We.TextArea=Je.Z,We.Password=se;var gt=We},45818:function(Pn,qt,Ee){"use strict";Ee.d(qt,{D:function(){return le},Z:function(){return be}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(Ne,je){return me.createElement(Ce.Z,(0,Le.Z)({},Ne,{ref:je,icon:Te}))},he=me.forwardRef(_e),Se=he,xe=Ee(33853),ge=Ee(38819),ce=Ee(92310),ve=Ee.n(ce),de=Ee(2738),z=ke=>!isNaN(parseFloat(ke))&&isFinite(ke),ee=Ee(36355),oe=Ee(84966),ie=function(ke,Ne){var je={};for(var Ve in ke)Object.prototype.hasOwnProperty.call(ke,Ve)&&Ne.indexOf(Ve)<0&&(je[Ve]=ke[Ve]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Je=0,Ve=Object.getOwnPropertySymbols(ke);Je<Ve.length;Je++)Ne.indexOf(Ve[Je])<0&&Object.prototype.propertyIsEnumerable.call(ke,Ve[Je])&&(je[Ve[Je]]=ke[Ve[Je]]);return je};const se={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},le=me.createContext({}),ye=(()=>{let ke=0;return function(){let Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return ke+=1,`${Ne}${ke}`}})();var be=me.forwardRef((ke,Ne)=>{const{prefixCls:je,className:Ve,trigger:Je,children:We,defaultCollapsed:gt=!1,theme:ut="dark",style:bt={},collapsible:rt=!1,reverseArrow:St=!1,width:ct=200,collapsedWidth:Bt=80,zeroWidthTriggerStyle:ht,breakpoint:it,onCollapse:dt,onBreakpoint:yt}=ke,Et=ie(ke,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:vt}=(0,me.useContext)(oe.Gs),[Rt,jt]=(0,me.useState)("collapsed"in ke?ke.collapsed:gt),[un,Vt]=(0,me.useState)(!1);(0,me.useEffect)(()=>{"collapsed"in ke&&jt(ke.collapsed)},[ke.collapsed]);const xn=(Be,qe)=>{"collapsed"in ke||jt(Be),dt==null||dt(Be,qe)},Ut=(0,me.useRef)();Ut.current=Be=>{Vt(Be.matches),yt==null||yt(Be.matches),Rt!==Be.matches&&xn(Be.matches,"responsive")},(0,me.useEffect)(()=>{function Be(Qe){return Ut.current(Qe)}let qe;if(typeof window!="undefined"){const{matchMedia:Qe}=window;if(Qe&&it&&it in se){qe=Qe(`(max-width: ${se[it]})`);try{qe.addEventListener("change",Be)}catch(Ue){qe.addListener(Be)}Be(qe)}}return()=>{try{qe==null||qe.removeEventListener("change",Be)}catch(Qe){qe==null||qe.removeListener(Be)}}},[it]),(0,me.useEffect)(()=>{const Be=ye("ant-sider-");return vt.addSider(Be),()=>vt.removeSider(Be)},[]);const Zt=()=>{xn(!Rt,"clickTrigger")},{getPrefixCls:Xt}=(0,me.useContext)(ee.E_),mt=()=>{const Be=Xt("layout-sider",je),qe=(0,de.Z)(Et,["collapsed"]),Qe=Rt?Bt:ct,Ue=z(Qe)?`${Qe}px`:String(Qe),Xe=parseFloat(String(Bt||0))===0?me.createElement("span",{onClick:Zt,className:ve()(`${Be}-zero-width-trigger`,`${Be}-zero-width-trigger-${St?"right":"left"}`),style:ht},Je||me.createElement(Se,null)):null,Ge={expanded:St?me.createElement(ge.Z,null):me.createElement(xe.Z,null),collapsed:St?me.createElement(xe.Z,null):me.createElement(ge.Z,null)}[Rt?"collapsed":"expanded"],Ke=Je!==null?Xe||me.createElement("div",{className:`${Be}-trigger`,onClick:Zt,style:{width:Ue}},Je||Ge):null,Ze=Object.assign(Object.assign({},bt),{flex:`0 0 ${Ue}`,maxWidth:Ue,minWidth:Ue,width:Ue}),at=ve()(Be,`${Be}-${ut}`,{[`${Be}-collapsed`]:!!Rt,[`${Be}-has-trigger`]:rt&&Je!==null&&!Xe,[`${Be}-below`]:!!un,[`${Be}-zero-width`]:parseFloat(Ue)===0},Ve);return me.createElement("aside",Object.assign({className:at},qe,{style:Ze,ref:Ne}),me.createElement("div",{className:`${Be}-children`},We),rt||un&&Xe?Ke:null)},ze=me.useMemo(()=>({siderCollapsed:Rt}),[Rt]);return me.createElement(le.Provider,{value:ze},mt())})},84966:function(Pn,qt,Ee){"use strict";Ee.d(qt,{VY:function(){return le},$_:function(){return se},h4:function(){return ie},Gs:function(){return de},ZP:function(){return ye}});var Le=Ee(26407),me=Ee(92310),Ie=Ee.n(me),Te=Ee(2738),Ce=Ee(59301),_e=Ee(36355),he=Ee(83116),xe=we=>{const{componentCls:be,bodyBg:ke,lightSiderBg:Ne,lightTriggerBg:je,lightTriggerColor:Ve}=we;return{[`${be}-sider-light`]:{background:Ne,[`${be}-sider-trigger`]:{color:Ve,background:je},[`${be}-sider-zero-width-trigger`]:{color:Ve,background:je,border:`1px solid ${ke}`,borderInlineStart:0}}}};const ge=we=>{const{antCls:be,componentCls:ke,colorText:Ne,triggerColor:je,footerBg:Ve,triggerBg:Je,headerHeight:We,headerPadding:gt,headerColor:ut,footerPadding:bt,triggerHeight:rt,zeroTriggerHeight:St,zeroTriggerWidth:ct,motionDurationMid:Bt,motionDurationSlow:ht,fontSize:it,borderRadius:dt,bodyBg:yt,headerBg:Et,siderBg:vt}=we;return{[ke]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:yt,"&, *":{boxSizing:"border-box"},[`&${ke}-has-sider`]:{flexDirection:"row",[`> ${ke}, > ${ke}-content`]:{width:0}},[`${ke}-header, &${ke}-footer`]:{flex:"0 0 auto"},[`${ke}-sider`]:{position:"relative",minWidth:0,background:vt,transition:`all ${Bt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${be}-menu${be}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:rt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:rt,color:je,lineHeight:`${rt}px`,textAlign:"center",background:Je,cursor:"pointer",transition:`all ${Bt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:We,insetInlineEnd:-ct,zIndex:1,width:ct,height:St,color:je,fontSize:we.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:vt,borderStartStartRadius:0,borderStartEndRadius:dt,borderEndEndRadius:dt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${ht} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${ht}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-ct,borderStartStartRadius:dt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:dt}}}}},xe(we)),{"&-rtl":{direction:"rtl"}}),[`${ke}-header`]:{height:We,padding:gt,color:ut,lineHeight:`${We}px`,background:Et,[`${be}-menu`]:{lineHeight:"inherit"}},[`${ke}-footer`]:{padding:bt,color:Ne,fontSize:it,background:Ve},[`${ke}-content`]:{flex:"auto",minHeight:0}}};var ce=(0,he.Z)("Layout",we=>[ge(we)],we=>{const{colorBgLayout:be,controlHeight:ke,controlHeightLG:Ne,colorText:je,controlHeightSM:Ve,marginXXS:Je,colorTextLightSolid:We,colorBgContainer:gt}=we,ut=Ne*1.25;return{colorBgHeader:"#001529",colorBgBody:be,colorBgTrigger:"#002140",bodyBg:be,headerBg:"#001529",headerHeight:ke*2,headerPadding:`0 ${ut}px`,headerColor:je,footerPadding:`${Ve}px ${ut}px`,footerBg:be,siderBg:"#001529",triggerHeight:Ne+Je*2,triggerBg:"#002140",triggerColor:We,zeroTriggerWidth:Ne,zeroTriggerHeight:Ne,lightSiderBg:gt,lightTriggerBg:gt,lightTriggerColor:je}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),ve=function(we,be){var ke={};for(var Ne in we)Object.prototype.hasOwnProperty.call(we,Ne)&&be.indexOf(Ne)<0&&(ke[Ne]=we[Ne]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ne=Object.getOwnPropertySymbols(we);je<Ne.length;je++)be.indexOf(Ne[je])<0&&Object.prototype.propertyIsEnumerable.call(we,Ne[je])&&(ke[Ne[je]]=we[Ne[je]]);return ke};const de=Ce.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ue(we){let{suffixCls:be,tagName:ke,displayName:Ne}=we;return je=>Ce.forwardRef((Je,We)=>Ce.createElement(je,Object.assign({ref:We,suffixCls:be,tagName:ke},Je)))}const z=Ce.forwardRef((we,be)=>{const{prefixCls:ke,suffixCls:Ne,className:je,tagName:Ve}=we,Je=ve(we,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:We}=Ce.useContext(_e.E_),gt=We("layout",ke),[ut,bt]=ce(gt),rt=Ne?`${gt}-${Ne}`:gt;return ut(Ce.createElement(Ve,Object.assign({className:Ie()(ke||rt,je,bt),ref:be},Je)))}),ee=Ce.forwardRef((we,be)=>{const{direction:ke}=Ce.useContext(_e.E_),[Ne,je]=Ce.useState([]),{prefixCls:Ve,className:Je,rootClassName:We,children:gt,hasSider:ut,tagName:bt,style:rt}=we,St=ve(we,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),ct=(0,Te.Z)(St,["suffixCls"]),{getPrefixCls:Bt,layout:ht}=Ce.useContext(_e.E_),it=Bt("layout",Ve),[dt,yt]=ce(it),Et=Ie()(it,{[`${it}-has-sider`]:typeof ut=="boolean"?ut:Ne.length>0,[`${it}-rtl`]:ke==="rtl"},ht==null?void 0:ht.className,Je,We,yt),vt=Ce.useMemo(()=>({siderHook:{addSider:Rt=>{je(jt=>[].concat((0,Le.Z)(jt),[Rt]))},removeSider:Rt=>{je(jt=>jt.filter(un=>un!==Rt))}}}),[]);return dt(Ce.createElement(de.Provider,{value:vt},Ce.createElement(bt,Object.assign({ref:be,className:Et,style:Object.assign(Object.assign({},ht==null?void 0:ht.style),rt)},ct),gt)))}),oe=ue({tagName:"div",displayName:"Layout"})(ee),ie=ue({suffixCls:"header",tagName:"header",displayName:"Header"})(z),se=ue({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(z),le=ue({suffixCls:"content",tagName:"main",displayName:"Content"})(z);var ye=oe},40875:function(Pn,qt,Ee){"use strict";Ee.d(qt,{J:function(){return _e}});var Le=Ee(59301),me=Ee(33234),Ie=Ee(70425),Te=function(he,Se){var xe={};for(var ge in he)Object.prototype.hasOwnProperty.call(he,ge)&&Se.indexOf(ge)<0&&(xe[ge]=he[ge]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,ge=Object.getOwnPropertySymbols(he);ce<ge.length;ce++)Se.indexOf(ge[ce])<0&&Object.prototype.propertyIsEnumerable.call(he,ge[ce])&&(xe[ge[ce]]=he[ge[ce]]);return xe};const Ce=Le.createContext(null),_e=Le.forwardRef((he,Se)=>{const{children:xe}=he,ge=Te(he,["children"]),ce=Le.useContext(Ce),ve=Le.useMemo(()=>Object.assign(Object.assign({},ce),ge),[ce,ge.prefixCls,ge.mode,ge.selectable]);return Le.createElement(Ce.Provider,{value:ve},Le.createElement(me.BR,null,(0,Ie.supportNodeRef)(xe)?Le.cloneElement(xe,{ref:Se}):xe))});qt.Z=Ce},20834:function(Pn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return ze}});var Le=Ee(15285),me=Ee(59301),Ie=Ee(45818),Te=Ee(92310),Ce=Ee.n(Te),_e=Ee(36355),he=function(Be,qe){var Qe={};for(var Ue in Be)Object.prototype.hasOwnProperty.call(Be,Ue)&&qe.indexOf(Ue)<0&&(Qe[Ue]=Be[Ue]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ue=Object.getOwnPropertySymbols(Be);Xe<Ue.length;Xe++)qe.indexOf(Ue[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,Ue[Xe])&&(Qe[Ue[Xe]]=Be[Ue[Xe]]);return Qe},xe=Be=>{const{prefixCls:qe,className:Qe,dashed:Ue}=Be,Xe=he(Be,["prefixCls","className","dashed"]),{getPrefixCls:Re}=me.useContext(_e.E_),Ae=Re("menu",qe),Ge=Ce()({[`${Ae}-item-divider-dashed`]:!!Ue},Qe);return me.createElement(Le.iz,Object.assign({className:Ge},Xe))},ge=Ee(11592),ce=Ee(2738),ve=Ee(6848),de=Ee(92343),z=(0,me.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),oe=Be=>{var qe;const{className:Qe,children:Ue,icon:Xe,title:Re,danger:Ae}=Be,{prefixCls:Ge,firstLevel:Ke,direction:Ze,disableMenuItemTitleTooltip:at,inlineCollapsed:xt}=me.useContext(z),tn=Mn=>{const Zn=me.createElement("span",{className:`${Ge}-title-content`},Ue);return(!Xe||(0,de.l$)(Ue)&&Ue.type==="span")&&Ue&&Mn&&Ke&&typeof Ue=="string"?me.createElement("div",{className:`${Ge}-inline-collapsed-noicon`},Ue.charAt(0)):Zn},{siderCollapsed:nn}=me.useContext(Ie.D);let Jt=Re;typeof Re=="undefined"?Jt=Ke?Ue:"":Re===!1&&(Jt="");const mn={title:Jt};!nn&&!xt&&(mn.title=null,mn.open=!1);const kn=(0,ge.Z)(Ue).length;let fn=me.createElement(Le.ck,Object.assign({},(0,ce.Z)(Be,["title","icon","danger"]),{className:Ce()({[`${Ge}-item-danger`]:Ae,[`${Ge}-item-only-child`]:(Xe?kn+1:kn)===1},Qe),title:typeof Re=="string"?Re:void 0}),(0,de.Tm)(Xe,{className:Ce()((0,de.l$)(Xe)?(qe=Xe.props)===null||qe===void 0?void 0:qe.className:"",`${Ge}-item-icon`)}),tn(xt));return at||(fn=me.createElement(ve.Z,Object.assign({},mn,{placement:Ze==="rtl"?"left":"right",overlayClassName:`${Ge}-inline-collapsed-tooltip`}),fn)),fn},se=Be=>{var qe;const{popupClassName:Qe,icon:Ue,title:Xe,theme:Re}=Be,Ae=me.useContext(z),{prefixCls:Ge,inlineCollapsed:Ke,theme:Ze}=Ae,at=(0,Le.Xl)();let xt;if(!Ue)xt=Ke&&!at.length&&Xe&&typeof Xe=="string"?me.createElement("div",{className:`${Ge}-inline-collapsed-noicon`},Xe.charAt(0)):me.createElement("span",{className:`${Ge}-title-content`},Xe);else{const nn=(0,de.l$)(Xe)&&Xe.type==="span";xt=me.createElement(me.Fragment,null,(0,de.Tm)(Ue,{className:Ce()((0,de.l$)(Ue)?(qe=Ue.props)===null||qe===void 0?void 0:qe.className:"",`${Ge}-item-icon`)}),nn?Xe:me.createElement("span",{className:`${Ge}-title-content`},Xe))}const tn=me.useMemo(()=>Object.assign(Object.assign({},Ae),{firstLevel:!1}),[Ae]);return me.createElement(z.Provider,{value:tn},me.createElement(Le.Wd,Object.assign({},(0,ce.Z)(Be,["icon"]),{title:xt,popupClassName:Ce()(Ge,Qe,`${Ge}-${Re||Ze}`)})))},le=Ee(18785),ye=Ee(70425),we=Ee(62892),be=Ee(40875),ke=function(Be,qe){var Qe={};for(var Ue in Be)Object.prototype.hasOwnProperty.call(Be,Ue)&&qe.indexOf(Ue)<0&&(Qe[Ue]=Be[Ue]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ue=Object.getOwnPropertySymbols(Be);Xe<Ue.length;Xe++)qe.indexOf(Ue[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,Ue[Xe])&&(Qe[Ue[Xe]]=Be[Ue[Xe]]);return Qe};function Ne(Be){return(Be||[]).map((qe,Qe)=>{if(qe&&typeof qe=="object"){const Ue=qe,{label:Xe,children:Re,key:Ae,type:Ge}=Ue,Ke=ke(Ue,["label","children","key","type"]),Ze=Ae!=null?Ae:`tmp-${Qe}`;return Re||Ge==="group"?Ge==="group"?me.createElement(Le.BW,Object.assign({key:Ze},Ke,{title:Xe}),Ne(Re)):me.createElement(se,Object.assign({key:Ze},Ke,{title:Xe}),Ne(Re)):Ge==="divider"?me.createElement(xe,Object.assign({key:Ze},Ke)):me.createElement(oe,Object.assign({key:Ze},Ke),Xe)}return null}).filter(qe=>qe)}function je(Be){return me.useMemo(()=>Be&&Ne(Be),[Be])}var Ve=Ee(64993),Je=Ee(17313),We=Ee(8378),gt=Ee(13826),ut=Ee(29878),bt=Ee(83116),rt=Ee(37613),ct=Be=>{const{componentCls:qe,motionDurationSlow:Qe,horizontalLineHeight:Ue,colorSplit:Xe,lineWidth:Re,lineType:Ae,itemPaddingInline:Ge}=Be;return{[`${qe}-horizontal`]:{lineHeight:Ue,border:0,borderBottom:`${Re}px ${Ae} ${Xe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${qe}-item, ${qe}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Ge},[`> ${qe}-item:hover,
|
|
|
> ${qe}-item-active,
|
|
|
> ${qe}-submenu ${qe}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${qe}-item, ${qe}-submenu-title`]:{transition:[`border-color ${Qe}`,`background ${Qe}`].join(",")},[`${qe}-submenu-arrow`]:{display:"none"}}}},ht=Be=>{let{componentCls:qe,menuArrowOffset:Qe}=Be;return{[`${qe}-rtl`]:{direction:"rtl"},[`${qe}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${qe}-rtl${qe}-vertical,
|
|
|
${qe}-submenu-rtl ${qe}-vertical`]:{[`${qe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${Qe})`},"&::after":{transform:`rotate(45deg) translateY(${Qe})`}}}}};const it=Be=>Object.assign({},(0,Je.oN)(Be));var yt=(Be,qe)=>{const{componentCls:Qe,itemColor:Ue,itemSelectedColor:Xe,groupTitleColor:Re,itemBg:Ae,subMenuItemBg:Ge,itemSelectedBg:Ke,activeBarHeight:Ze,activeBarWidth:at,activeBarBorderWidth:xt,motionDurationSlow:tn,motionEaseInOut:nn,motionEaseOut:Jt,itemPaddingInline:mn,motionDurationMid:kn,itemHoverColor:fn,lineType:Mn,colorSplit:Zn,itemDisabledColor:Tn,dangerItemColor:ci,dangerItemHoverColor:ai,dangerItemSelectedColor:ki,dangerItemActiveBg:Ci,dangerItemSelectedBg:or,itemHoverBg:tr,itemActiveBg:pr,menuSubMenuBg:cr,horizontalItemSelectedColor:to,horizontalItemSelectedBg:no,horizontalItemBorderRadius:di,horizontalItemHoverBg:Cr,popupBg:zi}=Be;return{[`${Qe}-${qe}, ${Qe}-${qe} > ${Qe}`]:{color:Ue,background:Ae,[`&${Qe}-root:focus-visible`]:Object.assign({},it(Be)),[`${Qe}-item-group-title`]:{color:Re},[`${Qe}-submenu-selected`]:{[`> ${Qe}-submenu-title`]:{color:Xe}},[`${Qe}-item-disabled, ${Qe}-submenu-disabled`]:{color:`${Tn} !important`},[`${Qe}-item:not(${Qe}-item-selected):not(${Qe}-submenu-selected)`]:{[`&:hover, > ${Qe}-submenu-title:hover`]:{color:fn}},[`&:not(${Qe}-horizontal)`]:{[`${Qe}-item:not(${Qe}-item-selected)`]:{"&:hover":{backgroundColor:tr},"&:active":{backgroundColor:pr}},[`${Qe}-submenu-title`]:{"&:hover":{backgroundColor:tr},"&:active":{backgroundColor:pr}}},[`${Qe}-item-danger`]:{color:ci,[`&${Qe}-item:hover`]:{[`&:not(${Qe}-item-selected):not(${Qe}-submenu-selected)`]:{color:ai}},[`&${Qe}-item:active`]:{background:Ci}},[`${Qe}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Qe}-item-selected`]:{color:Xe,[`&${Qe}-item-danger`]:{color:ki},"a, a:hover":{color:"inherit"}},[`& ${Qe}-item-selected`]:{backgroundColor:Ke,[`&${Qe}-item-danger`]:{backgroundColor:or}},[`${Qe}-item, ${Qe}-submenu-title`]:{[`&:not(${Qe}-item-disabled):focus-visible`]:Object.assign({},it(Be))},[`&${Qe}-submenu > ${Qe}`]:{backgroundColor:cr},[`&${Qe}-popup > ${Qe}`]:{backgroundColor:zi},[`&${Qe}-horizontal`]:Object.assign(Object.assign({},qe==="dark"?{borderBottom:0}:{}),{[`> ${Qe}-item, > ${Qe}-submenu`]:{top:xt,marginTop:-xt,marginBottom:0,borderRadius:di,"&::after":{position:"absolute",insetInline:mn,bottom:0,borderBottom:`${Ze}px solid transparent`,transition:`border-color ${tn} ${nn}`,content:'""'},"&:hover, &-active, &-open":{background:Cr,"&::after":{borderBottomWidth:Ze,borderBottomColor:to}},"&-selected":{color:to,backgroundColor:no,"&:hover":{backgroundColor:no},"&::after":{borderBottomWidth:Ze,borderBottomColor:to}}}}),[`&${Qe}-root`]:{[`&${Qe}-inline, &${Qe}-vertical`]:{borderInlineEnd:`${xt}px ${Mn} ${Zn}`}},[`&${Qe}-inline`]:{[`${Qe}-sub${Qe}-inline`]:{background:Ge},[`${Qe}-item, ${Qe}-submenu-title`]:xt&&at?{width:`calc(100% + ${xt}px)`}:{},[`${Qe}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${at}px solid ${Xe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${kn} ${Jt}`,`opacity ${kn} ${Jt}`].join(","),content:'""'},[`&${Qe}-item-danger`]:{"&::after":{borderInlineEndColor:ki}}},[`${Qe}-selected, ${Qe}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${kn} ${nn}`,`opacity ${kn} ${nn}`].join(",")}}}}}};const Et=Be=>{const{componentCls:qe,itemHeight:Qe,itemMarginInline:Ue,padding:Xe,menuArrowSize:Re,marginXS:Ae,itemMarginBlock:Ge}=Be,Ke=Xe+Re+Ae;return{[`${qe}-item`]:{position:"relative",overflow:"hidden"},[`${qe}-item, ${qe}-submenu-title`]:{height:Qe,lineHeight:`${Qe}px`,paddingInline:Xe,overflow:"hidden",textOverflow:"ellipsis",marginInline:Ue,marginBlock:Ge,width:`calc(100% - ${Ue*2}px)`},[`> ${qe}-item,
|
|
|
> ${qe}-submenu > ${qe}-submenu-title`]:{height:Qe,lineHeight:`${Qe}px`},[`${qe}-item-group-list ${qe}-submenu-title,
|
|
|
${qe}-submenu-title`]:{paddingInlineEnd:Ke}}};var Rt=Be=>{const{componentCls:qe,iconCls:Qe,itemHeight:Ue,colorTextLightSolid:Xe,dropdownWidth:Re,controlHeightLG:Ae,motionDurationMid:Ge,motionEaseOut:Ke,paddingXL:Ze,itemMarginInline:at,fontSizeLG:xt,motionDurationSlow:tn,paddingXS:nn,boxShadowSecondary:Jt,collapsedWidth:mn,collapsedIconSize:kn}=Be,fn={height:Ue,lineHeight:`${Ue}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[qe]:{"&-inline, &-vertical":Object.assign({[`&${qe}-root`]:{boxShadow:"none"}},Et(Be))},[`${qe}-submenu-popup`]:{[`${qe}-vertical`]:Object.assign(Object.assign({},Et(Be)),{boxShadow:Jt})}},{[`${qe}-submenu-popup ${qe}-vertical${qe}-sub`]:{minWidth:Re,maxHeight:`calc(100vh - ${Ae*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${qe}-inline`]:{width:"100%",[`&${qe}-root`]:{[`${qe}-item, ${qe}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${tn}`,`background ${tn}`,`padding ${Ge} ${Ke}`].join(","),[`> ${qe}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${qe}-sub${qe}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${qe}-submenu > ${qe}-submenu-title`]:fn,[`& ${qe}-item-group-title`]:{paddingInlineStart:Ze}},[`${qe}-item`]:fn}},{[`${qe}-inline-collapsed`]:{width:mn,[`&${qe}-root`]:{[`${qe}-item, ${qe}-submenu ${qe}-submenu-title`]:{[`> ${qe}-inline-collapsed-noicon`]:{fontSize:xt,textAlign:"center"}}},[`> ${qe}-item,
|
|
|
> ${qe}-item-group > ${qe}-item-group-list > ${qe}-item,
|
|
|
> ${qe}-item-group > ${qe}-item-group-list > ${qe}-submenu > ${qe}-submenu-title,
|
|
|
> ${qe}-submenu > ${qe}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${xt/2}px - ${at}px)`,textOverflow:"clip",[`
|
|
|
${qe}-submenu-arrow,
|
|
|
${qe}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${qe}-item-icon, ${Qe}`]:{margin:0,fontSize:kn,lineHeight:`${Ue}px`,"+ span":{display:"inline-block",opacity:0}}},[`${qe}-item-icon, ${Qe}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${qe}-item-icon, ${Qe}`]:{display:"none"},"a, a:hover":{color:Xe}},[`${qe}-item-group-title`]:Object.assign(Object.assign({},Je.vS),{paddingInline:nn})}}]};const jt=Be=>{const{componentCls:qe,motionDurationSlow:Qe,motionDurationMid:Ue,motionEaseInOut:Xe,motionEaseOut:Re,iconCls:Ae,iconSize:Ge,iconMarginInlineEnd:Ke}=Be;return{[`${qe}-item, ${qe}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Qe}`,`background ${Qe}`,`padding ${Qe} ${Xe}`].join(","),[`${qe}-item-icon, ${Ae}`]:{minWidth:Ge,fontSize:Ge,transition:[`font-size ${Ue} ${Re}`,`margin ${Qe} ${Xe}`,`color ${Qe}`].join(","),"+ span":{marginInlineStart:Ke,opacity:1,transition:[`opacity ${Qe} ${Xe}`,`margin ${Qe}`,`color ${Qe}`].join(",")}},[`${qe}-item-icon`]:Object.assign({},(0,Je.Ro)()),[`&${qe}-item-only-child`]:{[`> ${Ae}, > ${qe}-item-icon`]:{marginInlineEnd:0}}},[`${qe}-item-disabled, ${qe}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${qe}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},un=Be=>{const{componentCls:qe,motionDurationSlow:Qe,motionEaseInOut:Ue,borderRadius:Xe,menuArrowSize:Re,menuArrowOffset:Ae}=Be;return{[`${qe}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Be.margin,width:Re,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Qe} ${Ue}, opacity ${Qe}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Re*.6,height:Re*.15,backgroundColor:"currentcolor",borderRadius:Xe,transition:[`background ${Qe} ${Ue}`,`transform ${Qe} ${Ue}`,`top ${Qe} ${Ue}`,`color ${Qe} ${Ue}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Ae})`},"&::after":{transform:`rotate(-45deg) translateY(${Ae})`}}}}},Vt=Be=>{const{antCls:qe,componentCls:Qe,fontSize:Ue,motionDurationSlow:Xe,motionDurationMid:Re,motionEaseInOut:Ae,paddingXS:Ge,padding:Ke,colorSplit:Ze,lineWidth:at,zIndexPopup:xt,borderRadiusLG:tn,subMenuItemBorderRadius:nn,menuArrowSize:Jt,menuArrowOffset:mn,lineType:kn,menuPanelMaskInset:fn,groupTitleLineHeight:Mn,groupTitleFontSize:Zn}=Be;return[{"":{[`${Qe}`]:Object.assign(Object.assign({},(0,Je.dF)()),{"&-hidden":{display:"none"}})},[`${Qe}-submenu-hidden`]:{display:"none"}},{[Qe]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Je.Wf)(Be)),(0,Je.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:Ue,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Xe} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${Qe}-item`]:{flex:"none"}},[`${Qe}-item, ${Qe}-submenu, ${Qe}-submenu-title`]:{borderRadius:Be.itemBorderRadius},[`${Qe}-item-group-title`]:{padding:`${Ge}px ${Ke}px`,fontSize:Zn,lineHeight:Mn,transition:`all ${Xe}`},[`&-horizontal ${Qe}-submenu`]:{transition:[`border-color ${Xe} ${Ae}`,`background ${Xe} ${Ae}`].join(",")},[`${Qe}-submenu, ${Qe}-submenu-inline`]:{transition:[`border-color ${Xe} ${Ae}`,`background ${Xe} ${Ae}`,`padding ${Re} ${Ae}`].join(",")},[`${Qe}-submenu ${Qe}-sub`]:{cursor:"initial",transition:[`background ${Xe} ${Ae}`,`padding ${Xe} ${Ae}`].join(",")},[`${Qe}-title-content`]:{transition:`color ${Xe}`},[`${Qe}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Qe}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Ze,borderStyle:kn,borderWidth:0,borderTopWidth:at,marginBlock:at,padding:0,"&-dashed":{borderStyle:"dashed"}}}),jt(Be)),{[`${Qe}-item-group`]:{[`${Qe}-item-group-list`]:{margin:0,padding:0,[`${Qe}-item, ${Qe}-submenu-title`]:{paddingInline:`${Ue*2}px ${Ke}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:xt,borderRadius:tn,boxShadow:"none",transformOrigin:"0 0",[`&${Qe}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${fn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:fn},"\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:Be.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Be.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Be.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Be.paddingXS},[`> ${Qe}`]:Object.assign(Object.assign(Object.assign({borderRadius:tn},jt(Be)),un(Be)),{[`${Qe}-item, ${Qe}-submenu > ${Qe}-submenu-title`]:{borderRadius:nn},[`${Qe}-submenu-title::after`]:{transition:`transform ${Xe} ${Ae}`}})}}),un(Be)),{[`&-inline-collapsed ${Qe}-submenu-arrow,
|
|
|
&-inline ${Qe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${mn})`},"&::after":{transform:`rotate(45deg) translateX(-${mn})`}},[`${Qe}-submenu-open${Qe}-submenu-inline > ${Qe}-submenu-title > ${Qe}-submenu-arrow`]:{transform:`translateY(-${Jt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${mn})`},"&::before":{transform:`rotate(45deg) translateX(${mn})`}}})},{[`${qe}-layout-header`]:{[Qe]:{lineHeight:"inherit"}}}]};var xn=(Be,qe)=>(0,bt.Z)("Menu",Ue=>{if(qe===!1)return[];const{colorBgElevated:Xe,colorPrimary:Re,colorTextLightSolid:Ae,controlHeightLG:Ge,fontSize:Ke,darkItemColor:Ze,darkDangerItemColor:at,darkItemBg:xt,darkSubMenuItemBg:tn,darkItemSelectedColor:nn,darkItemSelectedBg:Jt,darkDangerItemSelectedBg:mn,darkItemHoverBg:kn,darkGroupTitleColor:fn,darkItemHoverColor:Mn,darkItemDisabledColor:Zn,darkDangerItemHoverColor:Tn,darkDangerItemSelectedColor:ci,darkDangerItemActiveBg:ai}=Ue,ki=Ke/7*5,Ci=(0,rt.TS)(Ue,{menuArrowSize:ki,menuHorizontalHeight:Ge*1.15,menuArrowOffset:`${ki*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Xe}),or=(0,rt.TS)(Ci,{itemColor:Ze,itemHoverColor:Mn,groupTitleColor:fn,itemSelectedColor:nn,itemBg:xt,popupBg:xt,subMenuItemBg:tn,itemActiveBg:"transparent",itemSelectedBg:Jt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:kn,itemDisabledColor:Zn,dangerItemColor:at,dangerItemHoverColor:Tn,dangerItemSelectedColor:ci,dangerItemActiveBg:ai,dangerItemSelectedBg:mn,menuSubMenuBg:tn,horizontalItemSelectedColor:Ae,horizontalItemSelectedBg:Re});return[Vt(Ci),ct(Ci),Rt(Ci),yt(Ci,"light"),yt(or,"dark"),ht(Ci),(0,We.Z)(Ci),(0,gt.oN)(Ci,"slide-up"),(0,gt.oN)(Ci,"slide-down"),(0,ut._y)(Ci,"zoom-big")]},Ue=>{const{colorPrimary:Xe,colorError:Re,colorTextDisabled:Ae,colorErrorBg:Ge,colorText:Ke,colorTextDescription:Ze,colorBgContainer:at,colorFillAlter:xt,colorFillContent:tn,lineWidth:nn,lineWidthBold:Jt,controlItemBgActive:mn,colorBgTextHover:kn,controlHeightLG:fn,lineHeight:Mn,colorBgElevated:Zn,marginXXS:Tn,padding:ci,fontSize:ai,controlHeightSM:ki,fontSizeLG:Ci,colorTextLightSolid:or,colorErrorHover:tr}=Ue,pr=new Ve.C(or).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Ue.zIndexPopupBase+50,radiusItem:Ue.borderRadiusLG,itemBorderRadius:Ue.borderRadiusLG,radiusSubMenuItem:Ue.borderRadiusSM,subMenuItemBorderRadius:Ue.borderRadiusSM,colorItemText:Ke,itemColor:Ke,colorItemTextHover:Ke,itemHoverColor:Ke,colorItemTextHoverHorizontal:Xe,horizontalItemHoverColor:Xe,colorGroupTitle:Ze,groupTitleColor:Ze,colorItemTextSelected:Xe,itemSelectedColor:Xe,colorItemTextSelectedHorizontal:Xe,horizontalItemSelectedColor:Xe,colorItemBg:at,itemBg:at,colorItemBgHover:kn,itemHoverBg:kn,colorItemBgActive:tn,itemActiveBg:mn,colorSubItemBg:xt,subMenuItemBg:xt,colorItemBgSelected:mn,itemSelectedBg:mn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Jt,activeBarHeight:Jt,colorActiveBarBorderSize:nn,activeBarBorderWidth:nn,colorItemTextDisabled:Ae,itemDisabledColor:Ae,colorDangerItemText:Re,dangerItemColor:Re,colorDangerItemTextHover:Re,dangerItemHoverColor:Re,colorDangerItemTextSelected:Re,dangerItemSelectedColor:Re,colorDangerItemBgActive:Ge,dangerItemActiveBg:Ge,colorDangerItemBgSelected:Ge,dangerItemSelectedBg:Ge,itemMarginInline:Ue.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:fn,groupTitleLineHeight:Mn,collapsedWidth:fn*2,popupBg:Zn,itemMarginBlock:Tn,itemPaddingInline:ci,horizontalLineHeight:`${fn*1.15}px`,iconSize:ai,iconMarginInlineEnd:ki-ai,collapsedIconSize:Ci,groupTitleFontSize:ai,darkItemDisabledColor:new Ve.C(or).setAlpha(.25).toRgbString(),darkItemColor:pr,darkDangerItemColor:Re,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:or,darkItemSelectedBg:Xe,darkDangerItemSelectedBg:Re,darkItemHoverBg:"transparent",darkGroupTitleColor:pr,darkItemHoverColor:or,darkDangerItemHoverColor:tr,darkDangerItemSelectedColor:or,darkDangerItemActiveBg:Re}},{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"]]})(Be),Ut=function(Be,qe){var Qe={};for(var Ue in Be)Object.prototype.hasOwnProperty.call(Be,Ue)&&qe.indexOf(Ue)<0&&(Qe[Ue]=Be[Ue]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ue=Object.getOwnPropertySymbols(Be);Xe<Ue.length;Xe++)qe.indexOf(Ue[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,Ue[Xe])&&(Qe[Ue[Xe]]=Be[Ue[Xe]]);return Qe},Xt=(0,me.forwardRef)((Be,qe)=>{var Qe,Ue;const Xe=me.useContext(be.Z),Re=Xe||{},{getPrefixCls:Ae,getPopupContainer:Ge,direction:Ke,menu:Ze}=me.useContext(_e.E_),at=Ae(),{prefixCls:xt,className:tn,style:nn,theme:Jt="light",expandIcon:mn,_internalDisableMenuItemTitleTooltip:kn,inlineCollapsed:fn,siderCollapsed:Mn,items:Zn,children:Tn,rootClassName:ci,mode:ai,selectable:ki,onClick:Ci,overflowedIndicatorPopupClassName:or}=Be,tr=Ut(Be,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),pr=(0,ce.Z)(tr,["collapsedWidth"]),cr=je(Zn)||Tn;(Qe=Re.validator)===null||Qe===void 0||Qe.call(Re,{mode:ai});const to=(0,ye.useEvent)(function(){var Zr;Ci==null||Ci.apply(void 0,arguments),(Zr=Re.onClick)===null||Zr===void 0||Zr.call(Re)}),no=Re.mode||ai,di=ki!=null?ki:Re.selectable,Cr=me.useMemo(()=>Mn!==void 0?Mn:fn,[fn,Mn]),zi={horizontal:{motionName:`${at}-slide-up`},inline:(0,we.Z)(at),other:{motionName:`${at}-zoom-big`}},st=Ae("menu",xt||Re.prefixCls),[Dr,Mr]=xn(st,!Xe),xo=Ce()(`${st}-${Jt}`,Ze==null?void 0:Ze.className,tn);let Gr;if(typeof mn=="function")Gr=mn;else if(mn===null||mn===!1)Gr=null;else if(Re.expandIcon===null||Re.expandIcon===!1)Gr=null;else{const Zr=mn!=null?mn:Re.expandIcon;Gr=(0,de.Tm)(Zr,{className:Ce()(`${st}-submenu-expand-icon`,(0,de.l$)(Zr)?(Ue=Zr.props)===null||Ue===void 0?void 0:Ue.className:"")})}const uo=me.useMemo(()=>({prefixCls:st,inlineCollapsed:Cr||!1,direction:Ke,firstLevel:!0,theme:Jt,mode:no,disableMenuItemTitleTooltip:kn}),[st,Cr,Ke,kn,Jt]);return Dr(me.createElement(be.Z.Provider,{value:null},me.createElement(z.Provider,{value:uo},me.createElement(Le.ZP,Object.assign({getPopupContainer:Ge,overflowedIndicator:me.createElement(le.Z,null),overflowedIndicatorPopupClassName:Ce()(st,`${st}-${Jt}`,or),mode:no,selectable:di,onClick:to},pr,{inlineCollapsed:Cr,style:Object.assign(Object.assign({},Ze==null?void 0:Ze.style),nn),className:xo,prefixCls:st,direction:Ke,defaultMotions:zi,expandIcon:Gr,ref:qe,rootClassName:Ce()(ci,Mr)}),cr))))});const mt=(0,me.forwardRef)((Be,qe)=>{const Qe=(0,me.useRef)(null),Ue=me.useContext(Ie.D);return(0,me.useImperativeHandle)(qe,()=>({menu:Qe.current,focus:Xe=>{var Re;(Re=Qe.current)===null||Re===void 0||Re.focus(Xe)}})),me.createElement(Xt,Object.assign({ref:Qe},Be,Ue))});mt.Item=oe,mt.SubMenu=se,mt.Divider=xe,mt.ItemGroup=Le.BW;var ze=mt},58421:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Re}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(Ge,Ke){return me.createElement(Ce.Z,(0,Le.Z)({},Ge,{ref:Ke,icon:Te}))},he=me.forwardRef(_e),Se=he,xe=Ee(49198),ge=Ee(33853),ce=Ee(38819),ve=Ee(92310),de=Ee.n(ve),ue=Ee(400),z=Ee(33708),ee=Ee(6909),oe=Ee(4771),ie=Ee(9427),se=Ee(25440),le=Ee(26112),ye={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},we=ye,be=Ee(91735),ke=function(Ae){(0,ie.Z)(Ke,Ae);var Ge=(0,se.Z)(Ke);function Ke(){var Ze;(0,ee.Z)(this,Ke);for(var at=arguments.length,xt=new Array(at),tn=0;tn<at;tn++)xt[tn]=arguments[tn];return Ze=Ge.call.apply(Ge,[this].concat(xt)),Ze.state={goInputText:""},Ze.getValidValue=function(){var nn=Ze.state.goInputText;return!nn||Number.isNaN(nn)?void 0:Number(nn)},Ze.buildOptionText=function(nn){return"".concat(nn," ").concat(Ze.props.locale.items_per_page)},Ze.changeSize=function(nn){Ze.props.changeSize(Number(nn))},Ze.handleChange=function(nn){Ze.setState({goInputText:nn.target.value})},Ze.handleBlur=function(nn){var Jt=Ze.props,mn=Jt.goButton,kn=Jt.quickGo,fn=Jt.rootPrefixCls,Mn=Ze.state.goInputText;mn||Mn===""||(Ze.setState({goInputText:""}),!(nn.relatedTarget&&(nn.relatedTarget.className.indexOf("".concat(fn,"-item-link"))>=0||nn.relatedTarget.className.indexOf("".concat(fn,"-item"))>=0))&&kn(Ze.getValidValue()))},Ze.go=function(nn){var Jt=Ze.state.goInputText;Jt!==""&&(nn.keyCode===we.ENTER||nn.type==="click")&&(Ze.setState({goInputText:""}),Ze.props.quickGo(Ze.getValidValue()))},Ze}return(0,oe.Z)(Ke,[{key:"getPageSizeOptions",value:function(){var at=this.props,xt=at.pageSize,tn=at.pageSizeOptions;return tn.some(function(nn){return nn.toString()===xt.toString()})?tn:tn.concat([xt.toString()]).sort(function(nn,Jt){var mn=Number.isNaN(Number(nn))?0:Number(nn),kn=Number.isNaN(Number(Jt))?0:Number(Jt);return mn-kn})}},{key:"render",value:function(){var at=this,xt=this.props,tn=xt.pageSize,nn=xt.locale,Jt=xt.rootPrefixCls,mn=xt.changeSize,kn=xt.quickGo,fn=xt.goButton,Mn=xt.selectComponentClass,Zn=xt.buildOptionText,Tn=xt.selectPrefixCls,ci=xt.disabled,ai=this.state.goInputText,ki="".concat(Jt,"-options"),Ci=Mn,or=null,tr=null,pr=null;if(!mn&&!kn)return null;var cr=this.getPageSizeOptions();if(mn&&Ci){var to=cr.map(function(no,di){return me.createElement(Ci.Option,{key:di,value:no.toString()},(Zn||at.buildOptionText)(no))});or=me.createElement(Ci,{disabled:ci,prefixCls:Tn,showSearch:!1,className:"".concat(ki,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(tn||cr[0]).toString(),onChange:this.changeSize,getPopupContainer:function(di){return di.parentNode},"aria-label":nn.page_size,defaultOpen:!1},to)}return kn&&(fn&&(pr=typeof fn=="boolean"?me.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:ci,className:"".concat(ki,"-quick-jumper-button")},nn.jump_to_confirm):me.createElement("span",{onClick:this.go,onKeyUp:this.go},fn)),tr=me.createElement("div",{className:"".concat(ki,"-quick-jumper")},nn.jump_to,me.createElement("input",{disabled:ci,type:"text",value:ai,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":nn.page}),nn.page,pr)),me.createElement("li",{className:"".concat(ki)},or,tr)}}]),Ke}(me.Component);ke.defaultProps={pageSizeOptions:["10","20","50","100"]};var Ne=ke,je=function(Ge){var Ke,Ze=Ge.rootPrefixCls,at=Ge.page,xt=Ge.active,tn=Ge.className,nn=Ge.showTitle,Jt=Ge.onClick,mn=Ge.onKeyPress,kn=Ge.itemRender,fn="".concat(Ze,"-item"),Mn=de()(fn,"".concat(fn,"-").concat(at),(Ke={},(0,ue.Z)(Ke,"".concat(fn,"-active"),xt),(0,ue.Z)(Ke,"".concat(fn,"-disabled"),!at),(0,ue.Z)(Ke,Ge.className,tn),Ke)),Zn=function(){Jt(at)},Tn=function(ki){mn(ki,Jt,at)},ci=kn(at,"page",me.createElement("a",{rel:"nofollow"},at));return ci?me.createElement("li",{title:nn?at.toString():null,className:Mn,onClick:Zn,onKeyPress:Tn,tabIndex:0},ci):null},Ve=je;function Je(){}function We(Ae){var Ge=Number(Ae);return typeof Ge=="number"&&!Number.isNaN(Ge)&&isFinite(Ge)&&Math.floor(Ge)===Ge}var gt=function(Ge,Ke,Ze){return Ze};function ut(Ae,Ge,Ke){var Ze=typeof Ae=="undefined"?Ge.pageSize:Ae;return Math.floor((Ke.total-1)/Ze)+1}var bt=function(Ae){(0,ie.Z)(Ke,Ae);var Ge=(0,se.Z)(Ke);function Ke(Ze){var at;(0,ee.Z)(this,Ke),at=Ge.call(this,Ze),at.paginationNode=me.createRef(),at.getJumpPrevPage=function(){return Math.max(1,at.state.current-(at.props.showLessItems?3:5))},at.getJumpNextPage=function(){return Math.min(ut(void 0,at.state,at.props),at.state.current+(at.props.showLessItems?3:5))},at.getItemIcon=function(mn,kn){var fn=at.props.prefixCls,Mn=mn||me.createElement("button",{type:"button","aria-label":kn,className:"".concat(fn,"-item-link")});return typeof mn=="function"&&(Mn=me.createElement(mn,(0,z.Z)({},at.props))),Mn},at.isValid=function(mn){var kn=at.props.total;return We(mn)&&mn!==at.state.current&&We(kn)&&kn>0},at.shouldDisplayQuickJumper=function(){var mn=at.props,kn=mn.showQuickJumper,fn=mn.total,Mn=at.state.pageSize;return fn<=Mn?!1:kn},at.handleKeyDown=function(mn){(mn.keyCode===we.ARROW_UP||mn.keyCode===we.ARROW_DOWN)&&mn.preventDefault()},at.handleKeyUp=function(mn){var kn=at.getValidValue(mn),fn=at.state.currentInputValue;kn!==fn&&at.setState({currentInputValue:kn}),mn.keyCode===we.ENTER?at.handleChange(kn):mn.keyCode===we.ARROW_UP?at.handleChange(kn-1):mn.keyCode===we.ARROW_DOWN&&at.handleChange(kn+1)},at.handleBlur=function(mn){var kn=at.getValidValue(mn);at.handleChange(kn)},at.changePageSize=function(mn){var kn=at.state.current,fn=ut(mn,at.state,at.props);kn=kn>fn?fn:kn,fn===0&&(kn=at.state.current),typeof mn=="number"&&("pageSize"in at.props||at.setState({pageSize:mn}),"current"in at.props||at.setState({current:kn,currentInputValue:kn})),at.props.onShowSizeChange(kn,mn),"onChange"in at.props&&at.props.onChange&&at.props.onChange(kn,mn)},at.handleChange=function(mn){var kn=at.props,fn=kn.disabled,Mn=kn.onChange,Zn=at.state,Tn=Zn.pageSize,ci=Zn.current,ai=Zn.currentInputValue;if(at.isValid(mn)&&!fn){var ki=ut(void 0,at.state,at.props),Ci=mn;return mn>ki?Ci=ki:mn<1&&(Ci=1),"current"in at.props||at.setState({current:Ci}),Ci!==ai&&at.setState({currentInputValue:Ci}),Mn(Ci,Tn),Ci}return ci},at.prev=function(){at.hasPrev()&&at.handleChange(at.state.current-1)},at.next=function(){at.hasNext()&&at.handleChange(at.state.current+1)},at.jumpPrev=function(){at.handleChange(at.getJumpPrevPage())},at.jumpNext=function(){at.handleChange(at.getJumpNextPage())},at.hasPrev=function(){return at.state.current>1},at.hasNext=function(){return at.state.current<ut(void 0,at.state,at.props)},at.runIfEnter=function(mn,kn){if(mn.key==="Enter"||mn.charCode===13){for(var fn=arguments.length,Mn=new Array(fn>2?fn-2:0),Zn=2;Zn<fn;Zn++)Mn[Zn-2]=arguments[Zn];kn.apply(void 0,Mn)}},at.runIfEnterPrev=function(mn){at.runIfEnter(mn,at.prev)},at.runIfEnterNext=function(mn){at.runIfEnter(mn,at.next)},at.runIfEnterJumpPrev=function(mn){at.runIfEnter(mn,at.jumpPrev)},at.runIfEnterJumpNext=function(mn){at.runIfEnter(mn,at.jumpNext)},at.handleGoTO=function(mn){(mn.keyCode===we.ENTER||mn.type==="click")&&at.handleChange(at.state.currentInputValue)},at.renderPrev=function(mn){var kn=at.props,fn=kn.prevIcon,Mn=kn.itemRender,Zn=Mn(mn,"prev",at.getItemIcon(fn,"prev page")),Tn=!at.hasPrev();return(0,me.isValidElement)(Zn)?(0,me.cloneElement)(Zn,{disabled:Tn}):Zn},at.renderNext=function(mn){var kn=at.props,fn=kn.nextIcon,Mn=kn.itemRender,Zn=Mn(mn,"next",at.getItemIcon(fn,"next page")),Tn=!at.hasNext();return(0,me.isValidElement)(Zn)?(0,me.cloneElement)(Zn,{disabled:Tn}):Zn};var xt=Ze.onChange!==Je,tn="current"in Ze;tn&&!xt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var nn=Ze.defaultCurrent;"current"in Ze&&(nn=Ze.current);var Jt=Ze.defaultPageSize;return"pageSize"in Ze&&(Jt=Ze.pageSize),nn=Math.min(nn,ut(Jt,void 0,Ze)),at.state={current:nn,currentInputValue:nn,pageSize:Jt},at}return(0,oe.Z)(Ke,[{key:"componentDidUpdate",value:function(at,xt){var tn=this.props.prefixCls;if(xt.current!==this.state.current&&this.paginationNode.current){var nn=this.paginationNode.current.querySelector(".".concat(tn,"-item-").concat(xt.current));if(nn&&document.activeElement===nn){var Jt;nn==null||(Jt=nn.blur)===null||Jt===void 0||Jt.call(nn)}}}},{key:"getValidValue",value:function(at){var xt=at.target.value,tn=ut(void 0,this.state,this.props),nn=this.state.currentInputValue,Jt;return xt===""?Jt=xt:Number.isNaN(Number(xt))?Jt=nn:xt>=tn?Jt=tn:Jt=Number(xt),Jt}},{key:"getShowSizeChanger",value:function(){var at=this.props,xt=at.showSizeChanger,tn=at.total,nn=at.totalBoundaryShowSizeChanger;return typeof xt!="undefined"?xt:tn>nn}},{key:"render",value:function(){var at=this.props,xt=at.prefixCls,tn=at.className,nn=at.style,Jt=at.disabled,mn=at.hideOnSinglePage,kn=at.total,fn=at.locale,Mn=at.showQuickJumper,Zn=at.showLessItems,Tn=at.showTitle,ci=at.showTotal,ai=at.simple,ki=at.itemRender,Ci=at.showPrevNextJumpers,or=at.jumpPrevIcon,tr=at.jumpNextIcon,pr=at.selectComponentClass,cr=at.selectPrefixCls,to=at.pageSizeOptions,no=this.state,di=no.current,Cr=no.pageSize,zi=no.currentInputValue;if(mn===!0&&kn<=Cr)return null;var st=ut(void 0,this.state,this.props),Dr=[],Mr=null,xo=null,Gr=null,uo=null,Zr=null,co=Mn&&Mn.goButton,cn=Zn?1:2,$e=di-1>0?di-1:0,tt=di+1<st?di+1:st,et=(0,le.Z)(this.props,{aria:!0,data:!0}),Pt=ci&&me.createElement("li",{className:"".concat(xt,"-total-text")},ci(kn,[kn===0?0:(di-1)*Cr+1,di*Cr>kn?kn:di*Cr]));if(ai){co&&(typeof co=="boolean"?Zr=me.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},fn.jump_to_confirm):Zr=me.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},co),Zr=me.createElement("li",{title:Tn?"".concat(fn.jump_to).concat(di,"/").concat(st):null,className:"".concat(xt,"-simple-pager")},Zr));var At=this.renderPrev($e);return me.createElement("ul",(0,Le.Z)({className:de()(xt,"".concat(xt,"-simple"),(0,ue.Z)({},"".concat(xt,"-disabled"),Jt),tn),style:nn,ref:this.paginationNode},et),Pt,At?me.createElement("li",{title:Tn?fn.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:de()("".concat(xt,"-prev"),(0,ue.Z)({},"".concat(xt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},At):null,me.createElement("li",{title:Tn?"".concat(di,"/").concat(st):null,className:"".concat(xt,"-simple-pager")},me.createElement("input",{type:"text",value:zi,disabled:Jt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),me.createElement("span",{className:"".concat(xt,"-slash")},"/"),st),me.createElement("li",{title:Tn?fn.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:de()("".concat(xt,"-next"),(0,ue.Z)({},"".concat(xt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(tt)),Zr)}if(st<=3+cn*2){var kt={locale:fn,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Tn,itemRender:ki};st||Dr.push(me.createElement(Ve,(0,Le.Z)({},kt,{key:"noPager",page:1,className:"".concat(xt,"-item-disabled")})));for(var Ct=1;Ct<=st;Ct+=1){var dn=di===Ct;Dr.push(me.createElement(Ve,(0,Le.Z)({},kt,{key:Ct,page:Ct,active:dn})))}}else{var _n=Zn?fn.prev_3:fn.prev_5,zn=Zn?fn.next_3:fn.next_5,wn=ki(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(or,"prev page")),Ft=ki(this.getJumpNextPage(),"jump-next",this.getItemIcon(tr,"next page"));Ci&&(Mr=wn?me.createElement("li",{title:Tn?_n:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:de()("".concat(xt,"-jump-prev"),(0,ue.Z)({},"".concat(xt,"-jump-prev-custom-icon"),!!or))},wn):null,xo=Ft?me.createElement("li",{title:Tn?zn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:de()("".concat(xt,"-jump-next"),(0,ue.Z)({},"".concat(xt,"-jump-next-custom-icon"),!!tr))},Ft):null),uo=me.createElement(Ve,{locale:fn,last:!0,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:st,page:st,active:!1,showTitle:Tn,itemRender:ki}),Gr=me.createElement(Ve,{locale:fn,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Tn,itemRender:ki});var $t=Math.max(1,di-cn),bn=Math.min(di+cn,st);di-1<=cn&&(bn=1+cn*2),st-di<=cn&&($t=st-cn*2);for(var An=$t;An<=bn;An+=1){var Gt=di===An;Dr.push(me.createElement(Ve,{locale:fn,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:An,page:An,active:Gt,showTitle:Tn,itemRender:ki}))}di-1>=cn*2&&di!==3&&(Dr[0]=(0,me.cloneElement)(Dr[0],{className:"".concat(xt,"-item-after-jump-prev")}),Dr.unshift(Mr)),st-di>=cn*2&&di!==st-2&&(Dr[Dr.length-1]=(0,me.cloneElement)(Dr[Dr.length-1],{className:"".concat(xt,"-item-before-jump-next")}),Dr.push(xo)),$t!==1&&Dr.unshift(Gr),bn!==st&&Dr.push(uo)}var sn=!this.hasPrev()||!st,Bn=!this.hasNext()||!st,Nn=this.renderPrev($e),qn=this.renderNext(tt);return me.createElement("ul",(0,Le.Z)({className:de()(xt,tn,(0,ue.Z)({},"".concat(xt,"-disabled"),Jt)),style:nn,ref:this.paginationNode},et),Pt,Nn?me.createElement("li",{title:Tn?fn.prev_page:null,onClick:this.prev,tabIndex:sn?null:0,onKeyPress:this.runIfEnterPrev,className:de()("".concat(xt,"-prev"),(0,ue.Z)({},"".concat(xt,"-disabled"),sn)),"aria-disabled":sn},Nn):null,Dr,qn?me.createElement("li",{title:Tn?fn.next_page:null,onClick:this.next,tabIndex:Bn?null:0,onKeyPress:this.runIfEnterNext,className:de()("".concat(xt,"-next"),(0,ue.Z)({},"".concat(xt,"-disabled"),Bn)),"aria-disabled":Bn},qn):null,me.createElement(Ne,{disabled:Jt,locale:fn,rootPrefixCls:xt,selectComponentClass:pr,selectPrefixCls:cr,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:di,pageSize:Cr,pageSizeOptions:to,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:co}))}}],[{key:"getDerivedStateFromProps",value:function(at,xt){var tn={};if("current"in at&&(tn.current=at.current,at.current!==xt.current&&(tn.currentInputValue=tn.current)),"pageSize"in at&&at.pageSize!==xt.pageSize){var nn=xt.current,Jt=ut(at.pageSize,xt,at);nn=nn>Jt?Jt:nn,"current"in at||(tn.current=nn,tn.currentInputValue=nn),tn.pageSize=at.pageSize}return tn}}]),Ke}(me.Component);bt.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Je,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Je,locale:be.Z,style:{},itemRender:gt,totalBoundaryShowSizeChanger:50};var rt=bt,St=Ee(22075),ct=Ee(36355),Bt=Ee(19716),ht=Ee(8628),it=Ee(9763),dt=Ee(57809);const yt=Ae=>me.createElement(dt.default,Object.assign({},Ae,{showSearch:!0,size:"small"})),Et=Ae=>me.createElement(dt.default,Object.assign({},Ae,{showSearch:!0,size:"middle"}));yt.Option=dt.default.Option,Et.Option=dt.default.Option;var vt=Ee(9937),Rt=Ee(17313),jt=Ee(83116),un=Ee(37613);const Vt=Ae=>{const{componentCls:Ge}=Ae;return{[`${Ge}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Ge}-item-link`]:{color:Ae.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Ge}-item-link`]:{color:Ae.colorTextDisabled,cursor:"not-allowed"}}},[`&${Ge}-disabled`]:{cursor:"not-allowed",[`${Ge}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:Ae.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:Ae.colorBorder,backgroundColor:Ae.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:Ae.itemActiveBgDisabled},a:{color:Ae.itemActiveColorDisabled}}},[`${Ge}-item-link`]:{color:Ae.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Ge}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Ge}-simple-pager`]:{color:Ae.colorTextDisabled},[`${Ge}-jump-prev, ${Ge}-jump-next`]:{[`${Ge}-item-link-icon`]:{opacity:0},[`${Ge}-item-ellipsis`]:{opacity:1}}},[`&${Ge}-simple`]:{[`${Ge}-prev, ${Ge}-next`]:{[`&${Ge}-disabled ${Ge}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},xn=Ae=>{const{componentCls:Ge}=Ae;return{[`&${Ge}-mini ${Ge}-total-text, &${Ge}-mini ${Ge}-simple-pager`]:{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`},[`&${Ge}-mini ${Ge}-item`]:{minWidth:Ae.itemSizeSM,height:Ae.itemSizeSM,margin:0,lineHeight:`${Ae.itemSizeSM-2}px`},[`&${Ge}-mini:not(${Ge}-disabled) ${Ge}-item:not(${Ge}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Ae.colorBgTextHover},"&:active":{backgroundColor:Ae.colorBgTextActive}},[`&${Ge}-mini ${Ge}-prev, &${Ge}-mini ${Ge}-next`]:{minWidth:Ae.itemSizeSM,height:Ae.itemSizeSM,margin:0,lineHeight:`${Ae.itemSizeSM}px`},[`&${Ge}-mini:not(${Ge}-disabled)`]:{[`${Ge}-prev, ${Ge}-next`]:{[`&:hover ${Ge}-item-link`]:{backgroundColor:Ae.colorBgTextHover},[`&:active ${Ge}-item-link`]:{backgroundColor:Ae.colorBgTextActive},[`&${Ge}-disabled:hover ${Ge}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${Ge}-mini ${Ge}-prev ${Ge}-item-link,
|
|
|
&${Ge}-mini ${Ge}-next ${Ge}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`}},[`&${Ge}-mini ${Ge}-jump-prev, &${Ge}-mini ${Ge}-jump-next`]:{height:Ae.itemSizeSM,marginInlineEnd:0,lineHeight:`${Ae.itemSizeSM}px`},[`&${Ge}-mini ${Ge}-options`]:{marginInlineStart:Ae.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Ae.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,vt.x0)(Ae)),{width:Ae.paginationMiniQuickJumperInputWidth,height:Ae.controlHeightSM})}}}},Ut=Ae=>{const{componentCls:Ge}=Ae;return{[`
|
|
|
&${Ge}-simple ${Ge}-prev,
|
|
|
&${Ge}-simple ${Ge}-next
|
|
|
`]:{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`,verticalAlign:"top",[`${Ge}-item-link`]:{height:Ae.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:Ae.colorBgTextHover},"&:active":{backgroundColor:Ae.colorBgTextActive},"&::after":{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`}}},[`&${Ge}-simple ${Ge}-simple-pager`]:{display:"inline-block",height:Ae.itemSizeSM,marginInlineEnd:Ae.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:Ae.marginXS,padding:`0 ${Ae.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:Ae.itemInputBg,border:`${Ae.lineWidth}px ${Ae.lineType} ${Ae.colorBorder}`,borderRadius:Ae.borderRadius,outline:"none",transition:`border-color ${Ae.motionDurationMid}`,color:"inherit","&:hover":{borderColor:Ae.colorPrimary},"&:focus":{borderColor:Ae.colorPrimaryHover,boxShadow:`${Ae.inputOutlineOffset}px 0 ${Ae.controlOutlineWidth}px ${Ae.controlOutline}`},"&[disabled]":{color:Ae.colorTextDisabled,backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,cursor:"not-allowed"}}}}},Zt=Ae=>{const{componentCls:Ge}=Ae;return{[`${Ge}-jump-prev, ${Ge}-jump-next`]:{outline:0,[`${Ge}-item-container`]:{position:"relative",[`${Ge}-item-link-icon`]:{color:Ae.colorPrimary,fontSize:Ae.fontSizeSM,opacity:0,transition:`all ${Ae.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Ge}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:Ae.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:Ae.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:Ae.paginationEllipsisTextIndent,opacity:1,transition:`all ${Ae.motionDurationMid}`}},"&:hover":{[`${Ge}-item-link-icon`]:{opacity:1},[`${Ge}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${Ge}-prev,
|
|
|
${Ge}-jump-prev,
|
|
|
${Ge}-jump-next
|
|
|
`]:{marginInlineEnd:Ae.marginXS},[`
|
|
|
${Ge}-prev,
|
|
|
${Ge}-next,
|
|
|
${Ge}-jump-prev,
|
|
|
${Ge}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:Ae.itemSize,height:Ae.itemSize,color:Ae.colorText,fontFamily:Ae.fontFamily,lineHeight:`${Ae.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:Ae.borderRadius,cursor:"pointer",transition:`all ${Ae.motionDurationMid}`},[`${Ge}-prev, ${Ge}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Ae.colorText,cursor:"pointer",userSelect:"none"},[`${Ge}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:Ae.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${Ae.lineWidth}px ${Ae.lineType} transparent`,borderRadius:Ae.borderRadius,outline:"none",transition:`all ${Ae.motionDurationMid}`},[`&:hover ${Ge}-item-link`]:{backgroundColor:Ae.colorBgTextHover},[`&:active ${Ge}-item-link`]:{backgroundColor:Ae.colorBgTextActive},[`&${Ge}-disabled:hover`]:{[`${Ge}-item-link`]:{backgroundColor:"transparent"}}},[`${Ge}-slash`]:{marginInlineEnd:Ae.paginationSlashMarginInlineEnd,marginInlineStart:Ae.paginationSlashMarginInlineStart},[`${Ge}-options`]:{display:"inline-block",marginInlineStart:Ae.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:Ae.controlHeight,marginInlineStart:Ae.marginXS,lineHeight:`${Ae.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,vt.ik)(Ae)),{width:Ae.controlHeightLG*1.25,height:Ae.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Ae.marginXS,marginInlineEnd:Ae.marginXS})}}}},Xt=Ae=>{const{componentCls:Ge}=Ae;return{[`${Ge}-item`]:{display:"inline-block",minWidth:Ae.itemSize,height:Ae.itemSize,marginInlineEnd:Ae.marginXS,fontFamily:Ae.fontFamily,lineHeight:`${Ae.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${Ae.lineWidth}px ${Ae.lineType} transparent`,borderRadius:Ae.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${Ae.paginationItemPaddingInline}px`,color:Ae.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Ge}-item-active)`]:{"&:hover":{transition:`all ${Ae.motionDurationMid}`,backgroundColor:Ae.colorBgTextHover},"&:active":{backgroundColor:Ae.colorBgTextActive}},"&-active":{fontWeight:Ae.fontWeightStrong,backgroundColor:Ae.itemActiveBg,borderColor:Ae.colorPrimary,a:{color:Ae.colorPrimary},"&:hover":{borderColor:Ae.colorPrimaryHover},"&:hover a":{color:Ae.colorPrimaryHover}}}}},mt=Ae=>{const{componentCls:Ge}=Ae;return{[Ge]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Rt.Wf)(Ae)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Ge}-total-text`]:{display:"inline-block",height:Ae.itemSize,marginInlineEnd:Ae.marginXS,lineHeight:`${Ae.itemSize-2}px`,verticalAlign:"middle"}}),Xt(Ae)),Zt(Ae)),Ut(Ae)),xn(Ae)),Vt(Ae)),{[`@media only screen and (max-width: ${Ae.screenLG}px)`]:{[`${Ge}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Ae.screenSM}px)`]:{[`${Ge}-options`]:{display:"none"}}}),[`&${Ae.componentCls}-rtl`]:{direction:"rtl"}}},ze=Ae=>{const{componentCls:Ge}=Ae;return{[`${Ge}${Ge}-disabled:not(${Ge}-mini)`]:{"&, &:hover":{[`${Ge}-item-link`]:{borderColor:Ae.colorBorder}},"&:focus-visible":{[`${Ge}-item-link`]:{borderColor:Ae.colorBorder}},[`${Ge}-item, ${Ge}-item-link`]:{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,[`&:hover:not(${Ge}-item-active)`]:{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,a:{color:Ae.colorTextDisabled}},[`&${Ge}-item-active`]:{backgroundColor:Ae.itemActiveBgDisabled}},[`${Ge}-prev, ${Ge}-next`]:{"&:hover button":{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,color:Ae.colorTextDisabled},[`${Ge}-item-link`]:{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder}}},[`${Ge}:not(${Ge}-mini)`]:{[`${Ge}-prev, ${Ge}-next`]:{"&:hover button":{borderColor:Ae.colorPrimaryHover,backgroundColor:Ae.itemBg},[`${Ge}-item-link`]:{backgroundColor:Ae.itemLinkBg,borderColor:Ae.colorBorder},[`&:hover ${Ge}-item-link`]:{borderColor:Ae.colorPrimary,backgroundColor:Ae.itemBg,color:Ae.colorPrimary},[`&${Ge}-disabled`]:{[`${Ge}-item-link`]:{borderColor:Ae.colorBorder,color:Ae.colorTextDisabled}}},[`${Ge}-item`]:{backgroundColor:Ae.itemBg,border:`${Ae.lineWidth}px ${Ae.lineType} ${Ae.colorBorder}`,[`&:hover:not(${Ge}-item-active)`]:{borderColor:Ae.colorPrimary,backgroundColor:Ae.itemBg,a:{color:Ae.colorPrimary}},"&-active":{borderColor:Ae.colorPrimary}}}}},Be=Ae=>{const{componentCls:Ge}=Ae;return{[`${Ge}:not(${Ge}-disabled)`]:{[`${Ge}-item`]:Object.assign({},(0,Rt.Qy)(Ae)),[`${Ge}-jump-prev, ${Ge}-jump-next`]:{"&:focus-visible":Object.assign({[`${Ge}-item-link-icon`]:{opacity:1},[`${Ge}-item-ellipsis`]:{opacity:0}},(0,Rt.oN)(Ae))},[`${Ge}-prev, ${Ge}-next`]:{[`&:focus-visible ${Ge}-item-link`]:Object.assign({},(0,Rt.oN)(Ae))}}}};var qe=(0,jt.Z)("Pagination",Ae=>{const Ge=(0,un.TS)(Ae,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:Ae.marginXXS/2,paginationMiniQuickJumperInputWidth:Ae.controlHeightLG*1.1,paginationItemPaddingInline:Ae.marginXXS*1.5,paginationEllipsisLetterSpacing:Ae.marginXXS/2,paginationSlashMarginInlineStart:Ae.marginXXS,paginationSlashMarginInlineEnd:Ae.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,vt.e5)(Ae),(0,vt.TM)(Ae));return[mt(Ge),Be(Ge),Ae.wireframe&&ze(Ge)]},Ae=>({itemBg:Ae.colorBgContainer,itemSize:Ae.controlHeight,itemSizeSM:Ae.controlHeightSM,itemActiveBg:Ae.colorBgContainer,itemLinkBg:Ae.colorBgContainer,itemActiveColorDisabled:Ae.colorTextDisabled,itemActiveBgDisabled:Ae.controlItemBgActiveDisabled,itemInputBg:Ae.colorBgContainer,miniOptionsSizeChangerTop:0})),Qe=function(Ae,Ge){var Ke={};for(var Ze in Ae)Object.prototype.hasOwnProperty.call(Ae,Ze)&&Ge.indexOf(Ze)<0&&(Ke[Ze]=Ae[Ze]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Ze=Object.getOwnPropertySymbols(Ae);at<Ze.length;at++)Ge.indexOf(Ze[at])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Ze[at])&&(Ke[Ze[at]]=Ae[Ze[at]]);return Ke},Xe=Ae=>{const{prefixCls:Ge,selectPrefixCls:Ke,className:Ze,rootClassName:at,style:xt,size:tn,locale:nn,selectComponentClass:Jt,responsive:mn,showSizeChanger:kn}=Ae,fn=Qe(Ae,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:Mn}=(0,ht.Z)(mn),{getPrefixCls:Zn,direction:Tn,pagination:ci={}}=me.useContext(ct.E_),ai=Zn("pagination",Ge),[ki,Ci]=qe(ai),or=kn!=null?kn:ci.showSizeChanger,tr=me.useMemo(()=>{const st=me.createElement("span",{className:`${ai}-item-ellipsis`},"\u2022\u2022\u2022"),Dr=me.createElement("button",{className:`${ai}-item-link`,type:"button",tabIndex:-1},Tn==="rtl"?me.createElement(ce.Z,null):me.createElement(ge.Z,null)),Mr=me.createElement("button",{className:`${ai}-item-link`,type:"button",tabIndex:-1},Tn==="rtl"?me.createElement(ge.Z,null):me.createElement(ce.Z,null)),xo=me.createElement("a",{className:`${ai}-item-link`},me.createElement("div",{className:`${ai}-item-container`},Tn==="rtl"?me.createElement(xe.Z,{className:`${ai}-item-link-icon`}):me.createElement(Se,{className:`${ai}-item-link-icon`}),st)),Gr=me.createElement("a",{className:`${ai}-item-link`},me.createElement("div",{className:`${ai}-item-container`},Tn==="rtl"?me.createElement(Se,{className:`${ai}-item-link-icon`}):me.createElement(xe.Z,{className:`${ai}-item-link-icon`}),st));return{prevIcon:Dr,nextIcon:Mr,jumpPrevIcon:xo,jumpNextIcon:Gr}},[Tn,ai]),[pr]=(0,it.Z)("Pagination",St.Z),cr=Object.assign(Object.assign({},pr),nn),to=(0,Bt.Z)(tn),no=to==="small"||!!(Mn&&!to&&mn),di=Zn("select",Ke),Cr=de()({[`${ai}-mini`]:no,[`${ai}-rtl`]:Tn==="rtl"},ci==null?void 0:ci.className,Ze,at,Ci),zi=Object.assign(Object.assign({},ci==null?void 0:ci.style),xt);return ki(me.createElement(rt,Object.assign({},tr,fn,{style:zi,prefixCls:ai,selectPrefixCls:di,className:Cr,selectComponentClass:Jt||(no?yt:Et),locale:cr,showSizeChanger:or})))},Re=Xe},57809:function(Pn,qt,Ee){"use strict";var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(77861),Te=Ee(2738),Ce=Ee(59301),_e=Ee(53487),he=Ee(62892),Se=Ee(19080),xe=Ee(36355),ge=Ee(1684),ce=Ee(93891),ve=Ee(19716),de=Ee(32441),ue=Ee(33234),z=Ee(14154),ee=Ee(58582),oe=Ee(84443),ie=Ee(66339),se=function(ke,Ne){var je={};for(var Ve in ke)Object.prototype.hasOwnProperty.call(ke,Ve)&&Ne.indexOf(Ve)<0&&(je[Ve]=ke[Ve]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Je=0,Ve=Object.getOwnPropertySymbols(ke);Je<Ve.length;Je++)Ne.indexOf(Ve[Je])<0&&Object.prototype.propertyIsEnumerable.call(ke,Ve[Je])&&(je[Ve[Je]]=ke[Ve[Je]]);return je};const le="SECRET_COMBOBOX_MODE_DO_NOT_USE",ye=(ke,Ne)=>{var je,{prefixCls:Ve,bordered:Je=!0,className:We,rootClassName:gt,getPopupContainer:ut,popupClassName:bt,dropdownClassName:rt,listHeight:St=256,placement:ct,listItemHeight:Bt=24,size:ht,disabled:it,notFoundContent:dt,status:yt,builtinPlacements:Et,dropdownMatchSelectWidth:vt,popupMatchSelectWidth:Rt,direction:jt,style:un,allowClear:Vt}=ke,xn=se(ke,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ut,getPrefixCls:Zt,renderEmpty:Xt,direction:mt,virtual:ze,popupMatchSelectWidth:Be,popupOverflow:qe,select:Qe}=Ce.useContext(xe.E_),Ue=Zt("select",Ve),Xe=Zt(),Re=jt!=null?jt:mt,{compactSize:Ae,compactItemClassnames:Ge}=(0,ue.ri)(Ue,Re),[Ke,Ze]=(0,z.Z)(Ue),at=Ce.useMemo(()=>{const{mode:zi}=xn;if(zi!=="combobox")return zi===le?"combobox":zi},[xn.mode]),xt=at==="multiple"||at==="tags",tn=(0,oe.Z)(xn.suffixIcon,xn.showArrow),nn=(je=Rt!=null?Rt:vt)!==null&&je!==void 0?je:Be,{status:Jt,hasFeedback:mn,isFormItemInput:kn,feedbackIcon:fn}=Ce.useContext(de.aM),Mn=(0,Se.F)(Jt,yt);let Zn;dt!==void 0?Zn=dt:at==="combobox"?Zn=null:Zn=(Xt==null?void 0:Xt("Select"))||Ce.createElement(ce.Z,{componentName:"Select"});const{suffixIcon:Tn,itemIcon:ci,removeIcon:ai,clearIcon:ki}=(0,ie.Z)(Object.assign(Object.assign({},xn),{multiple:xt,hasFeedback:mn,feedbackIcon:fn,showSuffixIcon:tn,prefixCls:Ue,showArrow:xn.showArrow,componentName:"Select"})),Ci=Vt===!0?{clearIcon:ki}:Vt,or=(0,Te.Z)(xn,["suffixIcon","itemIcon"]),tr=me()(bt||rt,{[`${Ue}-dropdown-${Re}`]:Re==="rtl"},gt,Ze),pr=(0,ve.Z)(zi=>{var st;return(st=ht!=null?ht:Ae)!==null&&st!==void 0?st:zi}),cr=Ce.useContext(ge.Z),to=it!=null?it:cr,no=me()({[`${Ue}-lg`]:pr==="large",[`${Ue}-sm`]:pr==="small",[`${Ue}-rtl`]:Re==="rtl",[`${Ue}-borderless`]:!Je,[`${Ue}-in-form-item`]:kn},(0,Se.Z)(Ue,Mn,mn),Ge,Qe==null?void 0:Qe.className,We,gt,Ze),di=Ce.useMemo(()=>ct!==void 0?ct:Re==="rtl"?"bottomRight":"bottomLeft",[ct,Re]),Cr=(0,ee.Z)(Et,qe);return Ke(Ce.createElement(Ie.ZP,Object.assign({ref:Ne,virtual:ze,showSearch:Qe==null?void 0:Qe.showSearch},or,{style:Object.assign(Object.assign({},Qe==null?void 0:Qe.style),un),dropdownMatchSelectWidth:nn,builtinPlacements:Cr,transitionName:(0,he.m)(Xe,"slide-up",xn.transitionName),listHeight:St,listItemHeight:Bt,mode:at,prefixCls:Ue,placement:di,direction:Re,suffixIcon:Tn,menuItemSelectedIcon:ci,removeIcon:ai,allowClear:Ci,notFoundContent:Zn,className:no,getPopupContainer:ut||Ut,dropdownClassName:tr,disabled:to})))},we=Ce.forwardRef(ye),be=(0,_e.Z)(we);we.SECRET_COMBOBOX_MODE_DO_NOT_USE=le,we.Option=Ie.Wx,we.OptGroup=Ie.Xo,we._InternalPanelDoNotUseOrYouWillBeFired=be,qt.default=we},14154:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return we}});var Le=Ee(17313),me=Ee(74207),Ie=Ee(37613),Te=Ee(83116),Ce=Ee(13826),_e=Ee(92899);const he=be=>{const{optionHeight:ke,optionFontSize:Ne,optionLineHeight:je,optionPadding:Ve}=be;return{position:"relative",display:"block",minHeight:ke,padding:Ve,color:be.colorText,fontWeight:"normal",fontSize:Ne,lineHeight:je,boxSizing:"border-box"}};var xe=be=>{const{antCls:ke,componentCls:Ne}=be,je=`${Ne}-item`,Ve=`&${ke}-slide-up-enter${ke}-slide-up-enter-active`,Je=`&${ke}-slide-up-appear${ke}-slide-up-appear-active`,We=`&${ke}-slide-up-leave${ke}-slide-up-leave-active`,gt=`${Ne}-dropdown-placement-`;return[{[`${Ne}-dropdown`]:Object.assign(Object.assign({},(0,Le.Wf)(be)),{position:"absolute",top:-9999,zIndex:be.zIndexPopup,boxSizing:"border-box",padding:be.paddingXXS,overflow:"hidden",fontSize:be.fontSize,fontVariant:"initial",backgroundColor:be.colorBgElevated,borderRadius:be.borderRadiusLG,outline:"none",boxShadow:be.boxShadowSecondary,[`
|
|
|
${Ve}${gt}bottomLeft,
|
|
|
${Je}${gt}bottomLeft
|
|
|
`]:{animationName:Ce.fJ},[`
|
|
|
${Ve}${gt}topLeft,
|
|
|
${Je}${gt}topLeft,
|
|
|
${Ve}${gt}topRight,
|
|
|
${Je}${gt}topRight
|
|
|
`]:{animationName:Ce.Qt},[`${We}${gt}bottomLeft`]:{animationName:Ce.Uw},[`
|
|
|
${We}${gt}topLeft,
|
|
|
${We}${gt}topRight
|
|
|
`]:{animationName:Ce.ly},"&-hidden":{display:"none"},[`${je}`]:Object.assign(Object.assign({},he(be)),{cursor:"pointer",transition:`background ${be.motionDurationSlow} ease`,borderRadius:be.borderRadiusSM,"&-group":{color:be.colorTextDescription,fontSize:be.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Le.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${je}-option-disabled)`]:{backgroundColor:be.optionActiveBg},[`&-selected:not(${je}-option-disabled)`]:{color:be.optionSelectedColor,fontWeight:be.optionSelectedFontWeight,backgroundColor:be.optionSelectedBg,[`${je}-option-state`]:{color:be.colorPrimary}},"&-disabled":{[`&${je}-option-selected`]:{backgroundColor:be.colorBgContainerDisabled},color:be.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:be.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,Ce.oN)(be,"slide-up"),(0,Ce.oN)(be,"slide-down"),(0,_e.Fm)(be,"move-up"),(0,_e.Fm)(be,"move-down")]};const ge=2,ce=be=>{let{controlHeightSM:ke,controlHeight:Ne,lineWidth:je}=be;const Ve=(Ne-ke)/2-je,Je=Math.ceil(Ve/2);return[Ve,Je]};function ve(be,ke){const{componentCls:Ne,iconCls:je}=be,Ve=`${Ne}-selection-overflow`,Je=be.multipleSelectItemHeight,[We]=ce(be),gt=ke?`${Ne}-${ke}`:"";return{[`${Ne}-multiple${gt}`]:{fontSize:be.fontSize,[Ve]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ne}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${We-ge}px ${ge*2}px`,borderRadius:be.borderRadius,[`${Ne}-show-search&`]:{cursor:"text"},[`${Ne}-disabled&`]:{background:be.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ge}px 0`,lineHeight:`${Je}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${Ne}-show-arrow ${Ne}-selector,
|
|
|
&${Ne}-allow-clear ${Ne}-selector
|
|
|
`]:{paddingInlineEnd:be.fontSizeIcon+be.controlPaddingHorizontal},[`${Ne}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Je,marginTop:ge,marginBottom:ge,lineHeight:`${Je-be.lineWidth*2}px`,background:be.multipleItemBg,border:`${be.lineWidth}px ${be.lineType} ${be.multipleItemBorderColor}`,borderRadius:be.borderRadiusSM,cursor:"default",transition:`font-size ${be.motionDurationSlow}, line-height ${be.motionDurationSlow}, height ${be.motionDurationSlow}`,userSelect:"none",marginInlineEnd:ge*2,paddingInlineStart:be.paddingXS,paddingInlineEnd:be.paddingXS/2,[`${Ne}-disabled&`]:{color:be.multipleItemColorDisabled,borderColor:be.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:be.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,Le.Ro)()),{display:"inline-flex",alignItems:"center",color:be.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${je}`]:{verticalAlign:"-0.2em"},"&:hover":{color:be.colorIconHover}})},[`${Ve}-item + ${Ve}-item`]:{[`${Ne}-selection-search`]:{marginInlineStart:0}},[`${Ne}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:be.inputPaddingHorizontalBase-We,"\n &-input,\n &-mirror\n ":{height:Je,fontFamily:be.fontFamily,lineHeight:`${Je}px`,transition:`all ${be.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ne}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:be.inputPaddingHorizontalBase,insetInlineEnd:be.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${be.motionDurationSlow}`}}}}var ue=be=>{const{componentCls:ke}=be,Ne=(0,Ie.TS)(be,{controlHeight:be.controlHeightSM,multipleSelectItemHeight:be.controlHeightXS,borderRadius:be.borderRadiusSM,borderRadiusSM:be.borderRadiusXS}),je=(0,Ie.TS)(be,{fontSize:be.fontSizeLG,controlHeight:be.controlHeightLG,multipleSelectItemHeight:be.multipleItemHeightLG,borderRadius:be.borderRadiusLG,borderRadiusSM:be.borderRadius}),[,Ve]=ce(be);return[ve(be),ve(Ne,"sm"),{[`${ke}-multiple${ke}-sm`]:{[`${ke}-selection-placeholder`]:{insetInline:be.controlPaddingHorizontalSM-be.lineWidth},[`${ke}-selection-search`]:{marginInlineStart:Ve}}},ve(je,"lg")]};function z(be,ke){const{componentCls:Ne,inputPaddingHorizontalBase:je,borderRadius:Ve}=be,Je=be.controlHeight-be.lineWidth*2,We=Math.ceil(be.fontSize*1.25),gt=ke?`${Ne}-${ke}`:"";return{[`${Ne}-single${gt}`]:{fontSize:be.fontSize,[`${Ne}-selector`]:Object.assign(Object.assign({},(0,Le.Wf)(be)),{display:"flex",borderRadius:Ve,[`${Ne}-selection-search`]:{position:"absolute",top:0,insetInlineStart:je,insetInlineEnd:je,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${Ne}-selection-item,
|
|
|
${Ne}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${Je}px`,transition:`all ${be.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Je}px`}},[`${Ne}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ne}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ne}-selection-item:after`,`${Ne}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Ne}-show-arrow ${Ne}-selection-item,
|
|
|
&${Ne}-show-arrow ${Ne}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:We},[`&${Ne}-open ${Ne}-selection-item`]:{color:be.colorTextPlaceholder},[`&:not(${Ne}-customize-input)`]:{[`${Ne}-selector`]:{width:"100%",height:be.controlHeight,padding:`0 ${je}px`,[`${Ne}-selection-search-input`]:{height:Je},"&:after":{lineHeight:`${Je}px`}}},[`&${Ne}-customize-input`]:{[`${Ne}-selector`]:{"&:after":{display:"none"},[`${Ne}-selection-search`]:{position:"static",width:"100%"},[`${Ne}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${je}px`,"&:after":{display:"none"}}}}}}}function ee(be){const{componentCls:ke}=be,Ne=be.controlPaddingHorizontalSM-be.lineWidth;return[z(be),z((0,Ie.TS)(be,{controlHeight:be.controlHeightSM,borderRadius:be.borderRadiusSM}),"sm"),{[`${ke}-single${ke}-sm`]:{[`&:not(${ke}-customize-input)`]:{[`${ke}-selection-search`]:{insetInlineStart:Ne,insetInlineEnd:Ne},[`${ke}-selector`]:{padding:`0 ${Ne}px`},[`&${ke}-show-arrow ${ke}-selection-search`]:{insetInlineEnd:Ne+be.fontSize*1.5},[`
|
|
|
&${ke}-show-arrow ${ke}-selection-item,
|
|
|
&${ke}-show-arrow ${ke}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:be.fontSize*1.5}}}},z((0,Ie.TS)(be,{controlHeight:be.singleItemHeightLG,fontSize:be.fontSizeLG,borderRadius:be.borderRadiusLG}),"lg")]}const oe=be=>{const{componentCls:ke,selectorBg:Ne}=be;return{position:"relative",backgroundColor:Ne,border:`${be.lineWidth}px ${be.lineType} ${be.colorBorder}`,transition:`all ${be.motionDurationMid} ${be.motionEaseInOut}`,input:{cursor:"pointer"},[`${ke}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${ke}-disabled&`]:{color:be.colorTextDisabled,background:be.colorBgContainerDisabled,cursor:"not-allowed",[`${ke}-multiple&`]:{background:be.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},ie=function(be,ke){let Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:je,borderHoverColor:Ve,outlineColor:Je,antCls:We}=ke,gt=Ne?{[`${je}-selector`]:{borderColor:Ve}}:{};return{[be]:{[`&:not(${je}-disabled):not(${je}-customize-input):not(${We}-pagination-size-changer)`]:Object.assign(Object.assign({},gt),{[`${je}-focused& ${je}-selector`]:{borderColor:Ve,boxShadow:`0 0 0 ${ke.controlOutlineWidth}px ${Je}`,outline:0},[`&:hover ${je}-selector`]:{borderColor:Ve}})}}},se=be=>{const{componentCls:ke}=be;return{[`${ke}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},le=be=>{const{componentCls:ke,inputPaddingHorizontalBase:Ne,iconCls:je}=be;return{[ke]:Object.assign(Object.assign({},(0,Le.Wf)(be)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${ke}-customize-input) ${ke}-selector`]:Object.assign(Object.assign({},oe(be)),se(be)),[`${ke}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},Le.vS),[`${ke}-selection-placeholder`]:Object.assign(Object.assign({},Le.vS),{flex:1,color:be.colorTextPlaceholder,pointerEvents:"none"}),[`${ke}-arrow`]:Object.assign(Object.assign({},(0,Le.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ne,height:be.fontSizeIcon,marginTop:-be.fontSizeIcon/2,color:be.colorTextQuaternary,fontSize:be.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[je]:{verticalAlign:"top",transition:`transform ${be.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${ke}-suffix)`]:{pointerEvents:"auto"}},[`${ke}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${ke}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ne,zIndex:1,display:"inline-block",width:be.fontSizeIcon,height:be.fontSizeIcon,marginTop:-be.fontSizeIcon/2,color:be.colorTextQuaternary,fontSize:be.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:be.clearBg,cursor:"pointer",opacity:0,transition:`color ${be.motionDurationMid} ease, opacity ${be.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:be.colorTextTertiary}},"&:hover":{[`${ke}-clear`]:{opacity:1}}}),[`${ke}-has-feedback`]:{[`${ke}-clear`]:{insetInlineEnd:Ne+be.fontSize+be.paddingXS}}}},ye=be=>{const{componentCls:ke}=be;return[{[ke]:{[`&-borderless ${ke}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${ke}-in-form-item`]:{width:"100%"}}},le(be),ee(be),ue(be),xe(be),{[`${ke}-rtl`]:{direction:"rtl"}},ie(ke,(0,Ie.TS)(be,{borderHoverColor:be.colorPrimaryHover,outlineColor:be.controlOutline})),ie(`${ke}-status-error`,(0,Ie.TS)(be,{borderHoverColor:be.colorErrorHover,outlineColor:be.colorErrorOutline}),!0),ie(`${ke}-status-warning`,(0,Ie.TS)(be,{borderHoverColor:be.colorWarningHover,outlineColor:be.colorWarningOutline}),!0),(0,me.c)(be,{borderElCls:`${ke}-selector`,focusElCls:`${ke}-focused`})]};var we=(0,Te.Z)("Select",(be,ke)=>{let{rootPrefixCls:Ne}=ke;const je=(0,Ie.TS)(be,{rootPrefixCls:Ne,inputPaddingHorizontalBase:be.paddingSM-1,multipleSelectItemHeight:be.multipleItemHeight});return[ye(je)]},be=>{const{fontSize:ke,lineHeight:Ne,controlHeight:je,controlPaddingHorizontal:Ve,zIndexPopupBase:Je,colorText:We,fontWeightStrong:gt,controlItemBgActive:ut,controlItemBgHover:bt,colorBgContainer:rt,colorFillSecondary:St,controlHeightLG:ct,controlHeightSM:Bt,colorBgContainerDisabled:ht,colorTextDisabled:it}=be;return{zIndexPopup:Je+50,optionSelectedColor:We,optionSelectedFontWeight:gt,optionSelectedBg:ut,optionActiveBg:bt,optionPadding:`${(je-ke*Ne)/2}px ${Ve}px`,optionFontSize:ke,optionLineHeight:Ne,optionHeight:je,selectorBg:rt,clearBg:rt,singleItemHeightLG:ct,multipleItemBg:St,multipleItemBorderColor:"transparent",multipleItemHeight:Bt,multipleItemHeightLG:je,multipleSelectorBgDisabled:ht,multipleItemColorDisabled:it,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});const Le=Ie=>{const Ce={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Ie==="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(Ie,Te){return Ie||Le(Te)}},84443:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Le}});function Le(me,Ie){return Ie!==void 0?Ie:me!==null}},66339:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(40001),me=Ee(19248),Ie=Ee(99267),Te=Ee(84105),Ce=Ee(58617),_e=Ee(47472),he=Ee(59301);function Se(xe){let{suffixIcon:ge,clearIcon:ce,menuItemSelectedIcon:ve,removeIcon:de,loading:ue,multiple:z,hasFeedback:ee,prefixCls:oe,showSuffixIcon:ie,feedbackIcon:se,showArrow:le,componentName:ye}=xe;const we=ce!=null?ce:he.createElement(me.Z,null),be=Ve=>ge===null&&!ee&&!le?null:he.createElement(he.Fragment,null,ie!==!1&&Ve,ee&&se);let ke=null;if(ge!==void 0)ke=be(ge);else if(ue)ke=be(he.createElement(Ce.Z,{spin:!0}));else{const Ve=`${oe}-suffix`;ke=Je=>{let{open:We,showSearch:gt}=Je;return be(We&>?he.createElement(_e.Z,{className:Ve}):he.createElement(Te.Z,{className:Ve}))}}let Ne=null;ve!==void 0?Ne=ve:z?Ne=he.createElement(Le.Z,null):Ne=null;let je=null;return de!==void 0?je=de:je=he.createElement(Ie.Z,null),{clearIcon:we,suffixIcon:ke,itemIcon:Ne,removeIcon:je}}},61621:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return qe}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(59301),Te=Ee(36355),Ce=Ee(2738),he=Qe=>{const{prefixCls:Ue,className:Xe,style:Re,size:Ae,shape:Ge}=Qe,Ke=me()({[`${Ue}-lg`]:Ae==="large",[`${Ue}-sm`]:Ae==="small"}),Ze=me()({[`${Ue}-circle`]:Ge==="circle",[`${Ue}-square`]:Ge==="square",[`${Ue}-round`]:Ge==="round"}),at=Ie.useMemo(()=>typeof Ae=="number"?{width:Ae,height:Ae,lineHeight:`${Ae}px`}:{},[Ae]);return Ie.createElement("span",{className:me()(Ue,Ke,Ze,Xe),style:Object.assign(Object.assign({},at),Re)})},Se=Ee(93083),xe=Ee(83116),ge=Ee(37613);const ce=new Se.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),ve=Qe=>({height:Qe,lineHeight:`${Qe}px`}),de=Qe=>Object.assign({width:Qe},ve(Qe)),ue=Qe=>({background:Qe.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:ce,animationDuration:Qe.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),z=Qe=>Object.assign({width:Qe*5,minWidth:Qe*5},ve(Qe)),ee=Qe=>{const{skeletonAvatarCls:Ue,gradientFromColor:Xe,controlHeight:Re,controlHeightLG:Ae,controlHeightSM:Ge}=Qe;return{[`${Ue}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Xe},de(Re)),[`${Ue}${Ue}-circle`]:{borderRadius:"50%"},[`${Ue}${Ue}-lg`]:Object.assign({},de(Ae)),[`${Ue}${Ue}-sm`]:Object.assign({},de(Ge))}},oe=Qe=>{const{controlHeight:Ue,borderRadiusSM:Xe,skeletonInputCls:Re,controlHeightLG:Ae,controlHeightSM:Ge,gradientFromColor:Ke}=Qe;return{[`${Re}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ke,borderRadius:Xe},z(Ue)),[`${Re}-lg`]:Object.assign({},z(Ae)),[`${Re}-sm`]:Object.assign({},z(Ge))}},ie=Qe=>Object.assign({width:Qe},ve(Qe)),se=Qe=>{const{skeletonImageCls:Ue,imageSizeBase:Xe,gradientFromColor:Re,borderRadiusSM:Ae}=Qe;return{[`${Ue}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Re,borderRadius:Ae},ie(Xe*2)),{[`${Ue}-path`]:{fill:"#bfbfbf"},[`${Ue}-svg`]:Object.assign(Object.assign({},ie(Xe)),{maxWidth:Xe*4,maxHeight:Xe*4}),[`${Ue}-svg${Ue}-svg-circle`]:{borderRadius:"50%"}}),[`${Ue}${Ue}-circle`]:{borderRadius:"50%"}}},le=(Qe,Ue,Xe)=>{const{skeletonButtonCls:Re}=Qe;return{[`${Xe}${Re}-circle`]:{width:Ue,minWidth:Ue,borderRadius:"50%"},[`${Xe}${Re}-round`]:{borderRadius:Ue}}},ye=Qe=>Object.assign({width:Qe*2,minWidth:Qe*2},ve(Qe)),we=Qe=>{const{borderRadiusSM:Ue,skeletonButtonCls:Xe,controlHeight:Re,controlHeightLG:Ae,controlHeightSM:Ge,gradientFromColor:Ke}=Qe;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${Xe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ke,borderRadius:Ue,width:Re*2,minWidth:Re*2},ye(Re))},le(Qe,Re,Xe)),{[`${Xe}-lg`]:Object.assign({},ye(Ae))}),le(Qe,Ae,`${Xe}-lg`)),{[`${Xe}-sm`]:Object.assign({},ye(Ge))}),le(Qe,Ge,`${Xe}-sm`))},be=Qe=>{const{componentCls:Ue,skeletonAvatarCls:Xe,skeletonTitleCls:Re,skeletonParagraphCls:Ae,skeletonButtonCls:Ge,skeletonInputCls:Ke,skeletonImageCls:Ze,controlHeight:at,controlHeightLG:xt,controlHeightSM:tn,gradientFromColor:nn,padding:Jt,marginSM:mn,borderRadius:kn,titleHeight:fn,blockRadius:Mn,paragraphLiHeight:Zn,controlHeightXS:Tn,paragraphMarginTop:ci}=Qe;return{[`${Ue}`]:{display:"table",width:"100%",[`${Ue}-header`]:{display:"table-cell",paddingInlineEnd:Jt,verticalAlign:"top",[`${Xe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:nn},de(at)),[`${Xe}-circle`]:{borderRadius:"50%"},[`${Xe}-lg`]:Object.assign({},de(xt)),[`${Xe}-sm`]:Object.assign({},de(tn))},[`${Ue}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Re}`]:{width:"100%",height:fn,background:nn,borderRadius:Mn,[`+ ${Ae}`]:{marginBlockStart:tn}},[`${Ae}`]:{padding:0,"> li":{width:"100%",height:Zn,listStyle:"none",background:nn,borderRadius:Mn,"+ li":{marginBlockStart:Tn}}},[`${Ae}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Ue}-content`]:{[`${Re}, ${Ae} > li`]:{borderRadius:kn}}},[`${Ue}-with-avatar ${Ue}-content`]:{[`${Re}`]:{marginBlockStart:mn,[`+ ${Ae}`]:{marginBlockStart:ci}}},[`${Ue}${Ue}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},we(Qe)),ee(Qe)),oe(Qe)),se(Qe)),[`${Ue}${Ue}-block`]:{width:"100%",[`${Ge}`]:{width:"100%"},[`${Ke}`]:{width:"100%"}},[`${Ue}${Ue}-active`]:{[`
|
|
|
${Re},
|
|
|
${Ae} > li,
|
|
|
${Xe},
|
|
|
${Ge},
|
|
|
${Ke},
|
|
|
${Ze}
|
|
|
`]:Object.assign({},ue(Qe))}}};var ke=(0,xe.Z)("Skeleton",Qe=>{const{componentCls:Ue}=Qe,Xe=(0,ge.TS)(Qe,{skeletonAvatarCls:`${Ue}-avatar`,skeletonTitleCls:`${Ue}-title`,skeletonParagraphCls:`${Ue}-paragraph`,skeletonButtonCls:`${Ue}-button`,skeletonInputCls:`${Ue}-input`,skeletonImageCls:`${Ue}-image`,imageSizeBase:Qe.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Qe.gradientFromColor} 25%, ${Qe.gradientToColor} 37%, ${Qe.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[be(Xe)]},Qe=>{const{colorFillContent:Ue,colorFill:Xe}=Qe,Re=Ue,Ae=Xe;return{color:Re,colorGradientEnd:Ae,gradientFromColor:Re,gradientToColor:Ae,titleHeight:Qe.controlHeight/2,blockRadius:Qe.borderRadiusSM,paragraphMarginTop:Qe.marginLG+Qe.marginXXS,paragraphLiHeight:Qe.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),je=Qe=>{const{prefixCls:Ue,className:Xe,rootClassName:Re,active:Ae,shape:Ge="circle",size:Ke="default"}=Qe,{getPrefixCls:Ze}=Ie.useContext(Te.E_),at=Ze("skeleton",Ue),[xt,tn]=ke(at),nn=(0,Ce.Z)(Qe,["prefixCls","className"]),Jt=me()(at,`${at}-element`,{[`${at}-active`]:Ae},Xe,Re,tn);return xt(Ie.createElement("div",{className:Jt},Ie.createElement(he,Object.assign({prefixCls:`${at}-avatar`,shape:Ge,size:Ke},nn))))},Je=Qe=>{const{prefixCls:Ue,className:Xe,rootClassName:Re,active:Ae,block:Ge=!1,size:Ke="default"}=Qe,{getPrefixCls:Ze}=Ie.useContext(Te.E_),at=Ze("skeleton",Ue),[xt,tn]=ke(at),nn=(0,Ce.Z)(Qe,["prefixCls"]),Jt=me()(at,`${at}-element`,{[`${at}-active`]:Ae,[`${at}-block`]:Ge},Xe,Re,tn);return xt(Ie.createElement("div",{className:Jt},Ie.createElement(he,Object.assign({prefixCls:`${at}-button`,size:Ke},nn))))};const We="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 ut=Qe=>{const{prefixCls:Ue,className:Xe,rootClassName:Re,style:Ae,active:Ge}=Qe,{getPrefixCls:Ke}=Ie.useContext(Te.E_),Ze=Ke("skeleton",Ue),[at,xt]=ke(Ze),tn=me()(Ze,`${Ze}-element`,{[`${Ze}-active`]:Ge},Xe,Re,xt);return at(Ie.createElement("div",{className:tn},Ie.createElement("div",{className:me()(`${Ze}-image`,Xe),style:Ae},Ie.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Ze}-image-svg`},Ie.createElement("path",{d:We,className:`${Ze}-image-path`})))))},rt=Qe=>{const{prefixCls:Ue,className:Xe,rootClassName:Re,active:Ae,block:Ge,size:Ke="default"}=Qe,{getPrefixCls:Ze}=Ie.useContext(Te.E_),at=Ze("skeleton",Ue),[xt,tn]=ke(at),nn=(0,Ce.Z)(Qe,["prefixCls"]),Jt=me()(at,`${at}-element`,{[`${at}-active`]:Ae,[`${at}-block`]:Ge},Xe,Re,tn);return xt(Ie.createElement("div",{className:Jt},Ie.createElement(he,Object.assign({prefixCls:`${at}-input`,size:Ke},nn))))},St=Ee(92413),ct={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"},Bt=ct,ht=Ee(7657),it=function(Ue,Xe){return Ie.createElement(ht.Z,(0,St.Z)({},Ue,{ref:Xe,icon:Bt}))},dt=Ie.forwardRef(it),yt=dt,vt=Qe=>{const{prefixCls:Ue,className:Xe,rootClassName:Re,style:Ae,active:Ge,children:Ke}=Qe,{getPrefixCls:Ze}=Ie.useContext(Te.E_),at=Ze("skeleton",Ue),[xt,tn]=ke(at),nn=me()(at,`${at}-element`,{[`${at}-active`]:Ge},tn,Xe,Re),Jt=Ke!=null?Ke:Ie.createElement(yt,null);return xt(Ie.createElement("div",{className:nn},Ie.createElement("div",{className:me()(`${at}-image`,Xe),style:Ae},Jt)))},Rt=Ee(26407),un=Qe=>{const Ue=Ze=>{const{width:at,rows:xt=2}=Qe;if(Array.isArray(at))return at[Ze];if(xt-1===Ze)return at},{prefixCls:Xe,className:Re,style:Ae,rows:Ge}=Qe,Ke=(0,Rt.Z)(Array(Ge)).map((Ze,at)=>Ie.createElement("li",{key:at,style:{width:Ue(at)}}));return Ie.createElement("ul",{className:me()(Xe,Re),style:Ae},Ke)},xn=Qe=>{let{prefixCls:Ue,className:Xe,width:Re,style:Ae}=Qe;return Ie.createElement("h3",{className:me()(Ue,Xe),style:Object.assign({width:Re},Ae)})};function Ut(Qe){return Qe&&typeof Qe=="object"?Qe:{}}function Zt(Qe,Ue){return Qe&&!Ue?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Xt(Qe,Ue){return!Qe&&Ue?{width:"38%"}:Qe&&Ue?{width:"50%"}:{}}function mt(Qe,Ue){const Xe={};return(!Qe||!Ue)&&(Xe.width="61%"),!Qe&&Ue?Xe.rows=3:Xe.rows=2,Xe}const ze=Qe=>{const{prefixCls:Ue,loading:Xe,className:Re,rootClassName:Ae,style:Ge,children:Ke,avatar:Ze=!1,title:at=!0,paragraph:xt=!0,active:tn,round:nn}=Qe,{getPrefixCls:Jt,direction:mn,skeleton:kn}=Ie.useContext(Te.E_),fn=Jt("skeleton",Ue),[Mn,Zn]=ke(fn);if(Xe||!("loading"in Qe)){const Tn=!!Ze,ci=!!at,ai=!!xt;let ki;if(Tn){const tr=Object.assign(Object.assign({prefixCls:`${fn}-avatar`},Zt(ci,ai)),Ut(Ze));ki=Ie.createElement("div",{className:`${fn}-header`},Ie.createElement(he,Object.assign({},tr)))}let Ci;if(ci||ai){let tr;if(ci){const cr=Object.assign(Object.assign({prefixCls:`${fn}-title`},Xt(Tn,ai)),Ut(at));tr=Ie.createElement(xn,Object.assign({},cr))}let pr;if(ai){const cr=Object.assign(Object.assign({prefixCls:`${fn}-paragraph`},mt(Tn,ci)),Ut(xt));pr=Ie.createElement(un,Object.assign({},cr))}Ci=Ie.createElement("div",{className:`${fn}-content`},tr,pr)}const or=me()(fn,{[`${fn}-with-avatar`]:Tn,[`${fn}-active`]:tn,[`${fn}-rtl`]:mn==="rtl",[`${fn}-round`]:nn},kn==null?void 0:kn.className,Re,Ae,Zn);return Mn(Ie.createElement("div",{className:or,style:Object.assign(Object.assign({},kn==null?void 0:kn.style),Ge)},ki,Ci))}return typeof Ke!="undefined"?Ke:null};ze.Button=Je,ze.Avatar=je,ze.Input=rt,ze.Image=ut,ze.Node=vt;var Be=ze,qe=Be},81327:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return oe}});var Le=Ee(59301),me=Ee(92310),Ie=Ee.n(me),Te=Ee(11592),Ce=Ee(36355),_e=Ee(33234);const he=Le.createContext({latestIndex:0}),Se=he.Provider;var ge=ie=>{let{className:se,index:le,children:ye,split:we,style:be}=ie;const{latestIndex:ke}=Le.useContext(he);return ye==null?null:Le.createElement(Le.Fragment,null,Le.createElement("div",{className:se,style:be},ye),le<ke&&we&&Le.createElement("span",{className:`${se}-split`},we))},ce=Ee(2856);function ve(ie){return["small","middle","large"].includes(ie)}function de(ie){return ie?typeof ie=="number"&&!Number.isNaN(ie):!1}var ue=function(ie,se){var le={};for(var ye in ie)Object.prototype.hasOwnProperty.call(ie,ye)&&se.indexOf(ye)<0&&(le[ye]=ie[ye]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ye=Object.getOwnPropertySymbols(ie);we<ye.length;we++)se.indexOf(ye[we])<0&&Object.prototype.propertyIsEnumerable.call(ie,ye[we])&&(le[ye[we]]=ie[ye[we]]);return le};const ee=Le.forwardRef((ie,se)=>{var le,ye;const{getPrefixCls:we,space:be,direction:ke}=Le.useContext(Ce.E_),{size:Ne=(be==null?void 0:be.size)||"small",align:je,className:Ve,rootClassName:Je,children:We,direction:gt="horizontal",prefixCls:ut,split:bt,style:rt,wrap:St=!1,classNames:ct,styles:Bt}=ie,ht=ue(ie,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[it,dt]=Array.isArray(Ne)?Ne:[Ne,Ne],yt=ve(dt),Et=ve(it),vt=de(dt),Rt=de(it),jt=(0,Te.Z)(We,{keepEmpty:!0}),un=je===void 0&>==="horizontal"?"center":je,Vt=we("space",ut),[xn,Ut]=(0,ce.Z)(Vt),Zt=Ie()(Vt,be==null?void 0:be.className,Ut,`${Vt}-${gt}`,{[`${Vt}-rtl`]:ke==="rtl",[`${Vt}-align-${un}`]:un,[`${Vt}-gap-row-${dt}`]:yt,[`${Vt}-gap-col-${it}`]:Et},Ve,Je),Xt=Ie()(`${Vt}-item`,(le=ct==null?void 0:ct.item)!==null&&le!==void 0?le:(ye=be==null?void 0:be.classNames)===null||ye===void 0?void 0:ye.item);let mt=0;const ze=jt.map((Qe,Ue)=>{var Xe,Re;Qe!=null&&(mt=Ue);const Ae=Qe&&Qe.key||`${Xt}-${Ue}`;return Le.createElement(ge,{className:Xt,key:Ae,index:Ue,split:bt,style:(Xe=Bt==null?void 0:Bt.item)!==null&&Xe!==void 0?Xe:(Re=be==null?void 0:be.styles)===null||Re===void 0?void 0:Re.item},Qe)}),Be=Le.useMemo(()=>({latestIndex:mt}),[mt]);if(jt.length===0)return null;const qe={};return St&&(qe.flexWrap="wrap"),!Et&&Rt&&(qe.columnGap=it),!yt&&vt&&(qe.rowGap=dt),xn(Le.createElement("div",Object.assign({ref:se,className:Zt,style:Object.assign(Object.assign(Object.assign({},qe),be==null?void 0:be.style),rt)},ht),Le.createElement(Se,{value:Be},ze)))});ee.Compact=_e.ZP;var oe=ee},31797:function(Pn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return ke}});var Le=Ee(59301),me=Ee(56762),Ie=Ee(92343),Te=Ee(92310),Ce=Ee.n(Te),_e=Ee(36355),he=Ee(61621),xe=Ne=>{const{value:je,formatter:Ve,precision:Je,decimalSeparator:We,groupSeparator:gt="",prefixCls:ut}=Ne;let bt;if(typeof Ve=="function")bt=Ve(je);else{const rt=String(je),St=rt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!St||rt==="-")bt=rt;else{const ct=St[1];let Bt=St[2]||"0",ht=St[4]||"";Bt=Bt.replace(/\B(?=(\d{3})+(?!\d))/g,gt),typeof Je=="number"&&(ht=ht.padEnd(Je,"0").slice(0,Je>0?Je:0)),ht&&(ht=`${We}${ht}`),bt=[Le.createElement("span",{key:"int",className:`${ut}-content-value-int`},ct,Bt),ht&&Le.createElement("span",{key:"decimal",className:`${ut}-content-value-decimal`},ht)]}}return Le.createElement("span",{className:`${ut}-content-value`},bt)},ge=Ee(17313),ce=Ee(83116),ve=Ee(37613);const de=Ne=>{const{componentCls:je,marginXXS:Ve,padding:Je,colorTextDescription:We,titleFontSize:gt,colorTextHeading:ut,contentFontSize:bt,fontFamily:rt}=Ne;return{[`${je}`]:Object.assign(Object.assign({},(0,ge.Wf)(Ne)),{[`${je}-title`]:{marginBottom:Ve,color:We,fontSize:gt},[`${je}-skeleton`]:{paddingTop:Je},[`${je}-content`]:{color:ut,fontSize:bt,fontFamily:rt,[`${je}-content-value`]:{display:"inline-block",direction:"ltr"},[`${je}-content-prefix, ${je}-content-suffix`]:{display:"inline-block"},[`${je}-content-prefix`]:{marginInlineEnd:Ve},[`${je}-content-suffix`]:{marginInlineStart:Ve}}})}};var ue=(0,ce.Z)("Statistic",Ne=>{const je=(0,ve.TS)(Ne,{});return[de(je)]},Ne=>{const{fontSizeHeading3:je,fontSize:Ve}=Ne;return{titleFontSize:Ve,contentFontSize:je}}),ee=Ne=>{const{prefixCls:je,className:Ve,rootClassName:Je,style:We,valueStyle:gt,value:ut=0,title:bt,valueRender:rt,prefix:St,suffix:ct,loading:Bt=!1,onMouseEnter:ht,onMouseLeave:it,decimalSeparator:dt=".",groupSeparator:yt=","}=Ne,{getPrefixCls:Et,direction:vt,statistic:Rt}=Le.useContext(_e.E_),jt=Et("statistic",je),[un,Vt]=ue(jt),xn=Le.createElement(xe,Object.assign({decimalSeparator:dt,groupSeparator:yt,prefixCls:jt},Ne,{value:ut})),Ut=Ce()(jt,{[`${jt}-rtl`]:vt==="rtl"},Rt==null?void 0:Rt.className,Ve,Je,Vt);return un(Le.createElement("div",{className:Ut,style:Object.assign(Object.assign({},Rt==null?void 0:Rt.style),We),onMouseEnter:ht,onMouseLeave:it},bt&&Le.createElement("div",{className:`${jt}-title`},bt),Le.createElement(he.Z,{paragraph:!1,loading:Bt,className:`${jt}-skeleton`},Le.createElement("div",{style:gt,className:`${jt}-content`},St&&Le.createElement("span",{className:`${jt}-content-prefix`},St),rt?rt(xn):xn,ct&&Le.createElement("span",{className:`${jt}-content-suffix`},ct)))))};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(Ne,je){let Ve=Ne;const Je=/\[[^\]]*]/g,We=(je.match(Je)||[]).map(rt=>rt.slice(1,-1)),gt=je.replace(Je,"[]"),ut=oe.reduce((rt,St)=>{let[ct,Bt]=St;if(rt.includes(ct)){const ht=Math.floor(Ve/Bt);return Ve-=ht*Bt,rt.replace(new RegExp(`${ct}+`,"g"),it=>{const dt=it.length;return ht.toString().padStart(dt,"0")})}return rt},gt);let bt=0;return ut.replace(Je,()=>{const rt=We[bt];return bt+=1,rt})}function se(Ne,je){const{format:Ve=""}=je,Je=new Date(Ne).getTime(),We=Date.now(),gt=Math.max(Je-We,0);return ie(gt,Ve)}const le=1e3/30;function ye(Ne){return new Date(Ne).getTime()}const we=Ne=>{const{value:je,format:Ve="HH:mm:ss",onChange:Je,onFinish:We}=Ne,gt=(0,me.Z)(),ut=Le.useRef(null),bt=()=>{We==null||We(),ut.current&&(clearInterval(ut.current),ut.current=null)},rt=()=>{const Bt=ye(je);Bt>=Date.now()&&(ut.current=setInterval(()=>{gt(),Je==null||Je(Bt-Date.now()),Bt<Date.now()&&bt()},le))};Le.useEffect(()=>(rt(),()=>{ut.current&&(clearInterval(ut.current),ut.current=null)}),[je]);const St=(Bt,ht)=>se(Bt,Object.assign(Object.assign({},ht),{format:Ve})),ct=Bt=>(0,Ie.Tm)(Bt,{title:void 0});return Le.createElement(ee,Object.assign({},Ne,{valueRender:ct,formatter:St}))};var be=Le.memo(we);ee.Countdown=be;var ke=ee},15969:function(Pn,qt,Ee){"use strict";Ee.d(qt,{N:function(){return Le}});const Le=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(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return gt}});var Le=Ee(58617),me=Ee(92310),Ie=Ee.n(me),Te=Ee(92413),Ce=Ee(400),_e=Ee(33606),he=Ee(37061),Se=Ee(59301),xe=Ee(18929),ge=Ee(10228),ce=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ve=Se.forwardRef(function(ut,bt){var rt,St=ut.prefixCls,ct=St===void 0?"rc-switch":St,Bt=ut.className,ht=ut.checked,it=ut.defaultChecked,dt=ut.disabled,yt=ut.loadingIcon,Et=ut.checkedChildren,vt=ut.unCheckedChildren,Rt=ut.onClick,jt=ut.onChange,un=ut.onKeyDown,Vt=(0,he.Z)(ut,ce),xn=(0,xe.Z)(!1,{value:ht,defaultValue:it}),Ut=(0,_e.Z)(xn,2),Zt=Ut[0],Xt=Ut[1];function mt(Qe,Ue){var Xe=Zt;return dt||(Xe=Qe,Xt(Xe),jt==null||jt(Xe,Ue)),Xe}function ze(Qe){Qe.which===ge.Z.LEFT?mt(!1,Qe):Qe.which===ge.Z.RIGHT&&mt(!0,Qe),un==null||un(Qe)}function Be(Qe){var Ue=mt(!Zt,Qe);Rt==null||Rt(Ue,Qe)}var qe=Ie()(ct,Bt,(rt={},(0,Ce.Z)(rt,"".concat(ct,"-checked"),Zt),(0,Ce.Z)(rt,"".concat(ct,"-disabled"),dt),rt));return Se.createElement("button",(0,Te.Z)({},Vt,{type:"button",role:"switch","aria-checked":Zt,disabled:dt,className:qe,ref:bt,onKeyDown:ze,onClick:Be}),yt,Se.createElement("span",{className:"".concat(ct,"-inner")},Se.createElement("span",{className:"".concat(ct,"-inner-checked")},Et),Se.createElement("span",{className:"".concat(ct,"-inner-unchecked")},vt)))});ve.displayName="Switch";var de=ve,ue=Ee(14088),z=Ee(36355),ee=Ee(1684),oe=Ee(19716),ie=Ee(64993),se=Ee(17313),le=Ee(83116),ye=Ee(37613);const we=ut=>{const{componentCls:bt,trackHeightSM:rt,trackPadding:St,trackMinWidthSM:ct,innerMinMarginSM:Bt,innerMaxMarginSM:ht,handleSizeSM:it}=ut,dt=`${bt}-inner`;return{[bt]:{[`&${bt}-small`]:{minWidth:ct,height:rt,lineHeight:`${rt}px`,[`${bt}-inner`]:{paddingInlineStart:ht,paddingInlineEnd:Bt,[`${dt}-checked`]:{marginInlineStart:`calc(-100% + ${it+St*2}px - ${ht*2}px)`,marginInlineEnd:`calc(100% - ${it+St*2}px + ${ht*2}px)`},[`${dt}-unchecked`]:{marginTop:-rt,marginInlineStart:0,marginInlineEnd:0}},[`${bt}-handle`]:{width:it,height:it},[`${bt}-loading-icon`]:{top:(it-ut.switchLoadingIconSize)/2,fontSize:ut.switchLoadingIconSize},[`&${bt}-checked`]:{[`${bt}-inner`]:{paddingInlineStart:Bt,paddingInlineEnd:ht,[`${dt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${dt}-unchecked`]:{marginInlineStart:`calc(100% - ${it+St*2}px + ${ht*2}px)`,marginInlineEnd:`calc(-100% + ${it+St*2}px - ${ht*2}px)`}},[`${bt}-handle`]:{insetInlineStart:`calc(100% - ${it+St}px)`}},[`&:not(${bt}-disabled):active`]:{[`&:not(${bt}-checked) ${dt}`]:{[`${dt}-unchecked`]:{marginInlineStart:ut.marginXXS/2,marginInlineEnd:-ut.marginXXS/2}},[`&${bt}-checked ${dt}`]:{[`${dt}-checked`]:{marginInlineStart:-ut.marginXXS/2,marginInlineEnd:ut.marginXXS/2}}}}}}},be=ut=>{const{componentCls:bt,handleSize:rt}=ut;return{[bt]:{[`${bt}-loading-icon${ut.iconCls}`]:{position:"relative",top:(rt-ut.fontSize)/2,color:ut.switchLoadingIconColor,verticalAlign:"top"},[`&${bt}-checked ${bt}-loading-icon`]:{color:ut.switchColor}}}},ke=ut=>{const{componentCls:bt,motion:rt,trackPadding:St,handleBg:ct,handleShadow:Bt,handleSize:ht}=ut,it=`${bt}-handle`;return{[bt]:{[it]:{position:"absolute",top:St,insetInlineStart:St,width:ht,height:ht,transition:`all ${ut.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:ct,borderRadius:ht/2,boxShadow:Bt,transition:`all ${ut.switchDuration} ease-in-out`,content:'""'}},[`&${bt}-checked ${it}`]:{insetInlineStart:`calc(100% - ${ht+St}px)`},[`&:not(${bt}-disabled):active`]:rt?{[`${it}::before`]:{insetInlineEnd:ut.switchHandleActiveInset,insetInlineStart:0},[`&${bt}-checked ${it}::before`]:{insetInlineEnd:0,insetInlineStart:ut.switchHandleActiveInset}}:{}}}},Ne=ut=>{const{componentCls:bt,trackHeight:rt,trackPadding:St,innerMinMargin:ct,innerMaxMargin:Bt,handleSize:ht}=ut,it=`${bt}-inner`;return{[bt]:{[it]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Bt,paddingInlineEnd:ct,transition:`padding-inline-start ${ut.switchDuration} ease-in-out, padding-inline-end ${ut.switchDuration} ease-in-out`,[`${it}-checked, ${it}-unchecked`]:{display:"block",color:ut.colorTextLightSolid,fontSize:ut.fontSizeSM,transition:`margin-inline-start ${ut.switchDuration} ease-in-out, margin-inline-end ${ut.switchDuration} ease-in-out`,pointerEvents:"none"},[`${it}-checked`]:{marginInlineStart:`calc(-100% + ${ht+St*2}px - ${Bt*2}px)`,marginInlineEnd:`calc(100% - ${ht+St*2}px + ${Bt*2}px)`},[`${it}-unchecked`]:{marginTop:-rt,marginInlineStart:0,marginInlineEnd:0}},[`&${bt}-checked ${it}`]:{paddingInlineStart:ct,paddingInlineEnd:Bt,[`${it}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${it}-unchecked`]:{marginInlineStart:`calc(100% - ${ht+St*2}px + ${Bt*2}px)`,marginInlineEnd:`calc(-100% + ${ht+St*2}px - ${Bt*2}px)`}},[`&:not(${bt}-disabled):active`]:{[`&:not(${bt}-checked) ${it}`]:{[`${it}-unchecked`]:{marginInlineStart:St*2,marginInlineEnd:-St*2}},[`&${bt}-checked ${it}`]:{[`${it}-checked`]:{marginInlineStart:-St*2,marginInlineEnd:St*2}}}}}},je=ut=>{const{componentCls:bt,trackHeight:rt,trackMinWidth:St}=ut;return{[bt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,se.Wf)(ut)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:St,height:rt,lineHeight:`${rt}px`,verticalAlign:"middle",background:ut.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${ut.motionDurationMid}`,userSelect:"none",[`&:hover:not(${bt}-disabled)`]:{background:ut.colorTextTertiary}}),(0,se.Qy)(ut)),{[`&${bt}-checked`]:{background:ut.switchColor,[`&:hover:not(${bt}-disabled)`]:{background:ut.colorPrimaryHover}},[`&${bt}-loading, &${bt}-disabled`]:{cursor:"not-allowed",opacity:ut.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${bt}-rtl`]:{direction:"rtl"}})}};var Ve=(0,le.Z)("Switch",ut=>{const bt=(0,ye.TS)(ut,{switchDuration:ut.motionDurationMid,switchColor:ut.colorPrimary,switchDisabledOpacity:ut.opacityLoading,switchLoadingIconSize:ut.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${ut.opacityLoading})`,switchHandleActiveInset:"-30%"});return[je(bt),Ne(bt),ke(bt),be(bt),we(bt)]},ut=>{const{fontSize:bt,lineHeight:rt,controlHeight:St,colorWhite:ct}=ut,Bt=bt*rt,ht=St/2,it=2,dt=Bt-it*2,yt=ht-it*2;return{trackHeight:Bt,trackHeightSM:ht,trackMinWidth:dt*2+it*4,trackMinWidthSM:yt*2+it*2,trackPadding:it,handleBg:ct,handleSize:dt,handleSizeSM:yt,handleShadow:`0 2px 4px 0 ${new ie.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:dt/2,innerMaxMargin:dt+it+it*2,innerMinMarginSM:yt/2,innerMaxMarginSM:yt+it+it*2}}),Je=function(ut,bt){var rt={};for(var St in ut)Object.prototype.hasOwnProperty.call(ut,St)&&bt.indexOf(St)<0&&(rt[St]=ut[St]);if(ut!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,St=Object.getOwnPropertySymbols(ut);ct<St.length;ct++)bt.indexOf(St[ct])<0&&Object.prototype.propertyIsEnumerable.call(ut,St[ct])&&(rt[St[ct]]=ut[St[ct]]);return rt};const We=Se.forwardRef((ut,bt)=>{const{prefixCls:rt,size:St,disabled:ct,loading:Bt,className:ht,rootClassName:it,style:dt}=ut,yt=Je(ut,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Et,direction:vt,switch:Rt}=Se.useContext(z.E_),jt=Se.useContext(ee.Z),un=(ct!=null?ct:jt)||Bt,Vt=Et("switch",rt),xn=Se.createElement("div",{className:`${Vt}-handle`},Bt&&Se.createElement(Le.Z,{className:`${Vt}-loading-icon`})),[Ut,Zt]=Ve(Vt),Xt=(0,oe.Z)(St),mt=Ie()(Rt==null?void 0:Rt.className,{[`${Vt}-small`]:Xt==="small",[`${Vt}-loading`]:Bt,[`${Vt}-rtl`]:vt==="rtl"},ht,it,Zt),ze=Object.assign(Object.assign({},Rt==null?void 0:Rt.style),dt);return Ut(Se.createElement(ue.Z,{component:"Switch"},Se.createElement(de,Object.assign({},yt,{prefixCls:Vt,className:mt,style:ze,disabled:un,ref:bt,loadingIcon:xn}))))});We.__ANT_SWITCH=!0;var gt=We},1710:function(Pn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return gf}});var Le={},me="rc-table-internal-hook",Ie=Ee(33606),Te=Ee(6089),Ce=Ee(34280),_e=Ee(13697),he=Ee(59301),Se=Ee(4676);function xe(Dt){var zt=he.createContext(void 0),ln=function(_t){var Lt=_t.value,Sn=_t.children,hn=he.useRef(Lt);hn.current=Lt;var on=he.useState(function(){return{getValue:function(){return hn.current},listeners:new Set}}),vn=(0,Ie.Z)(on,1),yn=vn[0];return(0,Ce.Z)(function(){(0,Se.unstable_batchedUpdates)(function(){yn.listeners.forEach(function(Cn){Cn(Lt)})})},[Lt]),he.createElement(zt.Provider,{value:yn},Sn)};return{Context:zt,Provider:ln,defaultValue:Dt}}function ge(Dt,zt){var ln=(0,Te.Z)(typeof zt=="function"?zt:function(Cn){if(zt===void 0)return Cn;if(!Array.isArray(zt))return Cn[zt];var jn={};return zt.forEach(function(ti){jn[ti]=Cn[ti]}),jn}),pt=he.useContext(Dt==null?void 0:Dt.Context),_t=pt||{},Lt=_t.listeners,Sn=_t.getValue,hn=he.useRef();hn.current=ln(pt?Sn():Dt==null?void 0:Dt.defaultValue);var on=he.useState({}),vn=(0,Ie.Z)(on,2),yn=vn[1];return(0,Ce.Z)(function(){if(!pt)return;function Cn(jn){var ti=ln(jn);(0,_e.Z)(hn.current,ti,!0)||yn({})}return Lt.add(Cn),function(){Lt.delete(Cn)}},[pt]),hn.current}var ce=Ee(92413),ve=Ee(8654);function de(){var Dt=he.createContext(null);function zt(){return he.useContext(Dt)}function ln(_t,Lt){var Sn=(0,ve.Yr)(_t),hn=function(vn,yn){var Cn=Sn?{ref:yn}:{},jn=he.useRef(0),ti=he.useRef(vn),Kn=zt();return Kn!==null?he.createElement(_t,(0,ce.Z)({},vn,Cn)):((!Lt||Lt(ti.current,vn))&&(jn.current+=1),ti.current=vn,he.createElement(Dt.Provider,{value:jn.current},he.createElement(_t,(0,ce.Z)({},vn,Cn))))};return Sn?he.forwardRef(hn):hn}function pt(_t,Lt){var Sn=(0,ve.Yr)(_t),hn=function(vn,yn){var Cn=Sn?{ref:yn}:{};return zt(),he.createElement(_t,(0,ce.Z)({},vn,Cn))};return Sn?he.memo(he.forwardRef(hn),Lt):he.memo(hn,Lt)}return{makeImmutable:ln,responseImmutable:pt,useImmutableMark:zt}}var ue=de(),z=ue.makeImmutable,ee=ue.responseImmutable,oe=ue.useImmutableMark,ie=de(),se=ie.makeImmutable,le=ie.responseImmutable,ye=ie.useImmutableMark,we=xe(),be=we;function ke(Dt,zt){var ln=he.useRef(0);ln.current+=1;var pt=he.useRef(Dt),_t=[];Object.keys(Dt||{}).map(function(Sn){var hn;(Dt==null?void 0:Dt[Sn])!==((hn=pt.current)===null||hn===void 0?void 0:hn[Sn])&&_t.push(Sn)}),pt.current=Dt;var Lt=he.useRef([]);return _t.length&&(Lt.current=_t),he.useDebugValue(ln.current),he.useDebugValue(Lt.current.join(", ")),zt&&console.log("".concat(zt,":"),ln.current,Lt.current),ln.current}var Ne=null,je=he.memo(function(){var Dt=ke();return he.createElement("h1",null,"Render Times: ",Dt)});je.displayName="RenderBlock";var Ve=Ee(39559),Je=Ee(33708),We=Ee(400),gt=Ee(92310),ut=Ee.n(gt),bt=Ee(80547),rt=Ee(97938),St=Ee(48736),ct=he.createContext({renderWithProps:!1}),Bt=ct,ht="RC_TABLE_KEY";function it(Dt){return Dt==null?[]:Array.isArray(Dt)?Dt:[Dt]}function dt(Dt){var zt=[],ln={};return Dt.forEach(function(pt){for(var _t=pt||{},Lt=_t.key,Sn=_t.dataIndex,hn=Lt||it(Sn).join("-")||ht;ln[hn];)hn="".concat(hn,"_next");ln[hn]=!0,zt.push(hn)}),zt}function yt(Dt){return Dt!=null}function Et(Dt){return Dt&&(0,Ve.Z)(Dt)==="object"&&!Array.isArray(Dt)&&!he.isValidElement(Dt)}function vt(Dt,zt,ln,pt,_t,Lt){var Sn=he.useContext(Bt),hn=ye(),on=(0,bt.Z)(function(){if(yt(pt))return[pt];var vn=zt==null||zt===""?[]:Array.isArray(zt)?zt:[zt],yn=(0,rt.Z)(Dt,vn),Cn=yn,jn=void 0;if(_t){var ti=_t(yn,Dt,ln);Et(ti)?(Cn=ti.children,jn=ti.props,Sn.renderWithProps=!0):Cn=ti}return[Cn,jn]},[hn,Dt,pt,zt,_t,ln],function(vn,yn){if(Lt){var Cn=(0,Ie.Z)(vn,2),jn=Cn[1],ti=(0,Ie.Z)(yn,2),Kn=ti[1];return Lt(Kn,jn)}return Sn.renderWithProps?!0:!(0,_e.Z)(vn,yn,!0)});return on}function Rt(Dt,zt,ln,pt){var _t=Dt+zt-1;return Dt<=pt&&_t>=ln}function jt(Dt,zt){return ge(be,function(ln){var pt=Rt(Dt,zt||1,ln.hoverStartRow,ln.hoverEndRow);return[pt,ln.onHover]})}var un=function(zt){var ln=zt.ellipsis,pt=zt.rowType,_t=zt.children,Lt,Sn=ln===!0?{showTitle:!0}:ln;return Sn&&(Sn.showTitle||pt==="header")&&(typeof _t=="string"||typeof _t=="number"?Lt=_t.toString():he.isValidElement(_t)&&typeof _t.props.children=="string"&&(Lt=_t.props.children)),Lt};function Vt(Dt){var zt,ln,pt,_t,Lt,Sn,hn,on,vn=Dt.component,yn=Dt.children,Cn=Dt.ellipsis,jn=Dt.scope,ti=Dt.prefixCls,Kn=Dt.className,xi=Dt.align,Vn=Dt.record,mi=Dt.render,li=Dt.dataIndex,Ri=Dt.renderIndex,Di=Dt.shouldCellUpdate,Zi=Dt.index,Oi=Dt.rowType,Ii=Dt.colSpan,ar=Dt.rowSpan,ei=Dt.fixLeft,Hi=Dt.fixRight,Li=Dt.firstFixLeft,bi=Dt.lastFixLeft,Xi=Dt.firstFixRight,gi=Dt.lastFixRight,ur=Dt.appendNode,Ji=Dt.additionalProps,_i=Ji===void 0?{}:Ji,Vi=Dt.isSticky,mr="".concat(ti,"-cell"),ir=ge(be,["supportSticky","allColumnsFixedLeft"]),So=ir.supportSticky,Lo=ir.allColumnsFixedLeft,ts=vt(Vn,li,Ri,yn,mi,Di),ao=(0,Ie.Z)(ts,2),Nr=ao[0],No=ao[1],Ir={},Vr=typeof ei=="number"&&So,ns=typeof Hi=="number"&&So;Vr&&(Ir.position="sticky",Ir.left=ei),ns&&(Ir.position="sticky",Ir.right=Hi);var Hr=(zt=(ln=(pt=No==null?void 0:No.colSpan)!==null&&pt!==void 0?pt:_i.colSpan)!==null&&ln!==void 0?ln:Ii)!==null&&zt!==void 0?zt:1,kr=(_t=(Lt=(Sn=No==null?void 0:No.rowSpan)!==null&&Sn!==void 0?Sn:_i.rowSpan)!==null&&Lt!==void 0?Lt:ar)!==null&&_t!==void 0?_t:1,$r=jt(Zi,kr),Lr=(0,Ie.Z)($r,2),lo=Lr[0],Ar=Lr[1],po=function(ys){var Ys;Vn&&Ar(Zi,Zi+kr-1),_i==null||(Ys=_i.onMouseEnter)===null||Ys===void 0||Ys.call(_i,ys)},Uo=function(ys){var Ys;Vn&&Ar(-1,-1),_i==null||(Ys=_i.onMouseLeave)===null||Ys===void 0||Ys.call(_i,ys)};if(Hr===0||kr===0)return null;var Go=(hn=_i.title)!==null&&hn!==void 0?hn:un({rowType:Oi,ellipsis:Cn,children:Nr}),Yr=ut()(mr,Kn,(on={},(0,We.Z)(on,"".concat(mr,"-fix-left"),Vr&&So),(0,We.Z)(on,"".concat(mr,"-fix-left-first"),Li&&So),(0,We.Z)(on,"".concat(mr,"-fix-left-last"),bi&&So),(0,We.Z)(on,"".concat(mr,"-fix-left-all"),bi&&Lo&&So),(0,We.Z)(on,"".concat(mr,"-fix-right"),ns&&So),(0,We.Z)(on,"".concat(mr,"-fix-right-first"),Xi&&So),(0,We.Z)(on,"".concat(mr,"-fix-right-last"),gi&&So),(0,We.Z)(on,"".concat(mr,"-ellipsis"),Cn),(0,We.Z)(on,"".concat(mr,"-with-append"),ur),(0,We.Z)(on,"".concat(mr,"-fix-sticky"),(Vr||ns)&&Vi&&So),(0,We.Z)(on,"".concat(mr,"-row-hover"),!No&&lo),on),_i.className,No==null?void 0:No.className),Io={};xi&&(Io.textAlign=xi);var Cs=(0,Je.Z)((0,Je.Z)((0,Je.Z)((0,Je.Z)({},Ir),_i.style),Io),No==null?void 0:No.style),To=Nr;return(0,Ve.Z)(To)==="object"&&!Array.isArray(To)&&!he.isValidElement(To)&&(To=null),Cn&&(bi||Xi)&&(To=he.createElement("span",{className:"".concat(mr,"-content")},To)),he.createElement(vn,(0,ce.Z)({},No,_i,{className:Yr,style:Cs,title:Go,scope:jn,onMouseEnter:po,onMouseLeave:Uo,colSpan:Hr!==1?Hr:null,rowSpan:kr!==1?kr:null}),ur,To)}var xn=he.memo(Vt);function Ut(Dt,zt,ln,pt,_t,Lt){var Sn=ln[Dt]||{},hn=ln[zt]||{},on,vn;Sn.fixed==="left"?on=pt.left[_t==="rtl"?zt:Dt]:hn.fixed==="right"&&(vn=pt.right[_t==="rtl"?Dt:zt]);var yn=!1,Cn=!1,jn=!1,ti=!1,Kn=ln[zt+1],xi=ln[Dt-1],Vn=!(Lt!=null&&Lt.children);if(_t==="rtl"){if(on!==void 0){var mi=xi&&xi.fixed==="left";ti=!mi&&Vn}else if(vn!==void 0){var li=Kn&&Kn.fixed==="right";jn=!li&&Vn}}else if(on!==void 0){var Ri=Kn&&Kn.fixed==="left";yn=!Ri&&Vn}else if(vn!==void 0){var Di=xi&&xi.fixed==="right";Cn=!Di&&Vn}return{fixLeft:on,fixRight:vn,lastFixLeft:yn,firstFixRight:Cn,lastFixRight:jn,firstFixLeft:ti,isSticky:pt.isSticky}}var Zt=he.createContext({}),Xt=Zt;function mt(Dt){var zt=Dt.className,ln=Dt.index,pt=Dt.children,_t=Dt.colSpan,Lt=_t===void 0?1:_t,Sn=Dt.rowSpan,hn=Dt.align,on=ge(be,["prefixCls","direction"]),vn=on.prefixCls,yn=on.direction,Cn=he.useContext(Xt),jn=Cn.scrollColumnIndex,ti=Cn.stickyOffsets,Kn=Cn.flattenColumns,xi=Cn.columns,Vn=ln+Lt-1,mi=Vn+1===jn?Lt+1:Lt,li=Ut(ln,ln+mi-1,Kn,ti,yn,xi==null?void 0:xi[ln]);return he.createElement(xn,(0,ce.Z)({className:zt,index:ln,component:"td",prefixCls:vn,record:null,dataIndex:null,align:hn,colSpan:mi,rowSpan:Sn,render:function(){return pt}},li))}var ze=Ee(37061),Be=["children"];function qe(Dt){var zt=Dt.children,ln=(0,ze.Z)(Dt,Be);return he.createElement("tr",ln,zt)}function Qe(Dt){var zt=Dt.children;return zt}Qe.Row=qe,Qe.Cell=mt;var Ue=Qe;function Xe(Dt){var zt=Dt.children,ln=Dt.stickyOffsets,pt=Dt.flattenColumns,_t=Dt.columns,Lt=ge(be,"prefixCls"),Sn=pt.length-1,hn=pt[Sn],on=he.useMemo(function(){return{stickyOffsets:ln,flattenColumns:pt,scrollColumnIndex:hn!=null&&hn.scrollbar?Sn:null,columns:_t}},[hn,pt,Sn,ln,_t]);return he.createElement(Xt.Provider,{value:on},he.createElement("tfoot",{className:"".concat(Lt,"-summary")},zt))}var Re=le(Xe),Ae=Ue,Ge=Ee(70425),Ke=Ee(29301),Ze=Ee(29194),at=Ee(24514),xt=Ee(75152),tn=Ee(26112);function nn(Dt,zt,ln,pt,_t,Lt,Sn){Dt.push({record:zt,indent:ln,index:Sn});var hn=Lt(zt),on=_t==null?void 0:_t.has(hn);if(zt&&Array.isArray(zt[pt])&&on)for(var vn=0;vn<zt[pt].length;vn+=1)nn(Dt,zt[pt][vn],ln+1,pt,_t,Lt,vn)}function Jt(Dt,zt,ln,pt){var _t=he.useMemo(function(){if(ln!=null&&ln.size){for(var Lt=[],Sn=0;Sn<(Dt==null?void 0:Dt.length);Sn+=1){var hn=Dt[Sn];nn(Lt,hn,0,zt,ln,pt,Sn)}return Lt}return Dt==null?void 0:Dt.map(function(on,vn){return{record:on,indent:0,index:vn}})},[Dt,zt,ln,pt]);return _t}function mn(Dt){var zt=Dt.prefixCls,ln=Dt.children,pt=Dt.component,_t=Dt.cellComponent,Lt=Dt.className,Sn=Dt.expanded,hn=Dt.colSpan,on=Dt.isEmpty,vn=ge(be,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),yn=vn.scrollbarSize,Cn=vn.fixHeader,jn=vn.fixColumn,ti=vn.componentWidth,Kn=vn.horizonScroll,xi=ln;return(on?Kn&&ti:jn)&&(xi=he.createElement("div",{style:{width:ti-(Cn?yn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(zt,"-expanded-row-fixed")},xi)),he.createElement(pt,{className:Lt,style:{display:Sn?null:"none"}},he.createElement(xn,{component:_t,prefixCls:zt,colSpan:hn},xi))}var kn=mn;function fn(Dt,zt,ln,pt){var _t=ge(be,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Lt=_t.flattenColumns,Sn=_t.expandableType,hn=_t.expandedKeys,on=_t.childrenColumnName,vn=_t.onTriggerExpand,yn=_t.rowExpandable,Cn=_t.onRow,jn=_t.expandRowByClick,ti=_t.rowClassName,Kn=Sn==="nest",xi=Sn==="row"&&(!yn||yn(Dt)),Vn=xi||Kn,mi=hn&&hn.has(zt),li=on&&Dt&&Dt[on],Ri=(0,Ge.useEvent)(vn),Di=Cn==null?void 0:Cn(Dt,ln),Zi=Di==null?void 0:Di.onClick,Oi=function(Hi){jn&&Vn&&vn(Dt,Hi);for(var Li=arguments.length,bi=new Array(Li>1?Li-1:0),Xi=1;Xi<Li;Xi++)bi[Xi-1]=arguments[Xi];Zi==null||Zi.apply(void 0,[Hi].concat(bi))},Ii;typeof ti=="string"?Ii=ti:typeof ti=="function"&&(Ii=ti(Dt,ln,pt));var ar=dt(Lt);return(0,Je.Z)((0,Je.Z)({},_t),{},{columnsKey:ar,nestExpandable:Kn,expanded:mi,hasNestChildren:li,record:Dt,onTriggerExpand:Ri,rowSupportExpand:xi,expandable:Vn,rowProps:(0,Je.Z)((0,Je.Z)({},Di),{},{className:ut()(Ii,Di==null?void 0:Di.className),onClick:Oi})})}function Mn(Dt,zt,ln,pt,_t){var Lt=Dt.record,Sn=Dt.prefixCls,hn=Dt.columnsKey,on=Dt.fixedInfoList,vn=Dt.expandIconColumnIndex,yn=Dt.nestExpandable,Cn=Dt.indentSize,jn=Dt.expandIcon,ti=Dt.expanded,Kn=Dt.hasNestChildren,xi=Dt.onTriggerExpand,Vn=hn[ln],mi=on[ln],li;ln===(vn||0)&&yn&&(li=he.createElement(he.Fragment,null,he.createElement("span",{style:{paddingLeft:"".concat(Cn*pt,"px")},className:"".concat(Sn,"-row-indent indent-level-").concat(pt)}),jn({prefixCls:Sn,expanded:ti,expandable:Kn,record:Lt,onExpand:xi})));var Ri;return zt.onCell&&(Ri=zt.onCell(Lt,_t)),{key:Vn,fixedInfo:mi,appendCellNode:li,additionalCellProps:Ri||{}}}function Zn(Dt){var zt=Dt.className,ln=Dt.style,pt=Dt.record,_t=Dt.index,Lt=Dt.renderIndex,Sn=Dt.rowKey,hn=Dt.indent,on=hn===void 0?0:hn,vn=Dt.rowComponent,yn=Dt.cellComponent,Cn=Dt.scopeCellComponent,jn=fn(pt,Sn,_t,on),ti=jn.prefixCls,Kn=jn.flattenColumns,xi=jn.expandedRowClassName,Vn=jn.expandedRowRender,mi=jn.rowProps,li=jn.expanded,Ri=jn.rowSupportExpand,Di=he.useState(!1),Zi=(0,Ie.Z)(Di,2),Oi=Zi[0],Ii=Zi[1];he.useEffect(function(){li&&Ii(!0)},[li]);var ar=he.createElement(vn,(0,ce.Z)({},mi,{"data-row-key":Sn,className:ut()(zt,"".concat(ti,"-row"),"".concat(ti,"-row-level-").concat(on),mi==null?void 0:mi.className),style:(0,Je.Z)((0,Je.Z)({},ln),mi==null?void 0:mi.style)}),Kn.map(function(bi,Xi){var gi=bi.render,ur=bi.dataIndex,Ji=bi.className,_i=Mn(jn,bi,Xi,on,_t),Vi=_i.key,mr=_i.fixedInfo,ir=_i.appendCellNode,So=_i.additionalCellProps;return he.createElement(xn,(0,ce.Z)({className:Ji,ellipsis:bi.ellipsis,align:bi.align,scope:bi.rowScope,component:bi.rowScope?Cn:yn,prefixCls:ti,key:Vi,record:pt,index:_t,renderIndex:Lt,dataIndex:ur,render:gi,shouldCellUpdate:bi.shouldCellUpdate},mr,{appendNode:ir,additionalProps:So}))})),ei;if(Ri&&(Oi||li)){var Hi=Vn(pt,_t,on+1,li),Li=xi&&xi(pt,_t,on);ei=he.createElement(kn,{expanded:li,className:ut()("".concat(ti,"-expanded-row"),"".concat(ti,"-expanded-row-level-").concat(on+1),Li),prefixCls:ti,component:vn,cellComponent:yn,colSpan:Kn.length,isEmpty:!1},Hi)}return he.createElement(he.Fragment,null,ar,ei)}Zn.displayName="BodyRow";var Tn=le(Zn);function ci(Dt){var zt=Dt.columnKey,ln=Dt.onColumnResize,pt=he.useRef();return he.useEffect(function(){pt.current&&ln(zt,pt.current.offsetWidth)},[]),he.createElement(Ke.Z,{data:zt},he.createElement("td",{ref:pt,style:{padding:0,border:0,height:0}},he.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ai(Dt){var zt=Dt.prefixCls,ln=Dt.columnsKey,pt=Dt.onColumnResize;return he.createElement("tr",{"aria-hidden":"true",className:"".concat(zt,"-measure-row"),style:{height:0,fontSize:0}},he.createElement(Ke.Z.Collection,{onBatchResize:function(Lt){Lt.forEach(function(Sn){var hn=Sn.data,on=Sn.size;pt(hn,on.offsetWidth)})}},ln.map(function(_t){return he.createElement(ci,{key:_t,columnKey:_t,onColumnResize:pt})})))}function ki(Dt){var zt=Dt.data,ln=Dt.measureColumnWidth,pt=ge(be,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),_t=pt.prefixCls,Lt=pt.getComponent,Sn=pt.onColumnResize,hn=pt.flattenColumns,on=pt.getRowKey,vn=pt.expandedKeys,yn=pt.childrenColumnName,Cn=pt.emptyNode,jn=Jt(zt,yn,vn,on),ti=he.useRef({renderWithProps:!1}),Kn=Lt(["body","wrapper"],"tbody"),xi=Lt(["body","row"],"tr"),Vn=Lt(["body","cell"],"td"),mi=Lt(["body","cell"],"th"),li;zt.length?li=jn.map(function(Di,Zi){var Oi=Di.record,Ii=Di.indent,ar=Di.index,ei=on(Oi,Zi);return he.createElement(Tn,{key:ei,rowKey:ei,record:Oi,index:Zi,renderIndex:ar,rowComponent:xi,cellComponent:Vn,scopeCellComponent:mi,getRowKey:on,indent:Ii})}):li=he.createElement(kn,{expanded:!0,className:"".concat(_t,"-placeholder"),prefixCls:_t,component:xi,cellComponent:Vn,colSpan:hn.length,isEmpty:!0},Cn);var Ri=dt(hn);return he.createElement(Bt.Provider,{value:ti.current},he.createElement(Kn,{className:"".concat(_t,"-tbody")},ln&&he.createElement(ai,{prefixCls:_t,columnsKey:Ri,onColumnResize:Sn}),li))}ki.displayName="Body";var Ci=le(ki),or=["expandable"],tr="RC_TABLE_INTERNAL_COL_DEFINE";function pr(Dt){var zt=Dt.expandable,ln=(0,ze.Z)(Dt,or),pt;return"expandable"in Dt?pt=(0,Je.Z)((0,Je.Z)({},ln),zt):pt=ln,pt.showExpandColumn===!1&&(pt.expandIconColumnIndex=-1),pt}var cr=["columnType"];function to(Dt){for(var zt=Dt.colWidths,ln=Dt.columns,pt=Dt.columCount,_t=[],Lt=pt||ln.length,Sn=!1,hn=Lt-1;hn>=0;hn-=1){var on=zt[hn],vn=ln&&ln[hn],yn=vn&&vn[tr];if(on||yn||Sn){var Cn=yn||{},jn=Cn.columnType,ti=(0,ze.Z)(Cn,cr);_t.unshift(he.createElement("col",(0,ce.Z)({key:hn,style:{width:on}},ti))),Sn=!0}}return he.createElement("colgroup",null,_t)}var no=to,di=Ee(26407),Cr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function zi(Dt,zt){return(0,he.useMemo)(function(){for(var ln=[],pt=0;pt<zt;pt+=1){var _t=Dt[pt];if(_t!==void 0)ln[pt]=_t;else return null}return ln},[Dt.join("_"),zt])}var st=he.forwardRef(function(Dt,zt){var ln=Dt.className,pt=Dt.noData,_t=Dt.columns,Lt=Dt.flattenColumns,Sn=Dt.colWidths,hn=Dt.columCount,on=Dt.stickyOffsets,vn=Dt.direction,yn=Dt.fixHeader,Cn=Dt.stickyTopOffset,jn=Dt.stickyBottomOffset,ti=Dt.stickyClassName,Kn=Dt.onScroll,xi=Dt.maxContentScroll,Vn=Dt.children,mi=(0,ze.Z)(Dt,Cr),li=ge(be,["prefixCls","scrollbarSize","isSticky"]),Ri=li.prefixCls,Di=li.scrollbarSize,Zi=li.isSticky,Oi=Zi&&!yn?0:Di,Ii=he.useRef(null),ar=he.useCallback(function(Ji){(0,ve.mH)(zt,Ji),(0,ve.mH)(Ii,Ji)},[]);he.useEffect(function(){var Ji;function _i(Vi){var mr=Vi,ir=mr.currentTarget,So=mr.deltaX;So&&(Kn({currentTarget:ir,scrollLeft:ir.scrollLeft+So}),Vi.preventDefault())}return(Ji=Ii.current)===null||Ji===void 0||Ji.addEventListener("wheel",_i),function(){var Vi;(Vi=Ii.current)===null||Vi===void 0||Vi.removeEventListener("wheel",_i)}},[]);var ei=he.useMemo(function(){return Lt.every(function(Ji){return Ji.width})},[Lt]),Hi=Lt[Lt.length-1],Li={fixed:Hi?Hi.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ri,"-cell-scrollbar")}}},bi=(0,he.useMemo)(function(){return Oi?[].concat((0,di.Z)(_t),[Li]):_t},[Oi,_t]),Xi=(0,he.useMemo)(function(){return Oi?[].concat((0,di.Z)(Lt),[Li]):Lt},[Oi,Lt]),gi=(0,he.useMemo)(function(){var Ji=on.right,_i=on.left;return(0,Je.Z)((0,Je.Z)({},on),{},{left:vn==="rtl"?[].concat((0,di.Z)(_i.map(function(Vi){return Vi+Oi})),[0]):_i,right:vn==="rtl"?Ji:[].concat((0,di.Z)(Ji.map(function(Vi){return Vi+Oi})),[0]),isSticky:Zi})},[Oi,on,Zi]),ur=zi(Sn,hn);return he.createElement("div",{style:(0,Je.Z)({overflow:"hidden"},Zi?{top:Cn,bottom:jn}:{}),ref:ar,className:ut()(ln,(0,We.Z)({},ti,!!ti))},he.createElement("table",{style:{tableLayout:"fixed",visibility:pt||ur?null:"hidden"}},(!pt||!xi||ei)&&he.createElement(no,{colWidths:ur?[].concat((0,di.Z)(ur),[Oi]):[],columCount:hn+1,columns:Xi}),Vn((0,Je.Z)((0,Je.Z)({},mi),{},{stickyOffsets:gi,columns:bi,flattenColumns:Xi}))))});st.displayName="FixedHolder";var Dr=he.memo(st);function Mr(Dt){var zt=Dt.cells,ln=Dt.stickyOffsets,pt=Dt.flattenColumns,_t=Dt.rowComponent,Lt=Dt.cellComponent,Sn=Dt.tdCellComponent,hn=Dt.onHeaderRow,on=Dt.index,vn=ge(be,["prefixCls","direction"]),yn=vn.prefixCls,Cn=vn.direction,jn;hn&&(jn=hn(zt.map(function(Kn){return Kn.column}),on));var ti=dt(zt.map(function(Kn){return Kn.column}));return he.createElement(_t,jn,zt.map(function(Kn,xi){var Vn=Kn.column,mi=Ut(Kn.colStart,Kn.colEnd,pt,ln,Cn,Vn),li;return Vn&&Vn.onHeaderCell&&(li=Kn.column.onHeaderCell(Vn)),he.createElement(xn,(0,ce.Z)({},Kn,{scope:Vn.title?Kn.colSpan>1?"colgroup":"col":null,ellipsis:Vn.ellipsis,align:Vn.align,component:Vn.title?Lt:Sn,prefixCls:yn,key:ti[xi]},mi,{additionalProps:li,rowType:"header"}))}))}Mr.displayName="HeaderRow";var xo=Mr;function Gr(Dt){var zt=[];function ln(Sn,hn){var on=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;zt[on]=zt[on]||[];var vn=hn,yn=Sn.filter(Boolean).map(function(Cn){var jn={key:Cn.key,className:Cn.className||"",children:Cn.title,column:Cn,colStart:vn},ti=1,Kn=Cn.children;return Kn&&Kn.length>0&&(ti=ln(Kn,vn,on+1).reduce(function(xi,Vn){return xi+Vn},0),jn.hasSubColumns=!0),"colSpan"in Cn&&(ti=Cn.colSpan),"rowSpan"in Cn&&(jn.rowSpan=Cn.rowSpan),jn.colSpan=ti,jn.colEnd=jn.colStart+ti-1,zt[on].push(jn),vn+=ti,ti});return yn}ln(Dt,0);for(var pt=zt.length,_t=function(hn){zt[hn].forEach(function(on){!("rowSpan"in on)&&!on.hasSubColumns&&(on.rowSpan=pt-hn)})},Lt=0;Lt<pt;Lt+=1)_t(Lt);return zt}function uo(Dt){var zt=Dt.stickyOffsets,ln=Dt.columns,pt=Dt.flattenColumns,_t=Dt.onHeaderRow,Lt=ge(be,["prefixCls","getComponent"]),Sn=Lt.prefixCls,hn=Lt.getComponent,on=he.useMemo(function(){return Gr(ln)},[ln]),vn=hn(["header","wrapper"],"thead"),yn=hn(["header","row"],"tr"),Cn=hn(["header","cell"],"th"),jn=hn(["header","cell"],"td");return he.createElement(vn,{className:"".concat(Sn,"-thead")},on.map(function(ti,Kn){var xi=he.createElement(xo,{key:Kn,flattenColumns:pt,cells:ti,stickyOffsets:zt,rowComponent:yn,cellComponent:Cn,tdCellComponent:jn,onHeaderRow:_t,index:Kn});return xi}))}var Zr=le(uo),co=Ee(11592);function cn(Dt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof zt=="number"?zt:zt.endsWith("%")?Dt*parseFloat(zt)/100:null}function $e(Dt,zt){return he.useMemo(function(){if(zt&&zt>0){var ln=0,pt=0;Dt.forEach(function(vn){var yn=cn(zt,vn.width);yn?ln+=yn:pt+=1});var _t=zt-ln,Lt=pt,Sn=_t/pt,hn=0,on=Dt.map(function(vn){var yn=(0,Je.Z)({},vn),Cn=cn(zt,yn.width);if(Cn)yn.width=Cn;else{var jn=Math.floor(Sn);yn.width=Lt===1?_t:jn,_t-=jn,Lt-=1}return hn+=yn.width,yn});return[on,hn]}return[Dt,zt]},[Dt,zt])}var tt=["children"],et=["fixed"];function Pt(Dt){return(0,co.Z)(Dt).filter(function(zt){return he.isValidElement(zt)}).map(function(zt){var ln=zt.key,pt=zt.props,_t=pt.children,Lt=(0,ze.Z)(pt,tt),Sn=(0,Je.Z)({key:ln},Lt);return _t&&(Sn.children=Pt(_t)),Sn})}function At(Dt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Dt.filter(function(ln){return ln&&(0,Ve.Z)(ln)==="object"}).reduce(function(ln,pt,_t){var Lt=pt.fixed,Sn=Lt===!0?"left":Lt,hn="".concat(zt,"-").concat(_t),on=pt.children;return on&&on.length>0?[].concat((0,di.Z)(ln),(0,di.Z)(At(on,hn).map(function(vn){return(0,Je.Z)({fixed:Sn},vn)}))):[].concat((0,di.Z)(ln),[(0,Je.Z)((0,Je.Z)({key:hn},pt),{},{fixed:Sn})])},[])}function kt(Dt){for(var zt=!0,ln=0;ln<Dt.length;ln+=1){var pt=Dt[ln];if(zt&&pt.fixed!=="left")zt=!1;else if(!zt&&pt.fixed==="left"){warning(!1,"Index ".concat(ln-1," of `columns` missing `fixed='left'` prop."));break}}for(var _t=!0,Lt=Dt.length-1;Lt>=0;Lt-=1){var Sn=Dt[Lt];if(_t&&Sn.fixed!=="right")_t=!1;else if(!_t&&Sn.fixed==="right"){warning(!1,"Index ".concat(Lt+1," of `columns` missing `fixed='right'` prop."));break}}}function Ct(Dt){return Dt.map(function(zt){var ln=zt.fixed,pt=(0,ze.Z)(zt,et),_t=ln;return ln==="left"?_t="right":ln==="right"&&(_t="left"),(0,Je.Z)({fixed:_t},pt)})}function dn(Dt,zt){var ln=Dt.prefixCls,pt=Dt.columns,_t=Dt.children,Lt=Dt.expandable,Sn=Dt.expandedKeys,hn=Dt.columnTitle,on=Dt.getRowKey,vn=Dt.onTriggerExpand,yn=Dt.expandIcon,Cn=Dt.rowExpandable,jn=Dt.expandIconColumnIndex,ti=Dt.direction,Kn=Dt.expandRowByClick,xi=Dt.columnWidth,Vn=Dt.fixed,mi=Dt.scrollWidth,li=he.useMemo(function(){return pt||Pt(_t)},[pt,_t]),Ri=he.useMemo(function(){if(Lt){var Hi,Li=li.slice();if(!Li.includes(Le)){var bi=jn||0;bi>=0&&Li.splice(bi,0,Le)}var Xi=Li.indexOf(Le);Li=Li.filter(function(_i,Vi){return _i!==Le||Vi===Xi});var gi=li[Xi],ur;(Vn==="left"||Vn)&&!jn?ur="left":(Vn==="right"||Vn)&&jn===li.length?ur="right":ur=gi?gi.fixed:null;var Ji=(Hi={},(0,We.Z)(Hi,tr,{className:"".concat(ln,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,We.Z)(Hi,"title",hn),(0,We.Z)(Hi,"fixed",ur),(0,We.Z)(Hi,"className","".concat(ln,"-row-expand-icon-cell")),(0,We.Z)(Hi,"width",xi),(0,We.Z)(Hi,"render",function(Vi,mr,ir){var So=on(mr,ir),Lo=Sn.has(So),ts=Cn?Cn(mr):!0,ao=yn({prefixCls:ln,expanded:Lo,expandable:ts,record:mr,onExpand:vn});return Kn?he.createElement("span",{onClick:function(No){return No.stopPropagation()}},ao):ao}),Hi);return Li.map(function(_i){return _i===Le?Ji:_i})}return li.filter(function(_i){return _i!==Le})},[Lt,li,on,Sn,yn,ti]),Di=he.useMemo(function(){var Hi=Ri;return zt&&(Hi=zt(Hi)),Hi.length||(Hi=[{render:function(){return null}}]),Hi},[zt,Ri,ti]),Zi=he.useMemo(function(){return ti==="rtl"?Ct(At(Di)):At(Di)},[Di,ti,mi]),Oi=$e(Zi,mi),Ii=(0,Ie.Z)(Oi,2),ar=Ii[0],ei=Ii[1];return[Di,ar,ei]}var _n=dn;function zn(Dt){var zt,ln=Dt.prefixCls,pt=Dt.record,_t=Dt.onExpand,Lt=Dt.expanded,Sn=Dt.expandable,hn="".concat(ln,"-row-expand-icon");if(!Sn)return he.createElement("span",{className:ut()(hn,"".concat(ln,"-row-spaced"))});var on=function(yn){_t(pt,yn),yn.stopPropagation()};return he.createElement("span",{className:ut()(hn,(zt={},(0,We.Z)(zt,"".concat(ln,"-row-expanded"),Lt),(0,We.Z)(zt,"".concat(ln,"-row-collapsed"),!Lt),zt)),onClick:on})}function wn(Dt,zt,ln){var pt=[];function _t(Lt){(Lt||[]).forEach(function(Sn,hn){pt.push(zt(Sn,hn)),_t(Sn[ln])})}return _t(Dt),pt}function Ft(Dt,zt,ln){var pt=pr(Dt),_t=pt.expandIcon,Lt=pt.expandedRowKeys,Sn=pt.defaultExpandedRowKeys,hn=pt.defaultExpandAllRows,on=pt.expandedRowRender,vn=pt.onExpand,yn=pt.onExpandedRowsChange,Cn=pt.childrenColumnName,jn=_t||zn,ti=Cn||"children",Kn=he.useMemo(function(){return on?"row":Dt.expandable&&Dt.internalHooks===me&&Dt.expandable.__PARENT_RENDER_ICON__||zt.some(function(Zi){return Zi&&(0,Ve.Z)(Zi)==="object"&&Zi[ti]})?"nest":!1},[!!on,zt]),xi=he.useState(function(){return Sn||(hn?wn(zt,ln,ti):[])}),Vn=(0,Ie.Z)(xi,2),mi=Vn[0],li=Vn[1],Ri=he.useMemo(function(){return new Set(Lt||mi||[])},[Lt,mi]),Di=he.useCallback(function(Zi){var Oi=ln(Zi,zt.indexOf(Zi)),Ii,ar=Ri.has(Oi);ar?(Ri.delete(Oi),Ii=(0,di.Z)(Ri)):Ii=[].concat((0,di.Z)(Ri),[Oi]),li(Ii),vn&&vn(!ar,Zi),yn&&yn(Ii)},[ln,Ri,zt,vn,yn]);return[pt,Kn,Ri,jn,ti,Di]}function $t(Dt,zt,ln,pt){var _t=Dt.map(function(Lt,Sn){return Ut(Sn,Sn,Dt,zt,ln,pt==null?void 0:pt[Sn])});return(0,bt.Z)(function(){return _t},[_t],function(Lt,Sn){return!(0,_e.Z)(Lt,Sn)})}function bn(Dt){var zt=(0,he.useRef)(Dt),ln=(0,he.useState)({}),pt=(0,Ie.Z)(ln,2),_t=pt[1],Lt=(0,he.useRef)(null),Sn=(0,he.useRef)([]);function hn(on){Sn.current.push(on);var vn=Promise.resolve();Lt.current=vn,vn.then(function(){if(Lt.current===vn){var yn=Sn.current,Cn=zt.current;Sn.current=[],yn.forEach(function(jn){zt.current=jn(zt.current)}),Lt.current=null,Cn!==zt.current&&_t({})}})}return(0,he.useEffect)(function(){return function(){Lt.current=null}},[]),[zt.current,hn]}function An(Dt){var zt=(0,he.useRef)(Dt||null),ln=(0,he.useRef)();function pt(){window.clearTimeout(ln.current)}function _t(Sn){zt.current=Sn,pt(),ln.current=window.setTimeout(function(){zt.current=null,ln.current=void 0},100)}function Lt(){return zt.current}return(0,he.useEffect)(function(){return pt},[]),[_t,Lt]}function Gt(){var Dt=he.useState(-1),zt=(0,Ie.Z)(Dt,2),ln=zt[0],pt=zt[1],_t=he.useState(-1),Lt=(0,Ie.Z)(_t,2),Sn=Lt[0],hn=Lt[1],on=he.useCallback(function(vn,yn){pt(vn),hn(yn)},[]);return[ln,Sn,on]}var sn=Ee(47273),Bn=(0,sn.Z)()?window:null;function Nn(Dt,zt){var ln=(0,Ve.Z)(Dt)==="object"?Dt:{},pt=ln.offsetHeader,_t=pt===void 0?0:pt,Lt=ln.offsetSummary,Sn=Lt===void 0?0:Lt,hn=ln.offsetScroll,on=hn===void 0?0:hn,vn=ln.getContainer,yn=vn===void 0?function(){return Bn}:vn,Cn=yn()||Bn;return he.useMemo(function(){var jn=!!Dt;return{isSticky:jn,stickyClassName:jn?"".concat(zt,"-sticky-holder"):"",offsetHeader:_t,offsetSummary:Sn,offsetScroll:on,container:Cn}},[on,_t,Sn,zt,Cn])}function qn(Dt,zt,ln){var pt=(0,he.useMemo)(function(){for(var _t=[],Lt=[],Sn=0,hn=0,on=0;on<zt;on+=1)if(ln==="rtl"){Lt[on]=hn,hn+=Dt[on]||0;var vn=zt-on-1;_t[vn]=Sn,Sn+=Dt[vn]||0}else{_t[on]=Sn,Sn+=Dt[on]||0;var yn=zt-on-1;Lt[yn]=hn,hn+=Dt[yn]||0}return{left:_t,right:Lt}},[Dt,zt,ln]);return pt}var Gn=qn;function Jn(Dt){var zt=Dt.className,ln=Dt.children;return he.createElement("div",{className:zt},ln)}var Dn=Jn,ri=Ee(8224),Mi=Ee(55468),Hn=function(zt,ln){var pt,_t,Lt=zt.scrollBodyRef,Sn=zt.onScroll,hn=zt.offsetScroll,on=zt.container,vn=ge(be,"prefixCls"),yn=((pt=Lt.current)===null||pt===void 0?void 0:pt.scrollWidth)||0,Cn=((_t=Lt.current)===null||_t===void 0?void 0:_t.clientWidth)||0,jn=yn&&Cn*(Cn/yn),ti=he.useRef(),Kn=bn({scrollLeft:0,isHiddenScrollBar:!1}),xi=(0,Ie.Z)(Kn,2),Vn=xi[0],mi=xi[1],li=he.useRef({delta:0,x:0}),Ri=he.useState(!1),Di=(0,Ie.Z)(Ri,2),Zi=Di[0],Oi=Di[1],Ii=function(){Oi(!1)},ar=function(Xi){Xi.persist(),li.current.delta=Xi.pageX-Vn.scrollLeft,li.current.x=0,Oi(!0),Xi.preventDefault()},ei=function(Xi){var gi,ur=Xi||((gi=window)===null||gi===void 0?void 0:gi.event),Ji=ur.buttons;if(!Zi||Ji===0){Zi&&Oi(!1);return}var _i=li.current.x+Xi.pageX-li.current.x-li.current.delta;_i<=0&&(_i=0),_i+jn>=Cn&&(_i=Cn-jn),Sn({scrollLeft:_i/Cn*(yn+2)}),li.current.x=Xi.pageX},Hi=function(){if(Lt.current){var Xi=(0,Mi.os)(Lt.current).top,gi=Xi+Lt.current.offsetHeight,ur=on===window?document.documentElement.scrollTop+window.innerHeight:(0,Mi.os)(on).top+on.clientHeight;gi-(0,xt.Z)()<=ur||Xi>=ur-hn?mi(function(Ji){return(0,Je.Z)((0,Je.Z)({},Ji),{},{isHiddenScrollBar:!0})}):mi(function(Ji){return(0,Je.Z)((0,Je.Z)({},Ji),{},{isHiddenScrollBar:!1})})}},Li=function(Xi){mi(function(gi){return(0,Je.Z)((0,Je.Z)({},gi),{},{scrollLeft:Xi/yn*Cn||0})})};return he.useImperativeHandle(ln,function(){return{setScrollLeft:Li}}),he.useEffect(function(){var bi=(0,ri.Z)(document.body,"mouseup",Ii,!1),Xi=(0,ri.Z)(document.body,"mousemove",ei,!1);return Hi(),function(){bi.remove(),Xi.remove()}},[jn,Zi]),he.useEffect(function(){var bi=(0,ri.Z)(on,"scroll",Hi,!1),Xi=(0,ri.Z)(window,"resize",Hi,!1);return function(){bi.remove(),Xi.remove()}},[on]),he.useEffect(function(){Vn.isHiddenScrollBar||mi(function(bi){var Xi=Lt.current;return Xi?(0,Je.Z)((0,Je.Z)({},bi),{},{scrollLeft:Xi.scrollLeft/Xi.scrollWidth*Xi.clientWidth}):bi})},[Vn.isHiddenScrollBar]),yn<=Cn||!jn||Vn.isHiddenScrollBar?null:he.createElement("div",{style:{height:(0,xt.Z)(),width:Cn,bottom:hn},className:"".concat(vn,"-sticky-scroll")},he.createElement("div",{onMouseDown:ar,ref:ti,className:ut()("".concat(vn,"-sticky-scroll-bar"),(0,We.Z)({},"".concat(vn,"-sticky-scroll-bar-active"),Zi)),style:{width:"".concat(jn,"px"),transform:"translate3d(".concat(Vn.scrollLeft,"px, 0, 0)")}}))},oi=he.forwardRef(Hn);function Bi(Dt){return null}var lr=Bi;function Ai(Dt){return null}var an=Ai,si="rc-table",wi=[],pi={};function Wi(){return"No Data"}function Ni(Dt){var zt,ln=(0,Je.Z)({rowKey:"key",prefixCls:si,emptyText:Wi},Dt),pt=ln.prefixCls,_t=ln.className,Lt=ln.rowClassName,Sn=ln.style,hn=ln.data,on=ln.rowKey,vn=ln.scroll,yn=ln.tableLayout,Cn=ln.direction,jn=ln.title,ti=ln.footer,Kn=ln.summary,xi=ln.caption,Vn=ln.id,mi=ln.showHeader,li=ln.components,Ri=ln.emptyText,Di=ln.onRow,Zi=ln.onHeaderRow,Oi=ln.internalHooks,Ii=ln.transformColumns,ar=ln.internalRefs,ei=ln.tailor,Hi=ln.sticky,Li=hn||wi,bi=!!Li.length,Xi=Oi===me,gi=he.useCallback(function(cs,Vs){return(0,rt.Z)(li,cs)||Vs},[li]),ur=he.useMemo(function(){return typeof on=="function"?on:function(cs){var Vs=cs&&cs[on];return Vs}},[on]),Ji=gi(["body"]),_i=Gt(),Vi=(0,Ie.Z)(_i,3),mr=Vi[0],ir=Vi[1],So=Vi[2],Lo=Ft(ln,Li,ur),ts=(0,Ie.Z)(Lo,6),ao=ts[0],Nr=ts[1],No=ts[2],Ir=ts[3],Vr=ts[4],ns=ts[5],Hr=vn==null?void 0:vn.x,kr=he.useState(0),$r=(0,Ie.Z)(kr,2),Lr=$r[0],lo=$r[1],Ar=_n((0,Je.Z)((0,Je.Z)((0,Je.Z)({},ln),ao),{},{expandable:!!ao.expandedRowRender,columnTitle:ao.columnTitle,expandedKeys:No,getRowKey:ur,onTriggerExpand:ns,expandIcon:Ir,expandIconColumnIndex:ao.expandIconColumnIndex,direction:Cn,scrollWidth:Xi&&ei&&typeof Hr=="number"?Hr:null}),Xi?Ii:null),po=(0,Ie.Z)(Ar,3),Uo=po[0],Go=po[1],Yr=po[2],Io=Yr!=null?Yr:Hr,Cs=he.useMemo(function(){return{columns:Uo,flattenColumns:Go}},[Uo,Go]),To=he.useRef(),Yo=he.useRef(),ys=he.useRef(),Ys=he.useRef(),_l=he.useRef(),Xo=he.useState(!1),Jo=(0,Ie.Z)(Xo,2),Ss=Jo[0],Es=Jo[1],pa=he.useState(!1),Bo=(0,Ie.Z)(pa,2),ks=Bo[0],_a=Bo[1],Pl=bn(new Map),Xl=(0,Ie.Z)(Pl,2),Fl=Xl[0],hu=Xl[1],du=dt(Go),Jl=du.map(function(cs){return Fl.get(cs)}),ds=he.useMemo(function(){return Jl},[Jl.join("_")]),Oa=Gn(ds,Go.length,Cn),ra=vn&&yt(vn.y),As=vn&&yt(Io)||!!ao.fixed,Ql=As&&Go.some(function(cs){var Vs=cs.fixed;return Vs}),Pc=he.useRef(),fu=Nn(Hi,pt),Zu=fu.isSticky,sc=fu.offsetHeader,jl=fu.offsetSummary,os=fu.offsetScroll,Fs=fu.stickyClassName,va=fu.container,js=he.useMemo(function(){return Kn==null?void 0:Kn(Li)},[Kn,Li]),is=(ra||Zu)&&he.isValidElement(js)&&js.type===Ue&&js.props.fixed,Pa,El,Nu;ra&&(El={overflowY:"scroll",maxHeight:vn.y}),As&&(Pa={overflowX:"auto"},ra||(El={overflowY:"hidden"}),Nu={width:Io===!0?"auto":Io,minWidth:"100%"});var mf=he.useCallback(function(cs,Vs){(0,Ze.Z)(To.current)&&hu(function(Za){if(Za.get(cs)!==Vs){var pu=new Map(Za);return pu.set(cs,Vs),pu}return Za})},[]),pn=An(null),Bc=(0,Ie.Z)(pn,2),ac=Bc[0],vf=Bc[1];function _h(cs,Vs){Vs&&(typeof Vs=="function"?Vs(cs):Vs.scrollLeft!==cs&&(Vs.scrollLeft=cs,Vs.scrollLeft!==cs&&setTimeout(function(){Vs.scrollLeft=cs},0)))}var oh=(0,Te.Z)(function(cs){var Vs=cs.currentTarget,Za=cs.scrollLeft,pu=Cn==="rtl",gu=typeof Za=="number"?Za:Vs.scrollLeft,Wd=Vs||pi;if(!vf()||vf()===Wd){var zc;ac(Wd),_h(gu,Yo.current),_h(gu,ys.current),_h(gu,_l.current),_h(gu,(zc=Pc.current)===null||zc===void 0?void 0:zc.setScrollLeft)}var rd=Vs||Yo.current;if(rd){var Ou=rd.scrollWidth,Ec=rd.clientWidth;if(Ou===Ec){Es(!1),_a(!1);return}pu?(Es(-gu<Ou-Ec),_a(-gu>0)):(Es(gu>0),_a(gu<Ou-Ec))}}),Rd=function(){As&&ys.current?oh({currentTarget:ys.current}):(Es(!1),_a(!1))},Kp=function(Vs){var Za=Vs.width;Za!==Lr&&(Rd(),lo(To.current?To.current.offsetWidth:Za))},Ia=he.useRef(!1);he.useEffect(function(){Ia.current&&Rd()},[As,hn,Uo.length]),he.useEffect(function(){Ia.current=!0},[]);var nd=he.useState(0),Bd=(0,Ie.Z)(nd,2),id=Bd[0],yf=Bd[1],Yf=he.useState(!0),Sf=(0,Ie.Z)(Yf,2),Fd=Sf[0],ql=Sf[1];he.useEffect(function(){(!ei||!Xi)&&(ys.current instanceof Element?yf((0,xt.o)(ys.current).width):yf((0,xt.o)(Ys.current).width)),ql((0,at.G)("position","sticky"))},[]),he.useEffect(function(){Xi&&ar&&(ar.body.current=ys.current)});var Ph=he.useCallback(function(cs){return he.createElement(he.Fragment,null,he.createElement(Zr,cs),is==="top"&&he.createElement(Re,cs,js))},[is,js]),xf=he.useCallback(function(cs){return he.createElement(Re,cs,js)},[js]),Ku=gi(["table"],"table"),Fc=he.useMemo(function(){return yn||(Ql?Io==="max-content"?"auto":"fixed":ra||Zu||Go.some(function(cs){var Vs=cs.ellipsis;return Vs})?"fixed":"auto")},[ra,Ql,Go,yn,Zu]),Eh,sh={colWidths:ds,columCount:Go.length,stickyOffsets:Oa,onHeaderRow:Zi,fixHeader:ra,scroll:vn},Ll=he.useMemo(function(){return bi?null:typeof Ri=="function"?Ri():Ri},[bi,Ri]),jd=he.createElement(Ci,{data:Li,measureColumnWidth:ra||As||Zu}),zd=he.createElement(no,{colWidths:Go.map(function(cs){var Vs=cs.width;return Vs}),columns:Go}),eu=xi!=null?he.createElement("caption",{className:"".concat(pt,"-caption")},xi):void 0,Lh=(0,tn.Z)(ln,{data:!0}),Hd=(0,tn.Z)(ln,{aria:!0});if(ra||Zu){var Ud;typeof Ji=="function"?(Ud=Ji(Li,{scrollbarSize:id,ref:ys,onScroll:oh}),sh.colWidths=Go.map(function(cs,Vs){var Za=cs.width,pu=Vs===Go.length-1?Za-id:Za;return typeof pu=="number"&&!Number.isNaN(pu)?pu:0})):Ud=he.createElement("div",{style:(0,Je.Z)((0,Je.Z)({},Pa),El),onScroll:oh,ref:ys,className:ut()("".concat(pt,"-body"))},he.createElement(Ku,(0,ce.Z)({style:(0,Je.Z)((0,Je.Z)({},Nu),{},{tableLayout:Fc})},Hd),eu,zd,jd,!is&&js&&he.createElement(Re,{stickyOffsets:Oa,flattenColumns:Go,columns:Uo},js)));var jc=(0,Je.Z)((0,Je.Z)((0,Je.Z)({noData:!Li.length,maxContentScroll:As&&Io==="max-content"},sh),Cs),{},{direction:Cn,stickyClassName:Fs,onScroll:oh});Eh=he.createElement(he.Fragment,null,mi!==!1&&he.createElement(Dr,(0,ce.Z)({},jc,{stickyTopOffset:sc,className:"".concat(pt,"-header"),ref:Yo}),Ph),Ud,is&&is!=="top"&&he.createElement(Dr,(0,ce.Z)({},jc,{stickyBottomOffset:jl,className:"".concat(pt,"-summary"),ref:_l}),xf),Zu&&he.createElement(oi,{ref:Pc,offsetScroll:os,scrollBodyRef:ys,onScroll:oh,container:va}))}else Eh=he.createElement("div",{style:(0,Je.Z)((0,Je.Z)({},Pa),El),className:ut()("".concat(pt,"-content")),onScroll:oh,ref:ys},he.createElement(Ku,(0,ce.Z)({style:(0,Je.Z)((0,Je.Z)({},Nu),{},{tableLayout:Fc})},Hd),eu,zd,mi!==!1&&he.createElement(Zr,(0,ce.Z)({},sh,Cs)),jd,js&&he.createElement(Re,{stickyOffsets:Oa,flattenColumns:Go,columns:Uo},js)));var pl=he.createElement("div",(0,ce.Z)({className:ut()(pt,_t,(zt={},(0,We.Z)(zt,"".concat(pt,"-rtl"),Cn==="rtl"),(0,We.Z)(zt,"".concat(pt,"-ping-left"),Ss),(0,We.Z)(zt,"".concat(pt,"-ping-right"),ks),(0,We.Z)(zt,"".concat(pt,"-layout-fixed"),yn==="fixed"),(0,We.Z)(zt,"".concat(pt,"-fixed-header"),ra),(0,We.Z)(zt,"".concat(pt,"-fixed-column"),Ql),(0,We.Z)(zt,"".concat(pt,"-scroll-horizontal"),As),(0,We.Z)(zt,"".concat(pt,"-has-fix-left"),Go[0]&&Go[0].fixed),(0,We.Z)(zt,"".concat(pt,"-has-fix-right"),Go[Go.length-1]&&Go[Go.length-1].fixed==="right"),zt)),style:Sn,id:Vn,ref:To},Lh),jn&&he.createElement(Dn,{className:"".concat(pt,"-title")},jn(Li)),he.createElement("div",{ref:Ys,className:"".concat(pt,"-container")},Eh),ti&&he.createElement(Dn,{className:"".concat(pt,"-footer")},ti(Li)));As&&(pl=he.createElement(Ke.Z,{onResize:Kp},pl));var Gd=$t(Go,Oa,Cn,Uo),ya=he.useMemo(function(){return{scrollX:Io,prefixCls:pt,getComponent:gi,scrollbarSize:id,direction:Cn,fixedInfoList:Gd,isSticky:Zu,supportSticky:Fd,componentWidth:Lr,fixHeader:ra,fixColumn:Ql,horizonScroll:As,tableLayout:Fc,rowClassName:Lt,expandedRowClassName:ao.expandedRowClassName,expandIcon:Ir,expandableType:Nr,expandRowByClick:ao.expandRowByClick,expandedRowRender:ao.expandedRowRender,onTriggerExpand:ns,expandIconColumnIndex:ao.expandIconColumnIndex,indentSize:ao.indentSize,allColumnsFixedLeft:Go.every(function(cs){return cs.fixed==="left"}),emptyNode:Ll,columns:Uo,flattenColumns:Go,onColumnResize:mf,hoverStartRow:mr,hoverEndRow:ir,onHover:So,rowExpandable:ao.rowExpandable,onRow:Di,getRowKey:ur,expandedKeys:No,childrenColumnName:Vr}},[Io,pt,gi,id,Cn,Gd,Zu,Fd,Lr,ra,Ql,As,Fc,Lt,ao.expandedRowClassName,Ir,Nr,ao.expandRowByClick,ao.expandedRowRender,ns,ao.expandIconColumnIndex,ao.indentSize,Ll,Uo,Go,mf,mr,ir,So,ao.rowExpandable,Di,ur,No,Vr]);return he.createElement(be.Provider,{value:ya},pl)}function hr(Dt){return se(Ni,Dt)}var Fi=hr();Fi.EXPAND_COLUMN=Le,Fi.INTERNAL_HOOKS=me,Fi.Column=lr,Fi.ColumnGroup=an,Fi.Summary=Ae;var Ki=Fi,_r=Ee(4409),On=xe(null),Jr=xe(null);function In(Dt,zt,ln){var pt=zt||1;return ln[Dt+pt]-(ln[Dt]||0)}function Sr(Dt){var zt=Dt.rowInfo,ln=Dt.column,pt=Dt.colIndex,_t=Dt.indent,Lt=Dt.index,Sn=Dt.renderIndex,hn=Dt.record,on=Dt.style,vn=Dt.className,yn=Dt.inverse,Cn=Dt.getHeight,jn=ln.render,ti=ln.dataIndex,Kn=ln.className,xi=ln.width,Vn=ge(Jr,["columnsOffset"]),mi=Vn.columnsOffset,li=Mn(zt,ln,pt,_t,Lt),Ri=li.key,Di=li.fixedInfo,Zi=li.appendCellNode,Oi=li.additionalCellProps,Ii=Oi.style,ar=Oi.colSpan,ei=ar===void 0?1:ar,Hi=Oi.rowSpan,Li=Hi===void 0?1:Hi,bi=pt-1,Xi=In(bi,ei,mi),gi=ei>1?xi-Xi:0,ur=(0,Je.Z)((0,Je.Z)((0,Je.Z)({},Ii),on),{},{flex:"0 0 ".concat(Xi,"px"),width:"".concat(Xi,"px"),marginRight:gi,pointerEvents:"auto"}),Ji=he.useMemo(function(){return yn?Li<=1:ei===0||Li===0||Li>1},[Li,ei,yn]);Ji?ur.visibility="hidden":yn&&(ur.height=Cn==null?void 0:Cn(Li));var _i=Ji?function(){return null}:jn,Vi={};return(Li===0||ei===0)&&(Vi.rowSpan=1,Vi.colSpan=1),he.createElement(xn,(0,ce.Z)({className:ut()(Kn,vn),ellipsis:ln.ellipsis,align:ln.align,scope:ln.rowScope,component:"div",prefixCls:zt.prefixCls,key:Ri,record:hn,index:Lt,renderIndex:Sn,dataIndex:ti,render:_i,shouldCellUpdate:ln.shouldCellUpdate},Di,{appendNode:Zi,additionalProps:(0,Je.Z)((0,Je.Z)({},Oi),{},{style:ur},Vi)}))}var fo=Sr,Pr=["data","index","className","rowKey","style","extra","getHeight"],Do=he.forwardRef(function(Dt,zt){var ln=Dt.data,pt=Dt.index,_t=Dt.className,Lt=Dt.rowKey,Sn=Dt.style,hn=Dt.extra,on=Dt.getHeight,vn=(0,ze.Z)(Dt,Pr),yn=ln.record,Cn=ln.indent,jn=ln.index,ti=ge(be,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Kn=ti.scrollX,xi=ti.flattenColumns,Vn=ti.prefixCls,mi=ti.fixColumn,li=ti.componentWidth,Ri=fn(yn,Lt,pt,Cn),Di=Ri.rowSupportExpand,Zi=Ri.expanded,Oi=Ri.rowProps,Ii=Ri.expandedRowRender,ar=Ri.expandedRowClassName,ei;if(Di&&Zi){var Hi=Ii(yn,pt,Cn+1,Zi),Li=ar==null?void 0:ar(yn,pt,Cn),bi={};mi&&(bi={style:(0,We.Z)({},"--virtual-width","".concat(li,"px"))});var Xi="".concat(Vn,"-expanded-row-cell");ei=he.createElement("div",{className:ut()("".concat(Vn,"-expanded-row"),"".concat(Vn,"-expanded-row-level-").concat(Cn+1),Li)},he.createElement(xn,{component:"div",prefixCls:Vn,className:ut()(Xi,(0,We.Z)({},"".concat(Xi,"-fixed"),mi)),additionalProps:bi},Hi))}var gi=(0,Je.Z)((0,Je.Z)({},Sn),{},{width:Kn});hn&&(gi.position="absolute",gi.pointerEvents="none");var ur=he.createElement("div",(0,ce.Z)({},Oi,vn,{ref:Di?null:zt,className:ut()(_t,"".concat(Vn,"-row"),Oi==null?void 0:Oi.className,(0,We.Z)({},"".concat(Vn,"-row-extra"),hn)),style:(0,Je.Z)((0,Je.Z)({},gi),Oi==null?void 0:Oi.style)}),xi.map(function(Ji,_i){return he.createElement(fo,{key:_i,rowInfo:Ri,column:Ji,colIndex:_i,indent:Cn,index:pt,renderIndex:jn,record:yn,inverse:hn,getHeight:on})}));return Di?he.createElement("div",{ref:zt},ur,ei):ur}),ro=le(Do),Yi=ro,er=he.forwardRef(function(Dt,zt){var ln=Dt.data,pt=Dt.onScroll,_t=ge(be,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Lt=_t.flattenColumns,Sn=_t.onColumnResize,hn=_t.getRowKey,on=_t.expandedKeys,vn=_t.prefixCls,yn=_t.childrenColumnName,Cn=_t.emptyNode,jn=_t.scrollX,ti=ge(On),Kn=ti.scrollY,xi=ti.listItemHeight,Vn=he.useRef(),mi=Jt(ln,yn,on,hn),li=he.useMemo(function(){var ei=0;return Lt.map(function(Hi){var Li=Hi.width,bi=Hi.key;return ei+=Li,[bi,Li,ei]})},[Lt]),Ri=he.useMemo(function(){return li.map(function(ei){return ei[2]})},[li]);he.useEffect(function(){li.forEach(function(ei){var Hi=(0,Ie.Z)(ei,2),Li=Hi[0],bi=Hi[1];Sn(Li,bi)})},[li]),he.useImperativeHandle(zt,function(){var ei={};return Object.defineProperty(ei,"scrollLeft",{get:function(){var Li;return((Li=Vn.current)===null||Li===void 0?void 0:Li.getScrollInfo().x)||0},set:function(Li){var bi;(bi=Vn.current)===null||bi===void 0||bi.scrollTo({left:Li})}}),ei});var Di=function(Hi,Li){var bi,Xi=(bi=mi[Li])===null||bi===void 0?void 0:bi.record,gi=Hi.onCell;if(gi){var ur,Ji=gi(Xi,Li);return(ur=Ji==null?void 0:Ji.rowSpan)!==null&&ur!==void 0?ur:1}return 1},Zi=function(Hi){var Li=Hi.start,bi=Hi.end,Xi=Hi.getSize,gi=Hi.offsetY;if(bi<0)return null;for(var ur=Lt.filter(function(Hr){return Di(Hr,Li)===0}),Ji=Li,_i=function(kr){if(ur=ur.filter(function($r){return Di($r,kr)===0}),!ur.length)return Ji=kr,"break"},Vi=Li;Vi>=0;Vi-=1){var mr=_i(Vi);if(mr==="break")break}for(var ir=Lt.filter(function(Hr){return Di(Hr,bi)!==1}),So=bi,Lo=function(kr){if(ir=ir.filter(function($r){return Di($r,kr)!==1}),!ir.length)return So=Math.max(kr-1,bi),"break"},ts=bi;ts<mi.length;ts+=1){var ao=Lo(ts);if(ao==="break")break}for(var Nr=[],No=function(kr){var $r=mi[kr];if(!$r)return"continue";Lt.some(function(Lr){return Di(Lr,kr)>1})&&Nr.push(kr)},Ir=Ji;Ir<=So;Ir+=1)var Vr=No(Ir);var ns=Nr.map(function(Hr){var kr=mi[Hr],$r=hn(kr.record,Hr),Lr=function(po){var Uo=Hr+po-1,Go=hn(mi[Uo].record,Uo),Yr=Xi($r,Go);return Yr.bottom-Yr.top},lo=Xi($r);return he.createElement(Yi,{key:Hr,data:kr,rowKey:$r,index:Hr,style:{top:-gi+lo.top},extra:!0,getHeight:Lr})});return ns},Oi=he.useMemo(function(){return{columnsOffset:Ri}},[Ri]),Ii="".concat(vn,"-tbody"),ar;return mi.length?ar=he.createElement(_r.Z,{fullHeight:!1,ref:Vn,className:ut()(Ii,"".concat(Ii,"-virtual")),height:Kn,itemHeight:xi||24,data:mi,itemKey:function(Hi){return hn(Hi.record)},scrollWidth:jn,onVirtualScroll:function(Hi){var Li=Hi.x;pt({scrollLeft:Li})},extraRender:Zi},function(ei,Hi,Li){var bi=hn(ei.record,Hi);return he.createElement(Yi,(0,ce.Z)({data:ei,rowKey:bi,index:Hi},Li))}):ar=he.createElement("div",{className:ut()("".concat(vn,"-placeholder"))},he.createElement(xn,{component:"div",prefixCls:vn},Cn)),he.createElement(Jr.Provider,{value:Oi},ar)}),dr=le(er),Tr=dr,hi=function(zt,ln){var pt=ln.ref,_t=ln.onScroll;return he.createElement(Tr,{ref:pt,data:zt,onScroll:_t})},Tt=100;function xr(Dt){var zt=Dt.columns,ln=Dt.scroll,pt=Dt.prefixCls,_t=pt===void 0?si:pt,Lt=Dt.className,Sn=Dt.listItemHeight,hn=ln||{},on=hn.x,vn=hn.y;typeof on!="number"&&(on=((zt||[]).length+1)*Tt),typeof vn!="number"&&(vn=500);var yn=he.useMemo(function(){return{scrollY:vn,listItemHeight:Sn}},[vn,Sn]);return he.createElement(On.Provider,{value:yn},he.createElement(Ki,(0,ce.Z)({},Dt,{className:ut()(Lt,"".concat(_t,"-virtual")),scroll:(0,Je.Z)((0,Je.Z)({},ln),{},{x:on}),components:{body:hi},columns:zt,internalHooks:me,tailor:!0})))}function Po(Dt){return se(xr,Dt)}var Wo=Po(),Co=null;function qo(Dt){return null}var Zo=qo;function wr(Dt){return null}var vr=wr,Qi=Ee(2738),Qr=Ee(68031),Gi=Ee(36355),Ui=Ee(93891),qi=Ee(19716),Xn=Ee(8628),qr=Ee(31724),_o=Ee(58421),Ko=Ee(71418),Eo=Ee(88088);function rs(Dt){return function(ln){let{prefixCls:pt,onExpand:_t,record:Lt,expanded:Sn,expandable:hn}=ln;const on=`${pt}-row-expand-icon`;return he.createElement("button",{type:"button",onClick:vn=>{_t(Lt,vn),vn.stopPropagation()},className:ut()(on,{[`${on}-spaced`]:!hn,[`${on}-expanded`]:hn&&Sn,[`${on}-collapsed`]:hn&&!Sn}),"aria-label":Sn?Dt.collapse:Dt.expand,"aria-expanded":Sn})}}var ms=rs;function Ls(Dt,zt){return"key"in Dt&&Dt.key!==void 0&&Dt.key!==null?Dt.key:Dt.dataIndex?Array.isArray(Dt.dataIndex)?Dt.dataIndex.join("."):Dt.dataIndex:zt}function ws(Dt,zt){return zt?`${zt}-${Dt}`:`${Dt}`}function ta(Dt,zt){return typeof Dt=="function"?Dt(zt):Dt}function aa(Dt,zt){const ln=ta(Dt,zt);return Object.prototype.toString.call(ln)==="[object Object]"?"":ln}var Ln={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"},Os=Ln,hl=Ee(7657),dl=function(zt,ln){return he.createElement(hl.Z,(0,ce.Z)({},zt,{ref:ln,icon:Os}))},vs=he.forwardRef(dl),ja=vs,lu=Ee(56762);function Vl(Dt){const zt=he.useRef(Dt),ln=(0,lu.Z)();return[()=>zt.current,pt=>{zt.current=pt,ln()}]}var ho=Ee(3113),Er=Ee(24905),na=Ee(38854),Rr=Ee(64165),io=Ee(20834),Kr=Ee(40875),Ei=Ee(5112),ls=Ee(17574),Ms=Ee(47472),ba=Ee(92832);function za(Dt){let{value:zt,onChange:ln,filterSearch:pt,tablePrefixCls:_t,locale:Lt}=Dt;return pt?he.createElement("div",{className:`${_t}-filter-dropdown-search`},he.createElement(ba.default,{prefix:he.createElement(Ms.Z,null),placeholder:Lt.filterSearchPlaceholder,onChange:ln,value:zt,htmlSize:1,className:`${_t}-filter-dropdown-search-input`})):null}var Ja=za,yi=Ee(10228);const fs=Dt=>{const{keyCode:zt}=Dt;zt===yi.Z.ENTER&&Dt.stopPropagation()};var Qa=he.forwardRef((Dt,zt)=>he.createElement("div",{className:Dt.className,onClick:ln=>ln.stopPropagation(),onKeyDown:fs,ref:zt},Dt.children));function wl(Dt){let zt=[];return(Dt||[]).forEach(ln=>{let{value:pt,children:_t}=ln;zt.push(pt),_t&&(zt=[].concat((0,di.Z)(zt),(0,di.Z)(wl(_t))))}),zt}function Il(Dt){return Dt.some(zt=>{let{children:ln}=zt;return ln})}function Fr(Dt,zt){return typeof zt=="string"||typeof zt=="number"?zt==null?void 0:zt.toString().toLowerCase().includes(Dt.trim().toLowerCase()):!1}function nc(Dt){let{filters:zt,prefixCls:ln,filteredKeys:pt,filterMultiple:_t,searchValue:Lt,filterSearch:Sn}=Dt;return zt.map((hn,on)=>{const vn=String(hn.value);if(hn.children)return{key:vn||on,label:hn.text,popupClassName:`${ln}-dropdown-submenu`,children:nc({filters:hn.children,prefixCls:ln,filteredKeys:pt,filterMultiple:_t,searchValue:Lt,filterSearch:Sn})};const yn=_t?Er.default:Ei.ZP,Cn={key:hn.value!==void 0?vn:on,label:he.createElement(he.Fragment,null,he.createElement(yn,{checked:pt.includes(vn)}),he.createElement("span",null,hn.text))};return Lt.trim()?typeof Sn=="function"?Sn(Lt,hn)?Cn:null:Fr(Lt,hn.text)?Cn:null:Cn})}function Aa(Dt){var zt,ln;const{tablePrefixCls:pt,prefixCls:_t,column:Lt,dropdownPrefixCls:Sn,columnKey:hn,filterMultiple:on,filterMode:vn="menu",filterSearch:yn=!1,filterState:Cn,triggerFilter:jn,locale:ti,children:Kn,getPopupContainer:xi}=Dt,{filterDropdownOpen:Vn,onFilterDropdownOpenChange:mi,filterResetToDefaultFilteredValue:li,defaultFilteredValue:Ri,filterDropdownVisible:Di,onFilterDropdownVisibleChange:Zi}=Lt,[Oi,Ii]=he.useState(!1),ar=!!(Cn&&(!((zt=Cn.filteredKeys)===null||zt===void 0)&&zt.length||Cn.forceFiltered)),ei=Ar=>{Ii(Ar),mi==null||mi(Ar),Zi==null||Zi(Ar)},Hi=(ln=Vn!=null?Vn:Di)!==null&&ln!==void 0?ln:Oi,Li=Cn==null?void 0:Cn.filteredKeys,[bi,Xi]=Vl(Li||[]),gi=Ar=>{let{selectedKeys:po}=Ar;Xi(po)},ur=(Ar,po)=>{let{node:Uo,checked:Go}=po;gi(on?{selectedKeys:Ar}:{selectedKeys:Go&&Uo.key?[Uo.key]:[]})};he.useEffect(()=>{Oi&&gi({selectedKeys:Li||[]})},[Li]);const[Ji,_i]=he.useState([]),Vi=Ar=>{_i(Ar)},[mr,ir]=he.useState(""),So=Ar=>{const{value:po}=Ar.target;ir(po)};he.useEffect(()=>{Oi||ir("")},[Oi]);const Lo=Ar=>{const po=Ar&&Ar.length?Ar:null;if(po===null&&(!Cn||!Cn.filteredKeys)||(0,_e.Z)(po,Cn==null?void 0:Cn.filteredKeys,!0))return null;jn({column:Lt,key:hn,filteredKeys:po})},ts=()=>{ei(!1),Lo(bi())},ao=function(){let{confirm:Ar,closeDropdown:po}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Ar&&Lo([]),po&&ei(!1),ir(""),Xi(li?(Ri||[]).map(Uo=>String(Uo)):[])},Nr=function(){let{closeDropdown:Ar}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Ar&&ei(!1),Lo(bi())},No=Ar=>{Ar&&Li!==void 0&&Xi(Li||[]),ei(Ar),!Ar&&!Lt.filterDropdown&&ts()},Ir=ut()({[`${Sn}-menu-without-submenu`]:!Il(Lt.filters||[])}),Vr=Ar=>{if(Ar.target.checked){const po=wl(Lt==null?void 0:Lt.filters).map(Uo=>String(Uo));Xi(po)}else Xi([])},ns=Ar=>{let{filters:po}=Ar;return(po||[]).map((Uo,Go)=>{const Yr=String(Uo.value),Io={title:Uo.text,key:Uo.value!==void 0?Yr:Go};return Uo.children&&(Io.children=ns({filters:Uo.children})),Io})},Hr=Ar=>{var po;return Object.assign(Object.assign({},Ar),{text:Ar.title,value:Ar.key,children:((po=Ar.children)===null||po===void 0?void 0:po.map(Uo=>Hr(Uo)))||[]})};let kr;if(typeof Lt.filterDropdown=="function")kr=Lt.filterDropdown({prefixCls:`${Sn}-custom`,setSelectedKeys:Ar=>gi({selectedKeys:Ar}),selectedKeys:bi(),confirm:Nr,clearFilters:ao,filters:Lt.filters,visible:Hi,close:()=>{ei(!1)}});else if(Lt.filterDropdown)kr=Lt.filterDropdown;else{const Ar=bi()||[],po=()=>(Lt.filters||[]).length===0?he.createElement(Rr.Z,{image:Rr.Z.PRESENTED_IMAGE_SIMPLE,description:ti.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):vn==="tree"?he.createElement(he.Fragment,null,he.createElement(Ja,{filterSearch:yn,value:mr,onChange:So,tablePrefixCls:pt,locale:ti}),he.createElement("div",{className:`${pt}-filter-dropdown-tree`},on?he.createElement(Er.default,{checked:Ar.length===wl(Lt.filters).length,indeterminate:Ar.length>0&&Ar.length<wl(Lt.filters).length,className:`${pt}-filter-dropdown-checkall`,onChange:Vr},ti.filterCheckall):null,he.createElement(ls.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:on,checkStrictly:!on,className:`${Sn}-menu`,onCheck:ur,checkedKeys:Ar,selectedKeys:Ar,showIcon:!1,treeData:ns({filters:Lt.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:mr.trim()?Go=>typeof yn=="function"?yn(mr,Hr(Go)):Fr(mr,Go.title):void 0}))):he.createElement(he.Fragment,null,he.createElement(Ja,{filterSearch:yn,value:mr,onChange:So,tablePrefixCls:pt,locale:ti}),he.createElement(io.default,{selectable:!0,multiple:on,prefixCls:`${Sn}-menu`,className:Ir,onSelect:gi,onDeselect:gi,selectedKeys:Ar,getPopupContainer:xi,openKeys:Ji,onOpenChange:Vi,items:nc({filters:Lt.filters||[],filterSearch:yn,prefixCls:_t,filteredKeys:bi(),filterMultiple:on,searchValue:mr})})),Uo=()=>li?(0,_e.Z)((Ri||[]).map(Go=>String(Go)),Ar,!0):Ar.length===0;kr=he.createElement(he.Fragment,null,po(),he.createElement("div",{className:`${_t}-dropdown-btns`},he.createElement(ho.ZP,{type:"link",size:"small",disabled:Uo(),onClick:()=>ao()},ti.filterReset),he.createElement(ho.ZP,{type:"primary",size:"small",onClick:ts},ti.filterConfirm)))}Lt.filterDropdown&&(kr=he.createElement(Kr.J,{selectable:void 0},kr));const $r=()=>he.createElement(Qa,{className:`${_t}-dropdown`},kr);let Lr;typeof Lt.filterIcon=="function"?Lr=Lt.filterIcon(ar):Lt.filterIcon?Lr=Lt.filterIcon:Lr=he.createElement(ja,null);const{direction:lo}=he.useContext(Gi.E_);return he.createElement("div",{className:`${_t}-column`},he.createElement("span",{className:`${pt}-column-title`},Kn),he.createElement(na.Z,{dropdownRender:$r,trigger:["click"],open:Hi,onOpenChange:No,getPopupContainer:xi,placement:lo==="rtl"?"bottomLeft":"bottomRight"},he.createElement("span",{role:"button",tabIndex:-1,className:ut()(`${_t}-trigger`,{active:ar}),onClick:Ar=>{Ar.stopPropagation()}},Lr)))}var Ha=Aa;function Ta(Dt,zt,ln){let pt=[];return(Dt||[]).forEach((_t,Lt)=>{var Sn;const hn=ws(Lt,ln);if(_t.filters||"filterDropdown"in _t||"onFilter"in _t)if("filteredValue"in _t){let on=_t.filteredValue;"filterDropdown"in _t||(on=(Sn=on==null?void 0:on.map(String))!==null&&Sn!==void 0?Sn:on),pt.push({column:_t,key:Ls(_t,hn),filteredKeys:on,forceFiltered:_t.filtered})}else pt.push({column:_t,key:Ls(_t,hn),filteredKeys:zt&&_t.defaultFilteredValue?_t.defaultFilteredValue:void 0,forceFiltered:_t.filtered});"children"in _t&&(pt=[].concat((0,di.Z)(pt),(0,di.Z)(Ta(_t.children,zt,hn))))}),pt}function $l(Dt,zt,ln,pt,_t,Lt,Sn,hn){return ln.map((on,vn)=>{const yn=ws(vn,hn),{filterMultiple:Cn=!0,filterMode:jn,filterSearch:ti}=on;let Kn=on;if(Kn.filters||Kn.filterDropdown){const xi=Ls(Kn,yn),Vn=pt.find(mi=>{let{key:li}=mi;return xi===li});Kn=Object.assign(Object.assign({},Kn),{title:mi=>he.createElement(Ha,{tablePrefixCls:Dt,prefixCls:`${Dt}-filter`,dropdownPrefixCls:zt,column:Kn,columnKey:xi,filterState:Vn,filterMultiple:Cn,filterMode:jn,filterSearch:ti,triggerFilter:Lt,locale:_t,getPopupContainer:Sn},ta(on.title,mi))})}return"children"in Kn&&(Kn=Object.assign(Object.assign({},Kn),{children:$l(Dt,zt,Kn.children,pt,_t,Lt,Sn,yn)})),Kn})}function Pu(Dt){const zt={};return Dt.forEach(ln=>{let{key:pt,filteredKeys:_t,column:Lt}=ln;const{filters:Sn,filterDropdown:hn}=Lt;if(hn)zt[pt]=_t||null;else if(Array.isArray(_t)){const on=wl(Sn);zt[pt]=on.filter(vn=>_t.includes(String(vn)))}else zt[pt]=null}),zt}function Ua(Dt,zt){return zt.reduce((ln,pt)=>{const{column:{onFilter:_t,filters:Lt},filteredKeys:Sn}=pt;return _t&&Sn&&Sn.length?ln.filter(hn=>Sn.some(on=>{const vn=wl(Lt),yn=vn.findIndex(jn=>String(jn)===String(on)),Cn=yn!==-1?vn[yn]:on;return _t(Cn,hn)})):ln},Dt)}const Ga=Dt=>Dt.flatMap(zt=>"children"in zt?[zt].concat((0,di.Z)(Ga(zt.children||[]))):[zt]);function Uu(Dt){let{prefixCls:zt,dropdownPrefixCls:ln,mergedColumns:pt,onFilterChange:_t,getPopupContainer:Lt,locale:Sn}=Dt;const hn=he.useMemo(()=>Ga(pt||[]),[pt]),[on,vn]=he.useState(()=>Ta(hn,!0)),yn=he.useMemo(()=>{const Kn=Ta(hn,!1);if(Kn.length===0)return Kn;let xi=!0,Vn=!0;if(Kn.forEach(mi=>{let{filteredKeys:li}=mi;li!==void 0?xi=!1:Vn=!1}),xi){const mi=(hn||[]).map((li,Ri)=>Ls(li,ws(Ri)));return on.filter(li=>{let{key:Ri}=li;return mi.includes(Ri)}).map(li=>{const Ri=hn[mi.findIndex(Di=>Di===li.key)];return Object.assign(Object.assign({},li),{column:Object.assign(Object.assign({},li.column),Ri),forceFiltered:Ri.filtered})})}return Kn},[hn,on]),Cn=he.useMemo(()=>Pu(yn),[yn]),jn=Kn=>{const xi=yn.filter(Vn=>{let{key:mi}=Vn;return mi!==Kn.key});xi.push(Kn),vn(xi),_t(Pu(xi),xi)};return[Kn=>$l(zt,ln,Kn,yn,Sn,jn,Lt),yn,Cn]}var yc=Uu;function Eu(Dt,zt,ln){const pt=he.useRef({});function _t(Lt){if(!pt.current||pt.current.data!==Dt||pt.current.childrenColumnName!==zt||pt.current.getRowKey!==ln){let hn=function(on){on.forEach((vn,yn)=>{const Cn=ln(vn,yn);Sn.set(Cn,vn),vn&&typeof vn=="object"&&zt in vn&&hn(vn[zt]||[])})};const Sn=new Map;hn(Dt),pt.current={data:Dt,childrenColumnName:zt,kvMap:Sn,getRowKey:ln}}return pt.current.kvMap.get(Lt)}return[_t]}var Dl=Ee(50371),Sc=function(Dt,zt){var ln={};for(var pt in Dt)Object.prototype.hasOwnProperty.call(Dt,pt)&&zt.indexOf(pt)<0&&(ln[pt]=Dt[pt]);if(Dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,pt=Object.getOwnPropertySymbols(Dt);_t<pt.length;_t++)zt.indexOf(pt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Dt,pt[_t])&&(ln[pt[_t]]=Dt[pt[_t]]);return ln};const Gu=10;function Lu(Dt,zt){const ln={current:Dt.current,pageSize:Dt.pageSize};return Object.keys(zt&&typeof zt=="object"?zt:{}).forEach(_t=>{const Lt=Dt[_t];typeof Lt!="function"&&(ln[_t]=Lt)}),ln}function bl(Dt,zt,ln){const pt=ln&&typeof ln=="object"?ln:{},{total:_t=0}=pt,Lt=Sc(pt,["total"]),[Sn,hn]=(0,he.useState)(()=>({current:"defaultCurrent"in Lt?Lt.defaultCurrent:1,pageSize:"defaultPageSize"in Lt?Lt.defaultPageSize:Gu})),on=(0,Dl.Z)(Sn,Lt,{total:_t>0?_t:Dt}),vn=Math.ceil((_t||Dt)/on.pageSize);on.current>vn&&(on.current=vn||1);const yn=(jn,ti)=>{hn({current:jn!=null?jn:1,pageSize:ti||on.pageSize})},Cn=(jn,ti)=>{var Kn;ln&&((Kn=ln.onChange)===null||Kn===void 0||Kn.call(ln,jn,ti)),yn(jn,ti),zt(jn,ti||(on==null?void 0:on.pageSize))};return ln===!1?[{},()=>{}]:[Object.assign(Object.assign({},on),{onChange:Cn}),yn]}var th=bl,xc=Ee(84105),uu=Ee(35654),so=Ee(90782),jo=Ee(71430),La=Ee(18929);const ia={},Is="SELECT_ALL",bs="SELECT_INVERT",Ts="SELECT_NONE",Gs=[],Ws=(Dt,zt)=>{let ln=[];return(zt||[]).forEach(pt=>{ln.push(pt),pt&&typeof pt=="object"&&Dt in pt&&(ln=[].concat((0,di.Z)(ln),(0,di.Z)(Ws(Dt,pt[Dt]))))}),ln};var Rl=(Dt,zt)=>{const{preserveSelectedRowKeys:ln,selectedRowKeys:pt,defaultSelectedRowKeys:_t,getCheckboxProps:Lt,onChange:Sn,onSelect:hn,onSelectAll:on,onSelectInvert:vn,onSelectNone:yn,onSelectMultiple:Cn,columnWidth:jn,type:ti,selections:Kn,fixed:xi,renderCell:Vn,hideSelectAll:mi,checkStrictly:li=!0}=zt||{},{prefixCls:Ri,data:Di,pageData:Zi,getRecordByKey:Oi,getRowKey:Ii,expandType:ar,childrenColumnName:ei,locale:Hi,getPopupContainer:Li}=Dt,[bi,Xi]=(0,La.Z)(pt||_t||Gs,{value:pt}),gi=he.useRef(new Map),ur=(0,he.useCallback)(Hr=>{if(ln){const kr=new Map;Hr.forEach($r=>{let Lr=Oi($r);!Lr&&gi.current.has($r)&&(Lr=gi.current.get($r)),kr.set($r,Lr)}),gi.current=kr}},[Oi,ln]);he.useEffect(()=>{ur(bi)},[bi]);const{keyEntities:Ji}=(0,he.useMemo)(()=>{if(li)return{keyEntities:null};let Hr=Di;if(ln){const kr=new Set(Di.map((Lr,lo)=>Ii(Lr,lo))),$r=Array.from(gi.current).reduce((Lr,lo)=>{let[Ar,po]=lo;return kr.has(Ar)?Lr:Lr.concat(po)},[]);Hr=[].concat((0,di.Z)(Hr),(0,di.Z)($r))}return(0,jo.I8)(Hr,{externalGetKey:Ii,childrenPropName:ei})},[Di,Ii,li,ei,ln]),_i=(0,he.useMemo)(()=>Ws(ei,Zi),[ei,Zi]),Vi=(0,he.useMemo)(()=>{const Hr=new Map;return _i.forEach((kr,$r)=>{const Lr=Ii(kr,$r),lo=(Lt?Lt(kr):null)||{};Hr.set(Lr,lo)}),Hr},[_i,Ii,Lt]),mr=(0,he.useCallback)(Hr=>{var kr;return!!(!((kr=Vi.get(Ii(Hr)))===null||kr===void 0)&&kr.disabled)},[Vi,Ii]),[ir,So]=(0,he.useMemo)(()=>{if(li)return[bi||[],[]];const{checkedKeys:Hr,halfCheckedKeys:kr}=(0,so.S)(bi,!0,Ji,mr);return[Hr||[],kr]},[bi,li,Ji,mr]),Lo=(0,he.useMemo)(()=>{const Hr=ti==="radio"?ir.slice(0,1):ir;return new Set(Hr)},[ir,ti]),ts=(0,he.useMemo)(()=>ti==="radio"?new Set:new Set(So),[So,ti]),[ao,Nr]=(0,he.useState)(null);he.useEffect(()=>{zt||Xi(Gs)},[!!zt]);const No=(0,he.useCallback)((Hr,kr)=>{let $r,Lr;ur(Hr),ln?($r=Hr,Lr=Hr.map(lo=>gi.current.get(lo))):($r=[],Lr=[],Hr.forEach(lo=>{const Ar=Oi(lo);Ar!==void 0&&($r.push(lo),Lr.push(Ar))})),Xi($r),Sn==null||Sn($r,Lr,{type:kr})},[Xi,Oi,Sn,ln]),Ir=(0,he.useCallback)((Hr,kr,$r,Lr)=>{if(hn){const lo=$r.map(Ar=>Oi(Ar));hn(Oi(Hr),kr,lo,Lr)}No($r,"single")},[hn,Oi,No]),Vr=(0,he.useMemo)(()=>!Kn||mi?null:(Kn===!0?[Is,bs,Ts]:Kn).map(kr=>kr===Is?{key:"all",text:Hi.selectionAll,onSelect(){No(Di.map(($r,Lr)=>Ii($r,Lr)).filter($r=>{const Lr=Vi.get($r);return!(Lr!=null&&Lr.disabled)||Lo.has($r)}),"all")}}:kr===bs?{key:"invert",text:Hi.selectInvert,onSelect(){const $r=new Set(Lo);Zi.forEach((lo,Ar)=>{const po=Ii(lo,Ar),Uo=Vi.get(po);Uo!=null&&Uo.disabled||($r.has(po)?$r.delete(po):$r.add(po))});const Lr=Array.from($r);vn&&vn(Lr),No(Lr,"invert")}}:kr===Ts?{key:"none",text:Hi.selectNone,onSelect(){yn==null||yn(),No(Array.from(Lo).filter($r=>{const Lr=Vi.get($r);return Lr==null?void 0:Lr.disabled}),"none")}}:kr).map(kr=>Object.assign(Object.assign({},kr),{onSelect:function(){for(var $r,Lr,lo=arguments.length,Ar=new Array(lo),po=0;po<lo;po++)Ar[po]=arguments[po];(Lr=kr.onSelect)===null||Lr===void 0||($r=Lr).call.apply($r,[kr].concat(Ar)),Nr(null)}})),[Kn,Lo,Zi,Ii,vn,No]);return[(0,he.useCallback)(Hr=>{var kr;if(!zt)return Hr.filter(Xo=>Xo!==ia);let $r=(0,di.Z)(Hr);const Lr=new Set(Lo),lo=_i.map(Ii).filter(Xo=>!Vi.get(Xo).disabled),Ar=lo.every(Xo=>Lr.has(Xo)),po=lo.some(Xo=>Lr.has(Xo)),Uo=()=>{const Xo=[];Ar?lo.forEach(Ss=>{Lr.delete(Ss),Xo.push(Ss)}):lo.forEach(Ss=>{Lr.has(Ss)||(Lr.add(Ss),Xo.push(Ss))});const Jo=Array.from(Lr);on==null||on(!Ar,Jo.map(Ss=>Oi(Ss)),Xo.map(Ss=>Oi(Ss))),No(Jo,"all"),Nr(null)};let Go;if(ti!=="radio"){let Xo;if(Vr){const Bo={getPopupContainer:Li,items:Vr.map((ks,_a)=>{const{key:Pl,text:Xl,onSelect:Fl}=ks;return{key:Pl!=null?Pl:_a,onClick:()=>{Fl==null||Fl(lo)},label:Xl}})};Xo=he.createElement("div",{className:`${Ri}-selection-extra`},he.createElement(na.Z,{menu:Bo,getPopupContainer:Li},he.createElement("span",null,he.createElement(xc.Z,null))))}const Jo=_i.map((Bo,ks)=>{const _a=Ii(Bo,ks),Pl=Vi.get(_a)||{};return Object.assign({checked:Lr.has(_a)},Pl)}).filter(Bo=>{let{disabled:ks}=Bo;return ks}),Ss=!!Jo.length&&Jo.length===_i.length,Es=Ss&&Jo.every(Bo=>{let{checked:ks}=Bo;return ks}),pa=Ss&&Jo.some(Bo=>{let{checked:ks}=Bo;return ks});Go=!mi&&he.createElement("div",{className:`${Ri}-selection`},he.createElement(Er.default,{checked:Ss?Es:!!_i.length&&Ar,indeterminate:Ss?!Es&&pa:!Ar&&po,onChange:Uo,disabled:_i.length===0||Ss,"aria-label":Xo?"Custom selection":"Select all",skipGroup:!0}),Xo)}let Yr;ti==="radio"?Yr=(Xo,Jo,Ss)=>{const Es=Ii(Jo,Ss),pa=Lr.has(Es);return{node:he.createElement(Ei.ZP,Object.assign({},Vi.get(Es),{checked:pa,onClick:Bo=>Bo.stopPropagation(),onChange:Bo=>{Lr.has(Es)||Ir(Es,!0,[Es],Bo.nativeEvent)}})),checked:pa}}:Yr=(Xo,Jo,Ss)=>{var Es;const pa=Ii(Jo,Ss),Bo=Lr.has(pa),ks=ts.has(pa),_a=Vi.get(pa);let Pl;return ar==="nest"?Pl=ks:Pl=(Es=_a==null?void 0:_a.indeterminate)!==null&&Es!==void 0?Es:ks,{node:he.createElement(Er.default,Object.assign({},_a,{indeterminate:Pl,checked:Bo,skipGroup:!0,onClick:Xl=>Xl.stopPropagation(),onChange:Xl=>{let{nativeEvent:Fl}=Xl;const{shiftKey:hu}=Fl;let du=-1,Jl=-1;if(hu&&li){const ds=new Set([ao,pa]);lo.some((Oa,ra)=>{if(ds.has(Oa))if(du===-1)du=ra;else return Jl=ra,!0;return!1})}if(Jl!==-1&&du!==Jl&&li){const ds=lo.slice(du,Jl+1),Oa=[];Bo?ds.forEach(As=>{Lr.has(As)&&(Oa.push(As),Lr.delete(As))}):ds.forEach(As=>{Lr.has(As)||(Oa.push(As),Lr.add(As))});const ra=Array.from(Lr);Cn==null||Cn(!Bo,ra.map(As=>Oi(As)),Oa.map(As=>Oi(As))),No(ra,"multiple")}else{const ds=ir;if(li){const Oa=Bo?(0,uu._5)(ds,pa):(0,uu.L0)(ds,pa);Ir(pa,!Bo,Oa,Fl)}else{const Oa=(0,so.S)([].concat((0,di.Z)(ds),[pa]),!0,Ji,mr),{checkedKeys:ra,halfCheckedKeys:As}=Oa;let Ql=ra;if(Bo){const Pc=new Set(ra);Pc.delete(pa),Ql=(0,so.S)(Array.from(Pc),{checked:!1,halfCheckedKeys:As},Ji,mr).checkedKeys}Ir(pa,!Bo,Ql,Fl)}}Nr(Bo?null:pa)}})),checked:Bo}};const Io=(Xo,Jo,Ss)=>{const{node:Es,checked:pa}=Yr(Xo,Jo,Ss);return Vn?Vn(pa,Jo,Ss,Es):Es};if(!$r.includes(ia))if($r.findIndex(Xo=>{var Jo;return((Jo=Xo[tr])===null||Jo===void 0?void 0:Jo.columnType)==="EXPAND_COLUMN"})===0){const[Xo,...Jo]=$r;$r=[Xo,ia].concat((0,di.Z)(Jo))}else $r=[ia].concat((0,di.Z)($r));const Cs=$r.indexOf(ia);$r=$r.filter((Xo,Jo)=>Xo!==ia||Jo===Cs);const To=$r[Cs-1],Yo=$r[Cs+1];let ys=xi;ys===void 0&&((Yo==null?void 0:Yo.fixed)!==void 0?ys=Yo.fixed:(To==null?void 0:To.fixed)!==void 0&&(ys=To.fixed)),ys&&To&&((kr=To[tr])===null||kr===void 0?void 0:kr.columnType)==="EXPAND_COLUMN"&&To.fixed===void 0&&(To.fixed=ys);const Ys=ut()(`${Ri}-selection-col`,{[`${Ri}-selection-col-with-dropdown`]:Kn&&ti==="checkbox"}),_l={fixed:ys,width:jn,className:`${Ri}-selection-column`,title:zt.columnTitle||Go,render:Io,onCell:zt.onCell,[tr]:{className:Ys}};return $r.map(Xo=>Xo===ia?_l:Xo)},[Ii,_i,zt,ir,Lo,ts,jn,Vr,ar,ao,Vi,Cn,Ir,mr]),Lo]},Ds=Ee(89489),xh=Ee(59477),nh=Ee(6848);const wc="ascend",gr="descend";function bc(Dt){return typeof Dt.sorter=="object"&&typeof Dt.sorter.multiple=="number"?Dt.sorter.multiple:!1}function rn(Dt){return typeof Dt=="function"?Dt:Dt&&typeof Dt=="object"&&Dt.compare?Dt.compare:!1}function Qn(Dt,zt){return zt?Dt[Dt.indexOf(zt)+1]:Dt[0]}function wh(Dt,zt,ln){let pt=[];function _t(Lt,Sn){pt.push({column:Lt,key:Ls(Lt,Sn),multiplePriority:bc(Lt),sortOrder:Lt.sortOrder})}return(Dt||[]).forEach((Lt,Sn)=>{const hn=ws(Sn,ln);Lt.children?("sortOrder"in Lt&&_t(Lt,hn),pt=[].concat((0,di.Z)(pt),(0,di.Z)(wh(Lt.children,zt,hn)))):Lt.sorter&&("sortOrder"in Lt?_t(Lt,hn):zt&&Lt.defaultSortOrder&&pt.push({column:Lt,key:Ls(Lt,hn),multiplePriority:bc(Lt),sortOrder:Lt.defaultSortOrder}))}),pt}function Qh(Dt,zt,ln,pt,_t,Lt,Sn,hn){return(zt||[]).map((on,vn)=>{const yn=ws(vn,hn);let Cn=on;if(Cn.sorter){const jn=Cn.sortDirections||_t,ti=Cn.showSorterTooltip===void 0?Sn:Cn.showSorterTooltip,Kn=Ls(Cn,yn),xi=ln.find(ar=>{let{key:ei}=ar;return ei===Kn}),Vn=xi?xi.sortOrder:null,mi=Qn(jn,Vn);let li;if(on.sortIcon)li=on.sortIcon({sortOrder:Vn});else{const ar=jn.includes(wc)&&he.createElement(xh.Z,{className:ut()(`${Dt}-column-sorter-up`,{active:Vn===wc})}),ei=jn.includes(gr)&&he.createElement(Ds.Z,{className:ut()(`${Dt}-column-sorter-down`,{active:Vn===gr})});li=he.createElement("span",{className:ut()(`${Dt}-column-sorter`,{[`${Dt}-column-sorter-full`]:!!(ar&&ei)})},he.createElement("span",{className:`${Dt}-column-sorter-inner`,"aria-hidden":"true"},ar,ei))}const{cancelSort:Ri,triggerAsc:Di,triggerDesc:Zi}=Lt||{};let Oi=Ri;mi===gr?Oi=Zi:mi===wc&&(Oi=Di);const Ii=typeof ti=="object"?ti:{title:Oi};Cn=Object.assign(Object.assign({},Cn),{className:ut()(Cn.className,{[`${Dt}-column-sort`]:Vn}),title:ar=>{const ei=he.createElement("div",{className:`${Dt}-column-sorters`},he.createElement("span",{className:`${Dt}-column-title`},ta(on.title,ar)),li);return ti?he.createElement(nh.Z,Object.assign({},Ii),ei):ei},onHeaderCell:ar=>{const ei=on.onHeaderCell&&on.onHeaderCell(ar)||{},Hi=ei.onClick,Li=ei.onKeyDown;ei.onClick=gi=>{pt({column:on,key:Kn,sortOrder:mi,multiplePriority:bc(on)}),Hi==null||Hi(gi)},ei.onKeyDown=gi=>{gi.keyCode===yi.Z.ENTER&&(pt({column:on,key:Kn,sortOrder:mi,multiplePriority:bc(on)}),Li==null||Li(gi))};const bi=aa(on.title,{}),Xi=bi==null?void 0:bi.toString();return Vn?ei["aria-sort"]=Vn==="ascend"?"ascending":"descending":ei["aria-label"]=Xi||"",ei.className=ut()(ei.className,`${Dt}-column-has-sorters`),ei.tabIndex=0,on.ellipsis&&(ei.title=(bi!=null?bi:"").toString()),ei}})}return"children"in Cn&&(Cn=Object.assign(Object.assign({},Cn),{children:Qh(Dt,Cn.children,ln,pt,_t,Lt,Sn,yn)})),Cn})}function Mu(Dt){const{column:zt,sortOrder:ln}=Dt;return{column:zt,order:ln,field:zt.dataIndex,columnKey:zt.key}}function Tu(Dt){const zt=Dt.filter(ln=>{let{sortOrder:pt}=ln;return pt}).map(Mu);return zt.length===0&&Dt.length?Object.assign(Object.assign({},Mu(Dt[Dt.length-1])),{column:void 0}):zt.length<=1?zt[0]||{}:zt}function Wu(Dt,zt,ln){const pt=zt.slice().sort((Sn,hn)=>hn.multiplePriority-Sn.multiplePriority),_t=Dt.slice(),Lt=pt.filter(Sn=>{let{column:{sorter:hn},sortOrder:on}=Sn;return rn(hn)&&on});return Lt.length?_t.sort((Sn,hn)=>{for(let on=0;on<Lt.length;on+=1){const vn=Lt[on],{column:{sorter:yn},sortOrder:Cn}=vn,jn=rn(yn);if(jn&&Cn){const ti=jn(Sn,hn,Cn);if(ti!==0)return Cn===wc?ti:-ti}}return 0}).map(Sn=>{const hn=Sn[ln];return hn?Object.assign(Object.assign({},Sn),{[ln]:Wu(hn,zt,ln)}):Sn}):_t}function bh(Dt){let{prefixCls:zt,mergedColumns:ln,onSorterChange:pt,sortDirections:_t,tableLocale:Lt,showSorterTooltip:Sn}=Dt;const[hn,on]=he.useState(wh(ln,!0)),vn=he.useMemo(()=>{let Kn=!0;const xi=wh(ln,!1);if(!xi.length)return hn;const Vn=[];function mi(Ri){Kn?Vn.push(Ri):Vn.push(Object.assign(Object.assign({},Ri),{sortOrder:null}))}let li=null;return xi.forEach(Ri=>{li===null?(mi(Ri),Ri.sortOrder&&(Ri.multiplePriority===!1?Kn=!1:li=!0)):(li&&Ri.multiplePriority!==!1||(Kn=!1),mi(Ri))}),Vn},[ln,hn]),yn=he.useMemo(()=>{const Kn=vn.map(xi=>{let{column:Vn,sortOrder:mi}=xi;return{column:Vn,order:mi}});return{sortColumns:Kn,sortColumn:Kn[0]&&Kn[0].column,sortOrder:Kn[0]&&Kn[0].order}},[vn]);function Cn(Kn){let xi;Kn.multiplePriority===!1||!vn.length||vn[0].multiplePriority===!1?xi=[Kn]:xi=[].concat((0,di.Z)(vn.filter(Vn=>{let{key:mi}=Vn;return mi!==Kn.key})),[Kn]),on(xi),pt(Tu(xi),xi)}return[Kn=>Qh(zt,Kn,vn,Cn,_t,Lt,Sn),vn,yn,()=>Tu(vn)]}function Cc(Dt,zt){return Dt.map(ln=>{const pt=Object.assign({},ln);return pt.title=ta(ln.title,zt),"children"in pt&&(pt.children=Cc(pt.children,zt)),pt})}function Zs(Dt){return[he.useCallback(ln=>Cc(ln,Dt),[Dt])]}var Wr=hr((Dt,zt)=>{const{_renderTimes:ln}=Dt,{_renderTimes:pt}=zt;return ln!==pt}),Na=Po((Dt,zt)=>{const{_renderTimes:ln}=Dt,{_renderTimes:pt}=zt;return ln!==pt}),Ks=Ee(64993),Ps=Ee(17313),wo=Ee(83116),fa=Ee(37613),ss=Dt=>{const{componentCls:zt}=Dt,ln=`${Dt.lineWidth}px ${Dt.lineType} ${Dt.tableBorderColor}`,pt=(_t,Lt,Sn)=>({[`&${zt}-${_t}`]:{[`> ${zt}-container`]:{[`> ${zt}-content, > ${zt}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${zt}-expanded-row-fixed`]:{margin:`-${Lt}px -${Sn+Dt.lineWidth}px`}}}}}});return{[`${zt}-wrapper`]:{[`${zt}${zt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${zt}-title`]:{border:ln,borderBottom:0},[`> ${zt}-container`]:{borderInlineStart:ln,borderTop:ln,[`
|
|
|
> ${zt}-content,
|
|
|
> ${zt}-header,
|
|
|
> ${zt}-body,
|
|
|
> ${zt}-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:ln},"> thead":{"> tr:not(:last-child) > th":{borderBottom:ln},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${zt}-cell-fix-right-first::after`]:{borderInlineEnd:ln}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${zt}-expanded-row-fixed`]:{margin:`-${Dt.tablePaddingVertical}px -${Dt.tablePaddingHorizontal+Dt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:Dt.lineWidth,bottom:0,borderInlineEnd:ln,content:'""'}}}}}},[`&${zt}-scroll-horizontal`]:{[`> ${zt}-container > ${zt}-body`]:{"> table > tbody":{[`
|
|
|
> tr${zt}-expanded-row,
|
|
|
> tr${zt}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},pt("middle",Dt.tablePaddingVerticalMiddle,Dt.tablePaddingHorizontalMiddle)),pt("small",Dt.tablePaddingVerticalSmall,Dt.tablePaddingHorizontalSmall)),{[`> ${zt}-footer`]:{border:ln,borderTop:0}}),[`${zt}-cell`]:{[`${zt}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Dt.lineWidth}px 0 ${Dt.lineWidth}px ${Dt.tableHeaderBg}`}},[`${zt}-bordered ${zt}-cell-scrollbar`]:{borderInlineEnd:ln}}}},Ca=Dt=>{const{componentCls:zt}=Dt;return{[`${zt}-wrapper`]:{[`${zt}-cell-ellipsis`]:Object.assign(Object.assign({},Ps.vS),{wordBreak:"keep-all",[`
|
|
|
&${zt}-cell-fix-left-last,
|
|
|
&${zt}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${zt}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${zt}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},zo=Dt=>{const{componentCls:zt}=Dt;return{[`${zt}-wrapper`]:{[`${zt}-tbody > tr${zt}-placeholder`]:{textAlign:"center",color:Dt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:Dt.colorBgContainer}}}}},Wa=Ee(15969),ps=Dt=>{const{componentCls:zt,antCls:ln,controlInteractiveSize:pt,motionDurationSlow:_t,lineWidth:Lt,paddingXS:Sn,lineType:hn,tableBorderColor:on,tableExpandIconBg:vn,tableExpandColumnWidth:yn,borderRadius:Cn,fontSize:jn,fontSizeSM:ti,lineHeight:Kn,tablePaddingVertical:xi,tablePaddingHorizontal:Vn,tableExpandedRowBg:mi,paddingXXS:li}=Dt,Ri=pt/2-Lt,Di=Ri*2+Lt*3,Zi=`${Lt}px ${hn} ${on}`,Oi=li-Lt;return{[`${zt}-wrapper`]:{[`${zt}-expand-icon-col`]:{width:yn},[`${zt}-row-expand-icon-cell`]:{textAlign:"center",[`${zt}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${zt}-row-indent`]:{height:1,float:"left"},[`${zt}-row-expand-icon`]:Object.assign(Object.assign({},(0,Wa.N)(Dt)),{position:"relative",float:"left",boxSizing:"border-box",width:Di,height:Di,padding:0,color:"inherit",lineHeight:`${Di}px`,background:vn,border:Zi,borderRadius:Cn,transform:`scale(${pt/Di})`,transition:`all ${_t}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${_t} ease-out`,content:'""'},"&::before":{top:Ri,insetInlineEnd:Oi,insetInlineStart:Oi,height:Lt},"&::after":{top:Oi,bottom:Oi,insetInlineStart:Ri,width:Lt,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"}}),[`${zt}-row-indent + ${zt}-row-expand-icon`]:{marginTop:(jn*Kn-Lt*3)/2-Math.ceil((ti*1.4-Lt*3)/2),marginInlineEnd:Sn},[`tr${zt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:mi}},[`${ln}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${zt}-expanded-row-fixed`]:{position:"relative",margin:`-${xi}px -${Vn}px`,padding:`${xi}px ${Vn}px`}}}},Rs=Dt=>{const{componentCls:zt,antCls:ln,iconCls:pt,tableFilterDropdownWidth:_t,tableFilterDropdownSearchWidth:Lt,paddingXXS:Sn,paddingXS:hn,colorText:on,lineWidth:vn,lineType:yn,tableBorderColor:Cn,tableHeaderIconColor:jn,fontSizeSM:ti,tablePaddingHorizontal:Kn,borderRadius:xi,motionDurationSlow:Vn,colorTextDescription:mi,colorPrimary:li,tableHeaderFilterActiveBg:Ri,colorTextDisabled:Di,tableFilterDropdownBg:Zi,tableFilterDropdownHeight:Oi,controlItemBgHover:Ii,controlItemBgActive:ar,boxShadowSecondary:ei,filterDropdownMenuBg:Hi}=Dt,Li=`${ln}-dropdown`,bi=`${zt}-filter-dropdown`,Xi=`${ln}-tree`,gi=`${vn}px ${yn} ${Cn}`;return[{[`${zt}-wrapper`]:{[`${zt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${zt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Sn,marginInline:`${Sn}px ${-Kn/2}px`,padding:`0 ${Sn}px`,color:jn,fontSize:ti,borderRadius:xi,cursor:"pointer",transition:`all ${Vn}`,"&:hover":{color:mi,background:Ri},"&.active":{color:li}}}},{[`${ln}-dropdown`]:{[bi]:Object.assign(Object.assign({},(0,Ps.Wf)(Dt)),{minWidth:_t,backgroundColor:Zi,borderRadius:xi,boxShadow:ei,overflow:"hidden",[`${Li}-menu`]:{maxHeight:Oi,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Hi,"&:empty::after":{display:"block",padding:`${hn}px 0`,color:Di,fontSize:ti,textAlign:"center",content:'"Not Found"'}},[`${bi}-tree`]:{paddingBlock:`${hn}px 0`,paddingInline:hn,[Xi]:{padding:0},[`${Xi}-treenode ${Xi}-node-content-wrapper:hover`]:{backgroundColor:Ii},[`${Xi}-treenode-checkbox-checked ${Xi}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:ar}}},[`${bi}-search`]:{padding:hn,borderBottom:gi,"&-input":{input:{minWidth:Lt},[pt]:{color:Di}}},[`${bi}-checkall`]:{width:"100%",marginBottom:Sn,marginInlineStart:Sn},[`${bi}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${hn-vn}px ${hn}px`,overflow:"hidden",borderTop:gi}})}},{[`${ln}-dropdown ${bi}, ${bi}-submenu`]:{[`${ln}-checkbox-wrapper + span`]:{paddingInlineStart:hn,color:on},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Rc=Dt=>{const{componentCls:zt,lineWidth:ln,colorSplit:pt,motionDurationSlow:_t,zIndexTableFixed:Lt,tableBg:Sn,zIndexTableSticky:hn}=Dt,on=pt;return{[`${zt}-wrapper`]:{[`
|
|
|
${zt}-cell-fix-left,
|
|
|
${zt}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Lt,background:Sn},[`
|
|
|
${zt}-cell-fix-left-first::after,
|
|
|
${zt}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-ln,width:30,transform:"translateX(100%)",transition:`box-shadow ${_t}`,content:'""',pointerEvents:"none"},[`${zt}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${zt}-cell-fix-right-first::after,
|
|
|
${zt}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-ln,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${_t}`,content:'""',pointerEvents:"none"},[`${zt}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:hn+1,width:30,transition:`box-shadow ${_t}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${zt}-ping-left`]:{[`&:not(${zt}-has-fix-left) ${zt}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${on}`}},[`
|
|
|
${zt}-cell-fix-left-first::after,
|
|
|
${zt}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${on}`},[`${zt}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${zt}-ping-right`]:{[`&:not(${zt}-has-fix-right) ${zt}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${on}`}},[`
|
|
|
${zt}-cell-fix-right-first::after,
|
|
|
${zt}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${on}`}}}}},Ad=Dt=>{const{componentCls:zt,antCls:ln}=Dt;return{[`${zt}-wrapper`]:{[`${zt}-pagination${ln}-pagination`]:{margin:`${Dt.margin}px 0`},[`${zt}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:Dt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Nd=Dt=>{const{componentCls:zt,tableRadius:ln}=Dt;return{[`${zt}-wrapper`]:{[zt]:{[`${zt}-title, ${zt}-header`]:{borderRadius:`${ln}px ${ln}px 0 0`},[`${zt}-title + ${zt}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${zt}-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:ln,borderStartEndRadius:ln,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:ln},"> *:last-child":{borderStartEndRadius:ln}}},"&-footer":{borderRadius:`0 0 ${ln}px ${ln}px`}}}}},rh=Dt=>{const{componentCls:zt}=Dt;return{[`${zt}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${zt}-pagination-left`]:{justifyContent:"flex-end"},[`${zt}-pagination-right`]:{justifyContent:"flex-start"},[`${zt}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${zt}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${zt}-row-indent`]:{float:"right"}}}}},Ch=Dt=>{const{componentCls:zt,antCls:ln,iconCls:pt,fontSizeIcon:_t,padding:Lt,paddingXS:Sn,tableHeaderIconColor:hn,tableHeaderIconColorHover:on,tableSelectionColumnWidth:vn}=Dt;return{[`${zt}-wrapper`]:{[`${zt}-selection-col`]:{width:vn,[`&${zt}-selection-col-with-dropdown`]:{width:vn+_t+Lt/4}},[`${zt}-bordered ${zt}-selection-col`]:{width:vn+Sn*2,[`&${zt}-selection-col-with-dropdown`]:{width:vn+_t+Lt/4+Sn*2}},[`
|
|
|
table tr th${zt}-selection-column,
|
|
|
table tr td${zt}-selection-column
|
|
|
`]:{paddingInlineEnd:Dt.paddingXS,paddingInlineStart:Dt.paddingXS,textAlign:"center",[`${ln}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${zt}-selection-column${zt}-cell-fix-left`]:{zIndex:Dt.zIndexTableFixed+1},[`table tr th${zt}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${zt}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${zt}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${Dt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${Dt.tablePaddingHorizontal/4}px`,[pt]:{color:hn,fontSize:_t,verticalAlign:"baseline","&:hover":{color:on}}}}}},oo=Dt=>{const{componentCls:zt}=Dt,ln=(pt,_t,Lt,Sn)=>({[`${zt}${zt}-${pt}`]:{fontSize:Sn,[`
|
|
|
${zt}-title,
|
|
|
${zt}-footer,
|
|
|
${zt}-cell,
|
|
|
${zt}-thead > tr > th,
|
|
|
${zt}-tbody > tr > th,
|
|
|
${zt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${_t}px ${Lt}px`},[`${zt}-filter-trigger`]:{marginInlineEnd:`-${Lt/2}px`},[`${zt}-expanded-row-fixed`]:{margin:`-${_t}px -${Lt}px`},[`${zt}-tbody`]:{[`${zt}-wrapper:only-child ${zt}`]:{marginBlock:`-${_t}px`,marginInline:`${Dt.tableExpandColumnWidth-Lt}px -${Lt}px`}},[`${zt}-selection-column`]:{paddingInlineStart:`${Lt/4}px`}}});return{[`${zt}-wrapper`]:Object.assign(Object.assign({},ln("middle",Dt.tablePaddingVerticalMiddle,Dt.tablePaddingHorizontalMiddle,Dt.tableFontSizeMiddle)),ln("small",Dt.tablePaddingVerticalSmall,Dt.tablePaddingHorizontalSmall,Dt.tableFontSizeSmall))}},ku=Dt=>{const{componentCls:zt,marginXXS:ln,fontSizeIcon:pt,tableHeaderIconColor:_t,tableHeaderIconColorHover:Lt}=Dt;return{[`${zt}-wrapper`]:{[`${zt}-thead th${zt}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${Dt.motionDurationSlow}`,"&:hover":{background:Dt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:Dt.colorPrimary},[`
|
|
|
&${zt}-cell-fix-left:hover,
|
|
|
&${zt}-cell-fix-right:hover
|
|
|
`]:{background:Dt.tableFixedHeaderSortActiveBg}},[`${zt}-thead th${zt}-column-sort`]:{background:Dt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${zt}-column-sort`]:{background:Dt.tableBodySortBg},[`${zt}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${zt}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${zt}-column-sorter`]:{marginInlineStart:ln,color:_t,fontSize:0,transition:`color ${Dt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:pt,"&.active":{color:Dt.colorPrimary}},[`${zt}-column-sorter-up + ${zt}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${zt}-column-sorters:hover ${zt}-column-sorter`]:{color:Lt}}}},Au=Dt=>{const{componentCls:zt,opacityLoading:ln,tableScrollThumbBg:pt,tableScrollThumbBgHover:_t,tableScrollThumbSize:Lt,tableScrollBg:Sn,zIndexTableSticky:hn,stickyScrollBarBorderRadius:on}=Dt,vn=`${Dt.lineWidth}px ${Dt.lineType} ${Dt.tableBorderColor}`;return{[`${zt}-wrapper`]:{[`${zt}-sticky`]:{"&-holder":{position:"sticky",zIndex:hn,background:Dt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Lt}px !important`,zIndex:hn,display:"flex",alignItems:"center",background:Sn,borderTop:vn,opacity:ln,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Lt,backgroundColor:pt,borderRadius:on,transition:`all ${Dt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:_t}}}}}}},cu=Dt=>{const{componentCls:zt,lineWidth:ln,tableBorderColor:pt}=Dt,_t=`${ln}px ${Dt.lineType} ${pt}`;return{[`${zt}-wrapper`]:{[`${zt}-summary`]:{position:"relative",zIndex:Dt.zIndexTableFixed,background:Dt.tableBg,"> tr":{"> th, > td":{borderBottom:_t}}},[`div${zt}-summary`]:{boxShadow:`0 -${ln}px 0 ${pt}`}}}},hs=Dt=>{const{componentCls:zt}=Dt,ln=`${Dt.lineWidth}px ${Dt.lineType} ${Dt.tableBorderColor}`,pt=`${zt}-expanded-row-cell`;return{[`${zt}-wrapper`]:{[`${zt}-tbody-virtual`]:{[`${zt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${zt}-cell`]:{borderBottom:ln},[`${zt}-expanded-row`]:{[`${pt}${pt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${Dt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${zt}-bordered`]:{[`${zt}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:ln,position:"absolute"},[`${zt}-cell`]:{borderInlineEnd:ln,[`&${zt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-Dt.lineWidth,borderInlineStart:ln}}}}}}};const Bs=Dt=>{const{componentCls:zt,fontWeightStrong:ln,tablePaddingVertical:pt,tablePaddingHorizontal:_t,lineWidth:Lt,lineType:Sn,tableBorderColor:hn,tableFontSize:on,tableBg:vn,tableRadius:yn,tableHeaderTextColor:Cn,motionDurationMid:jn,tableHeaderBg:ti,tableHeaderCellSplitColor:Kn,tableRowHoverBg:xi,tableSelectedRowBg:Vn,tableSelectedRowHoverBg:mi,tableFooterTextColor:li,tableFooterBg:Ri,paddingContentVerticalLG:Di}=Dt,Zi=`${Lt}px ${Sn} ${hn}`;return{[`${zt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ps.dF)()),{[zt]:Object.assign(Object.assign({},(0,Ps.Wf)(Dt)),{fontSize:on,background:vn,borderRadius:`${yn}px ${yn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${yn}px ${yn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${zt}-cell,
|
|
|
${zt}-thead > tr > th,
|
|
|
${zt}-tbody > tr > th,
|
|
|
${zt}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${Di}px ${_t}px`,overflowWrap:"break-word"},[`${zt}-title`]:{padding:`${pt}px ${_t}px`},[`${zt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Cn,fontWeight:ln,textAlign:"start",background:ti,borderBottom:Zi,transition:`background ${jn} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${zt}-selection-column):not(${zt}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Kn,transform:"translateY(-50%)",transition:`background-color ${jn}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${zt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${jn}, border-color ${jn}`,borderBottom:Zi,[`
|
|
|
> ${zt}-wrapper:only-child,
|
|
|
> ${zt}-expanded-row-fixed > ${zt}-wrapper:only-child
|
|
|
`]:{[zt]:{marginBlock:`-${pt}px`,marginInline:`${Dt.tableExpandColumnWidth-_t}px -${_t}px`,[`${zt}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Cn,fontWeight:ln,textAlign:"start",background:ti,borderBottom:Zi,transition:`background ${jn} ease`},[`
|
|
|
&${zt}-row:hover > th,
|
|
|
&${zt}-row:hover > td,
|
|
|
> th${zt}-cell-row-hover,
|
|
|
> td${zt}-cell-row-hover
|
|
|
`]:{background:xi},[`&${zt}-row-selected`]:{"> th, > td":{background:Vn},"&:hover > th, &:hover > td":{background:mi}}}},[`${zt}-footer`]:{padding:`${pt}px ${_t}px`,color:li,background:Ri}})}};var rc=(0,wo.Z)("Table",Dt=>{const{colorTextHeading:zt,colorSplit:ln,colorIcon:pt,colorIconHover:_t,opacityLoading:Lt,colorBgContainer:Sn,controlInteractiveSize:hn,headerBg:on,headerColor:vn,headerSortActiveBg:yn,headerSortHoverBg:Cn,bodySortBg:jn,rowHoverBg:ti,rowSelectedBg:Kn,rowSelectedHoverBg:xi,rowExpandedBg:Vn,cellPaddingBlock:mi,cellPaddingInline:li,cellPaddingBlockMD:Ri,cellPaddingInlineMD:Di,cellPaddingBlockSM:Zi,cellPaddingInlineSM:Oi,borderColor:Ii,footerBg:ar,footerColor:ei,headerBorderRadius:Hi,cellFontSize:Li,cellFontSizeMD:bi,cellFontSizeSM:Xi,headerSplitColor:gi,fixedHeaderSortActiveBg:ur,headerFilterHoverBg:Ji,filterDropdownBg:_i,expandIconBg:Vi,selectionColumnWidth:mr,stickyScrollBarBg:ir}=Dt,So=new Ks.C(pt),Lo=new Ks.C(_t),ts=2,ao=(0,fa.TS)(Dt,{tableFontSize:Li,tableBg:Sn,tableRadius:Hi,tablePaddingVertical:mi,tablePaddingHorizontal:li,tablePaddingVerticalMiddle:Ri,tablePaddingHorizontalMiddle:Di,tablePaddingVerticalSmall:Zi,tablePaddingHorizontalSmall:Oi,tableBorderColor:Ii,tableHeaderTextColor:vn,tableHeaderBg:on,tableFooterTextColor:ei,tableFooterBg:ar,tableHeaderCellSplitColor:gi,tableHeaderSortBg:yn,tableHeaderSortHoverBg:Cn,tableHeaderIconColor:So.clone().setAlpha(So.getAlpha()*Lt).toRgbString(),tableHeaderIconColorHover:Lo.clone().setAlpha(Lo.getAlpha()*Lt).toRgbString(),tableBodySortBg:jn,tableFixedHeaderSortActiveBg:ur,tableHeaderFilterActiveBg:Ji,tableFilterDropdownBg:_i,tableRowHoverBg:ti,tableSelectedRowBg:Kn,tableSelectedRowHoverBg:xi,zIndexTableFixed:ts,zIndexTableSticky:ts+1,tableFontSizeMiddle:bi,tableFontSizeSmall:Xi,tableSelectionColumnWidth:mr,tableExpandIconBg:Vi,tableExpandColumnWidth:hn+2*Dt.padding,tableExpandedRowBg:Vn,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:ir,tableScrollThumbBgHover:zt,tableScrollBg:ln});return[Bs(ao),Ad(ao),cu(ao),ku(ao),Rs(ao),ss(ao),Nd(ao),ps(ao),cu(ao),zo(ao),Ch(ao),Rc(ao),Au(ao),Ca(ao),oo(ao),rh(ao),hs(ao)]},Dt=>{const{colorFillAlter:zt,colorBgContainer:ln,colorTextHeading:pt,colorFillSecondary:_t,colorFillContent:Lt,controlItemBgActive:Sn,controlItemBgActiveHover:hn,padding:on,paddingSM:vn,paddingXS:yn,colorBorderSecondary:Cn,borderRadiusLG:jn,fontSize:ti,controlHeight:Kn,colorTextPlaceholder:xi}=Dt,Vn=new Ks.C(_t).onBackground(ln).toHexShortString(),mi=new Ks.C(Lt).onBackground(ln).toHexShortString(),li=new Ks.C(zt).onBackground(ln).toHexShortString();return{headerBg:li,headerColor:pt,headerSortActiveBg:Vn,headerSortHoverBg:mi,bodySortBg:li,rowHoverBg:li,rowSelectedBg:Sn,rowSelectedHoverBg:hn,rowExpandedBg:zt,cellPaddingBlock:on,cellPaddingInline:on,cellPaddingBlockMD:vn,cellPaddingInlineMD:yn,cellPaddingBlockSM:yn,cellPaddingInlineSM:yn,borderColor:Cn,headerBorderRadius:jn,footerBg:li,footerColor:pt,cellFontSize:ti,cellFontSizeMD:ti,cellFontSizeSM:ti,headerSplitColor:Cn,fixedHeaderSortActiveBg:Vn,headerFilterHoverBg:Lt,filterDropdownMenuBg:ln,filterDropdownBg:ln,expandIconBg:ln,selectionColumnWidth:Kn,stickyScrollBarBg:xi,stickyScrollBarBorderRadius:100}});const qa=[],Id=(Dt,zt)=>{const{prefixCls:ln,className:pt,rootClassName:_t,style:Lt,size:Sn,bordered:hn,dropdownPrefixCls:on,dataSource:vn,pagination:yn,rowSelection:Cn,rowKey:jn="key",rowClassName:ti,columns:Kn,children:xi,childrenColumnName:Vn,onChange:mi,getPopupContainer:li,loading:Ri,expandIcon:Di,expandable:Zi,expandedRowRender:Oi,expandIconColumnIndex:Ii,indentSize:ar,scroll:ei,sortDirections:Hi,locale:Li,showSorterTooltip:bi=!0,virtual:Xi}=Dt,gi=he.useMemo(()=>Kn||Pt(xi),[Kn,xi]),ur=he.useMemo(()=>gi.some(os=>os.responsive),[gi]),Ji=(0,Xn.Z)(ur),_i=he.useMemo(()=>{const os=new Set(Object.keys(Ji).filter(Fs=>Ji[Fs]));return gi.filter(Fs=>!Fs.responsive||Fs.responsive.some(va=>os.has(va)))},[gi,Ji]),Vi=(0,Qi.Z)(Dt,["className","style","columns"]),{locale:mr=qr.Z,direction:ir,table:So,renderEmpty:Lo,getPrefixCls:ts,getPopupContainer:ao}=he.useContext(Gi.E_),Nr=(0,qi.Z)(Sn),No=Object.assign(Object.assign({},mr.Table),Li),Ir=vn||qa,Vr=ts("table",ln),ns=ts("dropdown",on),Hr=Object.assign({childrenColumnName:Vn,expandIconColumnIndex:Ii},Zi),{childrenColumnName:kr="children"}=Hr,$r=he.useMemo(()=>Ir.some(os=>os==null?void 0:os[kr])?"nest":Oi||Zi&&Zi.expandedRowRender?"row":null,[Ir]),Lr={body:he.useRef()},lo=he.useMemo(()=>typeof jn=="function"?jn:os=>os==null?void 0:os[jn],[jn]),[Ar]=Eu(Ir,kr,lo),po={},Uo=function(os,Fs){let va=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var js,is,Pa;const El=Object.assign(Object.assign({},po),os);va&&((js=po.resetPagination)===null||js===void 0||js.call(po),!((is=El.pagination)===null||is===void 0)&&is.current&&(El.pagination.current=1),yn&&yn.onChange&&yn.onChange(1,(Pa=El.pagination)===null||Pa===void 0?void 0:Pa.pageSize)),ei&&ei.scrollToFirstRowOnChange!==!1&&Lr.body.current&&(0,Qr.Z)(0,{getContainer:()=>Lr.body.current}),mi==null||mi(El.pagination,El.filters,El.sorter,{currentDataSource:Ua(Wu(Ir,El.sorterStates,kr),El.filterStates),action:Fs})},Go=(os,Fs)=>{Uo({sorter:os,sorterStates:Fs},"sort",!1)},[Yr,Io,Cs,To]=bh({prefixCls:Vr,mergedColumns:_i,onSorterChange:Go,sortDirections:Hi||["ascend","descend"],tableLocale:No,showSorterTooltip:bi}),Yo=he.useMemo(()=>Wu(Ir,Io,kr),[Ir,Io]);po.sorter=To(),po.sorterStates=Io;const ys=(os,Fs)=>{Uo({filters:os,filterStates:Fs},"filter",!0)},[Ys,_l,Xo]=yc({prefixCls:Vr,locale:No,dropdownPrefixCls:ns,mergedColumns:_i,onFilterChange:ys,getPopupContainer:li||ao}),Jo=Ua(Yo,_l);po.filters=Xo,po.filterStates=_l;const Ss=he.useMemo(()=>{const os={};return Object.keys(Xo).forEach(Fs=>{Xo[Fs]!==null&&(os[Fs]=Xo[Fs])}),Object.assign(Object.assign({},Cs),{filters:os})},[Cs,Xo]),[Es]=Zs(Ss),pa=(os,Fs)=>{Uo({pagination:Object.assign(Object.assign({},po.pagination),{current:os,pageSize:Fs})},"paginate")},[Bo,ks]=th(Jo.length,pa,yn);po.pagination=yn===!1?{}:Lu(Bo,yn),po.resetPagination=ks;const _a=he.useMemo(()=>{if(yn===!1||!Bo.pageSize)return Jo;const{current:os=1,total:Fs,pageSize:va=Gu}=Bo;return Jo.length<Fs?Jo.length>va?Jo.slice((os-1)*va,os*va):Jo:Jo.slice((os-1)*va,os*va)},[!!yn,Jo,Bo&&Bo.current,Bo&&Bo.pageSize,Bo&&Bo.total]),[Pl,Xl]=Rl({prefixCls:Vr,data:Jo,pageData:_a,getRowKey:lo,getRecordByKey:Ar,expandType:$r,childrenColumnName:kr,locale:No,getPopupContainer:li||ao},Cn),Fl=(os,Fs,va)=>{let js;return typeof ti=="function"?js=ut()(ti(os,Fs,va)):js=ut()(ti),ut()({[`${Vr}-row-selected`]:Xl.has(lo(os,Fs))},js)};Hr.__PARENT_RENDER_ICON__=Hr.expandIcon,Hr.expandIcon=Hr.expandIcon||Di||ms(No),$r==="nest"&&Hr.expandIconColumnIndex===void 0?Hr.expandIconColumnIndex=Cn?1:0:Hr.expandIconColumnIndex>0&&Cn&&(Hr.expandIconColumnIndex-=1),typeof Hr.indentSize!="number"&&(Hr.indentSize=typeof ar=="number"?ar:15);const hu=he.useCallback(os=>Es(Pl(Ys(Yr(os)))),[Yr,Ys,Pl]);let du,Jl;if(yn!==!1&&(Bo!=null&&Bo.total)){let os;Bo.size?os=Bo.size:os=Nr==="small"||Nr==="middle"?"small":void 0;const Fs=is=>he.createElement(_o.Z,Object.assign({},Bo,{className:ut()(`${Vr}-pagination ${Vr}-pagination-${is}`,Bo.className),size:os})),va=ir==="rtl"?"left":"right",{position:js}=Bo;if(js!==null&&Array.isArray(js)){const is=js.find(Nu=>Nu.includes("top")),Pa=js.find(Nu=>Nu.includes("bottom")),El=js.every(Nu=>`${Nu}`=="none");!is&&!Pa&&!El&&(Jl=Fs(va)),is&&(du=Fs(is.toLowerCase().replace("top",""))),Pa&&(Jl=Fs(Pa.toLowerCase().replace("bottom","")))}else Jl=Fs(va)}let ds;typeof Ri=="boolean"?ds={spinning:Ri}:typeof Ri=="object"&&(ds=Object.assign({spinning:!0},Ri));const[Oa,ra]=rc(Vr),[,As]=(0,Eo.Z)(),Ql=ut()(`${Vr}-wrapper`,So==null?void 0:So.className,{[`${Vr}-wrapper-rtl`]:ir==="rtl"},pt,_t,ra),Pc=Object.assign(Object.assign({},So==null?void 0:So.style),Lt),fu=Li&&Li.emptyText||(Lo==null?void 0:Lo("Table"))||he.createElement(Ui.Z,{componentName:"Table"}),Zu=Xi?Na:Wr,sc={},jl=he.useMemo(()=>{const{fontSize:os,lineHeight:Fs,padding:va,paddingXS:js,paddingSM:is}=As,Pa=Math.floor(os*Fs);switch(Nr){case"large":return va*2+Pa;case"small":return js*2+Pa;default:return is*2+Pa}},[As,Nr]);return Xi&&(sc.listItemHeight=jl),Oa(he.createElement("div",{ref:zt,className:Ql,style:Pc},he.createElement(Ko.Z,Object.assign({spinning:!1},ds),du,he.createElement(Zu,Object.assign({},sc,Vi,{columns:_i,direction:ir,expandable:Hr,prefixCls:Vr,className:ut()({[`${Vr}-middle`]:Nr==="middle",[`${Vr}-small`]:Nr==="small",[`${Vr}-bordered`]:hn,[`${Vr}-empty`]:Ir.length===0}),data:_a,rowKey:lo,rowClassName:Fl,emptyText:fu,internalHooks:me,internalRefs:Lr,transformColumns:hu})),Jl)))};var td=he.forwardRef(Id);const Dd=(Dt,zt)=>{const ln=he.useRef(0);return ln.current+=1,he.createElement(td,Object.assign({},Dt,{ref:zt,_renderTimes:ln.current}))},ka=he.forwardRef(Dd);ka.SELECTION_COLUMN=ia,ka.EXPAND_COLUMN=Le,ka.SELECTION_ALL=Is,ka.SELECTION_INVERT=bs,ka.SELECTION_NONE=Ts,ka.Column=Zo,ka.ColumnGroup=vr,ka.Summary=Ae;var oc=ka,gf=oc},12563:function(Pn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return Je}});var Le=Ee(59301),me=Ee(99267),Ie=Ee(92310),Te=Ee.n(Ie),Ce=Ee(36785),_e=Ee(47729),he=Ee(14088),Se=Ee(36355),xe=Ee(17313),ge=Ee(37613),ce=Ee(83116);const ve=We=>{const{paddingXXS:gt,lineWidth:ut,tagPaddingHorizontal:bt,componentCls:rt}=We,St=bt-ut,ct=gt-ut;return{[rt]:Object.assign(Object.assign({},(0,xe.Wf)(We)),{display:"inline-block",height:"auto",marginInlineEnd:We.marginXS,paddingInline:St,fontSize:We.tagFontSize,lineHeight:We.tagLineHeight,whiteSpace:"nowrap",background:We.defaultBg,border:`${We.lineWidth}px ${We.lineType} ${We.colorBorder}`,borderRadius:We.borderRadiusSM,opacity:1,transition:`all ${We.motionDurationMid}`,textAlign:"start",position:"relative",[`&${rt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:We.defaultColor},[`${rt}-close-icon`]:{marginInlineStart:ct,color:We.colorTextDescription,fontSize:We.tagIconSize,cursor:"pointer",transition:`all ${We.motionDurationMid}`,"&:hover":{color:We.colorTextHeading}},[`&${rt}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${We.iconCls}-close, ${We.iconCls}-close:hover`]:{color:We.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${rt}-checkable-checked):hover`]:{color:We.colorPrimary,backgroundColor:We.colorFillSecondary},"&:active, &-checked":{color:We.colorTextLightSolid},"&-checked":{backgroundColor:We.colorPrimary,"&:hover":{backgroundColor:We.colorPrimaryHover}},"&:active":{backgroundColor:We.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${We.iconCls} + span, > span + ${We.iconCls}`]:{marginInlineStart:St}}),[`${rt}-borderless`]:{borderColor:"transparent",background:We.tagBorderlessBg}}},de=We=>{const{lineWidth:gt,fontSizeIcon:ut}=We,bt=We.fontSizeSM,rt=`${We.lineHeightSM*bt}px`;return(0,ge.TS)(We,{tagFontSize:bt,tagLineHeight:rt,tagIconSize:ut-2*gt,tagPaddingHorizontal:8,tagBorderlessBg:We.colorFillTertiary})},ue=We=>({defaultBg:We.colorFillQuaternary,defaultColor:We.colorText});var z=(0,ce.Z)("Tag",We=>{const gt=de(We);return ve(gt)},ue),ee=function(We,gt){var ut={};for(var bt in We)Object.prototype.hasOwnProperty.call(We,bt)&>.indexOf(bt)<0&&(ut[bt]=We[bt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,bt=Object.getOwnPropertySymbols(We);rt<bt.length;rt++)gt.indexOf(bt[rt])<0&&Object.prototype.propertyIsEnumerable.call(We,bt[rt])&&(ut[bt[rt]]=We[bt[rt]]);return ut},ie=We=>{const{prefixCls:gt,style:ut,className:bt,checked:rt,onChange:St,onClick:ct}=We,Bt=ee(We,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:ht,tag:it}=Le.useContext(Se.E_),dt=jt=>{St==null||St(!rt),ct==null||ct(jt)},yt=ht("tag",gt),[Et,vt]=z(yt),Rt=Te()(yt,`${yt}-checkable`,{[`${yt}-checkable-checked`]:rt},it==null?void 0:it.className,bt,vt);return Et(Le.createElement("span",Object.assign({},Bt,{style:Object.assign(Object.assign({},ut),it==null?void 0:it.style),className:Rt,onClick:dt})))},se=Ee(45157);const le=We=>(0,se.Z)(We,(gt,ut)=>{let{textColor:bt,lightBorderColor:rt,lightColor:St,darkColor:ct}=ut;return{[`${We.componentCls}-${gt}`]:{color:bt,background:St,borderColor:rt,"&-inverse":{color:We.colorTextLightSolid,background:ct,borderColor:ct},[`&${We.componentCls}-borderless`]:{borderColor:"transparent"}}}});var ye=(0,ce.b)(["Tag","preset"],We=>{const gt=de(We);return le(gt)},ue);function we(We){return typeof We!="string"?We:We.charAt(0).toUpperCase()+We.slice(1)}const be=(We,gt,ut)=>{const bt=we(ut);return{[`${We.componentCls}-${gt}`]:{color:We[`color${ut}`],background:We[`color${bt}Bg`],borderColor:We[`color${bt}Border`],[`&${We.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ke=(0,ce.b)(["Tag","status"],We=>{const gt=de(We);return[be(gt,"success","Success"),be(gt,"processing","Info"),be(gt,"error","Error"),be(gt,"warning","Warning")]},ue),Ne=function(We,gt){var ut={};for(var bt in We)Object.prototype.hasOwnProperty.call(We,bt)&>.indexOf(bt)<0&&(ut[bt]=We[bt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,bt=Object.getOwnPropertySymbols(We);rt<bt.length;rt++)gt.indexOf(bt[rt])<0&&Object.prototype.propertyIsEnumerable.call(We,bt[rt])&&(ut[bt[rt]]=We[bt[rt]]);return ut};const je=(We,gt)=>{const{prefixCls:ut,className:bt,rootClassName:rt,style:St,children:ct,icon:Bt,color:ht,onClose:it,closeIcon:dt,closable:yt,bordered:Et=!0}=We,vt=Ne(We,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Rt,direction:jt,tag:un}=Le.useContext(Se.E_),[Vt,xn]=Le.useState(!0);Le.useEffect(()=>{"visible"in vt&&xn(vt.visible)},[vt.visible]);const Ut=(0,Ce.o2)(ht),Zt=(0,Ce.yT)(ht),Xt=Ut||Zt,mt=Object.assign(Object.assign({backgroundColor:ht&&!Xt?ht:void 0},un==null?void 0:un.style),St),ze=Rt("tag",ut),[Be,qe]=z(ze),Qe=Te()(ze,un==null?void 0:un.className,{[`${ze}-${ht}`]:Xt,[`${ze}-has-color`]:ht&&!Xt,[`${ze}-hidden`]:!Vt,[`${ze}-rtl`]:jt==="rtl",[`${ze}-borderless`]:!Et},bt,rt,qe),Ue=Ze=>{Ze.stopPropagation(),it==null||it(Ze),!Ze.defaultPrevented&&xn(!1)},[,Xe]=(0,_e.Z)(yt,dt,Ze=>Ze===null?Le.createElement(me.Z,{className:`${ze}-close-icon`,onClick:Ue}):Le.createElement("span",{className:`${ze}-close-icon`,onClick:Ue},Ze),null,!1),Re=typeof vt.onClick=="function"||ct&&ct.type==="a",Ae=Bt||null,Ge=Ae?Le.createElement(Le.Fragment,null,Ae,ct&&Le.createElement("span",null,ct)):ct,Ke=Le.createElement("span",Object.assign({},vt,{ref:gt,className:Qe,style:mt}),Ge,Xe,Ut&&Le.createElement(ye,{key:"preset",prefixCls:ze}),Zt&&Le.createElement(ke,{key:"status",prefixCls:ze}));return Be(Re?Le.createElement(he.Z,{component:"Tag"},Ke):Ke)},Ve=Le.forwardRef(je);Ve.CheckableTag=ie;var Je=Ve},17574:function(Pn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return ht}});var Le=Ee(23130),me=Ee(26407),Ie=Ee(52671),Te=Ee(8657),Ce=Ee(92413),_e=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"},Se=he,xe=Ee(7657),ge=function(dt,yt){return _e.createElement(xe.Z,(0,Ce.Z)({},dt,{ref:yt,icon:Se}))},ce=_e.forwardRef(ge),ve=ce,de=Ee(92310),ue=Ee.n(de),z=Ee(35654),ee=Ee(71430),oe=Ee(36355),ie=Ee(56082),se=Ee(62892),le=Ee(20648);const ye=4;function we(it){const{dropPosition:dt,dropLevelOffset:yt,prefixCls:Et,indent:vt,direction:Rt="ltr"}=it,jt=Rt==="ltr"?"left":"right",un=Rt==="ltr"?"right":"left",Vt={[jt]:-yt*vt+ye,[un]:0};switch(dt){case-1:Vt.top=-3;break;case 1:Vt.bottom=-3;break;default:Vt.bottom=-3,Vt[jt]=vt+ye;break}return _e.createElement("div",{style:Vt,className:`${Et}-drop-indicator`})}var be=Ee(71997),Ne=_e.forwardRef((it,dt)=>{const{getPrefixCls:yt,direction:Et,virtual:vt,tree:Rt}=_e.useContext(oe.E_),{prefixCls:jt,className:un,showIcon:Vt=!1,showLine:xn,switcherIcon:Ut,blockNode:Zt=!1,children:Xt,checkable:mt=!1,selectable:ze=!0,draggable:Be,motion:qe,style:Qe}=it,Ue=yt("tree",jt),Xe=yt(),Re=qe!=null?qe:Object.assign(Object.assign({},(0,se.Z)(Xe)),{motionAppear:!1}),Ae=Object.assign(Object.assign({},it),{checkable:mt,selectable:ze,showIcon:Vt,motion:Re,blockNode:Zt,showLine:!!xn,dropIndicatorRender:we}),[Ge,Ke]=(0,le.ZP)(Ue),Ze=_e.useMemo(()=>{if(!Be)return!1;let xt={};switch(typeof Be){case"function":xt.nodeDraggable=Be;break;case"object":xt=Object.assign({},Be);break;default:break}return xt.icon!==!1&&(xt.icon=xt.icon||_e.createElement(ie.Z,null)),xt},[Be]),at=xt=>_e.createElement(be.Z,{prefixCls:Ue,switcherIcon:Ut,treeNodeProps:xt,showLine:xn});return Ge(_e.createElement(Le.Z,Object.assign({itemHeight:20,ref:dt,virtual:vt},Ae,{style:Object.assign(Object.assign({},Rt==null?void 0:Rt.style),Qe),prefixCls:Ue,className:ue()({[`${Ue}-icon-hide`]:!Vt,[`${Ue}-block-node`]:Zt,[`${Ue}-unselectable`]:!ze,[`${Ue}-rtl`]:Et==="rtl"},Rt==null?void 0:Rt.className,un,Ke),direction:Et,checkable:mt&&_e.createElement("span",{className:`${Ue}-checkbox-inner`}),selectable:ze,switcherIcon:at,draggable:Ze}),Xt))}),je;(function(it){it[it.None=0]="None",it[it.Start=1]="Start",it[it.End=2]="End"})(je||(je={}));function Ve(it,dt){function yt(Et){const{key:vt,children:Rt}=Et;dt(vt,Et)!==!1&&Ve(Rt||[],dt)}it.forEach(yt)}function Je(it){let{treeData:dt,expandedKeys:yt,startKey:Et,endKey:vt}=it;const Rt=[];let jt=je.None;if(Et&&Et===vt)return[Et];if(!Et||!vt)return[];function un(Vt){return Vt===Et||Vt===vt}return Ve(dt,Vt=>{if(jt===je.End)return!1;if(un(Vt)){if(Rt.push(Vt),jt===je.None)jt=je.Start;else if(jt===je.Start)return jt=je.End,!1}else jt===je.Start&&Rt.push(Vt);return yt.includes(Vt)}),Rt}function We(it,dt){const yt=(0,me.Z)(dt),Et=[];return Ve(it,(vt,Rt)=>{const jt=yt.indexOf(vt);return jt!==-1&&(Et.push(Rt),yt.splice(jt,1)),!!yt.length}),Et}var gt=function(it,dt){var yt={};for(var Et in it)Object.prototype.hasOwnProperty.call(it,Et)&&dt.indexOf(Et)<0&&(yt[Et]=it[Et]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,Et=Object.getOwnPropertySymbols(it);vt<Et.length;vt++)dt.indexOf(Et[vt])<0&&Object.prototype.propertyIsEnumerable.call(it,Et[vt])&&(yt[Et[vt]]=it[Et[vt]]);return yt};function ut(it){const{isLeaf:dt,expanded:yt}=it;return dt?_e.createElement(Ie.Z,null):yt?_e.createElement(Te.Z,null):_e.createElement(ve,null)}function bt(it){let{treeData:dt,children:yt}=it;return dt||(0,ee.zn)(yt)}const rt=(it,dt)=>{var{defaultExpandAll:yt,defaultExpandParent:Et,defaultExpandedKeys:vt}=it,Rt=gt(it,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const jt=_e.useRef(),un=_e.useRef(),Vt=()=>{const{keyEntities:Ze}=(0,ee.I8)(bt(Rt));let at;return yt?at=Object.keys(Ze):Et?at=(0,z.r7)(Rt.expandedKeys||vt||[],Ze):at=Rt.expandedKeys||vt,at},[xn,Ut]=_e.useState(Rt.selectedKeys||Rt.defaultSelectedKeys||[]),[Zt,Xt]=_e.useState(()=>Vt());_e.useEffect(()=>{"selectedKeys"in Rt&&Ut(Rt.selectedKeys)},[Rt.selectedKeys]),_e.useEffect(()=>{"expandedKeys"in Rt&&Xt(Rt.expandedKeys)},[Rt.expandedKeys]);const mt=(Ze,at)=>{var xt;return"expandedKeys"in Rt||Xt(Ze),(xt=Rt.onExpand)===null||xt===void 0?void 0:xt.call(Rt,Ze,at)},ze=(Ze,at)=>{var xt;const{multiple:tn}=Rt,{node:nn,nativeEvent:Jt}=at,{key:mn=""}=nn,kn=bt(Rt),fn=Object.assign(Object.assign({},at),{selected:!0}),Mn=(Jt==null?void 0:Jt.ctrlKey)||(Jt==null?void 0:Jt.metaKey),Zn=Jt==null?void 0:Jt.shiftKey;let Tn;tn&&Mn?(Tn=Ze,jt.current=mn,un.current=Tn,fn.selectedNodes=We(kn,Tn)):tn&&Zn?(Tn=Array.from(new Set([].concat((0,me.Z)(un.current||[]),(0,me.Z)(Je({treeData:kn,expandedKeys:Zt,startKey:mn,endKey:jt.current}))))),fn.selectedNodes=We(kn,Tn)):(Tn=[mn],jt.current=mn,un.current=Tn,fn.selectedNodes=We(kn,Tn)),(xt=Rt.onSelect)===null||xt===void 0||xt.call(Rt,Tn,fn),"selectedKeys"in Rt||Ut(Tn)},{getPrefixCls:Be,direction:qe}=_e.useContext(oe.E_),{prefixCls:Qe,className:Ue,showIcon:Xe=!0,expandAction:Re="click"}=Rt,Ae=gt(Rt,["prefixCls","className","showIcon","expandAction"]),Ge=Be("tree",Qe),Ke=ue()(`${Ge}-directory`,{[`${Ge}-directory-rtl`]:qe==="rtl"},Ue);return _e.createElement(Ne,Object.assign({icon:ut,ref:dt,blockNode:!0},Ae,{showIcon:Xe,expandAction:Re,prefixCls:Ge,className:Ke,expandedKeys:Zt,selectedKeys:xn,onSelect:ze,onExpand:mt}))};var ct=_e.forwardRef(rt);const Bt=Ne;Bt.DirectoryTree=ct,Bt.TreeNode=Le.O;var ht=Bt},20648:function(Pn,qt,Ee){"use strict";Ee.d(qt,{TM:function(){return de},Yk:function(){return ve}});var Le=Ee(93083),me=Ee(98447),Ie=Ee(17313),Te=Ee(8378),Ce=Ee(37613),_e=Ee(83116);const he=new Le.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Se=(ue,z)=>({[`.${ue}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${z.motionDurationSlow}`}}}),xe=(ue,z)=>({[`.${ue}-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=(ue,z)=>{const{treeCls:ee,treeNodeCls:oe,treeNodePadding:ie,titleHeight:se,nodeSelectedBg:le,nodeHoverBg:ye}=z,we=z.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,Ie.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,Ie.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,Ie.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({},Se(ue,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:ye},[`&${ee}-node-selected`]:{backgroundColor:le},[`${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(ue,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`}}}}})}},ce=ue=>{const{treeCls:z,treeNodeCls:ee,treeNodePadding:oe,directoryNodeSelectedBg:ie,directoryNodeSelectedColor:se}=ue;return{[`${z}${z}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:oe,insetInlineStart:0,transition:`background-color ${ue.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:ue.controlItemBgHover}},"> *":{zIndex:1},[`${z}-switcher`]:{transition:`color ${ue.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=(ue,z)=>{const ee=`.${ue}`,oe=`${ee}-treenode`,ie=z.paddingXS/2,se=(0,Ce.TS)(z,{treeCls:ee,treeNodeCls:oe,treeNodePadding:ie});return[ge(ue,se),ce(se)]},de=ue=>{const{controlHeightSM:z}=ue;return{titleHeight:z,nodeHoverBg:ue.controlItemBgHover,nodeSelectedBg:ue.controlItemBgActive}};qt.ZP=(0,_e.Z)("Tree",(ue,z)=>{let{prefixCls:ee}=z;return[{[ue.componentCls]:(0,me.C2)(`${ee}-checkbox`,ue)},ve(ee,ue),(0,Te.Z)(ue)]},ue=>{const{colorTextLightSolid:z,colorPrimary:ee}=ue;return Object.assign(Object.assign({},de(ue)),{directoryNodeSelectedColor:z,directoryNodeSelectedBg:ee})})},71997:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return oe}});var Le=Ee(92413),me=Ee(59301),Ie={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"},Te=Ie,Ce=Ee(7657),_e=function(se,le){return me.createElement(Ce.Z,(0,Le.Z)({},se,{ref:le,icon:Te}))},he=me.forwardRef(_e),Se=he,xe=Ee(52671),ge=Ee(58617),ce=Ee(15075),ve=Ee(43531),de=Ee(92310),ue=Ee.n(de),z=Ee(92343),oe=ie=>{const{prefixCls:se,switcherIcon:le,treeNodeProps:ye,showLine:we}=ie,{isLeaf:be,expanded:ke,loading:Ne}=ye;if(Ne)return me.createElement(ge.Z,{className:`${se}-switcher-loading-icon`});let je;if(we&&typeof we=="object"&&(je=we.showLeafIcon),be){if(!we)return null;if(typeof je!="boolean"&&je){const We=typeof je=="function"?je(ye):je,gt=`${se}-switcher-line-custom-icon`;return(0,z.l$)(We)?(0,z.Tm)(We,{className:ue()(We.props.className||"",gt)}):We}return je?me.createElement(xe.Z,{className:`${se}-switcher-line-icon`}):me.createElement("span",{className:`${se}-switcher-leaf-line`})}const Ve=`${se}-switcher-icon`,Je=typeof le=="function"?le(ye):le;return(0,z.l$)(Je)?(0,z.Tm)(Je,{className:ue()(Je.props.className||"",Ve)}):Je!==void 0?Je:we?ke?me.createElement(ce.Z,{className:`${se}-switcher-line-icon`}):me.createElement(ve.Z,{className:`${se}-switcher-line-icon`}):me.createElement(Se,{className:Ve})}},99498:function(Pn,qt,Ee){(function(Le){Le(Ee(89780))})(function(Le){Le.defineOption("placeholder","",function(Se,xe,ge){var ce=ge&&ge!=Le.Init;if(xe&&!ce)Se.on("blur",Ce),Se.on("change",_e),Se.on("swapDoc",_e),Le.on(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose=function(){Te(Se)}),_e(Se);else if(!xe&&ce){Se.off("blur",Ce),Se.off("change",_e),Se.off("swapDoc",_e),Le.off(Se.getInputField(),"compositionupdate",Se.state.placeholderCompose),me(Se);var ve=Se.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}xe&&!Se.hasFocus()&&Ce(Se)});function me(Se){Se.state.placeholder&&(Se.state.placeholder.parentNode.removeChild(Se.state.placeholder),Se.state.placeholder=null)}function Ie(Se){me(Se);var xe=Se.state.placeholder=document.createElement("pre");xe.style.cssText="height: 0; overflow: visible",xe.style.direction=Se.getOption("direction"),xe.className="CodeMirror-placeholder CodeMirror-line-like";var ge=Se.getOption("placeholder");typeof ge=="string"&&(ge=document.createTextNode(ge)),xe.appendChild(ge),Se.display.lineSpace.insertBefore(xe,Se.display.lineSpace.firstChild)}function Te(Se){setTimeout(function(){var xe=!1,ge=Se.getInputField();ge.nodeName=="TEXTAREA"?xe=!ge.value:Se.lineCount()==1&&(xe=!/[^\u200b]/.test(ge.querySelector(".CodeMirror-line").textContent)),xe?Ie(Se):me(Se)},20)}function Ce(Se){he(Se)&&Ie(Se)}function _e(Se){var xe=Se.getWrapperElement(),ge=he(Se);xe.className=xe.className.replace(" CodeMirror-empty","")+(ge?" CodeMirror-empty":""),ge?Ie(Se):me(Se)}function he(Se){return Se.lineCount()===1&&Se.getLine(0)===""}})},25717:function(Pn,qt,Ee){(function(Le){Le(Ee(89780))})(function(Le){var me={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ie=Le.Pos;Le.defineOption("autoCloseBrackets",!1,function(z,ee,oe){oe&&oe!=Le.Init&&(z.removeKeyMap(Ce),z.state.closeBrackets=null),ee&&(_e(Te(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(Ce))});function Te(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 _e(z){for(var ee=0;ee<z.length;ee++){var oe=z.charAt(ee),ie="'"+oe+"'";Ce[ie]||(Ce[ie]=he(oe))}}_e(me.pairs+"`");function he(z){return function(ee){return ve(ee,z)}}function Se(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=Se(z);if(!ee||z.getOption("disableInput"))return Le.Pass;for(var oe=Te(ee,"pairs"),ie=z.listSelections(),se=0;se<ie.length;se++){if(!ie[se].empty())return Le.Pass;var le=de(z,ie[se].head);if(!le||oe.indexOf(le)%2!=0)return Le.Pass}for(var se=ie.length-1;se>=0;se--){var ye=ie[se].head;z.replaceRange("",Ie(ye.line,ye.ch-1),Ie(ye.line,ye.ch+1),"+delete")}}function ge(z){var ee=Se(z),oe=ee&&Te(ee,"explode");if(!oe||z.getOption("disableInput"))return Le.Pass;for(var ie=z.listSelections(),se=0;se<ie.length;se++){if(!ie[se].empty())return Le.Pass;var le=de(z,ie[se].head);if(!le||oe.indexOf(le)%2!=0)return Le.Pass}z.operation(function(){var ye=z.lineSeparator()||`
|
|
|
`;z.replaceSelection(ye+ye,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var we=0;we<ie.length;we++){var be=ie[we].head.line;z.indentLine(be,null,!0),z.indentLine(be+1,null,!0)}})}function ce(z){var ee=Le.cmpPos(z.anchor,z.head)>0;return{anchor:new Ie(z.anchor.line,z.anchor.ch+(ee?-1:1)),head:new Ie(z.head.line,z.head.ch+(ee?1:-1))}}function ve(z,ee){var oe=Se(z);if(!oe||z.getOption("disableInput"))return Le.Pass;var ie=Te(oe,"pairs"),se=ie.indexOf(ee);if(se==-1)return Le.Pass;for(var le=Te(oe,"closeBefore"),ye=Te(oe,"triples"),we=ie.charAt(se+1)==ee,be=z.listSelections(),ke=se%2==0,Ne,je=0;je<be.length;je++){var Ve=be[je],Je=Ve.head,We,gt=z.getRange(Je,Ie(Je.line,Je.ch+1));if(ke&&!Ve.empty())We="surround";else if((we||!ke)&>==ee)we&&ue(z,Je)?We="both":ye.indexOf(ee)>=0&&z.getRange(Je,Ie(Je.line,Je.ch+3))==ee+ee+ee?We="skipThree":We="skip";else if(we&&Je.ch>1&&ye.indexOf(ee)>=0&&z.getRange(Ie(Je.line,Je.ch-2),Je)==ee+ee){if(Je.ch>2&&/\bstring/.test(z.getTokenTypeAt(Ie(Je.line,Je.ch-2))))return Le.Pass;We="addFour"}else if(we){var ut=Je.ch==0?" ":z.getRange(Ie(Je.line,Je.ch-1),Je);if(!Le.isWordChar(gt)&&ut!=ee&&!Le.isWordChar(ut))We="both";else return Le.Pass}else if(ke&&(gt.length===0||/\s/.test(gt)||le.indexOf(gt)>-1))We="both";else return Le.Pass;if(!Ne)Ne=We;else if(Ne!=We)return Le.Pass}var bt=se%2?ie.charAt(se-1):ee,rt=se%2?ee:ie.charAt(se+1);z.operation(function(){if(Ne=="skip")z.execCommand("goCharRight");else if(Ne=="skipThree")for(var St=0;St<3;St++)z.execCommand("goCharRight");else if(Ne=="surround"){for(var ct=z.getSelections(),St=0;St<ct.length;St++)ct[St]=bt+ct[St]+rt;z.replaceSelections(ct,"around"),ct=z.listSelections().slice();for(var St=0;St<ct.length;St++)ct[St]=ce(ct[St]);z.setSelections(ct)}else Ne=="both"?(z.replaceSelection(bt+rt,null),z.triggerElectric(bt+rt),z.execCommand("goCharLeft")):Ne=="addFour"&&(z.replaceSelection(bt+bt+bt+bt,"before"),z.execCommand("goCharRight"))})}function de(z,ee){var oe=z.getRange(Ie(ee.line,ee.ch-1),Ie(ee.line,ee.ch+1));return oe.length==2?oe:null}function ue(z,ee){var oe=z.getTokenAt(Ie(ee.line,ee.ch+1));return/\bstring/.test(oe.type)&&oe.start==ee.ch&&(ee.ch==0||!/\bstring/.test(z.getTokenTypeAt(ee)))}})},6313:function(Pn,qt,Ee){(function(Le){Le(Ee(89780),Ee(32855))})(function(Le){Le.defineOption("autoCloseTags",!1,function(xe,ge,ce){if(ce!=Le.Init&&ce&&xe.removeKeyMap("autoCloseTags"),!!ge){var ve={name:"autoCloseTags"};(typeof ge!="object"||ge.whenClosing!==!1)&&(ve["'/'"]=function(de){return _e(de)}),(typeof ge!="object"||ge.whenOpening!==!1)&&(ve["'>'"]=function(de){return Te(de)}),xe.addKeyMap(ve)}});var me=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ie=["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 Te(xe){if(xe.getOption("disableInput"))return Le.Pass;for(var ge=xe.listSelections(),ce=[],ve=xe.getOption("autoCloseTags"),de=0;de<ge.length;de++){if(!ge[de].empty())return Le.Pass;var ue=ge[de].head,z=xe.getTokenAt(ue),ee=Le.innerMode(xe.getMode(),z.state),oe=ee.state,ie=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(oe),se=ie&&ie.name;if(!se)return Le.Pass;var le=ee.mode.configuration=="html",ye=typeof ve=="object"&&ve.dontCloseTags||le&&me,we=typeof ve=="object"&&ve.indentTags||le&&Ie;z.end>ue.ch&&(se=se.slice(0,se.length-z.end+ue.ch));var be=se.toLowerCase();if(!se||z.type=="string"&&(z.end!=ue.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==ue.ch-z.start-1||ye&&he(ye,be)>-1||Se(xe,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(oe)||[],se,ue,!0))return Le.Pass;var ke=typeof ve=="object"&&ve.emptyTags;if(ke&&he(ke,se)>-1){ce[de]={text:"/>",newPos:Le.Pos(ue.line,ue.ch+2)};continue}var Ne=we&&he(we,be)>-1;ce[de]={indent:Ne,text:">"+(Ne?`
|
|
|
|
|
|
`:"")+"</"+se+">",newPos:Ne?Le.Pos(ue.line+1,0):Le.Pos(ue.line,ue.ch+1)}}for(var je=typeof ve=="object"&&ve.dontIndentOnAutoClose,de=ge.length-1;de>=0;de--){var Ve=ce[de];xe.replaceRange(Ve.text,ge[de].head,ge[de].anchor,"+insert");var Je=xe.listSelections().slice(0);Je[de]={head:Ve.newPos,anchor:Ve.newPos},xe.setSelections(Je),!je&&Ve.indent&&(xe.indentLine(Ve.newPos.line,null,!0),xe.indentLine(Ve.newPos.line+1,null,!0))}}function Ce(xe,ge){for(var ce=xe.listSelections(),ve=[],de=ge?"/":"</",ue=xe.getOption("autoCloseTags"),z=typeof ue=="object"&&ue.dontIndentOnSlash,ee=0;ee<ce.length;ee++){if(!ce[ee].empty())return Le.Pass;var oe=ce[ee].head,ie=xe.getTokenAt(oe),se=Le.innerMode(xe.getMode(),ie.state),le=se.state;if(ge&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=oe.ch-1))return Le.Pass;var ye,we=se.mode.name!="xml"&&xe.getMode().name=="htmlmixed";if(we&&se.mode.name=="javascript")ye=de+"script";else if(we&&se.mode.name=="css")ye=de+"style";else{var be=se.mode.xmlCurrentContext&&se.mode.xmlCurrentContext(le);if(!be||be.length&&Se(xe,be,be[be.length-1],oe))return Le.Pass;ye=de+be[be.length-1]}xe.getLine(oe.line).charAt(ie.end)!=">"&&(ye+=">"),ve[ee]=ye}if(xe.replaceSelections(ve),ce=xe.listSelections(),!z)for(var ee=0;ee<ce.length;ee++)(ee==ce.length-1||ce[ee].head.line<ce[ee+1].head.line)&&xe.indentLine(ce[ee].head.line)}function _e(xe){return xe.getOption("disableInput")?Le.Pass:Ce(xe,!0)}Le.commands.closeTag=function(xe){return Ce(xe)};function he(xe,ge){if(xe.indexOf)return xe.indexOf(ge);for(var ce=0,ve=xe.length;ce<ve;++ce)if(xe[ce]==ge)return ce;return-1}function Se(xe,ge,ce,ve,de){if(!Le.scanForClosingTag)return!1;var ue=Math.min(xe.lastLine()+1,ve.line+500),z=Le.scanForClosingTag(xe,ve,null,ue);if(!z||z.tag!=ce)return!1;for(var ee=de?1:0,oe=ge.length-1;oe>=0&&ge[oe]==ce;oe--)++ee;ve=z.to;for(var oe=1;oe<ee;oe++){var ie=Le.scanForClosingTag(xe,ve,null,ue);if(!ie||ie.tag!=ce)return!1;ve=ie.to}return!0}})},32855:function(Pn,qt,Ee){(function(Le){Le(Ee(89780))})(function(Le){"use strict";var me=Le.Pos;function Ie(oe,ie){return oe.line-ie.line||oe.ch-ie.ch}var Te="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=Te+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",_e=new RegExp("<(/?)(["+Te+"]["+Ce+"]*)","g");function he(oe,ie,se,le){this.line=ie,this.ch=se,this.cm=oe,this.text=oe.getLine(ie),this.min=le?Math.max(le.from,oe.firstLine()):oe.firstLine(),this.max=le?Math.min(le.to-1,oe.lastLine()):oe.lastLine()}function Se(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 ce(oe){for(;;){var ie=oe.text.indexOf(">",oe.ch);if(ie==-1){if(xe(oe))continue;return}if(!Se(oe,ie+1)){oe.ch=ie+1;continue}var se=oe.text.lastIndexOf("/",ie),le=se>-1&&!/\S/.test(oe.text.slice(se+1,ie));return oe.ch=ie+1,le?"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(!Se(oe,ie+1)){oe.ch=ie;continue}_e.lastIndex=ie,oe.ch=ie;var se=_e.exec(oe.text);if(se&&se.index==ie)return se}}function de(oe){for(;;){_e.lastIndex=oe.ch;var ie=_e.exec(oe.text);if(!ie){if(xe(oe))continue;return}if(!Se(oe,ie.index+1)){oe.ch=ie.index+1;continue}return oe.ch=ie.index+ie[0].length,ie}}function ue(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf(">",oe.ch-1):-1;if(ie==-1){if(ge(oe))continue;return}if(!Se(oe,ie+1)){oe.ch=ie;continue}var se=oe.text.lastIndexOf("/",ie),le=se>-1&&!/\S/.test(oe.text.slice(se+1,ie));return oe.ch=ie+1,le?"selfClose":"regular"}}function z(oe,ie){for(var se=[];;){var le=de(oe),ye,we=oe.line,be=oe.ch-(le?le[0].length:0);if(!le||!(ye=ce(oe)))return;if(ye!="selfClose")if(le[1]){for(var ke=se.length-1;ke>=0;--ke)if(se[ke]==le[2]){se.length=ke;break}if(ke<0&&(!ie||ie==le[2]))return{tag:le[2],from:me(we,be),to:me(oe.line,oe.ch)}}else se.push(le[2])}}function ee(oe,ie){for(var se=[];;){var le=ue(oe);if(!le)return;if(le=="selfClose"){ve(oe);continue}var ye=oe.line,we=oe.ch,be=ve(oe);if(!be)return;if(be[1])se.push(be[2]);else{for(var ke=se.length-1;ke>=0;--ke)if(se[ke]==be[2]){se.length=ke;break}if(ke<0&&(!ie||ie==be[2]))return{tag:be[2],from:me(oe.line,oe.ch),to:me(ye,we)}}}}Le.registerHelper("fold","xml",function(oe,ie){for(var se=new he(oe,ie.line,0);;){var le=de(se);if(!le||se.line!=ie.line)return;var ye=ce(se);if(!ye)return;if(!le[1]&&ye!="selfClose"){var we=me(se.line,se.ch),be=z(se,le[2]);return be&&Ie(be.from,we)>0?{from:we,to:be.from}:null}}}),Le.findMatchingTag=function(oe,ie,se){var le=new he(oe,ie.line,ie.ch,se);if(!(le.text.indexOf(">")==-1&&le.text.indexOf("<")==-1)){var ye=ce(le),we=ye&&me(le.line,le.ch),be=ye&&ve(le);if(!(!ye||!be||Ie(le,ie)>0)){var ke={from:me(le.line,le.ch),to:we,tag:be[2]};return ye=="selfClose"?{open:ke,close:null,at:"open"}:be[1]?{open:ee(le,be[2]),close:ke,at:"close"}:(le=new he(oe,we.line,we.ch,se),{open:ke,close:z(le,be[2]),at:"open"})}}},Le.findEnclosingTag=function(oe,ie,se,le){for(var ye=new he(oe,ie.line,ie.ch,se);;){var we=ee(ye,le);if(!we)break;var be=new he(oe,ie.line,ie.ch,se),ke=z(be,we.tag);if(ke)return{open:we,close:ke}}},Le.scanForClosingTag=function(oe,ie,se,le){var ye=new he(oe,ie.line,ie.ch,le?{from:0,to:le}:null);return z(ye,se)}})},89780:function(Pn){(function(qt,Ee){Pn.exports=Ee()})(this,function(){"use strict";var qt=navigator.userAgent,Ee=navigator.platform,Le=/gecko\/\d/i.test(qt),me=/MSIE \d/.test(qt),Ie=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(qt),Te=/Edge\/(\d+)/.exec(qt),Ce=me||Ie||Te,_e=Ce&&(me?document.documentMode||6:+(Te||Ie)[1]),he=!Te&&/WebKit\//.test(qt),Se=he&&/Qt\/\d+\.\d+/.test(qt),xe=!Te&&/Chrome\//.test(qt),ge=/Opera\//.test(qt),ce=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(qt),de=/PhantomJS/.test(qt),ue=!Te&&/AppleWebKit/.test(qt)&&/Mobile\/\w+/.test(qt),z=/Android/.test(qt),ee=ue||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(qt),oe=ue||/Mac/.test(Ee),ie=/\bCrOS\b/.test(qt),se=/win/i.test(Ee),le=ge&&qt.match(/Version\/(\d*\.\d*)/);le&&(le=Number(le[1])),le&&le>=15&&(ge=!1,he=!0);var ye=oe&&(Se||ge&&(le==null||le<12.11)),we=Le||Ce&&_e>=9;function be(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var ke=function(re,pe){var De=re.className,Oe=be(pe).exec(De);if(Oe){var He=De.slice(Oe.index+Oe[0].length);re.className=De.slice(0,Oe.index)+(He?Oe[1]+He:"")}};function Ne(re){for(var pe=re.childNodes.length;pe>0;--pe)re.removeChild(re.firstChild);return re}function je(re,pe){return Ne(re).appendChild(pe)}function Ve(re,pe,De,Oe){var He=document.createElement(re);if(De&&(He.className=De),Oe&&(He.style.cssText=Oe),typeof pe=="string")He.appendChild(document.createTextNode(pe));else if(pe)for(var lt=0;lt<pe.length;++lt)He.appendChild(pe[lt]);return He}function Je(re,pe,De,Oe){var He=Ve(re,pe,De,Oe);return He.setAttribute("role","presentation"),He}var We;document.createRange?We=function(re,pe,De,Oe){var He=document.createRange();return He.setEnd(Oe||re,De),He.setStart(re,pe),He}:We=function(re,pe,De){var Oe=document.body.createTextRange();try{Oe.moveToElementText(re.parentNode)}catch(He){return Oe}return Oe.collapse(!0),Oe.moveEnd("character",De),Oe.moveStart("character",pe),Oe};function gt(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 ut(){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 bt(re,pe){var De=re.className;be(pe).test(De)||(re.className+=(De?" ":"")+pe)}function rt(re,pe){for(var De=re.split(" "),Oe=0;Oe<De.length;Oe++)De[Oe]&&!be(De[Oe]).test(pe)&&(pe+=" "+De[Oe]);return pe}var St=function(re){re.select()};ue?St=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:Ce&&(St=function(re){try{re.select()}catch(pe){}});function ct(re){var pe=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,pe)}}function Bt(re,pe,De){pe||(pe={});for(var Oe in re)re.hasOwnProperty(Oe)&&(De!==!1||!pe.hasOwnProperty(Oe))&&(pe[Oe]=re[Oe]);return pe}function ht(re,pe,De,Oe,He){pe==null&&(pe=re.search(/[^\s\u00a0]/),pe==-1&&(pe=re.length));for(var lt=Oe||0,wt=He||0;;){var It=re.indexOf(" ",lt);if(It<0||It>=pe)return wt+(pe-lt);wt+=It-lt,wt+=De-wt%De,lt=It+1}}var it=function(){this.id=null,this.f=null,this.time=0,this.handler=ct(this.onTimeout,this)};it.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},it.prototype.set=function(re,pe){this.f=pe;var De=+new Date+re;(!this.id||De<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=De)};function dt(re,pe){for(var De=0;De<re.length;++De)if(re[De]==pe)return De;return-1}var yt=50,Et={toString:function(){return"CodeMirror.Pass"}},vt={scroll:!1},Rt={origin:"*mouse"},jt={origin:"+move"};function un(re,pe,De){for(var Oe=0,He=0;;){var lt=re.indexOf(" ",Oe);lt==-1&&(lt=re.length);var wt=lt-Oe;if(lt==re.length||He+wt>=pe)return Oe+Math.min(wt,pe-He);if(He+=lt-Oe,He+=De-He%De,Oe=lt+1,He>=pe)return Oe}}var Vt=[""];function xn(re){for(;Vt.length<=re;)Vt.push(Ut(Vt)+" ");return Vt[re]}function Ut(re){return re[re.length-1]}function Zt(re,pe){for(var De=[],Oe=0;Oe<re.length;Oe++)De[Oe]=pe(re[Oe],Oe);return De}function Xt(re,pe,De){for(var Oe=0,He=De(pe);Oe<re.length&&De(re[Oe])<=He;)Oe++;re.splice(Oe,0,pe)}function mt(){}function ze(re,pe){var De;return Object.create?De=Object.create(re):(mt.prototype=re,De=new mt),pe&&Bt(pe,De),De}var Be=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function qe(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Be.test(re))}function Qe(re,pe){return pe?pe.source.indexOf("\\w")>-1&&qe(re)?!0:pe.test(re):qe(re)}function Ue(re){for(var pe in re)if(re.hasOwnProperty(pe)&&re[pe])return!1;return!0}var Xe=/[\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 Re(re){return re.charCodeAt(0)>=768&&Xe.test(re)}function Ae(re,pe,De){for(;(De<0?pe>0:pe<re.length)&&Re(re.charAt(pe));)pe+=De;return pe}function Ge(re,pe,De){for(var Oe=pe>De?-1:1;;){if(pe==De)return pe;var He=(pe+De)/2,lt=Oe<0?Math.ceil(He):Math.floor(He);if(lt==pe)return re(lt)?pe:De;re(lt)?De=lt:pe=lt+Oe}}function Ke(re,pe,De,Oe){if(!re)return Oe(pe,De,"ltr",0);for(var He=!1,lt=0;lt<re.length;++lt){var wt=re[lt];(wt.from<De&&wt.to>pe||pe==De&&wt.to==pe)&&(Oe(Math.max(wt.from,pe),Math.min(wt.to,De),wt.level==1?"rtl":"ltr",lt),He=!0)}He||Oe(pe,De,"ltr")}var Ze=null;function at(re,pe,De){var Oe;Ze=null;for(var He=0;He<re.length;++He){var lt=re[He];if(lt.from<pe&<.to>pe)return He;lt.to==pe&&(lt.from!=lt.to&&De=="before"?Oe=He:Ze=He),lt.from==pe&&(lt.from!=lt.to&&De!="before"?Oe=He:Ze=He)}return Oe!=null?Oe:Ze}var xt=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",pe="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function De(Yt){return Yt<=247?re.charAt(Yt):1424<=Yt&&Yt<=1524?"R":1536<=Yt&&Yt<=1785?pe.charAt(Yt-1536):1774<=Yt&&Yt<=2220?"r":8192<=Yt&&Yt<=8203?"w":Yt==8204?"b":"L"}var Oe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,He=/[stwN]/,lt=/[LRr]/,wt=/[Lb1n]/,It=/[1n]/;function Nt(Yt,En,en){this.level=Yt,this.from=En,this.to=en}return function(Yt,En){var en=En=="ltr"?"L":"R";if(Yt.length==0||En=="ltr"&&!Oe.test(Yt))return!1;for(var Un=Yt.length,Fn=[],vi=0;vi<Un;++vi)Fn.push(De(Yt.charCodeAt(vi)));for(var Pi=0,ji=en;Pi<Un;++Pi){var sr=Fn[Pi];sr=="m"?Fn[Pi]=ji:ji=sr}for(var Br=0,br=en;Br<Un;++Br){var Ur=Fn[Br];Ur=="1"&&br=="r"?Fn[Br]="n":lt.test(Ur)&&(br=Ur,Ur=="r"&&(Fn[Br]="R"))}for(var bo=1,yr=Fn[0];bo<Un-1;++bo){var Fo=Fn[bo];Fo=="+"&&yr=="1"&&Fn[bo+1]=="1"?Fn[bo]="1":Fo==","&&yr==Fn[bo+1]&&(yr=="1"||yr=="n")&&(Fn[bo]=yr),yr=Fo}for(var la=0;la<Un;++la){var Va=Fn[la];if(Va==",")Fn[la]="N";else if(Va=="%"){var ga=void 0;for(ga=la+1;ga<Un&&Fn[ga]=="%";++ga);for(var nu=la&&Fn[la-1]=="!"||ga<Un&&Fn[ga]=="1"?"1":"N",Ml=la;Ml<ga;++Ml)Fn[Ml]=nu;la=ga-1}}for(var Ra=0,mu=en;Ra<Un;++Ra){var gl=Fn[Ra];mu=="L"&&gl=="1"?Fn[Ra]="L":lt.test(gl)&&(mu=gl)}for(var Ba=0;Ba<Un;++Ba)if(He.test(Fn[Ba])){var xs=void 0;for(xs=Ba+1;xs<Un&&He.test(Fn[xs]);++xs);for(var Sa=(Ba?Fn[Ba-1]:en)=="L",el=(xs<Un?Fn[xs]:en)=="L",ml=Sa==el?Sa?"L":"R":en,lc=Ba;lc<xs;++lc)Fn[lc]=ml;Ba=xs-1}for(var ma=[],Vu,Ea=0;Ea<Un;)if(wt.test(Fn[Ea])){var Ef=Ea;for(++Ea;Ea<Un&&wt.test(Fn[Ea]);++Ea);ma.push(new Nt(0,Ef,Ea))}else{var Iu=Ea,vu=ma.length,iu=En=="rtl"?1:0;for(++Ea;Ea<Un&&Fn[Ea]!="L";++Ea);for(var Js=Iu;Js<Ea;)if(It.test(Fn[Js])){Iu<Js&&(ma.splice(vu,0,new Nt(1,Iu,Js)),vu+=iu);var tl=Js;for(++Js;Js<Ea&&It.test(Fn[Js]);++Js);ma.splice(vu,0,new Nt(2,tl,Js)),vu+=iu,Iu=Js}else++Js;Iu<Ea&&ma.splice(vu,0,new Nt(1,Iu,Ea))}return En=="ltr"&&(ma[0].level==1&&(Vu=Yt.match(/^\s+/))&&(ma[0].from=Vu[0].length,ma.unshift(new Nt(0,0,Vu[0].length))),Ut(ma).level==1&&(Vu=Yt.match(/\s+$/))&&(Ut(ma).to-=Vu[0].length,ma.push(new Nt(0,Un-Vu[0].length,Un)))),En=="rtl"?ma.reverse():ma}}();function tn(re,pe){var De=re.order;return De==null&&(De=re.order=xt(re.text,pe)),De}var nn=[],Jt=function(re,pe,De){if(re.addEventListener)re.addEventListener(pe,De,!1);else if(re.attachEvent)re.attachEvent("on"+pe,De);else{var Oe=re._handlers||(re._handlers={});Oe[pe]=(Oe[pe]||nn).concat(De)}};function mn(re,pe){return re._handlers&&re._handlers[pe]||nn}function kn(re,pe,De){if(re.removeEventListener)re.removeEventListener(pe,De,!1);else if(re.detachEvent)re.detachEvent("on"+pe,De);else{var Oe=re._handlers,He=Oe&&Oe[pe];if(He){var lt=dt(He,De);lt>-1&&(Oe[pe]=He.slice(0,lt).concat(He.slice(lt+1)))}}}function fn(re,pe){var De=mn(re,pe);if(De.length)for(var Oe=Array.prototype.slice.call(arguments,2),He=0;He<De.length;++He)De[He].apply(null,Oe)}function Mn(re,pe,De){return typeof pe=="string"&&(pe={type:pe,preventDefault:function(){this.defaultPrevented=!0}}),fn(re,De||pe.type,re,pe),Ci(pe)||pe.codemirrorIgnore}function Zn(re){var pe=re._handlers&&re._handlers.cursorActivity;if(pe)for(var De=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),Oe=0;Oe<pe.length;++Oe)dt(De,pe[Oe])==-1&&De.push(pe[Oe])}function Tn(re,pe){return mn(re,pe).length>0}function ci(re){re.prototype.on=function(pe,De){Jt(this,pe,De)},re.prototype.off=function(pe,De){kn(this,pe,De)}}function ai(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function ki(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function Ci(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function or(re){ai(re),ki(re)}function tr(re){return re.target||re.srcElement}function pr(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 cr=function(){if(Ce&&_e<9)return!1;var re=Ve("div");return"draggable"in re||"dragDrop"in re}(),to;function no(re){if(to==null){var pe=Ve("span","\u200B");je(re,Ve("span",[pe,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(to=pe.offsetWidth<=1&&pe.offsetHeight>2&&!(Ce&&_e<8))}var De=to?Ve("span","\u200B"):Ve("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return De.setAttribute("cm-text",""),De}var di;function Cr(re){if(di!=null)return di;var pe=je(re,document.createTextNode("A\u062EA")),De=We(pe,0,1).getBoundingClientRect(),Oe=We(pe,1,2).getBoundingClientRect();return Ne(re),!De||De.left==De.right?!1:di=Oe.right-De.right<3}var zi=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(re){for(var pe=0,De=[],Oe=re.length;pe<=Oe;){var He=re.indexOf(`
|
|
|
`,pe);He==-1&&(He=re.length);var lt=re.slice(pe,re.charAt(He-1)=="\r"?He-1:He),wt=lt.indexOf("\r");wt!=-1?(De.push(lt.slice(0,wt)),pe+=wt+1):(De.push(lt),pe=He+1)}return De}:function(re){return re.split(/\r\n?|\n/)},st=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(De){}return!pe||pe.parentElement()!=re?!1:pe.compareEndPoints("StartToEnd",pe)!=0},Dr=function(){var re=Ve("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),Mr=null;function xo(re){if(Mr!=null)return Mr;var pe=je(re,Ve("span","x")),De=pe.getBoundingClientRect(),Oe=We(pe,0,1).getBoundingClientRect();return Mr=Math.abs(De.left-Oe.left)>1}var Gr={},uo={};function Zr(re,pe){arguments.length>2&&(pe.dependencies=Array.prototype.slice.call(arguments,2)),Gr[re]=pe}function co(re,pe){uo[re]=pe}function cn(re){if(typeof re=="string"&&uo.hasOwnProperty(re))re=uo[re];else if(re&&typeof re.name=="string"&&uo.hasOwnProperty(re.name)){var pe=uo[re.name];typeof pe=="string"&&(pe={name:pe}),re=ze(pe,re),re.name=pe.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return cn("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return cn("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function $e(re,pe){pe=cn(pe);var De=Gr[pe.name];if(!De)return $e(re,"text/plain");var Oe=De(re,pe);if(tt.hasOwnProperty(pe.name)){var He=tt[pe.name];for(var lt in He)He.hasOwnProperty(lt)&&(Oe.hasOwnProperty(lt)&&(Oe["_"+lt]=Oe[lt]),Oe[lt]=He[lt])}if(Oe.name=pe.name,pe.helperType&&(Oe.helperType=pe.helperType),pe.modeProps)for(var wt in pe.modeProps)Oe[wt]=pe.modeProps[wt];return Oe}var tt={};function et(re,pe){var De=tt.hasOwnProperty(re)?tt[re]:tt[re]={};Bt(pe,De)}function Pt(re,pe){if(pe===!0)return pe;if(re.copyState)return re.copyState(pe);var De={};for(var Oe in pe){var He=pe[Oe];He instanceof Array&&(He=He.concat([])),De[Oe]=He}return De}function At(re,pe){for(var De;re.innerMode&&(De=re.innerMode(pe),!(!De||De.mode==re));)pe=De.state,re=De.mode;return De||{mode:re,state:pe}}function kt(re,pe,De){return re.startState?re.startState(pe,De):!0}var Ct=function(re,pe,De){this.pos=this.start=0,this.string=re,this.tabSize=pe||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=De};Ct.prototype.eol=function(){return this.pos>=this.string.length},Ct.prototype.sol=function(){return this.pos==this.lineStart},Ct.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ct.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ct.prototype.eat=function(re){var pe=this.string.charAt(this.pos),De;if(typeof re=="string"?De=pe==re:De=pe&&(re.test?re.test(pe):re(pe)),De)return++this.pos,pe},Ct.prototype.eatWhile=function(re){for(var pe=this.pos;this.eat(re););return this.pos>pe},Ct.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},Ct.prototype.skipToEnd=function(){this.pos=this.string.length},Ct.prototype.skipTo=function(re){var pe=this.string.indexOf(re,this.pos);if(pe>-1)return this.pos=pe,!0},Ct.prototype.backUp=function(re){this.pos-=re},Ct.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ht(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ht(this.string,this.lineStart,this.tabSize):0)},Ct.prototype.indentation=function(){return ht(this.string,null,this.tabSize)-(this.lineStart?ht(this.string,this.lineStart,this.tabSize):0)},Ct.prototype.match=function(re,pe,De){if(typeof re=="string"){var Oe=function(wt){return De?wt.toLowerCase():wt},He=this.string.substr(this.pos,re.length);if(Oe(He)==Oe(re))return pe!==!1&&(this.pos+=re.length),!0}else{var lt=this.string.slice(this.pos).match(re);return lt&<.index>0?null:(lt&&pe!==!1&&(this.pos+=lt[0].length),lt)}},Ct.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ct.prototype.hideFirstChars=function(re,pe){this.lineStart+=re;try{return pe()}finally{this.lineStart-=re}},Ct.prototype.lookAhead=function(re){var pe=this.lineOracle;return pe&&pe.lookAhead(re)},Ct.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 De=re;!De.lines;)for(var Oe=0;;++Oe){var He=De.children[Oe],lt=He.chunkSize();if(pe<lt){De=He;break}pe-=lt}return De.lines[pe]}function _n(re,pe,De){var Oe=[],He=pe.line;return re.iter(pe.line,De.line+1,function(lt){var wt=lt.text;He==De.line&&(wt=wt.slice(0,De.ch)),He==pe.line&&(wt=wt.slice(pe.ch)),Oe.push(wt),++He}),Oe}function zn(re,pe,De){var Oe=[];return re.iter(pe,De,function(He){Oe.push(He.text)}),Oe}function wn(re,pe){var De=pe-re.height;if(De)for(var Oe=re;Oe;Oe=Oe.parent)Oe.height+=De}function Ft(re){if(re.parent==null)return null;for(var pe=re.parent,De=dt(pe.lines,re),Oe=pe.parent;Oe;pe=Oe,Oe=Oe.parent)for(var He=0;Oe.children[He]!=pe;++He)De+=Oe.children[He].chunkSize();return De+pe.first}function $t(re,pe){var De=re.first;e:do{for(var Oe=0;Oe<re.children.length;++Oe){var He=re.children[Oe],lt=He.height;if(pe<lt){re=He;continue e}pe-=lt,De+=He.chunkSize()}return De}while(!re.lines);for(var wt=0;wt<re.lines.length;++wt){var It=re.lines[wt],Nt=It.height;if(pe<Nt)break;pe-=Nt}return De+wt}function bn(re,pe){return pe>=re.first&&pe<re.first+re.size}function An(re,pe){return String(re.lineNumberFormatter(pe+re.firstLineNumber))}function Gt(re,pe,De){if(De===void 0&&(De=null),!(this instanceof Gt))return new Gt(re,pe,De);this.line=re,this.ch=pe,this.sticky=De}function sn(re,pe){return re.line-pe.line||re.ch-pe.ch}function Bn(re,pe){return re.sticky==pe.sticky&&sn(re,pe)==0}function Nn(re){return Gt(re.line,re.ch)}function qn(re,pe){return sn(re,pe)<0?pe:re}function Gn(re,pe){return sn(re,pe)<0?re:pe}function Jn(re,pe){return Math.max(re.first,Math.min(pe,re.first+re.size-1))}function Dn(re,pe){if(pe.line<re.first)return Gt(re.first,0);var De=re.first+re.size-1;return pe.line>De?Gt(De,dn(re,De).text.length):ri(pe,dn(re,pe.line).text.length)}function ri(re,pe){var De=re.ch;return De==null||De>pe?Gt(re.line,pe):De<0?Gt(re.line,0):re}function Mi(re,pe){for(var De=[],Oe=0;Oe<pe.length;Oe++)De[Oe]=Dn(re,pe[Oe]);return De}var Hn=function(re,pe){this.state=re,this.lookAhead=pe},oi=function(re,pe,De,Oe){this.state=pe,this.doc=re,this.line=De,this.maxLookAhead=Oe||0,this.baseTokens=null,this.baseTokenPos=1};oi.prototype.lookAhead=function(re){var pe=this.doc.getLine(this.line+re);return pe!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),pe},oi.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}},oi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oi.fromSaved=function(re,pe,De){return pe instanceof Hn?new oi(re,Pt(re.mode,pe.state),De,pe.lookAhead):new oi(re,Pt(re.mode,pe),De)},oi.prototype.save=function(re){var pe=re!==!1?Pt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Hn(pe,this.maxLookAhead):pe};function Bi(re,pe,De,Oe){var He=[re.state.modeGen],lt={};hr(re,pe.text,re.doc.mode,De,function(Yt,En){return He.push(Yt,En)},lt,Oe);for(var wt=De.state,It=function(Yt){De.baseTokens=He;var En=re.state.overlays[Yt],en=1,Un=0;De.state=!0,hr(re,pe.text,En.mode,De,function(Fn,vi){for(var Pi=en;Un<Fn;){var ji=He[en];ji>Fn&&He.splice(en,1,Fn,He[en+1],ji),en+=2,Un=Math.min(Fn,ji)}if(vi)if(En.opaque)He.splice(Pi,en-Pi,Fn,"overlay "+vi),en=Pi+2;else for(;Pi<en;Pi+=2){var sr=He[Pi+1];He[Pi+1]=(sr?sr+" ":"")+"overlay "+vi}},lt),De.state=wt,De.baseTokens=null,De.baseTokenPos=1},Nt=0;Nt<re.state.overlays.length;++Nt)It(Nt);return{styles:He,classes:lt.bgClass||lt.textClass?lt:null}}function lr(re,pe,De){if(!pe.styles||pe.styles[0]!=re.state.modeGen){var Oe=Ai(re,Ft(pe)),He=pe.text.length>re.options.maxHighlightLength&&Pt(re.doc.mode,Oe.state),lt=Bi(re,pe,Oe);He&&(Oe.state=He),pe.stateAfter=Oe.save(!He),pe.styles=lt.styles,lt.classes?pe.styleClasses=lt.classes:pe.styleClasses&&(pe.styleClasses=null),De===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return pe.styles}function Ai(re,pe,De){var Oe=re.doc,He=re.display;if(!Oe.mode.startState)return new oi(Oe,!0,pe);var lt=Fi(re,pe,De),wt=lt>Oe.first&&dn(Oe,lt-1).stateAfter,It=wt?oi.fromSaved(Oe,wt,lt):new oi(Oe,kt(Oe.mode),lt);return Oe.iter(lt,pe,function(Nt){an(re,Nt.text,It);var Yt=It.line;Nt.stateAfter=Yt==pe-1||Yt%5==0||Yt>=He.viewFrom&&Yt<He.viewTo?It.save():null,It.nextLine()}),De&&(Oe.modeFrontier=It.line),It}function an(re,pe,De,Oe){var He=re.doc.mode,lt=new Ct(pe,re.options.tabSize,De);for(lt.start=lt.pos=Oe||0,pe==""&&si(He,De.state);!lt.eol();)wi(He,lt,De.state),lt.start=lt.pos}function si(re,pe){if(re.blankLine)return re.blankLine(pe);if(re.innerMode){var De=At(re,pe);if(De.mode.blankLine)return De.mode.blankLine(De.state)}}function wi(re,pe,De,Oe){for(var He=0;He<10;He++){Oe&&(Oe[0]=At(re,De).mode);var lt=re.token(pe,De);if(pe.pos>pe.start)return lt}throw new Error("Mode "+re.name+" failed to advance stream.")}var pi=function(re,pe,De){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=pe||null,this.state=De};function Wi(re,pe,De,Oe){var He=re.doc,lt=He.mode,wt;pe=Dn(He,pe);var It=dn(He,pe.line),Nt=Ai(re,pe.line,De),Yt=new Ct(It.text,re.options.tabSize,Nt),En;for(Oe&&(En=[]);(Oe||Yt.pos<pe.ch)&&!Yt.eol();)Yt.start=Yt.pos,wt=wi(lt,Yt,Nt.state),Oe&&En.push(new pi(Yt,wt,Pt(He.mode,Nt.state)));return Oe?En:new pi(Yt,wt,Nt.state)}function Ni(re,pe){if(re)for(;;){var De=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!De)break;re=re.slice(0,De.index)+re.slice(De.index+De[0].length);var Oe=De[1]?"bgClass":"textClass";pe[Oe]==null?pe[Oe]=De[2]:new RegExp("(?:^|\\s)"+De[2]+"(?:$|\\s)").test(pe[Oe])||(pe[Oe]+=" "+De[2])}return re}function hr(re,pe,De,Oe,He,lt,wt){var It=De.flattenSpans;It==null&&(It=re.options.flattenSpans);var Nt=0,Yt=null,En=new Ct(pe,re.options.tabSize,Oe),en,Un=re.options.addModeClass&&[null];for(pe==""&&Ni(si(De,Oe.state),lt);!En.eol();){if(En.pos>re.options.maxHighlightLength?(It=!1,wt&&an(re,pe,Oe,En.pos),En.pos=pe.length,en=null):en=Ni(wi(De,En,Oe.state,Un),lt),Un){var Fn=Un[0].name;Fn&&(en="m-"+(en?Fn+" "+en:Fn))}if(!It||Yt!=en){for(;Nt<En.start;)Nt=Math.min(En.start,Nt+5e3),He(Nt,Yt);Yt=en}En.start=En.pos}for(;Nt<En.pos;){var vi=Math.min(En.pos,Nt+5e3);He(vi,Yt),Nt=vi}}function Fi(re,pe,De){for(var Oe,He,lt=re.doc,wt=De?-1:pe-(re.doc.mode.innerMode?1e3:100),It=pe;It>wt;--It){if(It<=lt.first)return lt.first;var Nt=dn(lt,It-1),Yt=Nt.stateAfter;if(Yt&&(!De||It+(Yt instanceof Hn?Yt.lookAhead:0)<=lt.modeFrontier))return It;var En=ht(Nt.text,null,re.options.tabSize);(He==null||Oe>En)&&(He=It-1,Oe=En)}return He}function Ki(re,pe){if(re.modeFrontier=Math.min(re.modeFrontier,pe),!(re.highlightFrontier<pe-10)){for(var De=re.first,Oe=pe-1;Oe>De;Oe--){var He=dn(re,Oe).stateAfter;if(He&&(!(He instanceof Hn)||Oe+He.lookAhead<pe)){De=Oe+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,De)}}var _r=!1,On=!1;function Jr(){_r=!0}function In(){On=!0}function Sr(re,pe,De){this.marker=re,this.from=pe,this.to=De}function fo(re,pe){if(re)for(var De=0;De<re.length;++De){var Oe=re[De];if(Oe.marker==pe)return Oe}}function Pr(re,pe){for(var De,Oe=0;Oe<re.length;++Oe)re[Oe]!=pe&&(De||(De=[])).push(re[Oe]);return De}function Do(re,pe){re.markedSpans=re.markedSpans?re.markedSpans.concat([pe]):[pe],pe.marker.attachLine(re)}function ro(re,pe,De){var Oe;if(re)for(var He=0;He<re.length;++He){var lt=re[He],wt=lt.marker,It=lt.from==null||(wt.inclusiveLeft?lt.from<=pe:lt.from<pe);if(It||lt.from==pe&&wt.type=="bookmark"&&(!De||!lt.marker.insertLeft)){var Nt=lt.to==null||(wt.inclusiveRight?lt.to>=pe:lt.to>pe);(Oe||(Oe=[])).push(new Sr(wt,lt.from,Nt?null:lt.to))}}return Oe}function Yi(re,pe,De){var Oe;if(re)for(var He=0;He<re.length;++He){var lt=re[He],wt=lt.marker,It=lt.to==null||(wt.inclusiveRight?lt.to>=pe:lt.to>pe);if(It||lt.from==pe&&wt.type=="bookmark"&&(!De||lt.marker.insertLeft)){var Nt=lt.from==null||(wt.inclusiveLeft?lt.from<=pe:lt.from<pe);(Oe||(Oe=[])).push(new Sr(wt,Nt?null:lt.from-pe,lt.to==null?null:lt.to-pe))}}return Oe}function er(re,pe){if(pe.full)return null;var De=bn(re,pe.from.line)&&dn(re,pe.from.line).markedSpans,Oe=bn(re,pe.to.line)&&dn(re,pe.to.line).markedSpans;if(!De&&!Oe)return null;var He=pe.from.ch,lt=pe.to.ch,wt=sn(pe.from,pe.to)==0,It=ro(De,He,wt),Nt=Yi(Oe,lt,wt),Yt=pe.text.length==1,En=Ut(pe.text).length+(Yt?He:0);if(It)for(var en=0;en<It.length;++en){var Un=It[en];if(Un.to==null){var Fn=fo(Nt,Un.marker);Fn?Yt&&(Un.to=Fn.to==null?null:Fn.to+En):Un.to=He}}if(Nt)for(var vi=0;vi<Nt.length;++vi){var Pi=Nt[vi];if(Pi.to!=null&&(Pi.to+=En),Pi.from==null){var ji=fo(It,Pi.marker);ji||(Pi.from=En,Yt&&(It||(It=[])).push(Pi))}else Pi.from+=En,Yt&&(It||(It=[])).push(Pi)}It&&(It=dr(It)),Nt&&Nt!=It&&(Nt=dr(Nt));var sr=[It];if(!Yt){var Br=pe.text.length-2,br;if(Br>0&&It)for(var Ur=0;Ur<It.length;++Ur)It[Ur].to==null&&(br||(br=[])).push(new Sr(It[Ur].marker,null,null));for(var bo=0;bo<Br;++bo)sr.push(br);sr.push(Nt)}return sr}function dr(re){for(var pe=0;pe<re.length;++pe){var De=re[pe];De.from!=null&&De.from==De.to&&De.marker.clearWhenEmpty!==!1&&re.splice(pe--,1)}return re.length?re:null}function Tr(re,pe,De){var Oe=null;if(re.iter(pe.line,De.line+1,function(Fn){if(Fn.markedSpans)for(var vi=0;vi<Fn.markedSpans.length;++vi){var Pi=Fn.markedSpans[vi].marker;Pi.readOnly&&(!Oe||dt(Oe,Pi)==-1)&&(Oe||(Oe=[])).push(Pi)}}),!Oe)return null;for(var He=[{from:pe,to:De}],lt=0;lt<Oe.length;++lt)for(var wt=Oe[lt],It=wt.find(0),Nt=0;Nt<He.length;++Nt){var Yt=He[Nt];if(!(sn(Yt.to,It.from)<0||sn(Yt.from,It.to)>0)){var En=[Nt,1],en=sn(Yt.from,It.from),Un=sn(Yt.to,It.to);(en<0||!wt.inclusiveLeft&&!en)&&En.push({from:Yt.from,to:It.from}),(Un>0||!wt.inclusiveRight&&!Un)&&En.push({from:It.to,to:Yt.to}),He.splice.apply(He,En),Nt+=En.length-3}}return He}function hi(re){var pe=re.markedSpans;if(pe){for(var De=0;De<pe.length;++De)pe[De].marker.detachLine(re);re.markedSpans=null}}function Tt(re,pe){if(pe){for(var De=0;De<pe.length;++De)pe[De].marker.attachLine(re);re.markedSpans=pe}}function xr(re){return re.inclusiveLeft?-1:0}function Po(re){return re.inclusiveRight?1:0}function Wo(re,pe){var De=re.lines.length-pe.lines.length;if(De!=0)return De;var Oe=re.find(),He=pe.find(),lt=sn(Oe.from,He.from)||xr(re)-xr(pe);if(lt)return-lt;var wt=sn(Oe.to,He.to)||Po(re)-Po(pe);return wt||pe.id-re.id}function Co(re,pe){var De=On&&re.markedSpans,Oe;if(De)for(var He=void 0,lt=0;lt<De.length;++lt)He=De[lt],He.marker.collapsed&&(pe?He.from:He.to)==null&&(!Oe||Wo(Oe,He.marker)<0)&&(Oe=He.marker);return Oe}function qo(re){return Co(re,!0)}function Zo(re){return Co(re,!1)}function wr(re,pe){var De=On&&re.markedSpans,Oe;if(De)for(var He=0;He<De.length;++He){var lt=De[He];lt.marker.collapsed&&(lt.from==null||lt.from<pe)&&(lt.to==null||lt.to>pe)&&(!Oe||Wo(Oe,lt.marker)<0)&&(Oe=lt.marker)}return Oe}function vr(re,pe,De,Oe,He){var lt=dn(re,pe),wt=On&<.markedSpans;if(wt)for(var It=0;It<wt.length;++It){var Nt=wt[It];if(Nt.marker.collapsed){var Yt=Nt.marker.find(0),En=sn(Yt.from,De)||xr(Nt.marker)-xr(He),en=sn(Yt.to,Oe)||Po(Nt.marker)-Po(He);if(!(En>=0&&en<=0||En<=0&&en>=0)&&(En<=0&&(Nt.marker.inclusiveRight&&He.inclusiveLeft?sn(Yt.to,De)>=0:sn(Yt.to,De)>0)||En>=0&&(Nt.marker.inclusiveRight&&He.inclusiveLeft?sn(Yt.from,Oe)<=0:sn(Yt.from,Oe)<0)))return!0}}}function Qi(re){for(var pe;pe=qo(re);)re=pe.find(-1,!0).line;return re}function Qr(re){for(var pe;pe=Zo(re);)re=pe.find(1,!0).line;return re}function Gi(re){for(var pe,De;pe=Zo(re);)re=pe.find(1,!0).line,(De||(De=[])).push(re);return De}function Ui(re,pe){var De=dn(re,pe),Oe=Qi(De);return De==Oe?pe:Ft(Oe)}function qi(re,pe){if(pe>re.lastLine())return pe;var De=dn(re,pe),Oe;if(!Xn(re,De))return pe;for(;Oe=Zo(De);)De=Oe.find(1,!0).line;return Ft(De)+1}function Xn(re,pe){var De=On&&pe.markedSpans;if(De){for(var Oe=void 0,He=0;He<De.length;++He)if(Oe=De[He],!!Oe.marker.collapsed){if(Oe.from==null)return!0;if(!Oe.marker.widgetNode&&Oe.from==0&&Oe.marker.inclusiveLeft&&qr(re,pe,Oe))return!0}}}function qr(re,pe,De){if(De.to==null){var Oe=De.marker.find(1,!0);return qr(re,Oe.line,fo(Oe.line.markedSpans,De.marker))}if(De.marker.inclusiveRight&&De.to==pe.text.length)return!0;for(var He=void 0,lt=0;lt<pe.markedSpans.length;++lt)if(He=pe.markedSpans[lt],He.marker.collapsed&&!He.marker.widgetNode&&He.from==De.to&&(He.to==null||He.to!=De.from)&&(He.marker.inclusiveLeft||De.marker.inclusiveRight)&&qr(re,pe,He))return!0}function _o(re){re=Qi(re);for(var pe=0,De=re.parent,Oe=0;Oe<De.lines.length;++Oe){var He=De.lines[Oe];if(He==re)break;pe+=He.height}for(var lt=De.parent;lt;De=lt,lt=De.parent)for(var wt=0;wt<lt.children.length;++wt){var It=lt.children[wt];if(It==De)break;pe+=It.height}return pe}function Ko(re){if(re.height==0)return 0;for(var pe=re.text.length,De,Oe=re;De=qo(Oe);){var He=De.find(0,!0);Oe=He.from.line,pe+=He.from.ch-He.to.ch}for(Oe=re;De=Zo(Oe);){var lt=De.find(0,!0);pe-=Oe.text.length-lt.from.ch,Oe=lt.to.line,pe+=Oe.text.length-lt.to.ch}return pe}function Eo(re){var pe=re.display,De=re.doc;pe.maxLine=dn(De,De.first),pe.maxLineLength=Ko(pe.maxLine),pe.maxLineChanged=!0,De.iter(function(Oe){var He=Ko(Oe);He>pe.maxLineLength&&(pe.maxLineLength=He,pe.maxLine=Oe)})}var rs=function(re,pe,De){this.text=re,Tt(this,pe),this.height=De?De(this):1};rs.prototype.lineNo=function(){return Ft(this)},ci(rs);function ms(re,pe,De,Oe){re.text=pe,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),hi(re),Tt(re,De);var He=Oe?Oe(re):1;He!=re.height&&wn(re,He)}function Ls(re){re.parent=null,hi(re)}var ws={},ta={};function aa(re,pe){if(!re||/^\s*$/.test(re))return null;var De=pe.addModeClass?ta:ws;return De[re]||(De[re]=re.replace(/\S+/g,"cm-$&"))}function Ln(re,pe){var De=Je("span",null,null,he?"padding-right: .1px":null),Oe={pre:Je("pre",[De],"CodeMirror-line"),content:De,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};pe.measure={};for(var He=0;He<=(pe.rest?pe.rest.length:0);He++){var lt=He?pe.rest[He-1]:pe.line,wt=void 0;Oe.pos=0,Oe.addToken=hl,Cr(re.display.measure)&&(wt=tn(lt,re.doc.direction))&&(Oe.addToken=vs(Oe.addToken,wt)),Oe.map=[];var It=pe!=re.display.externalMeasured&&Ft(lt);lu(lt,Oe,lr(re,lt,It)),lt.styleClasses&&(lt.styleClasses.bgClass&&(Oe.bgClass=rt(lt.styleClasses.bgClass,Oe.bgClass||"")),lt.styleClasses.textClass&&(Oe.textClass=rt(lt.styleClasses.textClass,Oe.textClass||""))),Oe.map.length==0&&Oe.map.push(0,0,Oe.content.appendChild(no(re.display.measure))),He==0?(pe.measure.map=Oe.map,pe.measure.cache={}):((pe.measure.maps||(pe.measure.maps=[])).push(Oe.map),(pe.measure.caches||(pe.measure.caches=[])).push({}))}if(he){var Nt=Oe.content.lastChild;(/\bcm-tab\b/.test(Nt.className)||Nt.querySelector&&Nt.querySelector(".cm-tab"))&&(Oe.content.className="cm-tab-wrap-hack")}return fn(re,"renderLine",re,pe.line,Oe.pre),Oe.pre.className&&(Oe.textClass=rt(Oe.pre.className,Oe.textClass||"")),Oe}function Os(re){var pe=Ve("span","\u2022","cm-invalidchar");return pe.title="\\u"+re.charCodeAt(0).toString(16),pe.setAttribute("aria-label",pe.title),pe}function hl(re,pe,De,Oe,He,lt,wt){if(pe){var It=re.splitSpaces?dl(pe,re.trailingSpace):pe,Nt=re.cm.state.specialChars,Yt=!1,En;if(!Nt.test(pe))re.col+=pe.length,En=document.createTextNode(It),re.map.push(re.pos,re.pos+pe.length,En),Ce&&_e<9&&(Yt=!0),re.pos+=pe.length;else{En=document.createDocumentFragment();for(var en=0;;){Nt.lastIndex=en;var Un=Nt.exec(pe),Fn=Un?Un.index-en:pe.length-en;if(Fn){var vi=document.createTextNode(It.slice(en,en+Fn));Ce&&_e<9?En.appendChild(Ve("span",[vi])):En.appendChild(vi),re.map.push(re.pos,re.pos+Fn,vi),re.col+=Fn,re.pos+=Fn}if(!Un)break;en+=Fn+1;var Pi=void 0;if(Un[0]==" "){var ji=re.cm.options.tabSize,sr=ji-re.col%ji;Pi=En.appendChild(Ve("span",xn(sr),"cm-tab")),Pi.setAttribute("role","presentation"),Pi.setAttribute("cm-text"," "),re.col+=sr}else Un[0]=="\r"||Un[0]==`
|
|
|
`?(Pi=En.appendChild(Ve("span",Un[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Pi.setAttribute("cm-text",Un[0]),re.col+=1):(Pi=re.cm.options.specialCharPlaceholder(Un[0]),Pi.setAttribute("cm-text",Un[0]),Ce&&_e<9?En.appendChild(Ve("span",[Pi])):En.appendChild(Pi),re.col+=1);re.map.push(re.pos,re.pos+1,Pi),re.pos++}}if(re.trailingSpace=It.charCodeAt(pe.length-1)==32,De||Oe||He||Yt||lt||wt){var Br=De||"";Oe&&(Br+=Oe),He&&(Br+=He);var br=Ve("span",[En],Br,lt);if(wt)for(var Ur in wt)wt.hasOwnProperty(Ur)&&Ur!="style"&&Ur!="class"&&br.setAttribute(Ur,wt[Ur]);return re.content.appendChild(br)}re.content.appendChild(En)}}function dl(re,pe){if(re.length>1&&!/ /.test(re))return re;for(var De=pe,Oe="",He=0;He<re.length;He++){var lt=re.charAt(He);lt==" "&&De&&(He==re.length-1||re.charCodeAt(He+1)==32)&&(lt="\xA0"),Oe+=lt,De=lt==" "}return Oe}function vs(re,pe){return function(De,Oe,He,lt,wt,It,Nt){He=He?He+" cm-force-border":"cm-force-border";for(var Yt=De.pos,En=Yt+Oe.length;;){for(var en=void 0,Un=0;Un<pe.length&&(en=pe[Un],!(en.to>Yt&&en.from<=Yt));Un++);if(en.to>=En)return re(De,Oe,He,lt,wt,It,Nt);re(De,Oe.slice(0,en.to-Yt),He,lt,null,It,Nt),lt=null,Oe=Oe.slice(en.to-Yt),Yt=en.to}}}function ja(re,pe,De,Oe){var He=!Oe&&De.widgetNode;He&&re.map.push(re.pos,re.pos+pe,He),!Oe&&re.cm.display.input.needsContentAttribute&&(He||(He=re.content.appendChild(document.createElement("span"))),He.setAttribute("cm-marker",De.id)),He&&(re.cm.display.input.setUneditable(He),re.content.appendChild(He)),re.pos+=pe,re.trailingSpace=!1}function lu(re,pe,De){var Oe=re.markedSpans,He=re.text,lt=0;if(!Oe){for(var wt=1;wt<De.length;wt+=2)pe.addToken(pe,He.slice(lt,lt=De[wt]),aa(De[wt+1],pe.cm.options));return}for(var It=He.length,Nt=0,Yt=1,En="",en,Un,Fn=0,vi,Pi,ji,sr,Br;;){if(Fn==Nt){vi=Pi=ji=Un="",Br=null,sr=null,Fn=1/0;for(var br=[],Ur=void 0,bo=0;bo<Oe.length;++bo){var yr=Oe[bo],Fo=yr.marker;if(Fo.type=="bookmark"&&yr.from==Nt&&Fo.widgetNode)br.push(Fo);else if(yr.from<=Nt&&(yr.to==null||yr.to>Nt||Fo.collapsed&&yr.to==Nt&&yr.from==Nt)){if(yr.to!=null&&yr.to!=Nt&&Fn>yr.to&&(Fn=yr.to,Pi=""),Fo.className&&(vi+=" "+Fo.className),Fo.css&&(Un=(Un?Un+";":"")+Fo.css),Fo.startStyle&&yr.from==Nt&&(ji+=" "+Fo.startStyle),Fo.endStyle&&yr.to==Fn&&(Ur||(Ur=[])).push(Fo.endStyle,yr.to),Fo.title&&((Br||(Br={})).title=Fo.title),Fo.attributes)for(var la in Fo.attributes)(Br||(Br={}))[la]=Fo.attributes[la];Fo.collapsed&&(!sr||Wo(sr.marker,Fo)<0)&&(sr=yr)}else yr.from>Nt&&Fn>yr.from&&(Fn=yr.from)}if(Ur)for(var Va=0;Va<Ur.length;Va+=2)Ur[Va+1]==Fn&&(Pi+=" "+Ur[Va]);if(!sr||sr.from==Nt)for(var ga=0;ga<br.length;++ga)ja(pe,0,br[ga]);if(sr&&(sr.from||0)==Nt){if(ja(pe,(sr.to==null?It+1:sr.to)-Nt,sr.marker,sr.from==null),sr.to==null)return;sr.to==Nt&&(sr=!1)}}if(Nt>=It)break;for(var nu=Math.min(It,Fn);;){if(En){var Ml=Nt+En.length;if(!sr){var Ra=Ml>nu?En.slice(0,nu-Nt):En;pe.addToken(pe,Ra,en?en+vi:vi,ji,Nt+Ra.length==Fn?Pi:"",Un,Br)}if(Ml>=nu){En=En.slice(nu-Nt),Nt=nu;break}Nt=Ml,ji=""}En=He.slice(lt,lt=De[Yt++]),en=aa(De[Yt++],pe.cm.options)}}}function Vl(re,pe,De){this.line=pe,this.rest=Gi(pe),this.size=this.rest?Ft(Ut(this.rest))-De+1:1,this.node=this.text=null,this.hidden=Xn(re,pe)}function ho(re,pe,De){for(var Oe=[],He,lt=pe;lt<De;lt=He){var wt=new Vl(re.doc,dn(re.doc,lt),lt);He=lt+wt.size,Oe.push(wt)}return Oe}var Er=null;function na(re){Er?Er.ops.push(re):re.ownsGroup=Er={ops:[re],delayedCallbacks:[]}}function Rr(re){var pe=re.delayedCallbacks,De=0;do{for(;De<pe.length;De++)pe[De].call(null);for(var Oe=0;Oe<re.ops.length;Oe++){var He=re.ops[Oe];if(He.cursorActivityHandlers)for(;He.cursorActivityCalled<He.cursorActivityHandlers.length;)He.cursorActivityHandlers[He.cursorActivityCalled++].call(null,He.cm)}}while(De<pe.length)}function io(re,pe){var De=re.ownsGroup;if(De)try{Rr(De)}finally{Er=null,pe(De)}}var Kr=null;function Ei(re,pe){var De=mn(re,pe);if(De.length){var Oe=Array.prototype.slice.call(arguments,2),He;Er?He=Er.delayedCallbacks:Kr?He=Kr:(He=Kr=[],setTimeout(ls,0));for(var lt=function(It){He.push(function(){return De[It].apply(null,Oe)})},wt=0;wt<De.length;++wt)lt(wt)}}function ls(){var re=Kr;Kr=null;for(var pe=0;pe<re.length;++pe)re[pe]()}function Ms(re,pe,De,Oe){for(var He=0;He<pe.changes.length;He++){var lt=pe.changes[He];lt=="text"?yi(re,pe):lt=="gutter"?$s(re,pe,De,Oe):lt=="class"?fs(re,pe):lt=="widget"&&Qa(re,pe,Oe)}pe.changes=null}function ba(re){return re.node==re.text&&(re.node=Ve("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),Ce&&_e<8&&(re.node.style.zIndex=2)),re.node}function za(re,pe){var De=pe.bgClass?pe.bgClass+" "+(pe.line.bgClass||""):pe.line.bgClass;if(De&&(De+=" CodeMirror-linebackground"),pe.background)De?pe.background.className=De:(pe.background.parentNode.removeChild(pe.background),pe.background=null);else if(De){var Oe=ba(pe);pe.background=Oe.insertBefore(Ve("div",null,De),Oe.firstChild),re.display.input.setUneditable(pe.background)}}function Ja(re,pe){var De=re.display.externalMeasured;return De&&De.line==pe.line?(re.display.externalMeasured=null,pe.measure=De.measure,De.built):Ln(re,pe)}function yi(re,pe){var De=pe.text.className,Oe=Ja(re,pe);pe.text==pe.node&&(pe.node=Oe.pre),pe.text.parentNode.replaceChild(Oe.pre,pe.text),pe.text=Oe.pre,Oe.bgClass!=pe.bgClass||Oe.textClass!=pe.textClass?(pe.bgClass=Oe.bgClass,pe.textClass=Oe.textClass,fs(re,pe)):De&&(pe.text.className=De)}function fs(re,pe){za(re,pe),pe.line.wrapClass?ba(pe).className=pe.line.wrapClass:pe.node!=pe.text&&(pe.node.className="");var De=pe.textClass?pe.textClass+" "+(pe.line.textClass||""):pe.line.textClass;pe.text.className=De||""}function $s(re,pe,De,Oe){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 He=ba(pe);pe.gutterBackground=Ve("div",null,"CodeMirror-gutter-background "+pe.line.gutterClass,"left: "+(re.options.fixedGutter?Oe.fixedPos:-Oe.gutterTotalWidth)+"px; width: "+Oe.gutterTotalWidth+"px"),re.display.input.setUneditable(pe.gutterBackground),He.insertBefore(pe.gutterBackground,pe.text)}var lt=pe.line.gutterMarkers;if(re.options.lineNumbers||lt){var wt=ba(pe),It=pe.gutter=Ve("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?Oe.fixedPos:-Oe.gutterTotalWidth)+"px");if(re.display.input.setUneditable(It),wt.insertBefore(It,pe.text),pe.line.gutterClass&&(It.className+=" "+pe.line.gutterClass),re.options.lineNumbers&&(!lt||!lt["CodeMirror-linenumbers"])&&(pe.lineNumber=It.appendChild(Ve("div",An(re.options,De),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Oe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),lt)for(var Nt=0;Nt<re.display.gutterSpecs.length;++Nt){var Yt=re.display.gutterSpecs[Nt].className,En=lt.hasOwnProperty(Yt)&<[Yt];En&&It.appendChild(Ve("div",[En],"CodeMirror-gutter-elt","left: "+Oe.gutterLeft[Yt]+"px; width: "+Oe.gutterWidth[Yt]+"px"))}}}function Qa(re,pe,De){pe.alignable&&(pe.alignable=null);for(var Oe=be("CodeMirror-linewidget"),He=pe.node.firstChild,lt=void 0;He;He=lt)lt=He.nextSibling,Oe.test(He.className)&&pe.node.removeChild(He);Il(re,pe,De)}function wl(re,pe,De,Oe){var He=Ja(re,pe);return pe.text=pe.node=He.pre,He.bgClass&&(pe.bgClass=He.bgClass),He.textClass&&(pe.textClass=He.textClass),fs(re,pe),$s(re,pe,De,Oe),Il(re,pe,Oe),pe.node}function Il(re,pe,De){if(Fr(re,pe.line,pe,De,!0),pe.rest)for(var Oe=0;Oe<pe.rest.length;Oe++)Fr(re,pe.rest[Oe],pe,De,!1)}function Fr(re,pe,De,Oe,He){if(pe.widgets)for(var lt=ba(De),wt=0,It=pe.widgets;wt<It.length;++wt){var Nt=It[wt],Yt=Ve("div",[Nt.node],"CodeMirror-linewidget"+(Nt.className?" "+Nt.className:""));Nt.handleMouseEvents||Yt.setAttribute("cm-ignore-events","true"),nc(Nt,Yt,De,Oe),re.display.input.setUneditable(Yt),He&&Nt.above?lt.insertBefore(Yt,De.gutter||De.text):lt.appendChild(Yt),Ei(Nt,"redraw")}}function nc(re,pe,De,Oe){if(re.noHScroll){(De.alignable||(De.alignable=[])).push(pe);var He=Oe.wrapperWidth;pe.style.left=Oe.fixedPos+"px",re.coverGutter||(He-=Oe.gutterTotalWidth,pe.style.paddingLeft=Oe.gutterTotalWidth+"px"),pe.style.width=He+"px"}re.coverGutter&&(pe.style.zIndex=5,pe.style.position="relative",re.noHScroll||(pe.style.marginLeft=-Oe.gutterTotalWidth+"px"))}function Aa(re){if(re.height!=null)return re.height;var pe=re.doc.cm;if(!pe)return 0;if(!gt(document.body,re.node)){var De="position: relative;";re.coverGutter&&(De+="margin-left: -"+pe.display.gutters.offsetWidth+"px;"),re.noHScroll&&(De+="width: "+pe.display.wrapper.clientWidth+"px;"),je(pe.display.measure,Ve("div",[re.node],null,De))}return re.height=re.node.parentNode.offsetHeight}function Ha(re,pe){for(var De=tr(pe);De!=re.wrapper;De=De.parentNode)if(!De||De.nodeType==1&&De.getAttribute("cm-ignore-events")=="true"||De.parentNode==re.sizer&&De!=re.mover)return!0}function Ta(re){return re.lineSpace.offsetTop}function $l(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function Pu(re){if(re.cachedPaddingH)return re.cachedPaddingH;var pe=je(re.measure,Ve("pre","x","CodeMirror-line-like")),De=window.getComputedStyle?window.getComputedStyle(pe):pe.currentStyle,Oe={left:parseInt(De.paddingLeft),right:parseInt(De.paddingRight)};return!isNaN(Oe.left)&&!isNaN(Oe.right)&&(re.cachedPaddingH=Oe),Oe}function Ua(re){return yt-re.display.nativeBarWidth}function Ga(re){return re.display.scroller.clientWidth-Ua(re)-re.display.barWidth}function Uu(re){return re.display.scroller.clientHeight-Ua(re)-re.display.barHeight}function yc(re,pe,De){var Oe=re.options.lineWrapping,He=Oe&&Ga(re);if(!pe.measure.heights||Oe&&pe.measure.width!=He){var lt=pe.measure.heights=[];if(Oe){pe.measure.width=He;for(var wt=pe.text.firstChild.getClientRects(),It=0;It<wt.length-1;It++){var Nt=wt[It],Yt=wt[It+1];Math.abs(Nt.bottom-Yt.bottom)>2&<.push((Nt.bottom+Yt.top)/2-De.top)}}lt.push(De.bottom-De.top)}}function Eu(re,pe,De){if(re.line==pe)return{map:re.measure.map,cache:re.measure.cache};for(var Oe=0;Oe<re.rest.length;Oe++)if(re.rest[Oe]==pe)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe]};for(var He=0;He<re.rest.length;He++)if(Ft(re.rest[He])>De)return{map:re.measure.maps[He],cache:re.measure.caches[He],before:!0}}function Dl(re,pe){pe=Qi(pe);var De=Ft(pe),Oe=re.display.externalMeasured=new Vl(re.doc,pe,De);Oe.lineN=De;var He=Oe.built=Ln(re,Oe);return Oe.text=He.pre,je(re.display.lineMeasure,He.pre),Oe}function Sc(re,pe,De,Oe){return bl(re,Lu(re,pe),De,Oe)}function Gu(re,pe){if(pe>=re.display.viewFrom&&pe<re.display.viewTo)return re.display.view[Ks(re,pe)];var De=re.display.externalMeasured;if(De&&pe>=De.lineN&&pe<De.lineN+De.size)return De}function Lu(re,pe){var De=Ft(pe),Oe=Gu(re,De);Oe&&!Oe.text?Oe=null:Oe&&Oe.changes&&(Ms(re,Oe,De,bh(re)),re.curOp.forceUpdate=!0),Oe||(Oe=Dl(re,pe));var He=Eu(Oe,pe,De);return{line:pe,view:Oe,rect:null,map:He.map,cache:He.cache,before:He.before,hasHeights:!1}}function bl(re,pe,De,Oe,He){pe.before&&(De=-1);var lt=De+(Oe||""),wt;return pe.cache.hasOwnProperty(lt)?wt=pe.cache[lt]:(pe.rect||(pe.rect=pe.view.text.getBoundingClientRect()),pe.hasHeights||(yc(re,pe.view,pe.rect),pe.hasHeights=!0),wt=so(re,pe,De,Oe),wt.bogus||(pe.cache[lt]=wt)),{left:wt.left,right:wt.right,top:He?wt.rtop:wt.top,bottom:He?wt.rbottom:wt.bottom}}var th={left:0,right:0,top:0,bottom:0};function xc(re,pe,De){for(var Oe,He,lt,wt,It,Nt,Yt=0;Yt<re.length;Yt+=3)if(It=re[Yt],Nt=re[Yt+1],pe<It?(He=0,lt=1,wt="left"):pe<Nt?(He=pe-It,lt=He+1):(Yt==re.length-3||pe==Nt&&re[Yt+3]>pe)&&(lt=Nt-It,He=lt-1,pe>=Nt&&(wt="right")),He!=null){if(Oe=re[Yt+2],It==Nt&&De==(Oe.insertLeft?"left":"right")&&(wt=De),De=="left"&&He==0)for(;Yt&&re[Yt-2]==re[Yt-3]&&re[Yt-1].insertLeft;)Oe=re[(Yt-=3)+2],wt="left";if(De=="right"&&He==Nt-It)for(;Yt<re.length-3&&re[Yt+3]==re[Yt+4]&&!re[Yt+5].insertLeft;)Oe=re[(Yt+=3)+2],wt="right";break}return{node:Oe,start:He,end:lt,collapse:wt,coverStart:It,coverEnd:Nt}}function uu(re,pe){var De=th;if(pe=="left")for(var Oe=0;Oe<re.length&&(De=re[Oe]).left==De.right;Oe++);else for(var He=re.length-1;He>=0&&(De=re[He]).left==De.right;He--);return De}function so(re,pe,De,Oe){var He=xc(pe.map,De,Oe),lt=He.node,wt=He.start,It=He.end,Nt=He.collapse,Yt;if(lt.nodeType==3){for(var En=0;En<4;En++){for(;wt&&Re(pe.line.text.charAt(He.coverStart+wt));)--wt;for(;He.coverStart+It<He.coverEnd&&Re(pe.line.text.charAt(He.coverStart+It));)++It;if(Ce&&_e<9&&wt==0&&It==He.coverEnd-He.coverStart?Yt=lt.parentNode.getBoundingClientRect():Yt=uu(We(lt,wt,It).getClientRects(),Oe),Yt.left||Yt.right||wt==0)break;It=wt,wt=wt-1,Nt="right"}Ce&&_e<11&&(Yt=jo(re.display.measure,Yt))}else{wt>0&&(Nt=Oe="right");var en;re.options.lineWrapping&&(en=lt.getClientRects()).length>1?Yt=en[Oe=="right"?en.length-1:0]:Yt=lt.getBoundingClientRect()}if(Ce&&_e<9&&!wt&&(!Yt||!Yt.left&&!Yt.right)){var Un=lt.parentNode.getClientRects()[0];Un?Yt={left:Un.left,right:Un.left+Wu(re.display),top:Un.top,bottom:Un.bottom}:Yt=th}for(var Fn=Yt.top-pe.rect.top,vi=Yt.bottom-pe.rect.top,Pi=(Fn+vi)/2,ji=pe.view.measure.heights,sr=0;sr<ji.length-1&&!(Pi<ji[sr]);sr++);var Br=sr?ji[sr-1]:0,br=ji[sr],Ur={left:(Nt=="right"?Yt.right:Yt.left)-pe.rect.left,right:(Nt=="left"?Yt.left:Yt.right)-pe.rect.left,top:Br,bottom:br};return!Yt.left&&!Yt.right&&(Ur.bogus=!0),re.options.singleCursorHeightPerLine||(Ur.rtop=Fn,Ur.rbottom=vi),Ur}function jo(re,pe){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!xo(re))return pe;var De=screen.logicalXDPI/screen.deviceXDPI,Oe=screen.logicalYDPI/screen.deviceYDPI;return{left:pe.left*De,right:pe.right*De,top:pe.top*Oe,bottom:pe.bottom*Oe}}function La(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 ia(re){re.display.externalMeasure=null,Ne(re.display.lineMeasure);for(var pe=0;pe<re.display.view.length;pe++)La(re.display.view[pe])}function Is(re){ia(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 Ts(){return xe&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Gs(re){var pe=0;if(re.widgets)for(var De=0;De<re.widgets.length;++De)re.widgets[De].above&&(pe+=Aa(re.widgets[De]));return pe}function Ws(re,pe,De,Oe,He){if(!He){var lt=Gs(pe);De.top+=lt,De.bottom+=lt}if(Oe=="line")return De;Oe||(Oe="local");var wt=_o(pe);if(Oe=="local"?wt+=Ta(re.display):wt-=re.display.viewOffset,Oe=="page"||Oe=="window"){var It=re.display.lineSpace.getBoundingClientRect();wt+=It.top+(Oe=="window"?0:Ts());var Nt=It.left+(Oe=="window"?0:bs());De.left+=Nt,De.right+=Nt}return De.top+=wt,De.bottom+=wt,De}function Yl(re,pe,De){if(De=="div")return pe;var Oe=pe.left,He=pe.top;if(De=="page")Oe-=bs(),He-=Ts();else if(De=="local"||!De){var lt=re.display.sizer.getBoundingClientRect();Oe+=lt.left,He+=lt.top}var wt=re.display.lineSpace.getBoundingClientRect();return{left:Oe-wt.left,top:He-wt.top}}function Rl(re,pe,De,Oe,He){return Oe||(Oe=dn(re.doc,pe.line)),Ws(re,Oe,Sc(re,Oe,pe.ch,He),De)}function Ds(re,pe,De,Oe,He,lt){Oe=Oe||dn(re.doc,pe.line),He||(He=Lu(re,Oe));function wt(vi,Pi){var ji=bl(re,He,vi,Pi?"right":"left",lt);return Pi?ji.left=ji.right:ji.right=ji.left,Ws(re,Oe,ji,De)}var It=tn(Oe,re.doc.direction),Nt=pe.ch,Yt=pe.sticky;if(Nt>=Oe.text.length?(Nt=Oe.text.length,Yt="before"):Nt<=0&&(Nt=0,Yt="after"),!It)return wt(Yt=="before"?Nt-1:Nt,Yt=="before");function En(vi,Pi,ji){var sr=It[Pi],Br=sr.level==1;return wt(ji?vi-1:vi,Br!=ji)}var en=at(It,Nt,Yt),Un=Ze,Fn=En(Nt,en,Yt=="before");return Un!=null&&(Fn.other=En(Nt,Un,Yt!="before")),Fn}function xh(re,pe){var De=0;pe=Dn(re.doc,pe),re.options.lineWrapping||(De=Wu(re.display)*pe.ch);var Oe=dn(re.doc,pe.line),He=_o(Oe)+Ta(re.display);return{left:De,right:De,top:He,bottom:He+Oe.height}}function nh(re,pe,De,Oe,He){var lt=Gt(re,pe,De);return lt.xRel=He,Oe&&(lt.outside=Oe),lt}function wc(re,pe,De){var Oe=re.doc;if(De+=re.display.viewOffset,De<0)return nh(Oe.first,0,null,-1,-1);var He=$t(Oe,De),lt=Oe.first+Oe.size-1;if(He>lt)return nh(Oe.first+Oe.size-1,dn(Oe,lt).text.length,null,1,1);pe<0&&(pe=0);for(var wt=dn(Oe,He);;){var It=Qn(re,wt,He,pe,De),Nt=wr(wt,It.ch+(It.xRel>0||It.outside>0?1:0));if(!Nt)return It;var Yt=Nt.find(1);if(Yt.line==He)return Yt;wt=dn(Oe,He=Yt.line)}}function gr(re,pe,De,Oe){Oe-=Gs(pe);var He=pe.text.length,lt=Ge(function(wt){return bl(re,De,wt-1).bottom<=Oe},He,0);return He=Ge(function(wt){return bl(re,De,wt).top>Oe},lt,He),{begin:lt,end:He}}function bc(re,pe,De,Oe){De||(De=Lu(re,pe));var He=Ws(re,pe,bl(re,De,Oe),"line").top;return gr(re,pe,De,He)}function rn(re,pe,De,Oe){return re.bottom<=De?!1:re.top>De?!0:(Oe?re.left:re.right)>pe}function Qn(re,pe,De,Oe,He){He-=_o(pe);var lt=Lu(re,pe),wt=Gs(pe),It=0,Nt=pe.text.length,Yt=!0,En=tn(pe,re.doc.direction);if(En){var en=(re.options.lineWrapping?Qh:wh)(re,pe,De,lt,En,Oe,He);Yt=en.level!=1,It=Yt?en.from:en.to-1,Nt=Yt?en.to:en.from-1}var Un=null,Fn=null,vi=Ge(function(bo){var yr=bl(re,lt,bo);return yr.top+=wt,yr.bottom+=wt,rn(yr,Oe,He,!1)?(yr.top<=He&&yr.left<=Oe&&(Un=bo,Fn=yr),!0):!1},It,Nt),Pi,ji,sr=!1;if(Fn){var Br=Oe-Fn.left<Fn.right-Oe,br=Br==Yt;vi=Un+(br?0:1),ji=br?"after":"before",Pi=Br?Fn.left:Fn.right}else{!Yt&&(vi==Nt||vi==It)&&vi++,ji=vi==0?"after":vi==pe.text.length?"before":bl(re,lt,vi-(Yt?1:0)).bottom+wt<=He==Yt?"after":"before";var Ur=Ds(re,Gt(De,vi,ji),"line",pe,lt);Pi=Ur.left,sr=He<Ur.top?-1:He>=Ur.bottom?1:0}return vi=Ae(pe.text,vi,1),nh(De,vi,ji,sr,Oe-Pi)}function wh(re,pe,De,Oe,He,lt,wt){var It=Ge(function(en){var Un=He[en],Fn=Un.level!=1;return rn(Ds(re,Gt(De,Fn?Un.to:Un.from,Fn?"before":"after"),"line",pe,Oe),lt,wt,!0)},0,He.length-1),Nt=He[It];if(It>0){var Yt=Nt.level!=1,En=Ds(re,Gt(De,Yt?Nt.from:Nt.to,Yt?"after":"before"),"line",pe,Oe);rn(En,lt,wt,!0)&&En.top>wt&&(Nt=He[It-1])}return Nt}function Qh(re,pe,De,Oe,He,lt,wt){var It=gr(re,pe,Oe,wt),Nt=It.begin,Yt=It.end;/\s/.test(pe.text.charAt(Yt-1))&&Yt--;for(var En=null,en=null,Un=0;Un<He.length;Un++){var Fn=He[Un];if(!(Fn.from>=Yt||Fn.to<=Nt)){var vi=Fn.level!=1,Pi=bl(re,Oe,vi?Math.min(Yt,Fn.to)-1:Math.max(Nt,Fn.from)).right,ji=Pi<lt?lt-Pi+1e9:Pi-lt;(!En||en>ji)&&(En=Fn,en=ji)}}return En||(En=He[He.length-1]),En.from<Nt&&(En={from:Nt,to:En.to,level:En.level}),En.to>Yt&&(En={from:En.from,to:Yt,level:En.level}),En}var Mu;function Tu(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(Mu==null){Mu=Ve("pre",null,"CodeMirror-line-like");for(var pe=0;pe<49;++pe)Mu.appendChild(document.createTextNode("x")),Mu.appendChild(Ve("br"));Mu.appendChild(document.createTextNode("x"))}je(re.measure,Mu);var De=Mu.offsetHeight/50;return De>3&&(re.cachedTextHeight=De),Ne(re.measure),De||1}function Wu(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var pe=Ve("span","xxxxxxxxxx"),De=Ve("pre",[pe],"CodeMirror-line-like");je(re.measure,De);var Oe=pe.getBoundingClientRect(),He=(Oe.right-Oe.left)/10;return He>2&&(re.cachedCharWidth=He),He||10}function bh(re){for(var pe=re.display,De={},Oe={},He=pe.gutters.clientLeft,lt=pe.gutters.firstChild,wt=0;lt;lt=lt.nextSibling,++wt){var It=re.display.gutterSpecs[wt].className;De[It]=lt.offsetLeft+lt.clientLeft+He,Oe[It]=lt.clientWidth}return{fixedPos:Cc(pe),gutterTotalWidth:pe.gutters.offsetWidth,gutterLeft:De,gutterWidth:Oe,wrapperWidth:pe.wrapper.clientWidth}}function Cc(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Zs(re){var pe=Tu(re.display),De=re.options.lineWrapping,Oe=De&&Math.max(5,re.display.scroller.clientWidth/Wu(re.display)-3);return function(He){if(Xn(re.doc,He))return 0;var lt=0;if(He.widgets)for(var wt=0;wt<He.widgets.length;wt++)He.widgets[wt].height&&(lt+=He.widgets[wt].height);return De?lt+(Math.ceil(He.text.length/Oe)||1)*pe:lt+pe}}function Wr(re){var pe=re.doc,De=Zs(re);pe.iter(function(Oe){var He=De(Oe);He!=Oe.height&&wn(Oe,He)})}function Na(re,pe,De,Oe){var He=re.display;if(!De&&tr(pe).getAttribute("cm-not-content")=="true")return null;var lt,wt,It=He.lineSpace.getBoundingClientRect();try{lt=pe.clientX-It.left,wt=pe.clientY-It.top}catch(en){return null}var Nt=wc(re,lt,wt),Yt;if(Oe&&Nt.xRel>0&&(Yt=dn(re.doc,Nt.line).text).length==Nt.ch){var En=ht(Yt,Yt.length,re.options.tabSize)-Yt.length;Nt=Gt(Nt.line,Math.max(0,Math.round((lt-Pu(re.display).left)/Wu(re.display))-En))}return Nt}function Ks(re,pe){if(pe>=re.display.viewTo||(pe-=re.display.viewFrom,pe<0))return null;for(var De=re.display.view,Oe=0;Oe<De.length;Oe++)if(pe-=De[Oe].size,pe<0)return Oe}function Ps(re,pe,De,Oe){pe==null&&(pe=re.doc.first),De==null&&(De=re.doc.first+re.doc.size),Oe||(Oe=0);var He=re.display;if(Oe&&De<He.viewTo&&(He.updateLineNumbers==null||He.updateLineNumbers>pe)&&(He.updateLineNumbers=pe),re.curOp.viewChanged=!0,pe>=He.viewTo)On&&Ui(re.doc,pe)<He.viewTo&&fa(re);else if(De<=He.viewFrom)On&&qi(re.doc,De+Oe)>He.viewFrom?fa(re):(He.viewFrom+=Oe,He.viewTo+=Oe);else if(pe<=He.viewFrom&&De>=He.viewTo)fa(re);else if(pe<=He.viewFrom){var lt=fl(re,De,De+Oe,1);lt?(He.view=He.view.slice(lt.index),He.viewFrom=lt.lineN,He.viewTo+=Oe):fa(re)}else if(De>=He.viewTo){var wt=fl(re,pe,pe,-1);wt?(He.view=He.view.slice(0,wt.index),He.viewTo=wt.lineN):fa(re)}else{var It=fl(re,pe,pe,-1),Nt=fl(re,De,De+Oe,1);It&&Nt?(He.view=He.view.slice(0,It.index).concat(ho(re,It.lineN,Nt.lineN)).concat(He.view.slice(Nt.index)),He.viewTo+=Oe):fa(re)}var Yt=He.externalMeasured;Yt&&(De<Yt.lineN?Yt.lineN+=Oe:pe<Yt.lineN+Yt.size&&(He.externalMeasured=null))}function wo(re,pe,De){re.curOp.viewChanged=!0;var Oe=re.display,He=re.display.externalMeasured;if(He&&pe>=He.lineN&&pe<He.lineN+He.size&&(Oe.externalMeasured=null),!(pe<Oe.viewFrom||pe>=Oe.viewTo)){var lt=Oe.view[Ks(re,pe)];if(lt.node!=null){var wt=lt.changes||(lt.changes=[]);dt(wt,De)==-1&&wt.push(De)}}}function fa(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function fl(re,pe,De,Oe){var He=Ks(re,pe),lt,wt=re.display.view;if(!On||De==re.doc.first+re.doc.size)return{index:He,lineN:De};for(var It=re.display.viewFrom,Nt=0;Nt<He;Nt++)It+=wt[Nt].size;if(It!=pe){if(Oe>0){if(He==wt.length-1)return null;lt=It+wt[He].size-pe,He++}else lt=It-pe;pe+=lt,De+=lt}for(;Ui(re.doc,De)!=De;){if(He==(Oe<0?0:wt.length-1))return null;De+=Oe*wt[He-(Oe<0?1:0)].size,He+=Oe}return{index:He,lineN:De}}function ss(re,pe,De){var Oe=re.display,He=Oe.view;He.length==0||pe>=Oe.viewTo||De<=Oe.viewFrom?(Oe.view=ho(re,pe,De),Oe.viewFrom=pe):(Oe.viewFrom>pe?Oe.view=ho(re,pe,Oe.viewFrom).concat(Oe.view):Oe.viewFrom<pe&&(Oe.view=Oe.view.slice(Ks(re,pe))),Oe.viewFrom=pe,Oe.viewTo<De?Oe.view=Oe.view.concat(ho(re,Oe.viewTo,De)):Oe.viewTo>De&&(Oe.view=Oe.view.slice(0,Ks(re,De)))),Oe.viewTo=De}function Cl(re){for(var pe=re.display.view,De=0,Oe=0;Oe<pe.length;Oe++){var He=pe[Oe];!He.hidden&&(!He.node||He.changes)&&++De}return De}function Ca(re){re.display.input.showSelection(re.display.input.prepareSelection())}function _c(re,pe){pe===void 0&&(pe=!0);for(var De=re.doc,Oe={},He=Oe.cursors=document.createDocumentFragment(),lt=Oe.selection=document.createDocumentFragment(),wt=0;wt<De.sel.ranges.length;wt++)if(!(!pe&&wt==De.sel.primIndex)){var It=De.sel.ranges[wt];if(!(It.from().line>=re.display.viewTo||It.to().line<re.display.viewFrom)){var Nt=It.empty();(Nt||re.options.showCursorWhenSelecting)&&zo(re,It.head,He),Nt||Vo(re,It,lt)}}return Oe}function zo(re,pe,De){var Oe=Ds(re,pe,"div",null,null,!re.options.singleCursorHeightPerLine),He=De.appendChild(Ve("div","\xA0","CodeMirror-cursor"));if(He.style.left=Oe.left+"px",He.style.top=Oe.top+"px",He.style.height=Math.max(0,Oe.bottom-Oe.top)*re.options.cursorHeight+"px",Oe.other){var lt=De.appendChild(Ve("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));lt.style.display="",lt.style.left=Oe.other.left+"px",lt.style.top=Oe.other.top+"px",lt.style.height=(Oe.other.bottom-Oe.other.top)*.85+"px"}}function Wa(re,pe){return re.top-pe.top||re.left-pe.left}function Vo(re,pe,De){var Oe=re.display,He=re.doc,lt=document.createDocumentFragment(),wt=Pu(re.display),It=wt.left,Nt=Math.max(Oe.sizerWidth,Ga(re)-Oe.sizer.offsetLeft)-wt.right,Yt=He.direction=="ltr";function En(br,Ur,bo,yr){Ur<0&&(Ur=0),Ur=Math.round(Ur),yr=Math.round(yr),lt.appendChild(Ve("div",null,"CodeMirror-selected","position: absolute; left: "+br+`px;
|
|
|
top: `+Ur+"px; width: "+(bo==null?Nt-br:bo)+`px;
|
|
|
height: `+(yr-Ur)+"px"))}function en(br,Ur,bo){var yr=dn(He,br),Fo=yr.text.length,la,Va;function ga(Ra,mu){return Rl(re,Gt(br,Ra),"div",yr,mu)}function nu(Ra,mu,gl){var Ba=bc(re,yr,null,Ra),xs=mu=="ltr"==(gl=="after")?"left":"right",Sa=gl=="after"?Ba.begin:Ba.end-(/\s/.test(yr.text.charAt(Ba.end-1))?2:1);return ga(Sa,xs)[xs]}var Ml=tn(yr,He.direction);return Ke(Ml,Ur||0,bo==null?Fo:bo,function(Ra,mu,gl,Ba){var xs=gl=="ltr",Sa=ga(Ra,xs?"left":"right"),el=ga(mu-1,xs?"right":"left"),ml=Ur==null&&Ra==0,lc=bo==null&&mu==Fo,ma=Ba==0,Vu=!Ml||Ba==Ml.length-1;if(el.top-Sa.top<=3){var Ea=(Yt?ml:lc)&&ma,Ef=(Yt?lc:ml)&&Vu,Iu=Ea?It:(xs?Sa:el).left,vu=Ef?Nt:(xs?el:Sa).right;En(Iu,Sa.top,vu-Iu,Sa.bottom)}else{var iu,Js,tl,Hc;xs?(iu=Yt&&ml&&ma?It:Sa.left,Js=Yt?Nt:nu(Ra,gl,"before"),tl=Yt?It:nu(mu,gl,"after"),Hc=Yt&&lc&&Vu?Nt:el.right):(iu=Yt?nu(Ra,gl,"before"):It,Js=!Yt&&ml&&ma?Nt:Sa.right,tl=!Yt&&lc&&Vu?It:el.left,Hc=Yt?nu(mu,gl,"after"):Nt),En(iu,Sa.top,Js-iu,Sa.bottom),Sa.bottom<el.top&&En(It,Sa.bottom,null,el.top),En(tl,el.top,Hc-tl,el.bottom)}(!la||Wa(Sa,la)<0)&&(la=Sa),Wa(el,la)<0&&(la=el),(!Va||Wa(Sa,Va)<0)&&(Va=Sa),Wa(el,Va)<0&&(Va=el)}),{start:la,end:Va}}var Un=pe.from(),Fn=pe.to();if(Un.line==Fn.line)en(Un.line,Un.ch,Fn.ch);else{var vi=dn(He,Un.line),Pi=dn(He,Fn.line),ji=Qi(vi)==Qi(Pi),sr=en(Un.line,Un.ch,ji?vi.text.length+1:null).end,Br=en(Fn.line,ji?0:null,Fn.ch).start;ji&&(sr.top<Br.top-2?(En(sr.right,sr.top,null,sr.bottom),En(It,Br.top,Br.left,Br.bottom)):En(sr.right,sr.top,Br.left-sr.right,sr.bottom)),sr.bottom<Br.top&&En(It,sr.bottom,null,Br.top)}De.appendChild(lt)}function ps(re){if(re.state.focused){var pe=re.display;clearInterval(pe.blinker);var De=!0;pe.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?pe.blinker=setInterval(function(){re.hasFocus()||Rc(re),pe.cursorDiv.style.visibility=(De=!De)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(pe.cursorDiv.style.visibility="hidden")}}function us(re){re.state.focused||(re.display.input.focus(),Ro(re))}function Rs(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Rc(re))},100)}function Ro(re,pe){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(fn(re,"focus",re,pe),re.state.focused=!0,bt(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()),ps(re))}function Rc(re,pe){re.state.delayingBlurEvent||(re.state.focused&&(fn(re,"blur",re,pe),re.state.focused=!1,ke(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function zr(re){for(var pe=re.display,De=pe.lineDiv.offsetTop,Oe=0;Oe<pe.view.length;Oe++){var He=pe.view[Oe],lt=re.options.lineWrapping,wt=void 0,It=0;if(!He.hidden){if(Ce&&_e<8){var Nt=He.node.offsetTop+He.node.offsetHeight;wt=Nt-De,De=Nt}else{var Yt=He.node.getBoundingClientRect();wt=Yt.bottom-Yt.top,!lt&&He.text.firstChild&&(It=He.text.firstChild.getBoundingClientRect().right-Yt.left-1)}var En=He.line.height-wt;if((En>.005||En<-.005)&&(wn(He.line,wt),Ad(He.line),He.rest))for(var en=0;en<He.rest.length;en++)Ad(He.rest[en]);if(It>re.display.sizerWidth){var Un=Math.ceil(It/Wu(re.display));Un>re.display.maxLineLength&&(re.display.maxLineLength=Un,re.display.maxLine=He.line,re.display.maxLineChanged=!0)}}}}function Ad(re){if(re.widgets)for(var pe=0;pe<re.widgets.length;++pe){var De=re.widgets[pe],Oe=De.node.parentNode;Oe&&(De.height=Oe.offsetHeight)}}function Ho(re,pe,De){var Oe=De&&De.top!=null?Math.max(0,De.top):re.scroller.scrollTop;Oe=Math.floor(Oe-Ta(re));var He=De&&De.bottom!=null?De.bottom:Oe+re.wrapper.clientHeight,lt=$t(pe,Oe),wt=$t(pe,He);if(De&&De.ensure){var It=De.ensure.from.line,Nt=De.ensure.to.line;It<lt?(lt=It,wt=$t(pe,_o(dn(pe,It))+re.wrapper.clientHeight)):Math.min(Nt,pe.lastLine())>=wt&&(lt=$t(pe,_o(dn(pe,Nt))-re.wrapper.clientHeight),wt=Nt)}return{from:lt,to:Math.max(wt,lt+1)}}function Nd(re,pe){if(!Mn(re,"scrollCursorIntoView")){var De=re.display,Oe=De.sizer.getBoundingClientRect(),He=null;if(pe.top+Oe.top<0?He=!0:pe.bottom+Oe.top>(window.innerHeight||document.documentElement.clientHeight)&&(He=!1),He!=null&&!de){var lt=Ve("div","\u200B",null,`position: absolute;
|
|
|
top: `+(pe.top-De.viewOffset-Ta(re.display))+`px;
|
|
|
height: `+(pe.bottom-pe.top+Ua(re)+De.barHeight)+`px;
|
|
|
left: `+pe.left+"px; width: "+Math.max(2,pe.right-pe.left)+"px;");re.display.lineSpace.appendChild(lt),lt.scrollIntoView(He),re.display.lineSpace.removeChild(lt)}}}function ih(re,pe,De,Oe){Oe==null&&(Oe=0);var He;!re.options.lineWrapping&&pe==De&&(pe=pe.ch?Gt(pe.line,pe.sticky=="before"?pe.ch-1:pe.ch,"after"):pe,De=pe.sticky=="before"?Gt(pe.line,pe.ch+1,"before"):pe);for(var lt=0;lt<5;lt++){var wt=!1,It=Ds(re,pe),Nt=!De||De==pe?It:Ds(re,De);He={left:Math.min(It.left,Nt.left),top:Math.min(It.top,Nt.top)-Oe,right:Math.max(It.left,Nt.left),bottom:Math.max(It.bottom,Nt.bottom)+Oe};var Yt=Od(re,He),En=re.doc.scrollTop,en=re.doc.scrollLeft;if(Yt.scrollTop!=null&&(Au(re,Yt.scrollTop),Math.abs(re.doc.scrollTop-En)>1&&(wt=!0)),Yt.scrollLeft!=null&&(cu(re,Yt.scrollLeft),Math.abs(re.doc.scrollLeft-en)>1&&(wt=!0)),!wt)break}return He}function rh(re,pe){var De=Od(re,pe);De.scrollTop!=null&&Au(re,De.scrollTop),De.scrollLeft!=null&&cu(re,De.scrollLeft)}function Od(re,pe){var De=re.display,Oe=Tu(re.display);pe.top<0&&(pe.top=0);var He=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:De.scroller.scrollTop,lt=Uu(re),wt={};pe.bottom-pe.top>lt&&(pe.bottom=pe.top+lt);var It=re.doc.height+$l(De),Nt=pe.top<Oe,Yt=pe.bottom>It-Oe;if(pe.top<He)wt.scrollTop=Nt?0:pe.top;else if(pe.bottom>He+lt){var En=Math.min(pe.top,(Yt?It:pe.bottom)-lt);En!=He&&(wt.scrollTop=En)}var en=re.options.fixedGutter?0:De.gutters.offsetWidth,Un=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:De.scroller.scrollLeft-en,Fn=Ga(re)-De.gutters.offsetWidth,vi=pe.right-pe.left>Fn;return vi&&(pe.right=pe.left+Fn),pe.left<10?wt.scrollLeft=0:pe.left<Un?wt.scrollLeft=Math.max(0,pe.left+en-(vi?0:10)):pe.right>Fn+Un-3&&(wt.scrollLeft=pe.right+(vi?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 oo(re,pe,De){(pe!=null||De!=null)&&ku(re),pe!=null&&(re.curOp.scrollLeft=pe),De!=null&&(re.curOp.scrollTop=De)}function es(re,pe){ku(re),re.curOp.scrollToPos=pe}function ku(re){var pe=re.curOp.scrollToPos;if(pe){re.curOp.scrollToPos=null;var De=xh(re,pe.from),Oe=xh(re,pe.to);qh(re,De,Oe,pe.margin)}}function qh(re,pe,De,Oe){var He=Od(re,{left:Math.min(pe.left,De.left),top:Math.min(pe.top,De.top)-Oe,right:Math.max(pe.right,De.right),bottom:Math.max(pe.bottom,De.bottom)+Oe});oo(re,He.scrollLeft,He.scrollTop)}function Au(re,pe){Math.abs(re.doc.scrollTop-pe)<2||(Le||mi(re,{top:pe}),ed(re,pe,!0),Le&&mi(re),vn(re,100))}function ed(re,pe,De){pe=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,pe)),!(re.display.scroller.scrollTop==pe&&!De)&&(re.doc.scrollTop=pe,re.display.scrollbars.setScrollTop(pe),re.display.scroller.scrollTop!=pe&&(re.display.scroller.scrollTop=pe))}function cu(re,pe,De,Oe){pe=Math.max(0,Math.min(pe,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((De?pe==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-pe)<2)&&!Oe)&&(re.doc.scrollLeft=pe,Zi(re),re.display.scroller.scrollLeft!=pe&&(re.display.scroller.scrollLeft=pe),re.display.scrollbars.setScrollLeft(pe))}function Bl(re){var pe=re.display,De=pe.gutters.offsetWidth,Oe=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?De:0,docHeight:Oe,scrollHeight:Oe+Ua(re)+pe.barHeight,nativeBarWidth:pe.nativeBarWidth,gutterWidth:De}}var hs=function(re,pe,De){this.cm=De;var Oe=this.vert=Ve("div",[Ve("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),He=this.horiz=Ve("div",[Ve("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Oe.tabIndex=He.tabIndex=-1,re(Oe),re(He),Jt(Oe,"scroll",function(){Oe.clientHeight&&pe(Oe.scrollTop,"vertical")}),Jt(He,"scroll",function(){He.clientWidth&&pe(He.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ce&&_e<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};hs.prototype.update=function(re){var pe=re.scrollWidth>re.clientWidth+1,De=re.scrollHeight>re.clientHeight+1,Oe=re.nativeBarWidth;if(De){this.vert.style.display="block",this.vert.style.bottom=pe?Oe+"px":"0";var He=re.viewHeight-(pe?Oe:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+He)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(pe){this.horiz.style.display="block",this.horiz.style.right=De?Oe+"px":"0",this.horiz.style.left=re.barLeft+"px";var lt=re.viewWidth-re.barLeft-(De?Oe:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+lt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(Oe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:De?Oe:0,bottom:pe?Oe:0}},hs.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},hs.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},hs.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 it,this.disableVert=new it},hs.prototype.enableZeroWidthBar=function(re,pe,De){re.style.pointerEvents="auto";function Oe(){var He=re.getBoundingClientRect(),lt=De=="vert"?document.elementFromPoint(He.right-1,(He.top+He.bottom)/2):document.elementFromPoint((He.right+He.left)/2,He.bottom-1);lt!=re?re.style.pointerEvents="none":pe.set(1e3,Oe)}pe.set(1e3,Oe)},hs.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Bs=function(){};Bs.prototype.update=function(){return{bottom:0,right:0}},Bs.prototype.setScrollLeft=function(){},Bs.prototype.setScrollTop=function(){},Bs.prototype.clear=function(){};function rc(re,pe){pe||(pe=Bl(re));var De=re.display.barWidth,Oe=re.display.barHeight;qa(re,pe);for(var He=0;He<4&&De!=re.display.barWidth||Oe!=re.display.barHeight;He++)De!=re.display.barWidth&&re.options.lineWrapping&&zr(re),qa(re,Bl(re)),De=re.display.barWidth,Oe=re.display.barHeight}function qa(re,pe){var De=re.display,Oe=De.scrollbars.update(pe);De.sizer.style.paddingRight=(De.barWidth=Oe.right)+"px",De.sizer.style.paddingBottom=(De.barHeight=Oe.bottom)+"px",De.heightForcer.style.borderBottom=Oe.bottom+"px solid transparent",Oe.right&&Oe.bottom?(De.scrollbarFiller.style.display="block",De.scrollbarFiller.style.height=Oe.bottom+"px",De.scrollbarFiller.style.width=Oe.right+"px"):De.scrollbarFiller.style.display="",Oe.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(De.gutterFiller.style.display="block",De.gutterFiller.style.height=Oe.bottom+"px",De.gutterFiller.style.width=pe.gutterWidth+"px"):De.gutterFiller.style.display=""}var Id={native:hs,null:Bs};function td(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&ke(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),Jt(pe,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),pe.setAttribute("cm-not-content","true")},function(pe,De){De=="horizontal"?cu(re,pe):Au(re,pe)},re),re.display.scrollbars.addClass&&bt(re.display.wrapper,re.display.scrollbars.addClass)}var Dd=0;function ka(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},na(re.curOp)}function oc(re){var pe=re.curOp;pe&&io(pe,function(De){for(var Oe=0;Oe<De.ops.length;Oe++)De.ops[Oe].cm.curOp=null;gf(De)})}function gf(re){for(var pe=re.ops,De=0;De<pe.length;De++)Dt(pe[De]);for(var Oe=0;Oe<pe.length;Oe++)zt(pe[Oe]);for(var He=0;He<pe.length;He++)ln(pe[He]);for(var lt=0;lt<pe.length;lt++)pt(pe[lt]);for(var wt=0;wt<pe.length;wt++)_t(pe[wt])}function Dt(re){var pe=re.cm,De=pe.display;jn(pe),re.updateMaxLine&&Eo(pe),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<De.viewFrom||re.scrollToPos.to.line>=De.viewTo)||De.maxLineChanged&&pe.options.lineWrapping,re.update=re.mustUpdate&&new Cn(pe,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function zt(re){re.updatedDisplay=re.mustUpdate&&xi(re.cm,re.update)}function ln(re){var pe=re.cm,De=pe.display;re.updatedDisplay&&zr(pe),re.barMeasure=Bl(pe),De.maxLineChanged&&!pe.options.lineWrapping&&(re.adjustWidthTo=Sc(pe,De.maxLine,De.maxLine.text.length).left+3,pe.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(De.scroller.clientWidth,De.sizer.offsetLeft+re.adjustWidthTo+Ua(pe)+pe.display.barWidth),re.maxScrollLeft=Math.max(0,De.sizer.offsetLeft+re.adjustWidthTo-Ga(pe))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=De.input.prepareSelection())}function pt(re){var pe=re.cm;re.adjustWidthTo!=null&&(pe.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<pe.doc.scrollLeft&&cu(pe,Math.min(pe.display.scroller.scrollLeft,re.maxScrollLeft),!0),pe.display.maxLineChanged=!1);var De=re.focus&&re.focus==ut();re.preparedSelection&&pe.display.input.showSelection(re.preparedSelection,De),(re.updatedDisplay||re.startHeight!=pe.doc.height)&&rc(pe,re.barMeasure),re.updatedDisplay&&Di(pe,re.barMeasure),re.selectionChanged&&ps(pe),pe.state.focused&&re.updateInput&&pe.display.input.reset(re.typing),De&&us(re.cm)}function _t(re){var pe=re.cm,De=pe.display,Oe=pe.doc;if(re.updatedDisplay&&Vn(pe,re.update),De.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(De.wheelStartX=De.wheelStartY=null),re.scrollTop!=null&&ed(pe,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&cu(pe,re.scrollLeft,!0,!0),re.scrollToPos){var He=ih(pe,Dn(Oe,re.scrollToPos.from),Dn(Oe,re.scrollToPos.to),re.scrollToPos.margin);Nd(pe,He)}var lt=re.maybeHiddenMarkers,wt=re.maybeUnhiddenMarkers;if(lt)for(var It=0;It<lt.length;++It)lt[It].lines.length||fn(lt[It],"hide");if(wt)for(var Nt=0;Nt<wt.length;++Nt)wt[Nt].lines.length&&fn(wt[Nt],"unhide");De.wrapper.offsetHeight&&(Oe.scrollTop=pe.display.scroller.scrollTop),re.changeObjs&&fn(pe,"changes",pe,re.changeObjs),re.update&&re.update.finish()}function Lt(re,pe){if(re.curOp)return pe();ka(re);try{return pe()}finally{oc(re)}}function Sn(re,pe){return function(){if(re.curOp)return pe.apply(re,arguments);ka(re);try{return pe.apply(re,arguments)}finally{oc(re)}}}function hn(re){return function(){if(this.curOp)return re.apply(this,arguments);ka(this);try{return re.apply(this,arguments)}finally{oc(this)}}}function on(re){return function(){var pe=this.cm;if(!pe||pe.curOp)return re.apply(this,arguments);ka(pe);try{return re.apply(this,arguments)}finally{oc(pe)}}}function vn(re,pe){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(pe,ct(yn,re))}function yn(re){var pe=re.doc;if(!(pe.highlightFrontier>=re.display.viewTo)){var De=+new Date+re.options.workTime,Oe=Ai(re,pe.highlightFrontier),He=[];pe.iter(Oe.line,Math.min(pe.first+pe.size,re.display.viewTo+500),function(lt){if(Oe.line>=re.display.viewFrom){var wt=lt.styles,It=lt.text.length>re.options.maxHighlightLength?Pt(pe.mode,Oe.state):null,Nt=Bi(re,lt,Oe,!0);It&&(Oe.state=It),lt.styles=Nt.styles;var Yt=lt.styleClasses,En=Nt.classes;En?lt.styleClasses=En:Yt&&(lt.styleClasses=null);for(var en=!wt||wt.length!=lt.styles.length||Yt!=En&&(!Yt||!En||Yt.bgClass!=En.bgClass||Yt.textClass!=En.textClass),Un=0;!en&&Un<wt.length;++Un)en=wt[Un]!=lt.styles[Un];en&&He.push(Oe.line),lt.stateAfter=Oe.save(),Oe.nextLine()}else lt.text.length<=re.options.maxHighlightLength&&an(re,lt.text,Oe),lt.stateAfter=Oe.line%5==0?Oe.save():null,Oe.nextLine();if(+new Date>De)return vn(re,re.options.workDelay),!0}),pe.highlightFrontier=Oe.line,pe.modeFrontier=Math.max(pe.modeFrontier,Oe.line),He.length&&Lt(re,function(){for(var lt=0;lt<He.length;lt++)wo(re,He[lt],"text")})}}var Cn=function(re,pe,De){var Oe=re.display;this.viewport=pe,this.visible=Ho(Oe,re.doc,pe),this.editorIsHidden=!Oe.wrapper.offsetWidth,this.wrapperHeight=Oe.wrapper.clientHeight,this.wrapperWidth=Oe.wrapper.clientWidth,this.oldDisplayWidth=Ga(re),this.force=De,this.dims=bh(re),this.events=[]};Cn.prototype.signal=function(re,pe){Tn(re,pe)&&this.events.push(arguments)},Cn.prototype.finish=function(){for(var re=0;re<this.events.length;re++)fn.apply(null,this.events[re])};function jn(re){var pe=re.display;!pe.scrollbarsClipped&&pe.scroller.offsetWidth&&(pe.nativeBarWidth=pe.scroller.offsetWidth-pe.scroller.clientWidth,pe.heightForcer.style.height=Ua(re)+"px",pe.sizer.style.marginBottom=-pe.nativeBarWidth+"px",pe.sizer.style.borderRightWidth=Ua(re)+"px",pe.scrollbarsClipped=!0)}function ti(re){if(re.hasFocus())return null;var pe=ut();if(!pe||!gt(re.display.lineDiv,pe))return null;var De={activeElt:pe};if(window.getSelection){var Oe=window.getSelection();Oe.anchorNode&&Oe.extend&>(re.display.lineDiv,Oe.anchorNode)&&(De.anchorNode=Oe.anchorNode,De.anchorOffset=Oe.anchorOffset,De.focusNode=Oe.focusNode,De.focusOffset=Oe.focusOffset)}return De}function Kn(re){if(!(!re||!re.activeElt||re.activeElt==ut())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&>(document.body,re.anchorNode)&>(document.body,re.focusNode))){var pe=window.getSelection(),De=document.createRange();De.setEnd(re.anchorNode,re.anchorOffset),De.collapse(!1),pe.removeAllRanges(),pe.addRange(De),pe.extend(re.focusNode,re.focusOffset)}}function xi(re,pe){var De=re.display,Oe=re.doc;if(pe.editorIsHidden)return fa(re),!1;if(!pe.force&&pe.visible.from>=De.viewFrom&&pe.visible.to<=De.viewTo&&(De.updateLineNumbers==null||De.updateLineNumbers>=De.viewTo)&&De.renderedView==De.view&&Cl(re)==0)return!1;Oi(re)&&(fa(re),pe.dims=bh(re));var He=Oe.first+Oe.size,lt=Math.max(pe.visible.from-re.options.viewportMargin,Oe.first),wt=Math.min(He,pe.visible.to+re.options.viewportMargin);De.viewFrom<lt&<-De.viewFrom<20&&(lt=Math.max(Oe.first,De.viewFrom)),De.viewTo>wt&&De.viewTo-wt<20&&(wt=Math.min(He,De.viewTo)),On&&(lt=Ui(re.doc,lt),wt=qi(re.doc,wt));var It=lt!=De.viewFrom||wt!=De.viewTo||De.lastWrapHeight!=pe.wrapperHeight||De.lastWrapWidth!=pe.wrapperWidth;ss(re,lt,wt),De.viewOffset=_o(dn(re.doc,De.viewFrom)),re.display.mover.style.top=De.viewOffset+"px";var Nt=Cl(re);if(!It&&Nt==0&&!pe.force&&De.renderedView==De.view&&(De.updateLineNumbers==null||De.updateLineNumbers>=De.viewTo))return!1;var Yt=ti(re);return Nt>4&&(De.lineDiv.style.display="none"),li(re,De.updateLineNumbers,pe.dims),Nt>4&&(De.lineDiv.style.display=""),De.renderedView=De.view,Kn(Yt),Ne(De.cursorDiv),Ne(De.selectionDiv),De.gutters.style.height=De.sizer.style.minHeight=0,It&&(De.lastWrapHeight=pe.wrapperHeight,De.lastWrapWidth=pe.wrapperWidth,vn(re,400)),De.updateLineNumbers=null,!0}function Vn(re,pe){for(var De=pe.viewport,Oe=!0;;Oe=!1){if(!Oe||!re.options.lineWrapping||pe.oldDisplayWidth==Ga(re)){if(De&&De.top!=null&&(De={top:Math.min(re.doc.height+$l(re.display)-Uu(re),De.top)}),pe.visible=Ho(re.display,re.doc,De),pe.visible.from>=re.display.viewFrom&&pe.visible.to<=re.display.viewTo)break}else Oe&&(pe.visible=Ho(re.display,re.doc,De));if(!xi(re,pe))break;zr(re);var He=Bl(re);Ca(re),rc(re,He),Di(re,He),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 mi(re,pe){var De=new Cn(re,pe);if(xi(re,De)){zr(re),Vn(re,De);var Oe=Bl(re);Ca(re),rc(re,Oe),Di(re,Oe),De.finish()}}function li(re,pe,De){var Oe=re.display,He=re.options.lineNumbers,lt=Oe.lineDiv,wt=lt.firstChild;function It(vi){var Pi=vi.nextSibling;return he&&oe&&re.display.currentWheelTarget==vi?vi.style.display="none":vi.parentNode.removeChild(vi),Pi}for(var Nt=Oe.view,Yt=Oe.viewFrom,En=0;En<Nt.length;En++){var en=Nt[En];if(!en.hidden)if(!en.node||en.node.parentNode!=lt){var Un=wl(re,en,Yt,De);lt.insertBefore(Un,wt)}else{for(;wt!=en.node;)wt=It(wt);var Fn=He&&pe!=null&&pe<=Yt&&en.lineNumber;en.changes&&(dt(en.changes,"gutter")>-1&&(Fn=!1),Ms(re,en,Yt,De)),Fn&&(Ne(en.lineNumber),en.lineNumber.appendChild(document.createTextNode(An(re.options,Yt)))),wt=en.node.nextSibling}Yt+=en.size}for(;wt;)wt=It(wt)}function Ri(re){var pe=re.gutters.offsetWidth;re.sizer.style.marginLeft=pe+"px"}function Di(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+Ua(re)+"px"}function Zi(re){var pe=re.display,De=pe.view;if(!(!pe.alignWidgets&&(!pe.gutters.firstChild||!re.options.fixedGutter))){for(var Oe=Cc(pe)-pe.scroller.scrollLeft+re.doc.scrollLeft,He=pe.gutters.offsetWidth,lt=Oe+"px",wt=0;wt<De.length;wt++)if(!De[wt].hidden){re.options.fixedGutter&&(De[wt].gutter&&(De[wt].gutter.style.left=lt),De[wt].gutterBackground&&(De[wt].gutterBackground.style.left=lt));var It=De[wt].alignable;if(It)for(var Nt=0;Nt<It.length;Nt++)It[Nt].style.left=lt}re.options.fixedGutter&&(pe.gutters.style.left=Oe+He+"px")}}function Oi(re){if(!re.options.lineNumbers)return!1;var pe=re.doc,De=An(re.options,pe.first+pe.size-1),Oe=re.display;if(De.length!=Oe.lineNumChars){var He=Oe.measure.appendChild(Ve("div",[Ve("div",De)],"CodeMirror-linenumber CodeMirror-gutter-elt")),lt=He.firstChild.offsetWidth,wt=He.offsetWidth-lt;return Oe.lineGutter.style.width="",Oe.lineNumInnerWidth=Math.max(lt,Oe.lineGutter.offsetWidth-wt)+1,Oe.lineNumWidth=Oe.lineNumInnerWidth+wt,Oe.lineNumChars=Oe.lineNumInnerWidth?De.length:-1,Oe.lineGutter.style.width=Oe.lineNumWidth+"px",Ri(re.display),!0}return!1}function Ii(re,pe){for(var De=[],Oe=!1,He=0;He<re.length;He++){var lt=re[He],wt=null;if(typeof lt!="string"&&(wt=lt.style,lt=lt.className),lt=="CodeMirror-linenumbers")if(pe)Oe=!0;else continue;De.push({className:lt,style:wt})}return pe&&!Oe&&De.push({className:"CodeMirror-linenumbers",style:null}),De}function ar(re){var pe=re.gutters,De=re.gutterSpecs;Ne(pe),re.lineGutter=null;for(var Oe=0;Oe<De.length;++Oe){var He=De[Oe],lt=He.className,wt=He.style,It=pe.appendChild(Ve("div",null,"CodeMirror-gutter "+lt));wt&&(It.style.cssText=wt),lt=="CodeMirror-linenumbers"&&(re.lineGutter=It,It.style.width=(re.lineNumWidth||1)+"px")}pe.style.display=De.length?"":"none",Ri(re)}function ei(re){ar(re.display),Ps(re),Zi(re)}function Hi(re,pe,De,Oe){var He=this;this.input=De,He.scrollbarFiller=Ve("div",null,"CodeMirror-scrollbar-filler"),He.scrollbarFiller.setAttribute("cm-not-content","true"),He.gutterFiller=Ve("div",null,"CodeMirror-gutter-filler"),He.gutterFiller.setAttribute("cm-not-content","true"),He.lineDiv=Je("div",null,"CodeMirror-code"),He.selectionDiv=Ve("div",null,null,"position: relative; z-index: 1"),He.cursorDiv=Ve("div",null,"CodeMirror-cursors"),He.measure=Ve("div",null,"CodeMirror-measure"),He.lineMeasure=Ve("div",null,"CodeMirror-measure"),He.lineSpace=Je("div",[He.measure,He.lineMeasure,He.selectionDiv,He.cursorDiv,He.lineDiv],null,"position: relative; outline: none");var lt=Je("div",[He.lineSpace],"CodeMirror-lines");He.mover=Ve("div",[lt],null,"position: relative"),He.sizer=Ve("div",[He.mover],"CodeMirror-sizer"),He.sizerWidth=null,He.heightForcer=Ve("div",null,null,"position: absolute; height: "+yt+"px; width: 1px;"),He.gutters=Ve("div",null,"CodeMirror-gutters"),He.lineGutter=null,He.scroller=Ve("div",[He.sizer,He.heightForcer,He.gutters],"CodeMirror-scroll"),He.scroller.setAttribute("tabIndex","-1"),He.wrapper=Ve("div",[He.scrollbarFiller,He.gutterFiller,He.scroller],"CodeMirror"),Ce&&_e<8&&(He.gutters.style.zIndex=-1,He.scroller.style.paddingRight=0),!he&&!(Le&&ee)&&(He.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(He.wrapper):re(He.wrapper)),He.viewFrom=He.viewTo=pe.first,He.reportedViewFrom=He.reportedViewTo=pe.first,He.view=[],He.renderedView=null,He.externalMeasured=null,He.viewOffset=0,He.lastWrapHeight=He.lastWrapWidth=0,He.updateLineNumbers=null,He.nativeBarWidth=He.barHeight=He.barWidth=0,He.scrollbarsClipped=!1,He.lineNumWidth=He.lineNumInnerWidth=He.lineNumChars=null,He.alignWidgets=!1,He.cachedCharWidth=He.cachedTextHeight=He.cachedPaddingH=null,He.maxLine=null,He.maxLineLength=0,He.maxLineChanged=!1,He.wheelDX=He.wheelDY=He.wheelStartX=He.wheelStartY=null,He.shift=!1,He.selForContextMenu=null,He.activeTouch=null,He.gutterSpecs=Ii(Oe.gutters,Oe.lineNumbers),ar(He),De.init(He)}var Li=0,bi=null;Ce?bi=-.53:Le?bi=15:xe?bi=-.7:ce&&(bi=-1/3);function Xi(re){var pe=re.wheelDeltaX,De=re.wheelDeltaY;return pe==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(pe=re.detail),De==null&&re.detail&&re.axis==re.VERTICAL_AXIS?De=re.detail:De==null&&(De=re.wheelDelta),{x:pe,y:De}}function gi(re){var pe=Xi(re);return pe.x*=bi,pe.y*=bi,pe}function ur(re,pe){var De=Xi(pe),Oe=De.x,He=De.y,lt=re.display,wt=lt.scroller,It=wt.scrollWidth>wt.clientWidth,Nt=wt.scrollHeight>wt.clientHeight;if(Oe&&It||He&&Nt){if(He&&oe&&he){e:for(var Yt=pe.target,En=lt.view;Yt!=wt;Yt=Yt.parentNode)for(var en=0;en<En.length;en++)if(En[en].node==Yt){re.display.currentWheelTarget=Yt;break e}}if(Oe&&!Le&&!ge&&bi!=null){He&&Nt&&Au(re,Math.max(0,wt.scrollTop+He*bi)),cu(re,Math.max(0,wt.scrollLeft+Oe*bi)),(!He||He&&Nt)&&ai(pe),lt.wheelStartX=null;return}if(He&&bi!=null){var Un=He*bi,Fn=re.doc.scrollTop,vi=Fn+lt.wrapper.clientHeight;Un<0?Fn=Math.max(0,Fn+Un-50):vi=Math.min(re.doc.height,vi+Un+50),mi(re,{top:Fn,bottom:vi})}Li<20&&(lt.wheelStartX==null?(lt.wheelStartX=wt.scrollLeft,lt.wheelStartY=wt.scrollTop,lt.wheelDX=Oe,lt.wheelDY=He,setTimeout(function(){if(lt.wheelStartX!=null){var Pi=wt.scrollLeft-lt.wheelStartX,ji=wt.scrollTop-lt.wheelStartY,sr=ji&<.wheelDY&&ji/lt.wheelDY||Pi&<.wheelDX&&Pi/lt.wheelDX;lt.wheelStartX=lt.wheelStartY=null,sr&&(bi=(bi*Li+sr)/(Li+1),++Li)}},200)):(lt.wheelDX+=Oe,lt.wheelDY+=He))}}var Ji=function(re,pe){this.ranges=re,this.primIndex=pe};Ji.prototype.primary=function(){return this.ranges[this.primIndex]},Ji.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 De=this.ranges[pe],Oe=re.ranges[pe];if(!Bn(De.anchor,Oe.anchor)||!Bn(De.head,Oe.head))return!1}return!0},Ji.prototype.deepCopy=function(){for(var re=[],pe=0;pe<this.ranges.length;pe++)re[pe]=new _i(Nn(this.ranges[pe].anchor),Nn(this.ranges[pe].head));return new Ji(re,this.primIndex)},Ji.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},Ji.prototype.contains=function(re,pe){pe||(pe=re);for(var De=0;De<this.ranges.length;De++){var Oe=this.ranges[De];if(sn(pe,Oe.from())>=0&&sn(re,Oe.to())<=0)return De}return-1};var _i=function(re,pe){this.anchor=re,this.head=pe};_i.prototype.from=function(){return Gn(this.anchor,this.head)},_i.prototype.to=function(){return qn(this.anchor,this.head)},_i.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Vi(re,pe,De){var Oe=re&&re.options.selectionsMayTouch,He=pe[De];pe.sort(function(Un,Fn){return sn(Un.from(),Fn.from())}),De=dt(pe,He);for(var lt=1;lt<pe.length;lt++){var wt=pe[lt],It=pe[lt-1],Nt=sn(It.to(),wt.from());if(Oe&&!wt.empty()?Nt>0:Nt>=0){var Yt=Gn(It.from(),wt.from()),En=qn(It.to(),wt.to()),en=It.empty()?wt.from()==wt.head:It.from()==It.head;lt<=De&&--De,pe.splice(--lt,2,new _i(en?En:Yt,en?Yt:En))}}return new Ji(pe,De)}function mr(re,pe){return new Ji([new _i(re,pe||re)],0)}function ir(re){return re.text?Gt(re.from.line+re.text.length-1,Ut(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function So(re,pe){if(sn(re,pe.from)<0)return re;if(sn(re,pe.to)<=0)return ir(pe);var De=re.line+pe.text.length-(pe.to.line-pe.from.line)-1,Oe=re.ch;return re.line==pe.to.line&&(Oe+=ir(pe).ch-pe.to.ch),Gt(De,Oe)}function Lo(re,pe){for(var De=[],Oe=0;Oe<re.sel.ranges.length;Oe++){var He=re.sel.ranges[Oe];De.push(new _i(So(He.anchor,pe),So(He.head,pe)))}return Vi(re.cm,De,re.sel.primIndex)}function ts(re,pe,De){return re.line==pe.line?Gt(De.line,re.ch-pe.ch+De.ch):Gt(De.line+(re.line-pe.line),re.ch)}function ao(re,pe,De){for(var Oe=[],He=Gt(re.first,0),lt=He,wt=0;wt<pe.length;wt++){var It=pe[wt],Nt=ts(It.from,He,lt),Yt=ts(ir(It),He,lt);if(He=It.to,lt=Yt,De=="around"){var En=re.sel.ranges[wt],en=sn(En.head,En.anchor)<0;Oe[wt]=new _i(en?Yt:Nt,en?Nt:Yt)}else Oe[wt]=new _i(Nt,Nt)}return new Ji(Oe,re.sel.primIndex)}function Nr(re){re.doc.mode=$e(re.options,re.doc.modeOption),No(re)}function No(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,vn(re,100),re.state.modeGen++,re.curOp&&Ps(re)}function Ir(re,pe){return pe.from.ch==0&&pe.to.ch==0&&Ut(pe.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function Vr(re,pe,De,Oe){function He(Br){return De?De[Br]:null}function lt(Br,br,Ur){ms(Br,br,Ur,Oe),Ei(Br,"change",Br,pe)}function wt(Br,br){for(var Ur=[],bo=Br;bo<br;++bo)Ur.push(new rs(Yt[bo],He(bo),Oe));return Ur}var It=pe.from,Nt=pe.to,Yt=pe.text,En=dn(re,It.line),en=dn(re,Nt.line),Un=Ut(Yt),Fn=He(Yt.length-1),vi=Nt.line-It.line;if(pe.full)re.insert(0,wt(0,Yt.length)),re.remove(Yt.length,re.size-Yt.length);else if(Ir(re,pe)){var Pi=wt(0,Yt.length-1);lt(en,en.text,Fn),vi&&re.remove(It.line,vi),Pi.length&&re.insert(It.line,Pi)}else if(En==en)if(Yt.length==1)lt(En,En.text.slice(0,It.ch)+Un+En.text.slice(Nt.ch),Fn);else{var ji=wt(1,Yt.length-1);ji.push(new rs(Un+En.text.slice(Nt.ch),Fn,Oe)),lt(En,En.text.slice(0,It.ch)+Yt[0],He(0)),re.insert(It.line+1,ji)}else if(Yt.length==1)lt(En,En.text.slice(0,It.ch)+Yt[0]+en.text.slice(Nt.ch),He(0)),re.remove(It.line+1,vi);else{lt(En,En.text.slice(0,It.ch)+Yt[0],He(0)),lt(en,Un+en.text.slice(Nt.ch),Fn);var sr=wt(1,Yt.length-1);vi>1&&re.remove(It.line+1,vi-1),re.insert(It.line+1,sr)}Ei(re,"change",re,pe)}function ns(re,pe,De){function Oe(He,lt,wt){if(He.linked)for(var It=0;It<He.linked.length;++It){var Nt=He.linked[It];if(Nt.doc!=lt){var Yt=wt&&Nt.sharedHist;De&&!Yt||(pe(Nt.doc,Yt),Oe(Nt.doc,He,Yt))}}}Oe(re,null,!0)}function Hr(re,pe){if(pe.cm)throw new Error("This document is already in use.");re.doc=pe,pe.cm=re,Wr(re),Nr(re),kr(re),re.options.lineWrapping||Eo(re),re.options.mode=pe.modeOption,Ps(re)}function kr(re){(re.doc.direction=="rtl"?bt:ke)(re.display.lineDiv,"CodeMirror-rtl")}function $r(re){Lt(re,function(){kr(re),Ps(re)})}function Lr(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 lo(re,pe){var De={from:Nn(pe.from),to:ir(pe),text:_n(re,pe.from,pe.to)};return Cs(re,De,pe.from.line,pe.to.line+1),ns(re,function(Oe){return Cs(Oe,De,pe.from.line,pe.to.line+1)},!0),De}function Ar(re){for(;re.length;){var pe=Ut(re);if(pe.ranges)re.pop();else break}}function po(re,pe){if(pe)return Ar(re.done),Ut(re.done);if(re.done.length&&!Ut(re.done).ranges)return Ut(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),Ut(re.done)}function Uo(re,pe,De,Oe){var He=re.history;He.undone.length=0;var lt=+new Date,wt,It;if((He.lastOp==Oe||He.lastOrigin==pe.origin&&pe.origin&&(pe.origin.charAt(0)=="+"&&He.lastModTime>lt-(re.cm?re.cm.options.historyEventDelay:500)||pe.origin.charAt(0)=="*"))&&(wt=po(He,He.lastOp==Oe)))It=Ut(wt.changes),sn(pe.from,pe.to)==0&&sn(pe.from,It.to)==0?It.to=ir(pe):wt.changes.push(lo(re,pe));else{var Nt=Ut(He.done);for((!Nt||!Nt.ranges)&&Io(re.sel,He.done),wt={changes:[lo(re,pe)],generation:He.generation},He.done.push(wt);He.done.length>He.undoDepth;)He.done.shift(),He.done[0].ranges||He.done.shift()}He.done.push(De),He.generation=++He.maxGeneration,He.lastModTime=He.lastSelTime=lt,He.lastOp=He.lastSelOp=Oe,He.lastOrigin=He.lastSelOrigin=pe.origin,It||fn(re,"historyAdded")}function Go(re,pe,De,Oe){var He=pe.charAt(0);return He=="*"||He=="+"&&De.ranges.length==Oe.ranges.length&&De.somethingSelected()==Oe.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function Yr(re,pe,De,Oe){var He=re.history,lt=Oe&&Oe.origin;De==He.lastSelOp||lt&&He.lastSelOrigin==lt&&(He.lastModTime==He.lastSelTime&&He.lastOrigin==lt||Go(re,lt,Ut(He.done),pe))?He.done[He.done.length-1]=pe:Io(pe,He.done),He.lastSelTime=+new Date,He.lastSelOrigin=lt,He.lastSelOp=De,Oe&&Oe.clearRedo!==!1&&Ar(He.undone)}function Io(re,pe){var De=Ut(pe);De&&De.ranges&&De.equals(re)||pe.push(re)}function Cs(re,pe,De,Oe){var He=pe["spans_"+re.id],lt=0;re.iter(Math.max(re.first,De),Math.min(re.first+re.size,Oe),function(wt){wt.markedSpans&&((He||(He=pe["spans_"+re.id]={}))[lt]=wt.markedSpans),++lt})}function To(re){if(!re)return null;for(var pe,De=0;De<re.length;++De)re[De].marker.explicitlyCleared?pe||(pe=re.slice(0,De)):pe&&pe.push(re[De]);return pe?pe.length?pe:null:re}function Yo(re,pe){var De=pe["spans_"+re.id];if(!De)return null;for(var Oe=[],He=0;He<pe.text.length;++He)Oe.push(To(De[He]));return Oe}function ys(re,pe){var De=Yo(re,pe),Oe=er(re,pe);if(!De)return Oe;if(!Oe)return De;for(var He=0;He<De.length;++He){var lt=De[He],wt=Oe[He];if(lt&&wt)e:for(var It=0;It<wt.length;++It){for(var Nt=wt[It],Yt=0;Yt<lt.length;++Yt)if(lt[Yt].marker==Nt.marker)continue e;lt.push(Nt)}else wt&&(De[He]=wt)}return De}function Ys(re,pe,De){for(var Oe=[],He=0;He<re.length;++He){var lt=re[He];if(lt.ranges){Oe.push(De?Ji.prototype.deepCopy.call(lt):lt);continue}var wt=lt.changes,It=[];Oe.push({changes:It});for(var Nt=0;Nt<wt.length;++Nt){var Yt=wt[Nt],En=void 0;if(It.push({from:Yt.from,to:Yt.to,text:Yt.text}),pe)for(var en in Yt)(En=en.match(/^spans_(\d+)$/))&&dt(pe,Number(En[1]))>-1&&(Ut(It)[en]=Yt[en],delete Yt[en])}}return Oe}function _l(re,pe,De,Oe){if(Oe){var He=re.anchor;if(De){var lt=sn(pe,He)<0;lt!=sn(De,He)<0?(He=pe,pe=De):lt!=sn(pe,De)<0&&(pe=De)}return new _i(He,pe)}else return new _i(De||pe,pe)}function Xo(re,pe,De,Oe,He){He==null&&(He=re.cm&&(re.cm.display.shift||re.extend)),ks(re,new Ji([_l(re.sel.primary(),pe,De,He)],0),Oe)}function Jo(re,pe,De){for(var Oe=[],He=re.cm&&(re.cm.display.shift||re.extend),lt=0;lt<re.sel.ranges.length;lt++)Oe[lt]=_l(re.sel.ranges[lt],pe[lt],null,He);var wt=Vi(re.cm,Oe,re.sel.primIndex);ks(re,wt,De)}function Ss(re,pe,De,Oe){var He=re.sel.ranges.slice(0);He[pe]=De,ks(re,Vi(re.cm,He,re.sel.primIndex),Oe)}function Es(re,pe,De,Oe){ks(re,mr(pe,De),Oe)}function pa(re,pe,De){var Oe={ranges:pe.ranges,update:function(He){this.ranges=[];for(var lt=0;lt<He.length;lt++)this.ranges[lt]=new _i(Dn(re,He[lt].anchor),Dn(re,He[lt].head))},origin:De&&De.origin};return fn(re,"beforeSelectionChange",re,Oe),re.cm&&fn(re.cm,"beforeSelectionChange",re.cm,Oe),Oe.ranges!=pe.ranges?Vi(re.cm,Oe.ranges,Oe.ranges.length-1):pe}function Bo(re,pe,De){var Oe=re.history.done,He=Ut(Oe);He&&He.ranges?(Oe[Oe.length-1]=pe,_a(re,pe,De)):ks(re,pe,De)}function ks(re,pe,De){_a(re,pe,De),Yr(re,re.sel,re.cm?re.cm.curOp.id:NaN,De)}function _a(re,pe,De){(Tn(re,"beforeSelectionChange")||re.cm&&Tn(re.cm,"beforeSelectionChange"))&&(pe=pa(re,pe,De));var Oe=De&&De.bias||(sn(pe.primary().head,re.sel.primary().head)<0?-1:1);Pl(re,Fl(re,pe,Oe,!0)),!(De&&De.scroll===!1)&&re.cm&&ic(re.cm)}function Pl(re,pe){pe.equals(re.sel)||(re.sel=pe,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,Zn(re.cm)),Ei(re,"cursorActivity",re))}function Xl(re){Pl(re,Fl(re,re.sel,null,!1))}function Fl(re,pe,De,Oe){for(var He,lt=0;lt<pe.ranges.length;lt++){var wt=pe.ranges[lt],It=pe.ranges.length==re.sel.ranges.length&&re.sel.ranges[lt],Nt=du(re,wt.anchor,It&&It.anchor,De,Oe),Yt=du(re,wt.head,It&&It.head,De,Oe);(He||Nt!=wt.anchor||Yt!=wt.head)&&(He||(He=pe.ranges.slice(0,lt)),He[lt]=new _i(Nt,Yt))}return He?Vi(re.cm,He,pe.primIndex):pe}function hu(re,pe,De,Oe,He){var lt=dn(re,pe.line);if(lt.markedSpans)for(var wt=0;wt<lt.markedSpans.length;++wt){var It=lt.markedSpans[wt],Nt=It.marker,Yt="selectLeft"in Nt?!Nt.selectLeft:Nt.inclusiveLeft,En="selectRight"in Nt?!Nt.selectRight:Nt.inclusiveRight;if((It.from==null||(Yt?It.from<=pe.ch:It.from<pe.ch))&&(It.to==null||(En?It.to>=pe.ch:It.to>pe.ch))){if(He&&(fn(Nt,"beforeCursorEnter"),Nt.explicitlyCleared))if(lt.markedSpans){--wt;continue}else break;if(!Nt.atomic)continue;if(De){var en=Nt.find(Oe<0?1:-1),Un=void 0;if((Oe<0?En:Yt)&&(en=Jl(re,en,-Oe,en&&en.line==pe.line?lt:null)),en&&en.line==pe.line&&(Un=sn(en,De))&&(Oe<0?Un<0:Un>0))return hu(re,en,pe,Oe,He)}var Fn=Nt.find(Oe<0?-1:1);return(Oe<0?Yt:En)&&(Fn=Jl(re,Fn,Oe,Fn.line==pe.line?lt:null)),Fn?hu(re,Fn,pe,Oe,He):null}}return pe}function du(re,pe,De,Oe,He){var lt=Oe||1,wt=hu(re,pe,De,lt,He)||!He&&hu(re,pe,De,lt,!0)||hu(re,pe,De,-lt,He)||!He&&hu(re,pe,De,-lt,!0);return wt||(re.cantEdit=!0,Gt(re.first,0))}function Jl(re,pe,De,Oe){return De<0&&pe.ch==0?pe.line>re.first?Dn(re,Gt(pe.line-1)):null:De>0&&pe.ch==(Oe||dn(re,pe.line)).text.length?pe.line<re.first+re.size-1?Gt(pe.line+1,0):null:new Gt(pe.line,pe.ch+De)}function ds(re){re.setSelection(Gt(re.firstLine(),0),Gt(re.lastLine()),vt)}function Oa(re,pe,De){var Oe={canceled:!1,from:pe.from,to:pe.to,text:pe.text,origin:pe.origin,cancel:function(){return Oe.canceled=!0}};return De&&(Oe.update=function(He,lt,wt,It){He&&(Oe.from=Dn(re,He)),lt&&(Oe.to=Dn(re,lt)),wt&&(Oe.text=wt),It!==void 0&&(Oe.origin=It)}),fn(re,"beforeChange",re,Oe),re.cm&&fn(re.cm,"beforeChange",re.cm,Oe),Oe.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:Oe.from,to:Oe.to,text:Oe.text,origin:Oe.origin}}function ra(re,pe,De){if(re.cm){if(!re.cm.curOp)return Sn(re.cm,ra)(re,pe,De);if(re.cm.state.suppressEdits)return}if(!((Tn(re,"beforeChange")||re.cm&&Tn(re.cm,"beforeChange"))&&(pe=Oa(re,pe,!0),!pe))){var Oe=_r&&!De&&Tr(re,pe.from,pe.to);if(Oe)for(var He=Oe.length-1;He>=0;--He)As(re,{from:Oe[He].from,to:Oe[He].to,text:He?[""]:pe.text,origin:pe.origin});else As(re,pe)}}function As(re,pe){if(!(pe.text.length==1&&pe.text[0]==""&&sn(pe.from,pe.to)==0)){var De=Lo(re,pe);Uo(re,pe,De,re.cm?re.cm.curOp.id:NaN),fu(re,pe,De,er(re,pe));var Oe=[];ns(re,function(He,lt){!lt&&dt(Oe,He.history)==-1&&(Fs(He.history,pe),Oe.push(He.history)),fu(He,pe,null,er(He,pe))})}}function Ql(re,pe,De){var Oe=re.cm&&re.cm.state.suppressEdits;if(!(Oe&&!De)){for(var He=re.history,lt,wt=re.sel,It=pe=="undo"?He.done:He.undone,Nt=pe=="undo"?He.undone:He.done,Yt=0;Yt<It.length&&(lt=It[Yt],!(De?lt.ranges&&!lt.equals(re.sel):!lt.ranges));Yt++);if(Yt!=It.length){for(He.lastOrigin=He.lastSelOrigin=null;;)if(lt=It.pop(),lt.ranges){if(Io(lt,Nt),De&&!lt.equals(re.sel)){ks(re,lt,{clearRedo:!1});return}wt=lt}else if(Oe){It.push(lt);return}else break;var En=[];Io(wt,Nt),Nt.push({changes:En,generation:He.generation}),He.generation=lt.generation||++He.maxGeneration;for(var en=Tn(re,"beforeChange")||re.cm&&Tn(re.cm,"beforeChange"),Un=function(Pi){var ji=lt.changes[Pi];if(ji.origin=pe,en&&!Oa(re,ji,!1))return It.length=0,{};En.push(lo(re,ji));var sr=Pi?Lo(re,ji):Ut(It);fu(re,ji,sr,ys(re,ji)),!Pi&&re.cm&&re.cm.scrollIntoView({from:ji.from,to:ir(ji)});var Br=[];ns(re,function(br,Ur){!Ur&&dt(Br,br.history)==-1&&(Fs(br.history,ji),Br.push(br.history)),fu(br,ji,null,ys(br,ji))})},Fn=lt.changes.length-1;Fn>=0;--Fn){var vi=Un(Fn);if(vi)return vi.v}}}}function Pc(re,pe){if(pe!=0&&(re.first+=pe,re.sel=new Ji(Zt(re.sel.ranges,function(He){return new _i(Gt(He.anchor.line+pe,He.anchor.ch),Gt(He.head.line+pe,He.head.ch))}),re.sel.primIndex),re.cm)){Ps(re.cm,re.first,re.first-pe,pe);for(var De=re.cm.display,Oe=De.viewFrom;Oe<De.viewTo;Oe++)wo(re.cm,Oe,"gutter")}}function fu(re,pe,De,Oe){if(re.cm&&!re.cm.curOp)return Sn(re.cm,fu)(re,pe,De,Oe);if(pe.to.line<re.first){Pc(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 He=pe.text.length-1-(re.first-pe.from.line);Pc(re,He),pe={from:Gt(re.first,0),to:Gt(pe.to.line+He,pe.to.ch),text:[Ut(pe.text)],origin:pe.origin}}var lt=re.lastLine();pe.to.line>lt&&(pe={from:pe.from,to:Gt(lt,dn(re,lt).text.length),text:[pe.text[0]],origin:pe.origin}),pe.removed=_n(re,pe.from,pe.to),De||(De=Lo(re,pe)),re.cm?Zu(re.cm,pe,Oe):Vr(re,pe,Oe),_a(re,De,vt),re.cantEdit&&du(re,Gt(re.firstLine(),0))&&(re.cantEdit=!1)}}function Zu(re,pe,De){var Oe=re.doc,He=re.display,lt=pe.from,wt=pe.to,It=!1,Nt=lt.line;re.options.lineWrapping||(Nt=Ft(Qi(dn(Oe,lt.line))),Oe.iter(Nt,wt.line+1,function(Fn){if(Fn==He.maxLine)return It=!0,!0})),Oe.sel.contains(pe.from,pe.to)>-1&&Zn(re),Vr(Oe,pe,De,Zs(re)),re.options.lineWrapping||(Oe.iter(Nt,lt.line+pe.text.length,function(Fn){var vi=Ko(Fn);vi>He.maxLineLength&&(He.maxLine=Fn,He.maxLineLength=vi,He.maxLineChanged=!0,It=!1)}),It&&(re.curOp.updateMaxLine=!0)),Ki(Oe,lt.line),vn(re,400);var Yt=pe.text.length-(wt.line-lt.line)-1;pe.full?Ps(re):lt.line==wt.line&&pe.text.length==1&&!Ir(re.doc,pe)?wo(re,lt.line,"text"):Ps(re,lt.line,wt.line+1,Yt);var En=Tn(re,"changes"),en=Tn(re,"change");if(en||En){var Un={from:lt,to:wt,text:pe.text,removed:pe.removed,origin:pe.origin};en&&Ei(re,"change",re,Un),En&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(Un)}re.display.selForContextMenu=null}function sc(re,pe,De,Oe,He){var lt;Oe||(Oe=De),sn(Oe,De)<0&&(lt=[Oe,De],De=lt[0],Oe=lt[1]),typeof pe=="string"&&(pe=re.splitLines(pe)),ra(re,{from:De,to:Oe,text:pe,origin:He})}function jl(re,pe,De,Oe){De<re.line?re.line+=Oe:pe<re.line&&(re.line=pe,re.ch=0)}function os(re,pe,De,Oe){for(var He=0;He<re.length;++He){var lt=re[He],wt=!0;if(lt.ranges){lt.copied||(lt=re[He]=lt.deepCopy(),lt.copied=!0);for(var It=0;It<lt.ranges.length;It++)jl(lt.ranges[It].anchor,pe,De,Oe),jl(lt.ranges[It].head,pe,De,Oe);continue}for(var Nt=0;Nt<lt.changes.length;++Nt){var Yt=lt.changes[Nt];if(De<Yt.from.line)Yt.from=Gt(Yt.from.line+Oe,Yt.from.ch),Yt.to=Gt(Yt.to.line+Oe,Yt.to.ch);else if(pe<=Yt.to.line){wt=!1;break}}wt||(re.splice(0,He+1),He=0)}}function Fs(re,pe){var De=pe.from.line,Oe=pe.to.line,He=pe.text.length-(Oe-De)-1;os(re.done,De,Oe,He),os(re.undone,De,Oe,He)}function va(re,pe,De,Oe){var He=pe,lt=pe;return typeof pe=="number"?lt=dn(re,Jn(re,pe)):He=Ft(pe),He==null?null:(Oe(lt,He)&&re.cm&&wo(re.cm,He,De),lt)}function js(re){this.lines=re,this.parent=null;for(var pe=0,De=0;De<re.length;++De)re[De].parent=this,pe+=re[De].height;this.height=pe}js.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,pe){for(var De=re,Oe=re+pe;De<Oe;++De){var He=this.lines[De];this.height-=He.height,Ls(He),Ei(He,"delete")}this.lines.splice(re,pe)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,pe,De){this.height+=De,this.lines=this.lines.slice(0,re).concat(pe).concat(this.lines.slice(re));for(var Oe=0;Oe<pe.length;++Oe)pe[Oe].parent=this},iterN:function(re,pe,De){for(var Oe=re+pe;re<Oe;++re)if(De(this.lines[re]))return!0}};function is(re){this.children=re;for(var pe=0,De=0,Oe=0;Oe<re.length;++Oe){var He=re[Oe];pe+=He.chunkSize(),De+=He.height,He.parent=this}this.size=pe,this.height=De,this.parent=null}is.prototype={chunkSize:function(){return this.size},removeInner:function(re,pe){this.size-=pe;for(var De=0;De<this.children.length;++De){var Oe=this.children[De],He=Oe.chunkSize();if(re<He){var lt=Math.min(pe,He-re),wt=Oe.height;if(Oe.removeInner(re,lt),this.height-=wt-Oe.height,He==lt&&(this.children.splice(De--,1),Oe.parent=null),(pe-=lt)==0)break;re=0}else re-=He}if(this.size-pe<25&&(this.children.length>1||!(this.children[0]instanceof js))){var It=[];this.collapse(It),this.children=[new js(It)],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,De){this.size+=pe.length,this.height+=De;for(var Oe=0;Oe<this.children.length;++Oe){var He=this.children[Oe],lt=He.chunkSize();if(re<=lt){if(He.insertInner(re,pe,De),He.lines&&He.lines.length>50){for(var wt=He.lines.length%25+25,It=wt;It<He.lines.length;){var Nt=new js(He.lines.slice(It,It+=25));He.height-=Nt.height,this.children.splice(++Oe,0,Nt),Nt.parent=this}He.lines=He.lines.slice(0,wt),this.maybeSpill()}break}re-=lt}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var pe=re.children.splice(re.children.length-5,5),De=new is(pe);if(re.parent){re.size-=De.size,re.height-=De.height;var He=dt(re.parent.children,re);re.parent.children.splice(He+1,0,De)}else{var Oe=new is(re.children);Oe.parent=re,re.children=[Oe,De],re=Oe}De.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,pe,De){for(var Oe=0;Oe<this.children.length;++Oe){var He=this.children[Oe],lt=He.chunkSize();if(re<lt){var wt=Math.min(pe,lt-re);if(He.iterN(re,wt,De))return!0;if((pe-=wt)==0)break;re=0}else re-=lt}}};var Pa=function(re,pe,De){if(De)for(var Oe in De)De.hasOwnProperty(Oe)&&(this[Oe]=De[Oe]);this.doc=re,this.node=pe};Pa.prototype.clear=function(){var re=this.doc.cm,pe=this.line.widgets,De=this.line,Oe=Ft(De);if(!(Oe==null||!pe)){for(var He=0;He<pe.length;++He)pe[He]==this&&pe.splice(He--,1);pe.length||(De.widgets=null);var lt=Aa(this);wn(De,Math.max(0,De.height-lt)),re&&(Lt(re,function(){El(re,De,-lt),wo(re,Oe,"widget")}),Ei(re,"lineWidgetCleared",re,this,Oe))}},Pa.prototype.changed=function(){var re=this,pe=this.height,De=this.doc.cm,Oe=this.line;this.height=null;var He=Aa(this)-pe;He&&(Xn(this.doc,Oe)||wn(Oe,Oe.height+He),De&&Lt(De,function(){De.curOp.forceUpdate=!0,El(De,Oe,He),Ei(De,"lineWidgetChanged",De,re,Ft(Oe))}))},ci(Pa);function El(re,pe,De){_o(pe)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&Ch(re,De)}function Nu(re,pe,De,Oe){var He=new Pa(re,De,Oe),lt=re.cm;return lt&&He.noHScroll&&(lt.display.alignWidgets=!0),va(re,pe,"widget",function(wt){var It=wt.widgets||(wt.widgets=[]);if(He.insertAt==null?It.push(He):It.splice(Math.min(It.length-1,Math.max(0,He.insertAt)),0,He),He.line=wt,lt&&!Xn(re,wt)){var Nt=_o(wt)<re.scrollTop;wn(wt,wt.height+Aa(He)),Nt&&Ch(lt,He.height),lt.curOp.forceUpdate=!0}return!0}),lt&&Ei(lt,"lineWidgetAdded",lt,He,typeof pe=="number"?pe:Ft(pe)),He}var mf=0,pn=function(re,pe){this.lines=[],this.type=pe,this.doc=re,this.id=++mf};pn.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,pe=re&&!re.curOp;if(pe&&ka(re),Tn(this,"clear")){var De=this.find();De&&Ei(this,"clear",De.from,De.to)}for(var Oe=null,He=null,lt=0;lt<this.lines.length;++lt){var wt=this.lines[lt],It=fo(wt.markedSpans,this);re&&!this.collapsed?wo(re,Ft(wt),"text"):re&&(It.to!=null&&(He=Ft(wt)),It.from!=null&&(Oe=Ft(wt))),wt.markedSpans=Pr(wt.markedSpans,It),It.from==null&&this.collapsed&&!Xn(this.doc,wt)&&re&&wn(wt,Tu(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var Nt=0;Nt<this.lines.length;++Nt){var Yt=Qi(this.lines[Nt]),En=Ko(Yt);En>re.display.maxLineLength&&(re.display.maxLine=Yt,re.display.maxLineLength=En,re.display.maxLineChanged=!0)}Oe!=null&&re&&this.collapsed&&Ps(re,Oe,He+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&Xl(re.doc)),re&&Ei(re,"markerCleared",re,this,Oe,He),pe&&oc(re),this.parent&&this.parent.clear()}},pn.prototype.find=function(re,pe){re==null&&this.type=="bookmark"&&(re=1);for(var De,Oe,He=0;He<this.lines.length;++He){var lt=this.lines[He],wt=fo(lt.markedSpans,this);if(wt.from!=null&&(De=Gt(pe?lt:Ft(lt),wt.from),re==-1))return De;if(wt.to!=null&&(Oe=Gt(pe?lt:Ft(lt),wt.to),re==1))return Oe}return De&&{from:De,to:Oe}},pn.prototype.changed=function(){var re=this,pe=this.find(-1,!0),De=this,Oe=this.doc.cm;!pe||!Oe||Lt(Oe,function(){var He=pe.line,lt=Ft(pe.line),wt=Gu(Oe,lt);if(wt&&(La(wt),Oe.curOp.selectionChanged=Oe.curOp.forceUpdate=!0),Oe.curOp.updateMaxLine=!0,!Xn(De.doc,He)&&De.height!=null){var It=De.height;De.height=null;var Nt=Aa(De)-It;Nt&&wn(He,He.height+Nt)}Ei(Oe,"markerChanged",Oe,re)})},pn.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var pe=this.doc.cm.curOp;(!pe.maybeHiddenMarkers||dt(pe.maybeHiddenMarkers,this)==-1)&&(pe.maybeUnhiddenMarkers||(pe.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},pn.prototype.detachLine=function(re){if(this.lines.splice(dt(this.lines,re),1),!this.lines.length&&this.doc.cm){var pe=this.doc.cm.curOp;(pe.maybeHiddenMarkers||(pe.maybeHiddenMarkers=[])).push(this)}},ci(pn);function Bc(re,pe,De,Oe,He){if(Oe&&Oe.shared)return vf(re,pe,De,Oe,He);if(re.cm&&!re.cm.curOp)return Sn(re.cm,Bc)(re,pe,De,Oe,He);var lt=new pn(re,He),wt=sn(pe,De);if(Oe&&Bt(Oe,lt,!1),wt>0||wt==0&<.clearWhenEmpty!==!1)return lt;if(lt.replacedWith&&(lt.collapsed=!0,lt.widgetNode=Je("span",[lt.replacedWith],"CodeMirror-widget"),Oe.handleMouseEvents||lt.widgetNode.setAttribute("cm-ignore-events","true"),Oe.insertLeft&&(lt.widgetNode.insertLeft=!0)),lt.collapsed){if(vr(re,pe.line,pe,De,lt)||pe.line!=De.line&&vr(re,De.line,pe,De,lt))throw new Error("Inserting collapsed marker partially overlapping an existing one");In()}lt.addToHistory&&Uo(re,{from:pe,to:De,origin:"markText"},re.sel,NaN);var It=pe.line,Nt=re.cm,Yt;if(re.iter(It,De.line+1,function(en){Nt&<.collapsed&&!Nt.options.lineWrapping&&Qi(en)==Nt.display.maxLine&&(Yt=!0),lt.collapsed&&It!=pe.line&&wn(en,0),Do(en,new Sr(lt,It==pe.line?pe.ch:null,It==De.line?De.ch:null)),++It}),lt.collapsed&&re.iter(pe.line,De.line+1,function(en){Xn(re,en)&&wn(en,0)}),lt.clearOnEnter&&Jt(lt,"beforeCursorEnter",function(){return lt.clear()}),lt.readOnly&&(Jr(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),lt.collapsed&&(lt.id=++mf,lt.atomic=!0),Nt){if(Yt&&(Nt.curOp.updateMaxLine=!0),lt.collapsed)Ps(Nt,pe.line,De.line+1);else if(lt.className||lt.startStyle||lt.endStyle||lt.css||lt.attributes||lt.title)for(var En=pe.line;En<=De.line;En++)wo(Nt,En,"text");lt.atomic&&Xl(Nt.doc),Ei(Nt,"markerAdded",Nt,lt)}return lt}var ac=function(re,pe){this.markers=re,this.primary=pe;for(var De=0;De<re.length;++De)re[De].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();Ei(this,"clear")}},ac.prototype.find=function(re,pe){return this.primary.find(re,pe)},ci(ac);function vf(re,pe,De,Oe,He){Oe=Bt(Oe),Oe.shared=!1;var lt=[Bc(re,pe,De,Oe,He)],wt=lt[0],It=Oe.widgetNode;return ns(re,function(Nt){It&&(Oe.widgetNode=It.cloneNode(!0)),lt.push(Bc(Nt,Dn(Nt,pe),Dn(Nt,De),Oe,He));for(var Yt=0;Yt<Nt.linked.length;++Yt)if(Nt.linked[Yt].isParent)return;wt=Ut(lt)}),new ac(lt,wt)}function _h(re){return re.findMarks(Gt(re.first,0),re.clipPos(Gt(re.lastLine())),function(pe){return pe.parent})}function oh(re,pe){for(var De=0;De<pe.length;De++){var Oe=pe[De],He=Oe.find(),lt=re.clipPos(He.from),wt=re.clipPos(He.to);if(sn(lt,wt)){var It=Bc(re,lt,wt,Oe.primary,Oe.primary.type);Oe.markers.push(It),It.parent=Oe}}}function Rd(re){for(var pe=function(Oe){var He=re[Oe],lt=[He.primary.doc];ns(He.primary.doc,function(Nt){return lt.push(Nt)});for(var wt=0;wt<He.markers.length;wt++){var It=He.markers[wt];dt(lt,It.doc)==-1&&(It.parent=null,He.markers.splice(wt--,1))}},De=0;De<re.length;De++)pe(De)}var Kp=0,Ia=function(re,pe,De,Oe,He){if(!(this instanceof Ia))return new Ia(re,pe,De,Oe,He);De==null&&(De=0),is.call(this,[new js([new rs("",null)])]),this.first=De,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=De;var lt=Gt(De,0);this.sel=mr(lt),this.history=new Lr(null),this.id=++Kp,this.modeOption=pe,this.lineSep=Oe,this.direction=He=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),Vr(this,{from:lt,to:lt,text:re}),ks(this,mr(lt),vt)};Ia.prototype=ze(is.prototype,{constructor:Ia,iter:function(re,pe,De){De?this.iterN(re-this.first,pe-re,De):this.iterN(this.first,this.first+this.size,re)},insert:function(re,pe){for(var De=0,Oe=0;Oe<pe.length;++Oe)De+=pe[Oe].height;this.insertInner(re-this.first,pe,De)},remove:function(re,pe){this.removeInner(re-this.first,pe)},getValue:function(re){var pe=zn(this,this.first,this.first+this.size);return re===!1?pe:pe.join(re||this.lineSeparator())},setValue:on(function(re){var pe=Gt(this.first,0),De=this.first+this.size-1;ra(this,{from:pe,to:Gt(De,dn(this,De).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&oo(this.cm,0,0),ks(this,mr(pe),vt)}),replaceRange:function(re,pe,De,Oe){pe=Dn(this,pe),De=De?Dn(this,De):pe,sc(this,re,pe,De,Oe)},getRange:function(re,pe,De){var Oe=_n(this,Dn(this,re),Dn(this,pe));return De===!1?Oe:Oe.join(De||this.lineSeparator())},getLine:function(re){var pe=this.getLineHandle(re);return pe&&pe.text},getLineHandle:function(re){if(bn(this,re))return dn(this,re)},getLineNumber:function(re){return Ft(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=dn(this,re)),Qi(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return Dn(this,re)},getCursor:function(re){var pe=this.sel.primary(),De;return re==null||re=="head"?De=pe.head:re=="anchor"?De=pe.anchor:re=="end"||re=="to"||re===!1?De=pe.to():De=pe.from(),De},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:on(function(re,pe,De){Es(this,Dn(this,typeof re=="number"?Gt(re,pe||0):re),null,De)}),setSelection:on(function(re,pe,De){Es(this,Dn(this,re),Dn(this,pe||re),De)}),extendSelection:on(function(re,pe,De){Xo(this,Dn(this,re),pe&&Dn(this,pe),De)}),extendSelections:on(function(re,pe){Jo(this,Mi(this,re),pe)}),extendSelectionsBy:on(function(re,pe){var De=Zt(this.sel.ranges,re);Jo(this,Mi(this,De),pe)}),setSelections:on(function(re,pe,De){if(re.length){for(var Oe=[],He=0;He<re.length;He++)Oe[He]=new _i(Dn(this,re[He].anchor),Dn(this,re[He].head));pe==null&&(pe=Math.min(re.length-1,this.sel.primIndex)),ks(this,Vi(this.cm,Oe,pe),De)}}),addSelection:on(function(re,pe,De){var Oe=this.sel.ranges.slice(0);Oe.push(new _i(Dn(this,re),Dn(this,pe||re))),ks(this,Vi(this.cm,Oe,Oe.length-1),De)}),getSelection:function(re){for(var pe=this.sel.ranges,De,Oe=0;Oe<pe.length;Oe++){var He=_n(this,pe[Oe].from(),pe[Oe].to());De=De?De.concat(He):He}return re===!1?De:De.join(re||this.lineSeparator())},getSelections:function(re){for(var pe=[],De=this.sel.ranges,Oe=0;Oe<De.length;Oe++){var He=_n(this,De[Oe].from(),De[Oe].to());re!==!1&&(He=He.join(re||this.lineSeparator())),pe[Oe]=He}return pe},replaceSelection:function(re,pe,De){for(var Oe=[],He=0;He<this.sel.ranges.length;He++)Oe[He]=re;this.replaceSelections(Oe,pe,De||"+input")},replaceSelections:on(function(re,pe,De){for(var Oe=[],He=this.sel,lt=0;lt<He.ranges.length;lt++){var wt=He.ranges[lt];Oe[lt]={from:wt.from(),to:wt.to(),text:this.splitLines(re[lt]),origin:De}}for(var It=pe&&pe!="end"&&ao(this,Oe,pe),Nt=Oe.length-1;Nt>=0;Nt--)ra(this,Oe[Nt]);It?Bo(this,It):this.cm&&ic(this.cm)}),undo:on(function(){Ql(this,"undo")}),redo:on(function(){Ql(this,"redo")}),undoSelection:on(function(){Ql(this,"undo",!0)}),redoSelection:on(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,De=0,Oe=0;Oe<re.done.length;Oe++)re.done[Oe].ranges||++pe;for(var He=0;He<re.undone.length;He++)re.undone[He].ranges||++De;return{undo:pe,redo:De}},clearHistory:function(){var re=this;this.history=new Lr(this.history.maxGeneration),ns(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:Ys(this.history.done),undone:Ys(this.history.undone)}},setHistory:function(re){var pe=this.history=new Lr(this.history.maxGeneration);pe.done=Ys(re.done.slice(0),null,!0),pe.undone=Ys(re.undone.slice(0),null,!0)},setGutterMarker:on(function(re,pe,De){return va(this,re,"gutter",function(Oe){var He=Oe.gutterMarkers||(Oe.gutterMarkers={});return He[pe]=De,!De&&Ue(He)&&(Oe.gutterMarkers=null),!0})}),clearGutter:on(function(re){var pe=this;this.iter(function(De){De.gutterMarkers&&De.gutterMarkers[re]&&va(pe,De,"gutter",function(){return De.gutterMarkers[re]=null,Ue(De.gutterMarkers)&&(De.gutterMarkers=null),!0})})}),lineInfo:function(re){var pe;if(typeof re=="number"){if(!bn(this,re)||(pe=re,re=dn(this,re),!re))return null}else if(pe=Ft(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:on(function(re,pe,De){return va(this,re,pe=="gutter"?"gutter":"class",function(Oe){var He=pe=="text"?"textClass":pe=="background"?"bgClass":pe=="gutter"?"gutterClass":"wrapClass";if(!Oe[He])Oe[He]=De;else{if(be(De).test(Oe[He]))return!1;Oe[He]+=" "+De}return!0})}),removeLineClass:on(function(re,pe,De){return va(this,re,pe=="gutter"?"gutter":"class",function(Oe){var He=pe=="text"?"textClass":pe=="background"?"bgClass":pe=="gutter"?"gutterClass":"wrapClass",lt=Oe[He];if(lt)if(De==null)Oe[He]=null;else{var wt=lt.match(be(De));if(!wt)return!1;var It=wt.index+wt[0].length;Oe[He]=lt.slice(0,wt.index)+(!wt.index||It==lt.length?"":" ")+lt.slice(It)||null}else return!1;return!0})}),addLineWidget:on(function(re,pe,De){return Nu(this,re,pe,De)}),removeLineWidget:function(re){re.clear()},markText:function(re,pe,De){return Bc(this,Dn(this,re),Dn(this,pe),De,De&&De.type||"range")},setBookmark:function(re,pe){var De={replacedWith:pe&&(pe.nodeType==null?pe.widget:pe),insertLeft:pe&&pe.insertLeft,clearWhenEmpty:!1,shared:pe&&pe.shared,handleMouseEvents:pe&&pe.handleMouseEvents};return re=Dn(this,re),Bc(this,re,re,De,"bookmark")},findMarksAt:function(re){re=Dn(this,re);var pe=[],De=dn(this,re.line).markedSpans;if(De)for(var Oe=0;Oe<De.length;++Oe){var He=De[Oe];(He.from==null||He.from<=re.ch)&&(He.to==null||He.to>=re.ch)&&pe.push(He.marker.parent||He.marker)}return pe},findMarks:function(re,pe,De){re=Dn(this,re),pe=Dn(this,pe);var Oe=[],He=re.line;return this.iter(re.line,pe.line+1,function(lt){var wt=lt.markedSpans;if(wt)for(var It=0;It<wt.length;It++){var Nt=wt[It];!(Nt.to!=null&&He==re.line&&re.ch>=Nt.to||Nt.from==null&&He!=re.line||Nt.from!=null&&He==pe.line&&Nt.from>=pe.ch)&&(!De||De(Nt.marker))&&Oe.push(Nt.marker.parent||Nt.marker)}++He}),Oe},getAllMarks:function(){var re=[];return this.iter(function(pe){var De=pe.markedSpans;if(De)for(var Oe=0;Oe<De.length;++Oe)De[Oe].from!=null&&re.push(De[Oe].marker)}),re},posFromIndex:function(re){var pe,De=this.first,Oe=this.lineSeparator().length;return this.iter(function(He){var lt=He.text.length+Oe;if(lt>re)return pe=re,!0;re-=lt,++De}),Dn(this,Gt(De,pe))},indexFromPos:function(re){re=Dn(this,re);var pe=re.ch;if(re.line<this.first||re.ch<0)return 0;var De=this.lineSeparator().length;return this.iter(this.first,re.line,function(Oe){pe+=Oe.text.length+De}),pe},copy:function(re){var pe=new Ia(zn(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,De=this.first+this.size;re.from!=null&&re.from>pe&&(pe=re.from),re.to!=null&&re.to<De&&(De=re.to);var Oe=new Ia(zn(this,pe,De),re.mode||this.modeOption,pe,this.lineSep,this.direction);return re.sharedHist&&(Oe.history=this.history),(this.linked||(this.linked=[])).push({doc:Oe,sharedHist:re.sharedHist}),Oe.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],oh(Oe,_h(this)),Oe},unlinkDoc:function(re){if(re instanceof gs&&(re=re.doc),this.linked)for(var pe=0;pe<this.linked.length;++pe){var De=this.linked[pe];if(De.doc==re){this.linked.splice(pe,1),re.unlinkDoc(this),Rd(_h(this));break}}if(re.history==this.history){var Oe=[re.id];ns(re,function(He){return Oe.push(He.id)},!0),re.history=new Lr(null),re.history.done=Ys(this.history.done,Oe),re.history.undone=Ys(this.history.undone,Oe)}},iterLinkedDocs:function(re){ns(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:on(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(pe){return pe.order=null}),this.cm&&$r(this.cm))})}),Ia.prototype.eachLine=Ia.prototype.iter;var nd=0;function Bd(re){var pe=this;if(Yf(pe),!(Mn(pe,re)||Ha(pe.display,re))){ai(re),Ce&&(nd=+new Date);var De=Na(pe,re,!0),Oe=re.dataTransfer.files;if(!(!De||pe.isReadOnly()))if(Oe&&Oe.length&&window.FileReader&&window.File)for(var He=Oe.length,lt=Array(He),wt=0,It=function(){++wt==He&&Sn(pe,function(){De=Dn(pe.doc,De);var Fn={from:De,to:De,text:pe.doc.splitLines(lt.filter(function(vi){return vi!=null}).join(pe.doc.lineSeparator())),origin:"paste"};ra(pe.doc,Fn),Bo(pe.doc,mr(Dn(pe.doc,De),Dn(pe.doc,ir(Fn))))})()},Nt=function(Fn,vi){if(pe.options.allowDropFileTypes&&dt(pe.options.allowDropFileTypes,Fn.type)==-1){It();return}var Pi=new FileReader;Pi.onerror=function(){return It()},Pi.onload=function(){var ji=Pi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ji)){It();return}lt[vi]=ji,It()},Pi.readAsText(Fn)},Yt=0;Yt<Oe.length;Yt++)Nt(Oe[Yt],Yt);else{if(pe.state.draggingText&&pe.doc.sel.contains(De)>-1){pe.state.draggingText(re),setTimeout(function(){return pe.display.input.focus()},20);return}try{var En=re.dataTransfer.getData("Text");if(En){var en;if(pe.state.draggingText&&!pe.state.draggingText.copy&&(en=pe.listSelections()),_a(pe.doc,mr(De,De)),en)for(var Un=0;Un<en.length;++Un)sc(pe.doc,"",en[Un].anchor,en[Un].head,"drag");pe.replaceSelection(En,"around","paste"),pe.display.input.focus()}}catch(Fn){}}}}function id(re,pe){if(Ce&&(!re.state.draggingText||+new Date-nd<100)){or(pe);return}if(!(Mn(re,pe)||Ha(re.display,pe))&&(pe.dataTransfer.setData("Text",re.getSelection()),pe.dataTransfer.effectAllowed="copyMove",pe.dataTransfer.setDragImage&&!ce)){var De=Ve("img",null,null,"position: fixed; left: 0; top: 0;");De.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ge&&(De.width=De.height=1,re.display.wrapper.appendChild(De),De._top=De.offsetTop),pe.dataTransfer.setDragImage(De,0,0),ge&&De.parentNode.removeChild(De)}}function yf(re,pe){var De=Na(re,pe);if(De){var Oe=document.createDocumentFragment();zo(re,De,Oe),re.display.dragCursor||(re.display.dragCursor=Ve("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),je(re.display.dragCursor,Oe)}}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"),De=[],Oe=0;Oe<pe.length;Oe++){var He=pe[Oe].CodeMirror;He&&De.push(He)}De.length&&De[0].operation(function(){for(var lt=0;lt<De.length;lt++)re(De[lt])})}}var Fd=!1;function ql(){Fd||(Ph(),Fd=!0)}function Ph(){var re;Jt(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,Sf(xf)},100))}),Jt(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 De,Oe,He,lt,wt=0;wt<pe.length-1;wt++){var It=pe[wt];if(/^(cmd|meta|m)$/i.test(It))lt=!0;else if(/^a(lt)?$/i.test(It))De=!0;else if(/^(c|ctrl|control)$/i.test(It))Oe=!0;else if(/^s(hift)?$/i.test(It))He=!0;else throw new Error("Unrecognized modifier name: "+It)}return De&&(re="Alt-"+re),Oe&&(re="Ctrl-"+re),lt&&(re="Cmd-"+re),He&&(re="Shift-"+re),re}function zd(re){var pe={};for(var De in re)if(re.hasOwnProperty(De)){var Oe=re[De];if(/^(name|fallthrough|(de|at)tach)$/.test(De))continue;if(Oe=="..."){delete re[De];continue}for(var He=Zt(De.split(" "),jd),lt=0;lt<He.length;lt++){var wt=void 0,It=void 0;lt==He.length-1?(It=He.join(" "),wt=Oe):(It=He.slice(0,lt+1).join(" "),wt="...");var Nt=pe[It];if(!Nt)pe[It]=wt;else if(Nt!=wt)throw new Error("Inconsistent bindings for "+It)}delete re[De]}for(var Yt in pe)re[Yt]=pe[Yt];return re}function eu(re,pe,De,Oe){pe=jc(pe);var He=pe.call?pe.call(re,Oe):pe[re];if(He===!1)return"nothing";if(He==="...")return"multi";if(He!=null&&De(He))return"handled";if(pe.fallthrough){if(Object.prototype.toString.call(pe.fallthrough)!="[object Array]")return eu(re,pe.fallthrough,De,Oe);for(var lt=0;lt<pe.fallthrough.length;lt++){var wt=eu(re,pe.fallthrough[lt],De,Oe);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,De){var Oe=re;return pe.altKey&&Oe!="Alt"&&(re="Alt-"+re),(ye?pe.metaKey:pe.ctrlKey)&&Oe!="Ctrl"&&(re="Ctrl-"+re),(ye?pe.ctrlKey:pe.metaKey)&&Oe!="Mod"&&(re="Cmd-"+re),!De&&pe.shiftKey&&Oe!="Shift"&&(re="Shift-"+re),re}function Ud(re,pe){if(ge&&re.keyCode==34&&re.char)return!1;var De=Ku[re.keyCode];return De==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(De=re.code),Hd(De,re,pe))}function jc(re){return typeof re=="string"?Ll[re]:re}function pl(re,pe){for(var De=re.doc.sel.ranges,Oe=[],He=0;He<De.length;He++){for(var lt=pe(De[He]);Oe.length&&sn(lt.from,Ut(Oe).to)<=0;){var wt=Oe.pop();if(sn(wt.from,lt.from)<0){lt.from=wt.from;break}}Oe.push(lt)}Lt(re,function(){for(var It=Oe.length-1;It>=0;It--)sc(re.doc,"",Oe[It].from,Oe[It].to,"+delete");ic(re)})}function Gd(re,pe,De){var Oe=Ae(re.text,pe+De,De);return Oe<0||Oe>re.text.length?null:Oe}function ya(re,pe,De){var Oe=Gd(re,pe.ch,De);return Oe==null?null:new Gt(pe.line,Oe,De<0?"after":"before")}function cs(re,pe,De,Oe,He){if(re){pe.doc.direction=="rtl"&&(He=-He);var lt=tn(De,pe.doc.direction);if(lt){var wt=He<0?Ut(lt):lt[0],It=He<0==(wt.level==1),Nt=It?"after":"before",Yt;if(wt.level>0||pe.doc.direction=="rtl"){var En=Lu(pe,De);Yt=He<0?De.text.length-1:0;var en=bl(pe,En,Yt).top;Yt=Ge(function(Un){return bl(pe,En,Un).top==en},He<0==(wt.level==1)?wt.from:wt.to-1,Yt),Nt=="before"&&(Yt=Gd(De,Yt,1))}else Yt=He<0?wt.to:wt.from;return new Gt(Oe,Yt,Nt)}}return new Gt(Oe,He<0?De.text.length:0,He<0?"before":"after")}function Vs(re,pe,De,Oe){var He=tn(pe,re.doc.direction);if(!He)return ya(pe,De,Oe);De.ch>=pe.text.length?(De.ch=pe.text.length,De.sticky="before"):De.ch<=0&&(De.ch=0,De.sticky="after");var lt=at(He,De.ch,De.sticky),wt=He[lt];if(re.doc.direction=="ltr"&&wt.level%2==0&&(Oe>0?wt.to>De.ch:wt.from<De.ch))return ya(pe,De,Oe);var It=function(sr,Br){return Gd(pe,sr instanceof Gt?sr.ch:sr,Br)},Nt,Yt=function(sr){return re.options.lineWrapping?(Nt=Nt||Lu(re,pe),bc(re,pe,Nt,sr)):{begin:0,end:pe.text.length}},En=Yt(De.sticky=="before"?It(De,-1):De.ch);if(re.doc.direction=="rtl"||wt.level==1){var en=wt.level==1==Oe<0,Un=It(De,en?1:-1);if(Un!=null&&(en?Un<=wt.to&&Un<=En.end:Un>=wt.from&&Un>=En.begin)){var Fn=en?"before":"after";return new Gt(De.line,Un,Fn)}}var vi=function(sr,Br,br){for(var Ur=function(la,Va){return Va?new Gt(De.line,It(la,1),"before"):new Gt(De.line,la,"after")};sr>=0&&sr<He.length;sr+=Br){var bo=He[sr],yr=Br>0==(bo.level!=1),Fo=yr?br.begin:It(br.end,-1);if(bo.from<=Fo&&Fo<bo.to||(Fo=yr?bo.from:It(bo.to,-1),br.begin<=Fo&&Fo<br.end))return Ur(Fo,yr)}},Pi=vi(lt+Oe,Oe,En);if(Pi)return Pi;var ji=Oe>0?En.end:It(En.begin,-1);return ji!=null&&!(Oe>0&&ji==pe.text.length)&&(Pi=vi(Oe>0?0:He.length-1,Oe,Yt(ji)),Pi)?Pi:null}var Za={selectAll:ds,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),vt)},killLine:function(re){return pl(re,function(pe){if(pe.empty()){var De=dn(re.doc,pe.head.line).text.length;return pe.head.ch==De&&pe.head.line<re.lastLine()?{from:pe.head,to:Gt(pe.head.line+1,0)}:{from:pe.head,to:Gt(pe.head.line,De)}}else return{from:pe.from(),to:pe.to()}})},deleteLine:function(re){return pl(re,function(pe){return{from:Gt(pe.from().line,0),to:Dn(re.doc,Gt(pe.to().line+1,0))}})},delLineLeft:function(re){return pl(re,function(pe){return{from:Gt(pe.from().line,0),to:pe.from()}})},delWrappedLineLeft:function(re){return pl(re,function(pe){var De=re.charCoords(pe.head,"div").top+5,Oe=re.coordsChar({left:0,top:De},"div");return{from:Oe,to:pe.from()}})},delWrappedLineRight:function(re){return pl(re,function(pe){var De=re.charCoords(pe.head,"div").top+5,Oe=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:De},"div");return{from:pe.from(),to:Oe}})},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(Gt(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(Gt(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(pe){return pu(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 gu(re,pe.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(pe){var De=re.cursorCoords(pe.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:De},"div")},jt)},goLineLeft:function(re){return re.extendSelectionsBy(function(pe){var De=re.cursorCoords(pe.head,"div").top+5;return re.coordsChar({left:0,top:De},"div")},jt)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(pe){var De=re.cursorCoords(pe.head,"div").top+5,Oe=re.coordsChar({left:0,top:De},"div");return Oe.ch<re.getLine(Oe.line).search(/\S/)?Wd(re,pe.head):Oe},jt)},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=[],De=re.listSelections(),Oe=re.options.tabSize,He=0;He<De.length;He++){var lt=De[He].from(),wt=ht(re.getLine(lt.line),lt.ch,Oe);pe.push(xn(Oe-wt%Oe))}re.replaceSelections(pe)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return Lt(re,function(){for(var pe=re.listSelections(),De=[],Oe=0;Oe<pe.length;Oe++)if(pe[Oe].empty()){var He=pe[Oe].head,lt=dn(re.doc,He.line).text;if(lt){if(He.ch==lt.length&&(He=new Gt(He.line,He.ch-1)),He.ch>0)He=new Gt(He.line,He.ch+1),re.replaceRange(lt.charAt(He.ch-1)+lt.charAt(He.ch-2),Gt(He.line,He.ch-2),He,"+transpose");else if(He.line>re.doc.first){var wt=dn(re.doc,He.line-1).text;wt&&(He=new Gt(He.line,1),re.replaceRange(lt.charAt(0)+re.doc.lineSeparator()+wt.charAt(wt.length-1),Gt(He.line-1,wt.length-1),He,"+transpose"))}}De.push(new _i(He,He))}re.setSelections(De)})},newlineAndIndent:function(re){return Lt(re,function(){for(var pe=re.listSelections(),De=pe.length-1;De>=0;De--)re.replaceRange(re.doc.lineSeparator(),pe[De].anchor,pe[De].head,"+input");pe=re.listSelections();for(var Oe=0;Oe<pe.length;Oe++)re.indentLine(pe[Oe].from().line,null,!0);ic(re)})},openLine:function(re){return re.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function pu(re,pe){var De=dn(re.doc,pe),Oe=Qi(De);return Oe!=De&&(pe=Ft(Oe)),cs(!0,re,Oe,pe,1)}function gu(re,pe){var De=dn(re.doc,pe),Oe=Qr(De);return Oe!=De&&(pe=Ft(Oe)),cs(!0,re,De,pe,-1)}function Wd(re,pe){var De=pu(re,pe.line),Oe=dn(re.doc,De.line),He=tn(Oe,re.doc.direction);if(!He||He[0].level==0){var lt=Math.max(De.ch,Oe.text.search(/\S/)),wt=pe.line==De.line&&pe.ch<=lt&&pe.ch;return Gt(De.line,wt?0:lt,De.sticky)}return De}function zc(re,pe,De){if(typeof pe=="string"&&(pe=Za[pe],!pe))return!1;re.display.input.ensurePolled();var Oe=re.display.shift,He=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),De&&(re.display.shift=!1),He=pe(re)!=Et}finally{re.display.shift=Oe,re.state.suppressEdits=!1}return He}function rd(re,pe,De){for(var Oe=0;Oe<re.state.keyMaps.length;Oe++){var He=eu(pe,re.state.keyMaps[Oe],De,re);if(He)return He}return re.options.extraKeys&&eu(pe,re.options.extraKeys,De,re)||eu(pe,re.options.keyMap,De,re)}var Ou=new it;function Ec(re,pe,De,Oe){var He=re.state.keySeq;if(He){if(Lh(pe))return"handled";if(/\'$/.test(pe)?re.state.keySeq=null:Ou.set(50,function(){re.state.keySeq==He&&(re.state.keySeq=null,re.display.input.reset())}),Xf(re,He+" "+pe,De,Oe))return!0}return Xf(re,pe,De,Oe)}function Xf(re,pe,De,Oe){var He=rd(re,pe,Oe);return He=="multi"&&(re.state.keySeq=pe),He=="handled"&&Ei(re,"keyHandled",re,pe,De),(He=="handled"||He=="multi")&&(ai(De),ps(re)),!!He}function Jf(re,pe){var De=Ud(pe,!0);return De?pe.shiftKey&&!re.state.keySeq?Ec(re,"Shift-"+De,pe,function(Oe){return zc(re,Oe,!0)})||Ec(re,De,pe,function(Oe){if(typeof Oe=="string"?/^go[A-Z]/.test(Oe):Oe.motion)return zc(re,Oe)}):Ec(re,De,pe,function(Oe){return zc(re,Oe)}):!1}function Qf(re,pe,De){return Ec(re,"'"+De+"'",pe,function(Oe){return zc(re,Oe,!0)})}var od=null;function Vp(re){var pe=this;if(!(re.target&&re.target!=pe.display.input.getField())&&(pe.curOp.focus=ut(),!Mn(pe,re))){Ce&&_e<11&&re.keyCode==27&&(re.returnValue=!1);var De=re.keyCode;pe.display.shift=De==16||re.shiftKey;var Oe=Jf(pe,re);ge&&(od=Oe?De:null,!Oe&&De==88&&!Dr&&(oe?re.metaKey:re.ctrlKey)&&pe.replaceSelection("",null,"cut")),Le&&!oe&&!Oe&&De==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),De==18&&!/\bCodeMirror-crosshair\b/.test(pe.display.lineDiv.className)&&$p(pe)}}function $p(re){var pe=re.display.lineDiv;bt(pe,"CodeMirror-crosshair");function De(Oe){(Oe.keyCode==18||!Oe.altKey)&&(ke(pe,"CodeMirror-crosshair"),kn(document,"keyup",De),kn(document,"mouseover",De))}Jt(document,"keyup",De),Jt(document,"mouseover",De)}function Yp(re){re.keyCode==16&&(this.doc.sel.shift=!1),Mn(this,re)}function Lc(re){var pe=this;if(!(re.target&&re.target!=pe.display.input.getField())&&!(Ha(pe.display,re)||Mn(pe,re)||re.ctrlKey&&!re.altKey||oe&&re.metaKey)){var De=re.keyCode,Oe=re.charCode;if(ge&&De==od){od=null,ai(re);return}if(!(ge&&(!re.which||re.which<10)&&Jf(pe,re))){var He=String.fromCharCode(Oe==null?De:Oe);He!="\b"&&(Qf(pe,re,He)||pe.display.input.onKeyPress(re))}}}var om=400,Xp=function(re,pe,De){this.time=re,this.pos=pe,this.button=De};Xp.prototype.compare=function(re,pe,De){return this.time+om>re&&sn(pe,this.pos)==0&&De==this.button};var Zd,sd;function Jp(re,pe){var De=+new Date;return sd&&sd.compare(De,re,pe)?(Zd=sd=null,"triple"):Zd&&Zd.compare(De,re,pe)?(sd=new Xp(De,re,pe),Zd=null,"double"):(Zd=new Xp(De,re,pe),sd=null,"single")}function Mc(re){var pe=this,De=pe.display;if(!(Mn(pe,re)||De.activeTouch&&De.input.supportsTouch())){if(De.input.ensurePolled(),De.shift=re.shiftKey,Ha(De,re)){he||(De.scroller.draggable=!1,setTimeout(function(){return De.scroller.draggable=!0},100));return}if(!tp(pe,re)){var Oe=Na(pe,re),He=pr(re),lt=Oe?Jp(Oe,He):"single";window.focus(),He==1&&pe.state.selectingText&&pe.state.selectingText(re),!(Oe&&Qp(pe,He,Oe,lt,re))&&(He==1?Oe?sm(pe,Oe,lt,re):tr(re)==De.scroller&&ai(re):He==2?(Oe&&Xo(pe.doc,Oe),setTimeout(function(){return De.input.focus()},20)):He==3&&(we?pe.display.input.onContextMenu(re):Rs(pe)))}}}function Qp(re,pe,De,Oe,He){var lt="Click";return Oe=="double"?lt="Double"+lt:Oe=="triple"&&(lt="Triple"+lt),lt=(pe==1?"Left":pe==2?"Middle":"Right")+lt,Ec(re,Hd(lt,He),He,function(wt){if(typeof wt=="string"&&(wt=Za[wt]),!wt)return!1;var It=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),It=wt(re,De)!=Et}finally{re.state.suppressEdits=!1}return It})}function qf(re,pe,De){var Oe=re.getOption("configureMouse"),He=Oe?Oe(re,pe,De):{};if(He.unit==null){var lt=ie?De.shiftKey&&De.metaKey:De.altKey;He.unit=lt?"rectangle":pe=="single"?"char":pe=="double"?"word":"line"}return(He.extend==null||re.doc.extend)&&(He.extend=re.doc.extend||De.shiftKey),He.addNew==null&&(He.addNew=oe?De.metaKey:De.ctrlKey),He.moveOnDrag==null&&(He.moveOnDrag=!(oe?De.altKey:De.ctrlKey)),He}function sm(re,pe,De,Oe){Ce?setTimeout(ct(us,re),0):re.curOp.focus=ut();var He=qf(re,De,Oe),lt=re.doc.sel,wt;re.options.dragDrop&&cr&&!re.isReadOnly()&&De=="single"&&(wt=lt.contains(pe))>-1&&(sn((wt=lt.ranges[wt]).from(),pe)<0||pe.xRel>0)&&(sn(wt.to(),pe)>0||pe.xRel<0)?qp(re,Oe,pe,He):nv(re,Oe,pe,He)}function qp(re,pe,De,Oe){var He=re.display,lt=!1,wt=Sn(re,function(Yt){he&&(He.scroller.draggable=!1),re.state.draggingText=!1,kn(He.wrapper.ownerDocument,"mouseup",wt),kn(He.wrapper.ownerDocument,"mousemove",It),kn(He.scroller,"dragstart",Nt),kn(He.scroller,"drop",wt),lt||(ai(Yt),Oe.addNew||Xo(re.doc,De,null,null,Oe.extend),he&&!ce||Ce&&_e==9?setTimeout(function(){He.wrapper.ownerDocument.body.focus({preventScroll:!0}),He.input.focus()},20):He.input.focus())}),It=function(Yt){lt=lt||Math.abs(pe.clientX-Yt.clientX)+Math.abs(pe.clientY-Yt.clientY)>=10},Nt=function(){return lt=!0};he&&(He.scroller.draggable=!0),re.state.draggingText=wt,wt.copy=!Oe.moveOnDrag,He.scroller.dragDrop&&He.scroller.dragDrop(),Jt(He.wrapper.ownerDocument,"mouseup",wt),Jt(He.wrapper.ownerDocument,"mousemove",It),Jt(He.scroller,"dragstart",Nt),Jt(He.scroller,"drop",wt),Rs(re),setTimeout(function(){return He.input.focus()},20)}function eg(re,pe,De){if(De=="char")return new _i(pe,pe);if(De=="word")return re.findWordAt(pe);if(De=="line")return new _i(Gt(pe.line,0),Dn(re.doc,Gt(pe.line+1,0)));var Oe=De(re,pe);return new _i(Oe.from,Oe.to)}function nv(re,pe,De,Oe){var He=re.display,lt=re.doc;ai(pe);var wt,It,Nt=lt.sel,Yt=Nt.ranges;if(Oe.addNew&&!Oe.extend?(It=lt.sel.contains(De),It>-1?wt=Yt[It]:wt=new _i(De,De)):(wt=lt.sel.primary(),It=lt.sel.primIndex),Oe.unit=="rectangle")Oe.addNew||(wt=new _i(De,De)),De=Na(re,pe,!0,!0),It=-1;else{var En=eg(re,De,Oe.unit);Oe.extend?wt=_l(wt,En.anchor,En.head,Oe.extend):wt=En}Oe.addNew?It==-1?(It=Yt.length,ks(lt,Vi(re,Yt.concat([wt]),It),{scroll:!1,origin:"*mouse"})):Yt.length>1&&Yt[It].empty()&&Oe.unit=="char"&&!Oe.extend?(ks(lt,Vi(re,Yt.slice(0,It).concat(Yt.slice(It+1)),0),{scroll:!1,origin:"*mouse"}),Nt=lt.sel):Ss(lt,It,wt,Rt):(It=0,ks(lt,new Ji([wt],0),Rt),Nt=lt.sel);var en=De;function Un(br){if(sn(en,br)!=0)if(en=br,Oe.unit=="rectangle"){for(var Ur=[],bo=re.options.tabSize,yr=ht(dn(lt,De.line).text,De.ch,bo),Fo=ht(dn(lt,br.line).text,br.ch,bo),la=Math.min(yr,Fo),Va=Math.max(yr,Fo),ga=Math.min(De.line,br.line),nu=Math.min(re.lastLine(),Math.max(De.line,br.line));ga<=nu;ga++){var Ml=dn(lt,ga).text,Ra=un(Ml,la,bo);la==Va?Ur.push(new _i(Gt(ga,Ra),Gt(ga,Ra))):Ml.length>Ra&&Ur.push(new _i(Gt(ga,Ra),Gt(ga,un(Ml,Va,bo))))}Ur.length||Ur.push(new _i(De,De)),ks(lt,Vi(re,Nt.ranges.slice(0,It).concat(Ur),It),{origin:"*mouse",scroll:!1}),re.scrollIntoView(br)}else{var mu=wt,gl=eg(re,br,Oe.unit),Ba=mu.anchor,xs;sn(gl.anchor,Ba)>0?(xs=gl.head,Ba=Gn(mu.from(),gl.anchor)):(xs=gl.anchor,Ba=qn(mu.to(),gl.head));var Sa=Nt.ranges.slice(0);Sa[It]=am(re,new _i(Dn(lt,Ba),xs)),ks(lt,Vi(re,Sa,It),Rt)}}var Fn=He.wrapper.getBoundingClientRect(),vi=0;function Pi(br){var Ur=++vi,bo=Na(re,br,!0,Oe.unit=="rectangle");if(bo)if(sn(bo,en)!=0){re.curOp.focus=ut(),Un(bo);var yr=Ho(He,lt);(bo.line>=yr.to||bo.line<yr.from)&&setTimeout(Sn(re,function(){vi==Ur&&Pi(br)}),150)}else{var Fo=br.clientY<Fn.top?-20:br.clientY>Fn.bottom?20:0;Fo&&setTimeout(Sn(re,function(){vi==Ur&&(He.scroller.scrollTop+=Fo,Pi(br))}),50)}}function ji(br){re.state.selectingText=!1,vi=1/0,br&&(ai(br),He.input.focus()),kn(He.wrapper.ownerDocument,"mousemove",sr),kn(He.wrapper.ownerDocument,"mouseup",Br),lt.history.lastSelOrigin=null}var sr=Sn(re,function(br){br.buttons===0||!pr(br)?ji(br):Pi(br)}),Br=Sn(re,ji);re.state.selectingText=Br,Jt(He.wrapper.ownerDocument,"mousemove",sr),Jt(He.wrapper.ownerDocument,"mouseup",Br)}function am(re,pe){var De=pe.anchor,Oe=pe.head,He=dn(re.doc,De.line);if(sn(De,Oe)==0&&De.sticky==Oe.sticky)return pe;var lt=tn(He);if(!lt)return pe;var wt=at(lt,De.ch,De.sticky),It=lt[wt];if(It.from!=De.ch&&It.to!=De.ch)return pe;var Nt=wt+(It.from==De.ch==(It.level!=1)?0:1);if(Nt==0||Nt==lt.length)return pe;var Yt;if(Oe.line!=De.line)Yt=(Oe.line-De.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var En=at(lt,Oe.ch,Oe.sticky),en=En-wt||(Oe.ch-De.ch)*(It.level==1?-1:1);En==Nt-1||En==Nt?Yt=en<0:Yt=en>0}var Un=lt[Nt+(Yt?-1:0)],Fn=Yt==(Un.level==1),vi=Fn?Un.from:Un.to,Pi=Fn?"after":"before";return De.ch==vi&&De.sticky==Pi?pe:new _i(new Gt(De.line,vi,Pi),Oe)}function ep(re,pe,De,Oe){var He,lt;if(pe.touches)He=pe.touches[0].clientX,lt=pe.touches[0].clientY;else try{He=pe.clientX,lt=pe.clientY}catch(Un){return!1}if(He>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;Oe&&ai(pe);var wt=re.display,It=wt.lineDiv.getBoundingClientRect();if(lt>It.bottom||!Tn(re,De))return Ci(pe);lt-=It.top-wt.viewOffset;for(var Nt=0;Nt<re.display.gutterSpecs.length;++Nt){var Yt=wt.gutters.childNodes[Nt];if(Yt&&Yt.getBoundingClientRect().right>=He){var En=$t(re.doc,lt),en=re.display.gutterSpecs[Nt];return fn(re,De,re,En,en.className,pe),Ci(pe)}}}function tp(re,pe){return ep(re,pe,"gutterClick",!0)}function np(re,pe){Ha(re.display,pe)||lm(re,pe)||Mn(re,pe,"contextmenu")||we||re.display.input.onContextMenu(pe)}function lm(re,pe){return Tn(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-"),Is(re)}var Mh={toString:function(){return"CodeMirror.Init"}},tg={},wf={};function um(re){var pe=re.optionHandlers;function De(Oe,He,lt,wt){re.defaults[Oe]=He,lt&&(pe[Oe]=wt?function(It,Nt,Yt){Yt!=Mh&<(It,Nt,Yt)}:lt)}re.defineOption=De,re.Init=Mh,De("value","",function(Oe,He){return Oe.setValue(He)},!0),De("mode",null,function(Oe,He){Oe.doc.modeOption=He,Nr(Oe)},!0),De("indentUnit",2,Nr,!0),De("indentWithTabs",!1),De("smartIndent",!0),De("tabSize",4,function(Oe){No(Oe),Is(Oe),Ps(Oe)},!0),De("lineSeparator",null,function(Oe,He){if(Oe.doc.lineSep=He,!!He){var lt=[],wt=Oe.doc.first;Oe.doc.iter(function(Nt){for(var Yt=0;;){var En=Nt.text.indexOf(He,Yt);if(En==-1)break;Yt=En+He.length,lt.push(Gt(wt,En))}wt++});for(var It=lt.length-1;It>=0;It--)sc(Oe.doc,He,lt[It],Gt(lt[It].line,lt[It].ch+He.length))}}),De("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Oe,He,lt){Oe.state.specialChars=new RegExp(He.source+(He.test(" ")?"":"| "),"g"),lt!=Mh&&Oe.refresh()}),De("specialCharPlaceholder",Os,function(Oe){return Oe.refresh()},!0),De("electricChars",!0),De("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),De("spellcheck",!1,function(Oe,He){return Oe.getInputField().spellcheck=He},!0),De("autocorrect",!1,function(Oe,He){return Oe.getInputField().autocorrect=He},!0),De("autocapitalize",!1,function(Oe,He){return Oe.getInputField().autocapitalize=He},!0),De("rtlMoveVisually",!se),De("wholeLineUpdateBefore",!0),De("theme","default",function(Oe){ip(Oe),ei(Oe)},!0),De("keyMap","default",function(Oe,He,lt){var wt=jc(He),It=lt!=Mh&&jc(lt);It&&It.detach&&It.detach(Oe,wt),wt.attach&&wt.attach(Oe,It||null)}),De("extraKeys",null),De("configureMouse",null),De("lineWrapping",!1,cm,!0),De("gutters",[],function(Oe,He){Oe.display.gutterSpecs=Ii(He,Oe.options.lineNumbers),ei(Oe)},!0),De("fixedGutter",!0,function(Oe,He){Oe.display.gutters.style.left=He?Cc(Oe.display)+"px":"0",Oe.refresh()},!0),De("coverGutterNextToScrollbar",!1,function(Oe){return rc(Oe)},!0),De("scrollbarStyle","native",function(Oe){td(Oe),rc(Oe),Oe.display.scrollbars.setScrollTop(Oe.doc.scrollTop),Oe.display.scrollbars.setScrollLeft(Oe.doc.scrollLeft)},!0),De("lineNumbers",!1,function(Oe,He){Oe.display.gutterSpecs=Ii(Oe.options.gutters,He),ei(Oe)},!0),De("firstLineNumber",1,ei,!0),De("lineNumberFormatter",function(Oe){return Oe},ei,!0),De("showCursorWhenSelecting",!1,Ca,!0),De("resetSelectionOnContextMenu",!0),De("lineWiseCopyCut",!0),De("pasteLinesPerSelection",!0),De("selectionsMayTouch",!1),De("readOnly",!1,function(Oe,He){He=="nocursor"&&(Rc(Oe),Oe.display.input.blur()),Oe.display.input.readOnlyChanged(He)}),De("screenReaderLabel",null,function(Oe,He){He=He===""?null:He,Oe.display.input.screenReaderLabelChanged(He)}),De("disableInput",!1,function(Oe,He){He||Oe.display.input.reset()},!0),De("dragDrop",!0,rp),De("allowDropFileTypes",null),De("cursorBlinkRate",530),De("cursorScrollMargin",0),De("cursorHeight",1,Ca,!0),De("singleCursorHeightPerLine",!0,Ca,!0),De("workTime",100),De("workDelay",100),De("flattenSpans",!0,No,!0),De("addModeClass",!1,No,!0),De("pollInterval",100),De("undoDepth",200,function(Oe,He){return Oe.doc.history.undoDepth=He}),De("historyEventDelay",1250),De("viewportMargin",10,function(Oe){return Oe.refresh()},!0),De("maxHighlightLength",1e4,No,!0),De("moveInputWithCursor",!0,function(Oe,He){He||Oe.display.input.resetPosition()}),De("tabindex",null,function(Oe,He){return Oe.display.input.getField().tabIndex=He||""}),De("autofocus",null),De("direction","ltr",function(Oe,He){return Oe.doc.setDirection(He)},!0),De("phrases",null)}function rp(re,pe,De){var Oe=De&&De!=Mh;if(!pe!=!Oe){var He=re.display.dragFunctions,lt=pe?Jt:kn;lt(re.display.scroller,"dragstart",He.start),lt(re.display.scroller,"dragenter",He.enter),lt(re.display.scroller,"dragover",He.over),lt(re.display.scroller,"dragleave",He.leave),lt(re.display.scroller,"drop",He.drop)}}function cm(re){re.options.lineWrapping?(bt(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(ke(re.display.wrapper,"CodeMirror-wrap"),Eo(re)),Wr(re),Ps(re),Is(re),setTimeout(function(){return rc(re)},100)}function gs(re,pe){var De=this;if(!(this instanceof gs))return new gs(re,pe);this.options=pe=pe?Bt(pe):{},Bt(tg,pe,!1);var Oe=pe.value;typeof Oe=="string"?Oe=new Ia(Oe,pe.mode,null,pe.lineSeparator,pe.direction):pe.mode&&(Oe.modeOption=pe.mode),this.doc=Oe;var He=new gs.inputStyles[pe.inputStyle](this),lt=this.display=new Hi(re,Oe,He,pe);lt.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 it,keySeq:null,specialChars:null},pe.autofocus&&!ee&<.input.focus(),Ce&&_e<11&&setTimeout(function(){return De.display.input.reset(!0)},20),Kd(this),ql(),ka(this),this.curOp.forceUpdate=!0,Hr(this,Oe),pe.autofocus&&!ee||this.hasFocus()?setTimeout(function(){De.hasFocus()&&!De.state.focused&&Ro(De)},20):Rc(this);for(var wt in wf)wf.hasOwnProperty(wt)&&wf[wt](this,pe[wt],Mh);Oi(this),pe.finishInit&&pe.finishInit(this);for(var It=0;It<ad.length;++It)ad[It](this);oc(this),he&&pe.lineWrapping&&getComputedStyle(lt.lineDiv).textRendering=="optimizelegibility"&&(lt.lineDiv.style.textRendering="auto")}gs.defaults=tg,gs.optionHandlers=wf;function Kd(re){var pe=re.display;Jt(pe.scroller,"mousedown",Sn(re,Mc)),Ce&&_e<11?Jt(pe.scroller,"dblclick",Sn(re,function(Nt){if(!Mn(re,Nt)){var Yt=Na(re,Nt);if(!(!Yt||tp(re,Nt)||Ha(re.display,Nt))){ai(Nt);var En=re.findWordAt(Yt);Xo(re.doc,En.anchor,En.head)}}})):Jt(pe.scroller,"dblclick",function(Nt){return Mn(re,Nt)||ai(Nt)}),Jt(pe.scroller,"contextmenu",function(Nt){return np(re,Nt)}),Jt(pe.input.getField(),"contextmenu",function(Nt){pe.scroller.contains(Nt.target)||np(re,Nt)});var De,Oe={end:0};function He(){pe.activeTouch&&(De=setTimeout(function(){return pe.activeTouch=null},1e3),Oe=pe.activeTouch,Oe.end=+new Date)}function lt(Nt){if(Nt.touches.length!=1)return!1;var Yt=Nt.touches[0];return Yt.radiusX<=1&&Yt.radiusY<=1}function wt(Nt,Yt){if(Yt.left==null)return!0;var En=Yt.left-Nt.left,en=Yt.top-Nt.top;return En*En+en*en>20*20}Jt(pe.scroller,"touchstart",function(Nt){if(!Mn(re,Nt)&&!lt(Nt)&&!tp(re,Nt)){pe.input.ensurePolled(),clearTimeout(De);var Yt=+new Date;pe.activeTouch={start:Yt,moved:!1,prev:Yt-Oe.end<=300?Oe:null},Nt.touches.length==1&&(pe.activeTouch.left=Nt.touches[0].pageX,pe.activeTouch.top=Nt.touches[0].pageY)}}),Jt(pe.scroller,"touchmove",function(){pe.activeTouch&&(pe.activeTouch.moved=!0)}),Jt(pe.scroller,"touchend",function(Nt){var Yt=pe.activeTouch;if(Yt&&!Ha(pe,Nt)&&Yt.left!=null&&!Yt.moved&&new Date-Yt.start<300){var En=re.coordsChar(pe.activeTouch,"page"),en;!Yt.prev||wt(Yt,Yt.prev)?en=new _i(En,En):!Yt.prev.prev||wt(Yt,Yt.prev.prev)?en=re.findWordAt(En):en=new _i(Gt(En.line,0),Dn(re.doc,Gt(En.line+1,0))),re.setSelection(en.anchor,en.head),re.focus(),ai(Nt)}He()}),Jt(pe.scroller,"touchcancel",He),Jt(pe.scroller,"scroll",function(){pe.scroller.clientHeight&&(Au(re,pe.scroller.scrollTop),cu(re,pe.scroller.scrollLeft,!0),fn(re,"scroll",re))}),Jt(pe.scroller,"mousewheel",function(Nt){return ur(re,Nt)}),Jt(pe.scroller,"DOMMouseScroll",function(Nt){return ur(re,Nt)}),Jt(pe.wrapper,"scroll",function(){return pe.wrapper.scrollTop=pe.wrapper.scrollLeft=0}),pe.dragFunctions={enter:function(Nt){Mn(re,Nt)||or(Nt)},over:function(Nt){Mn(re,Nt)||(yf(re,Nt),or(Nt))},start:function(Nt){return id(re,Nt)},drop:Sn(re,Bd),leave:function(Nt){Mn(re,Nt)||Yf(re)}};var It=pe.input.getField();Jt(It,"keyup",function(Nt){return Yp.call(re,Nt)}),Jt(It,"keydown",Sn(re,Vp)),Jt(It,"keypress",Sn(re,Lc)),Jt(It,"focus",function(Nt){return Ro(re,Nt)}),Jt(It,"blur",function(Nt){return Rc(re,Nt)})}var ad=[];gs.defineInitHook=function(re){return ad.push(re)};function Ka(re,pe,De,Oe){var He=re.doc,lt;De==null&&(De="add"),De=="smart"&&(He.mode.indent?lt=Ai(re,pe).state:De="prev");var wt=re.options.tabSize,It=dn(He,pe),Nt=ht(It.text,null,wt);It.stateAfter&&(It.stateAfter=null);var Yt=It.text.match(/^\s*/)[0],En;if(!Oe&&!/\S/.test(It.text))En=0,De="not";else if(De=="smart"&&(En=He.mode.indent(lt,It.text.slice(Yt.length),It.text),En==Et||En>150)){if(!Oe)return;De="prev"}De=="prev"?pe>He.first?En=ht(dn(He,pe-1).text,null,wt):En=0:De=="add"?En=Nt+re.options.indentUnit:De=="subtract"?En=Nt-re.options.indentUnit:typeof De=="number"&&(En=Nt+De),En=Math.max(0,En);var en="",Un=0;if(re.options.indentWithTabs)for(var Fn=Math.floor(En/wt);Fn;--Fn)Un+=wt,en+=" ";if(Un<En&&(en+=xn(En-Un)),en!=Yt)return sc(He,en,Gt(pe,0),Gt(pe,Yt.length),"+input"),It.stateAfter=null,!0;for(var vi=0;vi<He.sel.ranges.length;vi++){var Pi=He.sel.ranges[vi];if(Pi.head.line==pe&&Pi.head.ch<Yt.length){var ji=Gt(pe,Yt.length);Ss(He,vi,new _i(ji,ji));break}}}var tu=null;function ld(re){tu=re}function bf(re,pe,De,Oe,He){var lt=re.doc;re.display.shift=!1,Oe||(Oe=lt.sel);var wt=+new Date-200,It=He=="paste"||re.state.pasteIncoming>wt,Nt=zi(pe),Yt=null;if(It&&Oe.ranges.length>1)if(tu&&tu.text.join(`
|
|
|
`)==pe){if(Oe.ranges.length%tu.text.length==0){Yt=[];for(var En=0;En<tu.text.length;En++)Yt.push(lt.splitLines(tu.text[En]))}}else Nt.length==Oe.ranges.length&&re.options.pasteLinesPerSelection&&(Yt=Zt(Nt,function(sr){return[sr]}));for(var en=re.curOp.updateInput,Un=Oe.ranges.length-1;Un>=0;Un--){var Fn=Oe.ranges[Un],vi=Fn.from(),Pi=Fn.to();Fn.empty()&&(De&&De>0?vi=Gt(vi.line,vi.ch-De):re.state.overwrite&&!It?Pi=Gt(Pi.line,Math.min(dn(lt,Pi.line).text.length,Pi.ch+Ut(Nt).length)):It&&tu&&tu.lineWise&&tu.text.join(`
|
|
|
`)==Nt.join(`
|
|
|
`)&&(vi=Pi=Gt(vi.line,0)));var ji={from:vi,to:Pi,text:Yt?Yt[Un%Yt.length]:Nt,origin:He||(It?"paste":re.state.cutIncoming>wt?"cut":"+input")};ra(re.doc,ji),Ei(re,"inputRead",re,ji)}pe&&!It&&ig(re,pe),ic(re),re.curOp.updateInput<2&&(re.curOp.updateInput=en),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function ng(re,pe){var De=re.clipboardData&&re.clipboardData.getData("Text");if(De)return re.preventDefault(),!pe.isReadOnly()&&!pe.options.disableInput&&Lt(pe,function(){return bf(pe,De,0,null,"paste")}),!0}function ig(re,pe){if(!(!re.options.electricChars||!re.options.smartIndent))for(var De=re.doc.sel,Oe=De.ranges.length-1;Oe>=0;Oe--){var He=De.ranges[Oe];if(!(He.head.ch>100||Oe&&De.ranges[Oe-1].head.line==He.head.line)){var lt=re.getModeAt(He.head),wt=!1;if(lt.electricChars){for(var It=0;It<lt.electricChars.length;It++)if(pe.indexOf(lt.electricChars.charAt(It))>-1){wt=Ka(re,He.head.line,"smart");break}}else lt.electricInput&<.electricInput.test(dn(re.doc,He.head.line).text.slice(0,He.head.ch))&&(wt=Ka(re,He.head.line,"smart"));wt&&Ei(re,"electricInput",re,He.head.line)}}}function rg(re){for(var pe=[],De=[],Oe=0;Oe<re.doc.sel.ranges.length;Oe++){var He=re.doc.sel.ranges[Oe].head.line,lt={anchor:Gt(He,0),head:Gt(He+1,0)};De.push(lt),pe.push(re.getRange(lt.anchor,lt.head))}return{text:pe,ranges:De}}function og(re,pe,De,Oe){re.setAttribute("autocorrect",De?"":"off"),re.setAttribute("autocapitalize",Oe?"":"off"),re.setAttribute("spellcheck",!!pe)}function sg(){var re=Ve("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),pe=Ve("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return he?re.style.width="1000px":re.setAttribute("wrap","off"),ue&&(re.style.border="1px solid black"),og(re),pe}function Th(re){var pe=re.optionHandlers,De=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Oe,He){var lt=this.options,wt=lt[Oe];lt[Oe]==He&&Oe!="mode"||(lt[Oe]=He,pe.hasOwnProperty(Oe)&&Sn(this,pe[Oe])(this,He,wt),fn(this,"optionChange",this,Oe))},getOption:function(Oe){return this.options[Oe]},getDoc:function(){return this.doc},addKeyMap:function(Oe,He){this.state.keyMaps[He?"push":"unshift"](jc(Oe))},removeKeyMap:function(Oe){for(var He=this.state.keyMaps,lt=0;lt<He.length;++lt)if(He[lt]==Oe||He[lt].name==Oe)return He.splice(lt,1),!0},addOverlay:hn(function(Oe,He){var lt=Oe.token?Oe:re.getMode(this.options,Oe);if(lt.startState)throw new Error("Overlays may not be stateful.");Xt(this.state.overlays,{mode:lt,modeSpec:Oe,opaque:He&&He.opaque,priority:He&&He.priority||0},function(wt){return wt.priority}),this.state.modeGen++,Ps(this)}),removeOverlay:hn(function(Oe){for(var He=this.state.overlays,lt=0;lt<He.length;++lt){var wt=He[lt].modeSpec;if(wt==Oe||typeof Oe=="string"&&wt.name==Oe){He.splice(lt,1),this.state.modeGen++,Ps(this);return}}}),indentLine:hn(function(Oe,He,lt){typeof He!="string"&&typeof He!="number"&&(He==null?He=this.options.smartIndent?"smart":"prev":He=He?"add":"subtract"),bn(this.doc,Oe)&&Ka(this,Oe,He,lt)}),indentSelection:hn(function(Oe){for(var He=this.doc.sel.ranges,lt=-1,wt=0;wt<He.length;wt++){var It=He[wt];if(It.empty())It.head.line>lt&&(Ka(this,It.head.line,Oe,!0),lt=It.head.line,wt==this.doc.sel.primIndex&&ic(this));else{var Nt=It.from(),Yt=It.to(),En=Math.max(lt,Nt.line);lt=Math.min(this.lastLine(),Yt.line-(Yt.ch?0:1))+1;for(var en=En;en<lt;++en)Ka(this,en,Oe);var Un=this.doc.sel.ranges;Nt.ch==0&&He.length==Un.length&&Un[wt].from().ch>0&&Ss(this.doc,wt,new _i(Nt,Un[wt].to()),vt)}}}),getTokenAt:function(Oe,He){return Wi(this,Oe,He)},getLineTokens:function(Oe,He){return Wi(this,Gt(Oe),He,!0)},getTokenTypeAt:function(Oe){Oe=Dn(this.doc,Oe);var He=lr(this,dn(this.doc,Oe.line)),lt=0,wt=(He.length-1)/2,It=Oe.ch,Nt;if(It==0)Nt=He[2];else for(;;){var Yt=lt+wt>>1;if((Yt?He[Yt*2-1]:0)>=It)wt=Yt;else if(He[Yt*2+1]<It)lt=Yt+1;else{Nt=He[Yt*2+2];break}}var En=Nt?Nt.indexOf("overlay "):-1;return En<0?Nt:En==0?null:Nt.slice(0,En-1)},getModeAt:function(Oe){var He=this.doc.mode;return He.innerMode?re.innerMode(He,this.getTokenAt(Oe).state).mode:He},getHelper:function(Oe,He){return this.getHelpers(Oe,He)[0]},getHelpers:function(Oe,He){var lt=[];if(!De.hasOwnProperty(He))return lt;var wt=De[He],It=this.getModeAt(Oe);if(typeof It[He]=="string")wt[It[He]]&<.push(wt[It[He]]);else if(It[He])for(var Nt=0;Nt<It[He].length;Nt++){var Yt=wt[It[He][Nt]];Yt&<.push(Yt)}else It.helperType&&wt[It.helperType]?lt.push(wt[It.helperType]):wt[It.name]&<.push(wt[It.name]);for(var En=0;En<wt._global.length;En++){var en=wt._global[En];en.pred(It,this)&&dt(lt,en.val)==-1&<.push(en.val)}return lt},getStateAfter:function(Oe,He){var lt=this.doc;return Oe=Jn(lt,Oe==null?lt.first+lt.size-1:Oe),Ai(this,Oe+1,He).state},cursorCoords:function(Oe,He){var lt,wt=this.doc.sel.primary();return Oe==null?lt=wt.head:typeof Oe=="object"?lt=Dn(this.doc,Oe):lt=Oe?wt.from():wt.to(),Ds(this,lt,He||"page")},charCoords:function(Oe,He){return Rl(this,Dn(this.doc,Oe),He||"page")},coordsChar:function(Oe,He){return Oe=Yl(this,Oe,He||"page"),wc(this,Oe.left,Oe.top)},lineAtHeight:function(Oe,He){return Oe=Yl(this,{top:Oe,left:0},He||"page").top,$t(this.doc,Oe+this.display.viewOffset)},heightAtLine:function(Oe,He,lt){var wt=!1,It;if(typeof Oe=="number"){var Nt=this.doc.first+this.doc.size-1;Oe<this.doc.first?Oe=this.doc.first:Oe>Nt&&(Oe=Nt,wt=!0),It=dn(this.doc,Oe)}else It=Oe;return Ws(this,It,{top:0,left:0},He||"page",lt||wt).top+(wt?this.doc.height-_o(It):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(Oe,He,lt,wt,It){var Nt=this.display;Oe=Ds(this,Dn(this.doc,Oe));var Yt=Oe.bottom,En=Oe.left;if(He.style.position="absolute",He.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(He),Nt.sizer.appendChild(He),wt=="over")Yt=Oe.top;else if(wt=="above"||wt=="near"){var en=Math.max(Nt.wrapper.clientHeight,this.doc.height),Un=Math.max(Nt.sizer.clientWidth,Nt.lineSpace.clientWidth);(wt=="above"||Oe.bottom+He.offsetHeight>en)&&Oe.top>He.offsetHeight?Yt=Oe.top-He.offsetHeight:Oe.bottom+He.offsetHeight<=en&&(Yt=Oe.bottom),En+He.offsetWidth>Un&&(En=Un-He.offsetWidth)}He.style.top=Yt+"px",He.style.left=He.style.right="",It=="right"?(En=Nt.sizer.clientWidth-He.offsetWidth,He.style.right="0px"):(It=="left"?En=0:It=="middle"&&(En=(Nt.sizer.clientWidth-He.offsetWidth)/2),He.style.left=En+"px"),lt&&rh(this,{left:En,top:Yt,right:En+He.offsetWidth,bottom:Yt+He.offsetHeight})},triggerOnKeyDown:hn(Vp),triggerOnKeyPress:hn(Lc),triggerOnKeyUp:Yp,triggerOnMouseDown:hn(Mc),execCommand:function(Oe){if(Za.hasOwnProperty(Oe))return Za[Oe].call(null,this)},triggerElectric:hn(function(Oe){ig(this,Oe)}),findPosH:function(Oe,He,lt,wt){var It=1;He<0&&(It=-1,He=-He);for(var Nt=Dn(this.doc,Oe),Yt=0;Yt<He&&(Nt=Cf(this.doc,Nt,It,lt,wt),!Nt.hitSide);++Yt);return Nt},moveH:hn(function(Oe,He){var lt=this;this.extendSelectionsBy(function(wt){return lt.display.shift||lt.doc.extend||wt.empty()?Cf(lt.doc,wt.head,Oe,He,lt.options.rtlMoveVisually):Oe<0?wt.from():wt.to()},jt)}),deleteH:hn(function(Oe,He){var lt=this.doc.sel,wt=this.doc;lt.somethingSelected()?wt.replaceSelection("",null,"+delete"):pl(this,function(It){var Nt=Cf(wt,It.head,Oe,He,!1);return Oe<0?{from:Nt,to:It.head}:{from:It.head,to:Nt}})}),findPosV:function(Oe,He,lt,wt){var It=1,Nt=wt;He<0&&(It=-1,He=-He);for(var Yt=Dn(this.doc,Oe),En=0;En<He;++En){var en=Ds(this,Yt,"div");if(Nt==null?Nt=en.left:en.left=Nt,Yt=kh(this,en,It,lt),Yt.hitSide)break}return Yt},moveV:hn(function(Oe,He){var lt=this,wt=this.doc,It=[],Nt=!this.display.shift&&!wt.extend&&wt.sel.somethingSelected();if(wt.extendSelectionsBy(function(En){if(Nt)return Oe<0?En.from():En.to();var en=Ds(lt,En.head,"div");En.goalColumn!=null&&(en.left=En.goalColumn),It.push(en.left);var Un=kh(lt,en,Oe,He);return He=="page"&&En==wt.sel.primary()&&Ch(lt,Rl(lt,Un,"div").top-en.top),Un},jt),It.length)for(var Yt=0;Yt<wt.sel.ranges.length;Yt++)wt.sel.ranges[Yt].goalColumn=It[Yt]}),findWordAt:function(Oe){var He=this.doc,lt=dn(He,Oe.line).text,wt=Oe.ch,It=Oe.ch;if(lt){var Nt=this.getHelper(Oe,"wordChars");(Oe.sticky=="before"||It==lt.length)&&wt?--wt:++It;for(var Yt=lt.charAt(wt),En=Qe(Yt,Nt)?function(en){return Qe(en,Nt)}:/\s/.test(Yt)?function(en){return/\s/.test(en)}:function(en){return!/\s/.test(en)&&!Qe(en)};wt>0&&En(lt.charAt(wt-1));)--wt;for(;It<lt.length&&En(lt.charAt(It));)++It}return new _i(Gt(Oe.line,wt),Gt(Oe.line,It))},toggleOverwrite:function(Oe){Oe!=null&&Oe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?bt(this.display.cursorDiv,"CodeMirror-overwrite"):ke(this.display.cursorDiv,"CodeMirror-overwrite"),fn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ut()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:hn(function(Oe,He){oo(this,Oe,He)}),getScrollInfo:function(){var Oe=this.display.scroller;return{left:Oe.scrollLeft,top:Oe.scrollTop,height:Oe.scrollHeight-Ua(this)-this.display.barHeight,width:Oe.scrollWidth-Ua(this)-this.display.barWidth,clientHeight:Uu(this),clientWidth:Ga(this)}},scrollIntoView:hn(function(Oe,He){Oe==null?(Oe={from:this.doc.sel.primary().head,to:null},He==null&&(He=this.options.cursorScrollMargin)):typeof Oe=="number"?Oe={from:Gt(Oe,0),to:null}:Oe.from==null&&(Oe={from:Oe,to:null}),Oe.to||(Oe.to=Oe.from),Oe.margin=He||0,Oe.from.line!=null?es(this,Oe):qh(this,Oe.from,Oe.to,Oe.margin)}),setSize:hn(function(Oe,He){var lt=this,wt=function(Nt){return typeof Nt=="number"||/^\d+$/.test(String(Nt))?Nt+"px":Nt};Oe!=null&&(this.display.wrapper.style.width=wt(Oe)),He!=null&&(this.display.wrapper.style.height=wt(He)),this.options.lineWrapping&&ia(this);var It=this.display.viewFrom;this.doc.iter(It,this.display.viewTo,function(Nt){if(Nt.widgets){for(var Yt=0;Yt<Nt.widgets.length;Yt++)if(Nt.widgets[Yt].noHScroll){wo(lt,It,"widget");break}}++It}),this.curOp.forceUpdate=!0,fn(this,"refresh",this)}),operation:function(Oe){return Lt(this,Oe)},startOperation:function(){return ka(this)},endOperation:function(){return oc(this)},refresh:hn(function(){var Oe=this.display.cachedTextHeight;Ps(this),this.curOp.forceUpdate=!0,Is(this),oo(this,this.doc.scrollLeft,this.doc.scrollTop),Ri(this.display),(Oe==null||Math.abs(Oe-Tu(this.display))>.5||this.options.lineWrapping)&&Wr(this),fn(this,"refresh",this)}),swapDoc:hn(function(Oe){var He=this.doc;return He.cm=null,this.state.selectingText&&this.state.selectingText(),Hr(this,Oe),Is(this),this.display.input.reset(),oo(this,Oe.scrollLeft,Oe.scrollTop),this.curOp.forceScroll=!0,Ei(this,"swapDoc",this,He),He}),phrase:function(Oe){var He=this.options.phrases;return He&&Object.prototype.hasOwnProperty.call(He,Oe)?He[Oe]:Oe},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ci(re),re.registerHelper=function(Oe,He,lt){De.hasOwnProperty(Oe)||(De[Oe]=re[Oe]={_global:[]}),De[Oe][He]=lt},re.registerGlobalHelper=function(Oe,He,lt,wt){re.registerHelper(Oe,He,wt),De[Oe]._global.push({pred:lt,val:wt})}}function Cf(re,pe,De,Oe,He){var lt=pe,wt=De,It=dn(re,pe.line),Nt=He&&re.direction=="rtl"?-De:De;function Yt(){var Br=pe.line+Nt;return Br<re.first||Br>=re.first+re.size?!1:(pe=new Gt(Br,pe.ch,pe.sticky),It=dn(re,Br))}function En(Br){var br;if(Oe=="codepoint"){var Ur=It.text.charCodeAt(pe.ch+(Oe>0?0:-1));isNaN(Ur)?br=null:br=new Gt(pe.line,Math.max(0,Math.min(It.text.length,pe.ch+De*(Ur>=55296&&Ur<56320?2:1))),-De)}else He?br=Vs(re.cm,It,pe,De):br=ya(It,pe,De);if(br==null)if(!Br&&Yt())pe=cs(He,re.cm,It,pe.line,Nt);else return!1;else pe=br;return!0}if(Oe=="char"||Oe=="codepoint")En();else if(Oe=="column")En(!0);else if(Oe=="word"||Oe=="group")for(var en=null,Un=Oe=="group",Fn=re.cm&&re.cm.getHelper(pe,"wordChars"),vi=!0;!(De<0&&!En(!vi));vi=!1){var Pi=It.text.charAt(pe.ch)||`
|
|
|
`,ji=Qe(Pi,Fn)?"w":Un&&Pi==`
|
|
|
`?"n":!Un||/\s/.test(Pi)?null:"p";if(Un&&!vi&&!ji&&(ji="s"),en&&en!=ji){De<0&&(De=1,En(),pe.sticky="after");break}if(ji&&(en=ji),De>0&&!En(!vi))break}var sr=du(re,pe,lt,wt,!0);return Bn(lt,sr)&&(sr.hitSide=!0),sr}function kh(re,pe,De,Oe){var He=re.doc,lt=pe.left,wt;if(Oe=="page"){var It=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Nt=Math.max(It-.5*Tu(re.display),3);wt=(De>0?pe.bottom:pe.top)+De*Nt}else Oe=="line"&&(wt=De>0?pe.bottom+3:pe.top-3);for(var Yt;Yt=wc(re,lt,wt),!!Yt.outside;){if(De<0?wt<=0:wt>=He.height){Yt.hitSide=!0;break}wt+=De*5}return Yt}var Xs=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new it,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Xs.prototype.init=function(re){var pe=this,De=this,Oe=De.cm,He=De.div=re.lineDiv;og(He,Oe.options.spellcheck,Oe.options.autocorrect,Oe.options.autocapitalize);function lt(It){for(var Nt=It.target;Nt;Nt=Nt.parentNode){if(Nt==He)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Nt.className))break}return!1}Jt(He,"paste",function(It){!lt(It)||Mn(Oe,It)||ng(It,Oe)||_e<=11&&setTimeout(Sn(Oe,function(){return pe.updateFromDOM()}),20)}),Jt(He,"compositionstart",function(It){pe.composing={data:It.data,done:!1}}),Jt(He,"compositionupdate",function(It){pe.composing||(pe.composing={data:It.data,done:!1})}),Jt(He,"compositionend",function(It){pe.composing&&(It.data!=pe.composing.data&&pe.readFromDOMSoon(),pe.composing.done=!0)}),Jt(He,"touchstart",function(){return De.forceCompositionEnd()}),Jt(He,"input",function(){pe.composing||pe.readFromDOMSoon()});function wt(It){if(!(!lt(It)||Mn(Oe,It))){if(Oe.somethingSelected())ld({lineWise:!1,text:Oe.getSelections()}),It.type=="cut"&&Oe.replaceSelection("",null,"cut");else if(Oe.options.lineWiseCopyCut){var Nt=rg(Oe);ld({lineWise:!0,text:Nt.text}),It.type=="cut"&&Oe.operation(function(){Oe.setSelections(Nt.ranges,0,vt),Oe.replaceSelection("",null,"cut")})}else return;if(It.clipboardData){It.clipboardData.clearData();var Yt=tu.text.join(`
|
|
|
`);if(It.clipboardData.setData("Text",Yt),It.clipboardData.getData("Text")==Yt){It.preventDefault();return}}var En=sg(),en=En.firstChild;Oe.display.lineSpace.insertBefore(En,Oe.display.lineSpace.firstChild),en.value=tu.text.join(`
|
|
|
`);var Un=document.activeElement;St(en),setTimeout(function(){Oe.display.lineSpace.removeChild(En),Un.focus(),Un==He&&De.showPrimarySelection()},50)}}Jt(He,"copy",wt),Jt(He,"cut",wt)},Xs.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Xs.prototype.prepareSelection=function(){var re=_c(this.cm,!1);return re.focus=document.activeElement==this.div,re},Xs.prototype.showSelection=function(re,pe){!re||!this.cm.display.view.length||((re.focus||pe)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Xs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Xs.prototype.showPrimarySelection=function(){var re=this.getSelection(),pe=this.cm,De=pe.doc.sel.primary(),Oe=De.from(),He=De.to();if(pe.display.viewTo==pe.display.viewFrom||Oe.line>=pe.display.viewTo||He.line<pe.display.viewFrom){re.removeAllRanges();return}var lt=_f(pe,re.anchorNode,re.anchorOffset),wt=_f(pe,re.focusNode,re.focusOffset);if(!(lt&&!lt.bad&&wt&&!wt.bad&&sn(Gn(lt,wt),Oe)==0&&sn(qn(lt,wt),He)==0)){var It=pe.display.view,Nt=Oe.line>=pe.display.viewFrom&&op(pe,Oe)||{node:It[0].measure.map[2],offset:0},Yt=He.line<pe.display.viewTo&&op(pe,He);if(!Yt){var En=It[It.length-1].measure,en=En.maps?En.maps[En.maps.length-1]:En.map;Yt={node:en[en.length-1],offset:en[en.length-2]-en[en.length-3]}}if(!Nt||!Yt){re.removeAllRanges();return}var Un=re.rangeCount&&re.getRangeAt(0),Fn;try{Fn=We(Nt.node,Nt.offset,Yt.offset,Yt.node)}catch(vi){}Fn&&(!Le&&pe.state.focused?(re.collapse(Nt.node,Nt.offset),Fn.collapsed||(re.removeAllRanges(),re.addRange(Fn))):(re.removeAllRanges(),re.addRange(Fn)),Un&&re.anchorNode==null?re.addRange(Un):Le&&this.startGracePeriod()),this.rememberSelection()}},Xs.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)},Xs.prototype.showMultipleSelections=function(re){je(this.cm.display.cursorDiv,re.cursors),je(this.cm.display.selectionDiv,re.selection)},Xs.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Xs.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var pe=re.getRangeAt(0).commonAncestorContainer;return gt(this.div,pe)},Xs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Xs.prototype.blur=function(){this.div.blur()},Xs.prototype.getField=function(){return this.div},Xs.prototype.supportsTouch=function(){return!0},Xs.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():Lt(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)},Xs.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Xs.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 De=_f(pe,re.anchorNode,re.anchorOffset),Oe=_f(pe,re.focusNode,re.focusOffset);De&&Oe&&Lt(pe,function(){ks(pe.doc,mr(De,Oe),vt),(De.bad||Oe.bad)&&(pe.curOp.selectionChanged=!0)})}}},Xs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,pe=re.display,De=re.doc.sel.primary(),Oe=De.from(),He=De.to();if(Oe.ch==0&&Oe.line>re.firstLine()&&(Oe=Gt(Oe.line-1,dn(re.doc,Oe.line-1).length)),He.ch==dn(re.doc,He.line).text.length&&He.line<re.lastLine()&&(He=Gt(He.line+1,0)),Oe.line<pe.viewFrom||He.line>pe.viewTo-1)return!1;var lt,wt,It;Oe.line==pe.viewFrom||(lt=Ks(re,Oe.line))==0?(wt=Ft(pe.view[0].line),It=pe.view[0].node):(wt=Ft(pe.view[lt].line),It=pe.view[lt-1].node.nextSibling);var Nt=Ks(re,He.line),Yt,En;if(Nt==pe.view.length-1?(Yt=pe.viewTo-1,En=pe.lineDiv.lastChild):(Yt=Ft(pe.view[Nt+1].line)-1,En=pe.view[Nt+1].node.previousSibling),!It)return!1;for(var en=re.doc.splitLines($d(re,It,En,wt,Yt)),Un=_n(re.doc,Gt(wt,0),Gt(Yt,dn(re.doc,Yt).text.length));en.length>1&&Un.length>1;)if(Ut(en)==Ut(Un))en.pop(),Un.pop(),Yt--;else if(en[0]==Un[0])en.shift(),Un.shift(),wt++;else break;for(var Fn=0,vi=0,Pi=en[0],ji=Un[0],sr=Math.min(Pi.length,ji.length);Fn<sr&&Pi.charCodeAt(Fn)==ji.charCodeAt(Fn);)++Fn;for(var Br=Ut(en),br=Ut(Un),Ur=Math.min(Br.length-(en.length==1?Fn:0),br.length-(Un.length==1?Fn:0));vi<Ur&&Br.charCodeAt(Br.length-vi-1)==br.charCodeAt(br.length-vi-1);)++vi;if(en.length==1&&Un.length==1&&wt==Oe.line)for(;Fn&&Fn>Oe.ch&&Br.charCodeAt(Br.length-vi-1)==br.charCodeAt(br.length-vi-1);)Fn--,vi++;en[en.length-1]=Br.slice(0,Br.length-vi).replace(/^\u200b+/,""),en[0]=en[0].slice(Fn).replace(/\u200b+$/,"");var bo=Gt(wt,Fn),yr=Gt(Yt,Un.length?Ut(Un).length-vi:0);if(en.length>1||en[0]||sn(bo,yr))return sc(re.doc,en,bo,yr,"+input"),!0},Xs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Xs.prototype.reset=function(){this.forceCompositionEnd()},Xs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Xs.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))},Xs.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&Lt(this.cm,function(){return Ps(re.cm)})},Xs.prototype.setUneditable=function(re){re.contentEditable="false"},Xs.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||Sn(this.cm,bf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Xs.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Xs.prototype.onContextMenu=function(){},Xs.prototype.resetPosition=function(){},Xs.prototype.needsContentAttribute=!0;function op(re,pe){var De=Gu(re,pe.line);if(!De||De.hidden)return null;var Oe=dn(re.doc,pe.line),He=Eu(De,Oe,pe.line),lt=tn(Oe,re.doc.direction),wt="left";if(lt){var It=at(lt,pe.ch);wt=It%2?"right":"left"}var Nt=xc(He.map,pe.ch,wt);return Nt.offset=Nt.collapse=="right"?Nt.end:Nt.start,Nt}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,De,Oe,He){var lt="",wt=!1,It=re.doc.lineSeparator(),Nt=!1;function Yt(Fn){return function(vi){return vi.id==Fn}}function En(){wt&&(lt+=It,Nt&&(lt+=It),wt=Nt=!1)}function en(Fn){Fn&&(En(),lt+=Fn)}function Un(Fn){if(Fn.nodeType==1){var vi=Fn.getAttribute("cm-text");if(vi){en(vi);return}var Pi=Fn.getAttribute("cm-marker"),ji;if(Pi){var sr=re.findMarks(Gt(Oe,0),Gt(He+1,0),Yt(+Pi));sr.length&&(ji=sr[0].find(0))&&en(_n(re.doc,ji.from,ji.to).join(It));return}if(Fn.getAttribute("contenteditable")=="false")return;var Br=/^(pre|div|p|li|table|br)$/i.test(Fn.nodeName);if(!/^br$/i.test(Fn.nodeName)&&Fn.textContent.length==0)return;Br&&En();for(var br=0;br<Fn.childNodes.length;br++)Un(Fn.childNodes[br]);/^(pre|p)$/i.test(Fn.nodeName)&&(Nt=!0),Br&&(wt=!0)}else Fn.nodeType==3&&en(Fn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Un(pe),pe!=De;)pe=pe.nextSibling,Nt=!1;return lt}function _f(re,pe,De){var Oe;if(pe==re.display.lineDiv){if(Oe=re.display.lineDiv.childNodes[De],!Oe)return Vd(re.clipPos(Gt(re.display.viewTo-1)),!0);pe=null,De=0}else for(Oe=pe;;Oe=Oe.parentNode){if(!Oe||Oe==re.display.lineDiv)return null;if(Oe.parentNode&&Oe.parentNode==re.display.lineDiv)break}for(var He=0;He<re.display.view.length;He++){var lt=re.display.view[He];if(lt.node==Oe)return hm(lt,pe,De)}}function hm(re,pe,De){var Oe=re.text.firstChild,He=!1;if(!pe||!gt(Oe,pe))return Vd(Gt(Ft(re.line),0),!0);if(pe==Oe&&(He=!0,pe=Oe.childNodes[De],De=0,!pe)){var lt=re.rest?Ut(re.rest):re.line;return Vd(Gt(Ft(lt),lt.text.length),He)}var wt=pe.nodeType==3?pe:null,It=pe;for(!wt&&pe.childNodes.length==1&&pe.firstChild.nodeType==3&&(wt=pe.firstChild,De&&(De=wt.nodeValue.length));It.parentNode!=Oe;)It=It.parentNode;var Nt=re.measure,Yt=Nt.maps;function En(ji,sr,Br){for(var br=-1;br<(Yt?Yt.length:0);br++)for(var Ur=br<0?Nt.map:Yt[br],bo=0;bo<Ur.length;bo+=3){var yr=Ur[bo+2];if(yr==ji||yr==sr){var Fo=Ft(br<0?re.line:re.rest[br]),la=Ur[bo]+Br;return(Br<0||yr!=ji)&&(la=Ur[bo+(Br?1:0)]),Gt(Fo,la)}}}var en=En(wt,It,De);if(en)return Vd(en,He);for(var Un=It.nextSibling,Fn=wt?wt.nodeValue.length-De:0;Un;Un=Un.nextSibling){if(en=En(Un,Un.firstChild,0),en)return Vd(Gt(en.line,en.ch-Fn),He);Fn+=Un.textContent.length}for(var vi=It.previousSibling,Pi=De;vi;vi=vi.previousSibling){if(en=En(vi,vi.firstChild,-1),en)return Vd(Gt(en.line,en.ch+Pi),He);Pi+=vi.textContent.length}}var Da=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new it,this.hasSelection=!1,this.composing=null};Da.prototype.init=function(re){var pe=this,De=this,Oe=this.cm;this.createField(re);var He=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),ue&&(He.style.width="0px"),Jt(He,"input",function(){Ce&&_e>=9&&pe.hasSelection&&(pe.hasSelection=null),De.poll()}),Jt(He,"paste",function(wt){Mn(Oe,wt)||ng(wt,Oe)||(Oe.state.pasteIncoming=+new Date,De.fastPoll())});function lt(wt){if(!Mn(Oe,wt)){if(Oe.somethingSelected())ld({lineWise:!1,text:Oe.getSelections()});else if(Oe.options.lineWiseCopyCut){var It=rg(Oe);ld({lineWise:!0,text:It.text}),wt.type=="cut"?Oe.setSelections(It.ranges,null,vt):(De.prevInput="",He.value=It.text.join(`
|
|
|
`),St(He))}else return;wt.type=="cut"&&(Oe.state.cutIncoming=+new Date)}}Jt(He,"cut",lt),Jt(He,"copy",lt),Jt(re.scroller,"paste",function(wt){if(!(Ha(re,wt)||Mn(Oe,wt))){if(!He.dispatchEvent){Oe.state.pasteIncoming=+new Date,De.focus();return}var It=new Event("paste");It.clipboardData=wt.clipboardData,He.dispatchEvent(It)}}),Jt(re.lineSpace,"selectstart",function(wt){Ha(re,wt)||ai(wt)}),Jt(He,"compositionstart",function(){var wt=Oe.getCursor("from");De.composing&&De.composing.range.clear(),De.composing={start:wt,range:Oe.markText(wt,Oe.getCursor("to"),{className:"CodeMirror-composing"})}}),Jt(He,"compositionend",function(){De.composing&&(De.poll(),De.composing.range.clear(),De.composing=null)})},Da.prototype.createField=function(re){this.wrapper=sg(),this.textarea=this.wrapper.firstChild},Da.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Da.prototype.prepareSelection=function(){var re=this.cm,pe=re.display,De=re.doc,Oe=_c(re);if(re.options.moveInputWithCursor){var He=Ds(re,De.sel.primary().head,"div"),lt=pe.wrapper.getBoundingClientRect(),wt=pe.lineDiv.getBoundingClientRect();Oe.teTop=Math.max(0,Math.min(pe.wrapper.clientHeight-10,He.top+wt.top-lt.top)),Oe.teLeft=Math.max(0,Math.min(pe.wrapper.clientWidth-10,He.left+wt.left-lt.left))}return Oe},Da.prototype.showSelection=function(re){var pe=this.cm,De=pe.display;je(De.cursorDiv,re.cursors),je(De.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Da.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var pe=this.cm;if(pe.somethingSelected()){this.prevInput="";var De=pe.getSelection();this.textarea.value=De,pe.state.focused&&St(this.textarea),Ce&&_e>=9&&(this.hasSelection=De)}else re||(this.prevInput=this.textarea.value="",Ce&&_e>=9&&(this.hasSelection=null))}},Da.prototype.getField=function(){return this.textarea},Da.prototype.supportsTouch=function(){return!1},Da.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||ut()!=this.textarea))try{this.textarea.focus()}catch(re){}},Da.prototype.blur=function(){this.textarea.blur()},Da.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Da.prototype.receivedFocus=function(){this.slowPoll()},Da.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Da.prototype.fastPoll=function(){var re=!1,pe=this;pe.pollingFast=!0;function De(){var Oe=pe.poll();!Oe&&!re?(re=!0,pe.polling.set(60,De)):(pe.pollingFast=!1,pe.slowPoll())}pe.polling.set(20,De)},Da.prototype.poll=function(){var re=this,pe=this.cm,De=this.textarea,Oe=this.prevInput;if(this.contextMenuPending||!pe.state.focused||st(De)&&!Oe&&!this.composing||pe.isReadOnly()||pe.options.disableInput||pe.state.keySeq)return!1;var He=De.value;if(He==Oe&&!pe.somethingSelected())return!1;if(Ce&&_e>=9&&this.hasSelection===He||oe&&/[\uf700-\uf7ff]/.test(He))return pe.display.input.reset(),!1;if(pe.doc.sel==pe.display.selForContextMenu){var lt=He.charCodeAt(0);if(lt==8203&&!Oe&&(Oe="\u200B"),lt==8666)return this.reset(),this.cm.execCommand("undo")}for(var wt=0,It=Math.min(Oe.length,He.length);wt<It&&Oe.charCodeAt(wt)==He.charCodeAt(wt);)++wt;return Lt(pe,function(){bf(pe,He.slice(wt),Oe.length-wt,null,re.composing?"*compose":null),He.length>1e3||He.indexOf(`
|
|
|
`)>-1?De.value=re.prevInput="":re.prevInput=He,re.composing&&(re.composing.range.clear(),re.composing.range=pe.markText(re.composing.start,pe.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Da.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Da.prototype.onKeyPress=function(){Ce&&_e>=9&&(this.hasSelection=null),this.fastPoll()},Da.prototype.onContextMenu=function(re){var pe=this,De=pe.cm,Oe=De.display,He=pe.textarea;pe.contextMenuPending&&pe.contextMenuPending();var lt=Na(De,re),wt=Oe.scroller.scrollTop;if(!lt||ge)return;var It=De.options.resetSelectionOnContextMenu;It&&De.doc.sel.contains(lt)==-1&&Sn(De,ks)(De.doc,mr(lt),vt);var Nt=He.style.cssText,Yt=pe.wrapper.style.cssText,En=pe.wrapper.offsetParent.getBoundingClientRect();pe.wrapper.style.cssText="position: static",He.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(re.clientY-En.top-5)+"px; left: "+(re.clientX-En.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Ce?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var en;he&&(en=window.scrollY),Oe.input.focus(),he&&window.scrollTo(null,en),Oe.input.reset(),De.somethingSelected()||(He.value=pe.prevInput=" "),pe.contextMenuPending=Fn,Oe.selForContextMenu=De.doc.sel,clearTimeout(Oe.detectingSelectAll);function Un(){if(He.selectionStart!=null){var Pi=De.somethingSelected(),ji="\u200B"+(Pi?He.value:"");He.value="\u21DA",He.value=ji,pe.prevInput=Pi?"":"\u200B",He.selectionStart=1,He.selectionEnd=ji.length,Oe.selForContextMenu=De.doc.sel}}function Fn(){if(pe.contextMenuPending==Fn&&(pe.contextMenuPending=!1,pe.wrapper.style.cssText=Yt,He.style.cssText=Nt,Ce&&_e<9&&Oe.scrollbars.setScrollTop(Oe.scroller.scrollTop=wt),He.selectionStart!=null)){(!Ce||Ce&&_e<9)&&Un();var Pi=0,ji=function(){Oe.selForContextMenu==De.doc.sel&&He.selectionStart==0&&He.selectionEnd>0&&pe.prevInput=="\u200B"?Sn(De,ds)(De):Pi++<10?Oe.detectingSelectAll=setTimeout(ji,500):(Oe.selForContextMenu=null,Oe.input.reset())};Oe.detectingSelectAll=setTimeout(ji,200)}}if(Ce&&_e>=9&&Un(),we){or(re);var vi=function(){kn(window,"mouseup",vi),setTimeout(Fn,20)};Jt(window,"mouseup",vi)}else setTimeout(Fn,50)},Da.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Da.prototype.setUneditable=function(){},Da.prototype.needsContentAttribute=!1;function dm(re,pe){if(pe=pe?Bt(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 De=ut();pe.autofocus=De==re||re.getAttribute("autofocus")!=null&&De==document.body}function Oe(){re.value=It.getValue()}var He;if(re.form&&(Jt(re.form,"submit",Oe),!pe.leaveSubmitMethodAlone)){var lt=re.form;He=lt.submit;try{var wt=lt.submit=function(){Oe(),lt.submit=He,lt.submit(),lt.submit=wt}}catch(Nt){}}pe.finishInit=function(Nt){Nt.save=Oe,Nt.getTextArea=function(){return re},Nt.toTextArea=function(){Nt.toTextArea=isNaN,Oe(),re.parentNode.removeChild(Nt.getWrapperElement()),re.style.display="",re.form&&(kn(re.form,"submit",Oe),!pe.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=He))}},re.style.display="none";var It=gs(function(Nt){return re.parentNode.insertBefore(Nt,re.nextSibling)},pe);return It}function Yd(re){re.off=kn,re.on=Jt,re.wheelEventPixels=gi,re.Doc=Ia,re.splitLines=zi,re.countColumn=ht,re.findColumn=un,re.isWordChar=qe,re.Pass=Et,re.signal=fn,re.Line=rs,re.changeEnd=ir,re.scrollbarModel=Id,re.Pos=Gt,re.cmpPos=sn,re.modes=Gr,re.mimeModes=uo,re.resolveMode=cn,re.getMode=$e,re.modeExtensions=tt,re.extendMode=et,re.copyState=Pt,re.startState=kt,re.innerMode=At,re.commands=Za,re.keyMap=Ll,re.keyName=Ud,re.isModifierKey=Lh,re.lookupKey=eu,re.normalizeKeyMap=zd,re.StringStream=Ct,re.SharedTextMarker=ac,re.TextMarker=pn,re.LineWidget=Pa,re.e_preventDefault=ai,re.e_stopPropagation=ki,re.e_stop=or,re.addClass=bt,re.contains=gt,re.rmClass=ke,re.keyNames=Ku}um(gs),Th(gs);var ah="iter insert remove copy getEditor constructor".split(" ");for(var Pf in Ia.prototype)Ia.prototype.hasOwnProperty(Pf)&&dt(ah,Pf)<0&&(gs.prototype[Pf]=function(re){return function(){return re.apply(this.doc,arguments)}}(Ia.prototype[Pf]));return ci(Ia),gs.inputStyles={textarea:Da,contenteditable:Xs},gs.defineMode=function(re){!gs.defaults.mode&&re!="null"&&(gs.defaults.mode=re),Zr.apply(this,arguments)},gs.defineMIME=co,gs.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),gs.defineMIME("text/plain","null"),gs.defineExtension=function(re,pe){gs.prototype[re]=pe},gs.defineDocExtension=function(re,pe){Ia.prototype[re]=pe},gs.fromTextArea=dm,Yd(gs),gs.version="5.58.2",gs})},25419:function(Pn,qt,Ee){(function(Le){Le(Ee(89780),Ee(15525),Ee(98101))})(function(Le){"use strict";Le.defineMode("markdown",function(me,Ie){var Te=Le.getMode(me,"text/html"),Ce=Te.name=="null";function _e(ht){if(Le.findModeByName){var it=Le.findModeByName(ht);it&&(ht=it.mime||it.mimes[0])}var dt=Le.getMode(me,ht);return dt.name=="null"?null:dt}Ie.highlightFormatting===void 0&&(Ie.highlightFormatting=!1),Ie.maxBlockquoteDepth===void 0&&(Ie.maxBlockquoteDepth=0),Ie.taskLists===void 0&&(Ie.taskLists=!1),Ie.strikethrough===void 0&&(Ie.strikethrough=!1),Ie.emoji===void 0&&(Ie.emoji=!1),Ie.fencedCodeBlockHighlighting===void 0&&(Ie.fencedCodeBlockHighlighting=!0),Ie.fencedCodeBlockDefaultMode===void 0&&(Ie.fencedCodeBlockDefaultMode="text/plain"),Ie.xml===void 0&&(Ie.xml=!0),Ie.tokenTypeOverrides===void 0&&(Ie.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 Se in he)he.hasOwnProperty(Se)&&Ie.tokenTypeOverrides[Se]&&(he[Se]=Ie.tokenTypeOverrides[Se]);var xe=/^([*\-_])(?:\s*\1){2,}\s*$/,ge=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ce=/^\[(x| )\](?=\s)/i,ve=Ie.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,de=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ue=/^[^#!\[\]*_\\<>` "'(~:]+/,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(ht,it,dt){return it.f=it.inline=dt,dt(ht,it)}function le(ht,it,dt){return it.f=it.block=dt,dt(ht,it)}function ye(ht){return!ht||!/\S/.test(ht.string)}function we(ht){if(ht.linkTitle=!1,ht.linkHref=!1,ht.linkText=!1,ht.em=!1,ht.strong=!1,ht.strikethrough=!1,ht.quote=0,ht.indentedCode=!1,ht.f==ke){var it=Ce;if(!it){var dt=Le.innerMode(Te,ht.htmlState);it=dt.mode.name=="xml"&&dt.state.tagStart===null&&!dt.state.context&&dt.state.tokenize.isInText}it&&(ht.f=Je,ht.block=be,ht.htmlState=null)}return ht.trailingSpace=0,ht.trailingSpaceNewLine=!1,ht.prevLine=ht.thisLine,ht.thisLine={stream:null},null}function be(ht,it){var dt=ht.column()===it.indentation,yt=ye(it.prevLine.stream),Et=it.indentedCode,vt=it.prevLine.hr,Rt=it.list!==!1,jt=(it.listStack[it.listStack.length-1]||0)+3;it.indentedCode=!1;var un=it.indentation;if(it.indentationDiff===null&&(it.indentationDiff=it.indentation,Rt)){for(it.list=null;un<it.listStack[it.listStack.length-1];)it.listStack.pop(),it.listStack.length?it.indentation=it.listStack[it.listStack.length-1]:it.list=!1;it.list!==!1&&(it.indentationDiff=un-it.listStack[it.listStack.length-1])}var Vt=!yt&&!vt&&!it.prevLine.header&&(!Rt||!Et)&&!it.prevLine.fencedCodeEnd,xn=(it.list===!1||vt||yt)&&it.indentation<=jt&&ht.match(xe),Ut=null;if(it.indentationDiff>=4&&(Et||it.prevLine.fencedCodeEnd||it.prevLine.header||yt))return ht.skipToEnd(),it.indentedCode=!0,he.code;if(ht.eatSpace())return null;if(dt&&it.indentation<=jt&&(Ut=ht.match(ve))&&Ut[1].length<=6)return it.quote=0,it.header=Ut[1].length,it.thisLine.header=!0,Ie.highlightFormatting&&(it.formatting="header"),it.f=it.inline,je(it);if(it.indentation<=jt&&ht.eat(">"))return it.quote=dt?1:it.quote+1,Ie.highlightFormatting&&(it.formatting="quote"),ht.eatSpace(),je(it);if(!xn&&!it.setext&&dt&&it.indentation<=jt&&(Ut=ht.match(ge))){var Zt=Ut[1]?"ol":"ul";return it.indentation=un+ht.current().length,it.list=!0,it.quote=0,it.listStack.push(it.indentation),it.em=!1,it.strong=!1,it.code=!1,it.strikethrough=!1,Ie.taskLists&&ht.match(ce,!1)&&(it.taskList=!0),it.f=it.inline,Ie.highlightFormatting&&(it.formatting=["list","list-"+Zt]),je(it)}else{if(dt&&it.indentation<=jt&&(Ut=ht.match(z,!0)))return it.quote=0,it.fencedEndRE=new RegExp(Ut[1]+"+ *$"),it.localMode=Ie.fencedCodeBlockHighlighting&&_e(Ut[2]||Ie.fencedCodeBlockDefaultMode),it.localMode&&(it.localState=Le.startState(it.localMode)),it.f=it.block=Ne,Ie.highlightFormatting&&(it.formatting="code-block"),it.code=-1,je(it);if(it.setext||(!Vt||!Rt)&&!it.quote&&it.list===!1&&!it.code&&!xn&&!ee.test(ht.string)&&(Ut=ht.lookAhead(1))&&(Ut=Ut.match(de)))return it.setext?(it.header=it.setext,it.setext=0,ht.skipToEnd(),Ie.highlightFormatting&&(it.formatting="header")):(it.header=Ut[0].charAt(0)=="="?1:2,it.setext=it.header),it.thisLine.header=!0,it.f=it.inline,je(it);if(xn)return ht.skipToEnd(),it.hr=!0,it.thisLine.hr=!0,he.hr;if(ht.peek()==="[")return se(ht,it,rt)}return se(ht,it,it.inline)}function ke(ht,it){var dt=Te.token(ht,it.htmlState);if(!Ce){var yt=Le.innerMode(Te,it.htmlState);(yt.mode.name=="xml"&&yt.state.tagStart===null&&!yt.state.context&&yt.state.tokenize.isInText||it.md_inside&&ht.current().indexOf(">")>-1)&&(it.f=Je,it.block=be,it.htmlState=null)}return dt}function Ne(ht,it){var dt=it.listStack[it.listStack.length-1]||0,yt=it.indentation<dt,Et=dt+3;if(it.fencedEndRE&&it.indentation<=Et&&(yt||ht.match(it.fencedEndRE))){Ie.highlightFormatting&&(it.formatting="code-block");var vt;return yt||(vt=je(it)),it.localMode=it.localState=null,it.block=be,it.f=Je,it.fencedEndRE=null,it.code=0,it.thisLine.fencedCodeEnd=!0,yt?le(ht,it,it.block):vt}else return it.localMode?it.localMode.token(ht,it.localState):(ht.skipToEnd(),he.code)}function je(ht){var it=[];if(ht.formatting){it.push(he.formatting),typeof ht.formatting=="string"&&(ht.formatting=[ht.formatting]);for(var dt=0;dt<ht.formatting.length;dt++)it.push(he.formatting+"-"+ht.formatting[dt]),ht.formatting[dt]==="header"&&it.push(he.formatting+"-"+ht.formatting[dt]+"-"+ht.header),ht.formatting[dt]==="quote"&&(!Ie.maxBlockquoteDepth||Ie.maxBlockquoteDepth>=ht.quote?it.push(he.formatting+"-"+ht.formatting[dt]+"-"+ht.quote):it.push("error"))}if(ht.taskOpen)return it.push("meta"),it.length?it.join(" "):null;if(ht.taskClosed)return it.push("property"),it.length?it.join(" "):null;if(ht.linkHref?it.push(he.linkHref,"url"):(ht.strong&&it.push(he.strong),ht.em&&it.push(he.em),ht.strikethrough&&it.push(he.strikethrough),ht.emoji&&it.push(he.emoji),ht.linkText&&it.push(he.linkText),ht.code&&it.push(he.code),ht.image&&it.push(he.image),ht.imageAltText&&it.push(he.imageAltText,"link"),ht.imageMarker&&it.push(he.imageMarker)),ht.header&&it.push(he.header,he.header+"-"+ht.header),ht.quote&&(it.push(he.quote),!Ie.maxBlockquoteDepth||Ie.maxBlockquoteDepth>=ht.quote?it.push(he.quote+"-"+ht.quote):it.push(he.quote+"-"+Ie.maxBlockquoteDepth)),ht.list!==!1){var yt=(ht.listStack.length-1)%3;yt?yt===1?it.push(he.list2):it.push(he.list3):it.push(he.list1)}return ht.trailingSpaceNewLine?it.push("trailing-space-new-line"):ht.trailingSpace&&it.push("trailing-space-"+(ht.trailingSpace%2?"a":"b")),it.length?it.join(" "):null}function Ve(ht,it){if(ht.match(ue,!0))return je(it)}function Je(ht,it){var dt=it.text(ht,it);if(typeof dt!="undefined")return dt;if(it.list)return it.list=null,je(it);if(it.taskList){var yt=ht.match(ce,!0)[1]===" ";return yt?it.taskOpen=!0:it.taskClosed=!0,Ie.highlightFormatting&&(it.formatting="task"),it.taskList=!1,je(it)}if(it.taskOpen=!1,it.taskClosed=!1,it.header&&ht.match(/^#+$/,!0))return Ie.highlightFormatting&&(it.formatting="header"),je(it);var Et=ht.next();if(it.linkTitle){it.linkTitle=!1;var vt=Et;Et==="("&&(vt=")"),vt=(vt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Rt="^\\s*(?:[^"+vt+"\\\\]+|\\\\\\\\|\\\\.)"+vt;if(ht.match(new RegExp(Rt),!0))return he.linkHref}if(Et==="`"){var jt=it.formatting;Ie.highlightFormatting&&(it.formatting="code"),ht.eatWhile("`");var un=ht.current().length;if(it.code==0&&(!it.quote||un==1))return it.code=un,je(it);if(un==it.code){var Vt=je(it);return it.code=0,Vt}else return it.formatting=jt,je(it)}else if(it.code)return je(it);if(Et==="\\"&&(ht.next(),Ie.highlightFormatting)){var xn=je(it),Ut=he.formatting+"-escape";return xn?xn+" "+Ut:Ut}if(Et==="!"&&ht.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return it.imageMarker=!0,it.image=!0,Ie.highlightFormatting&&(it.formatting="image"),je(it);if(Et==="["&&it.imageMarker&&ht.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return it.imageMarker=!1,it.imageAltText=!0,Ie.highlightFormatting&&(it.formatting="image"),je(it);if(Et==="]"&&it.imageAltText){Ie.highlightFormatting&&(it.formatting="image");var xn=je(it);return it.imageAltText=!1,it.image=!1,it.inline=it.f=gt,xn}if(Et==="["&&!it.image)return it.linkText&&ht.match(/^.*?\]/)||(it.linkText=!0,Ie.highlightFormatting&&(it.formatting="link")),je(it);if(Et==="]"&&it.linkText){Ie.highlightFormatting&&(it.formatting="link");var xn=je(it);return it.linkText=!1,it.inline=it.f=ht.match(/\(.*?\)| ?\[.*?\]/,!1)?gt:Je,xn}if(Et==="<"&&ht.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){it.f=it.inline=We,Ie.highlightFormatting&&(it.formatting="link");var xn=je(it);return xn?xn+=" ":xn="",xn+he.linkInline}if(Et==="<"&&ht.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){it.f=it.inline=We,Ie.highlightFormatting&&(it.formatting="link");var xn=je(it);return xn?xn+=" ":xn="",xn+he.linkEmail}if(Ie.xml&&Et==="<"&&ht.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Zt=ht.string.indexOf(">",ht.pos);if(Zt!=-1){var Xt=ht.string.substring(ht.start,Zt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Xt)&&(it.md_inside=!0)}return ht.backUp(1),it.htmlState=Le.startState(Te),le(ht,it,ke)}if(Ie.xml&&Et==="<"&&ht.match(/^\/\w*?>/))return it.md_inside=!1,"tag";if(Et==="*"||Et==="_"){for(var mt=1,ze=ht.pos==1?" ":ht.string.charAt(ht.pos-2);mt<3&&ht.eat(Et);)mt++;var Be=ht.peek()||" ",qe=!/\s/.test(Be)&&(!oe.test(Be)||/\s/.test(ze)||oe.test(ze)),Qe=!/\s/.test(ze)&&(!oe.test(ze)||/\s/.test(Be)||oe.test(Be)),Ue=null,Xe=null;if(mt%2&&(!it.em&&qe&&(Et==="*"||!Qe||oe.test(ze))?Ue=!0:it.em==Et&&Qe&&(Et==="*"||!qe||oe.test(Be))&&(Ue=!1)),mt>1&&(!it.strong&&qe&&(Et==="*"||!Qe||oe.test(ze))?Xe=!0:it.strong==Et&&Qe&&(Et==="*"||!qe||oe.test(Be))&&(Xe=!1)),Xe!=null||Ue!=null){Ie.highlightFormatting&&(it.formatting=Ue==null?"strong":Xe==null?"em":"strong em"),Ue===!0&&(it.em=Et),Xe===!0&&(it.strong=Et);var Vt=je(it);return Ue===!1&&(it.em=!1),Xe===!1&&(it.strong=!1),Vt}}else if(Et===" "&&(ht.eat("*")||ht.eat("_"))){if(ht.peek()===" ")return je(it);ht.backUp(1)}if(Ie.strikethrough){if(Et==="~"&&ht.eatWhile(Et)){if(it.strikethrough){Ie.highlightFormatting&&(it.formatting="strikethrough");var Vt=je(it);return it.strikethrough=!1,Vt}else if(ht.match(/^[^\s]/,!1))return it.strikethrough=!0,Ie.highlightFormatting&&(it.formatting="strikethrough"),je(it)}else if(Et===" "&&ht.match(/^~~/,!0)){if(ht.peek()===" ")return je(it);ht.backUp(2)}}if(Ie.emoji&&Et===":"&&ht.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){it.emoji=!0,Ie.highlightFormatting&&(it.formatting="emoji");var Re=je(it);return it.emoji=!1,Re}return Et===" "&&(ht.match(/^ +$/,!1)?it.trailingSpace++:it.trailingSpace&&(it.trailingSpaceNewLine=!0)),je(it)}function We(ht,it){var dt=ht.next();if(dt===">"){it.f=it.inline=Je,Ie.highlightFormatting&&(it.formatting="link");var yt=je(it);return yt?yt+=" ":yt="",yt+he.linkInline}return ht.match(/^[^>]+/,!0),he.linkInline}function gt(ht,it){if(ht.eatSpace())return null;var dt=ht.next();return dt==="("||dt==="["?(it.f=it.inline=bt(dt==="("?")":"]"),Ie.highlightFormatting&&(it.formatting="link-string"),it.linkHref=!0,je(it)):"error"}var ut={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function bt(ht){return function(it,dt){var yt=it.next();if(yt===ht){dt.f=dt.inline=Je,Ie.highlightFormatting&&(dt.formatting="link-string");var Et=je(dt);return dt.linkHref=!1,Et}return it.match(ut[ht]),dt.linkHref=!0,je(dt)}}function rt(ht,it){return ht.match(/^([^\]\\]|\\.)*\]:/,!1)?(it.f=St,ht.next(),Ie.highlightFormatting&&(it.formatting="link"),it.linkText=!0,je(it)):se(ht,it,Je)}function St(ht,it){if(ht.match(/^\]:/,!0)){it.f=it.inline=ct,Ie.highlightFormatting&&(it.formatting="link");var dt=je(it);return it.linkText=!1,dt}return ht.match(/^([^\]\\]|\\.)+/,!0),he.linkText}function ct(ht,it){return ht.eatSpace()?null:(ht.match(/^[^\s]+/,!0),ht.peek()===void 0?it.linkTitle=!0:ht.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),it.f=it.inline=Je,he.linkHref+" url")}var Bt={startState:function(){return{f:be,prevLine:{stream:null},thisLine:{stream:null},block:be,htmlState:null,indentation:0,inline:Je,text:Ve,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(ht){return{f:ht.f,prevLine:ht.prevLine,thisLine:ht.thisLine,block:ht.block,htmlState:ht.htmlState&&Le.copyState(Te,ht.htmlState),indentation:ht.indentation,localMode:ht.localMode,localState:ht.localMode?Le.copyState(ht.localMode,ht.localState):null,inline:ht.inline,text:ht.text,formatting:!1,linkText:ht.linkText,linkTitle:ht.linkTitle,linkHref:ht.linkHref,code:ht.code,em:ht.em,strong:ht.strong,strikethrough:ht.strikethrough,emoji:ht.emoji,header:ht.header,setext:ht.setext,hr:ht.hr,taskList:ht.taskList,list:ht.list,listStack:ht.listStack.slice(0),quote:ht.quote,indentedCode:ht.indentedCode,trailingSpace:ht.trailingSpace,trailingSpaceNewLine:ht.trailingSpaceNewLine,md_inside:ht.md_inside,fencedEndRE:ht.fencedEndRE}},token:function(ht,it){if(it.formatting=!1,ht!=it.thisLine.stream){if(it.header=0,it.hr=!1,ht.match(/^\s*$/,!0))return we(it),null;if(it.prevLine=it.thisLine,it.thisLine={stream:ht},it.taskList=!1,it.trailingSpace=0,it.trailingSpaceNewLine=!1,!it.localState&&(it.f=it.block,it.f!=ke)){var dt=ht.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(it.indentation=dt,it.indentationDiff=null,dt>0)return null}}return it.f(ht,it)},innerMode:function(ht){return ht.block==ke?{state:ht.htmlState,mode:Te}:ht.localState?{state:ht.localState,mode:ht.localMode}:{state:ht,mode:Bt}},indent:function(ht,it,dt){return ht.block==ke&&Te.indent?Te.indent(ht.htmlState,it,dt):ht.localState&&ht.localMode.indent?ht.localMode.indent(ht.localState,it,dt):Le.Pass},blankLine:we,getType:je,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Bt},"xml"),Le.defineMIME("text/markdown","markdown"),Le.defineMIME("text/x-markdown","markdown")})},98101:function(Pn,qt,Ee){(function(Le){Le(Ee(89780))})(function(Le){"use strict";Le.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<Le.modeInfo.length;me++){var Ie=Le.modeInfo[me];Ie.mimes&&(Ie.mime=Ie.mimes[0])}Le.findModeByMIME=function(Te){Te=Te.toLowerCase();for(var Ce=0;Ce<Le.modeInfo.length;Ce++){var _e=Le.modeInfo[Ce];if(_e.mime==Te)return _e;if(_e.mimes){for(var he=0;he<_e.mimes.length;he++)if(_e.mimes[he]==Te)return _e}}if(/\+xml$/.test(Te))return Le.findModeByMIME("application/xml");if(/\+json$/.test(Te))return Le.findModeByMIME("application/json")},Le.findModeByExtension=function(Te){Te=Te.toLowerCase();for(var Ce=0;Ce<Le.modeInfo.length;Ce++){var _e=Le.modeInfo[Ce];if(_e.ext){for(var he=0;he<_e.ext.length;he++)if(_e.ext[he]==Te)return _e}}},Le.findModeByFileName=function(Te){for(var Ce=0;Ce<Le.modeInfo.length;Ce++){var _e=Le.modeInfo[Ce];if(_e.file&&_e.file.test(Te))return _e}var he=Te.lastIndexOf("."),Se=he>-1&&Te.substring(he+1,Te.length);if(Se)return Le.findModeByExtension(Se)},Le.findModeByName=function(Te){Te=Te.toLowerCase();for(var Ce=0;Ce<Le.modeInfo.length;Ce++){var _e=Le.modeInfo[Ce];if(_e.name.toLowerCase()==Te)return _e;if(_e.alias){for(var he=0;he<_e.alias.length;he++)if(_e.alias[he].toLowerCase()==Te)return _e}}}})},67549:function(Pn,qt,Ee){(function(Le){Le(Ee(89780))})(function(Le){"use strict";Le.defineMode("stex",function(me,Ie){"use strict";function Te(ue,z){ue.cmdState.push(z)}function Ce(ue){return ue.cmdState.length>0?ue.cmdState[ue.cmdState.length-1]:null}function _e(ue){var z=ue.cmdState.pop();z&&z.closeBracket()}function he(ue){for(var z=ue.cmdState,ee=z.length-1;ee>=0;ee--){var oe=z[ee];if(oe.name!="DEFAULT")return oe}return{styleIdentifier:function(){return null}}}function Se(ue,z,ee){return function(){this.name=ue,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=Se("importmodule","tag",["string","builtin"]),xe.documentclass=Se("documentclass","tag",["","atom"]),xe.usepackage=Se("usepackage","tag",["atom"]),xe.begin=Se("begin","tag",["atom"]),xe.end=Se("end","tag",["atom"]),xe.label=Se("label","tag",["atom"]),xe.ref=Se("ref","tag",["atom"]),xe.eqref=Se("eqref","tag",["atom"]),xe.cite=Se("cite","tag",["atom"]),xe.bibitem=Se("bibitem","tag",["atom"]),xe.Bibitem=Se("Bibitem","tag",["atom"]),xe.RBibitem=Se("RBibitem","tag",["atom"]),xe.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ge(ue,z){ue.f=z}function ce(ue,z){var ee;if(ue.match(/^\\[a-zA-Z@]+/)){var oe=ue.current().slice(1);return ee=xe.hasOwnProperty(oe)?xe[oe]:xe.DEFAULT,ee=new ee,Te(z,ee),ge(z,de),ee.style}if(ue.match(/^\\[$&%#{}_]/)||ue.match(/^\\[,;!\/\\]/))return"tag";if(ue.match("\\["))return ge(z,function(se,le){return ve(se,le,"\\]")}),"keyword";if(ue.match("\\("))return ge(z,function(se,le){return ve(se,le,"\\)")}),"keyword";if(ue.match("$$"))return ge(z,function(se,le){return ve(se,le,"$$")}),"keyword";if(ue.match("$"))return ge(z,function(se,le){return ve(se,le,"$")}),"keyword";var ie=ue.next();if(ie=="%")return ue.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,Te(z,ee),"bracket"):/\d/.test(ie)?(ue.eatWhile(/[\w.%]/),"atom"):(ue.eatWhile(/[\w\-_]/),ee=he(z),ee.name=="begin"&&(ee.argument=ue.current()),ee.styleIdentifier())}function ve(ue,z,ee){if(ue.eatSpace())return null;if(ee&&ue.match(ee))return ge(z,ce),"keyword";if(ue.match(/^\\[a-zA-Z@]+/))return"tag";if(ue.match(/^[a-zA-Z]+/))return"variable-2";if(ue.match(/^\\[$&%#{}_]/)||ue.match(/^\\[,;!\/]/)||ue.match(/^[\^_&]/))return"tag";if(ue.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ue.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var oe=ue.next();return oe=="{"||oe=="}"||oe=="["||oe=="]"||oe=="("||oe==")"?"bracket":oe=="%"?(ue.skipToEnd(),"comment"):"error"}function de(ue,z){var ee=ue.peek(),oe;return ee=="{"||ee=="["?(oe=Ce(z),oe.openBracket(ee),ue.eat(ee),ge(z,ce),"bracket"):/[ \t\r]/.test(ee)?(ue.eat(ee),null):(ge(z,ce),_e(z),ce(ue,z))}return{startState:function(){var ue=Ie.inMathMode?function(z,ee){return ve(z,ee)}:ce;return{cmdState:[],f:ue}},copyState:function(ue){return{cmdState:ue.cmdState.slice(),f:ue.f}},token:function(ue,z){return z.f(ue,z)},blankLine:function(ue){ue.f=ce,ue.cmdState.length=0},lineComment:"%"}}),Le.defineMIME("text/x-stex","stex"),Le.defineMIME("text/x-latex","stex")})},15525:function(Pn,qt,Ee){(function(Le){Le(Ee(89780))})(function(Le){"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},Ie={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Le.defineMode("xml",function(Te,Ce){var _e=Te.indentUnit,he={},Se=Ce.htmlMode?me:Ie;for(var xe in Se)he[xe]=Se[xe];for(var xe in Ce)he[xe]=Ce[xe];var ge,ce;function ve(We,gt){function ut(St){return gt.tokenize=St,St(We,gt)}var bt=We.next();if(bt=="<")return We.eat("!")?We.eat("[")?We.match("CDATA[")?ut(z("atom","]]>")):null:We.match("--")?ut(z("comment","-->")):We.match("DOCTYPE",!0,!0)?(We.eatWhile(/[\w\._\-]/),ut(ee(1))):null:We.eat("?")?(We.eatWhile(/[\w\._\-]/),gt.tokenize=z("meta","?>"),"meta"):(ge=We.eat("/")?"closeTag":"openTag",gt.tokenize=de,"tag bracket");if(bt=="&"){var rt;return We.eat("#")?We.eat("x")?rt=We.eatWhile(/[a-fA-F\d]/)&&We.eat(";"):rt=We.eatWhile(/[\d]/)&&We.eat(";"):rt=We.eatWhile(/[\w\.\-:]/)&&We.eat(";"),rt?"atom":"error"}else return We.eatWhile(/[^&<]/),null}ve.isInText=!0;function de(We,gt){var ut=We.next();if(ut==">"||ut=="/"&&We.eat(">"))return gt.tokenize=ve,ge=ut==">"?"endTag":"selfcloseTag","tag bracket";if(ut=="=")return ge="equals",null;if(ut=="<"){gt.tokenize=ve,gt.state=le,gt.tagName=gt.tagStart=null;var bt=gt.tokenize(We,gt);return bt?bt+" tag error":"tag error"}else return/[\'\"]/.test(ut)?(gt.tokenize=ue(ut),gt.stringStartCol=We.column(),gt.tokenize(We,gt)):(We.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ue(We){var gt=function(ut,bt){for(;!ut.eol();)if(ut.next()==We){bt.tokenize=de;break}return"string"};return gt.isInAttribute=!0,gt}function z(We,gt){return function(ut,bt){for(;!ut.eol();){if(ut.match(gt)){bt.tokenize=ve;break}ut.next()}return We}}function ee(We){return function(gt,ut){for(var bt;(bt=gt.next())!=null;){if(bt=="<")return ut.tokenize=ee(We+1),ut.tokenize(gt,ut);if(bt==">")if(We==1){ut.tokenize=ve;break}else return ut.tokenize=ee(We-1),ut.tokenize(gt,ut)}return"meta"}}function oe(We,gt,ut){this.prev=We.context,this.tagName=gt,this.indent=We.indented,this.startOfLine=ut,(he.doNotIndent.hasOwnProperty(gt)||We.context&&We.context.noIndent)&&(this.noIndent=!0)}function ie(We){We.context&&(We.context=We.context.prev)}function se(We,gt){for(var ut;;){if(!We.context||(ut=We.context.tagName,!he.contextGrabbers.hasOwnProperty(ut)||!he.contextGrabbers[ut].hasOwnProperty(gt)))return;ie(We)}}function le(We,gt,ut){return We=="openTag"?(ut.tagStart=gt.column(),ye):We=="closeTag"?we:le}function ye(We,gt,ut){return We=="word"?(ut.tagName=gt.current(),ce="tag",Ne):he.allowMissingTagName&&We=="endTag"?(ce="tag bracket",Ne(We,gt,ut)):(ce="error",ye)}function we(We,gt,ut){if(We=="word"){var bt=gt.current();return ut.context&&ut.context.tagName!=bt&&he.implicitlyClosed.hasOwnProperty(ut.context.tagName)&&ie(ut),ut.context&&ut.context.tagName==bt||he.matchClosing===!1?(ce="tag",be):(ce="tag error",ke)}else return he.allowMissingTagName&&We=="endTag"?(ce="tag bracket",be(We,gt,ut)):(ce="error",ke)}function be(We,gt,ut){return We!="endTag"?(ce="error",be):(ie(ut),le)}function ke(We,gt,ut){return ce="error",be(We,gt,ut)}function Ne(We,gt,ut){if(We=="word")return ce="attribute",je;if(We=="endTag"||We=="selfcloseTag"){var bt=ut.tagName,rt=ut.tagStart;return ut.tagName=ut.tagStart=null,We=="selfcloseTag"||he.autoSelfClosers.hasOwnProperty(bt)?se(ut,bt):(se(ut,bt),ut.context=new oe(ut,bt,rt==ut.indented)),le}return ce="error",Ne}function je(We,gt,ut){return We=="equals"?Ve:(he.allowMissing||(ce="error"),Ne(We,gt,ut))}function Ve(We,gt,ut){return We=="string"?Je:We=="word"&&he.allowUnquoted?(ce="string",Ne):(ce="error",Ne(We,gt,ut))}function Je(We,gt,ut){return We=="string"?Je:Ne(We,gt,ut)}return{startState:function(We){var gt={tokenize:ve,state:le,indented:We||0,tagName:null,tagStart:null,context:null};return We!=null&&(gt.baseIndent=We),gt},token:function(We,gt){if(!gt.tagName&&We.sol()&&(gt.indented=We.indentation()),We.eatSpace())return null;ge=null;var ut=gt.tokenize(We,gt);return(ut||ge)&&ut!="comment"&&(ce=null,gt.state=gt.state(ge||ut,We,gt),ce&&(ut=ce=="error"?ut+" error":ce)),ut},indent:function(We,gt,ut){var bt=We.context;if(We.tokenize.isInAttribute)return We.tagStart==We.indented?We.stringStartCol+1:We.indented+_e;if(bt&&bt.noIndent)return Le.Pass;if(We.tokenize!=de&&We.tokenize!=ve)return ut?ut.match(/^(\s*)/)[0].length:0;if(We.tagName)return he.multilineTagIndentPastTag!==!1?We.tagStart+We.tagName.length+2:We.tagStart+_e*(he.multilineTagIndentFactor||1);if(he.alignCDATA&&/<!\[CDATA\[/.test(gt))return 0;var rt=gt&&/^<(\/)?([\w_:\.-]*)/.exec(gt);if(rt&&rt[1])for(;bt;)if(bt.tagName==rt[2]){bt=bt.prev;break}else if(he.implicitlyClosed.hasOwnProperty(bt.tagName))bt=bt.prev;else break;else if(rt)for(;bt;){var St=he.contextGrabbers[bt.tagName];if(St&&St.hasOwnProperty(rt[2]))bt=bt.prev;else break}for(;bt&&bt.prev&&!bt.startOfLine;)bt=bt.prev;return bt?bt.indent+_e:We.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:he.htmlMode?"html":"xml",helperType:he.htmlMode?"html":"xml",skipAttribute:function(We){We.state==Ve&&(We.state=Ne)},xmlCurrentTag:function(We){return We.tagName?{name:We.tagName,close:We.type=="closeTag"}:null},xmlCurrentContext:function(We){for(var gt=[],ut=We.context;ut;ut=ut.prev)ut.tagName&>.push(ut.tagName);return gt.reverse()}}}),Le.defineMIME("text/xml","xml"),Le.defineMIME("application/xml","xml"),Le.mimeModes.hasOwnProperty("text/html")||Le.defineMIME("text/html",{name:"xml",htmlMode:!0})})},3867:function(Pn,qt,Ee){var Le=Ee(97671);(function(me,Ie){Pn.exports=Ie()})(this,function(){"use strict";function me(Ae){var Ge=typeof Ae;return Ae!==null&&(Ge==="object"||Ge==="function")}function Ie(Ae){return typeof Ae=="function"}var Te=void 0;Array.isArray?Te=Array.isArray:Te=function(Ae){return Object.prototype.toString.call(Ae)==="[object Array]"};var Ce=Te,_e=0,he=void 0,Se=void 0,xe=function(Ge,Ke){we[_e]=Ge,we[_e+1]=Ke,_e+=2,_e===2&&(Se?Se(be):Ne())};function ge(Ae){Se=Ae}function ce(Ae){xe=Ae}var ve=typeof window!="undefined"?window:void 0,de=ve||{},ue=de.MutationObserver||de.WebKitMutationObserver,z=typeof self=="undefined"&&typeof Le!="undefined"&&{}.toString.call(Le)==="[object process]",ee=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function oe(){return function(){return Le.nextTick(be)}}function ie(){return typeof he!="undefined"?function(){he(be)}:ye()}function se(){var Ae=0,Ge=new ue(be),Ke=document.createTextNode("");return Ge.observe(Ke,{characterData:!0}),function(){Ke.data=Ae=++Ae%2}}function le(){var Ae=new MessageChannel;return Ae.port1.onmessage=be,function(){return Ae.port2.postMessage(0)}}function ye(){var Ae=setTimeout;return function(){return Ae(be,1)}}var we=new Array(1e3);function be(){for(var Ae=0;Ae<_e;Ae+=2){var Ge=we[Ae],Ke=we[Ae+1];Ge(Ke),we[Ae]=void 0,we[Ae+1]=void 0}_e=0}function ke(){try{var Ae=Function("return this")().require("vertx");return he=Ae.runOnLoop||Ae.runOnContext,ie()}catch(Ge){return ye()}}var Ne=void 0;z?Ne=oe():ue?Ne=se():ee?Ne=le():ve===void 0?Ne=ke():Ne=ye();function je(Ae,Ge){var Ke=this,Ze=new this.constructor(We);Ze[Je]===void 0&&Zt(Ze);var at=Ke._state;if(at){var xt=arguments[at-1];xe(function(){return un(at,Ze,xt,Ke._result)})}else Rt(Ke,Ze,Ae,Ge);return Ze}function Ve(Ae){var Ge=this;if(Ae&&typeof Ae=="object"&&Ae.constructor===Ge)return Ae;var Ke=new Ge(We);return dt(Ke,Ae),Ke}var Je=Math.random().toString(36).substring(2);function We(){}var gt=void 0,ut=1,bt=2;function rt(){return new TypeError("You cannot resolve a promise with itself")}function St(){return new TypeError("A promises callback cannot return that same promise.")}function ct(Ae,Ge,Ke,Ze){try{Ae.call(Ge,Ke,Ze)}catch(at){return at}}function Bt(Ae,Ge,Ke){xe(function(Ze){var at=!1,xt=ct(Ke,Ge,function(tn){at||(at=!0,Ge!==tn?dt(Ze,tn):Et(Ze,tn))},function(tn){at||(at=!0,vt(Ze,tn))},"Settle: "+(Ze._label||" unknown promise"));!at&&xt&&(at=!0,vt(Ze,xt))},Ae)}function ht(Ae,Ge){Ge._state===ut?Et(Ae,Ge._result):Ge._state===bt?vt(Ae,Ge._result):Rt(Ge,void 0,function(Ke){return dt(Ae,Ke)},function(Ke){return vt(Ae,Ke)})}function it(Ae,Ge,Ke){Ge.constructor===Ae.constructor&&Ke===je&&Ge.constructor.resolve===Ve?ht(Ae,Ge):Ke===void 0?Et(Ae,Ge):Ie(Ke)?Bt(Ae,Ge,Ke):Et(Ae,Ge)}function dt(Ae,Ge){if(Ae===Ge)vt(Ae,rt());else if(me(Ge)){var Ke=void 0;try{Ke=Ge.then}catch(Ze){vt(Ae,Ze);return}it(Ae,Ge,Ke)}else Et(Ae,Ge)}function yt(Ae){Ae._onerror&&Ae._onerror(Ae._result),jt(Ae)}function Et(Ae,Ge){Ae._state===gt&&(Ae._result=Ge,Ae._state=ut,Ae._subscribers.length!==0&&xe(jt,Ae))}function vt(Ae,Ge){Ae._state===gt&&(Ae._state=bt,Ae._result=Ge,xe(yt,Ae))}function Rt(Ae,Ge,Ke,Ze){var at=Ae._subscribers,xt=at.length;Ae._onerror=null,at[xt]=Ge,at[xt+ut]=Ke,at[xt+bt]=Ze,xt===0&&Ae._state&&xe(jt,Ae)}function jt(Ae){var Ge=Ae._subscribers,Ke=Ae._state;if(Ge.length!==0){for(var Ze=void 0,at=void 0,xt=Ae._result,tn=0;tn<Ge.length;tn+=3)Ze=Ge[tn],at=Ge[tn+Ke],Ze?un(Ke,Ze,at,xt):at(xt);Ae._subscribers.length=0}}function un(Ae,Ge,Ke,Ze){var at=Ie(Ke),xt=void 0,tn=void 0,nn=!0;if(at){try{xt=Ke(Ze)}catch(Jt){nn=!1,tn=Jt}if(Ge===xt){vt(Ge,St());return}}else xt=Ze;Ge._state!==gt||(at&&nn?dt(Ge,xt):nn===!1?vt(Ge,tn):Ae===ut?Et(Ge,xt):Ae===bt&&vt(Ge,xt))}function Vt(Ae,Ge){try{Ge(function(Ze){dt(Ae,Ze)},function(Ze){vt(Ae,Ze)})}catch(Ke){vt(Ae,Ke)}}var xn=0;function Ut(){return xn++}function Zt(Ae){Ae[Je]=xn++,Ae._state=void 0,Ae._result=void 0,Ae._subscribers=[]}function Xt(){return new Error("Array Methods must be provided an Array")}var mt=function(){function Ae(Ge,Ke){this._instanceConstructor=Ge,this.promise=new Ge(We),this.promise[Je]||Zt(this.promise),Ce(Ke)?(this.length=Ke.length,this._remaining=Ke.length,this._result=new Array(this.length),this.length===0?Et(this.promise,this._result):(this.length=this.length||0,this._enumerate(Ke),this._remaining===0&&Et(this.promise,this._result))):vt(this.promise,Xt())}return Ae.prototype._enumerate=function(Ke){for(var Ze=0;this._state===gt&&Ze<Ke.length;Ze++)this._eachEntry(Ke[Ze],Ze)},Ae.prototype._eachEntry=function(Ke,Ze){var at=this._instanceConstructor,xt=at.resolve;if(xt===Ve){var tn=void 0,nn=void 0,Jt=!1;try{tn=Ke.then}catch(kn){Jt=!0,nn=kn}if(tn===je&&Ke._state!==gt)this._settledAt(Ke._state,Ze,Ke._result);else if(typeof tn!="function")this._remaining--,this._result[Ze]=Ke;else if(at===Xe){var mn=new at(We);Jt?vt(mn,nn):it(mn,Ke,tn),this._willSettleAt(mn,Ze)}else this._willSettleAt(new at(function(kn){return kn(Ke)}),Ze)}else this._willSettleAt(xt(Ke),Ze)},Ae.prototype._settledAt=function(Ke,Ze,at){var xt=this.promise;xt._state===gt&&(this._remaining--,Ke===bt?vt(xt,at):this._result[Ze]=at),this._remaining===0&&Et(xt,this._result)},Ae.prototype._willSettleAt=function(Ke,Ze){var at=this;Rt(Ke,void 0,function(xt){return at._settledAt(ut,Ze,xt)},function(xt){return at._settledAt(bt,Ze,xt)})},Ae}();function ze(Ae){return new mt(this,Ae).promise}function Be(Ae){var Ge=this;return Ce(Ae)?new Ge(function(Ke,Ze){for(var at=Ae.length,xt=0;xt<at;xt++)Ge.resolve(Ae[xt]).then(Ke,Ze)}):new Ge(function(Ke,Ze){return Ze(new TypeError("You must pass an array to race."))})}function qe(Ae){var Ge=this,Ke=new Ge(We);return vt(Ke,Ae),Ke}function Qe(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Ue(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Xe=function(){function Ae(Ge){this[Je]=Ut(),this._result=this._state=void 0,this._subscribers=[],We!==Ge&&(typeof Ge!="function"&&Qe(),this instanceof Ae?Vt(this,Ge):Ue())}return Ae.prototype.catch=function(Ke){return this.then(null,Ke)},Ae.prototype.finally=function(Ke){var Ze=this,at=Ze.constructor;return Ie(Ke)?Ze.then(function(xt){return at.resolve(Ke()).then(function(){return xt})},function(xt){return at.resolve(Ke()).then(function(){throw xt})}):Ze.then(Ke,Ke)},Ae}();Xe.prototype.then=je,Xe.all=ze,Xe.race=Be,Xe.resolve=Ve,Xe.reject=qe,Xe._setScheduler=ge,Xe._setAsap=ce,Xe._asap=xe;function Re(){var Ae=void 0;if(typeof Ee.g!="undefined")Ae=Ee.g;else if(typeof self!="undefined")Ae=self;else try{Ae=Function("return this")()}catch(Ze){throw new Error("polyfill failed because global object is unavailable in this environment")}var Ge=Ae.Promise;if(Ge){var Ke=null;try{Ke=Object.prototype.toString.call(Ge.resolve())}catch(Ze){}if(Ke==="[object Promise]"&&!Ge.cast)return}Ae.Promise=Xe}return Xe.polyfill=Re,Xe.Promise=Xe,Xe})},86204:function(Pn){"use strict";var qt=typeof Reflect=="object"?Reflect:null,Ee=qt&&typeof qt.apply=="function"?qt.apply:function(le,ye,we){return Function.prototype.apply.call(le,ye,we)},Le;qt&&typeof qt.ownKeys=="function"?Le=qt.ownKeys:Object.getOwnPropertySymbols?Le=function(le){return Object.getOwnPropertyNames(le).concat(Object.getOwnPropertySymbols(le))}:Le=function(le){return Object.getOwnPropertyNames(le)};function me(se){console&&console.warn&&console.warn(se)}var Ie=Number.isNaN||function(le){return le!==le};function Te(){Te.init.call(this)}Pn.exports=Te,Pn.exports.once=ee,Te.EventEmitter=Te,Te.prototype._events=void 0,Te.prototype._eventsCount=0,Te.prototype._maxListeners=void 0;var Ce=10;function _e(se){if(typeof se!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof se)}Object.defineProperty(Te,"defaultMaxListeners",{enumerable:!0,get:function(){return Ce},set:function(se){if(typeof se!="number"||se<0||Ie(se))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+se+".");Ce=se}}),Te.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},Te.prototype.setMaxListeners=function(le){if(typeof le!="number"||le<0||Ie(le))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+le+".");return this._maxListeners=le,this};function he(se){return se._maxListeners===void 0?Te.defaultMaxListeners:se._maxListeners}Te.prototype.getMaxListeners=function(){return he(this)},Te.prototype.emit=function(le){for(var ye=[],we=1;we<arguments.length;we++)ye.push(arguments[we]);var be=le==="error",ke=this._events;if(ke!==void 0)be=be&&ke.error===void 0;else if(!be)return!1;if(be){var Ne;if(ye.length>0&&(Ne=ye[0]),Ne instanceof Error)throw Ne;var je=new Error("Unhandled error."+(Ne?" ("+Ne.message+")":""));throw je.context=Ne,je}var Ve=ke[le];if(Ve===void 0)return!1;if(typeof Ve=="function")Ee(Ve,this,ye);else for(var Je=Ve.length,We=de(Ve,Je),we=0;we<Je;++we)Ee(We[we],this,ye);return!0};function Se(se,le,ye,we){var be,ke,Ne;if(_e(ye),ke=se._events,ke===void 0?(ke=se._events=Object.create(null),se._eventsCount=0):(ke.newListener!==void 0&&(se.emit("newListener",le,ye.listener?ye.listener:ye),ke=se._events),Ne=ke[le]),Ne===void 0)Ne=ke[le]=ye,++se._eventsCount;else if(typeof Ne=="function"?Ne=ke[le]=we?[ye,Ne]:[Ne,ye]:we?Ne.unshift(ye):Ne.push(ye),be=he(se),be>0&&Ne.length>be&&!Ne.warned){Ne.warned=!0;var je=new Error("Possible EventEmitter memory leak detected. "+Ne.length+" "+String(le)+" listeners added. Use emitter.setMaxListeners() to increase limit");je.name="MaxListenersExceededWarning",je.emitter=se,je.type=le,je.count=Ne.length,me(je)}return se}Te.prototype.addListener=function(le,ye){return Se(this,le,ye,!1)},Te.prototype.on=Te.prototype.addListener,Te.prototype.prependListener=function(le,ye){return Se(this,le,ye,!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,le,ye){var we={fired:!1,wrapFn:void 0,target:se,type:le,listener:ye},be=xe.bind(we);return be.listener=ye,we.wrapFn=be,be}Te.prototype.once=function(le,ye){return _e(ye),this.on(le,ge(this,le,ye)),this},Te.prototype.prependOnceListener=function(le,ye){return _e(ye),this.prependListener(le,ge(this,le,ye)),this},Te.prototype.removeListener=function(le,ye){var we,be,ke,Ne,je;if(_e(ye),be=this._events,be===void 0)return this;if(we=be[le],we===void 0)return this;if(we===ye||we.listener===ye)--this._eventsCount===0?this._events=Object.create(null):(delete be[le],be.removeListener&&this.emit("removeListener",le,we.listener||ye));else if(typeof we!="function"){for(ke=-1,Ne=we.length-1;Ne>=0;Ne--)if(we[Ne]===ye||we[Ne].listener===ye){je=we[Ne].listener,ke=Ne;break}if(ke<0)return this;ke===0?we.shift():ue(we,ke),we.length===1&&(be[le]=we[0]),be.removeListener!==void 0&&this.emit("removeListener",le,je||ye)}return this},Te.prototype.off=Te.prototype.removeListener,Te.prototype.removeAllListeners=function(le){var ye,we,be;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[le]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete we[le]),this;if(arguments.length===0){var ke=Object.keys(we),Ne;for(be=0;be<ke.length;++be)Ne=ke[be],Ne!=="removeListener"&&this.removeAllListeners(Ne);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(ye=we[le],typeof ye=="function")this.removeListener(le,ye);else if(ye!==void 0)for(be=ye.length-1;be>=0;be--)this.removeListener(le,ye[be]);return this};function ce(se,le,ye){var we=se._events;if(we===void 0)return[];var be=we[le];return be===void 0?[]:typeof be=="function"?ye?[be.listener||be]:[be]:ye?z(be):de(be,be.length)}Te.prototype.listeners=function(le){return ce(this,le,!0)},Te.prototype.rawListeners=function(le){return ce(this,le,!1)},Te.listenerCount=function(se,le){return typeof se.listenerCount=="function"?se.listenerCount(le):ve.call(se,le)},Te.prototype.listenerCount=ve;function ve(se){var le=this._events;if(le!==void 0){var ye=le[se];if(typeof ye=="function")return 1;if(ye!==void 0)return ye.length}return 0}Te.prototype.eventNames=function(){return this._eventsCount>0?Le(this._events):[]};function de(se,le){for(var ye=new Array(le),we=0;we<le;++we)ye[we]=se[we];return ye}function ue(se,le){for(;le+1<se.length;le++)se[le]=se[le+1];se.pop()}function z(se){for(var le=new Array(se.length),ye=0;ye<le.length;++ye)le[ye]=se[ye].listener||se[ye];return le}function ee(se,le){return new Promise(function(ye,we){function be(Ne){se.removeListener(le,ke),we(Ne)}function ke(){typeof se.removeListener=="function"&&se.removeListener("error",be),ye([].slice.call(arguments))}ie(se,le,ke,{once:!0}),le!=="error"&&oe(se,be,{once:!0})})}function oe(se,le,ye){typeof se.on=="function"&&ie(se,"error",le,ye)}function ie(se,le,ye,we){if(typeof se.on=="function")we.once?se.once(le,ye):se.on(le,ye);else if(typeof se.addEventListener=="function")se.addEventListener(le,function be(ke){we.once&&se.removeEventListener(le,be),ye(ke)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof se)}},12378:function(Pn,qt,Ee){"use strict";Ee.d(qt,{$u:function(){return xe},BD:function(){return mt},E9:function(){return Se},FF:function(){return to},FJ:function(){return le},Hn:function(){return se},KX:function(){return we},NB:function(){return Ke},S0:function(){return Ut},UL:function(){return ge},Vk:function(){return ie},Vm:function(){return at},YI:function(){return Zt},ZA:function(){return Ie},Zt:function(){return ce},al:function(){return Ue},bn:function(){return Qe},bx:function(){return ze},g2:function(){return Xt},h1:function(){return Ve},hD:function(){return ci},l4:function(){return _e},rU:function(){return Ze},s_:function(){return Be},uz:function(){return Ge},z6:function(){return ve}}),Pn=Ee.hmd(Pn),function(){var st;function Dr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Mr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Dr(a)}}function xo(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Gr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},uo;if(typeof Object.setPrototypeOf=="function")uo=Object.setPrototypeOf;else{var Zr;e:{var co={a:!0},cn={};try{cn.__proto__=co,Zr=cn.a;break e}catch(a){}Zr=!1}uo=Zr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var $e=uo;function tt(a,y){if(a.prototype=Gr(y.prototype),a.prototype.constructor=a,$e)$e(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 et=typeof Ee.g!="undefined"&&Ee.g!=null?Ee.g:self,Pt=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},At=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function kt(a,y){if(y){var x=et;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&&At(x,a,{writable:!0,value:y})}}kt("Object.assign",function(a){return a||Pt}),kt("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 Ct=typeof globalThis=="object"&&globalThis||typeof Ee.g=="object"&&Ee.g.global===Ee.g&&Ee.g||typeof self=="object"&&self.self===self&&self||{};Ct.requestAnimationFrame===void 0&&(Ct.setImmediate===void 0?Ct.requestAnimationFrame=function(a){Ct.setTimeout(a,0)}:Ct.requestAnimationFrame=Ct.setImmediate);function dn(){}function _n(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Ct.clearTimeout(x),x=zn(function(){x=-1,a.apply(b,E)},y)}}function zn(a,y){return Ct.setTimeout(a,y)}function wn(a){return Ct.document.createElement(a)}function Ft(a){throw Error(a)}function $t(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Ft(a)}function bn(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),Ft(x+" is not in the range "+y+": "+a)}function An(a){Ct.console&&Ct.console.log(a)}function Gt(a){return typeof a=="object"&&a!==null}function sn(a){return Array.isArray(a)||Ct.NodeList&&a instanceof Ct.NodeList||Ct.HTMLCollection&&a instanceof Ct.HTMLCollection}function Bn(a){return Array.prototype.slice.call(a)}function Nn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Ft("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function qn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Ft("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Gn(){var a=Ai.pop();return a===void 0?[]:a}function Jn(a){a.length=0,Ai.push(a)}function Dn(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(Gt(a)&&a.constructor)return Dn(a.constructor);return typeof a}function ri(a){var y=a;return Gt(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 Mi(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 Hn(a,y,x){Object.defineProperty(Ho.prototype,a,{get:y,set:x})}function oi(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 Bi=Ct.navigator!==void 0&&0<Ct.navigator.userAgent.indexOf("Trident/7"),lr=Ct.navigator!==void 0&&Ct.navigator.platform!==void 0&&Ct.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Ai=[];Object.freeze([]),dn.className="Util",dn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",dn.adym="gojs.net",dn.vfo="28e645fdb266",dn.className="Util";function an(a,y,x){Sr(this),this.j=a,this.xa=y,this.o=x}an.prototype.toString=function(){return"EnumValue."+this.xa};function si(a,y){return y==null||y===""?null:a[y]}et.Object.defineProperties(an.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),an.className="EnumValue";function wi(){this.ew=[]}wi.prototype.toString=function(){return this.ew.join("")},wi.prototype.add=function(a){a!==""&&this.ew.push(a)},wi.className="StringBuilder";function pi(){}pi.className="PropertyCollection";var Wi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Ct.console&&Ct.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 Ni(){}Ni.prototype.reset=function(){},Ni.prototype.next=function(){return!1},Ni.prototype.Ad=function(){return!1},Ni.prototype.first=function(){return null},Ni.prototype.any=function(){return!1},Ni.prototype.all=function(){return!0},Ni.prototype.each=function(){return this},Ni.prototype.map=function(){return this},Ni.prototype.filter=function(){return this},Ni.prototype.de=function(){},Ni.prototype.toString=function(){return"EmptyIterator"},et.Object.defineProperties(Ni.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ni.prototype.first=Ni.prototype.first,Ni.prototype.hasNext=Ni.prototype.Ad,Ni.prototype.next=Ni.prototype.next,Ni.prototype.reset=Ni.prototype.reset;var hr=null;Ni.className="EmptyIterator",hr=new Ni;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):hr},Fi.prototype.de=function(){this.value=null},Fi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},et.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 Ki(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Ki.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Ki.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},Ki.prototype.Ad=function(){return this.next()},Ki.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},Ki.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},Ki.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},Ki.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},Ki.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 On,a.s=x,a.xb(),a.iterator},Ki.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 On,a.s=x,a.xb(),a.iterator},Ki.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Ki.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},et.Object.defineProperties(Ki.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}}}),Ki.prototype.first=Ki.prototype.first,Ki.prototype.hasNext=Ki.prototype.Ad,Ki.prototype.next=Ki.prototype.next,Ki.prototype.reset=Ki.prototype.reset,Ki.className="ListIterator";function _r(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}_r.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},_r.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)},_r.prototype.Ad=function(){return this.next()},_r.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},_r.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},_r.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},_r.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},_r.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 On,a.s=x,a.xb(),a.iterator},_r.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 On,a.s=x,a.xb(),a.iterator},_r.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},_r.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},et.Object.defineProperties(_r.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),_r.prototype.first=_r.prototype.first,_r.prototype.hasNext=_r.prototype.Ad,_r.prototype.next=_r.prototype.next,_r.prototype.reset=_r.prototype.reset,_r.className="ListIteratorBackwards";function On(a){Sr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Ft("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}st=On.prototype,st.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return this._isFrozen=!1,this},st.toString=function(){return"List()#"+Pr(this)},st.add=function(a){return a===null?this:(this._isFrozen&&$t(this,a),this.s.push(a),this.xb(),this)},st.push=function(a){this.add(a)},st.addAll=function(a){if(a===null)return this;this._isFrozen&&$t(this);var y=this.s;if(sn(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},st.clear=function(){this._isFrozen&&$t(this),this.s.length=0,this.xb()},st.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},st.has=function(a){return this.contains(a)},st.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},st.M=function(a){var y=this.s;return(0>a||a>=y.length)&&bn(a,"0 <= i < length",On,"elt:i"),y[a]},st.get=function(a){return this.M(a)},st.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&bn(a,"0 <= i < length",On,"setElt:i"),this._isFrozen&&$t(this,a),x[a]=y},st.set=function(a,y){this.cd(a,y)},st.first=function(){var a=this.s;return a.length===0?null:a[0]},st.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},st.pop=function(){this._isFrozen&&$t(this);var a=this.s;return 0<a.length?a.pop():null},On.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},On.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},On.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},On.prototype.map=function(a){for(var y=new On,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},On.prototype.filter=function(a){for(var y=new On,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},st=On.prototype,st.Gb=function(a,y){0>a&&bn(a,">= 0",On,"insertAt:i"),this._isFrozen&&$t(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},st.remove=function(a){if(a===null)return!1;this._isFrozen&&$t(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)},st.delete=function(a){return this.remove(a)},st.mb=function(a){var y=this.s;(0>a||a>=y.length)&&bn(a,"0 <= i < length",On,"removeAt:i"),this._isFrozen&&$t(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},st.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&&$t(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},On.prototype.copy=function(){var a=new On,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},st=On.prototype,st.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},st.Iv=function(){for(var a=new In,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},st.sort=function(a){return this._isFrozen&&$t(this),this.s.sort(a),this.xb(),this},st.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&$t(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&bn(y,"0 <= from < length",On,"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},st.reverse=function(){return this._isFrozen&&$t(this),this.s.reverse(),this.xb(),this},et.Object.defineProperties(On.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 hr;var a=this.Sa;return a!==null?(a.reset(),a):new Ki(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return hr;var a=this.Hg;return a!==null?(a.reset(),a):new _r(this)}}}),On.prototype.reverse=On.prototype.reverse,On.prototype.sortRange=On.prototype.zi,On.prototype.sort=On.prototype.sort,On.prototype.toSet=On.prototype.Iv,On.prototype.toArray=On.prototype.Fa,On.prototype.removeRange=On.prototype.removeRange,On.prototype.removeAt=On.prototype.mb,On.prototype.delete=On.prototype.delete,On.prototype.remove=On.prototype.remove,On.prototype.insertAt=On.prototype.Gb,On.prototype.pop=On.prototype.pop,On.prototype.last=On.prototype.jc,On.prototype.first=On.prototype.first,On.prototype.set=On.prototype.set,On.prototype.setElt=On.prototype.cd,On.prototype.get=On.prototype.get,On.prototype.elt=On.prototype.M,On.prototype.indexOf=On.prototype.indexOf,On.prototype.has=On.prototype.has,On.prototype.contains=On.prototype.contains,On.prototype.clear=On.prototype.clear,On.prototype.addAll=On.prototype.addAll,On.prototype.push=On.prototype.push,On.prototype.add=On.prototype.add,On.prototype.thaw=On.prototype.ka,On.prototype.freeze=On.prototype.freeze,On.className="List";function Jr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Jr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Jr.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)},Jr.prototype.Ad=function(){return this.next()},Jr.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},Jr.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},Jr.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},Jr.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},Jr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new On;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Jr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new On;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Jr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Jr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},et.Object.defineProperties(Jr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Jr.prototype.first=Jr.prototype.first,Jr.prototype.hasNext=Jr.prototype.Ad,Jr.prototype.next=Jr.prototype.next,Jr.prototype.reset=Jr.prototype.reset,Jr.className="SetIterator";function In(a){Sr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Ft("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}st=In.prototype,st.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return this._isFrozen=!1,this},st.toString=function(){return"Set()#"+Pr(this)},st.add=function(a){if(a===null)return this;this._isFrozen&&$t(this,a);var y=a;return Gt(a)&&(y=fo(a)),this.Tb[y]===void 0&&(this.Sb++,a=new dr(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},st.addAll=function(a){if(a===null)return this;if(this._isFrozen&&$t(this),sn(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},st.contains=function(a){if(a===null)return!1;var y=a;return Gt(a)&&(y=Pr(a),y===void 0)?!1:this.Tb[y]!==void 0},st.has=function(a){return this.contains(a)},st.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},st.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},st.first=function(){var a=this.ea;return a===null?null:a.value},In.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},In.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},In.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},In.prototype.map=function(a){for(var y=new In,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},In.prototype.filter=function(a){for(var y=new In,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},st=In.prototype,st.remove=function(a){if(a===null)return!1;this._isFrozen&&$t(this,a);var y=a;if(Gt(a)&&(y=Pr(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},st.delete=function(a){return this.remove(a)},st.hp=function(a){if(a===null)return this;if(this._isFrozen&&$t(this),sn(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},st.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&$t(this);var y=new In;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},st.clear=function(){this._isFrozen&&$t(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},In.prototype.copy=function(){var a=new In,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},In.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},In.prototype.Hv=function(){var a=new On,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Sr(a){a.__gohashid=Do++}function fo(a){var y=a.__gohashid;return y===void 0&&(y=Do++,a.__gohashid=y),y}function Pr(a){return a.__gohashid}et.Object.defineProperties(In.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return hr;var a=this.Sa;return a!==null?(a.reset(),a):new Jr(this)}}}),In.prototype.toList=In.prototype.Hv,In.prototype.toArray=In.prototype.Fa,In.prototype.clear=In.prototype.clear,In.prototype.retainAll=In.prototype.pA,In.prototype.removeAll=In.prototype.hp,In.prototype.delete=In.prototype.delete,In.prototype.remove=In.prototype.remove,In.prototype.first=In.prototype.first,In.prototype.containsAny=In.prototype.Ty,In.prototype.containsAll=In.prototype.Sy,In.prototype.has=In.prototype.has,In.prototype.contains=In.prototype.contains,In.prototype.addAll=In.prototype.addAll,In.prototype.add=In.prototype.add,In.prototype.thaw=In.prototype.ka,In.prototype.freeze=In.prototype.freeze;var Do=1;In.className="Set",In.uniqueHash=Sr,In.hashIdUnique=fo,In.hashId=Pr;function ro(a){this.ma=a,this.qa=a.Ja,this.sa=null}ro.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ro.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)},ro.prototype.Ad=function(){return this.next()},ro.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},ro.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},ro.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},ro.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},ro.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new On;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ro.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new On;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},ro.prototype.de=function(){this.value=this.key=null,this.qa=-1},ro.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},et.Object.defineProperties(ro.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ro.prototype.first=ro.prototype.first,ro.prototype.hasNext=ro.prototype.Ad,ro.prototype.next=ro.prototype.next,ro.prototype.reset=ro.prototype.reset,ro.className="MapKeySetIterator";function Yi(a){In.call(this),Sr(this),this._isFrozen=!0,this.ma=a}tt(Yi,In),st=Yi.prototype,st.freeze=function(){return this},st.ka=function(){return this},st.toString=function(){return"MapKeySet("+this.ma.toString()+")"},st.add=function(){Ft("This Set is read-only: "+this.toString())},st.contains=function(a){return this.ma.contains(a)},st.has=function(a){return this.contains(a)},st.remove=function(){Ft("This Set is read-only: "+this.toString())},st.delete=function(a){return this.remove(a)},st.clear=function(){Ft("This Set is read-only: "+this.toString())},st.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 In,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 In,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 In,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 On,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},et.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?hr:new ro(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 er(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}er.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},er.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)},er.prototype.Ad=function(){return this.next()},er.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},er.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},er.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},er.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},er.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new On;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},er.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new On;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},er.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},er.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},et.Object.defineProperties(er.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),er.prototype.first=er.prototype.first,er.prototype.hasNext=er.prototype.Ad,er.prototype.next=er.prototype.next,er.prototype.reset=er.prototype.reset,er.className="MapValueSetIterator";function dr(a,y){this.key=a,this.value=y,this.ll=this.va=null}dr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},dr.className="KeyValuePair";function Tr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Tr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Tr.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)},Tr.prototype.Ad=function(){return this.next()},Tr.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},Tr.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},Tr.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},Tr.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},Tr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new On;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Tr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new On;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Tr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Tr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},et.Object.defineProperties(Tr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Tr.prototype.first=Tr.prototype.first,Tr.prototype.hasNext=Tr.prototype.Ad,Tr.prototype.next=Tr.prototype.next,Tr.prototype.reset=Tr.prototype.reset,Tr.className="MapIterator";function hi(a){Sr(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"&&Ft("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}st=hi.prototype,st.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return this._isFrozen=!1,this},st.toString=function(){return"Map()#"+Pr(this)},st.add=function(a,y){this._isFrozen&&$t(this,a);var x=a;Gt(a)&&(x=fo(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new dr(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},st.set=function(a,y){return this.add(a,y)},st.addAll=function(a){if(a===null)return this;if(sn(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 hi)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},st.first=function(){return this.ea},hi.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},hi.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},hi.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},hi.prototype.map=function(a){for(var y=new hi,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},hi.prototype.filter=function(a){for(var y=new hi,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},st=hi.prototype,st.contains=function(a){var y=a;return Gt(a)&&(y=Pr(a),y===void 0)?!1:this.Tb[y]!==void 0},st.has=function(a){return this.contains(a)},st.I=function(a){var y=a;return Gt(a)&&(y=Pr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},st.get=function(a){return this.I(a)},st.remove=function(a){if(a===null)return!1;this._isFrozen&&$t(this,a);var y=a;if(Gt(a)&&(y=Pr(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},st.delete=function(a){return this.remove(a)},st.clear=function(){this._isFrozen&&$t(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()},hi.prototype.copy=function(){var a=new hi,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},hi.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 dr(E.key,E.value),x++}return y},hi.prototype.Lf=function(){return new Yi(this)},et.Object.defineProperties(hi.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return hr;var a=this.Sa;return a!==null?(a.reset(),a):new Tr(this)}},iteratorKeys:{get:function(){return 0>=this.count?hr:new ro(this)}},iteratorValues:{get:function(){if(0>=this.count)return hr;var a=this.jf;return a!==null?(a.reset(),a):new er(this)}}}),hi.prototype.toKeySet=hi.prototype.Lf,hi.prototype.toArray=hi.prototype.Fa,hi.prototype.clear=hi.prototype.clear,hi.prototype.delete=hi.prototype.delete,hi.prototype.remove=hi.prototype.remove,hi.prototype.get=hi.prototype.get,hi.prototype.getValue=hi.prototype.I,hi.prototype.has=hi.prototype.has,hi.prototype.contains=hi.prototype.contains,hi.prototype.first=hi.prototype.first,hi.prototype.addAll=hi.prototype.addAll,hi.prototype.set=hi.prototype.set,hi.prototype.add=hi.prototype.add,hi.prototype.thaw=hi.prototype.ka,hi.prototype.freeze=hi.prototype.freeze,hi.className="Map";function Tt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Ft("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var xr,Po,Wo,Co,qo;Tt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Tt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Tt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Tt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Tt.prototype.copy=function(){var a=new Tt;return a.x=this.x,a.y=this.y,a},st=Tt.prototype,st.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},st.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this};function Zo(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 Tt(x,E)}return new Tt}function wr(a){return a.x.toString()+" "+a.y.toString()}st.toString=function(){return"Point("+this.x+","+this.y+")"},st.D=function(a){return a instanceof Tt?this.x===a.x&&this.y===a.y:!1},st.hi=function(a,y){return this.x===a&&this.y===y},st.Xa=function(a){return rn.B(this.x,a.x)&&rn.B(this.y,a.y)},st.add=function(a){return this.x+=a.x,this.y+=a.y,this},st.re=function(a){return this.x-=a.x,this.y-=a.y,this},st.offset=function(a,y){return this.x+=a,this.y+=y,this},Tt.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},st=Tt.prototype,st.scale=function(a,y){return this.x*=a,this.y*=y,this},st.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},st.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},st.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},st.ab=function(a){return vr(a.x-this.x,a.y-this.y)},st.direction=function(a,y){return vr(a-this.x,y-this.y)};function vr(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}st.Ry=function(a,y){return rn.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},st.fA=function(a,y,x,b){return rn.qh(a,y,x,b,this.x,this.y,this),this},st.gA=function(a,y){return rn.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},st.uA=function(a,y,x,b){return rn.No(this.x,this.y,a,y,x,b,this),this},st.vA=function(a,y){return rn.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},st.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},st.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},st.transform=function(a){return a.Ga(this),this};function Qi(a,y){return y.Cd(a),a}function Qr(a,y,x,b,E,te){var ne=E-x,ae=te-b,fe=ne*ne+ae*ae;x-=a,b-=y;var Pe=-x*ne-b*ae;return 0>=Pe||Pe>=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 Gi(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Ui(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)}st.w=function(){return isFinite(this.x)&&isFinite(this.y)},Tt.alloc=function(){var a=qi.pop();return a===void 0?new Tt:a},Tt.allocAt=function(a,y){var x=qi.pop();return x===void 0?new Tt(a,y):(x.x=a,x.y=y,x)},Tt.free=function(a){qi.push(a)},Tt.prototype.isReal=Tt.prototype.w,Tt.prototype.setSpot=Tt.prototype.yi,Tt.prototype.setRectSpot=Tt.prototype.xi,Tt.prototype.snapToGridPoint=Tt.prototype.vA,Tt.prototype.snapToGrid=Tt.prototype.uA,Tt.prototype.projectOntoLineSegmentPoint=Tt.prototype.gA,Tt.prototype.projectOntoLineSegment=Tt.prototype.fA,Tt.intersectingLineSegments=function(a,y,x,b,E,te,ne,ae){return rn.Rl(a,y,x,b,E,te,ne,ae)},Tt.prototype.compareWithLineSegmentPoint=Tt.prototype.Ry,Tt.compareWithLineSegment=function(a,y,x,b,E,te){return rn.Fl(a,y,x,b,E,te)},Tt.prototype.direction=Tt.prototype.direction,Tt.prototype.directionPoint=Tt.prototype.ab,Tt.prototype.normalize=Tt.prototype.normalize,Tt.prototype.distanceSquared=Tt.prototype.zd,Tt.prototype.distanceSquaredPoint=Tt.prototype.Bf,Tt.prototype.scale=Tt.prototype.scale,Tt.prototype.rotate=Tt.prototype.rotate,Tt.prototype.offset=Tt.prototype.offset,Tt.prototype.subtract=Tt.prototype.re,Tt.prototype.add=Tt.prototype.add,Tt.prototype.equalsApprox=Tt.prototype.Xa,Tt.prototype.equalTo=Tt.prototype.hi,Tt.prototype.equals=Tt.prototype.D,Tt.prototype.set=Tt.prototype.set,Tt.prototype.setTo=Tt.prototype.sg;var qi=[];Tt.className="Point",Tt.parse=Zo,Tt.stringify=wr,Tt.distanceLineSegmentSquared=Qr,Tt.distanceSquared=Gi,Tt.direction=Ui,Tt.Origin=xr=new Tt(0,0).ja(),Tt.InfiniteTopLeft=Po=new Tt(-1/0,-1/0).ja(),Tt.InfiniteBottomRight=Wo=new Tt(1/0,1/0).ja(),Tt.SixPoint=Co=new Tt(6,6).ja(),Tt.NoPoint=qo=new Tt(NaN,NaN).ja(),Tt.parse=Zo,Tt.stringify=wr,Tt.distanceLineSegmentSquared=Qr,Tt.distanceSquared=Gi,Tt.direction=Ui;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):Ft("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var qr,_o,Ko,Eo,rs,ms,Ls;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},st=Xn.prototype,st.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},st.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this};function ws(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 ta(a){return a.width.toString()+" "+a.height.toString()}st.toString=function(){return"Size("+this.width+","+this.height+")"},st.D=function(a){return a instanceof Xn?this.width===a.width&&this.height===a.height:!1},st.hi=function(a,y){return this.width===a&&this.height===y},st.Xa=function(a){return rn.B(this.width,a.width)&&rn.B(this.height,a.height)},st.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},st.w=function(){return isFinite(this.width)&&isFinite(this.height)},Xn.alloc=function(){var a=aa.pop();return a===void 0?new Xn:a},Xn.free=function(a){aa.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 aa=[];Xn.className="Size",Xn.parse=ws,Xn.stringify=ta,Xn.ZeroSize=qr=new Xn(0,0).ja(),Xn.OneSize=_o=new Xn(1,1).ja(),Xn.SixSize=Ko=new Xn(6,6).ja(),Xn.EightSize=Eo=new Xn(8,8).ja(),Xn.TenSize=rs=new Xn(10,10).ja(),Xn.InfiniteSize=ms=new Xn(1/0,1/0).ja(),Xn.NoSize=Ls=new Xn(NaN,NaN).ja(),Xn.parse=ws,Xn.stringify=ta;function Ln(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 Tt?(x=a.x,a=a.y,y instanceof Tt?(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):Ft("Incorrect second argument supplied to Rect constructor "+y)):Ft("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}st=Ln.prototype,st.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},st.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Os(a,y,x){a.width=y,a.height=x}st.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},st.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},st.dd=function(a){return this.x=a.x,this.y=a.y,this},st.tA=function(a){return this.width=a.width,this.height=a.height,this},Ln.prototype.copy=function(){var a=new Ln;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},st=Ln.prototype,st.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},st.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this};function hl(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 Ln(x,E,te,ne)}return new Ln}function dl(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}st.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},st.D=function(a){return a instanceof Ln?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},st.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},st.Xa=function(a){return rn.B(this.x,a.x)&&rn.B(this.y,a.y)&&rn.B(this.width,a.width)&&rn.B(this.height,a.height)};function vs(a,y){return rn.$(a.x,y.x)&&rn.$(a.y,y.y)&&rn.$(a.width,y.width)&&rn.$(a.height,y.height)}st.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},st.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},st.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},st.offset=function(a,y){return this.x+=a,this.y+=y,this},st.Bc=function(a,y){return ja(this,y,a,y,a)},st.Co=function(a){return ja(this,a.top,a.right,a.bottom,a.left)},st.Fv=function(a){return ja(this,-a.top,-a.right,-a.bottom,-a.left)},st.Hz=function(a,y,x,b){return ja(this,a,y,x,b)};function ja(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}st.Ex=function(a){return lu(this,a.x,a.y,a.width,a.height)},st.Uu=function(a,y,x,b){return lu(this,a,y,x,b)};function lu(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}st.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},st.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 Vl(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))}st.Ye=function(a){return ho(this,a.x,a.y,0,0)},st.ed=function(a){return ho(this,a.x,a.y,a.width,a.height)},st.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),ho(this,a,y,x,b)};function ho(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}st.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 Er(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 na(a,y,x,b,E,te,ne,ae){return a>ne+E||E>x+a?!1:!(y>ae+te||te>b+y)}st.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},st.Mz=function(){return this.width===0&&this.height===0},Ln.alloc=function(){var a=Kr.pop();return a===void 0?new Ln:a},Ln.allocAt=function(a,y,x,b){var E=Kr.pop();return E===void 0?new Ln(a,y,x,b):E.h(a,y,x,b)},Ln.free=function(a){Kr.push(a)},et.Object.defineProperties(Ln.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 Tt(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 Tt(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}}}),Ln.prototype.isEmpty=Ln.prototype.Mz,Ln.prototype.isReal=Ln.prototype.w,Ln.intersectsLineSegment=function(a,y,x,b,E,te,ne,ae){return rn.Fx(a,y,x,b,E,te,ne,ae)},Ln.prototype.setSpot=Ln.prototype.yi,Ln.prototype.union=Ln.prototype.Kv,Ln.prototype.unionRect=Ln.prototype.ed,Ln.prototype.unionPoint=Ln.prototype.Ye,Ln.prototype.intersects=Ln.prototype.Vu,Ln.prototype.intersectsRect=Ln.prototype.Yc,Ln.prototype.intersect=Ln.prototype.Uu,Ln.prototype.intersectRect=Ln.prototype.Ex,Ln.prototype.grow=Ln.prototype.Hz,Ln.prototype.subtractMargin=Ln.prototype.Fv,Ln.prototype.addMargin=Ln.prototype.Co,Ln.prototype.inflate=Ln.prototype.Bc,Ln.prototype.offset=Ln.prototype.offset,Ln.prototype.contains=Ln.prototype.contains,Ln.prototype.containsRect=Ln.prototype.Re,Ln.prototype.containsPoint=Ln.prototype.ca,Ln.prototype.equalsApprox=Ln.prototype.Xa,Ln.prototype.equalTo=Ln.prototype.hi,Ln.prototype.equals=Ln.prototype.D,Ln.prototype.setSize=Ln.prototype.tA,Ln.prototype.setPoint=Ln.prototype.dd,Ln.prototype.set=Ln.prototype.set,Ln.prototype.setTo=Ln.prototype.sg;var Rr=null,io=null,Kr=[];Ln.className="Rect",Ln.parse=hl,Ln.stringify=dl,Ln.contains=Er,Ln.intersects=na,Ln.ZeroRect=Rr=new Ln(0,0,0,0).ja(),Ln.NoRect=io=new Ln(NaN,NaN,NaN,NaN).ja(),Ln.parse=hl,Ln.stringify=dl,Ln.contains=Er,Ln.intersects=na;function Ei(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):Ft("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ei.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ei.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Ei.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ei.prototype.copy=function(){var a=new Ei;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},st=Ei.prototype,st.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},st.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this};function ls(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 Ei;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Ei(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Ei(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Ei(x,E):new Ei(x,E,te,ne)}return new Ei}function Ms(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}st.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},st.D=function(a){return a instanceof Ei?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},st.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},st.Xa=function(a){return rn.B(this.top,a.top)&&rn.B(this.right,a.right)&&rn.B(this.bottom,a.bottom)&&rn.B(this.left,a.left)},st.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Ei.alloc=function(){var a=Ja.pop();return a===void 0?new Ei:a},Ei.free=function(a){Ja.push(a)},Ei.prototype.isReal=Ei.prototype.w,Ei.prototype.equalsApprox=Ei.prototype.Xa,Ei.prototype.equalTo=Ei.prototype.hi,Ei.prototype.equals=Ei.prototype.D,Ei.prototype.set=Ei.prototype.set,Ei.prototype.setTo=Ei.prototype.sg;var ba=null,za=null,Ja=[];Ei.className="Margin",Ei.parse=ls,Ei.stringify=Ms,Ei.ZeroMargin=ba=new Ei(0,0,0,0).ja(),Ei.TwoMargin=za=new Ei(2,2,2,2).ja(),Ei.parse=ls,Ei.stringify=Ms;function yi(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 fs,$s,Qa,wl,Il,Fr,nc,Aa,Ha,Ta,$l,Pu,Ua,Ga,Uu,yc,Eu,Dl,Sc,Gu,Lu,bl,th,xc,uu,so,jo,La,ia,Is,bs,Ts,Gs,Ws,Yl,Rl;yi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},yi.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},yi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},yi.prototype.copy=function(){var a=new yi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},st=yi.prototype,st.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},st.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ds(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 fs;if(a==="TopLeft")return $s;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Qa;if(a==="TopRight")return wl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Il;if(a==="Center")return Fr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return nc;if(a==="BottomLeft")return Aa;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ha;if(a==="BottomRight")return Ta;if(a==="TopSide")return $l;if(a==="LeftSide")return Pu;if(a==="RightSide")return Ua;if(a==="BottomSide")return Ga;if(a==="TopBottomSides")return Uu;if(a==="LeftRightSides")return yc;if(a==="TopLeftSides")return Eu;if(a==="TopRightSides")return Dl;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 uu;if(a==="Default")return so;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 yi(x,E,te,ne)}return new yi}function nh(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}st.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(fs)?"None":this.D($s)?"TopLeft":this.D(Qa)?"Top":this.D(wl)?"TopRight":this.D(Il)?"Left":this.D(Fr)?"Center":this.D(nc)?"Right":this.D(Aa)?"BottomLeft":this.D(Ha)?"Bottom":this.D(Ta)?"BottomRight":this.D($l)?"TopSide":this.D(Pu)?"LeftSide":this.D(Ua)?"RightSide":this.D(Ga)?"BottomSide":this.D(Uu)?"TopBottomSides":this.D(yc)?"LeftRightSides":this.D(Eu)?"TopLeftSides":this.D(Dl)?"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(uu)?"AllSides":this.D(so)?"Default":"None"},st.D=function(a){return a instanceof yi?(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},st.gv=function(){return new yi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},st.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(jo))a=Pu;else if(a.D(La))a=Ua;else if(a.D(ia))a=$l;else if(a.D(Is))a=Ga;else return!1;return a=a.offsetY,(this.offsetY&a)===a},st.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},st.Mc=function(){return isNaN(this.x)||isNaN(this.y)},st.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},st.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},st.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},yi.alloc=function(){var a=wc.pop();return a===void 0?new yi:a},yi.free=function(a){wc.push(a)},yi.prototype.isDefault=yi.prototype.Xb,yi.prototype.isNone=yi.prototype.ys,yi.prototype.isSide=yi.prototype.$c,yi.prototype.isNoSpot=yi.prototype.Mc,yi.prototype.isSpot=yi.prototype.sb,yi.prototype.includesSide=yi.prototype.Hf,yi.prototype.opposite=yi.prototype.gv,yi.prototype.equals=yi.prototype.D,yi.prototype.set=yi.prototype.set,yi.prototype.setTo=yi.prototype.sg;var wc=[];yi.className="Spot",yi.parse=xh,yi.stringify=nh,yi.None=fs=Ds(new yi(0,0,0,0),0).ja(),yi.Default=so=Ds(new yi(0,0,-1,0),-1).ja(),yi.TopLeft=$s=new yi(0,0,0,0).ja(),yi.TopCenter=Qa=new yi(.5,0,0,0).ja(),yi.TopRight=wl=new yi(1,0,0,0).ja(),yi.LeftCenter=Il=new yi(0,.5,0,0).ja(),yi.Center=Fr=new yi(.5,.5,0,0).ja(),yi.RightCenter=nc=new yi(1,.5,0,0).ja(),yi.BottomLeft=Aa=new yi(0,1,0,0).ja(),yi.BottomCenter=Ha=new yi(.5,1,0,0).ja(),yi.BottomRight=Ta=new yi(1,1,0,0).ja(),yi.MiddleTop=bs=Qa,yi.MiddleLeft=Ts=Il,yi.MiddleRight=Gs=nc,yi.MiddleBottom=Ws=Ha,yi.Top=ia=Qa,yi.Left=jo=Il,yi.Right=La=nc,yi.Bottom=Is=Ha,yi.TopSide=$l=Ds(new yi(0,0,1,1),1).ja(),yi.LeftSide=Pu=Ds(new yi(0,0,1,2),1).ja(),yi.RightSide=Ua=Ds(new yi(0,0,1,4),1).ja(),yi.BottomSide=Ga=Ds(new yi(0,0,1,8),1).ja(),yi.TopBottomSides=Uu=Ds(new yi(0,0,1,9),1).ja(),yi.LeftRightSides=yc=Ds(new yi(0,0,1,6),1).ja(),yi.TopLeftSides=Eu=Ds(new yi(0,0,1,3),1).ja(),yi.TopRightSides=Dl=Ds(new yi(0,0,1,5),1).ja(),yi.BottomLeftSides=Sc=Ds(new yi(0,0,1,10),1).ja(),yi.BottomRightSides=Gu=Ds(new yi(0,0,1,12),1).ja(),yi.NotTopSide=Lu=Ds(new yi(0,0,1,14),1).ja(),yi.NotLeftSide=bl=Ds(new yi(0,0,1,13),1).ja(),yi.NotRightSide=th=Ds(new yi(0,0,1,11),1).ja(),yi.NotBottomSide=xc=Ds(new yi(0,0,1,7),1).ja(),yi.AllSides=uu=Ds(new yi(0,0,1,15),1).ja(),Yl=new yi(.156,.156).ja(),Rl=new yi(.844,.844).ja(),yi.parse=xh,yi.stringify=nh;function gr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}gr.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},gr.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},gr.prototype.copy=function(){var a=new gr;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},gr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},gr.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},gr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},gr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},gr.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},gr.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},gr.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},gr.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},st=gr.prototype,st.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},st.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},st.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)},st.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))},st.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))},st.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,Pe=this.dx,Me=this.dy,Fe=y*te+x*ae+Pe,Ye=y*ne+x*fe+Me,nt=b*te+x*ae+Pe,ot=b*ne+x*fe+Me;return x=y*te+E*ae+Pe,y=y*ne+E*fe+Me,te=b*te+E*ae+Pe,b=b*ne+E*fe+Me,E=Math.min(Fe,nt),Fe=Math.max(Fe,nt),nt=Math.min(Ye,ot),Ye=Math.max(Ye,ot),E=Math.min(E,x),Fe=Math.max(Fe,x),nt=Math.min(nt,y),Ye=Math.max(Ye,y),E=Math.min(E,te),Fe=Math.max(Fe,te),nt=Math.min(nt,b),Ye=Math.max(Ye,b),a.h(E,nt,Fe-E,Ye-nt),a},gr.alloc=function(){var a=bc.pop();return a===void 0?new gr:a},gr.free=function(a){bc.push(a)},gr.prototype.transformRect=gr.prototype.pp,gr.prototype.transformPoint=gr.prototype.Ga,gr.prototype.scale=gr.prototype.scale,gr.prototype.translate=gr.prototype.translate,gr.prototype.rotate=gr.prototype.rotate,gr.prototype.invert=gr.prototype.Vj,gr.prototype.multiplyInverted=gr.prototype.bv,gr.prototype.multiply=gr.prototype.multiply,gr.prototype.reset=gr.prototype.reset,gr.prototype.isIdentity=gr.prototype.ws,gr.prototype.equals=gr.prototype.D,gr.prototype.setTransform=gr.prototype.setTransform,gr.prototype.set=gr.prototype.set;var bc=[];gr.className="Transform",gr.xF="54a702f3e53909c447824c6706603faf4c";var rn={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=rn.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);rn.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 Pe=y,Me=b;else Pe=b,Me=y;if(a===x)return Pe<=ne&&ne<=Me&&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&&(Me+=E,Pe-=E,Pe<=ne&&ne<=Me))if(fe-ae>Me-Pe)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,Pe,Me,Fe){if(rn.Yb(a,y,ne,ae,Fe,x,b)&&rn.Yb(a,y,ne,ae,Fe,E,te))return rn.Yb(a,y,ne,ae,Fe,Pe,Me);var Ye=(a+x)/2,nt=(y+b)/2,ot=(x+E)/2,ft=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Ye+ot)/2,x=(nt+ft)/2,ot=(ot+E)/2,ft=(ft+te)/2;var Ot=(b+ot)/2,Mt=(x+ft)/2;return rn.cs(a,y,Ye,nt,b,x,Ot,Mt,fe,Pe,Me,Fe)||rn.cs(Ot,Mt,ot,ft,E,te,ne,ae,fe,Pe,Me,Fe)},ax:function(a,y,x,b,E,te,ne,ae,fe){var Pe=(x+E)/2,Me=(b+te)/2;return fe.h((((a+x)/2+Pe)/2+(Pe+(E+ne)/2)/2)/2,(((y+b)/2+Me)/2+(Me+(te+ae)/2)/2)/2),fe},My:function(a,y,x,b,E,te,ne,ae){var fe=(x+E)/2,Pe=(b+te)/2;return Ui(((a+x)/2+fe)/2,((y+b)/2+Pe)/2,(fe+(E+ne)/2)/2,(Pe+(te+ae)/2)/2)},Dl:function(a,y,x,b,E,te,ne,ae,fe,Pe){if(rn.Yb(a,y,ne,ae,fe,x,b)&&rn.Yb(a,y,ne,ae,fe,E,te))ho(Pe,a,y,0,0),ho(Pe,ne,ae,0,0);else{var Me=(a+x)/2,Fe=(y+b)/2,Ye=(x+E)/2,nt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Me+Ye)/2,x=(Fe+nt)/2,Ye=(Ye+E)/2,nt=(nt+te)/2;var ot=(b+Ye)/2,ft=(x+nt)/2;rn.Dl(a,y,Me,Fe,b,x,ot,ft,fe,Pe),rn.Dl(ot,ft,Ye,nt,E,te,ne,ae,fe,Pe)}return Pe},Qe:function(a,y,x,b,E,te,ne,ae,fe,Pe){if(rn.Yb(a,y,ne,ae,fe,x,b)&&rn.Yb(a,y,ne,ae,fe,E,te))Pe.length===0&&(Pe.push(a),Pe.push(y)),Pe.push(ne),Pe.push(ae);else{var Me=(a+x)/2,Fe=(y+b)/2,Ye=(x+E)/2,nt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Me+Ye)/2,x=(Fe+nt)/2,Ye=(Ye+E)/2,nt=(nt+te)/2;var ot=(b+Ye)/2,ft=(x+nt)/2;rn.Qe(a,y,Me,Fe,b,x,ot,ft,fe,Pe),rn.Qe(ot,ft,Ye,nt,E,te,ne,ae,fe,Pe)}return Pe},jv:function(a,y,x,b,E,te,ne,ae,fe,Pe){if(rn.Yb(a,y,E,te,Pe,x,b))return rn.Yb(a,y,E,te,Pe,ae,fe);var Me=(a+x)/2,Fe=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ye=(Me+x)/2,nt=(Fe+b)/2;return rn.jv(a,y,Me,Fe,Ye,nt,ne,ae,fe,Pe)||rn.jv(Ye,nt,x,b,E,te,ne,ae,fe,Pe)},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(rn.Yb(a,y,E,te,ne,x,b))ho(ae,a,y,0,0),ho(ae,E,te,0,0);else{var fe=(a+x)/2,Pe=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Me=(fe+x)/2,Fe=(Pe+b)/2;rn.iv(a,y,fe,Pe,Me,Fe,ne,ae),rn.iv(Me,Fe,x,b,E,te,ne,ae)}return ae},ep:function(a,y,x,b,E,te,ne,ae){if(rn.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,Pe=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Me=(fe+x)/2,Fe=(Pe+b)/2;rn.ep(a,y,fe,Pe,Me,Fe,ne,ae),rn.ep(Me,Fe,x,b,E,te,ne,ae)}return ae},Eo:function(a,y,x,b,E,te,ne,ae,fe,Pe,Me,Fe,Ye,nt){if(rn.Yb(a,y,ne,ae,Ye,x,b)&&rn.Yb(a,y,ne,ae,Ye,E,te))return!rn.Rl(a,y,ne,ae,fe,Pe,Me,Fe)||(Ye=(a-ne)*(Pe-Fe)-(y-ae)*(fe-Me),Ye===0)?!1:(nt.h(((a*ae-y*ne)*(fe-Me)-(a-ne)*(fe*Fe-Pe*Me))/Ye,((a*ae-y*ne)*(Pe-Fe)-(y-ae)*(fe*Fe-Pe*Me))/Ye),!0);var ot=(a+x)/2,ft=(y+b)/2,Ot=(x+E)/2,Mt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(ot+Ot)/2,x=(ft+Mt)/2,Ot=(Ot+E)/2,Mt=(Mt+te)/2;var Ht=(b+Ot)/2,Wt=(x+Mt)/2,Kt=1/0,Qt=!1,gn=0,ni=0;return rn.Eo(a,y,ot,ft,b,x,Ht,Wt,fe,Pe,Me,Fe,Ye,nt)&&(a=(nt.x-fe)*(nt.x-fe)+(nt.y-Pe)*(nt.y-Pe),a<Kt&&(Kt=a,Qt=!0,gn=nt.x,ni=nt.y)),rn.Eo(Ht,Wt,Ot,Mt,E,te,ne,ae,fe,Pe,Me,Fe,Ye,nt)&&(nt.x-fe)*(nt.x-fe)+(nt.y-Pe)*(nt.y-Pe)<Kt&&(Qt=!0,gn=nt.x,ni=nt.y),Qt&&(nt.x=gn,nt.y=ni),Qt},Fo:function(a,y,x,b,E,te,ne,ae,fe,Pe,Me,Fe,Ye){var nt=0;if(rn.Yb(a,y,ne,ae,Ye,x,b)&&rn.Yb(a,y,ne,ae,Ye,E,te)){if(Ye=(a-ne)*(Pe-Fe)-(y-ae)*(fe-Me),Ye===0)return nt;var ot=((a*ae-y*ne)*(fe-Me)-(a-ne)*(fe*Fe-Pe*Me))/Ye,ft=((a*ae-y*ne)*(Pe-Fe)-(y-ae)*(fe*Fe-Pe*Me))/Ye;if(ot>=Me)return nt;if((fe>Me?fe-Me:Me-fe)<(Pe>Fe?Pe-Fe:Fe-Pe)){if(y<ae?(fe=y,a=ae):(fe=ae,a=y),ft<fe||ft>a)return nt}else if(a<ne?(fe=a,a=ne):fe=ne,ot<fe||ot>a)return nt;0<Ye?nt++:0>Ye&&nt--}else{ot=(a+x)/2,ft=(y+b)/2;var Ot=(x+E)/2,Mt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(ot+Ot)/2,x=(ft+Mt)/2,Ot=(Ot+E)/2,Mt=(Mt+te)/2;var Ht=(b+Ot)/2,Wt=(x+Mt)/2;nt+=rn.Fo(a,y,ot,ft,b,x,Ht,Wt,fe,Pe,Me,Fe,Ye),nt+=rn.Fo(Ht,Wt,Ot,Mt,E,te,ne,ae,fe,Pe,Me,Fe,Ye)}return nt},qh:function(a,y,x,b,E,te,ne){return rn.$(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)):rn.$(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 rn.B(a,x)&&rn.B(y,b)?(fe.h(a,y),!1):rn.$(E,ne)?rn.$(a,x)?(rn.qh(a,y,x,b,E,te,fe),!1):rn.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,fe):(ae=(ae-te)/(ne-E),rn.$(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),rn.$(ae,ne)?(rn.qh(a,y,x,b,E,te,fe),!1):(E=(ne*a-ae*E+te-y)/(ne-ae),rn.$(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)):rn.qh(a,y,x,b,E,ne*(E-a)+y,fe))))},MA:function(a,y,x,b,E){return rn.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,Pe){function Me(Ot,Mt){var Ht=(Ot-a)*(Ot-a)+(Mt-y)*(Mt-y);Ht<Fe&&(Fe=Ht,fe.h(Ot,Mt))}var Fe=1/0;Me(fe.x,fe.y);var Ye=0,nt=0,ot=0,ft=0;if(E<ne?(Ye=E,nt=ne):(Ye=ne,nt=E),te<ae?(ot=E,ft=ne):(ot=ne,ft=E),Ye=(nt-Ye)/2+Pe,Pe=(ft-ot)/2+Pe,E=(E+ne)/2,te=(te+ae)/2,Ye===0||Pe===0)return fe;if(.5>(x>a?x-a:a-x)){if(Ye=1-(x-E)*(x-E)/(Ye*Ye),0>Ye)return fe;Ye=Math.sqrt(Ye),b=-Pe*Ye+te,Me(x,Pe*Ye+te),Me(x,b)}else{if(x=(b-y)/(x-a),b=1/(Ye*Ye)+x*x/(Pe*Pe),ae=2*x*(y-x*a)/(Pe*Pe)-2*x*te/(Pe*Pe)-2*E/(Ye*Ye),Ye=ae*ae-4*b*(2*x*a*te/(Pe*Pe)-2*y*te/(Pe*Pe)+te*te/(Pe*Pe)+E*E/(Ye*Ye)-1+(y-x*a)*(y-x*a)/(Pe*Pe)),0>Ye)return fe;Ye=Math.sqrt(Ye),Pe=(-ae+Ye)/(2*b),Me(Pe,x*Pe-x*a+y),Ye=(-ae-Ye)/(2*b),Me(Ye,x*Ye-x*a+y)}return fe},Ff:function(a,y,x,b,E,te,ne,ae,fe){var Pe=1e21,Me=a,Fe=y;if(rn.Ve(a,y,a,b,E,te,ne,ae,fe)){var Ye=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te);Ye<Pe&&(Pe=Ye,Me=fe.x,Fe=fe.y)}return rn.Ve(x,y,x,b,E,te,ne,ae,fe)&&(Ye=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),Ye<Pe&&(Pe=Ye,Me=fe.x,Fe=fe.y)),rn.Ve(a,y,x,y,E,te,ne,ae,fe)&&(y=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),y<Pe&&(Pe=y,Me=fe.x,Fe=fe.y)),rn.Ve(a,b,x,b,E,te,ne,ae,fe)&&(a=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),a<Pe&&(Pe=a,Me=fe.x,Fe=fe.y)),fe.h(Me,Fe),1e21>Pe},us:function(a,y,x){return rn.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,Pe=y+b;return E===ne?(te<ae?(ne=te,te=ae):ne=ae,a<=E&&E<=fe&&ne<=Pe&&te>=y):te===ae?(E<ne?(ae=E,E=ne):ae=ne,y<=te&&te<=Pe&&ae<=fe&&E>=a):!!(Er(a,y,x,b,E,te)||Er(a,y,x,b,ne,ae)||rn.Rl(a,y,fe,y,E,te,ne,ae)||rn.Rl(fe,y,fe,Pe,E,te,ne,ae)||rn.Rl(fe,Pe,a,Pe,E,te,ne,ae)||rn.Rl(a,Pe,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>=rn.Fl(a,y,x,b,E,te)*rn.Fl(a,y,x,b,ne,ae)&&0>=rn.Fl(E,te,ne,ae,a,y)*rn.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,Pe=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return fe=Pe+ae*Math.min(b,fe),ae=a+x*Math.cos(Pe),Pe=y+x*Math.sin(Pe),a+=x*Math.cos(fe),y+=x*Math.sin(fe),x=(ae+a)/2,fe=(Pe+y)/2,te.push([ae,Pe,x,fe,x,fe,a,y]),te;for(;1e-5<b;)E=Pe+ae*Math.min(b,fe),te.push(rn.Vy(x,Pe,E,a,y)),b-=Math.abs(E-Pe),Pe=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,Pe=ne*ne+fe*fe,Me=Pe+ne*ne+fe*ae;return Pe=4/3*(Math.sqrt(2*Pe*Me)-Me)/(ne*ae-fe*ne),ae=ne-Pe*fe,ne=fe+Pe*ne,fe=-ne,Pe=te+y,te=Math.cos(Pe),Pe=Math.sin(Pe),[b+a*Math.cos(y),E+a*Math.sin(y),b+ae*te-ne*Pe,E+ae*Pe+ne*te,b+ae*te-fe*Pe,E+ae*Pe+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,Pe=ne===0?x:b;return(ne===0?E:te)&&(Pe=-Pe),ne=ae,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),rn.az(fe,ne===0?a:y,Pe,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 Pe=0;9999999999>Pe&&(y=.5*(ae+fe),!(y===ae||y===fe));++Pe){var Me=a/(y+E),Fe=ne/(y+te);if(Me=Me*Me+Fe*Fe-1,0<Me)ae=y;else if(0>Me)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 pi,um:new pi,Mf:new pi,Nf:0,vm:100};rn.za=rn.AA;function Qn(a){Sr(this),this.l=2,a===void 0&&(a=Qn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Qn.o?this.ee=new On:(Qn.V===null&&(Qn.V=new On().freeze()),this.ee=Qn.V),this.aq=this.ee.Ja,this.Ip=new Ln().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=$s,this.gg=Ta,this.Rk=this.Sk=NaN,this.Uf=Un}Qn.prototype.copy=function(){var a=new Qn;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===Qn.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},Qn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Qn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Qn.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},Qn.prototype.ka=function(){if(Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Qn.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},Qn.prototype.Xa=function(a){if(!(a instanceof Qn))return!1;if(this.type!==a.type)return this.type===Qn.j&&a.type===Qn.o?wh(this,a):a.type===Qn.j&&this.type===Qn.o?wh(a,this):!1;if(this.type===Qn.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 rn.B(this.startX,a.startX)&&rn.B(this.startY,a.startY)&&rn.B(this.endX,a.endX)&&rn.B(this.endY,a.endY)};function wh(a,y){return a.type!==Qn.j||y.type!==Qn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&rn.B(a.startX,y.startX)&&rn.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===wo&&rn.B(a.endX,y.endX)&&rn.B(a.endY,y.endY))))}Qn.ia=function(a){return a.toString()},Qn.prototype.qb=function(a){a.classType===Qn&&(this.type=a)},Qn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Qn.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 Qn.u:var y=new Ln(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 Qn.F:if(y=new Ln(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 Qn.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()}},Qn.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},Qn.parse=function(a,y){function x(){return ft>=Kt-1?!0:Pe[ft+1].match(Qt)!==null}function b(){return ft++,Pe[ft]}function E(nr){var $i=parseFloat(b()),eo=parseFloat(b());Ot===Ot.toLowerCase()&&($i=Wt.x+$i,eo=Wt.y+eo),nr.h($i,eo)}function te(){return E(Wt),Wt}function ne(){return E(Ht),Ht}function ae(){var nr=Mt.toLowerCase();return nr!=="c"&&nr!=="s"&&nr!=="q"&&nr!=="t"?Wt:new Tt(2*Wt.x-Ht.x,2*Wt.y-Ht.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 Pe=a.split(" ");for(a=0;a<Pe.length;a++){var Me=Pe[a];if(Me.match(/(\.[0-9]*)(\.)/gm)!==null){fe=Gn();for(var Fe="",Ye=!1,nt=0;nt<Me.length;nt++){var ot=Me[nt];ot!=="."||Ye?ot==="."?(fe.push(Fe),Fe="."):Fe+=ot:(Ye=!0,Fe+=ot)}for(fe.push(Fe),Pe.splice(a,1),Me=0;Me<fe.length;Me++)Pe.splice(a+Me,0,fe[Me]);a+=fe.length-1,Jn(fe)}}var ft=-1,Ot="",Mt="";fe=new Tt(0,0);var Ht=new Tt(0,0),Wt=new Tt(0,0),Kt=Pe.length;a=A1(null),Ye=Fe=Me=!1,nt=!0,ot=null;for(var Qt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ft>=Kt-1);)if(Mt=Ot,Ot=b(),Ot!=="")switch(Ot.toUpperCase()){case"X":nt=!0,Fe=Me=!1;break;case"M":for(ot=te(),a.mc===null||nt===!0?(Sp(a,ot.x,ot.y,Me,!Fe,Ye),nt=!1):a.moveTo(ot.x,ot.y),fe.assign(Wt);!x();)ot=te(),a.lineTo(ot.x,ot.y);break;case"L":for(;!x();)ot=te(),a.lineTo(ot.x,ot.y);break;case"H":for(;!x();)Wt=new Tt((Ot===Ot.toLowerCase()?Wt.x:0)+parseFloat(b()),Wt.y),a.lineTo(Wt.x,Wt.y);break;case"V":for(;!x();)Wt=new Tt(Wt.x,(Ot===Ot.toLowerCase()?Wt.y:0)+parseFloat(b())),a.lineTo(Wt.x,Wt.y);break;case"C":for(;!x();){ot=new Tt,E(ot);var gn=ne(),ni=te();Ih(a,ot.x,ot.y,gn.x,gn.y,ni.x,ni.y)}break;case"S":for(;!x();)ot=ae(),gn=ne(),ni=te(),Ih(a,ot.x,ot.y,gn.x,gn.y,ni.x,ni.y);break;case"Q":for(;!x();)ot=ne(),gn=te(),Um(a,ot.x,ot.y,gn.x,gn.y);break;case"T":for(;!x();)Ht=ot=ae(),gn=te(),Um(a,ot.x,ot.y,gn.x,gn.y);break;case"B":for(;!x();){ot=parseFloat(b()),gn=parseFloat(b()),ni=parseFloat(b());var fi=parseFloat(b()),ui=parseFloat(b()),$n=ui,Rn=!1;x()||($n=parseFloat(b()),x()||(Rn=parseFloat(b())!==0)),Ot===Ot.toLowerCase()&&(ni+=Wt.x,fi+=Wt.y),a.arcTo(ot,gn,ni,fi,ui,$n,Rn)}break;case"A":for(;!x();)ot=Math.abs(parseFloat(b())),gn=Math.abs(parseFloat(b())),ni=parseFloat(b()),ui=fi=!1,Rn=$n=0,$n=b(),$n.length===1?(fi=!!parseFloat($n),ui=!!parseFloat(b()),$n=parseFloat(b())):$n.length===2?(fi=!!parseFloat($n[0]),ui=!!parseFloat($n[1]),$n=parseFloat(b())):(fi=!!parseFloat($n[0]),ui=!!parseFloat($n[1]),$n=parseFloat($n.slice(2))),Rn=parseFloat(b()),Ot===Ot.toLowerCase()&&($n=Wt.x+$n,Rn=Wt.y+Rn),Wt.h($n,Rn),Cx(a,ot,gn,ni,fi,ui,$n,Rn);break;case"Z":bx(a),Wt.assign(fe);break;case"F":for(ot="",gn=1;Pe[ft+gn];)if(Pe[ft+gn]==="0")Ye=!0,gn++;else if(Pe[ft+gn].match(/[Uu]/)!==null)gn++;else if(Pe[ft+gn].match(Qt)===null)gn++;else{ot=Pe[ft+gn];break}ot.match(/[Mm]/)?Me=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(ot="",gn=1;Pe[ft+gn];)if(Pe[ft+gn].match(/[Ff]/)!==null)gn++;else if(Pe[ft+gn].match(Qt)===null)gn++;else{ot=Pe[ft+gn];break}ot.match(/[Mm]/)?Fe=!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},Qn.Ha=function(a,y){for(var x=a.length,b=Tt.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}Tt.free(b)},Qn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Qn.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},Qn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Qn.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),ho(a,0,0,0,0),a.freeze()},Qn.prototype.ix=function(){var a=new Ln;return Qh(this,a,!0),a};function Qh(a,y,x){switch(a.type){case Qn.j:case Qn.u:case Qn.F:x?y.h(a.od,a.pd,0,0):ho(y,a.od,a.pd,0,0),ho(y,a.Dc,a.Ec,0,0);break;case Qn.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):ho(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,ae=ne.length,fe=te.startX,Pe=te.startY,Me=0;Me<ae;Me++){var Fe=ne[Me];switch(Fe.type){case wo:case Ps:fe=Fe.endX,Pe=Fe.endY,ho(y,fe,Pe,0,0);break;case fa:rn.Dl(fe,Pe,Fe.point1X,Fe.point1Y,Fe.point2X,Fe.point2Y,Fe.endX,Fe.endY,.5,y),fe=Fe.endX,Pe=Fe.endY;break;case fl:rn.iv(fe,Pe,Fe.point1X,Fe.point1Y,Fe.endX,Fe.endY,.5,y),fe=Fe.endX,Pe=Fe.endY;break;case ss:case Cl:var Ye=Fe.type===ss?Na(Fe,te):Ks(Fe,te,fe,Pe),nt=Ye.length;if(nt===0){fe=Fe.type===ss?Fe.centerX:Fe.endX,Pe=Fe.type===ss?Fe.centerY:Fe.endY,ho(y,fe,Pe,0,0);break}Fe=null;for(var ot=0;ot<nt;ot++)Fe=Ye[ot],rn.Dl(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5],Fe[6],Fe[7],.5,y);Fe!==null&&(fe=Fe[6],Pe=Fe[7]);break;default:Ft("Unknown Segment type: "+Fe.type)}}}break;default:Ft("Unknown Geometry type: "+a.type)}}Qn.prototype.normalize=function(){this._isFrozen&&$t(this);var a=this.ix();return this.offset(-a.x,-a.y),new Tt(-a.x,-a.y)},Qn.prototype.offset=function(a,y){return this._isFrozen&&$t(this),this.transform(1,0,0,1,a,y),this},Qn.prototype.scale=function(a,y){return this._isFrozen&&$t(this),this.transform(a,0,0,y,0,0),this},Qn.prototype.rotate=function(a,y,x){this._isFrozen&&$t(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=gr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),gr.free(b),this},st=Qn.prototype,st.transform=function(a,y,x,b,E,te){switch(this.type){case Qn.j:case Qn.u:case Qn.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 Qn.o:for(var fe=this.figures.s,Pe=fe.length,Me=0;Me<Pe;Me++){var Fe=fe[Me];ne=Fe.startX,ae=Fe.startY,Fe.startX=ne*a+ae*x+E,Fe.startY=ne*y+ae*b+te,Fe=Fe.segments.s;for(var Ye=Fe.length,nt=0;nt<Ye;nt++){var ot=Fe[nt];switch(ot.type){case wo:case Ps:ne=ot.endX,ae=ot.endY,ot.endX=ne*a+ae*x+E,ot.endY=ne*y+ae*b+te;break;case fa:ne=ot.point1X,ae=ot.point1Y,ot.point1X=ne*a+ae*x+E,ot.point1Y=ne*y+ae*b+te,ne=ot.point2X,ae=ot.point2Y,ot.point2X=ne*a+ae*x+E,ot.point2Y=ne*y+ae*b+te,ne=ot.endX,ae=ot.endY,ot.endX=ne*a+ae*x+E,ot.endY=ne*y+ae*b+te;break;case fl:ne=ot.point1X,ae=ot.point1Y,ot.point1X=ne*a+ae*x+E,ot.point1Y=ne*y+ae*b+te,ne=ot.endX,ae=ot.endY,ot.endX=ne*a+ae*x+E,ot.endY=ne*y+ae*b+te;break;case ss:ne=ot.centerX,ae=ot.centerY,ot.centerX=ne*a+ae*x+E,ot.centerY=ne*y+ae*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),ot.startAngle+=ne),0>a&&(ot.startAngle=180-ot.startAngle,ot.sweepAngle=-ot.sweepAngle),0>b&&(ot.startAngle=-ot.startAngle,ot.sweepAngle=-ot.sweepAngle),ot.radiusX*=Math.sqrt(a*a+x*x),ot.radiusY!==void 0&&(ot.radiusY*=Math.sqrt(y*y+b*b));break;case Cl:if(ne=ot.endX,ae=ot.endY,ot.endX=ne*a+ae*x+E,ot.endY=ne*y+ae*b+te,ot.radiusX===0||ot.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),ot.xAxisRotation+=ne),0>a&&(ot.xAxisRotation=180-ot.xAxisRotation,ot.isClockwiseArc=!ot.isClockwiseArc),0>b&&(ot.xAxisRotation=-ot.xAxisRotation,ot.isClockwiseArc=!ot.isClockwiseArc),ot.radiusX*=Math.sqrt(a*a+x*x),ot.radiusY*=Math.sqrt(y*y+b*b);break;default:Ft("Unknown Segment type: "+ot.type)}}}}return this._isInvalidBounds=!0,this},st.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 Qn.j:return rn.Yb(x,b,E,te,y,a.x,a.y);case Qn.u:var ne=Ln.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),Ln.free(ne),a;case Qn.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 Qn.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,Pe,Me,Fe,Ye=a.figures.s,nt=Ye.length,ot=0;ot<nt;ot++){var ft=Ye[ot],Ot=!ft.isEvenOdd;if(ft.isFilled){if(b&&ft.ca(te,y,x))return!0;var Mt=ft.segments;fe=ft.startX,Pe=ft.startY;for(var Ht=fe,Wt=Pe,Kt=Mt.s,Qt=0;Qt<=Mt.length;Qt++){var gn=void 0;if(Qt!==Mt.length){gn=Kt[Qt];var ni=gn.type;a=gn.endX,Fe=gn.endY}else ni=wo,a=Ht,Fe=Wt;switch(ni){case Ps:if(Ht=Tu(te,y,ne,y,fe,Pe,Ht,Wt),isNaN(Ht))return!0;ae+=Ht,Ht=a,Wt=Fe;break;case wo:if(fe=Tu(te,y,ne,y,fe,Pe,a,Fe),isNaN(fe))return!0;ae+=fe;break;case fa:Me=rn.Fo(fe,Pe,gn.point1X,gn.point1Y,gn.point2X,gn.point2Y,a,Fe,ne,y,te,y,.5),ae+=Me;break;case fl:Me=rn.Fo(fe,Pe,(fe+2*gn.point1X)/3,(Pe+2*gn.point1Y)/3,(2*gn.point1X+a)/3,(2*gn.point1Y+Fe)/3,a,Fe,ne,y,te,y,.5),ae+=Me;break;case ss:case Cl:ni=gn.type===ss?Na(gn,ft):Ks(gn,ft,fe,Pe);var fi=ni.length;if(fi===0){if(fe=Tu(te,y,ne,y,fe,Pe,gn.type===ss?gn.centerX:gn.endX,gn.type===ss?gn.centerY:gn.endY),isNaN(fe))return!0;ae+=fe;break}gn=null;for(var ui=0;ui<fi;ui++){if(gn=ni[ui],ui===0){if(Me=Tu(te,y,ne,y,fe,Pe,gn[0],gn[1]),isNaN(Me))return!0;ae+=Me}Me=rn.Fo(gn[0],gn[1],gn[2],gn[3],gn[4],gn[5],gn[6],gn[7],ne,y,te,y,.5),ae+=Me}gn!==null&&(a=gn[6],Fe=gn[7]);break;default:Ft("Unknown Segment type: "+gn.type)}fe=a,Pe=Fe}if(Ot){if(ae!==0)return!0}else if(ae%2!==0)return!0;ae=0}else if(ft.ca(te,y,E?x:x+2))return!0}return!1}function Tu(a,y,x,b,E,te,ne,ae){if(rn.Yb(E,te,ne,ae,.05,a,y))return NaN;var fe=(a-x)*(te-ae);if(fe===0)return 0;var Pe=((a*b-y*x)*(E-ne)-(a-x)*(E*ae-te*ne))/fe;if(y=(a*b-y*x)*(te-ae)/fe,Pe>=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(Pe<E||Pe>ne)return 0}else if(Pe<ne||Pe>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}st.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Tt),this.type===Qn.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],Pe=fe.length;for(a=0;a<Pe;a++){var Me=fe[a];if(ne+Me>=te)return b=te-ne,b=Me===0?0:b/Me,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+=Me}}return y},st.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Qn.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 Pe=ae[a];if(te+Pe>=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+=Pe}}return NaN},st.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Qn.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],Pe=fe.length;for(a=0;a<Pe;a++){var Me=fe[a];if(ne+Me>=te)return b=te-ne,b=Me===0?0:b/Me,Me=x[ae],x=Me[2*a],ae=Me[2*a+1],E=Me[2*a+2],a=Me[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+=Me}}return y},st.xx=function(a){if(this.type===Qn.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=Tt.alloc();return rn.qh(y,x,b,E,te,a,ae),a=ae.x,te=ae.y,Tt.free(ae),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Qn.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 Pe=Math.min(ne,fe,ae,E);if(Pe===ae)return b/te;if(Pe===fe)return(y+a)/te;if(Pe===E)return(2*y+x-b)/te;if(Pe===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=Tt.alloc(),E=1/0,ae=ne=0,fe=y.length;for(var Me=Pe=0,Fe=0;Fe<fe;Fe++)for(var Ye=y[Fe],nt=x[Fe],ot=Ye.length,ft=0;ft<ot;ft+=2){var Ot=Ye[ft],Mt=Ye[ft+1];if(ft!==0){rn.qh(Pe,Me,Ot,Mt,a.x,a.y,b);var Ht=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Ht<E&&(E=Ht,ne=ae,ne+=Math.sqrt((b.x-Pe)*(b.x-Pe)+(b.y-Me)*(b.y-Me))),ae+=nt[(ft-2)/2]}Pe=Ot,Me=Mt}return Tt.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===Qn.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===Qn.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===Qn.F){var te=new Zs;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Wr(ss);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=Na(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];rn.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 Pe=E.segments.s,Me=Pe.length,Fe=0;Fe<Me;Fe++){var Ye=Pe[Fe];switch(Ye.type){case Ps:4<=b.length&&(y.push(b),x.push(Cc(b))),b=[],b.push(Ye.endX),b.push(Ye.endY),ne=Ye.endX,te=Ye.endY,ae=ne,fe=te;break;case wo:b.push(Ye.endX),b.push(Ye.endY),ne=Ye.endX,te=Ye.endY;break;case fa:rn.Qe(ne,te,Ye.point1X,Ye.point1Y,Ye.point2X,Ye.point2Y,Ye.endX,Ye.endY,.5,b),ne=Ye.endX,te=Ye.endY;break;case fl:rn.ep(ne,te,Ye.point1X,Ye.point1Y,Ye.endX,Ye.endY,.5,b),ne=Ye.endX,te=Ye.endY;break;case ss:var nt=Na(Ye,E),ot=nt.length;if(ot===0){b.push(Ye.centerX),b.push(Ye.centerY),ne=Ye.centerX,te=Ye.centerY;break}for(var ft=0;ft<ot;ft++){var Ot=nt[ft];rn.Qe(ne,te,Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7],.5,b),ne=Ot[6],te=Ot[7]}break;case Cl:if(nt=Ks(Ye,E,ne,te),ot=nt.length,ft=Ye.endX,Ot=Ye.endY,ot===0){b.push(ft),b.push(Ot),ne=ft,te=Ot;break}for(ft=0;ft<ot;ft++)Ot=nt[ft],rn.Qe(ne,te,Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7],.5,b),ne=Ot[6],te=Ot[7];break;default:Ft("Segment not of valid type: "+Ye.type)}Ye.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(Gi(x,b,ne,ae))),x=ne,b=ae}return y}st.add=function(a){return this.ee.add(a),this},st.pm=function(a,y,x,b,E,te,ne,ae){return this._isFrozen&&$t(this),this.fg=new yi(a,y,E,te).freeze(),this.gg=new yi(x,b,ne,ae).freeze(),this},et.Object.defineProperties(Qn.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===Qn.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===Qn.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&&$t(this,a),this.na=a,a===Qn.o?this.ee=new On:(Qn.V===null&&(Qn.V=new On().freeze()),this.ee=Qn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&$t(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&$t(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&$t(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&$t(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&$t(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&$t(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&$t(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&$t(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Qn.prototype.setSpots=Qn.prototype.pm,Qn.prototype.add=Qn.prototype.add,Qn.prototype.getFractionForPoint=Qn.prototype.xx,Qn.prototype.getPointAndAngleAlongPath=Qn.prototype.Qu,Qn.prototype.getAngleAlongPath=Qn.prototype.wx,Qn.prototype.getPointAlongPath=Qn.prototype.Pu,Qn.prototype.containsPoint=Qn.prototype.ca,Qn.prototype.transform=Qn.prototype.transform,Qn.prototype.rotate=Qn.prototype.rotate,Qn.prototype.scale=Qn.prototype.scale,Qn.prototype.offset=Qn.prototype.offset,Qn.prototype.normalize=Qn.prototype.normalize,Qn.prototype.computeBoundsWithoutOrigin=Qn.prototype.ix,Qn.prototype.equalsApprox=Qn.prototype.Xa,Qn.className="Geometry",Qn.j=new an(Qn,"Line",0),Qn.u=new an(Qn,"Rectangle",1),Qn.F=new an(Qn,"Ellipse",2),Qn.o=new an(Qn,"Path",3),Qn.V=null,Qn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Qn.className="Geometry",Qn.stringify=Qn.ia,Qn.fillPath=Qn.nb,Qn.parse=Qn.parse,Qn.Line=Qn.j,Qn.Rectangle=Qn.u,Qn.Ellipse=Qn.F,Qn.Path=Qn.o;function Zs(a,y,x,b,E){Sr(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 On,this.sr=this.pl.Ja,this.fw=null}Zs.prototype.copy=function(){var a=new Zs;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},st=Zs.prototype,st.Xa=function(a){if(!(a instanceof Zs&&rn.B(this.startX,a.startX)&&rn.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},st.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},st.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},st.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},st.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},st.add=function(a){return this.pl.add(a),this},st.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,ae=this.segments.s,fe=ae.length,Pe=0;Pe<fe;Pe++){var Me=ae[Pe];switch(Me.type){case Ps:te=Me.endX,ne=Me.endY,b=Me.endX,E=Me.endY;break;case wo:if(rn.Yb(b,E,Me.endX,Me.endY,x,a,y))return!0;b=Me.endX,E=Me.endY;break;case fa:if(rn.cs(b,E,Me.point1X,Me.point1Y,Me.point2X,Me.point2Y,Me.endX,Me.endY,.5,a,y,x))return!0;b=Me.endX,E=Me.endY;break;case fl:if(rn.jv(b,E,Me.point1X,Me.point1Y,Me.endX,Me.endY,.5,a,y,x))return!0;b=Me.endX,E=Me.endY;break;case ss:case Cl:var Fe=Me.type===ss?Na(Me,this):Ks(Me,this,b,E),Ye=Fe.length,nt=Me.type===ss?Me.centerX:Me.endX,ot=Me.type===ss?Me.centerY:Me.endY;if(Ye===0){if(rn.Yb(b,E,nt,ot,x,a,y))return!0;b=nt,E=ot;break}for(nt=null,ot=0;ot<Ye;ot++)if(nt=Fe[ot],ot===0&&rn.Yb(b,E,nt[0],nt[1],x,a,y)||rn.cs(nt[0],nt[1],nt[2],nt[3],nt[4],nt[5],nt[6],nt[7],.5,a,y,x))return!0;nt!==null&&(b=nt[6],E=nt[7]);break;default:Ft("Unknown Segment type: "+Me.type)}if(Me.isClosed&&(b!==te||E!==ne)&&rn.Yb(b,E,te,ne,x,a,y))return!0}return!1},et.Object.defineProperties(Zs.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&&$t(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&$t(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&$t(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&$t(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&$t(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&$t(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Zs.prototype.add=Zs.prototype.add,Zs.prototype.equalsApprox=Zs.prototype.Xa,Zs.className="PathFigure";function Wr(a,y,x,b,E,te,ne,ae){Sr(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===ss&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===ss&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Wr.prototype.copy=function(){var a=new Wr;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},st=Wr.prototype,st.Xa=function(a){if(!(a instanceof Wr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ps:case wo:return rn.B(this.endX,a.endX)&&rn.B(this.endY,a.endY);case fa:return rn.B(this.endX,a.endX)&&rn.B(this.endY,a.endY)&&rn.B(this.point1X,a.point1X)&&rn.B(this.point1Y,a.point1Y)&&rn.B(this.point2X,a.point2X)&&rn.B(this.point2Y,a.point2Y);case fl:return rn.B(this.endX,a.endX)&&rn.B(this.endY,a.endY)&&rn.B(this.point1X,a.point1X)&&rn.B(this.point1Y,a.point1Y);case ss:return rn.B(this.startAngle,a.startAngle)&&rn.B(this.sweepAngle,a.sweepAngle)&&rn.B(this.centerX,a.centerX)&&rn.B(this.centerY,a.centerY)&&rn.B(this.radiusX,a.radiusX)&&rn.B(this.radiusY,a.radiusY);case Cl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&rn.B(this.xAxisRotation,a.xAxisRotation)&&rn.B(this.endX,a.endX)&&rn.B(this.endY,a.endY)&&rn.B(this.radiusX,a.radiusX)&&rn.B(this.radiusY,a.radiusY);default:return!1}},st.qb=function(a){a.classType===Wr&&(this.type=a)},st.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ps: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 fa: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 fl: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 ss: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":"")},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return this._isFrozen=!1,this},st.close=function(){return this.isClosed=!0,this};function Na(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=rn.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=gr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Qn.Ha(te,ne),gr.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 Ks(a,y,x,b){function E(ft,Ot,Mt,Ht){return(ft*Ht<Ot*Mt?-1:1)*Math.acos((ft*Mt+Ot*Ht)/(Math.sqrt(ft*ft+Ot*Ot)*Math.sqrt(Mt*Mt+Ht*Ht)))}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,Pe=a.Dc,Me=a.Ec,Fe=Math.cos(ne),Ye=Math.sin(ne),nt=Fe*(x-Pe)/2+Ye*(b-Me)/2;ne=-Ye*(x-Pe)/2+Fe*(b-Me)/2;var ot=nt*nt/(y*y)+ne*ne/(te*te);return 1<ot&&(y*=Math.sqrt(ot),te*=Math.sqrt(ot)),ot=(ae===fe?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*nt*nt)/(y*y*ne*ne+te*te*nt*nt)),isNaN(ot)&&(ot=0),ae=ot*y*ne/te,ot=ot*-te*nt/y,isNaN(ae)&&(ae=0),isNaN(ot)&&(ot=0),x=(x+Pe)/2+Fe*ae-Ye*ot,b=(b+Me)/2+Ye*ae+Fe*ot,Me=E(1,0,(nt-ae)/y,(ne-ot)/te),Fe=(nt-ae)/y,Pe=(ne-ot)/te,nt=(-nt-ae)/y,ae=(-ne-ot)/te,ne=E(Fe,Pe,nt,ae),nt=(Fe*nt+Pe*ae)/(Math.sqrt(Fe*Fe+Pe*Pe)*Math.sqrt(nt*nt+ae*ae)),-1>=nt?ne=Math.PI:1<=nt&&(ne=0),!fe&&0<ne&&(ne-=2*Math.PI),fe&&0>ne&&(ne+=2*Math.PI),fe=y>te?1:y/te,nt=y>te?te/y:1,y=rn.jx(0,0,y>te?y:te,Me,Me+ne,!0),te=gr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(fe,nt),Qn.Ha(y,te),gr.free(te),a.ae=y,a.ae}et.Object.defineProperties(Wr.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&&$t(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&$t(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&$t(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&$t(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&$t(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&$t(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&$t(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&$t(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&$t(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&bn(a,">= zero",Wr,"radiusX"),this._isFrozen&&$t(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&bn(a,">= zero",Wr,"radiusY"),this._isFrozen&&$t(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&$t(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&&$t(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&&$t(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&&$t(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&&$t(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Wr.prototype.equalsApprox=Wr.prototype.Xa;var Ps=new an(Wr,"Move",0),wo=new an(Wr,"Line",1),fa=new an(Wr,"Bezier",2),fl=new an(Wr,"QuadraticBezier",3),ss=new an(Wr,"Arc",4),Cl=new an(Wr,"SvgArc",4);Wr.className="PathSegment",Wr.Move=Ps,Wr.Line=wo,Wr.Bezier=fa,Wr.QuadraticBezier=fl,Wr.Arc=ss,Wr.SvgArc=Cl;function Ca(){this.H=null,this.xu=new Tt(0,0).freeze(),this.mt=new Tt(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}Ca.prototype.copy=function(){var a=new Ca;return this.clone(a)},Ca.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},Ca.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},Ca.prototype.So=function(a,y){var x=this.diagram;return x===null||Hd(x,a,y),y},Ca.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Hd(x,a,y),y.assign(x.Ps(y))),y},et.Object.defineProperties(Ca.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}}}),Ca.prototype.getMultiTouchDocumentPoint=Ca.prototype.Bz,Ca.prototype.getMultiTouchViewPoint=Ca.prototype.So,Ca.className="InputEvent";function _c(){this.H=null,this.xa="",this.ar=this.Lr=null}_c.prototype.copy=function(){var a=new _c;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},_c.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},et.Object.defineProperties(_c.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}}}),_c.className="DiagramEvent";function zo(){this.Fm=Vo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}zo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},zo.prototype.copy=function(){var a=new zo;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=Gt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Gt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Gt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Gt(y)&&typeof y.J=="function"?y.J():y,a},zo.prototype.qb=function(a){a.classType===zo&&(this.change=a)},zo.prototype.toString=function(){var a="";return a=this.change===Wa?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===Wa?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=ri(this.object)),this.oldValue!==null&&(a+=" old: "+ri(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+ri(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},zo.prototype.I=function(a){return a?this.oldValue:this.newValue},zo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},zo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},zo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},zo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},zo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},et.Object.defineProperties(zo.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===Wa&&(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}}}),zo.prototype.redo=zo.prototype.redo,zo.prototype.canRedo=zo.prototype.canRedo,zo.prototype.undo=zo.prototype.undo,zo.prototype.canUndo=zo.prototype.canUndo,zo.prototype.getParam=zo.prototype.Dz,zo.prototype.getValue=zo.prototype.I,zo.prototype.clear=zo.prototype.clear;var Wa=new an(zo,"Transaction",-1),Vo=new an(zo,"Property",0),ps=new an(zo,"Insert",1),us=new an(zo,"Remove",2);zo.className="ChangedEvent",zo.Transaction=Wa,zo.Property=Vo,zo.Insert=ps,zo.Remove=us;function Rs(){this.o=new On().freeze(),this.xa="",this.j=!1}Rs.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},Rs.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()},Rs.prototype.canUndo=function(){return this.isComplete},Rs.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()}},Rs.prototype.canRedo=function(){return this.isComplete},Rs.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()}},Rs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new hi,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 hi,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()}},et.Object.defineProperties(Rs.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}}}),Rs.prototype.optimize=Rs.prototype.ak,Rs.prototype.redo=Rs.prototype.redo,Rs.prototype.canRedo=Rs.prototype.canRedo,Rs.prototype.undo=Rs.prototype.undo,Rs.prototype.canUndo=Rs.prototype.canUndo,Rs.prototype.clear=Rs.prototype.clear,Rs.className="Transaction";function Ro(){this.Pt=new In,this.Jd=!1,this.u=new On().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new On().freeze(),this.hl=new On,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Ro.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},Ro.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},Ro.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},st=Ro.prototype,st.Xw=function(a){this.Pt.add(a)},st.Rx=function(a){this.Pt.remove(a)},st.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},st.eb=function(a){return a===void 0&&(a=""),Rc(this,!0,a)},st.Kf=function(){return Rc(this,!1,"")};function Rc(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&An("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}st.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()}},Ro.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Ro.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){An("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Ro.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Ro.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){An("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Ro.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new zo;for(b.change=Wa,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Ro.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Rs);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||An("Change not within a transaction: "+x.toString()))}},Ro.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},et.Object.defineProperties(Ro.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}}}),Ro.prototype.handleChanged=Ro.prototype.Tu,Ro.prototype.redo=Ro.prototype.redo,Ro.prototype.undo=Ro.prototype.undo,Ro.prototype.canUndo=Ro.prototype.canUndo,Ro.prototype.discardHistoryAfterIndex=Ro.prototype.lx,Ro.prototype.rollbackTransaction=Ro.prototype.Kf,Ro.prototype.commitTransaction=Ro.prototype.eb,Ro.prototype.startTransaction=Ro.prototype.Ea,Ro.prototype.removeModel=Ro.prototype.Rx,Ro.prototype.addModel=Ro.prototype.Xw,Ro.prototype.clear=Ro.prototype.clear,Ro.className="UndoManager";function zr(){Sr(this),this.H=ac,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ca,this.Zr=-1}zr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Dn(this.constructor)},zr.prototype.updateAdornments=function(){},zr.prototype.canStart=function(){return this.isEnabled},zr.prototype.doStart=function(){},zr.prototype.doActivate=function(){this.isActive=!0},zr.prototype.doDeactivate=function(){this.isActive=!1},zr.prototype.doStop=function(){},zr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},zr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},zr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},zr.prototype.doMouseMove=function(){},zr.prototype.doMouseUp=function(){this.stopTool()},zr.prototype.doMouseWheel=function(){},zr.prototype.canStartMultiTouch=function(){return!0},zr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Tt.allocAt(NaN,NaN)),b=y.So(1,Tt.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}Tt.free(x),Tt.free(b)},zr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Tt.allocAt(NaN,NaN)),b=y.So(1,Tt.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 Tt((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}Tt.free(x),Tt.free(b)},zr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},zr.prototype.doKeyUp=function(){},zr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},zr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},zr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(lr?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||(lr?y.meta:y.control)||y.shift||a.clearSelection()}},zr.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)}}}zr.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}},zr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},zr.prototype.doCurrentObjectChanged=function(){},zr.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)}}},zr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},zr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=zn(function(){x.doWaitAfter(b)},a)},zr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Ct.clearTimeout(this.Zr),this.Zr=-1},zr.prototype.doWaitAfter=function(){},zr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Xr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},zr.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},et.Object.defineProperties(zr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof pn&&(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}}}),zr.prototype.startTransaction=zr.prototype.Ea,zr.className="Tool";function Ho(){zr.call(this),this.name="ToolManager",this.hb=new On,this.ob=new On,this.Hb=new On,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}tt(Ho,zr),Ho.prototype.initializeStandardTools=function(){},Ho.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Xr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Ho.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===oo){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)},Ho.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===oo){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)}Ho.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Xr&&(y===a||y.rg(a))||this.hideToolTip()},Ho.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()))},Ho.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)},Ho.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 Xr)||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()},Ho.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Xr){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 Xi&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Ct.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=zn(function(){E.hideToolTip()},a)}},Ho.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}},Ho.prototype.hideToolTip=function(){this.zj!==-1&&(Ct.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Xr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Xi&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Ho.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()},Ho.prototype.doMouseWheel=function(){this.standardMouseWheel()},Ho.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Ho.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Ho.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},Ho.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},Ho.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)},et.Object.defineProperties(Ho.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 Xr?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}}}),Ho.prototype.replaceStandardTool=Ho.prototype.gb;var ih=new an(Ho,"WheelScroll",0),rh=new an(Ho,"WheelZoom",1),Od=new an(Ho,"WheelNone",2),Ch=new an(Ho,"GestureZoom",3),ic=new an(Ho,"GestureCancel",4),oo=new an(Ho,"GestureNone",5);Ho.className="ToolManager",Ho.WheelScroll=ih,Ho.WheelZoom=rh,Ho.WheelNone=Od,Ho.GestureZoom=Ch,Ho.GestureCancel=ic,Ho.GestureNone=oo;function es(){zr.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 Tt(NaN,NaN),this.Fr=new Tt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new In().freeze(),this.ia=new pe,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var ku;tt(es,zr),es.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},es.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},es.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,(lr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},es.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),pt=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&&Ia(a),Qf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,pt=this,_t=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 Yn?(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 Kn,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}es.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},es.prototype.Pd=function(a){return a===void 0?new ah(xr):this.isGridSnapEnabled?new ah(new Tt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new ah(a.copy())},es.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);hs(E),Bl(E),Au(E),E.diagram.ug()}y.clear()}hs(this),this.tl.h(NaN,NaN),_t!==null&&(_t.currentCursor=""),pt=_t=null,Bl(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),nd(a,!0)},es.prototype.stopTransaction=function(){var a=this.diagram,y=zr.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=pt;Bl(a),rc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}es.prototype.doCancel=function(){Bl(this),rc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},es.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},es.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function cu(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 hi,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 Yn&&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 Bl(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 Yn&&(x.value.point=new Tt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function hs(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 Bs(a,y,x){var b=a.diagram,E=a.startPoint,te=Tt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),Tt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Ia(b),b.hk())}es.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 Yn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Bh(b,-E.x,-E.y)}y.bd()}}function qa(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),ka(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&&pt===null)return;var ae=b!==null?b.part:null;if(ae===null||x.handlesDragDropForTopLevelParts&&ae.isTopLevel&&!(ae instanceof rr)){var fe=x.mouseDragOver;fe!==null&&(fe(E),ne=!0)}if(!a.isActive&&pt===null||(a.doDragOver(y,b),!a.isActive&&pt===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)}es.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 Xr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},es.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&&pt===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 Ti&&!(a instanceof rr)&&(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(Pe){return b.findValidLinkablePort(Pe,x)});a=Tt.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(Fr,a);fe=y.Bf(fe),fe<te&&(ne=ae,te=fe)}}return Tt.free(a),ne}function ka(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)):xi(E,ne,te,fe,ae):xi(E,null,null,null,null)}}}}es.prototype.doDragOver=function(){};function oc(a,y){var x=a.diagram;a.dragsLink&&ka(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||pt!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof ii&&te.linksConnected.each(function(ae){ae.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||pt!==null){for(a=Ln.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof ii&&Dt(x,b,a);Ln.free(a)}}}function gf(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof rr||(x=a.mouseDrop,x!==null&&x(y))}function Dt(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 Yn},!0,function(E){return E instanceof Yn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}es.prototype.doDropOnto=function(){},es.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()?(cu(this,!1),Qf(a,this.copiedParts),Bs(this,this.copiedParts,!1),od(a,this.copiedParts)):this.mayMove()?(Bl(this),Bs(this,this.draggedParts,!0)):this.mayDragOut()?(cu(this,!1),Bs(this,this.copiedParts,!1)):Bl(this),qa(this,a.lastInput.documentPoint))}},es.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?(Bl(this),cu(this,!0),Qf(a,this.copiedParts),Bs(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,Bl(this),this.mayMove()&&(Bs(this,this.draggedParts,!0),qa(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&&zt(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)}}},es.prototype.simulatedMouseMove=function(a,y,x){if(pt===null)return!1;var b=pt.diagram;x instanceof pn||(x=null);var E=_t;return x!==E&&(E!==null&&E!==b&&(E.ug(),pt.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),_t=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)},es.prototype.simulatedMouseUp=function(a,y,x){if(pt===null)return!1;var b=_t,E=pt.diagram;if(x===null)return pt.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),pt.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;_t=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 Tt),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=pt,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function zt(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof ii&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}es.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(lr?!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())},es.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())},es.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())},es.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},es.prototype.Az=function(){return pt},es.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=pt;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},es.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),pl(a),a.animationManager.Cc(),a=pt,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},es.prototype.doSimulatedDragLeave=function(){var a=pt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},es.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=pt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;ln(this,y.draggedParts.Lf(),!1,a.firstInput),Bs(this,this.copiedParts,!1),qa(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},es.prototype.doSimulatedDrop=function(){var a=this.diagram,y=pt;if(y!==null){var x=y.diagram;if(y.Ym=!0,Bl(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),ln(this,y.draggedParts.Lf(),!0,a.lastInput),Bs(this,this.copiedParts,!1);var b=new In;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 ln(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=Ln.alloc();E=b=1/0;for(var ne=-1/0,ae=-1/0,fe=y.iterator;fe.next();){var Pe=fe.value;if(Pe.isVisible()){var Me=Pe.location;Pe=Me.x,Me=Me.y,isNaN(Pe)||isNaN(Me)||(Pe<b&&(b=Pe),Me<E&&(E=Me),Pe>ne&&(ne=Pe),Me>ae&&(ae=Me))}}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,Ln.free(te),te=a.Fr,ne=new hi,ae=Tt.alloc(),fe=y.iterator;fe.next();)Pe=fe.value,Pe instanceof Yn&&Pe.canCopy()&&(Me=x.I(Pe),Me!==null&&(Me.points=Pe.points,Bh(Me,te.x-b,te.y-E),Me.suspendsRouting=!0,ne.add(Me,a.Pd())));for(y=y.iterator;y.next();)Pe=y.value,Pe.Zc()&&Pe.canCopy()&&(fe=x.I(Pe),fe!==null&&(Pe=Pe.location,ae.h(te.x-(b-Pe.x),te.y-(E-Pe.y)),fe.location=ae,fe.Va(),ne.add(fe,a.Pd(ae))));Tt.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)}}}es.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},es.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Tt},et.Object.defineProperties(es.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}}}),es.prototype.getDraggingSource=es.prototype.Az;var pt=null,_t=null;es.className="DraggingTool",ku=new On,Hn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Ho.prototype.doCancel=function(){pt!==null&&pt.doCancel(),zr.prototype.doCancel.call(this)};function Lt(){zr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Yn,y=new fr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new fr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new ii,y=new fr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=_o,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new ii,y=new fr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=_o,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 hi,this.Of=this.gj=this.Pf=null}tt(Lt,zr),Lt.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Lt.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=Fr,te=Tt.alloc(),x.location=y.ga(Fr,te),Tt.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Lt.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=_o,y.fromSpot=fs,y.toSpot=fs),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Lt.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Lt.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof ii){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)}},Lt.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof ii))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof ii)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Lt.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(Fe){return E.findValidLinkablePort(Fe,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,ae=ne.part;if(ae instanceof ii){var fe=ne.ga(Fr,Tt.alloc()),Pe=x.x-fe.x,Me=x.y-fe.y;Tt.free(fe),fe=Pe*Pe+Me*Me,fe<b&&(Pe=this.validPortsCache.I(ne),Pe!==null?Pe&&(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 ii&&(x.layer===null||x.layer.allowLink))?y:null},Lt.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},Lt.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},Lt.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Lt.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof ii))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof ii))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},Lt.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)},Lt.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 In;return b.add(a),Sn(this,x,y,b)};function Sn(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Sn(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Sn(a,y.labeledLink,x,b))))}Lt.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!hn(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!hn(this,a,y,x,!0)}if(b===ng)return a===y?a=!0:(b=new In,b.add(y),a=on(this,b,a,y,x)),!a;if(b===ig)return!hn(this,a,y,x,!1);if(b===rg)return a===y?a=!0:(b=new In,b.add(y),a=vn(this,b,a,y,x)),!a}return!0};function hn(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&&hn(a,ne,x,b,E)))return!0}return!1}function on(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&&on(a,y,ne,b,E)))return!0}return!1}function vn(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&&vn(a,y,ae,b,E))return!0}}return!1}et.Object.defineProperties(Lt.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}}}),Lt.className="LinkingBaseTool";function yn(){Lt.call(this),this.name="Linking",this.V={},this.F=null,this.K=Cn,this.Xd=null}tt(yn,Lt),yn.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},yn.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 ii)))return null;var x=this.direction;if(x===Cn||x===jn){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===ti)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},yn.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 ii&&(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 ii&&(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)},yn.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()},yn.prototype.doStop=function(){Lt.prototype.doStop.call(this),this.startObject=null},yn.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 ii&&(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)}}},yn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Yn)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)},yn.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},yn.prototype.doNoLink=function(){},et.Object.defineProperties(yn.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 an(yn,"Either",0),jn=new an(yn,"ForwardsOnly",0),ti=new an(yn,"BackwardsOnly",0);yn.className="LinkingTool",yn.Either=Cn,yn.ForwardsOnly=jn,yn.BackwardsOnly=ti;function Kn(){Lt.call(this),this.name="Relinking";var a=new fr;a.figure="Diamond",a.desiredSize=Eo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new fr,a.figure="Diamond",a.desiredSize=Eo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Ln}tt(Kn,Lt),Kn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Yn){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)}},Kn.prototype.makeAdornment=function(a,y){var x=new Xr;return x.type=Wn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Kn.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},Kn.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 Xr&&x.adornedPart instanceof Yn))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=qr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=qr),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},Kn.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=rl),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}},Kn.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()},Kn.prototype.doStop=function(){Lt.prototype.doStop.call(this),this.handle=null},Kn.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 ii&&(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()}}},Kn.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},Kn.prototype.doNoRelink=function(){};function xi(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)}et.Object.defineProperties(Kn.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 Xr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Kn.className="RelinkingTool",Hn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Hn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Vn(){zr.call(this),this.name="LinkReshaping";var a=new fr;a.figure="Rectangle",a.desiredSize=Ko,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new fr,a.figure="Diamond",a.desiredSize=Eo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Tt,this.Yq=new On}tt(Vn,zr),Vn.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:li},Vn.prototype.om=function(a,y){a.reshapingBehavior=y},Vn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Yn){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)}},Vn.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new Xr,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 Pe=y.i(x+1);rn.B(fe.x,Pe.x)&&rn.B(fe.y,Pe.y)&&(Pe=y.i(x-1)),rn.B(fe.x,Pe.x)?(this.om(ae,Di),ae.cursor="n-resize"):rn.B(fe.y,Pe.y)&&(this.om(ae,Ri),ae.cursor="w-resize")}else ne===te-1&&b?(fe=y.i(te-1),Pe=y.i(te),rn.B(fe.x,Pe.x)&&rn.B(fe.y,Pe.y)&&(fe=y.i(te+1)),rn.B(fe.x,Pe.x)?(this.om(ae,Di),ae.cursor="n-resize"):rn.B(fe.y,Pe.y)&&(this.om(ae,Ri),ae.cursor="w-resize")):ne!==te&&(this.om(ae,Zi),ae.cursor="move");E.add(ae)}E.adornedObject=a}return E},Vn.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Vn.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Vn.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},Vn.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 Yn){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}}},Vn.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Vn.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Vn.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Vn.prototype.getResegmentingPoint=function(){return this.handle.ga(Fr)},Vn.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Vn.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&&(mi(this,ne,b,E,te,!0)||mi(this,ne,b,E,te,!1))){var ae=y.points.copy();mi(this,ne,b,E,te,!0)?(ae.cd(x-2,new Tt(ne.x,(te.y+ne.y)/2)),ae.cd(x+1,new Tt(te.x,(te.y+ne.y)/2))):(ae.cd(x-2,new Tt((te.x+ne.x)/2,ne.y)),ae.cd(x+1,new Tt((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&&(mi(this,b,E,te,ne,!0)||mi(this,b,E,te,ne,!1))&&(ae=y.points.copy(),mi(this,b,E,te,ne,!0)?(ae.cd(x-1,new Tt(b.x,(b.y+ne.y)/2)),ae.cd(x+2,new Tt(ne.x,(b.y+ne.y)/2))):(ae.cd(x-1,new Tt((b.x+ne.x)/2,b.y)),ae.cd(x+2,new Tt((b.x+ne.x)/2,ne.y))),ae.mb(x+1),ae.mb(x),y.points=ae,y.Wb())}}else ne=Tt.alloc(),rn.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()),Tt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function mi(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}Vn.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===Di?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Ri&&(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===Di?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Ri&&(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);rn.B(te.x,E.x)&&rn.B(E.y,ne.y)?(rn.B(te.x,y.i(b-2).x)&&!rn.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),rn.B(ne.y,y.i(b+2).y)&&!rn.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):rn.B(te.y,E.y)&&rn.B(E.x,ne.x)?(rn.B(te.y,y.i(b-2).y)&&!rn.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),rn.B(ne.x,y.i(b+2).x)&&!rn.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):rn.B(te.x,E.x)&&rn.B(E.x,ne.x)?(rn.B(te.x,y.i(b-2).x)&&!rn.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),rn.B(ne.x,y.i(b+2).x)&&!rn.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):rn.B(te.y,E.y)&&rn.B(E.y,ne.y)&&(rn.B(te.y,y.i(b-2).y)&&!rn.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),rn.B(ne.y,y.i(b+2).y)&&!rn.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(Fr,Tt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,Tt.alloc()),y.L(0,b.x,b.y),Tt.free(te),Tt.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(Fr,Tt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Tt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Tt.free(x),Tt.free(a));y.zf()},Vn.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Zi:return a;case Di:return new Tt(y.i(x).x,a.y);case Ri:return new Tt(a.x,y.i(x).y);default:case li:return y.i(x)}},et.Object.defineProperties(Vn.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 Xr))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}}}),Vn.prototype.setReshapingBehavior=Vn.prototype.om,Vn.prototype.getReshapingBehavior=Vn.prototype.Ru;var li=new an(Vn,"None",0),Ri=new an(Vn,"Horizontal",1),Di=new an(Vn,"Vertical",2),Zi=new an(Vn,"All",3);Vn.className="LinkReshapingTool",Vn.None=li,Vn.Horizontal=Ri,Vn.Vertical=Di,Vn.All=Zi,Hn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Oi(){zr.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 fr;a.alignmentFocus=Fr,a.figure="Rectangle",a.desiredSize=Ko,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Tt,this.Dw=new Xn,this.Tn=new Tt,this.rt=new Xn(0,0),this.qt=new Xn(1/0,1/0),this.pt=new Xn(1,1)}tt(Oi,zr),Oi.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Yn)){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)}},Oi.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Xr,y.type=Wn.Spot,y.locationSpot=Fr;var x=new il;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,$s)),y.add(this.makeHandle(a,wl)),y.add(this.makeHandle(a,Ta)),y.add(this.makeHandle(a,Aa)),y.add(this.makeHandle(a,bs)),y.add(this.makeHandle(a,Gs)),y.add(this.makeHandle(a,Ws)),y.add(this.makeHandle(a,Ts))}else if(Ru(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Oi.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Oi.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=Fr),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)}},Oi.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},Oi.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))},Oi.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Oi.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Oi.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Oi.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,Tt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),Tt.free(E)}},Oi.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,Tt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),Tt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Oi.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 rr){var b=new On;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()}},Oi.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=Fr);var ne=this.adornedObject.naturalBounds,ae=ne.x,fe=ne.y,Pe=ne.x+ne.width,Me=ne.y+ne.height,Fe=1;if(!te){Fe=ne.width;var Ye=ne.height;0>=Fe&&(Fe=1),0>=Ye&&(Ye=1),Fe=Ye/Fe}return Ye=Tt.alloc(),rn.No(a.x,a.y,ae,fe,E.width,E.height,Ye),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Ye.x,Pe-b.width),a.x=Math.min(a.x,Pe-x.width),a.width=Math.max(Pe-a.x,x.width),a.y=Math.max(Ye.y,Me-b.height),a.y=Math.min(a.y,Me-x.height),a.height=Math.max(Me-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe):(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width),a.x=Pe-a.width,a.y=Me-a.height)):1<=y.y?(a.x=Math.max(Ye.x,Pe-b.width),a.x=Math.min(a.x,Pe-x.width),a.width=Math.max(Pe-a.x,x.width),a.height=Math.max(Math.min(Ye.y-fe,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe):(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width),a.x=Pe-a.width)):(a.x=Math.max(Ye.x,Pe-b.width),a.x=Math.min(a.x,Pe-x.width),a.width=Pe-a.x,te||(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe,a.y=fe+.5*(Me-fe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Ye.x-ae,b.width),x.width),a.y=Math.max(Ye.y,Me-b.height),a.y=Math.min(a.y,Me-x.height),a.height=Math.max(Me-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe):(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width),a.y=Me-a.height)):1<=y.y?(a.width=Math.max(Math.min(Ye.x-ae,b.width),x.width),a.height=Math.max(Math.min(Ye.y-fe,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe):(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width))):(a.width=Math.max(Math.min(Ye.x-ae,b.width),x.width),te||(a.height=Math.max(Math.min(Fe*a.width,b.height),x.height),a.width=a.height/Fe,a.y=fe+.5*(Me-fe-a.height))):0>=y.y?(a.y=Math.max(Ye.y,Me-b.height),a.y=Math.min(a.y,Me-x.height),a.height=Me-a.y,te||(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width,a.x=ae+.5*(Pe-ae-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Ye.y-fe,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/Fe,b.width),x.width),a.height=Fe*a.width,a.x=ae+.5*(Pe-ae-a.width))),Tt.free(Ye),a},Oi.prototype.computeReshape=function(){var a=Fn;return this.adornedObject instanceof fr&&(a=Pv(this.adornedObject)),!(a===vi||this.diagram.lastInput.shift)},Oi.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},Oi.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},Oi.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},et.Object.defineProperties(Oi.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 Xr))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 Xr)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}}}),Oi.className="ResizingTool",Hn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ii(){zr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Tt,this.ue=null;var a=new fr;a.figure="Ellipse",a.desiredSize=Eo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Tt(NaN,NaN),this.u=0,this.F=50}tt(Ii,zr),Ii.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)}},Ii.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Xr,y.type=Wn.Position,y.locationSpot=Fr;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},Ii.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},Ii.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)},Ii.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(Fr)},Ii.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)},Ii.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Tt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ii.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ii.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ii.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ii.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()},Ii.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()}},Ii.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},et.Object.defineProperties(Ii.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 Xr))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 Xr)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}}}),Ii.className="RotatingTool",Hn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function ar(){zr.call(this),this.name="ClickSelecting"}tt(ar,zr),ar.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},ar.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},ar.className="ClickSelectingTool";function ei(){zr.call(this),this.name="Action",this.pk=null}tt(ei,zr),ei.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},ei.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()},ei.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))}},ei.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()},ei.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())},ei.prototype.doStop=function(){this.pk=null},ei.className="ActionTool";function Hi(){zr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Tt(0,0)}tt(Hi,zr),Hi.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)},Hi.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Hi.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 Ti)x.Zc()&&(Ru(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Gt(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=Tt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Jf(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Tt.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},et.Object.defineProperties(Hi.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}}}),Hi.className="ClickCreatingTool";function Li(){zr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ti;a.layerName="Tool",a.selectable=!1;var y=new fr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}tt(Li,zr),Li.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))},Li.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Li.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Li.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)}},Li.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()},Li.prototype.computeBoxBounds=function(){var a=this.diagram;return new Ln(a.firstInput.documentPoint,a.lastInput.documentPoint)},Li.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),lr?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 On,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)}},et.Object.defineProperties(Li.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}}}),Li.className="DragSelectingTool";function bi(){zr.call(this),this.name="Panning",this.Xt=new Tt,this.xy=new Tt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Ct.document,"scroll",a.Kw,!1),a.stopTool()}}tt(bi,zr),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(Ct.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)}},et.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",Hn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Hn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Hn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Hn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Hn("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Xi(){this.F=this.u=this.j=this.o=null}et.Object.defineProperties(Xi.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}}}),Xi.className="HTMLInfo";function gi(a,y,x){this.text=a,this.hx=y,this.visible=x}gi.className="ContextMenuButtonInfo";function ur(){zr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Tt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}tt(ur,zr);function Ji(a){var y=new Xi;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},So=y,a.tu=function(){a.stopTool()},y=wn("div");var x=wn("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=wn("style");Ct.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",_i,!1),b.addEventListener(y,"selectstart",_i,!1),b.addEventListener(x,"contextmenu",_i,!1)),y.className="goCXforeground",x.className="goCXbackground",Ct.document.body&&(Ct.document.body.appendChild(y),Ct.document.body.appendChild(x)),ao=y,ts=x,Lo=!0}function _i(a){return a.preventDefault(),!1}ur.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)},ur.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},ur.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},ur.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof pn||(a instanceof en?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},ur.prototype.doActivate=function(){},ur.prototype.doMouseDown=function(){if(zr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Xr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Vi(this)},ur.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Xr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Vi(this)};function Vi(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Xi||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(mr(a,!0),a.isActive||a.stopTool())}ur.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function mr(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=So,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof en?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Xr&&!a.currentContextMenu.visible&&a.stopTool()}}ur.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},ur.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Xr){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 Xi&&a.show(y,x,this);this.currentContextMenu=a},ur.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}},ur.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Xr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Xi&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function ir(a){var y=new On;return y.add(new gi("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new gi("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new gi("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new gi("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new gi("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new gi("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new gi("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new gi("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new gi("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new gi("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new gi("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new gi("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new gi("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}ur.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=ir(this)),ao.innerHTML="",ts.addEventListener("pointerdown",this.tu,!1);var y=this,x=wn("ul");x.className="goCXul",ao.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=wn("li"),te.className="goCXli";var ne=wn("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)}}ao.style.display="block",ts.style.display="block"},ur.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===So){ao.style.display="none",ts.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ts,"pointerdown",this.tu,!1),this.currentContextMenu=null}},et.Object.defineProperties(ur.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Xr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Lo===!1&&So===null&&gs&&Ji(this),So},set:function(a){a===null&&(Lo=!0),So=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var So=null,Lo=!1,ts=null,ao=null;ur.className="ContextMenuTool",Hn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Nr(){zr.call(this),this.name="TextEditing",this.Zh=new ko,this.ia=null,this.V=Lr,this.vj=null,this.qa=Ar,this.u=1,this.F=!0,this.o=null,this.j=new Xi,this.kt=null,No(this,this.j)}tt(Nr,zr);function No(a,y){if(gs){var x=wn("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(kr)):E==="Tab"?(a.acceptText(Hr),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Ar){var b=a.kt;a.qa===po&&(a.qa=Uo),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Ar){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 ko&&te instanceof Nr)if(te.state===Yr)x.style.border="3px solid red",x.focus();else{var ne=b.ga(Fr),ae=E.position,fe=E.scale,Pe=b.Df()*fe;Pe<te.minimumEditorScale&&(Pe=te.minimumEditorScale);var Me=b.naturalBounds.width*Pe+6,Fe=b.naturalBounds.height*Pe+2,Ye=(ne.x-ae.x)*fe;ne=(ne.y-ae.y)*fe,ae=b.verticalAlignment,fe=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*Pe,Fe=ae.y*Fe-ae.y*fe+ae.offsetY-(.5*Fe-.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*Pe+"%",x.style.lineHeight="normal",x.style.width=Me+"px",x.style.left=(Ye-Me/2|0)-1+"px",x.style.top=(ne+Fe|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=Pe,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)}}}Nr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Cs&&Cs!==this&&(Cs.acceptText(ns),Cs&&Cs!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof ko&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Lr&&!y.isSelected||this.starting===lo&&2>a.lastInput.clickCount)):!1},Nr.prototype.doStart=function(){Cs=this,this.textBlock!==null&&this.doActivate()},Nr.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 ko&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=po;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new Ln(this.textBlock.ga($s),this.textBlock.ga(Ta));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Nr.prototype.doCancel=function(){this.stopTool()},Nr.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Nr.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ns)},Nr.prototype.acceptText=function(a){switch(a){case ns:this.qa===Io?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===po||this.qa===Yr||this.qa===Uo)&&(this.qa=Go,Ir(this));break;case Vr:case kr:case Hr:(kr!==a||this.textBlock.isMultiline!==!0)&&(this.qa===po||this.qa===Yr||this.qa===Uo)&&(this.qa=Go,Ir(this))}};function Ir(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=Io,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=Yr,a.doError(E,te))}}Nr.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)},Nr.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Nr.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Ar,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Nr.prototype.doStop=function(){Cs=null},Nr.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)))},Nr.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},et.Object.defineProperties(Nr.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)}}}),Nr.prototype.measureTemporaryTextBlock=Nr.prototype.Lx;var Vr=new an(Nr,"LostFocus",0),ns=new an(Nr,"MouseDown",1),Hr=new an(Nr,"Tab",2),kr=new an(Nr,"Enter",3),$r=new an(Nr,"SingleClick",0),Lr=new an(Nr,"SingleClickSelected",1),lo=new an(Nr,"DoubleClick",2),Ar=new an(Nr,"StateNone",0),po=new an(Nr,"StateActive",1),Uo=new an(Nr,"StateEditing",2),Go=new an(Nr,"StateValidating",3),Yr=new an(Nr,"StateInvalid",4),Io=new an(Nr,"StateValidated",5),Cs=null;Nr.className="TextEditingTool",Nr.LostFocus=Vr,Nr.MouseDown=ns,Nr.Tab=Hr,Nr.Enter=kr,Nr.SingleClick=$r,Nr.SingleClickSelected=Lr,Nr.DoubleClick=lo,Nr.StateNone=Ar,Nr.StateActive=po,Nr.StateEditing=Uo,Nr.StateValidating=Go,Nr.StateInvalid=Yr,Nr.StateValidated=Io,Hn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function To(a){Fl||(Pl(),Fl=!0),this.H=ac,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=hu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new In,this.ce=new ds,this.ce.Yd=this,this.Ei=new In,this.pu=new In,this.Sr=new In,this.pr=new In,a&&Object.assign(this,a)}To.prototype.Xe=function(a){this.H=a},To.prototype.canStart=function(){return!0};function Yo(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ya(a.H),a.zb=!0)}function ys(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===hu?(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===du&&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(),Oa(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Ka&&b!==null&&(delete b.start.scale,delete b.end.scale),Ct.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ia(x),Bd(x),a.zb=!1,y.start(),y.bc&&(Ss(a),x.Ya(),Pc(y,0),pl(x,!0),Es(a),x.R("AnimationStarting",a)))}))}}function Ys(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function _l(a,y,x,b){a.isTicking||Ys(a)||y instanceof Yn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}st=To.prototype,st.fv=function(a){return this.ce.fv(a)},st.Xu=function(a){return this.ce.Xu(a)};function Xo(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 en&&fe.diagram!==null||fe instanceof pn){ae=!0;break e}}ae=!1}ae?Ql(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(Ss(E),pl(E.H),Es(E)),Ct.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Ct.requestAnimationFrame(function(){x()}))}function Jo(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Ss(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 Es(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}st.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(),Oa(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Oa(y,this.H)},st.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))},st.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),ks(this,a))},st.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),ra(this.ce,y,"position",y.position,y.position),ks(this,a))};function pa(a,y,x){!a.zb||y.D(x)||Ys(a)||(a.H.pi||(y=x.copy()),ra(a.ce,a.H,"position",y,x))}function Bo(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function ks(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function _a(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],Pe=y[1],Me=y[2];return y=y[3],ae===0||ae===100?(te=fe,ne=Pe):(Me===0||Me===100)&&(fe=te,Pe=ne),180<Math.abs(fe-te)&&(fe>te?te+=360:fe+=360),te=E(x,te,fe-te,b)%360,ne=E(x,ne,Pe-ne,b),ae=E(x,ae,Me-ae,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+ae+"%, "+x+")"}function Pl(){function a(x,b,E,te,ne,ae){x.position=new Tt(te(ne,b.x,E.x-b.x,ae),te(ne,b.y,E.y-b.y,ae))}var y=new hi;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 Tt(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 Tt(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 Tt(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,Pe=E.actualBounds;E=Pe.x+Pe.width/2-fe.width/2,fe=Pe.y+Pe.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 Tt(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 Ln(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=_a(b,E,ne,ae,te)}),y.add("stroke",function(x,b,E,te,ne,ae){x.stroke=_a(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=_a(b,E,ne,ae,te)}),y.add("areaBackground",function(x,b,E,te,ne,ae){x.areaBackground=_a(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}et.Object.defineProperties(To.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&&bn(a,">= 1",To,"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}}}),To.prototype.stopAnimation=To.prototype.Cc;var Xl=null,Fl=!1,hu=new an(To,"Default",1),du=new an(To,"AnimateLocations",2),Jl=new an(To,"None",3);To.className="AnimationManager",To.defineAnimationEffect=function(a,y){Fl||(Pl(),Fl=!0),Xl.add(a,y)},To.Default=hu,To.AnimateLocations=du,To.None=Jl;function ds(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=fu,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=xr,this.vc=new hi,this.Tt=new hi,this.yl=new In,this.Ut=new In,this.dw=Th,a&&Object.assign(this,a)}ds.prototype.suspend=function(){this.Xk=!0},ds.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),Ss(this.Yd),pl(this.H),Es(this.Yd),this.H.redraw()};function Oa(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}st=ds.prototype,st.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 pn?a=x:x instanceof en&&(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===hu&&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),Ss(y),this.yl.each(function(b){b.data=null,a.add(b)}),Es(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Xo(y,this),this)},st.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},st.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof pn?this.H=a:a instanceof en&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ti){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return ra(this,a,y,x,b,E),this};function ra(a,y,x,b,E,te){var ne=a.vc;if(y instanceof pn&&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,Pe=ae.end;fe[x]===void 0&&(fe[x]=As(b)),Pe[x]=As(E)}else fe={},Pe={},fe[x]=As(b),Pe[x]=As(E),ae=fe.position,y instanceof en&&ae instanceof Tt&&!ae.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ae.assign(Pe.position),ae=new sc(fe,Pe,te),ne.add(y,ae);ne=fe[x],ne instanceof Tt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof Ti?ae.Ku.location=As(y.location):te&&(ae.Ku[x]=As(b))}function As(a){return a instanceof Tt||a instanceof Xn?a.copy():a}st.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},st.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),Ss(x),Pc(a,E),pl(a.H,!0),Es(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 Pc(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof en&&te.diagram===null)){var ne=b.value,ae=E?ne.end:ne.start;ne=E?ne.start:ne.end;var fe=Xl,Pe;for(Pe in ne)Pe==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||fe.get(Pe)===null||fe.get(Pe)(te,ae[Pe],ne[Pe],a.Lp,y,x,a)}}}st.stop=function(){return this.bc?(this.Ml(!0),this):this},st.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,Ss(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,Pe=E?ae.start:ae.end,Me=ae.Ku,Fe;for(Fe in Pe)if(te.get(Fe)!==null){var Ye=Fe;!ae.Hu||Ye!=="position:nodeCollapse"&&Ye!=="position:placeholder"||(Ye="position"),te.get(Ye)(ne,fe[Fe],Me[Fe]!==void 0?Me[Fe]:ae.Hu?fe[Fe]:Pe[Fe],this.Lp,this.Gd,this.Gd,this)}ae.Hu&&Me.location!==void 0&&ne instanceof Ti&&(ne.location=Me.location),ae.nv&&ne instanceof Ti&&ne.Zb(!1)}if(y.As.clear(),nd(y,!1),y.Ya(),y.N(),pl(y,!0),x.defaultAnimation===this){for(Fe=x.pr.iterator;Fe.next();)E=Fe.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}pl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Es(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Oa(this,null),x.Ml(this),y.$b())}},st.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof rr&&(b=y.placeholder),b!==null?(x=b.ga($s),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Tt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof rr)for(a=a.memberParts;a.next();)b=a.value,b instanceof ii&&this.Cj(b,y)},st.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof rr&&(x=y.placeholder),x!==null){var b=x.ga($s);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 rr)for(a=a.memberParts;a.next();)b=a.value,b instanceof ii&&this.Aj(b,y)}},st.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},et.Object.defineProperties(ds.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&bn(a,">= 1",ds,"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:Ft("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}}}),ds.prototype.getTemporaryState=ds.prototype.Ez,ds.prototype.stop=ds.prototype.stop,ds.prototype.add=ds.prototype.add,ds.prototype.addTemporaryPart=ds.prototype.Iy;function fu(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}ds.className="Animation",ds.EaseLinear=function(a,y,x,b){return x*a/b+y},ds.EaseInOutQuad=fu,ds.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},ds.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},ds.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},ds.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 jl(a,y,x){this.xd=null,this.rf=a,this.so=x||Fs,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=va))}jl.prototype.copy=function(){var a=new jl(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 os(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))}et.Object.defineProperties(jl.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 Fs=new an(jl,"Default",1),va=new an(jl,"Immediate",2),js=new an(jl,"Bundled",3);jl.className="AnimationTrigger",jl.Default=Fs,jl.Immediate=va,jl.Bundled=js;function is(a){Sr(this),this.H=null,this.Pa=new On,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)}st=is.prototype,st.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Ba(x)}a.clear(),this.Zq.length=0},st.Xe=function(a){this.H=a},st.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 rr?E++:fe instanceof ii?b++:fe instanceof Yn?te++:fe instanceof Xr?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&&Pr(b)&&(ae+=" #"+Pr(b)),x instanceof ii?ae+=" "+ri(b):x instanceof Yn&&(ae+=" "+ri(x.fromNode)+" "+ri(x.toNode));return y+" "+this.Pa.count+": "+ae},st.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=Tt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var ae=te[ne];if((b!==!0||hd(ae)!==!1)&&ae.isVisible()&&(E.assign(a),Qi(E,ae.oe),ae=ae.ic(E,y,x),ae!==null&&(y!==null&&(ae=y(ae)),ae!==null&&(x===null||x(ae)))))return Tt.free(E),ae}return Tt.free(E),null},st.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof On||b instanceof In||(b=new In),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=Tt.alloc(),ne=this.Pa.s,ae=ne.length;ae--;){var fe=ne[ae];if((E!==!0||hd(fe)!==!1)&&fe.isVisible()){te.assign(a),Qi(te,fe.oe);var Pe=fe;fe.ji(te,y,x,b)&&(y!==null&&(Pe=y(Pe)),Pe===null||x!==null&&!x(Pe)||b.add(Pe))}}return Tt.free(te),b},st.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 On||E instanceof In||(E=new In),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 Pe=fe;fe.Cf(a,y,x,b,E)&&(y!==null&&(Pe=y(Pe)),Pe===null||x!==null&&!x(Pe)||E.add(Pe))}}return E},st.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 Pe=ae[fe];if((ne!==!0||hd(Pe)!==!1)&&te(Pe)&&Pe.isVisible()){var Me=Pe;Pe.Cf(a,y,x,b,E)&&(y!==null&&(Me=y(Me)),Me===null||x!==null&&!x(Me)||E.add(Me))}}return E},st.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 On||E instanceof In)&&(te=E),E=!0),te instanceof On||te instanceof In||(te=new In),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var ae=Tt.alloc(),fe=Tt.alloc(),Pe=this.Pa.s,Me=Pe.length;Me--;){var Fe=Pe[Me];if((ne!==!0||hd(Fe)!==!1)&&Fe.isVisible()){ae.assign(a),Qi(ae,Fe.oe),fe.h(a.x+y,a.y),Qi(fe,Fe.oe);var Ye=Fe;Fe.og(ae,fe,x,b,E,te)&&(x!==null&&(Ye=x(Ye)),Ye===null||b!==null&&!b(Ye)||te.add(Ye))}}return Tt.free(ae),Tt.free(fe),te},st.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 Yn){if(ne.fd===!1)continue}else if(ne instanceof Xr&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&Vl(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]);Jn(a),Jn(E)}}};function Pa(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}st.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=Pa(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,ae=Ln.alloc(),fe=0;fe<b;fe++)this.Oj(a,x[fe],y,te,ne,ae,!0);if(Ln.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=Pa(a,y),ae=a.Zq;ae.length=0;for(var fe=x.scale,Pe=Ln.alloc(),Me=0;Me<te;Me++){var Fe=E[Me];b.contains(Fe)&&a.Oj(y,Fe,x,ae,fe,Pe,!1)}Ln.free(Pe),y.globalAlpha=ne}}}st.Oj=function(a,y,x,b,E,te,ne){if(ne&&!hd(y))a.Hs(y);else{if(b!==null&&y instanceof Yn&&(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 zl?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&&(xs(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(xs(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),xs(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))}},st.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(Vo,a,this,y,x,b,E)},st.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&Ba(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},st.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,Ba(y),a};function Nu(a,y,x){if(y=mf(a,y,x),x instanceof rr&&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}et.Object.defineProperties(is.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===""&&Ft("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Ft("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)&&bn(a,"0 <= value <= 1",is,"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))}}}),is.prototype.findObjectsNear=is.prototype.og,is.prototype.findObjectsIn=is.prototype.Cf,is.prototype.findObjectsAt=is.prototype.ji,is.prototype.findObjectAt=is.prototype.ic,is.className="Layer";function pn(a,y){if(hm||(Da(),hm=!0),Sr(this),ac=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,gs){var x=this,b=function(){x.removeEventListener(Ct.document,"DOMContentLoaded",b,!1),x.setRTL()};Ct.document.body!==null?this.setRTL():x.addEventListener(Ct.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 Qo,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"||Ct.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 To,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new On,a.pj=new hi,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Tt(NaN,NaN).freeze(),a.du=new Tt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Tt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new gr,a.zu=new Tt(NaN,NaN).freeze(),a.ut=new Ln(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ei(0,0,0,0).freeze(),a.sj=Th,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ka,a.zk=so,a.Fg=Ka,a.pq=so,a.yt=$s,a.Bt=$s,a.Fc=!0,a.pn=!1,a.De=new In,a.Eh=new hi,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ei(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ca,a.bq.diagram=a,a.Qg=new Ca,a.Qg.diagram=a,a.cj=new Ca,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new In,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 hi,a.Xn=new On,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 Ei(5).freeze(),a.Hw=new In().freeze(),a.Nt=999999999,a.nw=new In().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 In,a.ow=new In,a.Xh=null,a.aw=new Xn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Tt,bounds:new Ln,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 Ln(NaN,NaN,NaN,NaN).freeze(),a.wo=new Xn(NaN,NaN).freeze(),a.Sp=new Ln(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new hi;var y=new ii,x=new ko;x.bind(new zs("text","",ri)),y.add(x),a.ny=y,a.Lg.add("",y),y=new ii,x=new ko,x.stroke="brown",x.bind(new zs("text","",ri)),y.add(x),a.Lg.add("Comment",y),y=new ii,y.selectable=!1,y.avoidable=!1,x=new fr,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 hi,y=new rr,y.selectionObjectName="GROUPPANEL",y.type=Wn.Vertical,x=new ko,x.font="bold 12pt sans-serif",x.bind(new zs("text","",ri)),y.add(x),x=new Wn(Wn.Auto),x.name="GROUPPANEL";var b=new fr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new il,b.padding=new Ei(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new hi,y=new Yn,x=new fr,x.isPanelMain=!0,y.add(x),x=new fr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Yn,x=new fr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Xr,y.type=Wn.Auto,x=new fr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new il,x.margin=new Ei(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Xr,y.type=Wn.Link,x=new fr,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 Ho,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=qo,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 Tt,a.zy=500,a.wp=new Tt,a.wq=!1}pn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Kd=null,ad="",_h(this,!1),this.Xn.clear(),vp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function _h(a,y){a.animationManager.Cc(!0),a.Hw=new In().freeze(),a.nw=new In().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(),Ai=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function oh(){return null}pn.prototype.reset=function(){this.clear(),this.vb=!0,vf(this),Mc(this),this.Wg=!0,id(this),this.layout=new Qo,this.Wg=!1,this.model=hy(),this.model.undoManager=new Ro,this.vb=this.rn=!1,this.N()},pn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Ct.document.body);var y=wn("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},pn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Ct.document.body);var y=0;if(gs){var x=cm;y=Bc,x===null&&(x=cm=wn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Bc=wn("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||lr||(y=11)}this.Db=y,this.Gw=!0},pn.prototype.qb=function(a){a.classType===pn&&(this.autoScale=a)},pn.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(gs){if(y!=null||Ft("Diagram setup requires an argument DIV."),a.Ka!==null&&Ft("Diagram has already completed setup."),typeof y=="string"?a.Ka=Ct.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Ft("No DIV or DIV id supplied: "+y),a.Ka===null&&Ft("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Ft("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Ct.ResizeObserver){var x=_n(function(){a.$b()},250);a.ol=new Ct.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Ct.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=Ct.go;var E=new Du(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Ct.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,gs){E=wn("div");var te=wn("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=_n(function(){a.Yh=null,a.N()},300),a.Ov=_n(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,Pe=0;ae.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(fe=0<ne.deltaX?1:-1),ne.deltaY!==0&&(Pe=0<ne.deltaY?1:-1),ae.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-fe:-Pe):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(fe=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(Pe=0<ne.wheelDeltaY?-1:1),ae.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-fe:-Pe):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 Pe=fe;fe=zd(a,ne,!0,!1,!0,Pe),Lh(a,ne,fe),fe.targetDiagram=jd(ne,ne.target),fe.targetObject=null,Pe||fe.clone(a.bq),Pe=a.uw,ae=ae?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(Pe.x-ne.screenX)>ae||Math.abs(Pe.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=Ct.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 Pe=a,Me=ne;fe&&fe.H&&(Me=ne,Pe=fe.H),ae.targetDiagram=Pe,Lh(a,Me,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 Pe=Ct.document.elementFromPoint(ne.clientX,ne.clientY)||null;Pe!==null&&Pe.shadowRoot!==void 0&&Pe.shadowRoot!==null&&(Pe=Pe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),Pe!==null&&Pe.H instanceof pn&&Pe.H!==a&&Lh(Pe.H,ne,fe),Pe===null&&(Pe=ne.target),Lh(a,ne,fe),fe.clickCount=a.yq,fe.targetDiagram=jd(ne,Pe),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"+Pf[1]+Pf[2]+"wI"+$d.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,_f,y,y),b.Vc(!0),Kp(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}pn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},pn.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(Ct,"resize",a.Ov,!1)}function Ia(a){30<a.Sq&&(a.Yh=1)}function nd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Wi&&Wi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}pn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Ct.devicePixelRatio||1},pn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},pn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},pn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},pn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},pn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},pn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},pn.prototype.doFocus=function(){this.focus()},pn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Ct.scrollX||Ct.pageXOffset,y=Ct.scrollY||Ct.pageYOffset;this.ta.focus(),Ct.scrollTo(a,y)}},pn.prototype.Oy=function(){this.H.R("GainedFocus")},pn.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===Ka&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function id(a){var y=new is;y.name="Background",a.Al(y),y=new is,y.name="",a.Al(y),y=new is,y.name="Foreground",a.Al(y),y=new is,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new is,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new is,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 fr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new fr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new fr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new fr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new fr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new fr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ti,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)}pn.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,Pe=b.height+te.top+te.bottom,Me=b.right+te.right;te=b.bottom+te.bottom;var Fe=E.x;b=E.y;var Ye=E.width,nt=E.height,ot=E.right,ft=E.bottom;E=this.scale;var Ot=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Ot=Ot+a.scrollWidth-a.clientWidth;break;case"reverse":Ot=a.scrollWidth-Ot-a.clientWidth}var Mt=Ot;Ye<fe||nt<Pe?(Ot=Tt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Mt&&(Ot.x=Mt/E+ne,this.ju=Mt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Ot.y=a.scrollTop/E+ae,this.lu=a.scrollTop),this.position=Ot,Tt.free(Ot),this.Ee=this.qr=!1):(Ot=Tt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Fe&&(this.position=Ot.h(Mt+ne,this.position.y)),Me>ot&&(this.position=Ot.h(-(y.scrollWidth-this.Aa)+Mt-this.Aa/E+Me,this.position.y))),a.vy&&this.allowVerticalScroll&&(ae<b&&(this.position=Ot.h(this.position.x,a.scrollTop+ae)),te>ft&&(this.position=Ot.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),Tt.free(Ot),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Me=b.right,ot=E.right,te=b.bottom,ft=E.bottom,ne=b.x,Fe=E.x,ae=b.y,b=E.y,Ye>=fe&&ne>=Fe&&Me<=ot&&(x.style.width="1px"),nt>=Pe&&ae>=b&&te<=ft&&(x.style.height="1px"))}},pn.prototype.computeBounds=function(a){return a===void 0&&(a=new Ln),ya(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 Pe=ne[fe];Pe.isInDocumentBounds&&Pe.isVisible()&&(Pe=Pe.actualBounds,Pe.w()&&(x?(x=!1,y.assign(Pe)):y.ed(Pe)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}pn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(sn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Yn||(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 Yn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new Ln(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=Tt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=Ln.allocAt(0,0,b.width,b.height);var E=Tt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,Ln.free(b),Tt.free(E),Tt.free(x)}x=a.yh,y&&a.Fg!==Ka&&(x=a.Fg);var te=x!==Ka?Ph(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()?Fr:fe),xf(a,a.documentBounds,E,ne,ae,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,rn.B(te.x,x)&&rn.B(te.y,b)&&rn.B(te.width,E)&&rn.B(te.height,ne)||a.onViewportBoundsChanged(new Ln(x,b,E,ne),te,y,!1)}}function Ph(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}pn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Th,this.scale=Ph(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},st=pn.prototype,st.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 Tt(a.x,a.y)}},st.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Tt(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))},st.zz=function(a){if(a instanceof en){this.eq=a;var y=Tt.alloc();this.fq=this.op(a.ga($s,y)),Tt.free(y)}else this.eq=null,this.fq=qo};function xf(a,y,x,b,E,te){var ne=Tt.allocAt(a.pa.x,a.pa.y),ae=ne.x,fe=ne.y;if(a.eq!==null){var Pe=Tt.alloc();Pe=a.eq.ga($s,Pe),ae=Pe.x-a.fq.x/a.scale,fe=Pe.y-a.fq.y/a.scale,E=fs,Tt.free(Pe)}(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),pa(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Mc(a),Tt.free(ne)}st.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 Ti)return a}else if(a=Ku(this,a,function(x){return x.part}),a instanceof Ti)return a;return null},st.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ya(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),ya(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}st.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 Ti&&b.canSelect()}:null,x)};function Fc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof On||E instanceof In||(E=new In),ya(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}st.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof On||b instanceof In||(b=new In),ya(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},st.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 Ti&&(!x||E.canSelect())},y,b)},st.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof On||E instanceof In||(E=new In),ya(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},st.Nu=function(a,y,x,b,E,te){var ne=new In;ya(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 On||E instanceof In||(E=new In),ya(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}st.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 Ti&&(!b||te.canSelect())},x,E)},st.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 On||E instanceof In)&&(te=E),E=!0),te instanceof On||te instanceof In||(te=new In),ya(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 On||E instanceof In)&&(te=E),E=!0),te instanceof On||te instanceof In||(te=new In),ya(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}pn.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),lr&&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,lr&&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)}pn.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)},pn.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)},pn.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)},pn.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)},pn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Tt(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?Qi(new Tt(y,a),this.Ab):new Tt(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=Tt.allocAt(ne,ae),a.Ab.Cd(y),x.documentPoint.assign(y),Tt.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))}}pn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Ud(a){a.ld||ya(a),a.Va()}pn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},st=pn.prototype,st.Pz=function(){return this.kg},st.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,pl(this),this.hf=!1,this.du=new Tt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&zn(function(){b.ld=!1,Yo(y,"Model"),a(b)},1)},st.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Ct.requestAnimationFrame(function(){y.kg&&y.bd()})}},st.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),pl(this))};function jc(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||zc(a)||(y&&ya(a),x&&ql(a,!1))}function pl(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];Js(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)),ya(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,ya(a),a.ou||Ud(a),jc(a,!0,!1),ne=!1,te?(x=Ln.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),Ln.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ka?a.scale=Ph(a,a.Fg):a.yh!==Ka?a.scale=Ph(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),ql(a,!0)),te&&ne&&a.eb("Initial Layout"),ya(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Gd(a){if(a.Fg!==Ka)a.scale=Ph(a,a.Fg);else if(a.yh!==Ka)a.scale=Ph(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 ya(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 In,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof rr&&b.U&65536&&(b.U=b.U^65536)})}}st.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof rr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof rr&&x.isVisible()&&cs(this,x);for(a.reset();a.next();)x=a.value,x instanceof Yn&&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 Xr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function cs(a,y){for(var x=Gn(),b=Gn(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof rr?(iu(te)||tl(te)||cd(te))&&cs(a,te):te instanceof Yn?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(Jn(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();Jn(b)}st.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},st.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Ft("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){gu(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),Za(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&&(gr.prototype.Cd=gr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,gu(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,Pe=Math.round(ae.x*fe)/fe,Me=Math.round(ae.y*fe)/fe;for(fe!==1&&te.scale(fe),ae.x===0&&ae.y===0||te.translate(-Pe,-Me),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Za(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&&(gr.prototype.Cd=gr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Wi&&Wi.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 Vs(a,y,x,b,E,te,ne,ae,fe,Pe){if(a.Ka!==null){a.ta===null&&Ft("No canvas specified"),ne===void 0&&(ne=null),ae===void 0&&(ae=null),fe===void 0&&(fe=!1),Pe===void 0&&(Pe=!1),gu(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var Me=a.Ca;a.Ca=E;var Fe=a.Wa.s,Ye=Fe.length;try{var nt=new Ln(te.x,te.y,b.width/E,b.height/E),ot=nt.copy();ot.Co(x),Lc(a,ot),ya(a),a.Fd(Fe,Ye,a,nt),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 ft=a.Mb;y.scale(ft,ft);var Ot=gr.alloc();Ot.reset(),Ot.translate(x.left,x.top),Ot.scale(E),te.x===0&&te.y===0||Ot.translate(-te.x,-te.y),y.setTransform(Ot.m11,Ot.m12,Ot.m21,Ot.m22,Ot.dx,Ot.dy),y.yc(),y instanceof zl&&Yy(y,Ot.m11,Ot.m12,Ot.m21,Ot.m22,Ot.dx,Ot.dy),gr.free(Ot),Za(a,y),y.globalAlpha=a.pb;var Mt=a.Qj("Grid");if(ne){var Ht=new In,Wt=ne.iterator;for(Wt.reset();Wt.next();){var Kt=Wt.value;Kt instanceof Ti&&(Pe||Kt.layer!==Mt)&&(Kt.Gj(),Ht.add(Kt))}for(Pe=0;Pe<Ye;Pe++)El(Fe[Pe],y,a,Ht,fe);Ht.each(function(gn){return gn.Gj()})}else for(Ht=0;Ht<Ye;Ht++){var Qt=Fe[Ht];Qt===Mt?Pe&&Qt.gc(y,a,!0):Qt.gc(y,a,fe)}a.$i=!1,a.Yf&&Yd(a.Yf,a)&&a.Vp()}finally{a.Ca=Me,a.ib.Vc(!0),a.vd=!0,a.Fd(Fe,Ye,a,a.viewportBounds),Lc(a),a.ib instanceof zl&&(a.ib.Nj.PA(),a.redraw())}}}st.Gf=function(a){return this.Rg[a]},st.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},st.Tx=function(){this.Rg=new pi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(lr||Bi),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Za(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}st.Ql=function(a){return this.on[a]},st.sA=function(a,y){this.on[a]=y},st.Sx=function(){this.on=new pi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},st.set=function(a){return Object.assign(this,a),this},st.Du=function(a){return this.nm(a)},st.nm=function(a){return pu(this,a),this};function pu(a,y){var x=a instanceof Wn,b=a instanceof pn,E;for(E in y){E===""&&Ft("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])),Gt(te)?ne=E.substr(ae+1):Ft("Unable to find object named: "+fe+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Mi(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Mi(a.toolManager,ne))te=a.toolManager;else if(b&&am(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof Si&&ne==="Changed"){a.Pe(y[ne]);continue}else Ft('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof en&&te.Vw(ne)}}st.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new hi,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},st.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")},pn.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=Ln.alloc(),Qp(this,this.computeBounds(b)),Ln.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 Pe=70*ne,Me=Math.max(te,0),Fe=Math.max(y,0),Ye=Math.floor(E-Me),nt=Math.floor(ae-Fe);a.drawImage(b.Oa,Me,Fe,Ye,nt,0,0,Ye,nt),Yd(this.Yf,this)&&a.clearRect(0,0,fe,Pe),b=Gn(),a=Gn(),nt=Math.abs(te),Ye=Math.abs(y);var ot=Me===0?0:E-nt;Me=Tt.allocAt(ot,0),nt=Tt.allocAt(nt+ot,ae),a.push(new Ln(Math.min(Me.x,nt.x),Math.min(Me.y,nt.y),Math.abs(Me.x-nt.x),Math.abs(Me.y-nt.y)));var ft=this.Ab;if(ft.reset(),ft.scale(ne,ne),this.Ca!==1&&ft.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&ft.translate(-ne.x,-ne.y),Qi(Me,ft),Qi(nt,ft),b.push(new Ln(Math.min(Me.x,nt.x),Math.min(Me.y,nt.y),Math.abs(Me.x-nt.x),Math.abs(Me.y-nt.y))),ot=Fe===0?0:ae-Ye,Me.h(0,ot),nt.h(E,Ye+ot),a.push(new Ln(Math.min(Me.x,nt.x),Math.min(Me.y,nt.y),Math.abs(Me.x-nt.x),Math.abs(Me.y-nt.y))),Qi(Me,ft),Qi(nt,ft),b.push(new Ln(Math.min(Me.x,nt.x),Math.min(Me.y,nt.y),Math.abs(Me.x-nt.x),Math.abs(Me.y-nt.y))),Yd(this.Yf,this)&&(E=0<te?0:-te,ae=0<y?0:-y,Me.h(E,ae),nt.h(fe+E,Pe+ae),a.push(new Ln(Math.min(Me.x,nt.x),Math.min(Me.y,nt.y),Math.abs(Me.x-nt.x),Math.abs(Me.y-nt.y))),Qi(Me,ft),Qi(nt,ft),b.push(new Ln(Math.min(Me.x,nt.x),Math.min(Me.y,nt.y),Math.abs(Me.x-nt.x),Math.abs(Me.y-nt.y)))),Tt.free(Me),Tt.free(nt),jc(this,!1,!0),this.Ka===null&&Ft("No div specified"),this.ta===null&&Ft("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(gu(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,Pe=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,-Pe),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),Za(this,E),E.globalAlpha=this.pb,ae=0;ae<te;ae++)if(ne=y[ae],fe=b,ne.visible&&ne.pb!==0){Pe=Pa(ne,E),Fe=ne.Zq,Fe.length=0,Me=this.scale,Ye=Ln.alloc(),nt=ne.Pa.s,ft=nt.length,ot=fe.length;for(var Ot=0;Ot<ft;Ot++){var Mt=nt[Ot],Ht=nf(Mt,Mt.actualBounds);e:{for(var Wt=2/Me,Kt=4/Me,Qt=0;Qt<ot;Qt++){var gn=fe[Qt];if(gn.width!==0&&gn.height!==0&&Ht.Vu(gn.x-Wt,gn.y-Wt,gn.width+Kt,gn.height+Kt)){Ht=!0;break e}}Ht=!1}Ht&&ne.Oj(E,Mt,this,Fe,Me,Ye,!0)}Ln.free(Ye),E.globalAlpha=Pe}E.restore(),E.Vc(!0),this.Yf&&Yd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Jn(b),Jn(a),this.ld=!1}}else this.bd();x&&(Ia(this),this.bd(),nd(this,!0))}else x?(Ia(this),this.bd(),nd(this,!0)):this.bd()}};function gu(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,Pe=E.clientHeight||b+ae,Me=a.viewportBounds;E=Me.x;var Fe=Me.y,Ye=Me.width,nt=Me.height;if((fe!==x+ne||Pe!==b+ae)&&(a.gf=!1,a.Be=!1,ae=ne=0,a.Aa=fe,a.ya=Pe,te=a.pn=!0,Mc(a)),!a.hf||!a.viewportBounds.w())return!0;var ot=a.ku,ft=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Ot=a.documentBounds,Mt=0,Ht=0,Wt=0,Kt=0,Qt=Me.width,gn=Me.height,ni=a.rj;a.contentAlignment.sb()?(Ot.width>Qt&&(Mt=ni.left,Ht=ni.right),Ot.height>gn&&(Wt=ni.top,Kt=ni.bottom)):(Mt=ni.left,Ht=ni.right,Wt=ni.top,Kt=ni.bottom);var fi=Ot.width+Mt+Ht,ui=Ot.height+Wt+Kt;ni=a.scale;var $n=fi>fe/ni,Rn=ui>Pe/ni;if(!(te||a.gf||a.Be||$n||Rn))return!0;Mt=Ot.x-Mt,fe=Me.x,Ht=Ot.right+Ht,Pe=Me.right+ne,Wt=Ot.y-Wt;var nr=Me.y;Ot=Ot.bottom+Kt,Me=Me.bottom+ae;var $i="1px";if(Kt="1px",a.scrollMode===Th&&($n||Rn)&&($n&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&($n=1,Mt+1<fe&&($n=Math.max((fe-Mt)*ni+a.Aa,$n)),Ht>Pe+1&&($n=Math.max((Ht-Pe)*ni+a.Aa,$n)),Qt+ne+1<fi&&($n=Math.max((fi-Qt)*ni+a.Aa,$n)),$i=$n.toString()+"px"),Rn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&($n=1,Wt+1<nr&&($n=Math.max((nr-Wt)*ni+a.ya,$n)),Ot>Me+1&&($n=Math.max((Ot-Me)*ni+a.ya,$n)),gn+ae+1<ui&&($n=Math.max((ui-gn)*ni+a.ya,$n)),Kt=$n.toString()+"px")),$n=$i!=="1px",Rn=Kt!=="1px",$n&&Rn||!$n&&!Rn||(Rn&&(Pe-=a.Db),$n&&(Me-=a.Db),fi<Qt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Mt+1<fe&&(ne=Math.max((fe-Mt)*ni+a.Aa,ne)),Ht>Pe+1&&(ne=Math.max((Ht-Pe)*ni+a.Aa,ne)),Qt+1<fi&&(ne=Math.max((fi-Qt)*ni+a.Aa,ne)),$i=ne.toString()+"px"),$n=$i!=="1px",ne=a.ya,$n!==a.Be&&(ne=$n?a.ya-a.Db:a.ya+a.Db),ui<gn+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,Wt+1<nr&&(ae=Math.max((nr-Wt)*ni+ne,ae)),Ot>Me+1&&(ae=Math.max((Ot-Me)*ni+ne,ae)),gn+1<ui&&(ae=Math.max((ui-gn)*ni+ne,ae)),Kt=ae.toString()+"px"),Rn=Kt!=="1px"),a.qr&&$n===a.Be&&Rn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if($n!==a.Be&&($i==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=$n,ft.style.width=$i,Rn!==a.gf&&(Kt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(ae=Tt.alloc(),Rn?(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)),Tt.free(ae))),te&&Mc(a),a.gf=Rn,ft.style.height=Kt,a.gu=!0,te&&(a.pn=!0),y=ot.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Qt+1<fi?y=(a.position.x-Mt)*ni:Mt+1<fe?y=ot.scrollWidth-ot.clientWidth:Ht>Pe+1&&(y=a.position.x*ni)),a.tn)switch(a.bu){case"negative":y=-(ot.scrollWidth-y-ot.clientWidth);break;case"reverse":y=ot.scrollWidth-y-ot.clientWidth}return ot.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(gn+1<ui?ot.scrollTop=(a.position.y-Wt)*ni:Wt+1<nr?ot.scrollTop=ot.scrollHeight-ot.clientHeight:Ot>Me+1&&(ot.scrollTop=a.position.y*ni)),fe=a.Aa,Pe=a.ya,ot.style.width=fe+(a.gf?a.Db:0)+"px",ot.style.height=Pe+(a.Be?a.Db:0)+"px",x!==fe||b!==Pe||a.animationManager.zb?(x=Ln.allocAt(E,Fe,Ye,nt),a.onViewportBoundsChanged(x,a.viewportBounds,ni,te),Ln.free(x),!1):!0}st=pn.prototype,st.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Ft("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&&Ft('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(ps,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},st.oi=function(a){this.partManager.oi(a);var y=this;qd(a,function(x){Zd(y,x)}),(a instanceof Xr||a instanceof rr&&a.placeholder!==null)&&a.v(),a.data!==null&&qd(a,function(x){ly(y.partManager,x)}),tl(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()},st.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()},st.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(us,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}st.Is=function(a,y){if(y===void 0&&(y=!1),sn(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 In,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},st.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},pn.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 hi;if(a!==null)if(sn(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 ii){if(y.add(x,a.Pd(E,x,x.location)),x instanceof rr&&(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 Yn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Ou(a,y,x.value,b,E);else x instanceof Xr||y.add(x,a.Pd(E,x,x.location))}function Ec(a,y,x,b,E){if(y!==null&&y.count!==0){var te=Tt.alloc(),ne=Tt.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(),Pe=y.iterator,Me=Tt.alloc();Pe.next();){var Fe=Pe.key,Ye=Pe.value;if(Fe.Zc()){var nt=Vp(a,Fe,y);nt!==null?ae.push(new re(Fe,Ye,nt)):(!E||Fe.canMove())&&(nt=Ye.point,te.assign(nt),a.computeMove(Fe,te.add(ne),b,Me),Fe.location=Me,Ye.shifted===void 0&&(Ye.shifted=new Tt),Ye.shifted.assign(Me.re(nt)))}else Pe.key instanceof Yn&&fe.push(Pe.sa)}for(Tt.free(Me),E=ae.length,Pe=0;Pe<E;Pe++)Fe=ae[Pe],te.assign(Fe.info.point),Fe.Su.shifted===void 0&&(Fe.Su.shifted=new Tt),Fe.node.location=te.add(Fe.Su.shifted);for(E=Tt.alloc(),Pe=Tt.alloc(),Fe=fe.length,Ye=0;Ye<Fe;Ye++){var ot=fe[Ye];if(nt=ot.key,nt instanceof Yn)if(nt.suspendsRouting){nt.Tg=null,Me=nt.fromNode;var ft=nt.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ft=ot.value.point,nt.dragComputation===null)y.add(nt,a.Pd(b,nt,ne)),Bh(nt,ne.x-ft.x,ne.y-ft.y);else{ot=Tt.allocAt(0,0),(Me=nt.i(0))&&Me.w()&&ot.assign(Me);var Ot=Me=Tt.alloc().assign(ot).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Ot=Tt.alloc(),Jf(a,nt,Me,Ot,b)),Me.assign(nt.dragComputation(nt,Me,Ot)).re(ot),y.add(nt,a.Pd(b,nt,Me)),Bh(nt,Me.x-ft.x,Me.y-ft.y),Tt.free(ot),Tt.free(Me),Ot!==Me&&Tt.free(Ot)}else Me!==null&&(E.assign(Me.location),Ot=y.I(Me),Ot!==null&&E.re(Ot.point)),ft!==null&&(Pe.assign(ft.location),Ot=y.I(ft),Ot!==null&&Pe.re(Ot.point)),Me!==null&&ft!==null?E.Xa(Pe)?(Me=ot.value.point,ft=te,ft.assign(E),ft.re(Me),y.add(nt,a.Pd(b,nt,E)),Bh(nt,ft.x,ft.y)):(nt.suspendsRouting=!1,nt.bb()):(ot=ot.value.point,Me=Me!==null?E:ft!==null?Pe:ne,y.add(nt,a.Pd(b,nt,Me)),Bh(nt,Me.x-ot.x,Me.y-ot.y))}else(nt.fromNode===null||nt.toNode===null)&&(Me=ot.value.point,y.add(nt,a.Pd(b,nt,ne)),Bh(nt,ne.x-Me.x,ne.y-Me.y))}Tt.free(te),Tt.free(ne),Tt.free(E),Tt.free(Pe),Jn(ae),Jn(fe),x||(ya(a),od(a,y))}}pn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Tt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Tt.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,Pe=fe.x;return isNaN(Pe)&&(Pe=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,Pe)),Math.max(ne,Math.min(x.y,fe))),E!==y&&Tt.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=Tt.allocAt(0,0),te.yi(0,0,a,y,E),rn.No(x.x,x.y,ae+te.x,ne+te.y,a,y,b),Tt.free(te)}}function Qf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Yn&&(y.suspendsRouting=!0)}function od(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Yn&&(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}st=pn.prototype,st.Pd=function(a,y,x){if(x===void 0)return new ah(xr);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new ah(new Tt(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&&Ft("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Ft("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Ft("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Ft("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&&Ft("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}st.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(ps,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},st.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(us,"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(ps,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},st.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(us,"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(ps,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},st.kA=function(a){if(a.diagram!==this&&Ft("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(us,"layers",this,a,null,x,null),this.N(),this.Ya()}}},st.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},st.Yw=function(a){return this.pf===null&&(this.pf=new On),this.pf.add(a),this.model.Pe(a),this},st.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},st.Pe=function(a){return this.zg===null&&(this.zg=new On),this.zg.add(a),this},st.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},st.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Wa&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},st.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var ae=new zo;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)},st.g=function(a,y,x,b,E){this.cb(Vo,a,this,y,x,b,E)},pn.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 en){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===ps){var ne=a.object,ae=a.newParam,fe=a.newValue;if(ne instanceof Wn)if(typeof ae=="number"&&fe instanceof en){y?ne.pc(ae):ne.Gb(ae,fe);var Pe=ne.part;Pe!==null&&Pe.Wb()}else typeof ae=="number"&&fe instanceof Qs&&(fe.isRow?h1(ne,ae,y?void 0:fe):d1(ne,ae,y?void 0:fe));else if(ne instanceof is){var Me=a.oldParam===!0;typeof ae=="number"&&fe instanceof Ti&&(y?(fe.isSelected=!1,fe.isHighlighted=!1,fe.Wb(),ne.pc(Me?ae:-1,fe,Me)):ne.oi(ae,fe,Me))}else ne instanceof pn?typeof ae=="number"&&fe instanceof is&&(y?this.Wa.mb(ae):(fe.Xe(this),this.Wa.Gb(ae,fe))):Ft("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===us){var Fe=a.object,Ye=a.oldParam,nt=a.oldValue;if(Fe instanceof Wn)typeof Ye=="number"&&nt instanceof en?y?Fe.Gb(Ye,nt):Fe.pc(Ye):typeof Ye=="number"&&nt instanceof Qs&&(nt.isRow?h1(Fe,Ye,y?nt:void 0):d1(Fe,Ye,y?nt:void 0));else if(Fe instanceof is){var ot=a.newParam===!0;typeof Ye=="number"&&nt instanceof Ti&&(y?0>Fe.Pa.indexOf(nt)&&Fe.oi(Ye,nt,ot):(nt.isSelected=!1,nt.isHighlighted=!1,nt.Wb(),Fe.pc(ot?Ye:-1,nt,ot)))}else Fe instanceof pn?typeof Ye=="number"&&nt instanceof is&&(y?(nt.Xe(this),this.Wa.Gb(Ye,nt)):this.Wa.mb(Ye)):Ft("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Wa&&Ft("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},pn.prototype.Ea=function(a){return this.undoManager.Ea(a)},pn.prototype.eb=function(a){return this.undoManager.eb(a)},pn.prototype.Kf=function(){return this.undoManager.Kf()},pn.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}},pn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},pn.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&&(Ys(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,Pe=a.contentAlignment;isNaN(ae)&&(Pe.$c()?Pe.Hf(Pu)?ae=0:Pe.Hf(Ua)&&(ae=te-1):ae=Pe.sb()?Pe.x*(te-1):te/2),isNaN(fe)&&(Pe.$c()?Pe.Hf($l)?fe=0:Pe.Hf(Ga)&&(fe=ne-1):fe=Pe.sb()?Pe.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=Tt.allocAt(a.pa.x+ae/y-ae/x,a.pa.y+fe/y-fe/x),a.position=te,Tt.free(te),a.Ca=x,Mc(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),ql(a,!1),b.zb&&(Ys(b)||b.ce.add(b.H,"scale",y,a.Ca))}}pn.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!==Ka||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Ho&&(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 Pe=ne[fe],Me=Math.abs(Pe.interval);2>Me||(mv(Pe.figure)?te=te*Me/rn.vx(te,Me):E=E*Me/rn.vx(E,Me))}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=Ln.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Ln.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,Ln.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=Tt.alloc(),rn.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Xn.free(b),x.part.location=y,Tt.free(y)}}pn.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)}},pn.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))},pn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),sn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Ti||Ft("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 Ti||Ft("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},pn.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()}},st=pn.prototype,st.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},st.Jz=function(a){a=new In().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 Ti||Ft("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},st.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=Tt.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)),Tt.free(te);return}Ft("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):Ft("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Tt.free(te)},st.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)},st.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},st.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)},st.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,Pe=y.m22,Me=y.dx,Fe=y.dy,Ye=x*ne+b*fe+Me;y=x*ae+b*Pe+Fe;var nt=E*ne+b*fe+Me;return a=E*ae+b*Pe+Fe,b=x*ne+te*fe+Me,x=x*ae+te*Pe+Fe,ne=E*ne+te*fe+Me,E=E*ae+te*Pe+Fe,te=Math.min(Ye,nt),Ye=Math.max(Ye,nt),nt=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),Ye=Math.max(Ye,b),nt=Math.min(nt,x),y=Math.max(y,x),te=Math.min(te,ne),Ye=Math.max(Ye,ne),nt=Math.min(nt,E),y=Math.max(y,E),new Ln(te,nt,Ye-te,y-nt)},st.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),Qi(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}pn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Wa&&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===Wa){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ya(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||ys(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(),Jo(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var ae=this;zn(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 yl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof In&&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 yl){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 In&&x.Bg.remove(a),vp(b));break}}}}}pn.prototype.Wd=function(){this.partManager.Wd()},pn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},pn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},pn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},pn.prototype.Vb=function(a){return this.partManager.Vb(a)},pn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},st=pn.prototype,st.Lc=function(a){return this.partManager.Lc(a)},st.ii=function(a){return this.partManager.ii(a)},st.Kc=function(a){return this.partManager.Kc(a)},st.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:xo(Mr(y)))},st.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:xo(Mr(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())}st.Va=function(){if(this.Zi){var a=Ln.alloc();Qp(this,this.computeBounds(a)),Ln.free(a)}},st.rz=function(){for(var a=new In,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},st.qz=function(){return this.ai.iterator},st.Uz=function(a){ya(this),a&&qf(this,!0),this.ld?qp(this,!1):(this.Jk=!0,pl(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||Yo(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),ya(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||ys(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),cs(a,y),E.isValidLayout=!0):a.xh=!0)}}st.yz=function(){for(var a=new On,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 On;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new hi,b=new hi;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;Ft("Unknown DiagramEvent name: "+y)}st.Bj=function(a,y){return a=ep(this,a),a!==null&&a.add(y),this},st.am=function(a,y){a=ep(this,a),a!==null&&a.remove(y)},st.R=function(a,y,x){var b=ep(this,a),E=new _c;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}st.Yj=function(a,y){return np(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},pn.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=Ln.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)}Ln.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=Ln.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof ii&&ip(a,ne,b,y);Ln.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 rr)for(y=y.memberParts;y.next();)E=y.value,E instanceof ii&&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)}pn.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=zn(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=Ln.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qp(a,y),Ln.free(y),a.Fc=!0,a.bd(),tg(a))}},a.vp))}pn.prototype.ug=function(){this.vk!==-1&&(Ct.clearTimeout(this.vk),this.vk=-1)},pn.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=Ln.allocAt(0,0,b.width*E,b.height*E);var te=Tt.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(xr)||(y=new Tt(y.x+te.x/E,y.y+te.y/E)),Ln.free(b),Tt.free(te),y},st=pn.prototype,st.Cs=function(){return null},st.av=function(){return null},st.bs=function(a,y){this.pj.add(a,y)},st.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof rr&&(y.$p=null)})};function wf(a,y,x){function b(){var Me=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||Me-Pe>fe?y(x,E,ae):Ct.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,Pe=+new Date;return Ct.requestAnimationFrame(function(){b()}),null}st.Wz=function(a){return gs?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},st.Jx=function(a){return a===void 0&&(a={}),wf(this,this.Xz,a)},st.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"&&Ft('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"&&Ft("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,Pe=y.padding===void 0?1:y.padding,Me=y.background||null,Fe=y.omitTemporary;Fe===void 0&&(Fe=!0);var Ye=y.document||document,nt=y.elementFinished||null,ot=y.showTemporary;ot===void 0&&(ot=!Fe),y=y.showGrid,y===void 0&&(y=ot),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof Pe=="number"?Pe=new Ei(Pe):Pe instanceof Ei||Ft("MakeImage padding must be a Margin or a number."),Pe.left=Math.max(Pe.left,0),Pe.right=Math.max(Pe.right,0),Pe.top=Math.max(Pe.top,0),Pe.bottom=Math.max(Pe.bottom,0),a.ib.Vc(!0),Fe=new Du(null,Ye,void 0,!0);var ft=Fe.context;if(!(E||te||fe||ae))return Fe.width=a.Aa+Math.ceil(Pe.left+Pe.right),Fe.height=a.ya+Math.ceil(Pe.top+Pe.bottom),x==="SVG"?b===null?null:(b.resize(Fe.width,Fe.height,Fe.width,Fe.height),b.ownerDocument=Ye,b.hs=nt,Vs(a,b.context,Pe,new Xn(Fe.width,Fe.height),a.Ca,a.pa,fe,Me,ot,y),b.context):(a.Xm=!1,Vs(a,ft,Pe,new Xn(Fe.width,Fe.height),a.Ca,a.pa,fe,Me,ot,y),a.Xm=!0,Fe.context);var Ot=a.Pp,Mt=a.documentBounds.copy();if(Mt.Fv(a.yb),ot)for(var Ht=a.Wa.s,Wt=Ht.length,Kt=0;Kt<Wt;Kt++){var Qt=Ht[Kt];if(Qt.visible&&Qt.isTemporary){Qt=Qt.Pa.s;for(var gn=Qt.length,ni=0;ni<gn;ni++){var fi=Qt[ni];fi.isInDocumentBounds&&fi.isVisible()&&(fi=fi.actualBounds,fi.w()&&Mt.ed(fi))}}}if(Ht=new Tt(Mt.x,Mt.y),fe!==null){for(Wt=new Ln(0,0,0,0),Kt=!0,Qt=fe.iterator,Qt.reset();Qt.next();)gn=Qt.value,gn instanceof Ti&&(ni=gn.layer,ni!==null&&!ni.visible||ni!==null&&!ot&&ni.isTemporary||!gn.isVisible()||(gn=gn.actualBounds,gn.w()&&(Kt?(Kt=!1,Wt.assign(gn)):Wt.ed(gn))));Mt.width=Wt.width,Mt.height=Wt.height,Ht.x=Wt.x,Ht.y=Wt.y}return ae!==null&&ae.w()&&(Ht=ae,te||(te=Ot)),Wt=ae=0,Pe!==null&&(ae=Pe.left+Pe.right,Wt=Pe.top+Pe.bottom),Kt=Qt=0,E!==null&&(Qt=E.width,Kt=E.height,isFinite(Qt)&&(Qt=Math.max(0,Qt-ae)),isFinite(Kt)&&(Kt=Math.max(0,Kt-Wt))),E!==null&&te!==null?(te==="NaN"&&(te=Ot),E.w()?(E=Qt,Mt=Kt):isNaN(Kt)?(E=Qt,Mt=Mt.height*te):(E=Mt.width*te,Mt=Kt)):E!==null?E.w()?(te=Math.min(Qt/Mt.width,Kt/Mt.height),E=Qt,Mt=Kt):isNaN(Kt)?(te=Qt/Mt.width,E=Qt,Mt=Mt.height*te):(te=Kt/Mt.height,E=Mt.width*te,Mt=Kt):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-ae)/Mt.width,(ne.height-Wt)/Mt.height),te>Ot?(te=Ot,E=Mt.width,Mt=Mt.height):(E=ne.width,Mt=ne.height)):(E=Mt.width*te,Mt=Mt.height*te):(te=Ot,E=Mt.width,Mt=Mt.height),Pe!==null?(E+=ae,Mt+=Wt):Pe=new Ei(0),ne!==null&&(Ot=ne.width,ne=ne.height,isNaN(Ot)&&(Ot=2e3),isNaN(ne)&&(ne=2e3),isFinite(Ot)&&(E=Math.min(E,Ot)),isFinite(ne)&&(Mt=Math.min(Mt,ne))),Fe.width=Math.ceil(E),Fe.height=Math.ceil(Mt),x==="SVG"?b===null?null:(b.resize(Fe.width,Fe.height,Fe.width,Fe.height),b.ownerDocument=Ye,b.hs=nt,Vs(a,b.context,Pe,new Xn(Math.ceil(E),Math.ceil(Mt)),te,Ht,fe,Me,ot,y),b.context):(a.Xm=!1,Vs(a,ft,Pe,new Xn(Math.ceil(E),Math.ceil(Mt)),te,Ht,fe,Me,ot,y),a.Xm=!0,Fe.context)}et.Object.defineProperties(pn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof He||(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,Ct.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,Ct.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(Ct,"resize",this.Ov,!1),this.removeEventListener(Ct,"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)&&bn(a,"0 <= value <= 1",pn,"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&&bn(a,">= 0",pn,"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&&bn(a,">= 0",pn,"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 bn(a,">= 0",pn,"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&&Ft("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=_h(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Yo(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(Ct,"pointermove",this.dk,!0),this.addEventListener(Ct,"pointerdown",this.ui,!0),this.addEventListener(Ct,"pointerup",this.fk,!0),this.addEventListener(Ct,"pointerout",this.ek,!0),this.addEventListener(Ct,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Ct,"wheel",this.$j,!0),this.addEventListener(Ct,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Ct,"pointermove",this.dk,!0),this.removeEventListener(Ct,"pointerdown",this.ui,!0),this.removeEventListener(Ct,"pointerup",this.fk,!0),this.removeEventListener(Ct,"pointerout",this.ek,!0),this.removeEventListener(Ct,"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(Ct,"wheel",this.$j,!0),this.removeEventListener(Ct,"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=Tt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),pa(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)}Tt.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&&Ft("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||Ft("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 Ei(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!==Ka&&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()||Ft("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()||Ft("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)):bn(a,"> 0",pn,"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)):bn(a,"> 0",pn,"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 Ei(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&&Ft("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!==Xs&&a!==op&&Ft("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 Ei(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),et.Object.defineProperties(pn,{licenseKey:{get:function(){return ag.jc()},set:function(a){ag.add(a.replace(/\s/g,""))}},version:{get:function(){return Vd}}}),pn.prototype.makeImageData=pn.prototype.Jx,pn.prototype.makeImage=pn.prototype.Wz,pn.prototype.cacheGroupExternalLinks=pn.prototype.Fu,pn.prototype.addRenderer=pn.prototype.bs,pn.prototype.makeSVG=pn.prototype.av,pn.prototype.makeSvg=pn.prototype.Cs,pn.prototype.stopAutoScroll=pn.prototype.ug,pn.prototype.doAutoScroll=pn.prototype.gs,pn.prototype.isUnoccupied=pn.prototype.Yj,pn.prototype.raiseDiagramEvent=pn.prototype.R,pn.prototype.removeDiagramListener=pn.prototype.am,pn.prototype.addDiagramListener=pn.prototype.Bj,pn.prototype.findTreeRoots=pn.prototype.yz,pn.prototype.layoutDiagram=pn.prototype.Uz,pn.prototype.findTopLevelGroups=pn.prototype.qz,pn.prototype.findTopLevelNodesAndLinks=pn.prototype.rz,pn.prototype.ensureBounds=pn.prototype.Va,pn.prototype.findLinksByExample=pn.prototype.ls,pn.prototype.findNodesByExample=pn.prototype.ms,pn.prototype.findLinkForData=pn.prototype.Kc,pn.prototype.findNodeForData=pn.prototype.ii,pn.prototype.findPartForData=pn.prototype.Lc,pn.prototype.findLinkForKey=pn.prototype.findLinkForKey,pn.prototype.findNodeForKey=pn.prototype.Vb,pn.prototype.findPartForKey=pn.prototype.findPartForKey,pn.prototype.rebuildParts=pn.prototype.Wd,pn.prototype.transformViewToDoc=pn.prototype.Ps,pn.prototype.transformRectDocToView=pn.prototype.zA,pn.prototype.transformDocToView=pn.prototype.op,pn.prototype.centerRect=pn.prototype.es,pn.prototype.scrollToRect=pn.prototype.tv,pn.prototype.scroll=pn.prototype.scroll,pn.prototype.highlightCollection=pn.prototype.Jz,pn.prototype.highlight=pn.prototype.Iz,pn.prototype.selectCollection=pn.prototype.rA,pn.prototype.select=pn.prototype.select,pn.prototype.updateAllRelationshipsFromData=pn.prototype.rp,pn.prototype.updateAllTargetBindings=pn.prototype.updateAllTargetBindings,pn.prototype.commit=pn.prototype.commit,pn.prototype.rollbackTransaction=pn.prototype.Kf,pn.prototype.commitTransaction=pn.prototype.eb,pn.prototype.startTransaction=pn.prototype.Ea,pn.prototype.raiseChanged=pn.prototype.g,pn.prototype.raiseChangedEvent=pn.prototype.cb,pn.prototype.removeChangedListener=pn.prototype.ik,pn.prototype.addChangedListener=pn.prototype.Pe,pn.prototype.removeModelChangedListener=pn.prototype.mA,pn.prototype.addModelChangedListener=pn.prototype.Yw,pn.prototype.findLayer=pn.prototype.Qj,pn.prototype.removeLayer=pn.prototype.kA,pn.prototype.addLayerAfter=pn.prototype.Cy,pn.prototype.addLayerBefore=pn.prototype.Ww,pn.prototype.addLayer=pn.prototype.Al,pn.prototype.moveParts=pn.prototype.moveParts,pn.prototype.copyParts=pn.prototype.Kj,pn.prototype.removeParts=pn.prototype.Is,pn.prototype.remove=pn.prototype.remove,pn.prototype.add=pn.prototype.add,pn.prototype.clearDelayedGeometries=pn.prototype.bx,pn.prototype.setProperties=pn.prototype.nm,pn.prototype.attach=pn.prototype.Du,pn.prototype.set=pn.prototype.set,pn.prototype.resetInputOptions=pn.prototype.Sx,pn.prototype.setInputOption=pn.prototype.sA,pn.prototype.getInputOption=pn.prototype.Ql,pn.prototype.resetRenderingHints=pn.prototype.Tx,pn.prototype.setRenderingHint=pn.prototype.Xx,pn.prototype.getRenderingHint=pn.prototype.Gf,pn.prototype.maybeUpdate=pn.prototype.bd,pn.prototype.requestUpdate=pn.prototype.$b,pn.prototype.delayInitialization=pn.prototype.Xy,pn.prototype.isUpdateRequested=pn.prototype.Pz,pn.prototype.invalidateDocumentBounds=pn.prototype.Ya,pn.prototype.findObjectsNear=pn.prototype.og,pn.prototype.findPartsNear=pn.prototype.mz,pn.prototype.findObjectsIn=pn.prototype.Cf,pn.prototype.findPartsIn=pn.prototype.ux,pn.prototype.findObjectsAt=pn.prototype.ji,pn.prototype.findPartsAt=pn.prototype.lz,pn.prototype.findObjectAt=pn.prototype.ic,pn.prototype.findPartAt=pn.prototype.Ol,pn.prototype.focusObject=pn.prototype.zz,pn.prototype.alignDocument=pn.prototype.Jy,pn.prototype.zoomToRect=pn.prototype.BA,pn.prototype.zoomToFit=pn.prototype.zoomToFit,pn.prototype.diagramScroll=pn.prototype.kx,pn.prototype.focus=pn.prototype.focus;var rp=new hi,cm=null,gs=Ct.document!==void 0,Kd=null,ad="",Ka=new an(pn,"None",0),tu=new an(pn,"Uniform",1),ld=new an(pn,"UniformToFill",2),bf=new an(pn,"CycleAll",10),ng=new an(pn,"CycleNotDirected",11),ig=new an(pn,"CycleNotDirectedFast",12),rg=new an(pn,"CycleNotUndirected",13),og=new an(pn,"CycleDestinationTree",14),sg=new an(pn,"CycleSourceTree",15),Th=new an(pn,"DocumentScroll",1),Cf=new an(pn,"InfiniteScroll",2),kh=new an(pn,"TreeParentCollapsed",21),Xs=new an(pn,"AllParentsCollapsed",22),op=new an(pn,"AnyParentsCollapsed",23),ag=new On,Vd="2.3.10",$d="image",_f=null,hm=!1;function Da(){if(gs){var a=Ct.document.createElement("canvas"),y=a.getContext("2d"),x=oi("7ca11abfd022028846");y[x]=oi("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",dn.Dx+"4ae6247590da4bb21c324ba3a84e385776",gr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",rn.za],E=1;5>E;E++)y[oi("7ca11abfd7330390")](oi(b[E-1]),10,15*E);for(y[x]=oi("39f046ebb36e4b"),x=1;5>x;x++)y[oi("7ca11abfd7330390")](oi(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(gr.prototype.Cd=gr.prototype.Eu),_f=a}}pn.className="Diagram",pn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Ct.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof pn?y.H:null},pn.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},pn.useDOM=function(a){gs=a?Ct.document!==void 0:!1},pn.isUsingDOM=function(){return gs},pn.None=Ka,pn.Uniform=tu,pn.UniformToFill=ld,pn.CycleAll=bf,pn.CycleNotDirected=ng,pn.CycleNotDirectedFast=ig,pn.CycleNotUndirected=rg,pn.CycleDestinationTree=og,pn.CycleSourceTree=sg,pn.DocumentScroll=Th,pn.InfiniteScroll=Cf,pn.TreeParentCollapsed=kh,pn.AllParentsCollapsed=Xs,pn.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=Ct[oi("76a715b2f73f148a")][oi("72ba13b5")]||"";if(a.Rc=!0,gs){var b=pn[oi("76a115b6ed251eaf4692")];if(b)for(var E=ag.iterator;E.next()&&(b=E.value,b=oi(b).split(oi("39e9")),!(6>b.length));){var te=oi(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=oi(dn[oi("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var ae=Ct[oi("74a900bae4370f8b51")][oi("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[oi("73a612b6fb191d")](oi("3aad1ab6e022098b4dc4")),te=oi(b[2]),-1<ne&&(ae=ae[oi("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[oi("76ad18b4f73e")],ae=x[oi("73a612b6fb191d")](oi("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[oi("73a612b6fb191d")](te),0>ne&&te!==oi("7da71ca0ad381e90")&&(ne=y[oi("73a612b6fb191d")](oi("76a715b2ef3e149757"))),0>ne&&(ne=y[oi("73a612b6fb191d")](oi("76a715b2ef3e149757"))),0>ne&&(ne=y[oi("73a612b6fb191d")](oi("2bfa41fdb3784bca12"))),0>ne&&(ne=x[oi("73a612b6fb191d")](oi("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[oi("73a612b6fb191d")](oi("35"))||y[oi("73a612b6fb191d")](oi("35"))===-1),!a.Rc||x[oi("73a612b6fb191d")](oi("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[oi("73a612b6fb191d")](te)),!a.Rc)||(ne=Ct[oi("76a715b2f73f148a")][oi("69ad17a1e03e")],ae=ne[oi("73a612b6fb191d")](oi("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[oi("73a612b6fb191d")](te)>ae),!a.Rc)))break;if(te[0]==="#"){ne=Ct.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[oi("79a417a0f0181a8946")]=b,Ct.document[oi("78a712aa")]){Ct.document[oi("78a712aa")][oi("7bb806b6ed32388c4a875b")](ne),fe=Ct.getComputedStyle(ne).getPropertyValue(oi("78a704b7e62456904c9b12701b6532a8"));var Pe=Ct.getComputedStyle(ne).getPropertyValue(oi("75b817b0ea2202"));if(Ct.document[oi("78a712aa")][oi("68ad1bbcf533388c4a875b")](ne),fe){if(ne=Ct[oi("77a902b0eb1b1e804a8a")],Pe==="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(oi("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var Me in ne)if(b===ne[Me].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(Me=x[oi("76ad18b4f73e")],E=x[oi("73a612b6fb191d")](oi("35e7"))+2;E<Me;E++)y+=x[E];x=y[oi("73a612b6fb191d")](oi("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[oi("73a612b6fb191d")](oi("35")))}}}return 0<a.Rc&&a!==a.wy}dm.className="DiagramHelper";function ah(a){this.j=a===void 0?new Tt:a,this.o=new Tt}et.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 Pf="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=$s,this.gridSnapOrigin=new Tt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},pe.className="DraggingOptions";function De(a,y){if(typeof a=="string"||Ct.Element&&a instanceof Element)var x=pn.call(this,a)||this;else x=pn.call(this)||this,y=a;return Oe(x),y&&x.nm(y),x}tt(De,pn);function Oe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Qa,a.layout=new xa}De.prototype.reset=function(){pn.prototype.reset.call(this),Oe(this)},De.className="Palette";function He(a,y){if(typeof a=="string"||Ct.Element&&a instanceof Element)var x=pn.call(this,a)||this;else x=pn.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 Ti;var E=new fr;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 Ei(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new It,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,ae=b.lastInput.documentPoint;te.position=new Tt(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}tt(He,pn),He.prototype.computePixelRatio=function(){return 1},He.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(gu(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),lt(this)}finally{this.ta=a,this.ib=y}}}pn.prototype.redraw.call(this)},He.prototype.gc=function(){if(this.Ka===null&&Ft("No div specified"),this.ta===null&&Ft("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){gu(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?lt(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 lt(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=Ln.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Lc(y,E),Ln.free(E),ya(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 Pe=ae.diagram.grid.part;if(!x&&ae.isTemporary)b&&Pe.layer===ae&&(ae=Pa(ae,E),Pe.gc(E,fe),E.globalAlpha=ae);else{for(var Me=Pa(ae,E),Fe=fe.scale,Ye=Ln.alloc(),nt=ae.Pa.s,ot=nt.length,ft=0;ft<ot;ft++){var Ot=nt[ft];(b||Ot!==Pe)&&ae.Oj(E,Ot,fe,null,Fe,Ye,!1)}Ln.free(Ye),E.globalAlpha=Me}}}}}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 fr&&(b.strokeWidth=a),y.location=new Tt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}He.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Rr;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},He.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},He.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))},et.Object.defineProperties(He.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof He&&Ft("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)}}}),He.className="Overview";function It(){es.call(this),this.j=null}tt(It,es),It.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 Tt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Tt(a.x-this.j.x,a.y-this.j.y)),!0)},It.prototype.doActivate=function(){this.j=null,es.prototype.doActivate.call(this)},It.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},It.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 Tt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Tt(a.x-this.j.x,a.y-this.j.y)}}},It.className="OverviewDraggingTool";function Nt(){Sr(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=Rr,this.hb=!0,this.cg=null,this.ob=200}Nt.prototype.toString=function(){return"CommandHandler"},Nt.prototype.Xe=function(a){this.H=a},Nt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=lr?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()},Nt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Nt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Ho&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Nt.prototype.canStopCommand=function(){return!0},Nt.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=""}},Nt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Nt.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 In,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=""}},Nt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Nt.prototype.copySelection=function(){var a=this.diagram,y=new In;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)},Nt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Nt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Nt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Nt.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 On,x.addAll(te),Kd=x,ad=y.model.dataFormat}}y.R("ClipboardChanged",x)},Nt.prototype.pasteFromClipboard=function(){var a=new In,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},Nt.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 Tt(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=""}},Nt.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)},Nt.prototype.undo=function(){this.diagram.undoManager.undo()},Nt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Nt.prototype.redo=function(){this.diagram.undoManager.redo()},Nt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Nt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ka&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Nt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ka?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Nt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ka&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Nt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ka?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Nt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Nt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Nt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Yo(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=Rr):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),ys(y)},Nt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Nt.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;Yo(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Yt(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 ii&&fe.isTreeExpanded&&(!(fe instanceof rr)||fe.isSubGraphExpanded);)fe=E.pop();0<E.length?(fe instanceof Ti&&y.tv(fe.actualBounds),fe instanceof ii&&!fe.isTreeExpanded&&(fe.isTreeExpanded=!0),fe instanceof rr&&!fe.isSubGraphExpanded&&(fe.isSubGraphExpanded=!0)):(fe instanceof Ti&&y.es(fe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){zn(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 Yt(a,y,x){if(y.isVisible())return x;if(y instanceof Xr)Yt(a,y.adornedPart,x);else if(y instanceof Yn){var b=y.fromNode;b!==null&&Yt(a,b,x),y=y.toNode,y!==null&&Yt(a,y,x)}else y instanceof ii&&(b=y.labeledLink,b!==null&&Yt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Yt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Yt(a,y,x));return x}Nt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ti)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Nt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Yo(y.animationManager,"Collapse Tree");var x=new On;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 ii&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Nt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ii&&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 ii&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Nt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Yo(y.animationManager,"Expand Tree");var x=new On;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 ii&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Nt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ii)||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 ii&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Nt.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 On,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var ae=new On,fe=E.iterator;fe.next();){var Pe=fe.value;te=!1;for(var Me=E.iterator;Me.next();)if(Pe.Td(Me.value)){te=!0;break}te||ae.add(Pe)}if(0<ae.count){var Fe=ae.first().containingGroup;if(Fe!==null)for(;Fe!==null;){E=!1;for(var Ye=ae.iterator;Ye.next();)if(!Ye.value.Td(Fe)){E=!0;break}if(E)Fe=Fe.containingGroup;else break}if(x instanceof rr)Ru(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var nt=y.copyNodeData(x);Gt(nt)&&(y.xf(nt),b=a.ii(nt))}if(b!==null){Fe!==null&&this.isValidMember(Fe,b)&&(b.containingGroup=Fe);for(var ot=ae.iterator;ot.next();){var ft=ot.value;this.isValidMember(b,ft)&&(ft.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Nt.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 En(a){var y=Gn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Yn||y.push(x)}a=new In,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 Jn(y),a}Nt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Yn)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},Nt.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 On;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof rr&&te.canUngroup()&&b.add(te)}var ne=new On;if(0<b.count){y.clearSelection(!0);for(var ae=b.iterator;ae.next();){var fe=ae.value;fe.expandSubGraph();var Pe=fe.containingGroup,Me=Pe!==null&&Pe.data!==null?x.wa(Pe.data):void 0;ne.addAll(fe.memberParts);for(var Fe=ne.iterator;Fe.next();){var Ye=Fe.value;if(Ye.isSelected=!0,!(Ye instanceof Yn)){var nt=Ye.data;nt!==null?x.mp(nt,Me):Ye.containingGroup=Pe}}y.remove(fe)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Nt.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 rr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof rr&&y.canUngroup())return!0;return!1},Nt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=En(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Nt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Yo(y.animationManager,"Collapse SubGraph");var x=new On;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 rr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Nt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof rr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof rr&&y.isSubGraphExpanded)return!0;return!1},Nt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Yo(y.animationManager,"Expand SubGraph");var x=new On;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 rr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Nt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof rr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof rr&&!y.isSubGraphExpanded)return!0;return!1},Nt.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 ko&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Nt.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 ko))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 ko&&x.editable}),a!==null))return!0;return!1},Nt.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 en?E=a.ga(Fr):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Tt(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,mr(x,!1,a)}},Nt.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)},Nt.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 hi,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 Yn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},et.Object.defineProperties(Nt.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||Ft("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}}}),Nt.className="CommandHandler",oh=function(){return new Nt};function en(){Sr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Tt(NaN,NaN).freeze(),this.jd=Ls,this.Ab=new gr,this.wh=new gr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ba,this.uc=new Ln(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Ln(NaN,NaN,NaN,NaN).freeze(),this.dc=new Ln(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=so,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,vi,Pi,ji,sr,Br,br,Ur,bo;en.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=Bn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},en.prototype.Vw=function(a){var y=this.Dh;if(sn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},en.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},en.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},en.prototype.copy=function(){return this.clone()},st=en.prototype,st.qb=function(a){a.classType===Yn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Ft("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===en&&(this.stretch=a)},st.toString=function(){return Dn(this.constructor)+"#"+Pr(this)},st.th=function(){this.A!==null&&(this.A.nc=!0)};function yr(a){a.A===null?a.A=new Lf:a.A.nc&&(a.A=a.A.copy())}st.Xc=function(){if(this.ba===null){var a=new lg;a.Xi=fs,a.yj=fs,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},st.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&&Ea(this)&&Fo(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 hi),ne=te.undoManager.transactionLevel===0,a.startCondition===va?ne=!0:a.startCondition===js&&(ne=!1),ne?(te=new ds,os(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()):(Yo(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 Fo(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))}}st.ks=function(a){return this.bindingId===a?this:null},st.g=function(a,y,x){this.cb(Vo,a,this,y,x)},st.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 gr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function la(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}st.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Qr(a.x,a.y,0,0,0,b.height)<=y||Qr(a.x,a.y,0,b.height,b.width,b.height)<=y||Qr(a.x,a.y,b.width,b.height,b.width,0)<=y||Qr(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},st.se=function(){return!0},st.ca=function(a){var y=Tt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Tt.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=Er(x.x-ne*fe,x.y-ne*fe,x.width+te*fe,x.height+te*fe,y.x,y.y),Tt.free(y),a}return E=!1,(this instanceof Xr||this instanceof fr?Er(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)),Tt.free(y),E},st.gh=function(a){var y=this.naturalBounds;return Er(0,0,y.width,y.height,a.x,a.y)},st.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Ln.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=Tt.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)))),Tt.free(E),Ln.free(y),b},st.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Tt.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)))),Tt.free(E),b},st.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Tt.allocAt(0,0),E=Tt.allocAt(0,x.height),te=Tt.allocAt(x.width,x.height),ne=Tt.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=Ln.allocAt(0,0,x.width,x.height);var fe=Tt.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)))),Tt.free(fe),Ln.free(x),!ae&&(rn.us(a,b,E)||rn.us(a,E,te)||rn.us(a,te,ne)||rn.us(a,ne,b))&&(ae=!0)}return Tt.free(b),Tt.free(E),Tt.free(te),Tt.free(ne),ae},st.ga=function(a,y){if(y===void 0&&(y=new Tt),a instanceof yi){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},st.mi=function(a){a===void 0&&(a=new Ln);var y=this.naturalBounds,x=this.oe,b=Tt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),ho(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),ho(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),ho(a,b.x,b.y,0,0),Tt.free(b),a},st.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},st.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},st.qs=function(a,y){return y===void 0&&(y=new Tt),y.assign(a),this.oe.Cd(y),y},st.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},st.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,Pe=-te.m21*ne,Me=te.m11*ne,Fe=ne*(te.m21*te.dy-te.m22*te.dx),Ye=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,rn.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*ae+y*Pe+Fe,a=a*fe+y*Me+Ye,y=x*ae+b*Pe+Fe,x=x*fe+b*Me+Ye,E.h(0,0),b=this.naturalBounds,x=rn.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},en.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(ml(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 Pi:isFinite(a)&&a>x&&(E=a),ne=0,ae&&(y=1/0);break;case ji: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()||Ft("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Js(this,!1)}},en.prototype.Wl=function(){},en.prototype.Dd=function(){return!1},en.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=Ln.alloc();te.assign(this.Ib),this.Ib.ka(),tl(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 ko&&(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()||Ft("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),Hc(this,!1),Ln.free(te)},st=en.prototype,st.eh=function(){};function Va(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=ml(a,!0),x===b&&te===E&&(y=Fn),y){case Fn:(x>b||te>E)&&(Js(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Un:Js(a,!0),a.measure(b,E,0,0);break;case Pi:Js(a,!0),a.measure(b,te,0,0);break;case ji:Js(a,!0),a.measure(x,E,0,0)}}}st.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(),vs(a,y)||(x.oh(),this.Pn(x)))},st.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof ii&&W1(a,this))},st.gc=function(a,y){if(!mu(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,Pe=this.areaBackground,Me=this.Ma;Pe===null&&Me===null||a.yc(),Pe!==null&&(xs(this,a,Pe,!0,!0,fe,ae),Pe instanceof mo&&Pe.type===Su?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(Pe)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),Me!==null&&(xs(this,a,Me,!0,!1,fe,ae),Me instanceof mo&&Me.type===Su?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(Me)):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&&Sa(this),Pe=this.part,fe=!1;var Fe=0;Pe&&y.Gf("drawShadows")&&(fe=Pe.isShadowed)&&(Me=Pe.shadowOffset,Fe=Math.max(Me.y,Me.x)*y.scale*y.Mb),Me=this.Dd();var Ye;if(!(Ye=y.$i||!Me)){var nt=this.naturalBounds;Ye=this.wh;var ot=Ye.m11,ft=Ye.m21,Ot=Ye.dx,Mt=Ye.m12,Ht=Ye.m22,Wt=Ye.dy,Kt,Qt=Kt=0;Ye=Kt*ot+Qt*ft+Ot;var gn=Kt*Mt+Qt*Ht+Wt;Kt=nt.width+Fe,Qt=0;var ni=Kt*ot+Qt*ft+Ot;Kt=Kt*Mt+Qt*Ht+Wt,Qt=Math.min(Ye,ni);var fi=Math.min(gn,Kt),ui=Math.max(Ye+0,ni)-Qt,$n=Math.max(gn+0,Kt)-fi;Ye=Qt,gn=fi,Kt=nt.width+Fe,Qt=nt.height+Fe,ni=Kt*ot+Qt*ft+Ot,Kt=Kt*Mt+Qt*Ht+Wt,Qt=Math.min(Ye,ni),fi=Math.min(gn,Kt),ui=Math.max(Ye+ui,ni)-Qt,$n=Math.max(gn+$n,Kt)-fi,Ye=Qt,gn=fi,Kt=0,Qt=nt.height+Fe,ni=Kt*ot+Qt*ft+Ot,Kt=Kt*Mt+Qt*Ht+Wt,Qt=Math.min(Ye,ni),fi=Math.min(gn,Kt),ui=Math.max(Ye+ui,ni)-Qt,$n=Math.max(gn+$n,Kt)-fi,Ye=Qt,gn=fi,Fe=y.viewportBounds,nt=Fe.x,ot=Fe.y,Ye=!(Ye>Fe.width+nt||nt>ui+Ye||gn>Fe.height+ot||ot>$n+gn)}if(Ye){if(Ye=(this.l&256)!==0,a.clipInsteadOfFill&&(Ye=!1),this instanceof ko&&(a.font=this.font),Ye){if(gn=ae.se()?ae.naturalBounds:ae.actualBounds,ui=Math.max(ne.x,gn.x),$n=Math.max(ne.y,gn.y),Fe=Math.min(ne.right,gn.right)-ui,nt=Math.min(ne.bottom,gn.bottom)-$n,ot=this.tb,ot!==null&&(ui=ot.x,$n=ot.y,Fe=ot.width,nt=ot.height),ui>ne.width+ne.x||ne.x>gn.width+gn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(ui,$n,Fe,nt),a.clip()}if(Me){if(!Pe.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}fe&&(gn=Pe.shadowOffset,a.Ev(gn.x*y.scale*this.scale*y.Mb,gn.y*y.scale*this.scale*y.Mb,Pe.shadowBlur),lh(a),a.shadowColor=Pe.shadowColor)}fe&&this.shadowVisible===!0?lh(a):fe&&this.shadowVisible===!1&&Uc(a),Pe=this.naturalBounds,this.areaBackground!==null&&(a.yc(),nu(this,a,Pe,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),fe&&ga(this,ae)&&this.shadowVisible===null&&Uc(a),this.Ma!==null&&(a.yc(),Ml(this,a,Pe,ne)),fe&&(this.Ma!==null||this.areaBackground!==null||ga(this,ae))?(Vu(this,!0),this.shadowVisible===null&&Uc(a)):Vu(this,!1),this.hh(a,y),fe&&this.l&512&&lh(a),Me&&fe&&Uc(a),Ye&&(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 ga(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)}st.Dv=function(){};function nu(a,y,x,b){xs(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof mo&&a.areaBackground.type===Su?(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;xs(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof mo&&a.Ma.type===Su?(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 Ra(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 mu(a,y,x){if(!(y instanceof zl))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&&Ra(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 ko&&(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&&Sa(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 Pe=ne.copy().Vj();y.rb.ha=[Pe.m11,Pe.m12,Pe.m21,Pe.m22,Pe.dx,Pe.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&&ga(a,E)&&a.shadowVisible===null&&Uc(y),y.Il&&(Pe=x.computePixelRatio(),Pe="drop-shadow("+y.shadowOffsetX/Pe+"px "+y.shadowOffsetY/Pe+"px "+y.shadowBlur/Pe/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",Pe),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",Pe)),ae&&(a.Ma!==null||a.areaBackground!==null||ga(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,Pe=a.svg,!te&&Pe!==null&&ae!==Pe&&Pe.parentNode===a.panel.svg?(a.svg.replaceWith(ae),a.svg=ae,ae!==null&&a.$o(y,b,fe,ae),gl(y,Pe),!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&&Ra(a,b,ae),ne!==null&&ne(a,ae)),!0)}st.$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"+Do++,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"),gl(a,b)};function gl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Ba(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Mr(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()}}st.hh=function(){},st.lv=function(){this.Uc=!0},st.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 yl){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 fr){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},st.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 xs(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 Pe=a.kq();if(ae=te.width,fe=te.height,E?(ae=ne.width,fe=ne.height):b||(ae+=Pe,fe+=Pe),(te=y instanceof Qd)&&x.xe&&(x.type===dp||x.yk===ae&&x.ft===fe))var Me=x.xe;else{var Fe=0,Ye=0,nt=0,ot=0,ft=0,Ot=0;if(Ot=ft=0,E?(ft=ne.x,Ot=ne.y):b||(ft-=Pe/2,Ot-=Pe/2),Fe=x.start.x*ae+x.start.offsetX,Ye=x.start.y*fe+x.start.offsetY,nt=x.end.x*ae+x.end.offsetX,ot=x.end.y*fe+x.end.offsetY,Fe+=ft,nt+=ft,Ye+=Ot,ot+=Ot,x.type===ch)Me=y.createLinearGradient(Fe,Ye,nt,ot);else if(x.type===Su)Ot=isNaN(x.endRadius)?Math.max(ae,fe)/2:x.endRadius,isNaN(x.startRadius)?(ft=0,Ot=Math.max(ae,fe)/2):ft=x.startRadius,Me=y.createRadialGradient(Fe,Ye,ft,nt,ot,Ot);else if(x.type===dp)try{Me=y.createPattern(x.pattern,"repeat")}catch(Ht){Me=null}if(x.type!==dp&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)Me.addColorStop(E.key,E.value);if(te&&(x.xe=Me,Me!==null&&(x.yk=ae,x.ft=fe),Me===null&&x.type===dp&&x.yk!==-1)){x.yk=-1;var Mt=a.diagram;Mt!==null&&x.yk===-1&&zn(function(){Mt.redraw()},600)}}b?y.fillStyle=Me:y.strokeStyle=Me}}}st.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},st.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},st.If=function(){for(var a=this instanceof Wn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Sa(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),vu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,vu(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,vu(a,!1)))}st.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Tt.alloc();te.yi(y,x,b,E,Fr),a.rotate(this.Kb,te.x,te.y),Tt.free(te)}},st.v=function(a){if(!iu(this)){a===void 0&&(a=!1),Js(this,!0),Hc(this,!0);var y=this.panel;y===null||a||y.v()}},st.Uj=function(){iu(this)||(Js(this,!0),Hc(this,!0))};function el(a){if(!tl(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof ii&&a.Bd(),y.$b())),Hc(a,!0)}}st.Uk=function(){!(this.l&2048)&&(Iu(this,!0),vu(this,!0))},st.Wu=function(){vu(this,!0)},st.N=function(){var a=this.part;a!==null&&a.N()};function ml(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?ma(a,Un,y):x===sr?b!==null?b.type===Wn.Spot&&b.Pb()===a?ma(a,Un,y):(x=b.defaultStretch,x===sr?ma(a,Fn,y):ma(a,x,y)):ma(a,Fn,y):ma(a,x,y)}function lc(a,y,x,b){var E=a.stretch;if(E!==sr)return ma(a,E,b);var te=E=null;switch(y.stretch){case ji:te=!0;break;case Un:te=!0}switch(x.stretch){case Pi:E=!0;break;case Un:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===Pi||y===Un),te===null&&(te=y===ji||y===Un),E===!0&&te===!0?ma(a,Un,b):E===!0?ma(a,Pi,b):te===!0?ma(a,ji,b):ma(a,Fn,b)}function ma(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===Pi)return Fn;if(y===Un)return ji}else{if(y===ji)return Fn;if(y===Un)return Pi}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===ji)return Fn;if(y===Un)return Pi}else{if(y===Pi)return Fn;if(y===Un)return ji}return y}function Vu(a,y){a.l=y?a.l|512:a.l&-513}function Ea(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 vu(a,y){a.l=y?a.l|4096:a.l&-4097}function iu(a){return(a.l&8192)!==0}function Js(a,y){a.l=y?a.l|8192:a.l&-8193}function tl(a){return(a.l&16384)!==0}function Hc(a,y){a.l=y?a.l|16384:a.l&-16385}st.Gj=function(){this.svg=null},st.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},st.Av=function(){},st.zv=function(a){return this.pa=a,el(this),!0},st.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},st.kq=function(){return 0};function Xd(a){var y=a.part;if(y instanceof ii&&(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 ii?a.Bd():a.qm(a,function(x){Xd(x)}):Xd(a))}st.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new zs(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&Ft("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new On),this.localBindings.add(E),this},st.set=function(a){return Object.assign(this,a),this},st.Du=function(a){return iv(this,a),this},st.apply=function(a){return a(this),this},st.nm=function(a){return pu(this,a),this},st.pz=function(){return this.ih()},st.ih=function(){for(var a=this instanceof Wn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},st.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new hi),this.animationTriggers.add(a.propertyName,a),this};function yu(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=Bn(arguments),b=te(x),Gt(b)||Ft('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Ct.go[a]}if(b===null&&(E!=null&&E.constructor||Ft("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 pn&&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?Ft("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 ko)a.text=y;else if(a instanceof fr)a.figure=y;else if(a instanceof yl)a.source=y;else if(a instanceof Wn)y=$u.I(y),y!==null&&(a.type=y);else if(a instanceof mo){var x=si(mo,y);x!==null?a.type=x:Ft("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Qn?(y=si(Qn,y),y!==null&&(a.type=y)):a instanceof Wr&&(y=si(Wr,y),y!==null&&(a.type=y));else if(y instanceof en)a instanceof Wn||Ft("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Qs){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 Qs?Am(b,y):Ft("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof an)typeof a.qb=="function"&&a.qb(y);else if(y instanceof oa)a.type=y;else if(y instanceof zs)a instanceof en||a instanceof Qs?a.bind(y):Ft("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof jl)a instanceof en?a.Jv(y):Ft("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Zs)a instanceof Qn&&a.type===Qn.o?a.figures.add(y):Ft("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Wr)a instanceof Zs?a.segments.add(y):Ft("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Qo)a instanceof pn||a instanceof rr?a.layout=y:Ft("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 mo){x=new pi;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);pu(a,x)}else if(a instanceof Qs){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Ft("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)&&Ft("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new pi;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);pu(a,E)}else pu(a,y);else Ft('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}et.Object.defineProperties(en.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&&(yr(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&&(yr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:rl},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===rl&&(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:xr},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:sr},set:function(a){var y=this.stretch;y!==a&&(yr(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&&(yr(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)&&bn(a,"0 <= value <= 1",en,"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 mo&&a.freeze(),yr(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 mo&&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 Ti)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 Tt(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&&Ft("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 fr&&this.qc(),this.g("desiredSize",b,a),Ea(this)&&(a=this.part,a!==null&&(Fo(this,a,"width"),Fo(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 fr&&this.qc(),this.g("desiredSize",y,a),Ea(this)&&(a=this.part,a!==null&&Fo(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 fr&&this.qc(),this.g("desiredSize",y,a),Ea(this)&&(a=this.part,a!==null&&Fo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:qr},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(),yr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:ms},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(),yr(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 Ei(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&&Sa(this),this.Ab}},oe:{get:function(){return this.l&4096&&Sa(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(yr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Fn},set:function(a){this.reshapingBehavior!==a&&(yr(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()&&Ft("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),el(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&&bn(a,">= 0",en,"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&&bn(a,">= 1",en,"columnSpan"),yr(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&&bn(a,">= 0",en,"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&&bn(a,">= 1",en,"rowSpan"),yr(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&&(yr(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 ii||Ft("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:fs},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&&bn(a,">= 0",en,"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&&bn(a,">= 0",en,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:fs},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&&bn(a,">= 0",en,"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&&bn(a,">= 0",en,"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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(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&&(yr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),en.prototype.trigger=en.prototype.Jv,en.prototype.findBindingPanel=en.prototype.ih,en.prototype.findTemplateBinder=en.prototype.pz,en.prototype.setProperties=en.prototype.nm,en.prototype.apply=en.prototype.apply,en.prototype.attach=en.prototype.Du,en.prototype.set=en.prototype.set,en.prototype.isEnabledObject=en.prototype.If,en.prototype.isVisibleObject=en.prototype.Ed,en.prototype.isContainedBy=en.prototype.rg,en.prototype.getNearestIntersectionPoint=en.prototype.rs,en.prototype.getLocalPoint=en.prototype.qs,en.prototype.getDocumentScale=en.prototype.Df,en.prototype.getDocumentAngle=en.prototype.li,en.prototype.getDocumentBounds=en.prototype.mi,en.prototype.getDocumentPoint=en.prototype.ga,en.prototype.intersectsRect=en.prototype.Yc,en.prototype.containedInRect=en.prototype.fh,en.prototype.containsRect=en.prototype.Re,en.prototype.containsPoint=en.prototype.ca,en.prototype.raiseChanged=en.prototype.g,en.prototype.raiseChangedEvent=en.prototype.cb,en.prototype.addCopyProperty=en.prototype.Vw;var sp=null;en.className="GraphObject",sp=new hi,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=yu(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"},yu(fr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new yi(0,0,2.76142374915397,2.761423749153969),spot2:new yi(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 fr)){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 fr&&(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 fr){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 fr){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 fr){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 fr))){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=yu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},yu(fr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Eo},new zs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new zs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Xr&&(x=x.adornedPart),x instanceof ii){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=yu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},yu(fr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Eo},new zs("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 Xr&&(x=x.adornedPart),x instanceof rr){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 yu(Xr,Wn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Tt(0,3),shadowBlur:5},yu(fr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new yi(0,0,4,6),spot2:new yi(1,1,-4,-4)}))}),Ah("ContextMenu",function(){return yu(Xr,Wn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Tt(0,3),shadowBlur:5},new zs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Ah("ContextMenuButton",function(){var a=yu("Button");a.stretch=Pi;var y=a.fb("ButtonBorder");return y instanceof fr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new yi(0,0,2,3),y.spot2=new yi(1,1,-2,-2)),a}),Ah("PanelExpanderButton",function(a){var y=fm(a,"COLLAPSIBLE"),x=yu("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},yu(fr,{name:"ButtonIcon",strokeWidth:2},new zs("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof fr&&(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=yu("Button",{desiredSize:new Xn(14,14)},yu(fr,{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:vi,visible:!1},y!==""?new zs("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=yu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Ei(0,1,0,0)});var y=yu(Wn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ei(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}),en.None=Fn=new an(en,"None",0),en.Default=sr=new an(en,"Default",0),en.Vertical=ji=new an(en,"Vertical",4),en.Horizontal=Pi=new an(en,"Horizontal",5),en.Fill=Un=new an(en,"Fill",3),en.Uniform=vi=new an(en,"Uniform",1),en.UniformToFill=Br=new an(en,"UniformToFill",2),en.FlipVertical=br=new an(en,"FlipVertical",1),en.FlipHorizontal=Ur=new an(en,"FlipHorizontal",2),en.FlipBoth=bo=new an(en,"FlipBoth",3),en.make=yu,en.getBuilders=function(){var a=new hi,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},en.defineBuilder=Ah,en.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 en))return y&&b.set(y),b;Ft('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},en.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=qr,this.o=ms,this.hg=sr,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=xr,this.rr=rl,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=so,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?Ct.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 zl(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),Gt(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},et.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 zl(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=Do++,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+")")}st=zl.prototype,st.arc=function(a,y,x,b,E,te,ne,ae){var fe=2*Math.PI,Pe=fe-1e-6,Me=x*Math.cos(b),Fe=x*Math.sin(b),Ye=a+Me,nt=y+Fe,ot=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-Ye)||1e-6<Math.abs(ae-nt))&&this.path.push(["L",Ye,+nt]),0>b&&(b=b%fe+fe),b>Pe?(this.path.push(["A",x,x,0,1,ot,a-Me,y-Fe]),this.path.push(["A",x,x,0,1,ot,Ye,nt])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),ot,a+x*Math.cos(E),y+x*Math.sin(E)])},st.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},st.Se=function(a){this.addPath(this.path,this.rb,a||0)},st.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},st.clearRect=function(){},st.clip=function(){this.Yl.clipPath=!0},st.closePath=function(){this.path.push(["z"])},st.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},st.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"+Do++,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+")"},st.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)}st.drawImage=function(a,y,x,b,E,te,ne,ae,fe){var Pe="";a instanceof HTMLCanvasElement&&(Pe=a.toDataURL()),a instanceof HTMLImageElement&&(Pe=a.getAttribute("src"));var Me=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,ae=b=Me,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:Me||b,height:a||E,href:Pe},rn.$(b,ae)&&rn.$(E,fe)?Pe.toLowerCase().indexOf(".svg")===-1&&Pe.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==Me||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)},st.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(this,this.Yl)},st.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},st.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)},st.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))},st.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])},st.lineTo=function(a,y){this.path.push(["L",a,y])},st.moveTo=function(a,y){this.path.push(["M",a,y])},st.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},st.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"])},st.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},st.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())},st.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]+")"}st.scale=function(a,y){this.rb.scale(a,y)},st.translate=function(a,y){this.rb.translate(a,y)},st.transform=function(){},st.yc=function(){},st.stroke=function(){qy(this,this.Yl)},st.jk=function(){this.clipInsteadOfFill||this.stroke()},st.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},st.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"+Do++,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(Pe,Me){return Pe.offset>Me.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}st.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=Bn(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}st.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}st.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},st.fs=function(){this.Ct=!1},st.Vc=function(){},st.Wx=function(){},zl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},zl.prototype.getImageData=function(){return null},zl.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()))}zl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},zl.className="SVGContext",pn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Tc(this,Ct.document));var y=new Tc(this,Ct.document,!0);a===void 0&&(a=new pi);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)},pn.prototype.makeSvg=pn.prototype.Cs,pn.prototype.av=function(a){return this.Cs(a)},pn.prototype.makeSVG=pn.prototype.av;function Du(a,y,x,b){this.ownerDocument=y=y===void 0?Ct.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},et.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&&Ft("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 gr,this.isTemporary=!!x}st=Qd.prototype,st.Wx=function(a){this.Z.imageSmoothingEnabled=a},st.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},st.beginPath=function(){this.Z.beginPath()},st.Se=function(){},st.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},st.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},st.clip=function(){this.Z.clip()},st.closePath=function(){this.Z.closePath()},st.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},st.createPattern=function(a,y){return this.Z.createPattern(a,y)},st.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},st.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)},st.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},st.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},st.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},st.fillText=function(a,y,x){this.Z.fillText(a,y,x)},st.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},st.lineTo=function(a,y){this.Z.lineTo(a,y)},st.measureText=function(a){return this.Z.measureText(a)},st.moveTo=function(a,y){this.Z.moveTo(a,y)},st.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},st.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},st.restore=function(){this.Z.restore()},st.save=function(){this.yc(),this.Z.save()},Qd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},st=Qd.prototype,st.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},st.scale=function(a,y){this.El.scale(a,y)},st.translate=function(a,y){this.El.translate(a,y)},st.stroke=function(){this.Z.stroke()},st.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}},st.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},st.ng=function(a,y){if(a instanceof mo&&a.type===Su){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)},st.jk=function(){this.Hm||this.stroke()},st.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},st.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},st.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},st.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},st.Hs=function(){},et.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 mo(a,y){hp||(hv(),hp=!0),Sr(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=Ha):this.Lk=a===Su?this.Qd=Fr:this.Qd=fs,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}mo.prototype.copy=function(){var a=new mo;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},st=mo.prototype,st.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},st.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},st.qb=function(a){a.classType===mo&&(this.type=a)},st.toString=function(){var a="Brush(";if(this.type===Nh)a+=this.color;else if(a=this.type===ch?a+"Linear ":this.type===Su?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+")"},st.addColorStop=function(a,y){return this._isFrozen&&$t(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&bn(a,"0 <= loc <= 1",mo,"addColorStop:loc"),this.we===null&&(this.we=new hi),this.we.add(a,y),this.na===Nh&&(this.type=ch),this.xe=null,this},st.Vz=function(a,y){if(this._isFrozen&&$t(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===Su)&&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)}st.Wy=function(a,y){if(this._isFrozen&&$t(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===Su)&&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=Oo.j;var b=Oo.u,E=Oo.o,te=Oo.F;return uh(y),x===void 0&&(x=.5),"rgba("+Math.round((Oo.j-a)*x+a)+", "+Math.round((Oo.u-b)*x+b)+", "+Math.round((Oo.o-E)*x+E)+", "+Math.round((Oo.F-te)*x+te)+")"}st.Gx=function(){if(this.type===Nh)return lp(this.color);if((this.type===ch||this.type===Su)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Su)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 mo?a.Gx():(uh(a),128>(299*Oo.j+587*Oo.u+114*Oo.o)/1e3):!1}function up(a,y){switch(y){case fp:y=100*lv(Oo.j);var x=100*lv(Oo.u),b=100*lv(Oo.o);return nl.j=.4124564*y+.3575761*x+.1804375*b,nl.u=.2126729*y+.7151522*x+.072175*b,nl.o=.0193339*y+.119192*x+.9503041*b,nl.F=Oo.F,y=cv(nl.j/cp[0]),x=cv(nl.u/cp[1]),b=cv(nl.o/cp[2]),Gc.j=116*x-16,Gc.u=500*(y-x),Gc.o=200*(x-b),Gc.F=nl.F,Gc.j=Math.min(100,Math.max(0,Gc.j+100*a)),a=(Gc.j+16)/116,y=a-Gc.o/200,nl.j=cp[0]*n1(Gc.u/500+a),nl.u=cp[1]*(Gc.j>mm*dv?Math.pow(a,3):Gc.j/mm),nl.o=cp[2]*n1(y),nl.F=Gc.F,a=-.969266*nl.j+1.8760108*nl.u+.041556*nl.o,y=.0556434*nl.j+-.2040259*nl.u+1.0572252*nl.o,Oo.j=255*uv((3.2404542*nl.j+-1.5371385*nl.u+-.4985314*nl.o)/100),Oo.u=255*uv(a/100),Oo.o=255*uv(y/100),Oo.F=nl.F,Oo.j=Math.round(Oo.j),255<Oo.j?Oo.j=255:0>Oo.j&&(Oo.j=0),Oo.u=Math.round(Oo.u),255<Oo.u?Oo.u=255:0>Oo.u&&(Oo.u=0),Oo.o=Math.round(Oo.o),255<Oo.o?Oo.o=255:0>Oo.o&&(Oo.o=0),"rgba("+Oo.j+", "+Oo.u+", "+Oo.o+", "+Oo.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:Ft("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,Oo.j=a[0],Oo.u=a[1],Oo.o=a[2],Oo.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Oo.j=0,Oo.u=0,Oo.o=0,Oo.F=1)}}function av(){var a=Oo.j/255,y=Oo.u/255,x=Oo.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=Oo.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 mo||Ft("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){fv=gs?new Du(null,void 0,{willReadFrequently:!0}).context:null}et.Object.defineProperties(mo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&$t(this,a),this.na=a,this.start.Mc()&&(a===ch?this.start=Qa:a===Su&&(this.start=Fr)),this.end.Mc()&&(a===ch?this.end=Ha:a===Su&&(this.end=Fr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&$t(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&$t(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&$t(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&$t(this,a),0>a&&bn(a,">= zero",mo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&$t(this,a),0>a&&bn(a,">= zero",mo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&$t(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&$t(this,a),this.cr=a,this.xe=null}}}),mo.prototype.isDark=mo.prototype.Gx,mo.prototype.darkenBy=mo.prototype.Wy,mo.prototype.lightenBy=mo.prototype.Vz,mo.prototype.addColorStop=mo.prototype.addColorStop;var dv=216/24389,mm=24389/27,cp=[95.047,100,108.883],fv=null,Oo=new cg,ru=new cg,nl=new cg,Gc=new cg,hp=!1;mo.className="Brush";var Nh;mo.Solid=Nh=new an(mo,"Solid",0);var ch;mo.Linear=ch=new an(mo,"Linear",1);var Su;mo.Radial=Su=new an(mo,"Radial",2);var dp;mo.Pattern=dp=new an(mo,"Pattern",4);var fp;mo.Lab=fp=new an(mo,"Lab",5);var i1;mo.HSL=i1=new an(mo,"HSL",6),mo.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},mo.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)},mo.lighten=function(a){return e1(a)},mo.lightenBy=e1,mo.darken=function(a){return t1(a)},mo.darkenBy=t1,mo.mix=sv,mo.isDark=lp;function oa(){this.xa="Base"}oa.prototype.measure=function(){},oa.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},oa.prototype.arrange=function(){},oa.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},oa.prototype.iA=function(a){a.Uj()},oa.prototype.gc=function(){},et.Object.defineProperties(oa.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Wn}}}),oa.prototype.remeasureObject=oa.prototype.iA,oa.prototype.arrangeElement=oa.prototype.Ly,oa.prototype.measureElement=oa.prototype.Yz,oa.className="PanelLayout";function vm(){this.xa="Base"}tt(vm,oa),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 Pe=b[fe];if(Pe.visible||Pe===a){var Me=Pe.margin,Fe=Me.right+Me.left;Me=Me.top+Me.bottom,Pe.measure(y,x,te,ne);var Ye=Pe.measuredBounds;Fe=Math.max(Ye.width+Fe,0),Me=Math.max(Ye.height+Me,0),Ye=Pe.position.x;var nt=Pe.position.y;isFinite(Ye)||(Ye=0),isFinite(nt)||(nt=0),Pe instanceof fr&&Pe.isGeometryPositioned&&(Pe=Pe.strokeWidth/2,Ye-=Pe,nt-=Pe),ho(E,Ye,nt,Fe,Me)}}},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,Pe=te.position.y;if(fe=isNaN(fe)?-a:fe-a,Pe=isNaN(Pe)?-x:Pe-x,te instanceof fr&&te.isGeometryPositioned){var Me=te.strokeWidth/2;fe-=Me,Pe-=Me}te.visible&&te.arrange(fe+ae.left,Pe+ae.top,ne.width,ne.height)}};function ym(){this.xa="Base"}tt(ym,oa),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 Pe=b[fe];if(Pe.visible||Pe===te){var Me=ml(Pe,!1);if(Me!==Fn&&Me!==Pi)y.push(Pe);else{Pe.measure(1/0,x,0,ne),Me=Pe.margin,Pe=Pe.measuredBounds;var Fe=Math.max(Pe.height+Me.top+Me.bottom,0);E.width+=Math.max(Pe.width+Me.right+Me.left,0),E.height=Math.max(E.height,Fe)}}}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)&&(Me=fe.margin,ae=Me.right+Me.left,Me=Me.top+Me.bottom,fe.measure(1/0,x,0,ne),fe=fe.measuredBounds,Me=Math.max(fe.height+Me,0),E.width+=Math.max(fe.width+ae,0),E.height=Math.max(E.height,Me));Jn(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 Pe=te,Me=y[fe];if(Me.visible){var Fe=Me.measuredBounds,Ye=Me.margin,nt=Ye.top+Ye.bottom,ot=te+E.bottom,ft=Fe.height,Ot=ml(Me,!1);(isNaN(Me.desiredSize.height)&&Ot===Un||Ot===ji)&&(ft=Math.max(x.height-nt-ot,0)),nt=ft+nt+ot,ot=Me.alignment,ot.Xb()&&(ot=a.defaultAlignment),ot.sb()||(ot=Fr),ne&&(ae-=Fe.width+Ye.left+Ye.right),Me.arrange(ae+ot.offsetX+Ye.left,Pe+ot.offsetY+Ye.top+(x.height*ot.y-nt*ot.y),Fe.width,ft),ne||(ae+=Fe.width+Ye.left+Ye.right)}}};function Sm(){this.xa="Base"}tt(Sm,oa),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 Pe=b[fe];if(Pe.visible||Pe===ae){var Me=ml(Pe,!1);if(Me!==Fn&&Me!==ji)x.push(Pe);else{var Fe=Pe.margin;Me=Fe.right+Fe.left,Fe=Fe.top+Fe.bottom,Pe.measure(y,1/0,te,0),Pe=Pe.measuredBounds,Os(E,Math.max(E.width,Math.max(Pe.width+Me,0)),E.height+Math.max(Pe.height+Fe,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)&&(Pe=fe.margin,ne=Pe.right+Pe.left,Pe=Pe.top+Pe.bottom,fe.measure(y,1/0,te,0),fe=fe.measuredBounds,Pe=Math.max(fe.height+Pe,0),E.width=Math.max(E.width,Math.max(fe.width+ne,0)),E.height+=Pe);Jn(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 Pe=te,Me=y[fe];if(Me.visible){var Fe=Me.measuredBounds,Ye=Me.margin,nt=Ye.left+Ye.right,ot=te+E.right,ft=Fe.width,Ot=ml(Me,!1);(isNaN(Me.desiredSize.width)&&Ot===Un||Ot===Pi)&&(ft=Math.max(x.width-nt-ot,0)),nt=ft+nt+ot,ot=Me.alignment,ot.Xb()&&(ot=a.defaultAlignment),ot.sb()||(ot=Fr),ne&&(ae-=Fe.height+Ye.bottom+Ye.top),Me.arrange(Pe+ot.offsetX+Ye.left+(x.width*ot.x-nt*ot.x),ae+ot.offsetY+Ye.top,ft,Fe.height),ne||(ae+=Fe.height+Ye.bottom+Ye.top)}}};function xm(){this.xa="Base"}tt(xm,oa),xm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length,fe=a.Pb(),Pe=fe.margin,Me=Pe.right+Pe.left,Fe=Pe.top+Pe.bottom;fe.measure(y,x,te,ne);var Ye=fe.measuredBounds;te=Ye.width,ne=Ye.height;var nt=Math.max(te+Me,0),ot=Math.max(ne+Fe,0),ft=a.isClipping,Ot=Ln.allocAt(-Pe.left,-Pe.top,nt,ot),Mt=Ln.allocAt(0,0,te,ne);pv(fe,Mt,!0),te=Mt.width,ne=Mt.height;for(var Ht=!0,Wt=hh(a),Kt=0;Kt<ae;Kt++){var Qt=b[Kt];Ye=y;var gn=x;if(Qt!==fe&&(Qt.visible||Qt===Wt)){Pe=Qt.margin;var ni=Pe.left,fi=Pe.top;switch(nt=Pe.right+Pe.left,ot=Pe.top+Pe.bottom,Pe=ml(Qt,!1),Pe){case Un:Ye=te,gn=ne,fi=ni=ot=nt=0;break;case Pi:Ye=te,ni=nt=0;break;case ji:gn=ne,fi=ot=0}Qt.measure(Ye,gn,0,0),Ye=Qt.measuredBounds,nt=Math.max(Ye.width+nt,0),ot=Math.max(Ye.height+ot,0),Pe=Qt.alignment,Pe.Xb()&&(Pe=a.defaultAlignment),Pe.sb()||(Pe=Fr);var ui=Qt.alignmentFocus;if(ui.Xb()&&(ui=Fr),gn=null,Qt instanceof Wn&&Qt.$e!==""&&(gn=Qt.fb(Qt.$e),gn===Qt&&(gn=null)),ni=Mt.x-ni,fi=Mt.y-fi,gn!==null){for(Qt.arrange(0,0,Ye.width,Ye.height),Ye=gn.actualBounds,Ye=Tt.allocAt(Ye.x+(ui.x*Ye.width-ui.offsetX),Ye.y+(ui.y*Ye.height-ui.offsetY)),gn=gn.panel;gn!==Qt;)gn.transform.Ga(Ye),gn=gn.panel;ni+=Pe.x*te+Pe.offsetX-Ye.x,fi+=Pe.y*ne+Pe.offsetY-Ye.y,Tt.free(Ye)}else ni+=Pe.x*te+Pe.offsetX-(ui.x*Ye.width+ui.offsetX),fi+=Pe.y*ne+Pe.offsetY-(ui.y*Ye.height+ui.offsetY);Ht?(Ht=!1,E.h(ni,fi,nt,ot)):ho(E,ni,fi,nt,ot)}}switch(Ht?E.assign(Ot):ft?E.Uu(Mt.x,Mt.y,Mt.width,Mt.height):ho(E,Ot.x,Ot.y,Ot.width,Ot.height),Ln.free(Ot),Ln.free(Mt),Pe=fe.stretch,Pe===sr&&(Pe=ml(fe,!1)),Pe){case Fn:return;case Un:if(!isFinite(y)&&!isFinite(x))return;break;case Pi:if(!isFinite(y))return;break;case ji:if(!isFinite(x))return}for(Ye=fe.measuredBounds,te=Ye.width,ne=Ye.height,nt=Math.max(te+Me,0),ot=Math.max(ne+Fe,0),Pe=fe.margin,Mt=Ln.allocAt(-Pe.left,-Pe.top,nt,ot),pv(fe,Mt,!0),te=Mt.width,ne=Mt.height,y=0;y<ae;y++)x=b[y],x===fe||!x.visible&&x!==Wt||(Pe=x.margin,nt=Pe.right+Pe.left,ot=Pe.top+Pe.bottom,Ye=x.measuredBounds,nt=Math.max(Ye.width+nt,0),ot=Math.max(Ye.height+ot,0),Me=x.alignment,Me.Xb()&&(Me=a.defaultAlignment),Me.sb()||(Me=Fr),x=x.alignmentFocus,x.Xb()&&(x=Fr),Ht?(Ht=!1,E.h(Me.x*te+Me.offsetX-(x.x*Ye.width+x.offsetX)-Pe.left,Me.y*ne+Me.offsetY-(x.y*Ye.height+x.offsetY)-Pe.top,nt,ot)):ho(E,Me.x*te+Me.offsetX-(x.x*Ye.width+x.offsetX)-Pe.left,Me.y*ne+Me.offsetY-(x.y*Ye.height+x.offsetY)-Pe.top,nt,ot));Ht?E.assign(Ot):ft?E.Uu(Mt.x,Mt.y,Mt.width,Mt.height):ho(E,Ot.x,Ot.y,Ot.width,Ot.height),Ln.free(Mt)},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 Pe=te-x.x,Me=fe-x.y;for(E.arrange(Pe,Me,ne,ae),ne=Ln.allocAt(0,0,ne,ae),pv(E,ne,!1),ae=0;ae<b;ae++){var Fe=y[ae];if(Fe!==E){Pe=Fe.measuredBounds;var Ye=Pe.width,nt=Pe.height;Me=Fe.alignment,Me.Xb()&&(Me=a.defaultAlignment),Me.sb()||(Me=Fr);var ot=Fe.alignmentFocus;if(ot.Xb()&&(ot=Fr),Pe=null,Fe instanceof Wn&&Fe.$e!==""&&(Pe=Fe.fb(Fe.$e),Pe===Fe&&(Pe=null)),Pe!==null){var ft=Pe.actualBounds;for(ot=Tt.allocAt(ft.x+(ot.x*ft.width-ot.offsetX),ft.y+(ot.y*ft.height-ot.offsetY)),Pe=Pe.panel;Pe!==Fe;)Pe.transform.Ga(ot),Pe=Pe.panel;Pe=Me.x*ne.width+Me.offsetX-ot.x,Me=Me.y*ne.height+Me.offsetY-ot.y,Tt.free(ot)}else Pe=Me.x*ne.width+Me.offsetX-(ot.x*Ye+ot.offsetX),Me=Me.y*ne.height+Me.offsetY-(ot.y*nt+ot.offsetY);Pe+=ne.x-x.x,Me+=ne.y-x.y,Fe.visible&&Fe.arrange(te+Pe,fe+Me,Ye,nt)}}Ln.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"}tt(wm,oa),wm.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length,fe=a.Pb(),Pe=fe.margin,Me=y,Fe=x,Ye=Pe.right+Pe.left,nt=Pe.top+Pe.bottom;fe.measure(y,x,te,ne),Pe=fe.measuredBounds;var ot=0,ft=null;fe instanceof fr&&(ft=fe,ot=ft.strokeWidth*ft.scale);var Ot=Math.max(Pe.width+Ye,0);Pe=Math.max(Pe.height+nt,0);var Mt=yv(fe),Ht=Mt.x*Ot+Mt.offsetX;Mt=Mt.y*Pe+Mt.offsetY;var Wt=Sv(fe),Kt=Wt.x*Ot+Wt.offsetX;for(Wt=Wt.y*Pe+Wt.offsetY,isFinite(y)&&(Me=Math.max(Math.abs(Ht-Kt)-ot,0)),isFinite(x)&&(Fe=Math.max(Math.abs(Mt-Wt)-ot,0)),ot=Xn.alloc(),ot.h(0,0),a=hh(a),Wt=0;Wt<ae;Wt++)Mt=b[Wt],Mt===fe||!Mt.visible&&Mt!==a||(Pe=Mt.margin,Ot=Pe.right+Pe.left,Ht=Pe.top+Pe.bottom,Mt.measure(Me,Fe,0,0),Pe=Mt.measuredBounds,Ot=Math.max(Pe.width+Ot,0),Pe=Math.max(Pe.height+Ht,0),ot.h(Math.max(Ot,ot.width),Math.max(Pe,ot.height)));if(ae===1)E.width=Ot,E.height=Pe,Xn.free(ot);else{switch(Mt=yv(fe),Wt=Sv(fe),ae=b=0,Wt.x!==Mt.x&&Wt.y!==Mt.y&&(b=ot.width/Math.abs(Wt.x-Mt.x),ae=ot.height/Math.abs(Wt.y-Mt.y)),Xn.free(ot),ot=0,ft!==null&&(ot=ft.strokeWidth*ft.scale,Pv(ft)===vi&&(b=ae=Math.max(b,ae))),b+=Math.abs(Mt.offsetX)+Math.abs(Wt.offsetX)+ot,ae+=Math.abs(Mt.offsetY)+Math.abs(Wt.offsetY)+ot,ft=fe.stretch,ft===sr&&(ft=ml(fe,!1)),ft){case Fn:ne=te=0;break;case Un:isFinite(y)&&(b=y),isFinite(x)&&(ae=x);break;case Pi:isFinite(y)&&(b=y),ne=0;break;case ji:te=0,isFinite(x)&&(ae=x)}fe.Uj(),fe.measure(b,ae,te,ne),E.width=fe.measuredBounds.width+Ye,E.height=fe.measuredBounds.height+nt}},wm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=Ln.alloc();te.h(0,0,1,1);var ne=b.margin,ae=ne.left;ne=ne.top;var fe=a.padding,Pe=fe.left;fe=fe.top,b.arrange(Pe+ae,fe+ne,E.width,E.height);var Me=yv(b),Fe=Sv(b),Ye=Me.y*E.height+Me.offsetY,nt=Fe.x*E.width+Fe.offsetX;for(Fe=Fe.y*E.height+Fe.offsetY,te.x=Me.x*E.width+Me.offsetX,te.y=Ye,ho(te,nt,Fe,0,0),te.x+=ae+Pe,te.y+=ne+fe,E=0;E<x;E++)ae=y[E],ae!==b&&(Pe=ae.measuredBounds,ne=ae.margin,fe=Math.max(Pe.width+ne.right+ne.left,0),Me=Math.max(Pe.height+ne.top+ne.bottom,0),Ye=ae.alignment,Ye.Xb()&&(Ye=a.defaultAlignment),Ye.sb()||(Ye=Fr),fe=te.width*Ye.x+Ye.offsetX-fe*Ye.x+ne.left+te.x,ne=te.height*Ye.y+Ye.offsetY-Me*Ye.y+ne.top+te.y,ae.visible&&(Er(te.x,te.y,te.width,te.height,fe,ne,Pe.width,Pe.height)?ae.arrange(fe,ne,Pe.width,Pe.height):ae.arrange(fe,ne,Pe.width,Pe.height,new Ln(te.x,te.y,te.width,te.height))));Ln.free(te)};function bm(){this.xa="Base",this.name="Table"}tt(bm,oa),bm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=Gn(),ae=Gn(),fe=0;fe<te;fe++){var Pe=b[fe],Me=Pe instanceof Wn?Pe:null;if(Me!==null&&Oh(Me)&&Pe.visible){ae.push(Me);for(var Fe=Me.O.s,Ye=Fe.length,nt=0;nt<Ye;nt++){var ot=Fe[nt];Me.type===Wn.TableRow?ot.row=Pe.row:Me.type===Wn.TableColumn&&(ot.column=Pe.column),ne.push(ot)}}else ne.push(Pe)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var ft=[],Ot=0;Ot<te;Ot++){var Mt=ne[Ot];Mt.visible&&(Js(Mt,!0),Hc(Mt,!0),ft[Mt.row]||(ft[Mt.row]=[]),ft[Mt.row][Mt.column]||(ft[Mt.row][Mt.column]=[]),ft[Mt.row][Mt.column].push(Mt))}Jn(ne);var Ht=Gn(),Wt=Gn(),Kt=Gn(),Qt={count:0},gn={count:0},ni=y,fi=x,ui=a.rowDefs,$n=a.colDefs,Rn=null;te=ui.length;for(var nr=0;nr<te;nr++)Rn=ui[nr],Rn!==void 0&&(Rn.actual=0);te=$n.length;for(var $i=0;$i<te;$i++)Rn=$n[$i],Rn!==void 0&&(Rn.actual=0);for(var eo=ft.length,Mo=0,ua=0;ua<eo;ua++)ft[ua]&&(Mo=Math.max(Mo,ft[ua].length));var da=Math.min(a.topIndex,eo-1),$a=Math.min(a.leftIndex,Mo-1),ca=0;eo=ft.length;for(var Gh=hh(a),Hs=0;Hs<eo;Hs++)if(ft[Hs]){Mo=ft[Hs].length;var fc=a.Fb(Hs);fc.actual=0;for(var Ya=fc.oc=0;Ya<Mo;Ya++)if(ft[Hs][Ya]){var Wh=a.Eb(Ya);Ht[Ya]===void 0&&(Wh.actual=0,Wh.oc=0,Ht[Ya]=!0);for(var au=ft[Hs][Ya],ju=au.length,Gl=0;Gl<ju;Gl++){var kl=au[Gl];if(kl.visible||kl===Gh){var Cd=1<kl.rowSpan||1<kl.columnSpan;Cd&&(Hs<da||Ya<$a||Wt.push(kl));var pc=kl.margin,Rp=pc.right+pc.left,Wl=pc.top+pc.bottom,Xa=lc(kl,fc,Wh,!1),Jg=kl.desiredSize,Hf=!isNaN(Jg.height),Nc=!isNaN(Jg.width)&&Hf;if(Cd||Xa===Fn||Nc||Hs<da||Ya<$a||(Qt[Ya]!==void 0||Xa!==Un&&Xa!==Pi||(Qt[Ya]=-1,Qt.count++),gn[Hs]!==void 0||Xa!==Un&&Xa!==ji||(gn[Hs]=-1,gn.count++),Kt.push(kl)),kl.measure(1/0,1/0,0,0),!(Hs<da||Ya<$a)){var Al=kl.measuredBounds,lf=Math.max(Al.width+Rp,0),Zl=Math.max(Al.height+Wl,0);if(kl.rowSpan===1&&(Xa===Fn||Xa===Pi)){Rn=a.Fb(Hs);var _d=Rn.Wc();ca=Math.max(Zl-Rn.actual,0),ca+_d>fi&&(ca=Math.max(fi-_d,0));var Z0=Rn.oa===0;Rn.oc=Rn.oc+ca,Rn.actual=Rn.oa+ca,fi=Math.max(fi-(ca+(Z0?_d:0)),0)}if(kl.columnSpan===1&&(Xa===Fn||Xa===ji)){Rn=a.Eb(Ya);var Qg=Rn.Wc();ca=Math.max(lf-Rn.actual,0),ca+Qg>ni&&(ca=Math.max(ni-Qg,0));var Hy=Rn.oa===0;Rn.oc=Rn.oc+ca,Rn.actual=Rn.oa+ca,ni=Math.max(ni-(ca+(Hy?Qg:0)),0)}Cd&&kl.Uj()}}}}}Jn(Ht);var Qc=0,ph=0;te=a.columnCount;for(var Uf=0;Uf<te;Uf++){var Pd=$n[Uf];Pd!==void 0&&(Qc+=isNaN(Pd.Hc)?Pd.oc:Pd.Hc,Pd.oc!==0&&(Qc+=Pd.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()))}ni=Math.max(y-Qc,0);var qc=fi=Math.max(x-ph,0),Zh=ni;te=Kt.length;for(var Nl=0;Nl<te;Nl++){var Oc=Kt[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,gn[Oc.row]=K0.oc===0&&gn[Oc.row]!==void 0?Math.max(Fp.height+Ic,gn[Oc.row]):null}var Gf=0,jp=0,ec;for(ec in gn)ec!=="count"&&(Gf+=gn[ec]);for(ec in Qt)ec!=="count"&&(jp+=Qt[ec]);for(var wa=Xn.alloc(),qg=0;qg<te;qg++){var ul=Kt[qg];if(ul.visible||ul===Gh){var Us=a.Fb(ul.row),cl=a.Eb(ul.column),mh=0;isFinite(cl.width)?mh=cl.width:(isFinite(ni)&&Qt[ul.column]!==null?jp===0?mh=cl.actual+ni:mh=Qt[ul.column]/jp*Zh:Qt[ul.column]!==null?mh=ni:mh=cl.actual||ni,mh=Math.max(0,mh-cl.Wc()));var Kh=0;switch(isFinite(Us.height)?Kh=Us.height:(isFinite(fi)&&gn[ul.row]!==null?Gf===0?Kh=Us.actual+fi:Kh=gn[ul.row]/Gf*qc:gn[ul.row]!==null?Kh=fi:Kh=Us.actual||fi,Kh=Math.max(0,Kh-Us.Wc())),wa.h(Math.max(cl.minimum,Math.min(mh,cl.maximum)),Math.max(Us.minimum,Math.min(Kh,Us.maximum))),Xa=lc(ul,Us,cl,!1),Xa){case Pi:wa.height=Math.max(wa.height,Us.actual+fi);break;case ji:wa.width=Math.max(wa.width,cl.actual+ni)}var cf=ul.margin,Uy=cf.right+cf.left,V0=cf.top+cf.bottom;ul.Uj(),ul.measure(wa.width,wa.height,cl.minimum,Us.minimum);var zp=ul.measuredBounds,hf=Math.max(zp.width+Uy,0),Wf=Math.max(zp.height+V0,0);isFinite(ni)&&(hf=Math.min(hf,wa.width)),isFinite(fi)&&(Wf=Math.min(Wf,wa.height));var Ol=0;Ol=Us.actual,Us.actual=Math.max(Us.actual,Wf),Us.oc=Math.max(Us.oc,Wf),ca=Us.actual-Ol,fi=Math.max(fi-ca,0),gn[ul.row]===null&&(qc=Math.max(qc-ca,0)),Ol=cl.actual,cl.actual=Math.max(cl.actual,hf),cl.oc=Math.max(cl.oc,hf),ca=cl.actual-Ol,ni=Math.max(ni-ca,0),Qt[ul.column]===null&&(Zh=Math.max(Zh-ca,0))}}Jn(Kt);var vh=Xn.alloc(),mc=Gn(),_u=Gn();if(te=Wt.length,te!==0){for(var Ld=0;Ld<eo;Ld++)if(ft[Ld]){Mo=ft[Ld].length;var Hp=a.Fb(Ld);mc[Ld]=Hp.actual;for(var Md=0;Md<Mo;Md++)if(ft[Ld][Md]){var $0=a.Eb(Md);_u[Md]=$0.actual}}}for(var Up=0;Up<te;Up++){var _s=Wt[Up];if(_s.visible||_s===Gh){var tc=a.Fb(_s.row),zu=a.Eb(_s.column);switch(wa.h(Math.max(zu.minimum,Math.min(y,zu.maximum)),Math.max(tc.minimum,Math.min(x,tc.maximum))),Xa=lc(_s,tc,zu,!1),Xa){case Un:_u[zu.index]!==0&&(wa.width=Math.min(wa.width,_u[zu.index])),mc[tc.index]!==0&&(wa.height=Math.min(wa.height,mc[tc.index]));break;case Pi:_u[zu.index]!==0&&(wa.width=Math.min(wa.width,_u[zu.index]));break;case ji:mc[tc.index]!==0&&(wa.height=Math.min(wa.height,mc[tc.index]))}isFinite(zu.width)&&(wa.width=zu.width),isFinite(tc.height)&&(wa.height=tc.height),vh.h(0,0);for(var Y0=zu.minimum,Kl=tc.minimum,Vh=1;Vh<_s.rowSpan&&!(_s.row+Vh>=a.rowCount);Vh++)Rn=a.Fb(_s.row+Vh),ca=0,ca=Xa===Un||Xa===ji?Math.max(Rn.minimum,mc[_s.row+Vh]===0?Rn.maximum:Math.min(mc[_s.row+Vh],Rn.maximum)):Math.max(Rn.minimum,isNaN(Rn.Hc)?Rn.maximum:Math.min(Rn.Hc,Rn.maximum)),vh.height+=ca,Kl+=Rn.minimum;for(var Hu=1;Hu<_s.columnSpan&&!(_s.column+Hu>=a.columnCount);Hu++)Rn=a.Eb(_s.column+Hu),ca=0,ca=Xa===Un||Xa===Pi?Math.max(Rn.minimum,_u[_s.column+Hu]===0?Rn.maximum:Math.min(_u[_s.column+Hu],Rn.maximum)):Math.max(Rn.minimum,isNaN(Rn.Hc)?Rn.maximum:Math.min(Rn.Hc,Rn.maximum)),vh.width+=ca,Y0+=Rn.minimum;wa.width+=vh.width,wa.height+=vh.height;var Gp=_s.margin,Td=Gp.right+Gp.left,em=Gp.top+Gp.bottom;_s.measure(wa.width,wa.height,Y0,Kl);for(var Wp=_s.measuredBounds,Dc=Math.max(Wp.width+Td,0),df=Math.max(Wp.height+em,0),kd=0,Zp=0;Zp<_s.rowSpan&&!(_s.row+Zp>=a.rowCount);Zp++)Rn=a.Fb(_s.row+Zp),kd+=Rn.total||0;if(kd<df){var $h=df-kd,eh=df-kd;if(_s.spanAllocation!==null)for(var Yh=_s.spanAllocation,yh=0;yh<_s.rowSpan&&!(0>=$h)&&!(_s.row+yh>=a.rowCount);yh++){Rn=a.Fb(_s.row+yh);var Xh=Rn.oa||0,ff=Yh(_s,Rn,eh);Rn.actual=Math.min(Rn.maximum,Xh+ff),Rn.oa!==Xh&&($h-=Rn.oa-Xh)}for(;0<$h;){var vc=Rn.oa||0;if(isNaN(Rn.height)&&Rn.maximum>vc&&(Rn.actual=Math.min(Rn.maximum,vc+$h),Rn.oa!==vc&&($h-=Rn.oa-vc)),Rn.index===0)break;Rn=a.Fb(Rn.index-1)}}for(var Zf=0,Jh=0;Jh<_s.columnSpan&&!(_s.column+Jh>=a.columnCount);Jh++)Rn=a.Eb(_s.column+Jh),Zf+=Rn.total||0;if(Zf<Dc){var Kf=Dc-Zf,Gy=Dc-Zf;if(_s.spanAllocation!==null)for(var Sh=_s.spanAllocation,pf=0;pf<_s.columnSpan&&!(0>=Kf)&&!(_s.column+pf>=a.columnCount);pf++){Rn=a.Eb(_s.column+pf);var tm=Rn.oa||0,Wy=Sh(_s,Rn,Gy);Rn.actual=Math.min(Rn.maximum,tm+Wy),Rn.oa!==tm&&(Kf-=Rn.oa-tm)}for(;0<Kf;){var X0=Rn.oa||0;if(isNaN(Rn.width)&&Rn.maximum>X0&&(Rn.actual=Math.min(Rn.maximum,X0+Kf),Rn.oa!==X0&&(Kf-=Rn.oa-X0)),Rn.index===0)break;Rn=a.Eb(Rn.index-1)}}}}Jn(Wt),Xn.free(vh),Xn.free(wa),mc!==void 0&&Jn(mc),_u!==void 0&&Jn(_u);var Vf=0,$f=0,J0=a.desiredSize,gx=a.maxSize;Xa=ml(a,!0);var nm=ph=Qc=0,im=0;te=a.columnCount;for(var Q0=0;Q0<te;Q0++)$n[Q0]!==void 0&&(Rn=a.Eb(Q0),isFinite(Rn.width)?(nm+=Rn.width,nm+=Rn.Wc()):Nm(Rn)===pg?(nm+=Rn.oa,nm+=Rn.Wc()):Rn.oa!==0&&(Qc+=Rn.oa,Qc+=Rn.Wc()));isFinite(J0.width)?Vf=Math.min(J0.width,gx.width):Vf=Xa!==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++)$n[q0]!==void 0&&(Rn=a.Eb(q0),isFinite(Rn.width)||Nm(Rn)===pg||(Rn.actual=Rn.oa*Qx),Rn.position=E.width,Rn.oa!==0&&(E.width+=Rn.oa,E.width+=Rn.Wc()));te=a.rowCount;for(var ev=0;ev<te;ev++)ui[ev]!==void 0&&(Rn=a.Fb(ev),isFinite(Rn.height)?(im+=Rn.height,im+=Rn.Wc()):Nm(Rn)===pg?(im+=Rn.oa,im+=Rn.Wc()):Rn.oa!==0&&(ph+=Rn.oa,ph+=Rn.Wc()));isFinite(J0.height)?$f=Math.min(J0.height,gx.height):$f=Xa!==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&&(Rn=a.Fb(tv),isFinite(Rn.height)||Nm(Rn)===pg||(Rn.actual=Rn.oa*qx),Rn.position=E.height,Rn.oa!==0&&(E.height+=Rn.oa,E.height+=Rn.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,Rn=a.Fb(rm.row),Vy=Rn.actual):(Rn=a.Eb(rm.column),Ky=Rn.actual,Vy=E.height),rm.measuredBounds.h(0,0,Ky,Vy),Js(rm,!1)}Jn(ae),a.inRowsCols=ft},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,Pe=ne.length,Me=0,Fe=0;Fe<Pe;Fe++)ne[Fe]&&(Me=Math.max(Me,ne[Fe].length));fe=a.rowDefs,ae=a.colDefs;var Ye=Fe=0,nt=Math.min(a.topIndex,Pe-1);if(0<fe.length){for(;nt!==Pe&&(fe[nt]===void 0||fe[nt].oa===0);)nt++;nt=Math.max(Math.min(nt,Pe-1),0),Fe=-fe[nt].position}var ot=Math.min(a.leftIndex,Me-1);if(0<ae.length){for(;ot!==Me&&(ae[ot]===void 0||ae[ot].oa===0);)ot++;ot=Math.max(Math.min(ot,Me-1),0),Ye=-ae[ot].position}for(var ft=0,Ot=0;ft!==Pe&&fe[ft]===void 0;)ft++;for(;Ot!==Pe&&ae[Ot]===void 0;)Ot++;Me=a.part,a.Fb(ft),a.Eb(Ot);for(var Mt=0;Mt<y.length;Mt++){var Ht=y[Mt];if(Ht instanceof Wn&&Ht.visible&&Oh(Ht)){if(Ht.type===Wn.TableRow){ae=a.Fb(Ht.row);var Wt=a.Eb(Ot)}else ae=a.Fb(ft),Wt=a.Eb(Ht.column);fe=ae.position+Fe+E,ae.oa!==0&&(fe+=ae.Io(Math.max(ft,nt))),ae=Wt.position+Ye+te,Wt.oa!==0&&(ae+=Wt.Io(Math.max(Ot,ot))),Wt=Ht.measuredBounds,Ht.Uk(),Ht.actualBounds.ka();var Kt=Ht.actualBounds,Qt=Ln.allocAt(Kt.x,Kt.y,Kt.width,Kt.height);Kt.x=Ht.type===Wn.TableRow?te:ae,Kt.y=Ht.type===Wn.TableColumn?E:fe,Kt.width=Wt.width,Kt.height=Wt.height,Ht.actualBounds.freeze(),Hc(Ht,!1),vs(Qt,Kt)||Me===null||(Me.oh(),Ht.Pn(Me)),Ln.free(Qt)}}for(Mt=Xn.alloc(),Ht=0;Ht<Pe;Ht++)if(ne[Ht]){for(Me=ne[Ht].length,Wt=a.Fb(Ht),fe=Wt.position+Fe+E,Wt.oa!==0&&(fe+=Wt.Io(Math.max(ft,nt))),Kt=0;Kt<Me;Kt++)if(ne[Ht][Kt]){Qt=a.Eb(Kt),ae=Qt.position+Ye+te,Qt.oa!==0&&(ae+=Qt.Io(Math.max(Ot,ot)));for(var gn=ne[Ht][Kt],ni=gn.length,fi=0;fi<ni;fi++){var ui=gn[fi],$n=ui.measuredBounds;Mt.h(0,0);for(var Rn=1;Rn<ui.rowSpan&&!(Ht+Rn>=a.rowCount);Rn++){var nr=a.Fb(Ht+Rn);nr.oa!==0&&(Mt.height+=nr.total)}for(Rn=1;Rn<ui.columnSpan&&!(Kt+Rn>=a.columnCount);Rn++)nr=a.Eb(Kt+Rn),nr.oa!==0&&(Mt.width+=nr.total);var $i=Qt.oa+Mt.width,eo=Wt.oa+Mt.height;Rn=ae,nr=fe;var Mo=$i,ua=eo,da=ae,$a=fe,ca=$i,Gh=eo;ae+$i>x.width&&(ca=Math.max(x.width-ae,0)),fe+eo>x.height&&(Gh=Math.max(x.height-fe,0));var Hs=ui.alignment;if(Hs.Xb()){Hs=a.defaultAlignment,Hs.sb()||(Hs=Fr);var fc=Hs.x,Ya=Hs.y,Wh=Hs.offsetX;Hs=Hs.offsetY;var au=Qt.alignment,ju=Wt.alignment;au.sb()&&(fc=au.x,Wh=au.offsetX),ju.sb()&&(Ya=ju.y,Hs=ju.offsetY)}else fc=Hs.x,Ya=Hs.y,Wh=Hs.offsetX,Hs=Hs.offsetY;(isNaN(fc)||isNaN(Ya))&&(Ya=fc=.5,Hs=Wh=0),au=$n.width,ju=$n.height;var Gl=ui.margin,kl=Gl.left+Gl.right,Cd=Gl.top+Gl.bottom,pc=lc(ui,Wt,Qt,!1);!isNaN(ui.desiredSize.width)||pc!==Un&&pc!==Pi||(au=Math.max($i-kl,0)),!isNaN(ui.desiredSize.height)||pc!==Un&&pc!==ji||(ju=Math.max(eo-Cd,0)),$i=ui.maxSize,eo=ui.minSize,au=Math.min($i.width,au),ju=Math.min($i.height,ju),au=Math.max(eo.width,au),ju=Math.max(eo.height,ju),$i=ju+Cd,Rn+=Mo*fc-(au+kl)*fc+Wh+Gl.left,nr+=ua*Ya-$i*Ya+Hs+Gl.top,ui.visible&&(Er(da,$a,ca,Gh,Rn,nr,$n.width,$n.height)?ui.arrange(Rn,nr,au,ju):ui.arrange(Rn,nr,au,ju,new Ln(da,$a,ca,Gh)))}}}for(Xn.free(Mt),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"}tt(Cm,oa),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function _m(){this.xa="Base"}tt(_m,oa),_m.prototype.measure=function(){},_m.prototype.arrange=function(){};function Pm(){this.xa="Base"}tt(Pm,oa),Pm.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&Ft("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,Pe=fe.right+fe.left;if(fe=fe.top+fe.bottom,isFinite(y)||isFinite(x)){var Me=b.scale,Fe=ae.width;ae=ae.height;var Ye=Math.max(y-Pe,0),nt=Math.max(x-fe,0),ot=1;a.viewboxStretch===vi?Fe!==0&&ae!==0&&(ot=Math.min(Ye/Fe,nt/ae)):Fe!==0&&ae!==0&&(ot=Math.max(Ye/Fe,nt/ae)),ot===0&&(ot=1e-4),b.Ca*=ot,Me!==b.scale&&(Js(b,!0),b.measure(1/0,1/0,te,ne))}ae=b.measuredBounds,E.width=isFinite(y)?y:Math.max(ae.width+Pe,0),E.height=isFinite(x)?x:Math.max(ae.height+fe,0)},Pm.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=Fr),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"}tt(hg,oa),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,Pe=Math.ceil(ae/E),Me=Math.ceil(fe/b),Fe=a.gridOrigin,Ye=Fe.x;Fe=Fe.y,y.save(),y.beginPath(),y.rect(0,0,ae,fe),y.clip(),y.Se();for(var nt=[],ot=a.O.s,ft=ot.length,Ot=0;Ot<ft;Ot++){var Mt=ot[Ot],Ht=[];if(nt.push(Ht),Mt.visible){var Wt=Mt.interval;if(!(0>Wt)){Mt=mv(Mt.figure);for(var Kt=0;Kt<ft;Kt++)if(Kt!==Ot){var Qt=ot[Kt];Qt.visible&&mv(Qt.figure)===Mt&&(Qt=Qt.interval,Qt>Wt&&Ht.push(Qt))}}}}for(ot=a.O.s,ft=ot.length,Ot=0;Ot<ft;Ot++){var gn=ot[Ot];if(gn.visible&&(Ht=gn.interval||1,Mt=Math.abs(Ht),!(2>E*Mt*x))){if(Wt=gn.segmentIndex,(!isFinite(Wt)||isNaN(Wt))&&(Wt=0),0>Wt&&(Wt=Mt-Math.min(-Wt,Mt)),Wt=Math.round(Wt%Mt),Mt=gn.opacity,Kt=1,Mt!==1){if(Mt===0)continue;Kt=y.globalAlpha,y.globalAlpha=Kt*Mt}Qt=nt[Ot];var ni=!1,fi=gn.strokeDashArray;if(fi!==null&&(ni=!0,y.js(fi,gn.strokeDashOffset)),gn.figure==="LineV"&&gn.stroke!==null&&0<gn.strokeWidth){for(y.lineWidth=gn.strokeWidth,xs(a,y,gn.stroke,!1,!1,te,ne),y.beginPath(),fi=gn=Math.floor((Ye-E)/E);fi<=gn+Pe;fi++){var ui=fi*E+Ye;0<=ui&&ui<=ae&&Em(fi,Ht,Wt,Qt)&&(y.moveTo(ui,0),y.lineTo(ui,fe))}y.stroke(),y.Se()}else if(gn.figure==="LineH"&&gn.stroke!==null&&0<gn.strokeWidth){for(y.lineWidth=gn.strokeWidth,xs(a,y,gn.stroke,!1,!1,te,ne),y.beginPath(),fi=gn=Math.floor((Fe-b)/b);fi<=gn+Me;fi++)ui=fi*b+Fe,0<=ui&&ui<=fe&&Em(fi,Ht,Wt,Qt)&&(y.moveTo(0,ui),y.lineTo(ae,ui));y.stroke(),y.Se()}else if(gn.figure==="BarV"&&gn.fill!==null)for(xs(a,y,gn.fill,!0,!1,te,ne),gn=gn.width,isNaN(gn)&&(gn=E),ui=fi=Math.floor((Ye-E)/E);ui<=fi+Pe;ui++){var $n=ui*E+Ye;0<=$n+gn&&$n<=ae&&Em(ui,Ht,Wt,Qt)&&y.fillRect($n,0,gn,fe)}else if(gn.figure==="BarH"&&gn.fill!==null)for(xs(a,y,gn.fill,!0,!1,te,ne),gn=gn.height,isNaN(gn)&&(gn=b),ui=fi=Math.floor((Fe-b)/b);ui<=fi+Me;ui++)$n=ui*b+Fe,0<=$n+gn&&$n<=fe&&Em(ui,Ht,Wt,Qt)&&y.fillRect(0,$n,ae,gn);ni&&y.fs(),Mt!==1&&(y.globalAlpha=Kt)}}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"}tt(Lm,oa),Lm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof Xr||a instanceof Yn){var ne=null,ae=null;if(a instanceof Yn&&(ne=a),a instanceof Xr&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof Yn){var fe=ne;if(te===0)Os(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var Pe=a instanceof Xr?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var Me=fe.points,Fe=ne.pointsCount;ae!==null?ae.Ul(!1):ne!==null&&ne.Ul(!1),ae=y.width;var Ye=y.height,nt=a.j;if(nt.length=0,Pe!==null){r1(a,ae,Ye,Pe);var ot=Pe.measuredBounds;x.ed(ot),nt.push(ot)}ot=gr.alloc();for(var ft=Tt.alloc(),Ot=Tt.alloc(),Mt=0;Mt<te;Mt++){var Ht=b[Mt];if(Ht!==Pe)if(Ht.isPanelMain&&Ht instanceof fr){r1(a,ae,Ye,Ht);var Wt=Ht.measuredBounds;x.ed(Wt),nt.push(Wt)}else if(2>Fe)Ht.measure(1/0,1/0,0,0),Wt=Ht.measuredBounds,x.ed(Wt),nt.push(Wt);else{var Kt=Ht.segmentIndex,Qt=Ht.segmentFraction,gn=Ht.alignmentFocus;gn.Mc()&&(gn=Fr);var ni=Ht.segmentOrientation,fi=Ht.segmentOffset;if(isNaN(Kt)){var ui=fe.ua;Wt=Gn(),ui.Qu(Qt,Wt);var $n=Tt.allocAt(Wt[0],Wt[1]);if($n.add(fe.i(0)),ui.type===Qn.j?$n.offset(-ui.startX,-ui.startY):(ui=ui.figures.first(),ui!==null&&$n.offset(-ui.startX,-ui.startY)),ui=Wt[2],ni!==rl){var Rn=fe.computeAngle(Ht,ni,ui);Ht.Kb=Rn}Rn=$n.x-y.x;var nr=$n.y-y.y;Tt.free($n),Jn(Wt)}else if(Kt<-Fe||Kt>=Fe)Wt=Tt.alloc(),fe.vg(),fe.computeMidPoint(Wt),ui=fe.midAngle,ni!==rl&&(Rn=fe.computeAngle(Ht,ni,ui),Ht.Kb=Rn),Rn=Wt.x-y.x,nr=Wt.y-y.y,Tt.free(Wt);else{if(Rn=0,0<=Kt?(nr=Me.M(Kt),Wt=Kt<Fe-1?Me.M(Kt+1):nr):(Rn=Fe+Kt,nr=Me.M(Rn),Wt=0<Rn?Me.M(Rn-1):nr),nr.Xa(Wt)){0<=Kt?(ui=0<Kt?Me.M(Kt-1):nr,Rn=Kt<Fe-2?Me.M(Kt+2):Wt):(ui=Rn<Fe-1?Me.M(Rn+1):nr,Rn=1<Rn?Me.M(Rn-2):Wt),$n=ui.Bf(nr);var $i=Wt.Bf(Rn);ui=$n>$i+10?0<=Kt?ui.ab(nr):nr.ab(ui):$i>$n+10?0<=Kt?Wt.ab(Rn):Rn.ab(Wt):0<=Kt?ui.ab(Rn):Rn.ab(ui)}else ui=0<=Kt?nr.ab(Wt):Wt.ab(nr);ni!==rl&&(Rn=fe.computeAngle(Ht,ni,ui),Ht.Kb=Rn),Rn=nr.x+(Wt.x-nr.x)*Qt-y.x,nr=nr.y+(Wt.y-nr.y)*Qt-y.y}Ht.measure(1/0,1/0,0,0),Wt=Ht.measuredBounds,$n=Ht.naturalBounds;var eo=0;Ht instanceof fr&&(eo=Ht.strokeWidth),$i=$n.width+eo;var Mo=$n.height+eo;ot.reset(),ot.translate(-Wt.x,-Wt.y),ot.scale(Ht.scale,Ht.scale),ot.rotate(ni===rl?Ht.angle:ui,$i/2,Mo/2),ni!==_g&&ni!==Eg||ot.rotate(90,$i/2,Mo/2),ni!==Pg&&ni!==Lg||ot.rotate(-90,$i/2,Mo/2),ni===i0&&(45<ui&&135>ui||225<ui&&315>ui)&&ot.rotate(-ui,$i/2,Mo/2),$n=new Ln(0,0,$i,Mo),ft.xi($n,gn),ot.Ga(ft),gn=-ft.x+eo/2*Ht.scale,Ht=-ft.y+eo/2*Ht.scale,Ot.assign(fi),eo=isNaN(fi.x);var ua=isNaN(fi.y);if(eo||ua){$i=$i/2+3,Mo=Mo/2+3;var da=45<=ui&&135>=ui,$a=225<=ui&&315>=ui;ni===rl&&(da||$a)?(Ot.x=ua?$i:fi.y,Ot.y=eo?Mo:fi.x,da?0<=Kt||isNaN(Kt)&&.5>Qt||!eo||(Ot.y=-Mo):$a&&((0<=Kt||isNaN(Kt)&&.5>Qt)&&eo&&(Ot.y=-Mo),ua&&(Ot.x=-$i))):(eo&&(Ot.x=0<=Kt||isNaN(Kt)&&.5>Qt?$i:-$i),ua&&(Ot.y=-Mo),Ot.rotate(ui))}else Ot.rotate(ui);Rn+=Ot.x,nr+=Ot.y,$n.set(Wt),$n.h(Rn+gn,nr+Ht,Wt.width,Wt.height),nt.push($n),x.ed($n)}}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),Os(E,x.width||0,x.height||0),gr.free(ot),Tt.free(ft),Tt.free(Ot)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Xr||a instanceof Yn){var b=a,E=null;a instanceof Xr&&(E=a,b=E.adornedPart);var te=a instanceof Xr?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 Pe=y[fe];if(Pe!==te&&ae<ne.length){var Me=ne[ae];ae++,Pe.arrange(Me.x-a.jg.x,Me.y-a.jg.y,Me.width,Me.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Yn)for(te=a.labelNodes;te.next();){var Fe=a;ne=te.value,ae=ne.segmentIndex,fe=ne.segmentFraction;var Ye=ne.alignmentFocus;if(Pe=ne.segmentOrientation,Me=ne.segmentOffset,isNaN(ae)){var nt=Fe.ua,ot=Gn();nt.Qu(fe,ot);var ft=Tt.allocAt(ot[0],ot[1]);ft.add(Fe.i(0)),nt.type===Qn.j||(nt=nt.figures.first()),ft.offset(-nt.startX,-nt.startY),nt=ot[2],Pe!==rl&&(Fe=Fe.computeAngle(ne,Pe,nt),ne.angle=Fe),Fe=ft.x;var Ot=ft.y;Tt.free(ft),Jn(ot)}else if(ae<-x||ae>=x)ot=Tt.alloc(),nt=Fe,Ot=ot,nt.vg(),nt.computeMidPoint(Ot),nt=Fe.midAngle,Pe!==rl&&(Fe=Fe.computeAngle(ne,Pe,nt),ne.angle=Fe),Fe=ot.x,Ot=ot.y,Tt.free(ot);else{if(ft=0,0<=ae?(ot=y.s[ae],Ot=ae<x-1?y.s[ae+1]:ot):(ft=x+ae,ot=y.s[ft],Ot=0<ft?y.s[ft-1]:ot),ot.Xa(Ot)){0<=ae?(nt=0<ae?y.s[ae-1]:ot,ft=ae<x-2?y.s[ae+2]:Ot):(nt=ft<x-1?y.s[ft+1]:ot,ft=1<ft?y.s[ft-2]:Ot);var Mt=nt.Bf(ot),Ht=Ot.Bf(ft);nt=Mt>Ht+10?0<=ae?nt.ab(ot):ot.ab(nt):Ht>Mt+10?0<=ae?Ot.ab(ft):ft.ab(Ot):0<=ae?nt.ab(ft):ft.ab(nt)}else nt=0<=ae?ot.ab(Ot):Ot.ab(ot);Pe!==rl&&(Fe=Fe.computeAngle(ne,Pe,nt),ne.angle=Fe),Fe=ot.x+(Ot.x-ot.x)*fe,Ot=ot.y+(Ot.y-ot.y)*fe}if(Ye.ys())ne.location=new Tt(Fe,Ot);else{Ye.Mc()&&(Ye=Fr),ot=gr.alloc(),ot.reset(),ot.scale(ne.scale,ne.scale),ot.rotate(ne.angle,0,0);var Wt=ne.naturalBounds;ft=Ln.allocAt(0,0,Wt.width,Wt.height),Mt=Tt.alloc(),Mt.xi(ft,Ye),ot.Ga(Mt),Ye=-Mt.x,Ht=-Mt.y;var Kt=Wt.width,Qt=Wt.height;Wt=Tt.alloc(),Wt.assign(Me);var gn=isNaN(Me.x),ni=isNaN(Me.y);if(gn||ni){Kt=Kt/2+3,Qt=Qt/2+3;var fi=45<=nt&&135>=nt,ui=225<=nt&&315>=nt;Pe===rl&&(fi||ui)?(Wt.x=ni?Kt:Me.y,Wt.y=gn?Qt:Me.x,fi?0<=ae||isNaN(ae)&&.5>fe||!gn||(Wt.y=-Qt):ui&&((0<=ae||isNaN(ae)&&.5>fe)&&gn&&(Wt.y=-Qt),ni&&(Wt.x=-Kt))):(gn&&(Wt.x=0<=ae||isNaN(ae)&&.5>fe?Kt:-Kt),ni&&(Wt.y=-Qt),Wt.rotate(nt))}else Wt.rotate(nt);Fe+=Wt.x,Ot+=Wt.y,ot.pp(ft),Ye+=ft.x,Ht+=ft.y,ae=Tt.allocAt(Fe+Ye,Ot+Ht),ne.move(ae),Tt.free(ae),Tt.free(Wt),Tt.free(Mt),Ln.free(ft),gr.free(ot)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Tt.free(b)}};function r1(a,y,x,b){if(iu(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Xr&&a.type===Wn.Link&&a.adornedObject instanceof fr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Yn&&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 Xr&&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),Js(b,!1)}}function dg(){this.xa="Base"}tt(dg,oa),dg.prototype.measure=function(a,y,x,b,E,te,ne){var ae=a.Pb();a.graduatedBounds=[];var fe=ae.margin,Pe=fe.right+fe.left,Me=fe.top+fe.bottom;ae.measure(y,x,te,ne);var Fe=ae.measuredBounds,Ye=new Ln(-fe.left,-fe.top,Math.max(Fe.width+Pe,0),Math.max(Fe.height+Me,0));a.graduatedBounds.push(Ye),E.assign(Ye);for(var nt=ae.geometry,ot=ae.strokeWidth,ft=nt.flattenedSegments,Ot=nt.flattenedLengths,Mt=nt.flattenedTotalLength,Ht=ft.length,Wt=0,Kt=0,Qt=Gn(),gn=0;gn<Ht;gn++){var ni=ft[gn],fi=[];Kt=Wt=0;for(var ui=ni.length,$n=0;$n<ui;$n+=2){var Rn=ni[$n],nr=ni[$n+1];if($n!==0){var $i=180*Math.atan2(nr-Kt,Rn-Wt)/Math.PI;0>$i&&($i+=360),fi.push($i)}Wt=Rn,Kt=nr}Qt.push(fi)}if(a.graduatedIntervals===null){for(var eo=[],Mo=a.O.s,ua=Mo.length,da=0;da<ua;da++){var $a=Mo[da],ca=[];if(eo.push(ca),$a.visible){var Gh=$a.interval;if(!(0>Gh)){for(var Hs=0;Hs<ua;Hs++)if(Hs!==da){var fc=Mo[Hs];if(fc.visible&&$a.constructor===fc.constructor){var Ya=fc.interval;Ya>Gh&&ca.push(Ya)}}}}}a.graduatedIntervals=eo}var Wh=a.graduatedIntervals,au=a.O.s,ju=au.length,Gl=0,kl=0,Cd=Mt;a.graduatedMarks=[];for(var pc,Rp=0;Rp<ju;Rp++){var Wl=au[Rp];if(pc=[],Wl.visible&&Wl!==ae){var Xa=Math.abs(Wl.interval),Jg=a.graduatedTickUnit;if(!(2>Jg*Xa*Mt/a.graduatedRange&&Wl.graduatedSkip===null)){var Hf=Ot[0][0],Nc=0,Al=0;kl=Mt*Wl.graduatedStart-1e-4,Cd=Mt*Wl.graduatedEnd+1e-4;var lf=Jg*Xa,Zl=a.graduatedTickBase;if(Zl<a.graduatedMin){var _d=(a.graduatedMin-Zl)/lf;_d=_d%1===0?_d:Math.floor(_d+1),Zl+=_d*lf}else Zl>a.graduatedMin+lf&&(Zl-=Math.floor((Zl-a.graduatedMin)/lf)*lf);for(var Z0=Wh[Rp],Qg=Zl,Hy=1e-6*a.graduatedMax,Qc=1;Zl<=a.graduatedMax+Hy;Qc++){e:{for(var ph=Z0.length,Uf=0;Uf<ph;Uf++){var Pd=(Zl-a.graduatedTickBase)%(Z0[Uf]*a.graduatedTickUnit),Bp=1e-6*a.graduatedTickUnit;if(Pd<Bp&&Pd>-Bp){var Ed=!1;break e}}Ed=!0}if(Ed&&(Zl>a.graduatedMax&&(Zl=a.graduatedMax),Wl.graduatedSkip===null||Wl instanceof ko&&!Wl.graduatedSkip(Zl,Wl)||Wl instanceof fr&&!Wl.graduatedSkip(Zl,Wl))&&(Gl=(Zl-a.graduatedMin)*Mt/a.graduatedRange,Gl>Mt&&(Gl=Mt),kl<=Gl&&Gl<=Cd)){for(var qc=Qt[Nc][Al],Zh=Ot[Nc][Al];Nc<Ot.length;){for(;Gl>Hf&&Al<Ot[Nc].length-1;)Al++,qc=Qt[Nc][Al],Zh=Ot[Nc][Al],Hf+=Zh;if(Gl<=Hf)break;Nc++,Al=0,qc=Qt[Nc][Al],Zh=Ot[Nc][Al],Hf+=Zh}var Nl=ft[Nc],Oc=Nl[2*Al],K0=Nl[2*Al+1],gh=(Gl-(Hf-Zh))/Zh,Fp=new Tt(Oc+(Nl[2*Al+2]-Oc)*gh+ot/2-nt.bounds.x,K0+(Nl[2*Al+3]-K0)*gh+ot/2-nt.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]:rn.$(Nl[0],Nl[Nl.length-2])&&rn.$(Nl[1],Nl[Nl.length-1])&&(Ic=uf[uf.length-1]):.5<gh&&(Al+1<uf.length?Ic=uf[Al+1]:rn.$(Nl[0],Nl[Nl.length-2])&&rn.$(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(Wl instanceof ko){var ec="";Wl.graduatedFunction!==null?(ec=Wl.graduatedFunction(Zl,Wl),ec=ec!=null?ec.toString():""):ec=(+Zl.toFixed(2)).toString(),ec!==""&&pc.push({$l:Fp,angle:qc,text:ec})}else pc.push({$l:Fp,angle:qc})}Zl=Qg+Qc*lf}}}a.graduatedMarks.push(pc)}Jn(Qt);var wa=a.graduatedMarks;if(wa!==null)for(var qg=b.length,ul=0;ul<qg;ul++){var Us=b[ul],cl=wa[ul];if(Us.visible&&Us!==ae&&cl.length!==0){if(Us instanceof fr){var mh=a,Kh=E,cf=Us.alignmentFocus;cf.Mc()&&(cf=Qa);var Uy=Us.angle;Us.Kb=0,Us.measure(1/0,1/0,0,0),Us.Kb=Uy;var V0=Us.measuredBounds,zp=V0.width,hf=V0.height,Wf=Ln.allocAt(0,0,zp,hf),Ol=Tt.alloc();Ol.xi(Wf,cf),Ln.free(Wf);for(var vh=-Ol.x,mc=-Ol.y,_u=new Ln,Ld=cl.length,Hp=0;Hp<Ld;Hp++)for(var Md=cl[Hp],$0=Md.$l.x,Up=Md.$l.y,_s=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(_s+Us.angle),Ol.offset($0,Up),Hp===0&&tc===0?_u.h(Ol.x,Ol.y,0,0):_u.Ye(Ol),Ol.offset(-$0,-Up),Ol.rotate(-_s-Us.angle)}Tt.free(Ol),mh.graduatedBounds!==null&&mh.graduatedBounds.push(_u),ho(Kh,_u.x,_u.y,_u.width,_u.height)}else if(Us instanceof ko){var zu=a,Y0=E;zu.temporaryTextBlock===null&&(zu.temporaryTextBlock=new ko);var Kl=zu.temporaryTextBlock;S1(Kl,Us);var Vh=Us.alignmentFocus;Vh.Mc()&&(Vh=Qa);for(var Hu=Us.segmentOrientation,Gp=Us.segmentOffset,Td=new Ln,em=0,Wp=0,Dc=0,df=0,kd=0,Zp=cl.length,$h=0;$h<Zp;$h++){var eh=cl[$h];em=eh.$l.x,Wp=eh.$l.y,Dc=eh.angle,kd=df=Us.angle,Hu!==rl&&(kd=Hu===Cg||Hu===n0?Dc+Us.angle:Dc,df=Yn.computeAngle(Hu,kd)),Kl.Kb=df,Kl.text=eh.text||"",Kl.measure(1/0,1/0,0,0);var Yh=Kl.measuredBounds,yh=Kl.naturalBounds,Xh=yh.width,ff=yh.height,vc=gr.alloc();vc.reset(),vc.translate(-Yh.x,-Yh.y),vc.scale(Kl.scale,Kl.scale),vc.rotate(kd,Xh/2,ff/2),Hu!==_g&&Hu!==Eg||vc.rotate(90,Xh/2,ff/2),Hu!==Pg&&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=Ln.allocAt(0,0,Xh,ff),Jh=Tt.alloc();Jh.xi(Zf,Vh),vc.Ga(Jh);var Kf=-Jh.x,Gy=-Jh.y,Sh=Tt.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 Ln(em,Wp,Yh.width,Yh.height),tm=new Ln(Yh.x,Yh.y,Yh.width,Yh.height),Wy=new Ln(yh.x,yh.y,yh.width,yh.height);eh.Sz=df,eh.lineCount=Kl.lineCount,eh.lines=[Kl.Cb,Kl.Ih,Kl.df,Kl.Le,Kl.Qc,Kl.Qb,Kl.ze],eh.actualBounds=pf,eh.measuredBounds=tm,eh.naturalBounds=Wy,$h===0?Td.assign(pf):Td.ed(pf),Tt.free(Sh),Tt.free(Jh),Ln.free(Zf),gr.free(vc)}zu.graduatedBounds!==null&&zu.graduatedBounds.push(Td),ho(Y0,Td.x,Td.y,Td.width,Td.height)}Js(Us,!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,Pe=0;Pe<fe;Pe++){var Me=y[Pe];ae=E[Pe],Me.visible&&Me!==b&&ae.length!==0&&(ae=te[ne],ne++,Me.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 zl,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,Pe=a.graduatedMarks,Me=fe.length,Fe=0;Fe<Me;Fe++){var Ye=fe[Fe],nt=Pe[Fe],ot=nt.length;if(Ye.visible&&Ye!==te&&nt.length!==0){if(Ye instanceof fr){if(!(2>a.graduatedTickUnit*Ye.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ye.graduatedSkip===null)){var ft=Ye.measuredBounds,Ot=Ye.strokeWidth*Ye.scale,Mt=Ye.alignmentFocus;Mt.Mc()&&(Mt=Qa);for(var Ht=0;Ht<ot;Ht++){var Wt=nt[Ht].$l,Kt=nt[Ht].angle,Qt=Mt,gn=Ye.Ab;gn.reset(),gn.translate(Wt.x+ae.x,Wt.y+ae.y),gn.rotate(Kt+Ye.angle,0,0),gn.translate(-ft.width*Qt.x+Qt.offsetX+Ot/2,-ft.height*Qt.y+Qt.offsetY+Ot/2),gn.scale(Ye.scale,Ye.scale),Iu(Ye,!1),Ye.wh.set(Ye.Ab),Ye.Kk=Ye.scale,vu(Ye,!1),Ye.gc(y,x),E&&(a.svg.appendChild(Ye.svg),Ye.svg=null),Ye.Ab.reset()}}}else if(Ye instanceof ko)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new ko),ft=a.temporaryTextBlock,S1(ft,Ye),Ot=0;Ot<ot;Ot++)Mt=nt[Ot],Mt.actualBounds&&Mt.measuredBounds&&Mt.naturalBounds&&(ft.ec=Mt.text||"",ft.Kb=Mt.Sz||0,ft.Gc=Mt.lineCount||0,Ht=Mt.lines,Ht!==void 0&&(ft.Cb=Ht[0],ft.Ih=Ht[1],ft.df=Ht[2],ft.Le=Ht[3],ft.Qc=Ht[4],ft.Qb=Ht[5],ft.ze=Ht[6]),Mt.naturalBounds&&(ft.dc=Mt.naturalBounds),Mt.actualBounds&&(Ht=Mt.actualBounds,ft.arrange(Ht.x,Ht.y,Ht.width,Ht.height)),Ht=Mt.actualBounds,ft.arrange(Ht.x,Ht.y,Ht.width,Ht.height),Wt=Mt.measuredBounds,Mt=Mt.naturalBounds,Kt=ft.Ab,Kt.reset(),Kt.translate(Ht.x+ae.x,Ht.y+ae.y),Kt.translate(-Wt.x,-Wt.y),ft.no(Kt,Mt.x,Mt.y,Mt.width,Mt.height),Iu(ft,!1),ft.wh.set(ft.Ab),ft.Kk=ft.scale,vu(ft,!1),ft.Ng=Ye.part,ft.Me=Ye.panel,ft.gc(y,x),ft.Me=null,ft.Ng=null,E&&(a.svg.appendChild(ft.svg),ft.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Wn(a,y){if(en.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 oa?this.na=a:a&&(this.na=Wn.Position,y=a);this.na===null&&Ft("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Wn.Grid?1048576:0),this.O=new On,this.yb=ba,this.Tm=so,this.Uf=sr,this.$g=null,this.$e="",this.jg=new Ln(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=vi,this.jn=rs,this.kn=xr,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}tt(Wn,en),Wn.prototype.cloneProtected=function(a){en.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){en.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=en.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 ii&&(te.Te=!0);var ae=a.diagram;ae!==null&&ae.undoManager.isUndoingRedoing||te.cb(ps,"elements",a,null,E,null,ne)}}return a}return null},st=Wn.prototype,st.toString=function(){return"Panel("+this.type.name+")#"+Pr(this)},st.Pn=function(a){en.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},st.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 zl){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 Pe=b[fe];if(Pe!==void 0&&Pe.actual!==0)if(ae)ae=!1;else{if(x){if(Pe.position>ne.height)continue}else if(Pe.position>ne.width)continue;var Me=Pe.separatorStrokeWidth;isNaN(Me)&&(Me=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Fe=Pe.separatorStroke;if(Fe===null&&(Fe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),Me!==0&&Fe!==null){xs(a,y,Fe,!1,!1,ne,te),Fe=!1;var Ye=Pe.separatorDashArray;Ye===null&&(Ye=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Ye!==null&&(Fe=!0,y.js(Ye,0)),y.beginPath(),Ye=Pe.position+Me,x?Ye>ne.height&&(Me-=Ye-ne.height):Ye>ne.width&&(Me-=Ye-ne.width),Pe=Pe.position+Me/2,y.lineWidth=Me,Me=a.yb,x?(Pe+=Me.top,Ye=ne.width-Me.right,y.moveTo(Me.left,Pe),y.lineTo(Ye,Pe)):(Pe+=Me.left,Ye=ne.height-Me.bottom,y.moveTo(Pe,Me.top),y.lineTo(Pe,Ye)),y.stroke(),y.Se(),Fe&&y.fs()}}}}function Mm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,ae=a.naturalBounds,fe=s1(a,!0),Pe=s1(a,!1),Me=0;Me<te;Me++){var Fe=b[Me];if(Fe!==void 0&&Fe.background!==null&&Fe.coversSeparators!==E&&Fe.actual!==0){var Ye=x?ne.height:ne.width;if(!(Fe.position>Ye)){var nt=Fe.Wc(),ot=Fe.separatorStrokeWidth;isNaN(ot)&&(ot=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=Fe.separatorStroke;ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ft===null||Fe.index===(x?fe:Pe))&&(ot=0),nt-=ot,ot=Fe.position+ot,nt+=Fe.actual,ot+nt>Ye&&(nt=Ye-ot),0>=nt||(Ye=a.yb,xs(a,y,Fe.background,!0,!1,ae,ne),x?y.fillRect(Ye.left,ot+Ye.top,ne.width-(Ye.left+Ye.right),nt):y.fillRect(ot+Ye.left,Ye.top,nt,ne.height-(Ye.top+Ye.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"}st.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},st.kk=function(a,y,x){if(!en.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},st.nk=function(){return!0},st.$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 en.prototype.$o.call(this,a,y,x,b)},st.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,Pe=-ne.m12*ae,Me=-ne.m21*ae,Fe=ne.m11*ae,Ye=ae*(ne.m21*ne.dy-ne.m22*ne.dx),nt=ae*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,rn.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*fe+y*Me+Ye,ae=a*Pe+y*Fe+nt,a=x*fe+b*Me+Ye,fe=x*Pe+b*Fe+nt,E.h(0,0),x=this.naturalBounds,te=rn.Ff(0,0,x.width,x.height,te,ae,a,fe,E),E.transform(ne),te;te||(fe=1,Me=Pe=0,Fe=1,nt=Ye=0),ae=a*fe+y*Me+Ye,a=a*Pe+y*Fe+nt,fe=x*fe+b*Me+Ye,x=x*Pe+b*Fe+nt,E.h(fe,x),b=(fe-ae)*(fe-ae)+(x-a)*(x-a),Pe=!1,Fe=this.O.s,nt=Fe.length,Me=Tt.alloc(),Ye=null,y=1/0;var ot=null,ft=this.isClipping&&this.na===Wn.Spot;ft&&(ot=Tt.alloc(),Ye=this.Pb(),(Pe=Ye.Sj(ae,a,fe,x,ot))&&(y=(ae-ot.x)*(ae-ot.x)+(a-ot.y)*(a-ot.y)));for(var Ot=0;Ot<nt;Ot++){var Mt=Fe[Ot];Mt.visible&&Mt!==Ye&&Mt.Sj(ae,a,fe,x,Me)&&(Pe=!0,Mt=(ae-Me.x)*(ae-Me.x)+(a-Me.y)*(a-Me.y),Mt<b&&(b=Mt,E.set(Me)))}return ft&&(y>b&&E.set(ot),Tt.free(ot)),Tt.free(Me),te&&E.transform(ne),Pe},st.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();en.prototype.Gj.call(this)},st.v=function(a){if(!iu(this)){en.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=ml(E,!1);(E instanceof il||E instanceof Wn||E instanceof ko||te!==Fn)&&E.v(!0)}}}},st.Uj=function(){if(!iu(this)){Js(this,!0),Hc(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},st.Uk=function(){if(!(this.l&2048)){Iu(this,!0),vu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},st.Wu=function(){vu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},st.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 Pe=this.O.s;Pe.length!==0&&this.na.measure(this,a,y,Pe,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),Os(E,a,fe),Os(this.naturalBounds,a,fe),this.Ge(0,0,a,fe)},st.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}st.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=ml(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 Pi:this.v(!0),this.measure(x+ae,te+ne,0,0);break;case ji:this.v(!0),this.measure(y+ae,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},st.gh=function(a){var y=this.naturalBounds,x=hh(this);if(Er(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Tt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(Qi(E.set(a),te.transform),te.ca(E)))return Tt.free(E),!0}return Tt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},st.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},st.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)}}st.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}st.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 fr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}st.se=function(){return!(this.type===Wn.TableRow||this.type===Wn.TableColumn)};function Oh(a){return a.type===Wn.TableRow||a.type===Wn.TableColumn}st.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),tl(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:Qi(Tt.allocAt(a.x,a.y),this.transform),ae=this.diagram,fe=10,Pe=5;if(ae!==null&&(fe=ae.Ql("extraTouchArea"),Pe=fe/2),Er(-(Pe*E),-(Pe*E),b.width+fe*E,b.height+fe*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var Me=E.length;if(ae=Tt.alloc(),Pe=(fe=this.isClipping&&this.na===Wn.Spot)?this.Pb():null,fe&&(Pe.se()?Qi(ae.set(a),Pe.transform):ae.set(a),!Pe.ca(ae)))return Tt.free(ae),te||Tt.free(ne),null;for(var Fe=hh(this);Me--;){var Ye=E[Me];if((Ye.visible||Ye===Fe)&&(Ye.se()?Qi(ae.set(a),Ye.transform):ae.set(a),!fe||Ye!==Pe)){var nt=null;if(Ye instanceof Wn?nt=Ye.ic(ae,y,x):Ye.pickable===!0&&Ye.ca(ae)&&(nt=Ye),nt!==null&&(y!==null&&(nt=y(nt)),nt!==null&&(x===null||x(nt))))return Tt.free(ae),te||Tt.free(ne),nt}}Tt.free(ae)}return this.background===null&&this.areaBackground===null?(te||Tt.free(ne),null):(a=Er(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||Tt.free(ne),a)}return te||Tt.free(ne),null},st.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:Qi(Tt.allocAt(a.x,a.y),this.transform);if(E=Er(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,Pe=Tt.alloc(),Me=hh(this);fe--;){var Fe=ae[fe];if(Fe.visible||Fe===Me){Fe.se()?Qi(Pe.set(a),Fe.transform):Pe.set(a);var Ye=Fe;Fe=Fe instanceof Wn?Fe:null,(Fe!==null?Fe.ji(Pe,y,x,b):Ye.ca(Pe))&&Ye.pickable!==!1&&(y!==null&&(Ye=y(Ye)),Ye===null||x!==null&&!x(Ye)||b.add(Ye))}}Tt.free(Pe)}return te||Tt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||Tt.free(ne),!1},st.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=gr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&gr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var ae=hh(this),fe=this.O.s,Pe=fe.length;Pe--;){var Me=fe[Pe];if(Me.visible||Me===ae){var Fe=Me.actualBounds,Ye=this.naturalBounds;Fe.x>Ye.width||Fe.y>Ye.height||0>Fe.x+Fe.width||0>Fe.y+Fe.height||(Fe=Me,Me=Me instanceof Wn?Me:null,Ye=gr.alloc(),Ye.set(ne),(Me!==null?Me.Cf(a,y,x,b,E,Ye):la(Fe,a,b,Ye))&&(y!==null&&(Fe=y(Fe)),Fe===null||x!==null&&!x(Fe)||E.add(Fe)),gr.free(Ye))}}return te===void 0&&gr.free(ne),b}return te===void 0&&gr.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))}}}st.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:Qi(Tt.allocAt(a.x,a.y),this.transform),Pe=ae?y:Qi(Tt.allocAt(y.x,y.y),this.transform),Me=fe.Bf(Pe),Fe=0<fe.x&&fe.x<ne.width&&0<fe.y&&fe.y<ne.height||Qr(fe.x,fe.y,0,0,0,ne.height)<=Me||Qr(fe.x,fe.y,0,ne.height,ne.width,ne.height)<=Me||Qr(fe.x,fe.y,ne.width,ne.height,ne.width,0)<=Me||Qr(fe.x,fe.y,ne.width,0,0,0)<=Me;if(ne=fe.zd(0,0)<=Me&&fe.zd(0,ne.height)<=Me&&fe.zd(ne.width,0)<=Me&&fe.zd(ne.width,ne.height)<=Me,ae||(Tt.free(fe),Tt.free(Pe)),Fe){if(!this.isAtomic){fe=Tt.alloc(),Pe=Tt.alloc(),Me=hh(this);for(var Ye=this.O.s,nt=Ye.length;nt--;){var ot=Ye[nt];if(ot.visible||ot===Me){var ft=ot.actualBounds,Ot=this.naturalBounds;(!ae||!(ft.x>Ot.width||ft.y>Ot.height||0>ft.x+ft.width||0>ft.y+ft.height))&&(ot.se()?(ft=ot.transform,Qi(fe.set(a),ft),Qi(Pe.set(y),ft)):(fe.set(a),Pe.set(y)),ft=ot,ot=ot instanceof Wn?ot:null,(ot!==null?ot.og(fe,Pe,x,b,E,te):ft.tx(fe,Pe,E))&&(x!==null&&(ft=x(ft)),ft===null||b!==null&&!b(ft)||te.add(ft)))}}Tt.free(fe),Tt.free(Pe)}return E?Fe:ne}return!1};function yv(a){var y=null;return a instanceof fr&&(y=a.spot1,y===so&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=$s),y}function Sv(a){var y=null;return a instanceof fr&&(y=a.spot2,y===so&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Ta),y}st.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},st.M=function(a){return this.O.M(a)},st.Gb=function(a,y){y instanceof Ti&&Ft("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Ft("Cannot make a Panel contain itself: "+this.toString()),Ft("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Ft("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 fr||Ft("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Wn.Graduated||y instanceof fr||y instanceof ko||Ft("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 hi),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 Ft("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 ii&&(x.Te=!0),x.Te&&x instanceof ii&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(us,"elements",this,y,null,b,null),x.cb(ps,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}st.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)},st.mb=function(a){0<=a&&this.pc(a,!0)},st.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),Js(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 ii&&(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(us,"elements",this,b,null,a,null))},st.Fb=function(a){0>a&&bn(a,">= 0",Wn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Qs;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(ps,"rowdefs",this,null,x,null,a)}return y[a]},st.oA=function(a){if(0>a&&bn(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(us,"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 Qs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}st.Eb=function(a){0>a&&bn(a,">= 0",Wn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Qs;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(ps,"coldefs",this,null,x,null,a)}return y[a]},st.jA=function(a){if(0>a&&bn(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(us,"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 Qs?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}st.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},st.Hy=function(a,y){return(a=this.Fb(a))&&Am(a,new Qs(y)),this},st.By=function(a,y){return(a=this.Eb(a))&&Am(a,new Qs(y)),this},st.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},st.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},st.Fz=function(a,y){if(y===void 0&&(y=new Tt(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)},st.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&&Ft("Template cannot have .data be non-null: "+a),a.allBindings=y=new On;else if(y._isFrozen)return;var x=new On;xv(a,!1),a.qm(a,function(Pe,Me){Me.th();var Fe=Me.localBindings;if(Fe!==null)for(Ef(Me,!1),Fe=Fe.iterator;Fe.next();){var Ye=Fe.value;Ye.mode===Dg&&Ef(Me,!0);var nt=Ye.sourceName;nt!==null&&(nt==="/"&&xv(Pe,!0),nt=LS(Ye,Pe,Me),nt!==null&&(x.add(nt),nt.srcBindings===null&&(nt.srcBindings=new On),nt.srcBindings.add(Ye))),y.add(Ye)}if(Me instanceof Wn&&Me.type===Wn.Table){if(0<Me.rowCount){for(Pe=Me.rowDefs,Fe=Pe.length,Ye=0;Ye<Fe;Ye++)if(nt=Pe[Ye],nt!==void 0&&nt.be!==null)for(var ot=nt.be.iterator;ot.next();){var ft=ot.value;ft.xd=nt,ft.to=2,ft.wl=nt.index,y.add(ft)}}if(0<Me.columnCount){for(Me=Me.colDefs,Pe=Me.length,Fe=0;Fe<Pe;Fe++)if(Ye=Me[Fe],Ye!==void 0&&Ye.be!==null)for(nt=Ye.be.iterator;nt.next();)ot=nt.value,ot.xd=Ye,ot.to=1,ot.wl=Ye.index,y.add(ot)}}});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 On),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):An('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Qs?(ne=Pr(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof en?(ne=Pr(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):Ft("Unknown type of binding target: "+te)}y.freeze(),a instanceof Ti&&a.Zc()&&a.Va()}st.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},st.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)}}},st.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 fr&&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}st.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),Pe=fe!==ae;Pe||(ae=Cv(a,ae),Pe=Cv(a,fe)!==ae),Pe?(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 ii&&(y.Te=!0),y.Te&&y instanceof ii&&(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 hi),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=Ns(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Ft("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,An('No item template Panel found for category "'+y+'" on '+a),An(" Using default item template."),a=new Wn,y=new ko,y.bind(new zs("text","",ri)),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)}et.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&&bn(a,">= 0",Wn,"padding"),a=new Ei(a)):(0>a.left&&bn(a.left,">= 0",Wn,"padding:value.left"),0>a.right&&bn(a.right,">= 0",Wn,"padding:value.right"),0>a.top&&bn(a.top,">= 0",Wn,"padding:value.top"),0>a.bottom&&bn(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:ba},set:function(a){typeof a=="number"&&(a=new Ei(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new xu),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 mo)&&(a instanceof mo&&a.freeze(),this.T===null&&(this.T=new xu),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 xu),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)||Ft("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 xu),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 mo)&&(a instanceof mo&&a.freeze(),this.T===null&&(this.T=new xu),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 xu),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)||Ft("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 xu),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 xu),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||Ft("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()||Ft("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),Ea(this)&&(a=this.part,a!==null&&Fo(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),Ea(this)&&(a=this.part,a!==null&&Fo(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 xu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new xu),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 xu),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 xu),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)&&Ft("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new xu),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)&&Ft("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new xu),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 Ti&&!(this instanceof Xr);Ru(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Yn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ti&&(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 hi}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ti||a.isPanelMain)&&Ft("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(););yr(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&&(yr(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 rr&&(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))}}}),et.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 hi;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 xu(){this.Pc=[],this.Oc=[],this.j=this.ob=Om,this.hb=this.Hb=0,this.Qp=ba,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}xu.prototype.copy=function(a){for(var y=new xu,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},xu.className="TablePanelSettings";function Qs(a){Sr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=so,this.pa=this.oc=this.oa=0,this.be=null,this.oo=_v,this.hg=sr,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))}Qs.prototype.copy=function(){var a=new Qs;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=Bn(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=Bn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}st=Qs.prototype,st.qb=function(a){a.classType===Qs&&(this.sizing=a)},st.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Pr(this)},st.wi=function(a){this.Me=a},st.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)},st.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)},st.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===_v){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}st.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new zs(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&Ft("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new On),this.be.add(E),this},et.Object.defineProperties(Qs.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&&bn(a,">= 0",Qs,"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&&bn(a,">= 0",Qs,"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))&&bn(a,">= 0",Qs,"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&&bn(a,">= 0",Qs,"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 Ei(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 mo&&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)||Ft("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 mo&&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}}}),Qs.prototype.computeEffectiveSpacing=Qs.prototype.Wc,Qs.prototype.computeEffectiveSpacingTop=Qs.prototype.Io;var _v=new an(Qs,"Default",0),pg=new an(Qs,"None",1),Om=new an(Qs,"ProportionalExtra",2);Qs.className="RowColumnDefinition",Qs.Default=_v,Qs.None=pg,Qs.ProportionalExtra=Om;function fr(a,y){en.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)}tt(fr,en),fr.prototype.cloneProtected=function(a){en.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=Bn(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())}st=fr.prototype,st.th=function(){en.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},st.qb=function(a){a===Fn||a===vi||a===Br||a===sr?this.geometryStretch=a:en.prototype.qb.call(this,a)},st.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Pr(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],Pe,Me,Fe,Ye,nt,ot,ft=0,Ot=Gn(),Mt=2;Mt<E;Mt+=2)Pe=x[Mt],Me=x[Mt+1],Fe=Pe-ae,ae=Me-fe,Fe===0&&(Fe=.001),Ye=ae/Fe,nt=Math.atan2(ae,Fe),ot=Math.sqrt(Fe*Fe+ae*ae),Ot.push([Fe,nt,Ye,ot]),ft+=ot,ae=Pe,fe=Me;ae=x[0],fe=x[1],Fe=b.measuredBounds.width,b instanceof fr&&(Fe-=b.strokeWidth),1>Fe&&(Fe=1),E=x=Fe,Pe=ne/2,Me=Pe!==0,Mt=0,ot=Ot[Mt],Fe=ot[0],nt=ot[1],Ye=ot[2],ot=ot[3];for(var Ht=0;.1<=ft;){if(Ht===0&&(Me?(E=x,E-=Pe,ft-=Pe,Me=!1):E=x,E===0&&(E=1)),E>ft){Jn(Ot);return}E>ot?(Ht=E-ot,E=ot):Ht=0;var Wt=Math.sqrt(E*E/(1+Ye*Ye));if(0>Fe&&(Wt=-Wt),ae+=Wt,fe+=Ye*Wt,a.translate(ae,fe),a.rotate(nt),a.translate(-(ne/2),-(te/2)),Ht===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-nt),a.translate(-ae,-fe),ft-=E,ot-=E,Ht!==0){if(Mt++,Mt===Ot.length){Jn(Ot);return}ot=Ot[Mt],Fe=ot[0],nt=ot[1],Ye=ot[2],ot=ot[3],E=Ht}}Jn(Ot)}}st.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&&xs(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 Xr&&ae.category==="Selection"&&ae.adornedObject instanceof fr&&ae.adornedPart.Pb()===ae.adornedObject?ae.adornedObject.strokeWidth:0),fe===0&&(x=null),x!==null&&fe!==0&&(xs(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===Qn.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===Qn.u){var Pe=E.startX;fe=E.startY;var Me=E.endX,Fe=E.endY;E=Math.min(Pe,Me);var Ye=Math.min(fe,Fe);Pe=Math.abs(Me-Pe),fe=Math.abs(Fe-fe),a.beginPath(),a.rect(E,Ye,Pe,fe),b!==null&&a.ng(b),x!==null&&(ae&&te&&Uc(a),a.jk(),ae&&te&&lh(a)),a.Se()}else if(E.type===Qn.F)Pe=E.startX,fe=E.startY,Me=E.endX,Fe=E.endY,E=Math.abs(Me-Pe)/2,Ye=Math.abs(Fe-fe)/2,Pe=Math.min(Pe,Me)+E,fe=Math.min(fe,Fe)+Ye,a.beginPath(),a.moveTo(Pe,fe-Ye),a.bezierCurveTo(Pe+rn.wg*E,fe-Ye,Pe+E,fe-rn.wg*Ye,Pe+E,fe),a.bezierCurveTo(Pe+E,fe+rn.wg*Ye,Pe+rn.wg*E,fe+Ye,Pe,fe+Ye),a.bezierCurveTo(Pe-rn.wg*E,fe+Ye,Pe-E,fe+rn.wg*Ye,Pe-E,fe),a.bezierCurveTo(Pe-E,fe-rn.wg*Ye,Pe-rn.wg*E,fe-Ye,Pe,fe-Ye),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===Qn.o)for(E=E.figures,fe=E.length,Ye=0;Ye<fe;Ye++){Pe=E.s[Ye],a.beginPath(),a.moveTo(Pe.startX,Pe.startY),Me=Pe.segments.s,Fe=Me.length;for(var nt=null,ot=0;ot<Fe;ot++){var ft=Me[ot];switch(ft.type){case Ps:a.moveTo(ft.endX,ft.endY);break;case wo:a.lineTo(ft.endX,ft.endY);break;case fa:a.bezierCurveTo(ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY);break;case fl:a.quadraticCurveTo(ft.point1X,ft.point1Y,ft.endX,ft.endY);break;case ss:if(ft.radiusX===ft.radiusY){var Ot=Math.PI/180;a.arc(ft.point1X,ft.point1Y,ft.radiusX,ft.startAngle*Ot,(ft.startAngle+ft.sweepAngle)*Ot,0>ft.sweepAngle,nt!==null?nt.endX:Pe.startX,nt!==null?nt.endY:Pe.startY)}else if(nt=Na(ft,Pe),Ot=nt.length,Ot===0)a.lineTo(ft.centerX,ft.centerY);else for(var Mt=0;Mt<Ot;Mt++){var Ht=nt[Mt];Mt===0&&a.lineTo(Ht[0],Ht[1]),a.bezierCurveTo(Ht[2],Ht[3],Ht[4],Ht[5],Ht[6],Ht[7])}break;case Cl:if(Mt=Ot=0,nt!==null&&nt.type===ss){if(nt=Na(nt,Pe),Ht=nt.length,Ht===0){a.lineTo(ft.endX,ft.endY);break}nt=nt[Ht-1]||null,nt!==null&&(Ot=nt[6],Mt=nt[7])}else Ot=nt!==null?nt.endX:Pe.startX,Mt=nt!==null?nt.endY:Pe.startY;if(nt=Ks(ft,Pe,Ot,Mt),Ot=nt.length,Ot===0){a.lineTo(ft.endX,ft.endY);break}for(Mt=0;Mt<Ot;Mt++)Ht=nt[Mt],a.bezierCurveTo(Ht[2],Ht[3],Ht[4],Ht[5],Ht[6],Ht[7]);break;default:Ft("Segment not of valid type: "+ft.type)}ft.isClosed&&a.closePath(),nt=ft}Me=Pe.isFilled,te?Pe.isShadowed?(Me===!0&&b!=="transparent"&&b!==null&&a.ng(b,Pe.isEvenOdd),x!==null&&(Me&&ae&&Uc(a),a.jk(),Me&&ae&&lh(a))):(Uc(a),Me&&b!=="transparent"&&b!==null&&a.ng(b,Pe.isEvenOdd),x!==null&&a.jk(),lh(a)):(Me&&b!==null&&a.ng(b,Pe.isEvenOdd),x!==null&&a.jk()),a.Se(Ye)}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===Qn.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===Qn.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,Ye=E,Pe=ae.segments.s,Me=Pe.length,Fe=0;Fe<Me;Fe++){switch(ot=Pe[Fe],ot.type){case Ps:pp(a,y,b,x),b.length=0,b.push(ot.endX),b.push(ot.endY),ne=ot.endX,E=ot.endY,fe=ne,Ye=E;break;case wo:b.push(ot.endX),b.push(ot.endY),ne=ot.endX,E=ot.endY;break;case fa:rn.Qe(ne,E,ot.point1X,ot.point1Y,ot.point2X,ot.point2Y,ot.endX,ot.endY,.5,b),ne=ot.endX,E=ot.endY;break;case fl:rn.ep(ne,E,ot.point1X,ot.point1Y,ot.endX,ot.endY,.5,b),ne=ot.endX,E=ot.endY;break;case ss:if(ft=Na(ot,ae),nt=ft.length,nt===0){b.push(ot.centerX),b.push(ot.centerY),ne=ot.centerX,E=ot.centerY;break}for(Ot=0;Ot<nt;Ot++)Mt=ft[Ot],rn.Qe(ne,E,Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,b),ne=Mt[6],E=Mt[7];break;case Cl:if(ft=Ks(ot,ae,ne,E),nt=ft.length,nt===0){b.push(ot.endX),b.push(ot.endY),ne=ot.endX,E=ot.endY;break}for(Ot=0;Ot<nt;Ot++)Mt=ft[Ot],rn.Qe(ne,E,Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,b),ne=Mt[6],E=Mt[7];break;default:Ft("Segment not of valid type: "+ot.type)}ot.isClosed&&(b.push(fe),b.push(Ye),pp(a,y,b,x))}pp(a,y,b,x)}else if(te.type===Qn.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===Qn.F){if(E=new Zs,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Wr(ss),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=Na(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++)Ye=te[fe],rn.Qe(ne,E,Ye[2],Ye[3],Ye[4],Ye[5],Ye[6],Ye[7],.5,b),ne=Ye[6],E=Ye[7];pp(a,y,b,x)}Jn(b),a.restore(),a.Vc(!1)}}}},st.kk=function(a,y,x){return!en.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)},st.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:en.prototype.nk.call(this,a)},st.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)}},st.ga=function(a,y){if(y===void 0&&(y=new Tt),a instanceof yi){a.Mc()&&Ft("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},st.mi=function(a){a===void 0&&(a=new Ln);var y=this.naturalBounds,x=this.oe;y=Ln.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=Tt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),ho(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),ho(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),ho(a,b.x,b.y,0,0),Ln.free(y),Tt.free(b),a},st.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!==Qn.j||y||(E+=2);var te=Ln.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return Ln.free(te),!1;if(b=E+1e-4,x.type===Qn.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:(Ln.free(te),rn.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Qn.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 Ln.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),Ln.free(te),a}if(x.type===Qn.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 Ln.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),Ln.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Qn.o)return Ln.free(te),this.fill===null?Wu(x,a.x,a.y,E):Mu(x,a,E,1<this.strokeWidth,y);Ft("Unknown Geometry type: "+x.type)},st.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 Pe=rn.Ze[ae];typeof Pe=="string"&&(Pe=rn.Ze[Pe]),typeof Pe=="function"?(fe=Pe(null,100,100),Ev[ae]=fe):Ft("Unsupported Figure: "+ae)}ne=fe.bounds}ae=ne.width,fe=ne.height,Pe=ne.width;var Me=ne.height;switch(ml(this,!0)){case Fn:b=x=0;break;case Un:Pe=Math.max(a-te,0),Me=Math.max(y-te,0);break;case Pi:Pe=Math.max(a-te,0),b=0;break;case ji:x=0,Me=Math.max(y-te,0)}isFinite(E.width)&&(Pe=E.width),isFinite(E.height)&&(Me=E.height);var Fe=this.maxSize,Ye=this.minSize;switch(x=Math.max(x-te,Ye.width),b=Math.max(b-te,Ye.height),Pe=Math.min(Fe.width,Pe),Me=Math.min(Fe.height,Me),Pe=isFinite(Pe)?Math.max(x,Pe):Math.max(ae,x),Me=isFinite(Me)?Math.max(b,Me):Math.max(fe,b),x=Pv(this),x){case Fn:break;case Un:ae=Pe,fe=Me;break;case vi:x=Math.min(Pe/ae,Me/fe),isFinite(x)||(x=1),ae*=x,fe*=x;break;default:Ft(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&&rn.$(this.ua.Sk,a-te)&&rn.$(this.ua.Rk,y-te)||(this.ua=fr.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),Pe+te,Me+te),E.w()?(Pe=E.width,Me=E.height,Pe=Math.min(Fe.width,Pe),Me=Math.min(Fe.height,Me),Pe=Math.max(Ye.width,Pe),Me=Math.max(Ye.height,Me),this.dc.h(0,0,Pe,Me)):this.dc.assign(ne)};function Pv(a){var y=a.geometryStretch;return a.Rd!==null?y===sr?Un:y:y===sr?Ev[a.figure].defaultStretch:y}st.eh=function(a,y,x,b){Va(this,a,y,x,b)},st.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},st.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,Pe=-te.m21*ne,Me=te.m11*ne,Fe=ne*(te.m21*te.dy-te.m22*te.dx),Ye=ne*(te.m12*te.dx-te.m11*te.dy);te=a*ae+y*Pe+Fe,ne=a*fe+y*Me+Ye,ae=x*ae+b*Pe+Fe,fe=x*fe+b*Me+Ye,Fe=this.ig/2,Pe=this.ua,Pe===null&&(this.measure(1/0,1/0),Pe=this.ua);var nt=Pe.bounds;if(Me=!1,Pe.type===Qn.j)if(1.5>=this.strokeWidth)Me=rn.Ve(Pe.startX,Pe.startY,Pe.endX,Pe.endY,te,ne,ae,fe,E);else{if(Pe.startX===Pe.endX?(b=Fe,Me=0):(y=(Pe.endY-Pe.startY)/(Pe.endX-Pe.startX),Me=Fe/Math.sqrt(1+y*y),b=Me*y),y=Gn(),a=new Tt,rn.Ve(Pe.startX+b,Pe.startY+Me,Pe.endX+b,Pe.endY+Me,te,ne,ae,fe,a)&&y.push(a),a=new Tt,rn.Ve(Pe.startX-b,Pe.startY-Me,Pe.endX-b,Pe.endY-Me,te,ne,ae,fe,a)&&y.push(a),a=new Tt,rn.Ve(Pe.startX+b,Pe.startY+Me,Pe.startX-b,Pe.startY-Me,te,ne,ae,fe,a)&&y.push(a),a=new Tt,rn.Ve(Pe.endX+b,Pe.endY+Me,Pe.endX-b,Pe.endY-Me,te,ne,ae,fe,a)&&y.push(a),ae=y.length,ae===0)return Jn(y),!1;for(Me=!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);Jn(y)}else if(Pe.type===Qn.u)Me=rn.Ff(nt.x-Fe,nt.y-Fe,nt.x+nt.width+Fe,nt.y+nt.height+Fe,te,ne,ae,fe,E);else if(Pe.type===Qn.F){y=Ln.allocAt(nt.x,nt.y,nt.width,nt.height).Bc(Fe,Fe);e:if(y.width===0)Me=rn.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,ae,fe,E);else if(y.height===0)Me=rn.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,ae,fe,E);else{if(a=y.width/2,Pe=y.height/2,b=y.x+a,Me=y.y+Pe,x=9999,te!==ae&&(x=(ne-fe)/(te-ae)),9999>Math.abs(x)){if(fe=ne-Me-x*(te-b),0>a*a*x*x+Pe*Pe-fe*fe){E.x=NaN,E.y=NaN,Me=!1;break e}Fe=Math.sqrt(a*a*x*x+Pe*Pe-fe*fe),ae=(-(a*a*x*fe)+a*Pe*Fe)/(Pe*Pe+a*a*x*x)+b,a=(-(a*a*x*fe)-a*Pe*Fe)/(Pe*Pe+a*a*x*x)+b,Pe=x*(ae-b)+fe+Me,fe=x*(a-b)+fe+Me,Math.abs((te-ae)*(te-ae))+Math.abs((ne-Pe)*(ne-Pe))<Math.abs((te-a)*(te-a))+Math.abs((ne-fe)*(ne-fe))?(E.x=ae,E.y=Pe):(E.x=a,E.y=fe)}else{if(ae=Pe*Pe,fe=te-b,ae-=ae/(a*a)*fe*fe,0>ae){E.x=NaN,E.y=NaN,Me=!1;break e}fe=Math.sqrt(ae),ae=Me+fe,fe=Me-fe,Math.abs(ae-ne)<Math.abs(fe-ne)?(E.x=te,E.y=ae):(E.x=te,E.y=fe)}Me=!0}Ln.free(y)}else if(Pe.type===Qn.o){Ye=Tt.alloc();var ot=ae-te,ft=fe-ne,Ot=ot*ot+ft*ft,Mt=te,Ht=ne;if(0<Ot&&nt.contains(Mt,Ht)&&(Ye.x=Mt,Ye.y=Ht,this.ca(Ye)))for(ot!==0&&.5>Math.abs(ot)?(ft*=.5/ot,ot=.5):ft!==0&&.5>Math.abs(ft)&&(ot*=.5/ft,ft=.5),Mt-=ot,Ht-=ft;nt.contains(Mt,Ht);)Mt-=ot,Ht-=ft;for(E.x=ae,E.y=fe,ft=0;ft<Pe.figures.count;ft++){var Wt=Pe.figures.s[ft],Kt=Wt.isFilled?Mt:te,Qt=Wt.isFilled?Ht:ne,gn=Wt.segments;nt=Wt.startX,ot=Wt.startY;for(var ni=nt,fi=ot,ui=0;ui<gn.count;ui++){var $n=gn.s[ui],Rn=$n.type,nr=$n.endX,$i=$n.endY,eo=!1;switch(Rn){case Ps:ni=nr,fi=$i;break;case wo:eo=Dm(nt,ot,nr,$i,Kt,Qt,ae,fe,Ye);break;case fa:eo=rn.Eo(nt,ot,$n.point1X,$n.point1Y,$n.point2X,$n.point2Y,nr,$i,Kt,Qt,ae,fe,.6,Ye);break;case fl:eo=rn.Eo(nt,ot,nt+2/3*($n.point1X-nt),ot+2/3*($n.point1Y-ot),nr+2/3*($n.point1X-nr),$i+2/3*($n.point1Y-$i),nr,$i,Kt,Qt,ae,fe,.6,Ye);break;case ss:case Cl:Rn=$n.type===ss?Na($n,Wt):Ks($n,Wt,nt,ot);var Mo=Rn.length;if(Mo===0){eo=Dm(nt,ot,$n.type===ss?$n.centerX:$n.endX,$n.type===ss?$n.centerY:$n.endY,Kt,Qt,ae,fe,Ye);break}for($i=null,nr=0;nr<Mo;nr++){if($i=Rn[nr],nr===0&&Dm(nt,ot,$i[0],$i[1],Kt,Qt,ae,fe,Ye)){var ua=Im(Kt,Qt,Ye,Ot,E);ua<Ot&&(Ot=ua,Me=!0)}rn.Eo($i[0],$i[1],$i[2],$i[3],$i[4],$i[5],$i[6],$i[7],Kt,Qt,ae,fe,.6,Ye)&&(ua=Im(Kt,Qt,Ye,Ot,E),ua<Ot&&(Ot=ua,Me=!0))}nr=$i[6],$i=$i[7];break;default:Ft("Unknown Segment type: "+Rn)}nt=nr,ot=$i,eo&&(eo=Im(Kt,Qt,Ye,Ot,E),eo<Ot&&(Ot=eo,Me=!0)),$n.isClosed&&(nr=ni,$i=fi,Dm(nt,ot,nr,$i,Kt,Qt,ae,fe,Ye)&&($n=Im(Kt,Qt,Ye,Ot,E),$n<Ot&&(Ot=$n,Me=!0)))}}te=x-a,ne=b-y,ae=Math.sqrt(te*te+ne*ne),ae!==0&&(te/=ae,ne/=ae),E.x-=te*Fe,E.y-=ne*Fe,Tt.free(Ye)}else Ft("Unknown Geometry type: "+Pe.type);return Me?(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(rn.$(a,x)&&rn.$(y,b)||rn.$(E,ne)&&rn.$(te,ae))return!1;var Pe=!1,Me=(E-ne)*(y-b)-(te-ae)*(a-x);return Me===0?!1:(fe.x=((E*ae-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/Me,fe.y=((E*ae-te*ne)*(y-b)-(te-ae)*(a*b-y*x))/Me,(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||rn.$(fe.y,a))&&(fe.y<y||rn.$(fe.y,y))&&(Pe=!0)):(y=a<x?a:x,a=a<x?x:a,(fe.x>y||rn.$(fe.x,y))&&(fe.x<a||rn.$(fe.x,a))&&(Pe=!0)),Pe)}st.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=Tt.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)))),Tt.free(te),E},st.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=gr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=Tt.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 Tt.free(ne),!0;var ae=Tt.alloc(),fe=Tt.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)))),Tt.free(ne),gr.free(x),Tt.free(ae),Tt.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)}st.tx=function(a,y,x){function b(Ot,Mt){for(var Ht=Ot.length,Wt=0;Wt<Ht;Wt+=2)if(Mt.zd(Ot[Wt],Ot[Wt+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,Pe=ne.x+ne.width;if(ne=ne.y+ne.height,Gi(a.x,a.y,ae,fe)<=E&&Gi(a.x,a.y,Pe,fe)<=E&&Gi(a.x,a.y,ae,ne)<=E&&Gi(a.x,a.y,Pe,ne)<=E)return!0}if(ae=y.startX,fe=y.startY,Pe=y.endX,ne=y.endY,y.type===Qn.j){if(x=(ae-Pe)*(a.x-Pe)+(fe-ne)*(a.y-ne),Qr(a.x,a.y,ae,fe,Pe,ne)<=(0<=(Pe-ae)*(a.x-ae)+(ne-fe)*(a.y-fe)&&0<=x?E:te))return!0}else{if(y.type===Qn.u)return y=!1,x&&(y=Qr(a.x,a.y,ae,fe,ae,ne)<=E||Qr(a.x,a.y,ae,fe,Pe,fe)<=E||Qr(a.x,a.y,Pe,fe,Pe,ne)<=E||Qr(a.x,a.y,ae,ne,Pe,ne)<=E),y;if(y.type===Qn.F){y=a.x-(ae+Pe)/2,te=a.y-(fe+ne)/2;var Me=Math.abs(Pe-ae)/2,Fe=Math.abs(ne-fe)/2;if(Me===0||Fe===0)return Qr(a.x,a.y,ae,fe,Pe,ne)<=E;if(x){if(a=rn.$y(Me,Fe,y,te),a*a<=E)return!0}else return!(Gi(y,te,-Me,0)>=E||Gi(y,te,0,-Fe)>=E||Gi(y,te,0,Fe)>=E||Gi(y,te,Me,0)>=E)}else if(y.type===Qn.o){if(Pe=y.bounds,te=Pe.x,ae=Pe.y,fe=Pe.x+Pe.width,Pe=Pe.y+Pe.height,a.x>fe&&a.x<te&&a.y>Pe&&a.y<ae&&Qr(a.x,a.y,te,ae,te,Pe)>E&&Qr(a.x,a.y,te,ae,fe,ae)>E&&Qr(a.x,a.y,fe,Pe,te,Pe)>E&&Qr(a.x,a.y,fe,Pe,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,Me=te.startY,a.zd(ne,Me)>E)return!1;for(ae=te.segments.s,fe=ae.length,Pe=0;Pe<fe;Pe++)switch(Fe=ae[Pe],Fe.type){case Ps:case wo:if(ne=Fe.endX,Me=Fe.endY,a.zd(ne,Me)>E)return!1;break;case fa:var Ye=Gn();if(rn.Qe(ne,Me,Fe.point1X,Fe.point1Y,Fe.point2X,Fe.point2Y,Fe.endX,Fe.endY,.8,Ye),ne=b(Ye,a),Jn(Ye),ne||(ne=Fe.endX,Me=Fe.endY,a.zd(ne,Me)>E))return!1;break;case fl:if(Ye=Gn(),rn.ep(ne,Me,Fe.point1X,Fe.point1Y,Fe.endX,Fe.endY,.8,Ye),ne=b(Ye,a),Jn(Ye),ne||(ne=Fe.endX,Me=Fe.endY,a.zd(ne,Me)>E))return!1;break;case ss:case Cl:Ye=Fe.type===ss?Na(Fe,te):Ks(Fe,te,ne,Me);var nt=Ye.length;if(nt===0){if(ne=Fe.type===ss?Fe.centerX:Fe.endX,Me=Fe.type===ss?Fe.centerY:Fe.endY,a.zd(ne,Me)>E)return!1;break}Fe=null;for(var ot=Gn(),ft=0;ft<nt;ft++)if(Fe=Ye[ft],ot.length=0,rn.Qe(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5],Fe[6],Fe[7],.8,ot),b(ot,a))return Jn(ot),!1;Jn(ot),Fe!==null&&(ne=Fe[6],Me=Fe[7]);break;default:Ft("Unknown Segment type: "+Fe.type)}}return!0}}}return!1},st.qc=function(){this.ua=null},st.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=Gs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new yi(1-Gs.x,Gs.y)))}fr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Wc[a.toArrow];else a.fromArrow!=="None"?b=Wc[a.fromArrow]:(b=rn.Ze[a.figure],typeof b=="string"&&(b=rn.Ze[b]),b===void 0&&Ft("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=rn.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 rn.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Qn.parse(rn.um[b],!1),Wc[b]=a,x!==b&&(Wc[x]=b),b}}return typeof y=="string"?y:y instanceof Qn?a:null}et.Object.defineProperties(fr.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),Ea(this)&&(a=this.part,a!==null&&Fo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Qn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Tt.allocAt(-y.x,-y.y),Tt.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 mo&&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 mo&&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 bn(a,"value >= 0",fr,"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"?bn(a,'"butt", "round", or "square"',fr,"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"?bn(a,'"miter", "bevel", or "round"',fr,"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)||Ft("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=rn.Ze[a];typeof x=="function"?x=a:(x=rn.Ze[a.toLowerCase()])||Ft("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?Ft("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?Ft("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:so},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:so},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:sr},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))}}}),fr.prototype.intersectsRect=fr.prototype.Yc,fr.prototype.containedInRect=fr.prototype.fh,fr.prototype.getNearestIntersectionPoint=fr.prototype.rs,fr.prototype.getDocumentBounds=fr.prototype.mi,fr.prototype.getDocumentPoint=fr.prototype.ga;var Wc=new pi,Ev=new pi;fr.className="Shape",fr.getFigureGenerators=function(){var a=new hi,y;for(y in rn.Ze)y!==y.toLowerCase()&&a.add(y,rn.Ze[y]);return a.freeze(),a},fr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=rn.Ze;b[a]=y,b[x]=a},fr.getArrowheadGeometries=function(){var a=new hi;for(b in rn.um)if(Wc[b]===void 0){var y=Qn.parse(rn.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 Qn&&a.add(x,b)}return a.freeze(),a},fr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Qn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Ft("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=sr,this.gg=this.fg=so}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 ko(a,y){return en.call(this),zm||(vl=gs?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}tt(ko,en),ko.prototype.cloneProtected=function(a){en.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())}st=ko.prototype,st.th=function(){en.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}st.qb=function(a){a.classType===ko?this.wrap=a:en.prototype.qb.call(this,a)},st.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},st.v=function(){en.prototype.v.call(this)},st.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 Pe=this.isStrikethrough;xs(this,a,this.xc,!0,!1,x,b),(fe||Pe)&&xs(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var Me=this.oe,Fe=Me.dx-(ne*Me.m21+Me.dx);Me=Me.dy-(ne*Me.m22+Me.dy);var Ye=y.scale;switch(8>(Fe*Fe+Me*Me)*Ye*Ye&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof zl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Fe=this.spacingBelow,this.flip){case Ur:a.translate(E,0),a.scale(-1,1);break;case br:a.translate(0,te),a.scale(1,-1);break;case bo:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),Me=this.Gc,Ye=(y+ne+Fe)*Me,te>Ye&&(b=this.verticalAlignment,b=b.y*te-b.y*Ye+b.offsetY),Me===1&&this.ze!==null)Fe=this.Cb,Fe>E&&(Fe=E),this.Oj(this.ze,a,0,b+y,E,ne,Fe,x,ae,fe,Pe);else if(this.Qc!==null&&this.Qb!==null)for(Ye=0;Ye<Me;Ye++){var nt=this.Qc[Ye];nt>E&&(nt=E),b+=y,this.Oj(this.Qb[Ye],a,0,b,E,ne,nt,x,ae,fe,Pe),b+=ne+Fe}switch(this.flip){case Ur:a.scale(-1,1),a.translate(-E,0);break;case br:a.scale(1,-1),a.translate(0,-te);break;case bo:a.scale(-1,-1),a.translate(-E,-te)}}},st.Oj=function(a,y,x,b,E,te,ne,ae,fe,Pe,Me){var Fe=0;if(ae)fe==="left"?Fe=0:fe==="right"?Fe=E-ne:fe==="center"&&(Fe=(E-ne)/2),y.fillRect(x+Fe,b+.25*te,ne,1);else{if(fe==="left"?Fe=0:fe==="right"?Fe=E:fe==="center"&&(Fe=E/2),E=Rm!==null?Rm(this,te):.75*te,y.fillText(a,x+Fe,b+E),a=te/20|0,a===0&&(a=1),fe==="right"?Fe-=ne:fe==="center"&&(Fe-=ne/2),Pe){ae=Bm!==null?Bm(this,te):.8*te,fe=x+Fe,Pe=b+ae,E=x+Fe+ne,ae=b+ae;var Ye=a;y.beginPath(),y.lineWidth=Ye,y.moveTo(fe,Pe),y.lineTo(E,ae),y.stroke(),y.Se(),y instanceof zl&&y.ad.classList.add("gojs-td")}Me&&(Me=b+te-te/2.2|0,a%2!==0&&(Me+=.5),b=x+Fe,te=Me,x=x+Fe+ne,ne=Me,Fe=a,y.beginPath(),y.lineWidth=Fe,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof zl&&y.ad.classList.add("gojs-td"))}},st.kk=function(a,y,x){if(!en.prototype.kk.call(this,a,y,x))return!1;if(xs(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},st.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:en.prototype.nk.call(this,a)},st.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)}},st.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;vl!==null&&E1!==te&&(E1=vl.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 Pe=te.indexOf(`
|
|
|
`,ae);Pe===-1&&(Pe=te.length,fe=!0),ae=te.substr(ae,Pe-ae),this.formatting===vg&&(ae=ae.trim()),ne=Math.max(ne,Yu(ae)),ae=Pe+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,Pe=this.spacingAbove+this.spacingBelow,Pe=Math.max(0,mg(this)+Pe),fe=Math.min(this.maxLines-1,Math.max(Math.floor(fe/Pe+.01)-1,0)),!(fe+1>=this.Qb.length))){for(this.l|=16777216,Pe=this.Qb[fe],y=Math.max(1,a-y);Yu(Pe)>y&&1<Pe.length;)Pe=Pe.substr(0,Pe.length-1);Pe+=yg,y=Yu(Pe),this.Qb[fe]=Pe,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),Os(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},st.eh=function(a,y,x,b){Va(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 Pe=Yu(y);if(fe===0||Pe<=x)a.Cb=Math.max(a.Cb,Pe),gg(a,y,a.Cb),b!==null&&b.h(Pe,ae);else{for(te=gp(a,ne),ne=ne.substr(te.length),y=gp(a,ne),Pe=Yu(te+y);0<y.length&&Pe<=x;)te+=y,ne=ne.substr(y.length),y=gp(a,ne),Pe=te+y,E&&(Pe=Pe.trim()),Pe=Yu(Pe);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 Me=Yu(te);a.Cb=Me,gg(a,te,Me),b!==null&&b.h(Me,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 Fe=1;for(Pe=Yu(y.substr(0,Fe)),Me=0;Pe<=x;)Fe++,Me=Pe,Pe=Yu(y.substr(0,Fe));if(Fe===1){var Ye=Pe;te=Math.max(te,Pe)}else Ye=Me,te=Math.max(te,Me);if(Fe--,1>Fe&&(Fe=1),gg(a,y.substr(0,Fe),Ye),fe++,y=y.substr(Fe),a.Gc+fe>a.maxLines)break}for(Me=gp(a,ne),Pe=Yu(y+Me);0<Me.length&&Pe<=x;)y+=Me,ne=ne.substr(Me.length),Me=gp(a,ne),Pe=y+Me,E&&(Pe=Pe.trim()),Pe=Yu(Pe);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),Me.length===0?(Fe=Pe,te=Math.max(te,Pe)):(Fe=Me=Yu(y),te=Math.max(te,Me)),gg(a,y,Fe),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===_1&&(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 vl===null?8*a.length:vl.measureText(a).width}function mg(a){if(a.df!==null)return a.df;var y=a.Ae;if(vl===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>P1?x=Nv[y]:(x=1.3*vl.measureText("M").width,Nv[y]=x,P1++),a.df=x}function x1(a){if(vl===null)return 6;if(jm[a]!==void 0&&5e3>Ov)var y=jm[a];else y=vl.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}et.Object.defineProperties(ko.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:ia},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Ac(this),this.da.Yr=a,el(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),Os(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 mo&&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&&bn(a,"> 0",ko,"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 an(ko,"None",0),b1=new an(ko,"WrapFit",1),kv=new an(ko,"WrapDesiredSize",2),C1=new an(ko,"WrapBreakAll",3),Av=new an(ko,"OverflowClip",0),Fm=new an(ko,"OverflowEllipsis",1),vg=new an(ko,"FormatTrim",0),_1=new an(ko,"FormatNone",0),xx=/[ \u200b\u00ad]/,Nv=new pi,P1=0,jm=new pi,Ov=0,yg="...",E1="",vl=null,zm=!1;ko.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=ia,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},ko.getEllipsis=function(){return yg},ko.setEllipsis=function(a){yg=a,jm=new pi,Ov=0},ko.getBaseline=function(){return Rm},ko.setBaseline=function(a){Rm=a},ko.getUnderline=function(){return Bm},ko.setUnderline=function(a){Bm=a},ko.isValidFont=function(a){if(zm||(vl=gs?new Du(null).context:null,zm=!0),vl===null)return!0;var y=vl.font;if(a===y||a==="10px sans-serif")return!0;vl.font="10px sans-serif",vl.font=a;var x=vl.font;if(x!=="10px sans-serif")return vl.font=y,!0;vl.font="19px serif";var b=vl.font;return vl.font=a,x=vl.font,vl.font=y,x!==b},ko.FormatNone=_1,ko.FormatTrim=vg,ko.None=Tv,ko.OverflowClip=Av,ko.OverflowEllipsis=Fm,ko.WrapBreakAll=C1,ko.WrapDesiredSize=kv,ko.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 yl(a,y){en.call(this),this.Eg=null,this.qo="",this.Xg=io,this.Nk=Un,this.Zg=this.Hd=null,this.Mk=Fr,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;tt(yl,en),yl.prototype.cloneProtected=function(a){en.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},yl.prototype.qb=function(a){a===Fn||a===vi||a===Br?this.imageStretch=a:en.prototype.qb.call(this,a)},yl.prototype.toString=function(){return"Picture("+this.source+")#"+Pr(this)};function vp(a){a===void 0&&(a=""),a!==""?mp[a]&&(delete mp[a],Hm--):(mp=new pi,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()||(Js(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);Jn(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}yl.prototype.hA=function(){if(this.source!==""){vp(this.source);var a=this.source;this.source="",this.source=a}},yl.prototype.redraw=function(){this.N(),this.Uc=!0},yl.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 zl;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 Pe=fe,Me=ae;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,fe=this.Xg.width,ae=this.Xg.height);var Fe=fe,Ye=ae,nt=this.Nk,ot=this.Mk;switch(nt){case Fn:if(this.sourceRect.w())break;Fe>=b.width&&(te=te+ot.offsetX+(Fe*ot.x-b.width*ot.x)),Ye>=b.height&&(ne=ne+ot.offsetY+(Ye*ot.y-b.height*ot.y)),fe=Math.min(b.width,Fe),ae=Math.min(b.height,Ye);break;case Un:Fe=b.width,Ye=b.height;break;case vi:case Br:nt===vi?(nt=Math.min(b.height/Ye,b.width/Fe),Fe*=nt,Ye*=nt):nt===Br&&(nt=Math.max(b.height/Ye,b.width/Fe),Fe*=nt,Ye*=nt,Fe>=b.width&&(te=(te+ot.offsetX+(Fe*ot.x-b.width*ot.x)/Fe)*fe),Ye>=b.height&&(ne=(ne+ot.offsetY+(Ye*ot.y-b.height*ot.y)/Ye)*ae),fe*=1/(Fe/b.width),ae*=1/(Ye/b.height),Fe=b.width,Ye=b.height)}nt=this.Df()*y.scale;var ft=Fe*nt*Ye*nt,Ot=fe*ae/ft,Mt=x.__goCache;nt=null;var Ht=wx;if(!E){if(x.sq&&Mt!==void 0&&4<ft&&Ot>Ht*Ht)for(Mt.gi===null&&(T1(Mt,4,Pe,Me,x),T1(Mt,16,Pe,Me,x)),E=Mt.gi,Pe=E.length,Me=0;Me<Pe&&E[Me].ratio*E[Me].ratio<Ot;Me++)nt=E[Me];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(Wt){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Wt){this.vl=!0}}if(this.vl)return}}switch(E=Fe<b.width?ot.offsetX+(b.width*ot.x-Fe*ot.x):0,ot=Ye<b.height?ot.offsetY+(b.height*ot.y-Ye*ot.y):0,this.flip){case Ur:a.translate(Math.min(b.width,Fe),0),a.scale(-1,1);break;case br:a.translate(0,Math.min(b.height,Ye)),a.scale(1,-1);break;case bo:a.translate(Math.min(b.width,Fe),Math.min(b.height,Ye)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Mt!==void 0&&nt!==null&&nt.ratio!==1){a.save(),y=nt.ratio;try{a.drawImage(nt.source,te/y,ne/y,Math.min(nt.source.width,fe/y),Math.min(nt.source.height,ae/y),E,ot,Math.min(b.width,Fe),Math.min(b.height,Ye)),a instanceof zl&&(this.bt=[te/y,ne/y,Math.min(nt.source.width,fe/y),Math.min(nt.source.height,ae/y),E,ot,Math.min(b.width,Fe),Math.min(b.height,Ye)])}catch(Wt){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,fe,ae,E,ot,Math.min(b.width,Fe),Math.min(b.height,Ye)),a instanceof zl&&(this.bt=[te,ne,fe,ae,E,ot,Math.min(b.width,Fe),Math.min(b.height,Ye)])}catch(Wt){this.en=!1}switch(this.flip){case Ur:a.scale(-1,1),a.translate(-Math.min(b.width,Fe),0);break;case br:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ye));break;case bo:a.scale(-1,-1),a.translate(-Math.min(b.width,Fe),-Math.min(b.height,Ye))}}}}},yl.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=ml(this,!0),ne=this.Eg,ae=this.qn,fe=0,Pe=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,Pe=ae?+ne.height:ne.naturalHeight),isFinite(E.width)||te===Un||te===Pi?(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===ji?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=Pe)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:Pe),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)),Os(this.dc,a,y),this.Ge(0,0,a,y)},yl.prototype.eh=function(a,y,x,b){Va(this,a,y,x,b)},et.Object.defineProperties(yl.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||Ft("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 In),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()||(Js(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(gs){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Hm&&(vp(),x=mp),b=wn("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}}}),yl.prototype.redraw=yl.prototype.redraw,yl.prototype.reloadSource=yl.prototype.hA;var Hm=0,wx=4;yl.className="Picture",mp=new pi,yl.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 Qn,this.mc=null}yp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Qn,this.mc=null};function Sp(a,y,x,b,E,te){a.mc=new Zs,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 Wr(Ps);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 Wr(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 Wr(fa);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 Wr(fl);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 Wr(ss);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 Wr(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 Fa(a,y){var x=a.toLowerCase(),b=rn.Ze;b[a]=y,b[x]=a}Fa("Rectangle",function(a,y,x){a="r"+y+","+x;var b=rn.Mf[a];return b!==void 0||(b=new Qn(Qn.u),b.endX=y,b.endY=x,rn.Nf<rn.vm&&(rn.Mf[a]=b,rn.Nf++)),b}),Fa("Square",function(a,y,x){a="s"+y+","+x;var b=rn.Mf[a];return b!==void 0||(b=new Qn(Qn.u),b.endX=y,b.endY=x,b.defaultStretch=vi,rn.Nf<rn.vm&&(rn.Mf[a]=b,rn.Nf++)),b}),Fa("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=rn.Mf[b];if(E!==void 0)return E;var te=a*rn.wg;return E=new Qn().add(new Zs(a,0,!0).add(new Wr(wo,y-a,0)).add(new Wr(fa,y,a,y-te,0,y,te)).add(new Wr(wo,y,x-a)).add(new Wr(fa,y-a,x,y,x-te,y-te,x)).add(new Wr(wo,a,x)).add(new Wr(fa,0,x-a,te,x,0,x-te)).add(new Wr(wo,0,a)).add(new Wr(fa,a,0,0,te,te,0).close())),1<te&&(E.spot1=new yi(0,0,te,te),E.spot2=new yi(1,1,-te,-te)),rn.Nf<rn.vm&&(rn.Mf[b]=E,rn.Nf++),E}),Fa("Border","RoundedRectangle"),Fa("Ellipse",function(a,y,x){a="e"+y+","+x;var b=rn.Mf[a];return b!==void 0||(b=new Qn(Qn.F),b.endX=y,b.endY=x,b.spot1=Yl,b.spot2=Rl,rn.Nf<rn.vm&&(rn.Mf[a]=b,rn.Nf++)),b}),Fa("Circle",function(a,y,x){a="c"+y+","+x;var b=rn.Mf[a];return b!==void 0||(b=new Qn(Qn.F),b.endX=y,b.endY=x,b.spot1=Yl,b.spot2=Rl,b.defaultStretch=vi,rn.Nf<rn.vm&&(rn.Mf[a]=b,rn.Nf++)),b}),Fa("TriangleRight",function(a,y,x){return new Qn().add(new Zs(0,0).add(new Wr(wo,y,.5*x)).add(new Wr(wo,0,x).close())).pm(0,.25,.5,.75)}),Fa("TriangleDown",function(a,y,x){return new Qn().add(new Zs(0,0).add(new Wr(wo,y,0)).add(new Wr(wo,.5*y,x).close())).pm(.25,0,.75,.5)}),Fa("TriangleLeft",function(a,y,x){return new Qn().add(new Zs(y,x).add(new Wr(wo,0,.5*x)).add(new Wr(wo,y,0).close())).pm(.5,.25,1,.75)}),Fa("TriangleUp",function(a,y,x){return new Qn().add(new Zs(y,x).add(new Wr(wo,0,x)).add(new Wr(wo,.5*y,0).close())).pm(.25,.5,.75,1)}),Fa("Triangle","TriangleUp"),Fa("Diamond",function(a,y,x){return new Qn().add(new Zs(.5*y,0).add(new Wr(wo,0,.5*x)).add(new Wr(wo,.5*y,x)).add(new Wr(wo,y,.5*x).close())).pm(.25,.25,.75,.75)}),Fa("LineH",function(a,y,x){return a=new Qn(Qn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Fa("LineV",function(a,y,x){return a=new Qn(Qn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Fa("None","Rectangle"),Fa("BarH","Rectangle"),Fa("BarV","Rectangle"),Fa("MinusLine","LineH"),Fa("PlusLine",function(a,y,x){return new Qn().add(new Zs(0,x/2,!1).add(new Wr(wo,y,x/2)).add(new Wr(Ps,y/2,0)).add(new Wr(wo,y/2,x)))}),Fa("XLine",function(a,y,x){return new Qn().add(new Zs(0,x,!1).add(new Wr(wo,y,0)).add(new Wr(Ps,0,0)).add(new Wr(wo,y,x)))}),Fa("LineRight",function(a,y,x){return new Qn().add(new Zs(.25*y,0,!1).add(new Wr(wo,.75*y,.5*x)).add(new Wr(wo,.25*y,x)))}),Fa("LineDown",function(a,y,x){return new Qn().add(new Zs(0,.25*x,!1).add(new Wr(wo,.5*y,.75*x)).add(new Wr(wo,y,.25*x)))}),Fa("LineLeft",function(a,y,x){return new Qn().add(new Zs(.75*y,0,!1).add(new Wr(wo,.25*y,.5*x)).add(new Wr(wo,.75*y,x)))}),Fa("LineUp",function(a,y,x){return new Qn().add(new Zs(0,.75*x,!1).add(new Wr(wo,.5*y,.25*x)).add(new Wr(wo,y,.75*x)))}),rn.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=Ls,this.ir=null,this.jr="",this.lr=so,this.Gq="",this.Hq=$s,this.Pq=Po,this.Kq=Wo,this.Up=null,this.Cq=127,this.zr=Co,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 Ti(a,y){a===void 0||a instanceof oa||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 Tt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Ln,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}tt(Ti,Wn),Ti.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},st=Ti.prototype,st.Af=function(a){Wn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},st.toString=function(){var a=Dn(this.constructor)+"#"+Pr(this);return this.data!==null&&(a+="("+ri(this.data)+")"),a};function Sl(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}st.th=function(){Wn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},st.gk=function(a,y,x,b,E,te,ne){var ae=this.diagram;ae!==null&&(a===ps&&y==="elements"?E instanceof Wn?qd(E,function(fe){ly(ae.partManager,fe),Zd(ae,fe)}):sd(ae,E):a===us&&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))},st.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)}},Ti.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ti.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ti.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 hi),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)))}}},Ti.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)}},Ti.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]);Jn(y)}},Ti.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 rr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Xr))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(_x(this,a),y=this.adornments;y.next();)y.value.La()}},Ti.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 _x(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=Ln.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),Ln.free(b),Fv(a,!1)}}Ti.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new gr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},Ti.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Fr;this.locationSpot.sb()&&(te=this.locationSpot);var ne=Tt.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),Tt.free(ne)}},Ti.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ti.prototype.moveTo=function(a,y,x){a=Tt.allocAt(a,y),this.move(a,x),Tt.free(a)},Ti.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())},Ti.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())},Ti.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new hi),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 Tt),x=x.Mc()?Fr: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}Ti.prototype.mi=function(a){return a===void 0&&(a=new Ln),a.assign(this.actualBounds)},Ti.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=Tt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof fr?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}Ti.prototype.arrange=function(){if(tl(this)===!1)N1(this);else{Hc(this,!1);var a=this.Ib,y=Ln.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()||rn.B(y.width,a.width)&&rn.B(y.height,a.height)||0<=this.vw&&this.C(16),Ln.free(y),Fv(this,!1)}},st=Ti.prototype,st.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=Ln.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),Ln.free(E)}!(this.G&65536)&&a.D(y)||F1(this,b,x),x.N(),!a.w()&&!y.w()||vs(a,y)||(this instanceof ii&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},st.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 Tt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),cd(this)===!1&&tl(this)===!1&&(Wm(this),N1(this)),!0};function I1(a,y,x,b,E){y===null||a instanceof Xr||(y=y.animationManager,y.zb&&_l(y,a,new Tt(b,E),x))}st.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;cd(this)||tl(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)},st.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,Tt.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 Xr||_l(x,a,new Tt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new Tt(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 ii&&Mh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?hd(a)?(Vl(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}st.si=function(){return!0},st.Zc=function(){return!0},st.ph=function(){return!1},st.Dd=function(){return!0};function Bv(a,y,x,b){y.constructor===a.constructor||H1||(H1=!0,An('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),An(" Old class: "+Dn(a.constructor)+", new class: "+Dn(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,Pe=!1;a instanceof ii&&(ae=a.isTreeLeaf,fe=a.isTreeExpanded,Pe=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 ii&&(a.U=ae?a.U|4:a.U&-5,a.U=fe?a.U|1:a.U&-2,a.U=Pe?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)}Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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}st=Ti.prototype,st.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}st.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},st.N=function(){var a=this.diagram;a!==null&&!tl(this)&&!cd(this)&&this.isVisible()&&this.Ib.w()&&a.N(nf(this,this.Ib))},st.v=function(){Wn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof ii&&this.labeledLink!==null&&el(this.labeledLink),a.$b(!0))},st.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},st.Wo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},st.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},st.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof ii&&(y=y.labeledLink,y!==null)?zv(a,y):0}st.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof ii&&(x=y.labeledLink,x!==null)?j1(a,x):y}st.Td=function(a){return a instanceof rr?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 ii&&(y=y.labeledLink,y!==null)?Hv(a,y,x):!1:!0}st.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof rr&&Zm(y,!0),y instanceof ii){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 ii&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof rr&&Zm(y,!1),y instanceof ii&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ti.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof ii&&this.isLinkLabel)},Ti.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 ii&&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 Xr)){if(a.add(y),y instanceof ii){if(x&&y instanceof rr)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,Pe=ae.toNode;fe=fe===null||a.contains(fe),Pe=Pe===null||a.contains(Pe),(E?fe&&Pe:fe||Pe)&&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 Yn)for(y=y.labelNodes;y.next();)dd(a,y.value,x,b,E,te)}}et.Object.defineProperties(Ti.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?hr: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(us,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(ps,"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&&(Sl(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 Xr?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:Po},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Sl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Wo},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Sl(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&&(Sl(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:$s},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Sl(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,tl(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 Xr)){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 Xr?this instanceof Xr&&(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 Yn||(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&&(Sl(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&&(Sl(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&&(Sl(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 Yn?(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&&(Sl(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&&(Sl(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&&(Sl(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:Ls},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Sl(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&&(Sl(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&&(Sl(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:so},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Sl(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&&Ft("Cannot make a Group a member of itself: "+this.toString()),Ft("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 rr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof rr&&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 rr){for(x=new In,dd(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof ii)for(b=b.linksConnected;b.next();)xp(b.value)}if(this instanceof ii){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 Ft("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&&(Sl(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof ii&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Sl(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&&(Sl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Co},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Sl(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&&(Sl(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&&(Sl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ti.prototype.invalidateLayout=Ti.prototype.C,Ti.prototype.findCommonContainingGroup=Ti.prototype.px,Ti.prototype.isMemberOf=Ti.prototype.Td,Ti.prototype.findTopLevelPart=Ti.prototype.sz,Ti.prototype.findSubGraphLevel=Ti.prototype.oz,Ti.prototype.ensureBounds=Ti.prototype.Va,Ti.prototype.getDocumentBounds=Ti.prototype.mi,Ti.prototype.findObject=Ti.prototype.fb,Ti.prototype.moveTo=Ti.prototype.moveTo,Ti.prototype.invalidateAdornments=Ti.prototype.Wb,Ti.prototype.clearAdornments=Ti.prototype.Ej,Ti.prototype.removeAdornment=Ti.prototype.Jf,Ti.prototype.addAdornment=Ti.prototype.bh,Ti.prototype.findAdornment=Ti.prototype.Pj,Ti.prototype.updateTargetBindings=Ti.prototype.La;var H1=!1;Ti.className="Part",Ti.LayoutNone=0,Ti.LayoutAdded=1,Ti.LayoutRemoved=2,Ti.LayoutShown=4,Ti.LayoutHidden=8,Ti.LayoutNodeSized=16,Ti.LayoutGroupLayout=32,Ti.LayoutNodeReplaced=64,Ti.LayoutStandard=127,Ti.LayoutAll=16777215;function Xr(a,y){a===void 0||a instanceof oa||typeof a=="string"?Ti.call(this,a):(Ti.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)}tt(Xr,Ti),Xr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Xr.prototype.updateRelationshipsFromData=function(){},Xr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Yn&&y instanceof fr){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 fr&&(E.ua=a)}}},Xr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!tl(a))},Xr.prototype.Zc=function(){return!1},Xr.prototype.gk=function(a,y,x,b,E,te,ne){if(a===ps&&y==="elements"){if(E instanceof il)this.$a===null&&(this.$a=E);else if(E instanceof Wn){var ae=E.Nl(function(fe){return fe instanceof il});ae instanceof il&&this.$a===null&&(this.$a=ae)}}else a===us&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Wn&&this.$a.rg(b)&&(this.$a=null));Ti.prototype.gk.call(this,a,y,x,b,E,te,ne)},Xr.prototype.updateAdornments=function(){},Xr.prototype.Lj=function(){},et.Object.defineProperties(Xr.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}}}),Xr.className="Adornment";function Uv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=za,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 ii(a,y){a===void 0||a instanceof oa||typeof a=="string"?Ti.call(this,a):(Ti.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new On,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}tt(ii,Ti),ii.prototype.cloneProtected=function(a){Ti.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},st=ii.prototype,st.Af=function(a){Ti.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())}st.th=function(){Ti.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new In),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}st.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=G1(this,a,y,x),a!==null&&a.Sl()},st.gk=function(a,y,x,b,E,te,ne){a===ps&&y==="elements"?this.wc=null:a===us&&y==="elements"&&(this.wc=null),Ti.prototype.gk.call(this,a,y,x,b,E,te,ne)},st.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Hl(x.fromPort),Hl(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Hl(x.fromPort),Hl(x.toPort),x.bb())}}function Hl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Hl(y.port)}}st.si=function(){return!0},ii.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},ii.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},ii.prototype.isVisible=function(){if(!Ti.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===Xs){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},ii.prototype.Zb=function(a){Ti.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)}},ii.prototype.qx=function(){var a=new In,y=new In;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)})}}ii.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Ki(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},st=ii.prototype,st.Mo=function(a){a===void 0&&(a=null);var y=new Ki(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},st.Sd=function(a){a===void 0&&(a=null);var y=new Ki(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},st.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 In,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 In,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):hr},st.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 In,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):hr},st.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 In,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):hr},st.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Ki(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},st.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Ki(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){Hl(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){Hl(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}}}ii.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},st=ii.prototype,st.Vo=function(a){Ti.prototype.Vo.call(this,a),a||(Sg(this),a=this.Yk,a!==null&&eS(a,this))},st.Wo=function(a){Ti.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},st.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,Ti.prototype.Lj.call(this)},st.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 hi: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]);Jn(x)}}}st.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},st.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}},st.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},st.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},st.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof ii)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},st.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 In;return a(this,y),y},st.uz=function(){return $1(this,this)};function $1(a,y){return y=y.pg(),y===null?0:1+$1(a,y)}st.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Ki(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},st.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 On,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 On,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Fi(x):hr},st.wz=function(a){a===void 0&&(a=1/0);var y=new In;return dd(y,this,!1,a,!0),y},ii.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 In;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 Pe=ae.value;if(Pe.isTreeLink&&(Pe=Pe.To(a),Pe!==null&&Pe!==a)){var Me=y.contains(Pe);if(Me||y.add(Pe),ne){var Fe=x?Pe.Oo():Pe.Po();fe.uv=a,Fe.all(function(Ye){return function(nt){return nt===Ye.uv||!nt.isTreeExpanded}}(fe))&&b.Aj(Pe,E),Pe.oh(),Pe.Zb(!1)}Pe.isTreeExpanded&&(Pe.wasTreeExpanded=Pe.isTreeExpanded,Me||X1(Pe,y,x,b,E,te))}fe={uv:fe.uv}}a.isTreeExpanded=!1}ii.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 In;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(),Pe={};fe.next();){var Me=fe.value;if(Me.isTreeLink&&(ae||Me.fd||Me.bb(),Me=Me.To(a),Me!==null&&Me!==a&&!y.contains(Me))){if(y.add(Me),!ae){Me.Zb(!0),Me.oh();var Fe=x?Me.Oo():Me.Po();Pe.vv=a,Fe.all(function(Ye){return function(nt){return nt===Ye.vv||!nt.isTreeExpanded}}(Pe))&&E.Cj(Me,te)}(2<b||Me.wasTreeExpanded)&&(Me.wasTreeExpanded=!1,J1(Me,y,x,b-1,E,te,ne))}Pe={vv:Pe.vv}}a.isTreeExpanded=!0}et.Object.defineProperties(ii.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:za},set:function(a){typeof a=="number"&&(a=new Ei(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),el(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))}}}),ii.prototype.expandTree=ii.prototype.expandTree,ii.prototype.collapseTree=ii.prototype.collapseTree,ii.prototype.findTreeParts=ii.prototype.wz,ii.prototype.findTreeChildrenNodes=ii.prototype.Ou,ii.prototype.findTreeChildrenLinks=ii.prototype.Qo,ii.prototype.findTreeLevel=ii.prototype.uz,ii.prototype.findTreeParentChain=ii.prototype.vz,ii.prototype.findTreeParentNode=ii.prototype.pg,ii.prototype.findTreeParentLink=ii.prototype.kh,ii.prototype.findCommonTreeParent=ii.prototype.gz,ii.prototype.findTreeRoot=ii.prototype.xz,ii.prototype.isInTreeOf=ii.prototype.Nz,ii.prototype.findPort=ii.prototype.ns,ii.prototype.findLinksTo=ii.prototype.kz,ii.prototype.findLinksBetween=ii.prototype.jz,ii.prototype.findNodesInto=ii.prototype.Oo,ii.prototype.findNodesOutOf=ii.prototype.Po,ii.prototype.findNodesConnected=ii.prototype.Mu,ii.prototype.findLinksInto=ii.prototype.Sd,ii.prototype.findLinksOutOf=ii.prototype.Mo,ii.prototype.findExternalTreeLinksConnected=ii.prototype.qx,ii.prototype.invalidateConnectedLinks=ii.prototype.Bd,ii.prototype.invalidateLinkBundle=ii.prototype.Lz;var Px=new an(ii,"SpreadingNone",10),$m=new an(ii,"SpreadingEvenly",11),Wv=new an(ii,"SpreadingPacked",12);ii.className="Node",ii.SpreadingNone=Px,ii.SpreadingEvenly=$m,ii.SpreadingPacked=Wv;function rr(a,y){a===void 0||a instanceof oa||typeof a=="string"?ii.call(this,a):(ii.call(this),a&&(y=a)),this.U|=4608,this.Gn=new In,this.$a=null,this.Sc=new Qo,this.Sc.group=this,this.gl=new In,this.tb=this.$p=null,y&&Object.assign(this,y)}tt(rr,ii),rr.prototype.cloneProtected=function(a){ii.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof il});y instanceof il?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())},st=rr.prototype,st.Af=function(a){ii.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 ii)x.Bd(y);else if(x instanceof Yn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},st.gk=function(a,y,x,b,E,te,ne){if(a===ps&&y==="elements"){if(E instanceof il)this.$a===null?this.$a=E:this.$a!==E&&Ft("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 il});ae instanceof il&&(this.$a===null?this.$a=ae:this.$a!==ae&&Ft("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===us&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Wn&&this.$a.rg(b)&&(this.$a=null));ii.prototype.gk.call(this,a,y,x,b,E,te,ne)},st.Xl=function(a,y){ii.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 Ln),a.mi(this.tb),a instanceof fr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},st.eh=function(a,y,x,b){this.nf=this.$a,ii.prototype.eh.call(this,a,y,x,b)},st.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Yn||y.Va()}),ii.prototype.Va.call(this)},st.si=function(){if(!ii.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof ii){if(y.isVisible()&&tl(y))return!1}else if(y instanceof Yn&&y.isVisible()&&tl(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof rr&&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 Yn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Kv(a,y){if(a.Gn.remove(y)){y instanceof rr&&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 Yn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}st.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)}ii.prototype.Lj.call(this)},rr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=En(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},rr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=En(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},rr.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))},st=rr.prototype,st.Bd=function(a){var y=(this.U&65536)!==0;if(ii.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()?(Hl(x.fromPort),Hl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Hl(x.fromPort),Hl(x.toPort),x.bb()))}}},st.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 In,b=y.iterator;b.next();){var E=b.value;if(E instanceof ii)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},st.iz=function(){var a=this.Rj();a.add(this);for(var y=new In,x=a.iterator;x.next();){var b=x.value;if(b instanceof ii)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},st.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new In;return a(this,y),y},st.Rj=function(){var a=new In;return dd(a,this,!0,0,!0),a.remove(this),a},st.Zb=function(a){ii.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},rr.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 rr&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof ii)te.Bd(y),x.Aj(te,b);else if(te instanceof Yn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}rr.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 rr&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof ii)te.Bd(y),x.Cj(te,b);else if(te instanceof Yn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}rr.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=Tt.alloc(),ii.prototype.move.call(this,a,y),a=new In,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Yn&&(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 ii&&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 Yn&&(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());Tt.free(te)}},et.Object.defineProperties(rr.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&&Ft("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)}}}),rr.prototype.expandSubGraph=rr.prototype.expandSubGraph,rr.prototype.collapseSubGraph=rr.prototype.collapseSubGraph,rr.prototype.findSubGraphParts=rr.prototype.Rj,rr.prototype.findContainingGroupChain=rr.prototype.hz,rr.prototype.findExternalNodesConnected=rr.prototype.iz,rr.prototype.findExternalLinksConnected=rr.prototype.Lu,rr.prototype.ensureBounds=rr.prototype.Va,rr.className="Group";function il(a){en.call(this),this.yb=ba,this.ko=new Ln(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}tt(il,en),il.prototype.cloneProtected=function(a){en.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},il.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Er(0,0,y.width,y.height,a.x,a.y)},il.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof rr||a instanceof Xr)||Ft("Placeholder is not inside a Group or Adornment."),a instanceof rr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Os(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=Tt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Tt.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 fr&&(ne=te.strokeWidth);var ae=te.Df(),fe=te.naturalBounds,Pe=(fe.width+ne)*ae;ne=(fe.height+ne)*ae,a.type!==Wn.Link&&(ae=te.ga(a.category==="Selection"?$s:a.locationSpot,Tt.alloc()),a.location=ae,Tt.free(ae)),isNaN(Pe)||isNaN(ne)?(a=te.ga($s,Tt.alloc()),Pe=Ln.allocAt(a.x,a.y,0,0),Pe.Ye(te.ga(Ta,a)),Pe.Ye(te.ga(wl,a)),Pe.Ye(te.ga(Aa,a)),Os(y,Pe.width+b||0,Pe.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Tt.free(a),Ln.free(Pe)):(Os(y,Pe+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},il.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},il.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof rr&&!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=Ln.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof rr&&!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)),Ln.free(x),b&&y instanceof rr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},il.prototype.computeMemberBounds=function(a){if(!(this.part instanceof rr))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 Yn&&(!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},et.Object.defineProperties(il.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ei(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),il.className="Placeholder";function Yn(a){Ti.call(this,Wn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=rl,this.Om=0,this.Qm=rl,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new On().freeze(),this.Tg=this.Mg=null,this.ml=new Ln,this.ua=new Qn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Tt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}tt(Yn,Ti),Yn.prototype.cloneProtected=function(a){Ti.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())},st=Yn.prototype,st.Af=function(a){Ti.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&&Hl(y),a=a.toPort,a!==null&&Hl(a)},st.qb=function(a){a.classType===Yn?(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!==rl&&Ft("Unknown Link enum value for a Link property: "+a):Ti.prototype.qb.call(this,a)},st.Xc=function(){this.ba===null&&(this.ba=new lg)},st.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),tl(a)||cd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),tl(a)||cd(a)))},st.zv=function(){return!1},st.Av=function(){},st.Zc=function(){return!1},Yn.prototype.computeAngle=function(a,y,x){return Yn.computeAngle(y,x)},Yn.computeAngle=function(a,y){switch(a){default:case rl:a=0;break;case Cg:a=y;break;case _g:a=y+90;break;case Pg:a=y-90;break;case Qv:a=y+180;break;case n0:a=rn.bp(y),90<a&&270>a&&(a-=180);break;case Eg:a=rn.bp(y+90),90<a&&270>a&&(a-=180);break;case Lg:a=rn.bp(y-90),90<a&&270>a&&(a-=180);break;case i0:if(a=rn.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return rn.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}st=Yn.prototype,st.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ti.prototype.oh.call(this)},st.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},st.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new In),a.wd.add(y),a.v()}st.Vo=function(a){if(Ti.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)}},st.Wo=function(a){if(Ti.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)}},st.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))},Yn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Yn.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?Ti.prototype.move.call(this,a,!1):(a=Tt.allocAt(x.x+b,x.y+E),Ti.prototype.move.call(this,a,!1),Tt.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)},Yn.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},Yn.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},Yn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(qo),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 rn.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),rn.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},Yn.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),rn.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)},st=Yn.prototype,st.i=function(a){return this.Nb.s[a]},st.dd=function(a,y){this.Nb.cd(a,y)},st.L=function(a,y,x){this.Nb.cd(a,new Tt(y,x))},st.Kz=function(a,y){this.Nb.Gb(a,y)},st.m=function(a,y,x){this.Nb.Gb(a,new Tt(y,x))},st.ne=function(a){this.Nb.add(a)},st.yf=function(a,y){this.Nb.add(new Tt(a,y))},st.pv=function(a){this.Nb.mb(a)},st.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 On,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new Tt(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),el(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&&Bo(ne.animationManager,a,E),a.g("points",te,E)}}st.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},st.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,Pe=fe.length,Me=0;Me<Pe;Me++){var Fe=fe[Me];ne=Math.min(Fe.x,ne),ae=Math.min(Fe.y,ae),Fe.freeze()}if(y.freeze(),Pe===te){for(te=0;te<Pe;te++)if(Me=E[te],Fe=fe[te],Me.x-x!==Fe.x-ne||Me.y-b!==Fe.y-ae){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&Bo(x.animationManager,this,y),Ym(this),this.g("points",a,y)}},st.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))}st.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())}},st.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()}}},Yn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Nf||(Nf=new ii,Nf.desiredSize=qr,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 ii,Of.desiredSize=qr,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),Pe=y===E&&y!==null,Me=this.isOrthogonal,Fe=this.curve===ou;this.Wf=Pe&&!Me?Fe=!0:!1;var Ye=this.computeAdjusting()===rl||Pe;if(!Me&&!Pe&&ae&&fe){if(ae=!1,!Ye&&3<=te&&(Ye=this.getLinkPoint(a,y,ne,!0,!1,b,E),fe=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=this.adjustPoints(0,Ye,te-1,fe))&&(Ye=this.getLinkPoint(a,y,ne,!0,!1,b,E),fe=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Ye,te-1,fe)),!ae)if(this.Fj(),Fe){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),Ye=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=Ye.x-te.x,fe=Ye.y-te.y,Pe=this.computeCurviness(),Fe=Me=0;var nt=te.x+ae/3,ot=te.y+fe/3,ft=nt,Ot=ot;rn.B(fe,0)?Ot=0<ae?Ot-Pe:Ot+Pe:(Me=-ae/fe,Fe=Math.sqrt(Pe*Pe/(Me*Me+1)),0>Pe&&(Fe=-Fe),ft=(0>fe?-1:1)*Fe+nt,Ot=Me*(ft-nt)+ot),nt=te.x+2*ae/3,ot=te.y+2*fe/3;var Mt=nt,Ht=ot;rn.B(fe,0)?Ht=0<ae?Ht-Pe:Ht+Pe:(Mt=(0>fe?-1:1)*Fe+nt,Ht=Me*(Mt-nt)+ot),this.Fj(),this.ne(te),this.yf(ft,Ot),this.yf(Mt,Ht),this.ne(Ye),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,Ye=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,Ye),E=this.getLinkPoint(te,Ye,x,!1,!1,a,y),this.hasCurviness()?(Ye=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+Ye/2,y=b.y+x/2,te=a,ae=y,rn.B(x,0)?ae=0<Ye?ae-ne:ae+ne:(Ye=-Ye/x,te=Math.sqrt(ne*ne/(Ye*Ye+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,ae=Ye*(te-a)+y),this.ne(b),this.yf(te,ae),this.ne(E)):(this.ne(b),this.ne(E),ae=Ln.alloc(),y.mi(ae),fe=ae.ca(E),Ye.mi(ae),Pe=ae.ca(b),(fe||Pe)&&(ne=y.ga(Jm(ne),new Tt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ye.ga(Jm(x),new Tt),this.dd(1,this.getLinkPointFromPoint(te,Ye,x,b,!1,x))),Ln.free(ae))}else{Fe=this.isAvoiding,Ye&&(Me&&Fe||Pe)&&this.Fj();var Wt=Pe?this.computeCurviness():0;Fe=this.getLinkPoint(a,y,ne,!0,Me,b,E),nt=ft=ot=0,(Me||!ae||Pe)&&(Ot=this.computeEndSegmentLength(a,y,ne,!0),nt=this.getLinkDirection(a,y,Fe,ne,!0,Me,b,E),Pe&&(ae||ne.D(x)||!Me&&ne.x+x.x===1&&ne.y+x.y===1)&&(nt-=Me?90:30,0>Wt&&(nt-=180)),0>nt?nt+=360:360<=nt&&(nt-=360),Pe&&(Ot+=Math.abs(Wt)*(Me?1:2)),nt===0?ot=Ot:nt===90?ft=Ot:nt===180?ot=-Ot:nt===270?ft=-Ot:(ot=Ot*Math.cos(nt*Math.PI/180),ft=Ot*Math.sin(nt*Math.PI/180)),ne.Mc()&&Pe&&(Ot=y.ga(Fr,Tt.alloc()),Mt=Tt.allocAt(Ot.x+1e3*ot,Ot.y+1e3*ft),this.getLinkPointFromPoint(a,y,Ot,Mt,!0,Fe),Tt.free(Ot),Tt.free(Mt))),Ot=this.getLinkPoint(b,E,x,!1,Me,a,y);var Kt=Ht=Mt=0;if(Me||!fe||Pe){var Qt=this.computeEndSegmentLength(b,E,x,!1);Kt=this.getLinkDirection(b,E,Ot,x,!1,Me,a,y),Pe&&(fe||ne.D(x)||!Me&&ne.x+x.x===1&&ne.y+x.y===1)&&(Kt+=Me?0:30,0>Wt&&(Kt+=180)),0>Kt?Kt+=360:360<=Kt&&(Kt-=360),Pe&&(Qt+=Math.abs(Wt)*(Me?1:2)),Kt===0?Mt=Qt:Kt===90?Ht=Qt:Kt===180?Mt=-Qt:Kt===270?Ht=-Qt:(Mt=Qt*Math.cos(Kt*Math.PI/180),Ht=Qt*Math.sin(Kt*Math.PI/180)),x.Mc()&&Pe&&(x=E.ga(Fr,Tt.alloc()),ne=Tt.allocAt(x.x+1e3*Mt,x.y+1e3*Ht),this.getLinkPointFromPoint(b,E,x,ne,!1,Ot),Tt.free(x),Tt.free(ne))}x=Fe,(Me||!ae||Pe)&&(x=new Tt(Fe.x+ot,Fe.y+ft)),ne=Ot,(Me||!fe||Pe)&&(ne=new Tt(Ot.x+Mt,Ot.y+Ht)),!Ye&&!Me&&ae&&3<te&&this.adjustPoints(0,Fe,te-2,ne)?this.dd(te-1,Ot):!Ye&&!Me&&fe&&3<te&&this.adjustPoints(1,x,te-1,Ot)?this.dd(0,Fe):!Ye&&(Me?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Fe),this.dd(te-1,Ot)):(this.Fj(),this.ne(Fe),(Me||!ae||Pe)&&this.ne(x),Me&&this.addOrthoPoints(x,nt,ne,Kt,a,b),(Me||!fe||Pe)&&this.ne(ne),this.ne(Ot))}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}Yn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new Tt),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,Pe=a.m11*E,Me=E*(a.m21*a.dy-a.m22*a.dx),Fe=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*fe+Me,b=b.x*ae+b.y*Pe+Fe,ne=x.x*ne+x.y*fe+Me,x=x.x*ae+x.y*Pe+Fe}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)}Yn.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,ae){if(ae===void 0&&(ae=new Tt),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 Pe=Xm(this,ne);if(Pe!==null&&fe.Gl<Pe.Gl){fe=Tt.alloc(),Pe=Tt.alloc();var Me=new Ln(y.ga($s,fe),y.ga(Ta,Pe)),Fe=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Fe,!b,E,a,y,Pe),(x.Hf(Pu)||x.Hf(Ua))&&a.y>=Me.y&&a.y<=Me.y+Me.height?ae.y=a.y:(x.Hf($l)||x.Hf(Ga))&&a.x>=Me.x&&a.x<=Me.x+Me.width&&(ae.x=a.x),Tt.free(fe),Tt.free(Pe)}}return ae}}return x=y.ga(Jm(x),Tt.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=Tt.alloc(),ne=ne.ga(Jm(fe),te),E&&(ne=Vv(x,ne)),Tt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,ae),Tt.free(x),ae},Yn.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(Fr,Tt.alloc()),this.pointsCount>(te?6:2)?(ae=E?this.i(1):this.i(this.pointsCount-2),ae=te?Vv(fe,ae.copy()):x):(x=Tt.alloc(),ae=ae.ga(Fr,x),Tt.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,Tt.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},Yn.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)},Yn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Fr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===so?fs:y)):(a=y||this.toPort,a===null?a=Fr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===so?fs:y)),a};function wp(a){return a===fs||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:Fr}Yn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==rl&&4<this.pointsCount?this.computeMidPoint(new Tt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Fr))},Yn.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},Yn.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=gr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&gr.free(ne),!0;if(this.Yc(a,ne)){var ae=!1;if(!this.isAtomic)for(var fe=this.O.s,Pe=fe.length;Pe--;){var Me=fe[Pe];if(Me.visible||Me===this.locationObject){var Fe=Me.actualBounds,Ye=this.naturalBounds;if(!(Fe.x>Ye.width||Fe.y>Ye.height||0>Fe.x+Fe.width||0>Fe.y+Fe.height)){if(Fe=gr.alloc(),Fe.set(ne),Me instanceof Wn)ae=Me.Cf(a,y,x,b,E,Fe);else if(this.path===Me){if(Me instanceof fr)if(ae=a,Ye=b,Me.pickable===!1)ae=!1;else if(Fe.multiply(Me.transform),Ye)e:{var nt=ae,ot=Fe;if(Me.fh(nt,ot))ae=!0;else{if(ot===void 0&&(ot=Me.transform,nt.Re(Me.actualBounds))){ae=!0;break e}ae=nt.left,Ye=nt.right;var ft=nt.top;nt=nt.bottom;var Ot=Tt.alloc(),Mt=Tt.alloc(),Ht=Tt.alloc(),Wt=gr.alloc();Wt.set(ot),Wt.bv(Me.transform),Wt.Vj(),Mt.x=Ye,Mt.y=ft,Mt.transform(Wt),Ot.x=ae,Ot.y=ft,Ot.transform(Wt),ot=!1,tf(Me,Ot,Mt,Ht)?ot=!0:(Ot.x=Ye,Ot.y=nt,Ot.transform(Wt),tf(Me,Ot,Mt,Ht)?ot=!0:(Mt.x=ae,Mt.y=nt,Mt.transform(Wt),tf(Me,Ot,Mt,Ht)?ot=!0:(Ot.x=ae,Ot.y=ft,Ot.transform(Wt),tf(Me,Ot,Mt,Ht)&&(ot=!0)))),gr.free(Wt),Tt.free(Ot),Tt.free(Mt),Tt.free(Ht),ae=ot}}else ae=Me.fh(ae,Fe)}else ae=la(Me,a,b,Fe);ae&&(Ye=Me,y!==null&&(Ye=y(Me)),Ye&&(x===null||x(Ye))&&E.add(Ye)),gr.free(Fe)}}}return te===void 0&&gr.free(ne),ae||this.background!==null||this.areaBackground!==null}return te===void 0&&gr.free(ne),!1},Yn.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},Yn.prototype.computeCorner=function(){if(this.curve===ou)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Yn.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},Yn.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===Pg||b===Lg||b===_g||b===Eg?a=Math.max(a,ne):(y=y.ga(Fr).ab(x.ga(Fr))/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},Yn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===rl&&x.bb()}},Yn.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),Jn(x)}}return a},Yn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Yn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Yn.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,Pe=Math.sqrt(ae*ae+fe*fe);if(!rn.$(Pe,0)){if(rn.$(ae,0))var Me=0>fe?-Math.PI/2:Math.PI/2;else Me=Math.atan(fe/Math.abs(ae)),0>ae&&(Me=Math.PI-Me);ne=y.x;var Fe=y.y;ae=b.x-ne;var Ye=b.y-Fe;for(fe=Math.sqrt(ae*ae+Ye*Ye),rn.$(ae,0)?Ye=0>Ye?-Math.PI/2:Math.PI/2:(Ye=Math.atan(Ye/Math.abs(ae)),0>ae&&(Ye=Math.PI-Ye)),Pe=fe/Pe,Me=Ye-Me,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),rn.$(y,0)||(rn.$(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+Me,y*=Pe,this.L(a,ne+y*Math.cos(ae),Fe+y*Math.sin(ae)));this.dd(x,b)}}return!0;case t0:if(te=this.i(a),Fe=this.i(x),!te.Xa(y)||!Fe.Xa(b)){E=te.x,te=te.y,ne=Fe.x,Fe=Fe.y,Pe=(ne-E)*(ne-E)+(Fe-te)*(Fe-te),ae=y.x,Me=y.y,fe=b.x,Ye=b.y;var nt=1;if(fe-ae!==0){var ot=(Ye-Me)/(fe-ae);nt=Math.sqrt(1+1/(ot*ot))}else ot=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ft=y.x,Ot=y.y,Mt=.5;Pe!==0&&(Mt=((E-ft)*(E-ne)+(te-Ot)*(te-Fe))/Pe);var Ht=E+Mt*(ne-E),Wt=te+Mt*(Fe-te);y=Math.sqrt((ft-Ht)*(ft-Ht)+(Ot-Wt)*(Ot-Wt)),Ot<ot*(ft-Ht)+Wt&&(y=-y),0<ot&&(y=-y),ft=ae+Mt*(fe-ae),Mt=Me+Mt*(Ye-Me),ot!==0?(y=ft+y/nt,this.L(a,y,Mt-(y-ft)/ot)):this.L(a,ft,Mt+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,Me=te.y,Fe=ae,Pe=Me,rn.B(E.y,te.y)?rn.B(te.x,ne.x)?Me=y.y:rn.B(te.y,ne.y)&&(ae=y.x):rn.B(E.x,te.x)&&(rn.B(te.y,ne.y)?ae=y.x:rn.B(te.x,ne.x)&&(Me=y.y)),this.L(a+1,ae,Me),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),ae=te.x,Me=te.y,fe=ae,Ye=Me,rn.B(E.y,te.y)?rn.B(te.x,ne.x)?Me=b.y:rn.B(te.y,ne.y)&&(ae=b.x):rn.B(E.x,te.x)&&(rn.B(te.y,ne.y)?ae=b.x:rn.B(te.x,ne.x)&&(Me=b.y)),this.L(x-1,ae,Me),$v(this))){this.L(a+1,Fe,Pe),this.L(x-1,fe,Ye),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Yn.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 Pe=Tt.alloc(),Me=Tt.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?(Pe.h(x.x,a.y),Me.h(x.x,(a.y+x.y)/2),b===180?(Pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Me.x=Pe.x,Me.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(Pe.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,Me.x=Pe.x,Me.y=x.y):b===0&&a.x<fe.left&&a.y>fe.top&&a.y<fe.bottom&&(Pe.x=a.x,Pe.y=a.y<x.y?Math.min(x.y,fe.top):Math.max(x.y,fe.bottom),Me.y=Pe.y)):(Pe.h(a.x,x.y),Me.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))?Pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?Pe.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,fe.bottom),!0):x.y>a.y&&(b===180||b===270)&&(Pe.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,fe.top),!0)),Me.x=x.x,Me.y=Pe.y),Pe.y>ae.top&&Pe.y<ae.bottom&&(x.x>=ae.left&&x.x<=a.x||a.x<=fe.right&&a.x>=x.x?(b===90||b===270)&&(Pe.h(Math.max((a.x+x.x)/2,a.x),a.y),Me.h(Pe.x,x.y)):(Pe.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)),Me.x=x.x,Me.y=Pe.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?(Pe.h(x.x,a.y),Me.h(x.x,(a.y+x.y)/2),b===0?(Pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Me.x=Pe.x,Me.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(Pe.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,Me.x=Pe.x,Me.y=x.y):b===180&&a.x>fe.right&&a.y>fe.top&&a.y<fe.bottom&&(Pe.x=a.x,Pe.y=a.y<x.y?Math.min(x.y,fe.top):Math.max(x.y,fe.bottom),Me.y=Pe.y)):(Pe.h(a.x,x.y),Me.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))?Pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?Pe.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,fe.bottom),!0):x.y>a.y&&(b===0||b===270)&&(Pe.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,fe.top),!0)),Me.x=x.x,Me.y=Pe.y),Pe.y>ae.top&&Pe.y<ae.bottom&&(x.x<=ae.right&&x.x>=a.x||a.x>=fe.left&&a.x<=x.x?(b===90||b===270)&&(Pe.h(Math.min((a.x+x.x)/2,a.x),a.y),Me.h(Pe.x,x.y)):(Pe.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)),Me.x=x.x,Me.y=Pe.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?(Pe.h(a.x,x.y),Me.h((a.x+x.x)/2,x.y),b===270?(Pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Me.x=x.x,Me.y=Pe.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(Pe.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,Me.x=x.x,Me.y=Pe.y):b===90&&a.y<fe.top&&a.x>fe.left&&a.x<fe.right&&(Pe.x=a.x<x.x?Math.min(x.x,fe.left):Math.max(x.x,fe.right),Pe.y=a.y,Me.x=Pe.x)):(Pe.h(x.x,a.y),Me.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))?Pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?Pe.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,fe.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(Pe.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,fe.left),x.y,!1)),Me.x=Pe.x,Me.y=x.y),Pe.x>ae.left&&Pe.x<ae.right&&(x.y>=ae.top&&x.y<=a.y||a.y<=fe.bottom&&a.y>=x.y?(b===0||b===180)&&(Pe.h(a.x,Math.max((a.y+x.y)/2,a.y)),Me.h(x.x,Pe.y)):(Pe.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)),Me.x=Pe.x,Me.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?(Pe.h(a.x,x.y),Me.h((a.x+x.x)/2,x.y),b===90?(Pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Me.x=x.x,Me.y=Pe.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(Pe.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,Me.x=x.x,Me.y=Pe.y):b===270&&a.y>fe.bottom&&a.x>fe.left&&a.x<fe.right&&(Pe.x=a.x<x.x?Math.min(x.x,fe.left):Math.max(x.x,fe.right),Pe.y=a.y,Me.x=Pe.x)):(Pe.h(x.x,a.y),Me.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))?Pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?Pe.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,fe.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(Pe.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,fe.left),x.y,!1)),Me.x=Pe.x,Me.y=x.y),Pe.x>ae.left&&Pe.x<ae.right&&(x.y<=ae.bottom&&x.y>=a.y||a.y>=fe.top&&a.y<=x.y?(b===0||b===180)&&(Pe.h(a.x,Math.min((a.y+x.y)/2,a.y)),Me.h(x.x,Pe.y)):(Pe.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)),Me.x=Pe.x,Me.y=x.y)));var Fe=x;if(this.isAvoiding){var Ye=this.diagram;if(Ye===null||E===te||this.layer.isTemporary||!tp(Ye)||ae.ca(Fe)&&!te.Td(E)||fe.ca(a)&&!E.Td(te))y=!1;else{var nt=np(Ye,!0,this.containingGroup,null);if(this.segmentIndex!==17&&nt.Yj(Math.min(a.x,Pe.x),Math.min(a.y,Pe.y),Math.abs(a.x-Pe.x),Math.abs(a.y-Pe.y))&&nt.Yj(Math.min(Pe.x,Me.x),Math.min(Pe.y,Me.y),Math.abs(Pe.x-Me.x),Math.abs(Pe.y-Me.y))&&nt.Yj(Math.min(Me.x,Fe.x),Math.min(Me.y,Fe.y),Math.abs(Me.x-Fe.x),Math.abs(Me.y-Fe.y)))y=!1;else{E=a,te=Fe;var ot=x=null;if(Ye.isVirtualized){Ye=nt.bounds.copy(),Ye.Bc(-nt.Ho,-nt.Go);var ft=Tt.alloc();Cp(nt,a.x,a.y)||(rn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,a.x,a.y,Pe.x,Pe.y,ft)?(x=a=ft.copy(),y=ft.ab(Pe)):rn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Pe.x,Pe.y,Me.x,Me.y,ft)?(x=a=ft.copy(),y=ft.ab(Me)):rn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Me.x,Me.y,Fe.x,Fe.y,ft)&&(x=a=ft.copy(),y=ft.ab(Fe))),Cp(nt,Fe.x,Fe.y)||(rn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Fe.x,Fe.y,Me.x,Me.y,ft)?(ot=Fe=ft.copy(),b=Me.ab(ft)):rn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Me.x,Me.y,Pe.x,Pe.y,ft)?(ot=Fe=ft.copy(),b=Pe.ab(ft)):rn.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Pe.x,Pe.y,a.x,a.y,ft)&&(ot=Fe=ft.copy(),b=a.ab(ft))),Tt.free(ft)}ae=ae.copy().ed(fe),ae.Bc(nt.Ho*nt.Os,nt.Go*nt.Os),sS(nt,a,y,Fe,b,ae,!0),fe=Kc(nt,Fe.x,Fe.y),!nt.abort&&fe>=_p&&(oS(nt),ae.Bc(nt.Ho*nt.Hx,nt.Go*nt.Ix),sS(nt,a,y,Fe,b,ae,!1),fe=Kc(nt,Fe.x,Fe.y)),!nt.abort&&fe<_p&&Kc(nt,Fe.x,Fe.y)!==jh?(Yv(this,nt,Fe.x,Fe.y,b,!0,ne),ae=this.i(2),4>this.pointsCount?(y===0||y===180?(ae.x=a.x,ae.y=Fe.y):(ae.x=Fe.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?rn.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)):rn.B(ae.y,ne.y)?(Math.abs(a.y-ae.y)<=nt.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)&&(rn.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)):rn.B(ae.x,ne.x)?(Math.abs(a.x-ae.x)<=nt.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)),ot!==null&&(b===0||b===180?this.yf(te.x,ot.y):this.yf(ot.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(Pe.copy()),this.ne(Me.copy())),Tt.free(Pe),Tt.free(Me)}},Yn.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,Pe=Kc(y,x,b),Me=x,Fe=b;for(E===0?Me+=ae:E===90?Fe+=fe:E===180?Me-=ae:Fe-=fe,E!==ne&&Pe>of&&Kc(y,Me,Fe)!==Pe-1&&(Kc(y,x-ae,b)===Pe-1?(E=180,Me=x-ae,Fe=b):Kc(y,x+ae,b)===Pe-1?(E=0,Me=x+ae,Fe=b):Kc(y,x,b-fe)===Pe-1?(E=270,Me=x,Fe=b-fe):Kc(y,x,b+fe)===Pe-1&&(E=90,Me=x,Fe=b+fe));Pe>of&&Kc(y,Me,Fe)===Pe-1;)x=Me,b=Fe,E===0?Me+=ae:E===90?Fe+=fe:E===180?Me-=ae:Fe-=fe,--Pe;te?Pe>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),Pe>of&&(te=E,ne=x,Me=b,E===0?(te=90,Me+=fe):E===90?(te=180,ne-=ae):E===180?(te=270,Me-=fe):E===270&&(te=0,ne+=ae),Kc(y,ne,Me)===Pe-1?Yv(a,y,ne,Me,te,!1,te):(ne=x,Me=b,E===0?(te=270,Me-=fe):E===90?(te=0,ne+=ae):E===180?(te=90,Me+=fe):E===270&&(te=180,ne-=ae),Kc(y,ne,Me)===Pe-1&&Yv(a,y,ne,Me,te,!1,te))),a.yf(x,b)}Yn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Qr(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=Qr(y,a,b.x,b.y,x.x,x.y);b=x,ae<E&&(te=ne,E=ae)}return te},Yn.prototype.qc=function(){this.lk=!1,this.v()},Yn.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 fr&&(E.ua=this.ua)}}},Yn.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&&!rn.$(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=Qn.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&&!rn.$(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=Tt.allocAt(b,fe),x=Tt.alloc(),x.assign(this.i(1)),te=Tt.allocAt(b,fe),E=Tt.allocAt(b,fe),ne=this.i(0);for(var Pe,Me=this.smoothness/3,Fe=1;Fe<this.pointsCount-1;Fe++){Pe=this.i(Fe);var Ye=ne,nt=Pe,ot=this.i(Xv(this,Pe,Fe,!1));if((!rn.$(Ye.x,nt.x)||!rn.$(nt.x,ot.x))&&(!rn.$(Ye.y,nt.y)||!rn.$(nt.y,ot.y))){var ft=Me;isNaN(ft)&&(ft=this.smoothness/3);var Ot=Ye.x;Ye=Ye.y;var Mt=nt.x;nt=nt.y;var Ht=ot.x;ot=ot.y;var Wt=ft*Qm(Ot,Ye,Mt,nt);ft*=Qm(Mt,nt,Ht,ot),rn.$(Ye,nt)&&rn.$(Mt,Ht)&&(Mt>Ot?ot>nt?(te.x=Mt-Wt,te.y=nt-Wt,E.x=Mt+ft,E.y=nt+ft):(te.x=Mt-Wt,te.y=nt+Wt,E.x=Mt+ft,E.y=nt-ft):ot>nt?(te.x=Mt+Wt,te.y=nt-Wt,E.x=Mt-ft,E.y=nt+ft):(te.x=Mt+Wt,te.y=nt+Wt,E.x=Mt-ft,E.y=nt-ft)),rn.$(Ot,Mt)&&rn.$(nt,ot)&&(nt>Ye?(Ht>Mt?(te.x=Mt-Wt,te.y=nt-Wt,E.x=Mt+ft):(te.x=Mt+Wt,te.y=nt-Wt,E.x=Mt-ft),E.y=nt+ft):(Ht>Mt?(te.x=Mt-Wt,te.y=nt+Wt,E.x=Mt+ft):(te.x=Mt+Wt,te.y=nt+Wt,E.x=Mt-ft),E.y=nt-ft)),(rn.$(Ot,Mt)&&rn.$(Mt,Ht)||rn.$(Ye,nt)&&rn.$(nt,ot))&&(Ot=.5*(Ot+Ht),Ye=.5*(Ye+ot),te.x=Ot,te.y=Ye,E.x=Ot,E.y=Ye),(Fe===1||Fe===2&&rn.$(ne.x,this.i(0).x)&&rn.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+Pe.x),x.y=.5*(ne.y+Pe.y)),Ih(ae,x.x-b,x.y-fe,te.x-b,te.y-fe,Pe.x-b,Pe.y-fe),y.set(te),x.set(E),ne=Pe}}Pe=ne.x,ne=ne.y,Me=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(Me=kf(this,Me.copy(),!1,xr)),Pe=.5*(Pe+Me.x),ne=.5*(ne+Me.y),Ih(ae,E.x-b,E.y-fe,Pe-b,ne-fe,Me.x-b,Me.y-fe),Tt.free(y),Tt.free(x),Tt.free(te),Tt.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,xr)),Ih(ae,te.x-b,te.y-fe,E.x-b,E.y-fe,ne.x-b,ne.y-fe);else{for(te=Tt.alloc(),te.assign(this.i(0)),E=Tt.alloc(),E.assign(te),ne=this.computeCorner(),Fe=1,Pe=0;Fe<y;){if(Fe=Xv(this,te,Fe,1<Fe),Me=this.i(Fe),Fe>=y-1){if(!te.D(Me))this.computeShortLength(!1)!==0&&(Me=kf(this,Me.copy(),!1,xr)),Af(this,ae,-b,-fe,te,Me,x);else if(Pe===0)for(Fe=1;Fe<y;)E.assign(te),Me=this.i(Fe++),Af(this,ae,-b,-fe,te,Me,x),te.assign(Me);break}if(Pe=Xv(this,Me,Fe+1,Fe<y-3),Fe=-b,Ot=-fe,Ye=Me,Mt=this.i(Pe),ft=x,rn.B(te.y,Ye.y)&&rn.B(Ye.x,Mt.x))if(ot=Math.min(ne,Math.abs(Ye.x-E.x)/2),ot=Wt=Math.min(ot,Math.abs(Mt.y-Ye.y)/2),rn.B(ot,0))Af(this,ae,Fe,Ot,te,Ye,ft),te.assign(Ye);else{var Kt=Ye.x,Qt=Ye.y;nt=Kt,Ht=Qt,Ye.x>te.x?Kt=Ye.x-ot:Kt=Ye.x+ot,Mt.y>Ye.y?Ht=Ye.y+Wt:Ht=Ye.y-Wt,Mt=Tt.allocAt(Kt,Qt),Af(this,ae,Fe,Ot,te,Mt,ft),Tt.free(Mt),Um(ae,Ye.x+Fe,Ye.y+Ot,nt+Fe,Ht+Ot),te.h(nt,Ht)}else rn.B(te.x,Ye.x)&&rn.B(Ye.y,Mt.y)?(ot=Math.min(ne,Math.abs(Ye.y-E.y)/2),ot=Wt=Math.min(ot,Math.abs(Mt.x-Ye.x)/2),rn.B(Wt,0)?(Af(this,ae,Fe,Ot,te,Ye,ft),te.assign(Ye)):(Kt=Ye.x,Qt=Ye.y,nt=Kt,Ht=Qt,Ye.y>te.y?Qt=Ye.y-ot:Qt=Ye.y+ot,Mt.x>Ye.x?nt=Ye.x+Wt:nt=Ye.x-Wt,Mt=Tt.allocAt(Kt,Qt),Af(this,ae,Fe,Ot,te,Mt,ft),Tt.free(Mt),Um(ae,Ye.x+Fe,Ye.y+Ot,nt+Fe,Ht+Ot),te.h(nt,Ht))):(Af(this,ae,Fe,Ot,te,Ye,ft),te.assign(Ye));E.assign(Me),Fe=Pe}Tt.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=Qn.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),rn.$(a,0)?y:rn.$(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;rn.$(y.x,te.x)&&rn.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!rn.$(y.x,te.x)&&!rn.$(y.y,te.y))return x-1;for(var ne=te;rn.$(y.x,te.x)&&rn.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||rn.$(y.y,te.y)&&rn.$(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}Yn.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=[],Pe=0;if(a.isVisible()&&(Pe=Ex(a,E,te,fe)),0<Pe){if(rn.B(E.y,te.y))if(E.x<te.x)for(var Me=0;Me<Pe;){var Fe=Math.max(E.x,Math.min(fe[Me++]-ae,te.x-ne));y.lineTo(Fe+x,te.y+b);for(var Ye=Fe+x,nt=Math.min(Fe+ne,te.x);Me<Pe&&(Fe=fe[Me],Fe<nt+ne);)Me++,nt=Math.min(Fe+ae,te.x);Fe=te.y-ne+b,nt+=x;var ot=te.y+b;a.curve===Fh?Sp(y,nt,ot,!1):Ih(y,Ye,Fe,nt,Fe,nt,ot)}else for(--Pe;0<=Pe;){for(Me=Math.min(E.x,Math.max(fe[Pe--]+ae,te.x+ne)),y.lineTo(Me+x,te.y+b),Ye=Me+x,Fe=Math.max(Me-ne,te.x);0<=Pe&&(Me=fe[Pe],Me>Fe-ne);)Pe--,Fe=Math.max(Me-ae,te.x);Me=te.y-ne+b,Fe+=x,nt=te.y+b,a.curve===Fh?Sp(y,Fe,nt,!1):Ih(y,Ye,Me,Fe,Me,Fe,nt)}else if(rn.B(E.x,te.x))if(E.y<te.y)for(Me=0;Me<Pe;){for(Fe=Math.max(E.y,Math.min(fe[Me++]-ae,te.y-ne)),y.lineTo(te.x+x,Fe+b),Ye=Fe+b,Fe=Math.min(Fe+ne,te.y);Me<Pe&&(nt=fe[Me],nt<Fe+ne);)Me++,Fe=Math.min(nt+ae,te.y);nt=te.x-ne+x,ot=te.x+x,Fe+=b,a.curve===Fh?Sp(y,ot,Fe,!1):Ih(y,nt,Ye,nt,Fe,ot,Fe)}else for(--Pe;0<=Pe;){for(Me=Math.min(E.y,Math.max(fe[Pe--]+ae,te.y+ne)),y.lineTo(te.x+x,Me+b),Ye=Me+b,Me=Math.max(Me-ne,te.y);0<=Pe&&(Fe=fe[Pe],Fe>Me-ne);)Pe--,Me=Math.max(Fe-ae,te.y);Fe=te.x-ne+x,nt=te.x+x,Me+=b,a.curve===Fh?Sp(y,nt,Me,!1):Ih(y,Fe,Ye,Fe,Me,nt,Me)}}}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 Yn){if(fe===a)return 0<b.length&&b.sort(function(Me,Fe){return Me-Fe}),b.length;if(fe.isVisible()&&rf(fe)){var Pe=fe.routeBounds;Pe.w()&&a.routeBounds.Yc(Pe)&&!a.usesSamePort(fe)&&(Pe=fe.path,Pe!==null&&Pe.Ed()&&Lx(y,x,b,fe))}}}}}return 0<b.length&&b.sort(function(Me,Fe){return Me-Fe}),b.length}function Lx(a,y,x,b){for(var E=rn.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),ae=Tt.alloc(),fe=1;fe<te;fe++){var Pe=b.i(fe);if(fe<te-1){var Me=b.i(fe+1);if(ne.y===Pe.y&&Pe.y===Me.y){if(Pe.x>ne.x&&Me.x>=Pe.x||Pe.x<ne.x&&Me.x<=Pe.x)continue}else if(ne.x===Pe.x&&Pe.x===Me.x&&(Pe.y>ne.y&&Me.y>=Pe.y||Pe.y<ne.y&&Me.y<=Pe.y))continue}e:{Me=a.x;var Fe=a.y,Ye=y.x,nt=y.y,ot=ne.x;ne=ne.y;var ft=Pe.x,Ot=Pe.y;if(rn.B(Me,Ye)){if(!rn.B(Fe,nt)&&rn.B(ne,Ot)&&Math.min(Fe,nt)<ne&&Math.max(Fe,nt)>ne&&Math.min(ot,ft)<Me&&Math.max(ot,ft)>Me&&!rn.B(ot,ft)){ae.x=Me,ae.y=ne,Me=!0;break e}}else if(rn.B(Fe,nt)&&rn.B(ot,ft)&&Math.min(Me,Ye)<ot&&Math.max(Me,Ye)>ot&&Math.min(ne,Ot)<Fe&&Math.max(ne,Ot)>Fe&&!rn.B(ne,Ot)){ae.x=ot,ae.y=Fe,Me=!0;break e}ae.x=0,ae.y=0,Me=!1}Me&&(E?x.push(ae.x):x.push(ae.y)),ne=Pe}Tt.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()))}Yn.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 Yn&&(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 Yn&&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())}}Yn.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},Yn.prototype.isVisible=function(){if(!Ti.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},Yn.prototype.Zb=function(a){if(Ti.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)},Yn.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 Pe=ne[fe];(Pe.ef===y&&Pe.ff===b&&Pe.uf===x&&Pe.vf===E||Pe.ef===x&&Pe.ff===E&&Pe.uf===y&&Pe.vf===b)&&(te===null?te=Pe:(a===null&&(a=[],a.push(te)),a.push(Pe)))}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&&(qn(y.links,a),y.Sl()))}Yn.prototype.ph=function(){return!0},et.Object.defineProperties(Yn.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&&Hl(x),wg(this),this.ff=a;var b=this.fromPort;b!==null&&Hl(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&&Hl(x),wg(this),this.vf=a;var b=this.toPort;b!==null&&Hl(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:so},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&&Hl(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&&bn(a,">= 0",Yn,"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:so},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&&Hl(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&&bn(a,">= 0",Yn,"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?hr: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 fr?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),rn.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);rn.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 Tt)}},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);rn.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):rn.$(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 On,b=0;b<a.length/2;b++)E=new Tt(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(!Gt(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new On,b=0;b<a.length;b++)E=a[b],x.add(new Tt(E.x,E.y).freeze())}}else if(a instanceof On)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Ft("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&&Bo(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)}}}),Yn.prototype.invalidateOtherJumpOvers=Yn.prototype.Xo,Yn.prototype.findClosestSegment=Yn.prototype.ez,Yn.prototype.updateRoute=Yn.prototype.vg,Yn.prototype.invalidateRoute=Yn.prototype.bb,Yn.prototype.rollbackRoute=Yn.prototype.rv,Yn.prototype.commitRoute=Yn.prototype.zf,Yn.prototype.startRoute=Yn.prototype.uh,Yn.prototype.clearPoints=Yn.prototype.Fj,Yn.prototype.removePoint=Yn.prototype.pv,Yn.prototype.addPointAt=Yn.prototype.yf,Yn.prototype.addPoint=Yn.prototype.ne,Yn.prototype.insertPointAt=Yn.prototype.m,Yn.prototype.insertPoint=Yn.prototype.Kz,Yn.prototype.setPointAt=Yn.prototype.L,Yn.prototype.setPoint=Yn.prototype.dd,Yn.prototype.getPoint=Yn.prototype.i,Yn.prototype.getOtherPort=Yn.prototype.Cz,Yn.prototype.getOtherNode=Yn.prototype.To;var Nf=null,Of=null,Jv=new an(Yn,"Normal",1),Mx=new an(Yn,"Orthogonal",2),Tx=new an(Yn,"AvoidsNodes",6),nS=new an(Yn,"AvoidsNodesStraight",7),rl=new an(Yn,"None",0),ou=new an(Yn,"Bezier",9),Fh=new an(Yn,"JumpGap",10),bp=new an(Yn,"JumpOver",11),bg=new an(Yn,"End",17),e0=new an(Yn,"Scale",18),t0=new an(Yn,"Stretch",19),Cg=new an(Yn,"OrientAlong",21),_g=new an(Yn,"OrientPlus90",22),Pg=new an(Yn,"OrientMinus90",23),Qv=new an(Yn,"OrientOpposite",24),n0=new an(Yn,"OrientUpright",25),Eg=new an(Yn,"OrientPlus90Upright",26),Lg=new an(Yn,"OrientMinus90Upright",27),i0=new an(Yn,"OrientUpright45",28),iS=16,rS=14,Mg=8;Yn.className="Link",Yn.Normal=Jv,Yn.Orthogonal=Mx,Yn.AvoidsNodes=Tx,Yn.AvoidsNodesStraight=nS,Yn.None=rl,Yn.Bezier=ou,Yn.JumpGap=Fh,Yn.JumpOver=bp,Yn.End=bg,Yn.Scale=e0,Yn.Stretch=t0,Yn.OrientAlong=Cg,Yn.OrientPlus90=_g,Yn.OrientMinus90=Pg,Yn.OrientOpposite=Qv,Yn.OrientUpright=n0,Yn.OrientPlus90Upright=Eg,Yn.OrientMinus90Upright=Lg,Yn.OrientUpright45=i0,Yn.EndSegmentStep=8,Yn.CurvinessStart=iS,Yn.SpacingMin=rS,Yn.OrthoShortCut=Mg;function r0(a,y,x,b){Sr(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){Sr(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 Pe=y|0,Me=x|0,Fe=a.ac[Pe][Me];if(Fe>=of&&Fe<_p)for(E?Me+=b:Pe+=b,Fe+=1;te<=Pe&&Pe<=ne&&ae<=Me&&Me<=fe&&!(Fe>=a.ac[Pe][Me]);)a.ac[Pe][Me]=Fe,Fe+=1,E?Me+=b:Pe+=b;if(Pe=E?Me:Pe,E)if(0<b)for(x+=b;x<Pe;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>Pe;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<Pe;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>Pe;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 Pe=jh,Me=of;for(a.ac[y][x]=Me;Pe===jh&&y>te&&y<ne&&x>ae&&x<fe;)Me+=1,a.ac[y][x]=Me,E?x+=b:y+=b,Pe=a.ac[y][x]}function s0(a,y,x,b,E,te,ne,ae,fe){y|=0,x|=0;var Pe=jh,Me=_p;for(a.ac[y][x]=Me;Pe===jh&&y>te&&y<ne&&x>ae&&x<fe;)a.ac[y][x]=Me,E?x+=b:y+=b,Pe=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 Pe=b.x,Me=b.y;if(Cp(a,Pe,Me))if(Pe-=a.Nd,Pe/=a.rc,Me-=a.Od,Me/=a.sc,1>=Math.abs(ae-Pe)&&1>=Math.abs(fe-Me))a.abort=!0;else{var Fe=te.x;b=te.y,y=te.x+te.width;var Ye=te.y+te.height;Fe-=a.Nd,Fe/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Ye-=a.Od,Ye/=a.sc,te=Math.max(0,Math.min(a.di,Fe|0)),y=Math.min(a.di,Math.max(0,y|0)),Fe=Math.max(0,Math.min(a.ei,b|0)),Ye=Math.min(a.ei,Math.max(0,Ye|0)),b=a.ac,ae|=0,fe|=0,Pe|=0,Me|=0;var nt=x===0||x===90?1:-1;if(x=x===90||x===270,b[ae][fe]===jh?(o0(a,ae,fe,nt,x,te,y,Fe,Ye),o0(a,ae,fe,1,!x,te,y,Fe,Ye),o0(a,ae,fe,-1,!x,te,y,Fe,Ye)):o0(a,ae,fe,nt,x,ae,fe,ae,fe),b[Pe][Me]===jh?(s0(a,Pe,Me,E===0||E===90?1:-1,E===90||E===270,te,y,Fe,Ye),s0(a,Pe,Me,1,!(E===90||E===270),te,y,Fe,Ye),s0(a,Pe,Me,-1,!(E===90||E===270),te,y,Fe,Ye)):s0(a,Pe,Me,nt,x,Pe,Me,Pe,Me),x=Gn(),ne&&aS(a,Pe,Me,E,ae,fe,x))for((x[0]!==Pe||x[1]!==Me)&&(x.unshift(Me),x.unshift(Pe)),(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],Pe=x[te+1];y>E?E++:y<E?E--:Pe>ne?ne++:Pe<ne&&ne--,b[E][ne]=a++,E!==y||ne!==Pe;);else Vc(a,ae,fe,1,!1,te,y,Fe,Ye),Vc(a,ae,fe,-1,!1,te,y,Fe,Ye),Vc(a,ae,fe,1,!0,te,y,Fe,Ye),Vc(a,ae,fe,-1,!0,te,y,Fe,Ye);Jn(x)}}}}function aS(a,y,x,b,E,te,ne){for(var ae=a.ac,fe=y,Pe=x;;){if(fe===E&&Pe===te)return!0;var Me=fe,Fe=Pe;if(b===0)if(Me<E)Me++;else break;else if(b===90)if(Fe<te)Fe++;else break;else if(b===180)if(Me>E)Me--;else break;else if(Fe>te)Fe--;else break;var Ye=ae[Me][Fe];if(Ye===0||Ye===ey)break;fe=Me,Pe=Fe}for(;;){if(Me=b,Fe=fe,Ye=Pe,b===0?Ye<te?(Me=90,Ye++):Ye>te&&(Me=270,Ye--):b===90?Fe<E?(Me=0,Fe++):Fe>E&&(Me=180,Fe--):b===180?Ye<te?(Me=90,Ye++):Ye>te&&(Me=270,Ye--):Fe<E?(Me=0,Fe++):Fe>E&&(Me=180,Fe--),Fe=ae[Fe][Ye],Me!==b&&Fe!==0&&Fe!==ey){if(ne.push(fe),ne.push(Pe),aS(a,fe,Pe,Me,E,te,ne))return!0;ne.pop(),ne.pop()}if(ae[fe][Pe]=ey,b===0){if(fe===y)return!1;fe--}else if(b===90){if(Pe===x)return!1;Pe--}else if(b===180){if(fe===y)return!1;fe++}else{if(Pe===x)return!1;Pe++}}}et.Object.defineProperties(Tg.prototype,{bounds:{get:function(){return new Ln(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,_p=999999,qv=_p+1,ey=_p+2;Tg.className="PositionArray";function If(){Sr(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 rr?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($s,Tt.alloc()),fe=a.port.ga(Ta,Tt.alloc());for(E=Ln.allocAt(ae.x,ae.y,0,0),E.Ye(fe),Tt.free(ae),Tt.free(fe),ae=Tt.allocAt(E.x+E.width/2,E.y+E.height/2),fe=a.port.li(),ne=ne.iterator;ne.next();){var Pe=ne.value;if(Pe.isVisible()&&Pe.fromPort!==Pe.toPort){var Me=Pe.fromPort===a.port||Pe.fromNode!==null&&Pe.fromNode.Td(b),Fe=Pe.computeSpot(Me,a.port);if(Fe.$c()&&(Me=Me?Pe.toPort:Pe.fromPort,Me!==null)){var Ye=Me.part;if(Ye!==null){var nt=Ye.findVisibleNode();nt!==null&&nt!==Ye&&(Ye=nt,Me=Ye.port),Me=Pe.computeOtherPoint(Ye,Me),Ye=ae.ab(Me),Ye-=fe,0>Ye?Ye+=360:360<=Ye&&(Ye-=360),Fe=kx(E,Fe,Ye,Pe.isOrthogonal),Fe===0?(Fe=4,180<Ye&&(Ye-=360)):Fe===90?(Fe=8,270<Ye&&(Ye-=360)):Fe===180?Fe=2:(Fe=1,90>Ye&&(Ye+=360)),nt=a.pe[te],nt===void 0?(nt=new ty(Pe,Ye,Fe),a.pe[te]=nt):(nt.link=Pe,nt.angle=Ye,nt.Nc=Fe),nt.hv.set(Me),te++}}}}for(Tt.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,Fe=a.port,b=a.node.portSpreading,ae=Tt.alloc(),fe=Tt.alloc(),ne=Tt.alloc(),Pe=Tt.alloc(),Fe.ga($s,ae),Fe.ga(wl,fe),Fe.ga(Ta,ne),Fe.ga(Aa,Pe),nt=Ye=Me=Fe=0,b===Wv)for(var ot=0;ot<te.length;ot++){var ft=te[ot];if(ft!==null){var Ot=ft.link.computeThickness();switch(ft.Nc){case 8:Ye+=Ot;break;case 2:nt+=Ot;break;case 1:Fe+=Ot;break;default:case 4:Me+=Ot}}}var Mt=ot=0,Ht=1,Wt=ft=0;for(Ot=0;Ot<te.length;Ot++){var Kt=te[Ot];if(Kt!==null){if(ot!==Kt.Nc){switch(ot=Kt.Nc,ot){case 8:var Qt=ne;Mt=Pe;break;case 2:Qt=Pe,Mt=ae;break;case 1:Qt=ae,Mt=fe;break;default:case 4:Qt=fe,Mt=ne}switch(ft=Mt.x-Qt.x,Wt=Mt.y-Qt.y,ot){case 8:Ye>Math.abs(ft)?(Ht=Math.abs(ft)/Ye,Ye=Math.abs(ft)):Ht=1;break;case 2:nt>Math.abs(Wt)?(Ht=Math.abs(Wt)/nt,nt=Math.abs(Wt)):Ht=1;break;case 1:Fe>Math.abs(ft)?(Ht=Math.abs(ft)/Fe,Fe=Math.abs(ft)):Ht=1;break;default:case 4:Me>Math.abs(Wt)?(Ht=Math.abs(Wt)/Me,Me=Math.abs(Wt)):Ht=1}Mt=0}var gn=Kt.Zo;if(b===Wv){switch(Kt=Kt.link.computeThickness(),Kt*=Ht,gn.set(Qt),ot){case 8:gn.x=Qt.x+ft/2+Ye/2-Mt-Kt/2;break;case 2:gn.y=Qt.y+Wt/2+nt/2-Mt-Kt/2;break;case 1:gn.x=Qt.x+ft/2-Fe/2+Mt+Kt/2;break;default:case 4:gn.y=Qt.y+Wt/2-Me/2+Mt+Kt/2}Mt+=Kt}else{var ni=.5;b===$m&&(ni=(Kt.Uo+1)/(Kt.Gl+1)),gn.x=Qt.x+ft*ni,gn.y=Qt.y+Wt*ni}}}for(Tt.free(ae),Tt.free(fe),Tt.free(ne),Tt.free(Pe),Qt=a.pe,te=0;te<Qt.length;te++)b=Qt[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,Ln.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,fs,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 Tt,this.Gl=this.Uo=0,this.Zo=new Tt,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 Qo(a){Sr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Tt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Qo.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},Qo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Qo.prototype.qb=function(){},Qo.prototype.toString=function(){var a=Dn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Qo.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())}}},Qo.prototype.createNetwork=function(){return new Ao(this)},Qo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof pn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof rr?y.lg(a.memberParts):y.lg(a.iterator),y},Qo.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")}},Qo.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()}},Qo.prototype.doLayout=function(a){var y=new In;a instanceof pn?(fd(this,y,a.nodes,!0,this.rh,!0,!1,!0),fd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof rr?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},Qo.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,Pe=fe.width;fe=fe.height,ae.moveTo(b,E),ae instanceof rr&&(ae.rh=!1),b+=Math.max(Pe,50)+20,ne=Math.max(ne,Math.max(fe,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},Qo.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 Yn)&&(kg(ae),this.rh(ae))){var fe=ae.measuredBounds,Pe=fe.width;fe=fe.height,ae.moveTo(x,b),ae instanceof rr&&(ae.rh=!1),x+=Math.max(Pe,50)+20,te=Math.max(te,Math.max(fe,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},Qo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof rr&&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 ii?fe.isLinkLabel||(fe instanceof rr&&fe.layout===null?fd(a,y,fe.memberParts,!1,E,te,ne,ae):(kg(fe),y.add(fe))):ne&&fe instanceof Yn?y.add(fe):!ae||!fe.Zc()||fe instanceof ii||(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()}Qo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Ln),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Qo.prototype.ex=function(a){var y=new In;return a instanceof pn?(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 rr?fd(this,y,a.memberParts,!1,null,!0,!0,!0):fd(this,y,a.iterator,!1,null,!0,!0,!0),y},Qo.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($s),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},et.Object.defineProperties(Qo.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())}}}),Qo.prototype.collectParts=Qo.prototype.ex,Qo.prototype.getLayoutBounds=Qo.prototype.ni,Qo.prototype.invalidateLayout=Qo.prototype.C,Qo.className="Layout";function Ao(a){Sr(this),this.Sc=a,this.wf=new In,this.ye=new In,this.Es=new hi,this.zs=new hi}Ao.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 In,this.ye=new In,this.Es=new hi,this.zs=new hi},Ao.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},Ao.prototype.createVertex=function(){return new sa(this)},Ao.prototype.createEdge=function(){return new Ul(this)},Ao.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 ii)return!ne.isLinkLabel;if(ne instanceof Yn){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 ii&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof rr&&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 Yn&&(!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))}}},Ao.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},st=Ao.prototype,st.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},st.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},st.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}st.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},st.ki=function(a){return a===null?null:this.Es.I(a)},st.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}}st.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},st.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))}st.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},st.Lo=function(a){return a===null?null:this.zs.I(a)},st.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},st.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))}},st.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]);Jn(a)},Ao.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]);Jn(a),Jn(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]);Jn(y)}Ao.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new On;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))}}Ao.prototype.dz=function(){for(var a=new In,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},et.Object.defineProperties(Ao.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}}}),Ao.prototype.findAllParts=Ao.prototype.dz,Ao.prototype.splitIntoSubNetworks=Ao.prototype.Zx,Ao.prototype.deleteSelfEdges=Ao.prototype.Ko,Ao.prototype.reverseEdge=Ao.prototype.gm,Ao.prototype.linkVertexes=Ao.prototype.Zj,Ao.prototype.findEdge=Ao.prototype.Lo,Ao.prototype.deleteLink=Ao.prototype.Yy,Ao.prototype.deleteEdge=Ao.prototype.Mj,Ao.prototype.addLink=Ao.prototype.Dy,Ao.prototype.addEdge=Ao.prototype.Bo,Ao.prototype.findVertex=Ao.prototype.ki,Ao.prototype.deleteNode=Ao.prototype.Zy,Ao.prototype.deleteVertex=Ao.prototype.Iu,Ao.prototype.addNode=Ao.prototype.Bl,Ao.prototype.addVertex=Ao.prototype.dh,Ao.prototype.addParts=Ao.prototype.lg,Ao.className="LayoutNetwork";function sa(a){Sr(this),this.ob=a,this.j=new Ln(0,0,10,10).freeze(),this.o=new Tt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new On,this.mg=new On}sa.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new On,this.mg=new On},sa.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Pr(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},sa.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Gt(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 rr)){x=Ln.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Fr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),Ln.free(x);return}Ln.free(x)}a.moveTo(y.x,y.y)}},sa.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},sa.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},sa.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},sa.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}et.Object.defineProperties(sa.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=Ln.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),Ln.free(x),!(a instanceof rr)&&(a=a.locationObject.ga(Fr),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 In,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new In,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new In,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 On,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}}}),sa.prototype.deleteDestinationEdge=sa.prototype.Jl,sa.prototype.addDestinationEdge=sa.prototype.zl,sa.prototype.deleteSourceEdge=sa.prototype.Kl,sa.prototype.addSourceEdge=sa.prototype.Cl,sa.className="LayoutVertex",sa.standardComparer=oy,sa.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 Ul(a){Sr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Ul.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Ul.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Pr(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},Ul.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Ul.prototype.commit=function(){},Ul.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},et.Object.defineProperties(Ul.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)}}}),Ul.prototype.getOtherVertex=Ul.prototype.Ax,Ul.className="LayoutEdge";function xa(a){Qo.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)}tt(xa,Qo),xa.prototype.cloneProtected=function(a){Qo.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},xa.prototype.qb=function(a){a.classType===xa?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:Ft("Unknown enum value: "+a):Qo.prototype.qb.call(this,a)},xa.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 rr)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,Pe=Ln.alloc(),Me=Math.max(this.cellSize.width,1);if(!isFinite(Me))for(var Fe=Me=0;Fe<E.length;Fe++){var Ye=this.ni(E[Fe],Pe);Me=Math.max(Me,Ye.width)}if(Me=Math.max(Me+ae,1),Fe=Math.max(this.cellSize.height,1),!isFinite(Fe))for(Ye=Fe=0;Ye<E.length;Ye++){var nt=this.ni(E[Ye],Pe);Fe=Math.max(Fe,nt.height)}Fe=Math.max(Fe+fe,1),Ye=this.arrangement;for(var ot=nt=this.arrangementOrigin.x,ft=this.arrangementOrigin.y,Ot=0,Mt=0,Ht=0;Ht<E.length;Ht++){var Wt=E[Ht],Kt=this.ni(Wt,Pe),Qt=Math.ceil((Kt.width+ae)/Me)*Me,gn=Math.ceil((Kt.height+fe)/Fe)*Fe;switch(Ye){case uc:var ni=Math.abs(ot-Kt.width);break;default:ni=ot+Kt.width}switch((0<te&&Ot>te-1||0<ne&&0<Ot&&ni-nt>ne)&&(b.push(new Ln(0,ft,ne+ae,Mt)),Ot=0,ot=nt,ft+=Mt,Mt=0),Mt=Math.max(Mt,gn),Ye){case uc:Kt=-Kt.width;break;default:Kt=0}switch(Wt.moveTo(ot+Kt,ft),Ye){case uc:ot-=Qt;break;default:ot+=Qt}Ot++}b.push(new Ln(0,ft,ne+ae,Mt)),Ln.free(Pe);break;case Ag:for(fe=ne,Me=te,Fe=y,Ye=x,ne=Ln.alloc(),nt=Math.max(this.cellSize.width,1),te=ft=Pe=0,ae=Tt.alloc(),ot=0;ot<E.length;ot++)Mt=E[ot],Ot=this.ni(Mt,ne),Mt=Dh(Mt,Mt.locationObject,Mt.locationSpot,ae),Pe=Math.max(Pe,Mt.x),ft=Math.max(ft,Ot.width-Mt.x),te=Math.max(te,Mt.y);switch(ot=this.arrangement,ot){case uc:Pe+=Fe;break;default:ft+=Fe}nt=isFinite(nt)?Math.max(nt+Fe,1):Math.max(Pe+ft,1);var fi=Mt=this.arrangementOrigin.x;for(Ht=this.arrangementOrigin.y,ft=0,fe>=Pe&&(fe-=Pe),Pe=Wt=0,Qt=Math.max(this.cellSize.height,1),Kt=te=0,gn=!0,Ot=Tt.alloc(),ni=0;ni<E.length;ni++){var ui=E[ni],$n=this.ni(ui,ne),Rn=Dh(ui,ui.locationObject,ui.locationSpot,ae);if(0<ft)switch(ot){case uc:fi=(fi-Mt-($n.width-Rn.x))/nt,fi=rn.$(Math.round(fi),fi)?Math.round(fi):Math.floor(fi),fi=fi*nt+Mt;break;default:fi=(fi-Mt+Rn.x)/nt,fi=rn.$(Math.round(fi),fi)?Math.round(fi):Math.ceil(fi),fi=fi*nt+Mt}else switch(ot){case uc:Wt=fi+Rn.x+$n.width;break;default:Wt=fi-Rn.x}switch(ot){case uc:var nr=-(fi+Rn.x)+Wt;break;default:nr=fi+$n.width-Rn.x-Wt}if(0<Me&&ft>Me-1||0<fe&&0<ft&&nr>fe){for(b.push(new Ln(0,gn?Ht-te:Ht,fe+Fe,Kt+te+Ye)),fi=0;fi<ft&&ni!==ft;fi++){nr=E[ni-ft+fi];var $i=Dh(nr,nr.locationObject,nr.locationSpot,Ot);nr.moveTo(nr.position.x,nr.position.y+te-$i.y)}Kt+=Ye,Ht=gn?Ht+Kt:Ht+(Kt+te),ft=Kt=te=0,fi=Mt,gn=!1}switch(fi===Mt&&(Pe=ot===uc?Math.max(Pe,$n.width-Rn.x):Math.min(Pe,-Rn.x)),te=Math.max(te,Rn.y),Kt=Math.max(Kt,$n.height-Rn.y),isFinite(Qt)&&(Kt=Math.max(Kt,Math.max($n.height,Qt)-Rn.y)),gn?ui.moveTo(fi-Rn.x,Ht-Rn.y):ui.moveTo(fi-Rn.x,Ht),ot){case uc:fi-=Rn.x+Fe;break;default:fi+=$n.width-Rn.x+Fe}ft++}if(b.push(new Ln(0,Ht,fe+Fe,(gn?Kt:Kt+te)+Ye)),E.length!==ft)for(fe=0;fe<ft;fe++)Me=E[E.length-ft+fe],Fe=Dh(Me,Me.locationObject,Me.locationSpot,ae),Me.moveTo(Me.position.x,Me.position.y+te-Fe.y);if(Tt.free(ae),Tt.free(Ot),ot===uc)for(E=0;E<b.length;E++)te=b[E],te.width+=Pe,te.x-=Pe;else for(E=0;E<b.length;E++)te=b[E],te.x>Pe&&(te.width+=te.x-Pe,te.x=Pe);Ln.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 Tt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new Tt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},xa.prototype.commitLayers=function(){};function cS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}et.Object.defineProperties(xa.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 an(xa,"Position",0),Ag=new an(xa,"Location",1),l0=new an(xa,"LeftToRight",2),uc=new an(xa,"RightToLeft",3),sy=new an(xa,"Forward",4),u0=new an(xa,"Reverse",5),Ng=new an(xa,"Ascending",6),c0=new an(xa,"Descending",7);xa.className="GridLayout",xa.standardComparer=cS,xa.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},xa.Position=a0,xa.Location=Ag,xa.LeftToRight=l0,xa.RightToLeft=uc,xa.Forward=sy,xa.Reverse=u0,xa.Ascending=Ng,xa.Descending=c0;function vo(){this.On=new In,this.Dn=new In,this.Pa=new In,this.cf=new hi,this.bf=new hi,this.aj=new hi,this.H=null,this.tp=!1}st=vo.prototype,st.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},st.Xe=function(a){this.H=a},st.oi=function(a){if(a instanceof ii){if(this.On.add(a),a instanceof rr){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 Yn?this.Dn.add(a):a instanceof Xr||this.Pa.add(a);y=a.data,y===null||a instanceof Xr||(a instanceof Yn?this.bf.add(y,a):this.cf.add(y,a))},st.pc=function(a){if(a.Ej(),a instanceof ii){if(this.On.remove(a),a instanceof rr){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 Yn?this.Dn.remove(a):a instanceof Xr||this.Pa.remove(a);y=a.data,y===null||a instanceof Xr||(a instanceof Yn?this.bf.remove(y):this.cf.remove(y))},st.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 rr)&&Ft('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 rr||Ft('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 Yn||Ft('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]);Jn(y),Jn(x),Jn(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,An('No Group template found for category "'+x+'"'),An(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,An('No Node template found for category "'+x+'"'),An(" 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,An('No Link template found for category "'+a+'"'),An(" 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 ii?a:null)},vo.prototype.findLinkForKey=function(){return null},st=vo.prototype,st.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},st.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof ii?a:null)},st.Kc=function(a){return a===null?null:this.bf.I(a)},st.ms=function(a){for(var y=0;y<arguments.length;++y);y=new In;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(Gt(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator},st.ls=function(a){for(var y=0;y<arguments.length;++y);y=new In;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(Gt(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(sn(te)){if(!sn(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(Gt(y)&&Gt(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===ps){var ne=a.newValue;b==="nodeDataArray"&&Gt(ne)&&hS(this,ne),y.isModified=!0}else if(x===us){var ae=a.oldValue;b==="nodeDataArray"&&Gt(ae)&&this.ip(ae),y.isModified=!0}else x===Wa&&(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,Pe=a.object;Pe===y.model?(fe==="nodeKeyProperty"||fe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(Pe,fe),y.isModified=!0}else if(x===ps||x===us){var Me=a.change===ps,Fe=Me?a.newParam:a.oldParam,Ye=Me?a.newValue:a.oldValue,nt=this.aj.I(a.object);if(Array.isArray(nt))for(a=0;a<nt.length;a++){var ot=nt[a];if(Me)Tm(ot,Ye,Fe,!0);else if(!(0>Fe)){var ft=Fe+fg(ot);ot.pc(ft,!0),wv(ot,ft,Fe)}}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 In,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){PS(a,ne,!1)}),b=0;b<x.length;b++){var te=x[b];this.Lc(te)===null&&_S(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);Jn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(sn(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(sn(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 hi;if(sn(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 In;for(var te=new hi,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof Yn)a||ae.fromNode!==null&&ae.toNode!==null||E.add(ae);else if(ae instanceof ii&&ae.data!==null&&x.Tl()){var fe=ae;ae=ne.key;var Pe=ae.pg();Pe!==null&&(Pe=b.I(Pe),Pe!==null?(x.qe(fe.data,x.wa(Pe.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 Me=new hi;b.each(function(Fe){Fe.key.data!==null&&Me.add(Fe.key.data,Fe.value.data)}),x(Me,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 Ti))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof ii){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 rr&&te instanceof rr)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,b,E),ne instanceof Yn||ne===null||(ne.containingGroup=te)}else if(y instanceof Yn&&te instanceof Yn)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 ii&&(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 Yn||(b=E.copyNodeData(b),Gt(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 Yn||(E=y.copyNodeData(b)),Gt(E)&&(x.data=E)));return x},et.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 ha(a){vo.apply(this,arguments)}tt(ha,vo),ha.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},ha.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 ii&&(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 ii&&(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}}}}ha.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)})}ha.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ha.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ha.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ha.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ha.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ha.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},ha.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ha.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 Pe=this.Kc(a.object);if(Pe!==null){var Me=a.newValue;typeof Me=="string"&&(Pe.fromPortId=Me)}}else if(E==="linkToPortId"){var Fe=this.Kc(a.object);if(Fe!==null){var Ye=a.newValue;typeof Ye=="string"&&(Fe.toPortId=Ye)}}else if(E==="nodeGroupKey"){var nt=this.Lc(a.object);if(nt!==null){var ot=a.newValue;if(ot!==void 0){var ft=this.Vb(ot);ft instanceof rr?nt.containingGroup=ft:nt.containingGroup=null}else nt.containingGroup=null}}else if(E==="linkLabelKeys"){var Ot=this.Kc(a.object);if(Ot!==null){var Mt=a.oldValue,Ht=a.newValue;Array.isArray(Mt)&&Mt.forEach(function(Rn){0<=Ht.indexOf(Rn)||(Rn=y.Vb(Rn),Rn!==null&&(Rn.labeledLink=null))}),Array.isArray(Ht)&&Ht.forEach(function(Rn){Rn=y.Vb(Rn),Rn!==null&&(Rn.labeledLink=Ot)})}}else if(E==="linkCategory"){var Wt=this.Kc(a.object),Kt=a.newValue;Wt!==null&&typeof Kt=="string"&&(Wt.category=Kt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===ps){var Qt=a.newValue;if(E==="linkDataArray"&&typeof Qt=="object"&&Qt!==null)yS(this,Qt);else if(E==="linkLabelKeys"&&gd(Qt)){var gn=this.Kc(a.object),ni=this.Vb(Qt);gn!==null&&ni!==null&&(ni.labeledLink=gn)}x.isModified=!0}else if(b===us){var fi=a.oldValue;if(E==="linkDataArray"&&typeof fi=="object"&&fi!==null)this.ip(fi);else if(E==="linkLabelKeys"&&gd(fi)){var ui=this.Vb(fi);ui!==null&&(ui.labeledLink=null)}x.isModified=!0}}else if(b===Vo){var $n=a.propertyName;a.object!==x.model||$n!=="linkFromKeyProperty"&&$n!=="linkToKeyProperty"&&$n!=="linkFromPortIdProperty"&&$n!=="linkToPortIdProperty"&&$n!=="linkLabelKeysProperty"&&$n!=="nodeIsGroupProperty"&&$n!=="nodeGroupKeyProperty"&&$n!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ha.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new In,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)})},ha.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 Yn){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 In().addAll(y);var ne=new In;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 Xr)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof rr)&&(a.containingGroup=y)}}},ha.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 rr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof ii&&(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 rr&&(E.containingGroup=a))}},ha.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ii){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 rr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&cc(y,x,b)}}},ha.prototype.copyPartData=function(a,y){var x=vo.prototype.copyPartData.call(this,a,y);if(a instanceof Yn)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},ha.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 Yn){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 ii&&(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 ii||(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},ha.prototype.findLinkForKey=ha.prototype.findLinkForKey,ha.prototype.findPartForKey=ha.prototype.findPartForKey,ha.prototype.removeAllModeledParts=ha.prototype.removeAllModeledParts,ha.prototype.addModeledParts=ha.prototype.addModeledParts,ha.prototype.addAllModeledParts=ha.prototype.addAllModeledParts,ha.className="GraphLinksPartManager";function wu(){vo.apply(this,arguments),this.Sg=null}tt(wu,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||!hn(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}}}wu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},wu.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},wu.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}},wu.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))},wu.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},wu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},wu.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),Pe=a.newValue;if(fe!==null&&typeof Pe=="string"){var Me=fe.kh();Me!==null&&(Me.category=Pe)}}y.isModified=!0}}else if(x===Vo){var Fe=a.propertyName;a.object===y.model&&Fe==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},wu.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof ii&&(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)))}}},wu.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))},wu.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 ii&&y.mh(te)===x&&d0(this,E,this.ii(te))}hc(y,x)}a=y.mh(a),a!==void 0&&E instanceof ii&&(a=this.Vb(a),d0(this,a,E))}},wu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ii){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(us,"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)}},wu.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},wu.prototype.findLinkForKey=wu.prototype.findLinkForKey,wu.className="TreePartManager";function Si(a,y){this.kl=new In,this.il=new In,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,Sr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new hi,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 hi,this.Lt=new On,this.Wg=!1,this.o=null,this.undoManager=new Ro,a!==void 0&&(sn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Si.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},Si.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Si.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Si.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)+":"+ri(E)}}return y},Si.prototype.xA=function(a){a.change!==Wa&&Ft("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Rs?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Si.prototype.Qv=function(a,y){var x=this,b=!1,E=new In,te=new In,ne=new In,ae=this.vh;a.changes.each(function(Fe){Fe.model===x&&(Fe.modelChange==="nodeDataArray"?Fe.change===ps?E.add(Fe.newValue):Fe.change===us&&ne.add(Fe.oldValue):x.lb(Fe.object)?te.add(Fe.object):Fe.change!==Vo||x.modelData!==Fe.object&&Fe.propertyName!=="modelData"?Fe.object!==null&&(ae&&ae.contains(Fe.object)?ae.get(Fe.object).each(function(Ye){x.lb(Ye)&&te.add(Ye)}):Fe.object instanceof Si||x.ri()&&x.Jc(Fe.object)||bS(x,Fe.object).each(function(Ye){te.add(Ye)})):b=!0)});var fe=this.il;fe.clear(),E.each(function(Fe){fe.add(x.wa(Fe)),y||te.add(Fe)});var Pe=this.kl;Pe.clear(),ne.each(function(Fe){Pe.add(x.wa(Fe)),y&&te.add(Fe)}),a=x.cloneDeep(te.Fa());var Me=null;return b&&(Me===null&&(Me={}),Me.modelData=this.cloneDeep(this.modelData)),0<fe.count&&(Me===null&&(Me={}),y?Me.removedNodeKeys=fe.Fa():Me.insertedNodeKeys=fe.Fa()),0<a.length&&(Me===null&&(Me={}),Me.modifiedNodeData=a),0<Pe.count&&(Me===null&&(Me={}),y?Me.insertedNodeKeys=Pe.Fa():Me.removedNodeKeys=Pe.Fa()),Pe.clear(),fe.clear(),Me},Si.prototype.cloneDeep=function(a){return Pp(this,a,!0)};function Pp(a,y,x,b,E,te){function ne(Fe,Ye){ae?(Fe.__gohashid===void 0&&te.push(Fe),b.set(Fe,Ye)):(Fe=Do++,b.set(Fe,Ye),E.set(Fe,y))}if(!Gt(y))return y;te||(te=[]);var ae=Object.isExtensible(y);if(b||(b=new hi),ae){var fe=b.get(y);if(fe)return fe}else for(E||(E=new hi),fe=E.iterator;fe.next();){var Pe=fe.key;if(fe.value===y&&(Pe=b.get(Pe)))return Pe}if(Array.isArray(y)){fe=[],ne(y,fe);for(var Me=0;Me<y.length;Me++)fe.push(Pp(a,y[Me],!1,b,E,te))}else if(y instanceof Tt||y instanceof Xn||y instanceof Ln||y instanceof Ei||y instanceof yi)fe=y.copy(),ne(y,fe);else{if(y instanceof mo||y instanceof Qn||y instanceof an)return y;if(y instanceof On)fe=new On().addAll(Pp(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof In)fe=new In().addAll(Pp(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof hi)fe=new hi().addAll(Pp(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(Me in fe={},ne(y,fe),y)Me!=="__gohashid"&&(fe[Me]=Pp(a,y[Me],!1,b,E,te))}return x&&te.forEach(function(Fe){delete Fe.__gohashid}),fe}st=Si.prototype,st.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},st.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},st.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,Gt(y)&&(a.dm(y),a.modelData=y)}st.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)},st.kv=function(a){xS(this,a),a=a.nodeDataArray,sn(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 In,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new hi,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===ps||te===us)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function bS(a,y){for(var x=new In,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(Gt(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}st.Pv=function(a,y){var x=this,b=!1,E=new In,te=new In,ne=new In,ae=this.vh;a.changes.each(function(Me){Me.model===x&&(Me.modelChange==="nodeDataArray"?Me.change===ps?E.add(Me.newValue):Me.change===us&&ne.add(Me.oldValue):x.lb(Me.object)?te.add(Me.object):Me.change!==Vo||x.modelData!==Me.object&&Me.propertyName!=="modelData"?Me.object!==null&&(ae&&ae.contains(Me.object)?ae.get(Me.object).each(function(Fe){x.lb(Fe)&&te.add(Fe)}):Me.object instanceof Si||x.ri()&&x.Jc(Me.object)||bS(x,Me.object).each(function(Fe){te.add(Fe)})):b=!0)});var fe=this.il;fe.clear(),E.each(function(Me){fe.add(x.wa(Me)),y||te.add(Me)});var Pe=this.kl;return Pe.clear(),ne.each(function(Me){Pe.add(x.wa(Me)),y&&te.add(Me)}),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<Pe.count&&(a+=(y?this.Wv:this.Yv)+pd(this,Pe.Fa(),!0)),Pe.clear(),fe.clear(),a},st.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)&&Ft("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new hi;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)},st.$x=function(a,y){a.change!==Wa&&Ft("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Rs?(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 }'},st.yA=function(a,y){return this.$x(a,y)},st.np=function(a){return a===void 0&&(a=Ig(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},st.toJSON=function(a){return this.np(a)},st.Zw=function(a){var y=null;if(typeof a=="string")try{y=Ct.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Ft("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Ft("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},st.Ky=function(a){return this.Zw(a)},Si.constructGraphLinksModel=function(){return new Si},st=Si.prototype,st.dm=function(a){if(sn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Gt(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Ft("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(Gt(a)){for(y in a)if(x=a[y],Gt(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 On,b=0;b<x.length/2;b++)E.add(new Tt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Nx(a)}return a},st.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()):sn(a)?pd(this,a):Gt(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 wi;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 ol(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function cy(a,y){var x=y;if(x instanceof Tt)y={class:"go.Point",x:ol(x.x),y:ol(x.y)};else if(x instanceof Xn)y={class:"go.Size",width:ol(x.width),height:ol(x.height)};else if(x instanceof Ln)y={class:"go.Rect",x:ol(x.x),y:ol(x.y),width:ol(x.width),height:ol(x.height)};else if(x instanceof Ei)y={class:"go.Margin",top:ol(x.top),right:ol(x.right),bottom:ol(x.bottom),left:ol(x.left)};else if(x instanceof yi)x.sb()?y={class:"go.Spot",x:ol(x.x),y:ol(x.y),offsetX:ol(x.offsetX),offsetY:ol(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof mo){if(y={class:"go.Brush",type:x.type.name},x.type===Nh?y.color=x.color:(x.type===ch||x.type===Su)&&(y.start=x.start,y.end=x.end,x.type===Su&&(x.startRadius!==0&&(y.startRadius=ol(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=ol(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 Qn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=ol(x.startX)),x.startY!==0&&(y.startY=ol(x.startY)),x.endX!==0&&(y.endX=ol(x.endX)),x.endY!==0&&(y.endY=ol(x.endY)),x.spot1.D($s)||(y.spot1=x.spot1),x.spot2.D(Ta)||(y.spot2=x.spot2),x.type===Qn.o&&(y.path=Qn.ia(x))):x instanceof an&&(y={class:"go.EnumValue",classType:Ig(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=Ns(y,E);if(!CS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof On){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 sl(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 Tt(sl(a.x),sl(a.y));else if(y==="Size")x=new Xn(sl(a.width),sl(a.height));else if(y==="Rect")x=new Ln(sl(a.x),sl(a.y),sl(a.width),sl(a.height));else if(y==="Margin")x=new Ei(sl(a.top),sl(a.right),sl(a.bottom),sl(a.left));else if(y==="Spot")typeof a.enum=="string"?x=xh(a.enum):x=new yi(sl(a.x),sl(a.y),sl(a.offsetX),sl(a.offsetY));else if(y==="Brush"){if(x=new mo,x.type=si(mo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof yi&&(x.start=a.start),a.end instanceof yi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=sl(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=sl(a.endRadius)),a=a.colorStops,Gt(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Qn.parse(a.path):x=new Qn,x.type=si(Qn,a.type),typeof a.startX=="number"&&(x.startX=sl(a.startX)),typeof a.startY=="number"&&(x.startY=sl(a.startY)),typeof a.endX=="number"&&(x.endX=sl(a.endX)),typeof a.endY=="number"&&(x.endY=sl(a.endY)),a.spot1 instanceof yi&&(x.spot1=a.spot1),a.spot2 instanceof yi&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=si(b,a.name)));return x}st.Pe=function(a){return this.Lt.add(a),this},st.ik=function(a){this.Lt.remove(a)},st.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)},st.cb=function(a,y,x,b,E,te,ne){ea(this,"",a,y,x,b,E,te,ne)},st.g=function(a,y,x,b,E){ea(this,"",Vo,a,this,y,x,b,E)},st.Fs=function(a,y,x,b,E,te){ea(this,"",Vo,y,a,x,b,E,te)};function ea(a,y,x,b,E,te,ne,ae,fe){ae===void 0&&(ae=null),fe===void 0&&(fe=null);var Pe=new zo;Pe.model=a,Pe.change=x,Pe.modelChange=y,Pe.propertyName=b,Pe.object=E,Pe.oldValue=te,Pe.oldParam=ae,Pe.newValue=ne,Pe.newParam=fe,a.ds(Pe)}Si.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===ps?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Gt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&qn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&Nn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!sn(b)&&a.propertyName&&(b=Ns(a.object,a.propertyName)),sn(b)&&typeof x=="number"&&(a=a.newValue,y?qn(b,x):Nn(b,x,a))):Ft("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===us?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Gt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&Nn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&qn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!sn(b)&&a.propertyName&&(b=Ns(a.object,a.propertyName)),sn(b)&&typeof x=="number"&&(a=a.oldValue,y?Nn(b,x,a):qn(b,x))):Ft("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Wa&&Ft("unknown ChangedEvent: "+a.toString())},Si.prototype.Ea=function(a){return this.undoManager.Ea(a)},Si.prototype.eb=function(a){return this.undoManager.eb(a)},Si.prototype.Kf=function(){return this.undoManager.Kf()},Si.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}},st=Si.prototype,st.La=function(a,y){y===void 0&&(y=""),ea(this,"SourceChanged",Wa,y,a,null,null)},st.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Ns(a,y),y!==void 0)){if(gd(y))return y;Ft("Key value for node data "+a+" is not a number or a string: "+y)}}},st.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Ns(a,x);b!==y&&this.hc(y)===null&&($o(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),ea(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"}st.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},st.hc=function(a){return a===null&&Ft("Model.findNodeDataForKey:key must not be null"),a!==void 0&&gd(a)?this.kb.I(a):null},st.$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)}}}}},st.xf=function(a){a!==null&&(fo(a),this.lb(a)||_S(this,a,!0))};function _S(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&&Ft("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Nn(a.Tc,b,y)),ea(a,"nodeDataArray",ps,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}st.Fy=function(a){if(sn(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)},st.cm=function(a){a!==null&&PS(this,a,!0)};function PS(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;qn(a.Tc,b)}ea(a,"nodeDataArray",us,"nodeDataArray",a,y,null,b,null),a.qp(y)}st.nA=function(a){if(sn(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)},st.$z=function(a){if(a!==this.nodeDataArray&&sn(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()}},st.jp=function(a,y){y!==void 0&&(a=Og(this,a),a instanceof In&&this.Vf.add(y,a))},st.Lv=function(){},st.fm=function(){},st.em=function(){},st.qp=function(){};function cc(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new In,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 In&&(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 In?a:null)}st.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Si.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):p0(this,a,!0),Gt(a)&&Sr(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 Sr(b),b}if(x&&Gt(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=Ns(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 Si||te instanceof Ro||te instanceof Rs||te instanceof zo||(te=p0(a,te,!1)),$o(x,b,te)}return Sr(x),x}return y instanceof Tt||y instanceof Xn||y instanceof Ln||y instanceof yi||y instanceof Ei?y.copy():y}Si.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 en&&(ES=!0,An('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),An(" Is that really your intent?"));var b=Ns(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},st=Si.prototype,st.set=function(a,y,x){this.setDataProperty(a,y,x)},st.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])}},st.Ay=function(a,y){this.ts(a,-1,y)},st.ts=function(a,y,x){0>y&&(y=a.length),Nn(a,y,x),ea(this,"",ps,"",a,null,x,null,y)},st.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Ft("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];qn(a,y),ea(this,"",us,"",a,x,null,y,null)},st.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Ns(a,y),y===void 0))return"";if(typeof y=="string")return y;Ft("getCategoryForNodeData found a non-string category for "+a+": "+y)},st.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Ns(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),ea(this,"nodeCategory",Vo,x,a,b,y))}else $o(a,x,y)}},st.lm=function(a,y){this.jm(y,this.Ro(a))},st.Tl=function(){return!1},st.Wj=function(){return!1},st.ri=function(){return!1},st.xs=function(){return!1},st.Xj=function(){return!1};function hy(){return new Si}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]:Ct.go!==void 0&&Ct.go[a]?Ct.go[a]:null}function Ns(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){}}et.Object.defineProperties(Si.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===""&&Ft("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Ft("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];Gt(E)||Ft("Model.nodeDataArray must only contain Objects, not: "+E),fo(E)}for(this.Tc=a,b=new On,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(ea(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"}}}),Si.prototype.setCategoryForNodeData=Si.prototype.jm,Si.prototype.getCategoryForNodeData=Si.prototype.Ro,Si.prototype.removeArrayItem=Si.prototype.ov,Si.prototype.insertArrayItem=Si.prototype.ts,Si.prototype.addArrayItem=Si.prototype.Ay,Si.prototype.assignAllDataProperties=Si.prototype.Do,Si.prototype.set=Si.prototype.set,Si.prototype.clearUnresolvedReferences=Si.prototype.Qy,Si.prototype.mergeNodeDataArray=Si.prototype.$z,Si.prototype.removeNodeDataCollection=Si.prototype.nA,Si.prototype.removeNodeData=Si.prototype.cm,Si.prototype.addNodeDataCollection=Si.prototype.Fy,Si.prototype.addNodeData=Si.prototype.xf,Si.prototype.makeNodeDataKeyUnique=Si.prototype.$u,Si.prototype.findNodeDataForKey=Si.prototype.hc,Si.prototype.containsNodeData=Si.prototype.lb,Si.prototype.setKeyForNodeData=Si.prototype.km,Si.prototype.getKeyForNodeData=Si.prototype.wa,Si.prototype.updateTargetBindings=Si.prototype.La,Si.prototype.commit=Si.prototype.commit,Si.prototype.rollbackTransaction=Si.prototype.Kf,Si.prototype.commitTransaction=Si.prototype.eb,Si.prototype.startTransaction=Si.prototype.Ea,Si.prototype.raiseDataChanged=Si.prototype.Fs,Si.prototype.raiseChanged=Si.prototype.g,Si.prototype.raiseChangedEvent=Si.prototype.cb,Si.prototype.removeChangedListener=Si.prototype.ik,Si.prototype.addChangedListener=Si.prototype.Pe,Si.prototype.writeJsonValue=Si.prototype.sm,Si.prototype.replaceJsonObjects=Si.prototype.dm,Si.prototype.applyIncrementalJSON=Si.prototype.Ky,Si.prototype.applyIncrementalJson=Si.prototype.Zw,Si.prototype.toJSON=Si.prototype.toJSON,Si.prototype.toJson=Si.prototype.np,Si.prototype.toIncrementalJSON=Si.prototype.yA,Si.prototype.toIncrementalJson=Si.prototype.$x,Si.prototype.toIncrementalData=Si.prototype.xA,Si.prototype.clear=Si.prototype.clear;var ES=!1,Xu={};Si.className="Model",Si.fromJSON=Si.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Ct.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:Ft("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=Ct[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof Si?y=a:Ft("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Si.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Si.safePropertyValue=Ns,Si.safePropertySet=$o,Xu.Brush=mo,Xu.ChangedEvent=zo,Xu.Geometry=Qn,Xu.Margin=Ei,Xu.Panel=Wn,Xu.Point=Tt,Xu.Rect=Ln,Xu.Size=Xn,Xu.Spot=yi,Xu.Transaction=Rs,Xu.UndoManager=Ro;function zs(a,y,x,b){Sr(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 In}zs.prototype.copy=function(){var a=new zs;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},st=zs.prototype,st.qb=function(a){a.classType===zs&&(this.mode=a)},st.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return this._isFrozen=!1,this},st.Kx=function(a){return a===void 0&&(a=null),this.mode=Dg,this.backConverter=a,this},st.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},st.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)}st.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==="")An("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=Ns(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){}}}},st.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=Ns(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 Pe=b.itemIndex,Me=b.panel.itemArray;fe.ov(Me,Pe),fe.ts(Me,Pe,ne)}}else try{if(x!==""){var Fe=te(ne,y,fe);fe!==null?fe.setDataProperty(y,x,Fe):$o(y,x,Fe)}else{var Ye=te(ne,y,fe);if(Ye!==void 0&&fe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var nt=b.itemIndex,ot=b.panel.itemArray;fe.ov(ot,nt),fe.ts(ot,nt,Ye)}}}catch(ft){}}finally{this.st.remove(a)}}}},et.Object.defineProperties(zs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&$t(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&$t(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&$t(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&$t(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&$t(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&$t(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&$t(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&$t(this),this.el=a}}}),zs.prototype.updateSource=zs.prototype.sp,zs.prototype.updateTarget=zs.prototype.Mv,zs.prototype.ofModel=zs.prototype.dA,zs.prototype.ofObject=zs.prototype.cp,zs.prototype.makeTwoWay=zs.prototype.Kx;var Ox="Binding",MS=new an(zs,"OneWay",1),Dg=new an(zs,"TwoWay",2);zs.className="Binding",zs.parseEnum=function(a,y){return function(x){return x=si(a,x),x===null?y:x}},zs.toString=ri,zs.OneWay=MS,zs.TwoWay=Dg;function jr(a,y,x){Si.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new In,this.wb=new hi,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&&(sn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}tt(jr,Si),jr.constructGraphLinksModel=Si.constructGraphLinksModel,jr.prototype.cloneProtected=function(a){Si.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},st=jr.prototype,st.clear=function(){Si.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},st.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)+":"+ri(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},st.Qv=function(a,y){this.linkKeyProperty===""&&Ft("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Si.prototype.Qv.call(this,a,y),b=this,E=new In,te=new In,ne=new In,ae=this.vh;a.changes.each(function(Me){Me.model===b&&(Me.modelChange==="linkDataArray"?Me.change===ps?E.add(Me.newValue):Me.change===us&&ne.add(Me.oldValue):b.Jc(Me.object)?te.add(Me.object):Me.object!==null&&(Me.object!==null&&ae&&ae.contains(Me.object)?ae.get(Me.object).each(function(Fe){b.Jc(Fe)&&te.add(Fe)}):Me.object instanceof Si||b.lb(Me.object)||TS(b,Me.object).each(function(Fe){te.add(Fe)})))});var fe=this.il;fe.clear(),E.each(function(Me){fe.add(b.Ac(Me)),y||te.add(Me)});var Pe=this.kl;return Pe.clear(),ne.each(function(Me){Pe.add(b.Ac(Me)),y&&te.add(Me)}),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<Pe.count&&(x===null&&(x={}),y?x.insertedLinkKeys=Pe.Fa():x.removedLinkKeys=Pe.Fa()),Pe.clear(),fe.clear(),x},st.rm=function(){var a=Si.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},st.gp=function(a){Si.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)},st.Rv=function(){var a=Si.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+pd(this,this.linkDataArray,!0);return a+y},st.kv=function(a){Si.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 In,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];f0(a,y,E,E,x)}return x}st.Pv=function(a,y){this.linkKeyProperty===""&&Ft("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Si.prototype.Pv.call(this,a,y),b=this,E=new In,te=new In,ne=new In,ae=this.vh;a.changes.each(function(Me){Me.model===b&&(Me.modelChange==="linkDataArray"?Me.change===ps?E.add(Me.newValue):Me.change===us&&ne.add(Me.oldValue):b.Jc(Me.object)?te.add(Me.object):Me.object!==null&&(Me.object!==null&&ae&&ae.contains(Me.object)?ae.get(Me.object).each(function(Fe){b.Jc(Fe)&&te.add(Fe)}):Me.object instanceof Si||b.lb(Me.object)||TS(b,Me.object).each(function(Fe){te.add(Fe)})))});var fe=this.il;fe.clear(),E.each(function(Me){fe.add(b.Ac(Me)),y||te.add(Me)});var Pe=this.kl;return Pe.clear(),ne.each(function(Me){Pe.add(b.Ac(Me)),y&&te.add(Me)}),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<Pe.count&&(a+=(y?this.Vv:this.Xv)+pd(this,Pe.Fa(),!0)),Pe.clear(),fe.clear(),a},st.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)&&Ft("applyIncrementalJson cannot change Model properties"),Si.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)},jr.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===ps){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Gt(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===us){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Gt(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}}Si.prototype.changeState.call(this,a,y)}},st=jr.prototype,st.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}},st.yx=function(a){return su(this,a,!0)},st.wv=function(a,y){Ep(this,a,y,!0)},st.Bx=function(a){return su(this,a,!1)},st.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=Ns(y,a),a!==void 0))){if(gd(a))return a;Ft((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=Ns(y,E);te!==x&&(hc(a,te,y),$o(y,E,x),a.hc(x)===null&&cc(a,x,y),ea(a,b?"linkFromKey":"linkToKey",Vo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else $o(y,E,x)}}st.zx=function(a){return g0(this,a,!0)},st.xv=function(a,y){Lp(this,a,y,!0)},st.Cx=function(a){return g0(this,a,!1)},st.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=Ns(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=Ns(y,E);te===void 0&&(te=""),te!==x&&($o(y,E,x),ea(a,b?"linkFromPortId":"linkToPortId",Vo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else $o(y,E,x)}}st.Ef=function(a){if(a===null)return m0;var y=this.je;return y===""?m0:(a=Ns(a,y),a===void 0?m0:a)},st.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Ns(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)}ea(this,"linkLabelKeys",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else $o(a,x,y)}},st.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Ns(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),ea(this,"linkLabelKeys",ps,x,a,null,y,null,E)))}else Ft(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},st.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Ns(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(hc(this,y,a),ea(this,"linkLabelKeys",us,x,a,y,null,E,null)))}else b!==void 0&&Ft(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},st.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Ns(a,y),y!==void 0)){if(gd(y))return y;Ft("Key value for link data "+a+" is not a number or a string: "+y)}}},st.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Ns(a,x);b!==y&&this.jh(y)===null&&($o(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),ea(this,"linkKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},st.jh=function(a){return a===null&&Ft("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&gd(a)?this.wb.I(a):null},st.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)}}}}},st.Jc=function(a){return a===null?!1:this.$f.contains(a)},st.fi=function(a){a!==null&&(fo(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&&Ft("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)),ea(a,"linkDataArray",ps,"linkDataArray",a,null,y,null,b),fy(a,y)}st.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)},st.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(ea(a,"linkDataArray",us,"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)}st.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)},st.Zz=function(a){if(this.linkKeyProperty===""&&Ft("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&sn(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)}st.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):p0(this,a,!0),Gt(a)&&(Sr(a),this.lf!==""&&$o(a,this.lf,void 0),this.mf!==""&&$o(a,this.mf,void 0),this.je!==""&&$o(a,this.je,[])),a},st.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Ns(a,y)},st.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Ns(a,y),y!==void 0)){if(gd(y))return y;Ft("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},st.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Ns(a,x);b!==y&&(hc(this,b,a),$o(a,x,y),this.hc(y)===null&&cc(this,y,a),ea(this,"nodeGroupKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},jr.prototype.copyNodeData=function(a){return a===null?null:(a=Si.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Ns(a,this.Je)===void 0||$o(a,this.Je,void 0),a)},jr.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=Ns(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},st=jr.prototype,st.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&&Ns(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},st.jp=function(a,y){Si.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),ea(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),ea(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,Pe=0;Pe<ae;Pe++)ne[Pe]===E&&(ne[Pe]=te,ea(this,"linkLabelKeys",ps,fe,b,E,te,Pe,Pe))}},st.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;$o(a,b,x),ea(this,"nodeGroupKey",Vo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},st.Lv=function(){Si.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},st.fm=function(a){Si.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;ea(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,ea(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,ea(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&&(ea(this,"linkLabelKeys",ps,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)hc(this,a,x[y]);Jn(x)}},st.em=function(a){Si.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&cc(this,y,a)},st.qp=function(a){Si.prototype.qp.call(this,a);var y=this.lh(a);hc(this,y,a)},st.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Ns(a,y),y===void 0))return"";if(typeof y=="string")return y;Ft("getCategoryForLinkData found a non-string category for "+a+": "+y)},jr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},jr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Ns(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),ea(this,"linkCategory",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},jr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},st=jr.prototype,st.lm=function(a,y){Si.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))}st.Wj=function(){return!0},st.ri=function(){return!0},st.xs=function(){return!0},st.Xj=function(){return!0},et.Object.defineProperties(jr.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];Gt(E)||Ft("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),fo(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new On,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 In,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,ea(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"}}}),jr.prototype.setCategoryForLinkData=jr.prototype.lp,jr.prototype.getCategoryForLinkData=jr.prototype.ps,jr.prototype.assignAllDataProperties=jr.prototype.Do,jr.prototype.setGroupKeyForNodeData=jr.prototype.mp,jr.prototype.getGroupKeyForNodeData=jr.prototype.lh,jr.prototype.isGroupForNodeData=jr.prototype.Yu,jr.prototype.copyLinkData=jr.prototype.Jo,jr.prototype.mergeLinkDataArray=jr.prototype.Zz,jr.prototype.removeLinkDataCollection=jr.prototype.lA,jr.prototype.removeLinkData=jr.prototype.bm,jr.prototype.addLinkDataCollection=jr.prototype.Ey,jr.prototype.addLinkData=jr.prototype.fi,jr.prototype.containsLinkData=jr.prototype.Jc,jr.prototype.makeLinkDataKeyUnique=jr.prototype.Bs,jr.prototype.findLinkDataForKey=jr.prototype.jh,jr.prototype.setKeyForLinkData=jr.prototype.Ks,jr.prototype.getKeyForLinkData=jr.prototype.Ac,jr.prototype.removeLabelKeyForLinkData=jr.prototype.Qx,jr.prototype.addLabelKeyForLinkData=jr.prototype.Bu,jr.prototype.setLabelKeysForLinkData=jr.prototype.Ls,jr.prototype.getLabelKeysForLinkData=jr.prototype.Ef,jr.prototype.setToPortIdForLinkData=jr.prototype.Cv,jr.prototype.getToPortIdForLinkData=jr.prototype.Cx,jr.prototype.setFromPortIdForLinkData=jr.prototype.xv,jr.prototype.getFromPortIdForLinkData=jr.prototype.zx,jr.prototype.setToKeyForLinkData=jr.prototype.Bv,jr.prototype.getToKeyForLinkData=jr.prototype.Bx,jr.prototype.setFromKeyForLinkData=jr.prototype.wv,jr.prototype.getFromKeyForLinkData=jr.prototype.yx,jr.prototype.clear=jr.prototype.clear;var m0=Object.freeze([]);jr.className="GraphLinksModel",Xu.GraphLinksModel=jr,Si.constructGraphLinksModel=Si.constructGraphLinksModel=function(){return new jr},Si.initDiagramModel=hy=function(){return new jr};function al(a,y){Si.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(sn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}tt(al,Si),al.constructGraphLinksModel=Si.constructGraphLinksModel,al.prototype.cloneProtected=function(a){Si.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},st=al.prototype,st.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)+":"+ri(E)}}return y},st.rm=function(){var a=Si.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},st.gp=function(a){Si.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},st.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Ft("applyIncrementalJson cannot change Model properties"),Si.prototype.fp.call(this,a)},st.Vl=function(a){return a},st.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Ns(a,y),y!==void 0)){if(gd(y))return y;Ft("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},st.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=Ns(a,x);b!==y&&(hc(this,b,a),$o(a,x,y),this.hc(y)===null&&cc(this,y,a),ea(this,"nodeParentKey",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},st.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Ns(a,y),y===void 0)?"":typeof y=="string"?y:(Ft("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},al.prototype.getLinkCategoryForData=function(a){return this.ss(a)},al.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Ns(a,x);b===void 0&&(b=""),b!==y&&($o(a,x,y),ea(this,"parentLinkCategory",Vo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else $o(a,x,y)}},al.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},al.prototype.copyNodeData=function(a){return a===null?null:(a=Si.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Ns(a,this.Ke)===void 0||$o(a,this.Ke,void 0),a)},al.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=Ns(a,y);b!==x&&($o(a,y,x),this.Fs(a,y,b,x))},st=al.prototype,st.jp=function(a,y){Si.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},st.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;$o(a,b,x),ea(this,"nodeParentKey",Vo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},st.fm=function(a){Si.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;ea(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]);Jn(x)}},st.em=function(a){Si.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&cc(this,y,a)},st.qp=function(a){Si.prototype.qp.call(this,a);var y=this.mh(a);hc(this,y,a)},st.lm=function(a,y){Si.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},st.Tl=function(){return!0},st.xs=function(){return!0},et.Object.defineProperties(al.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"}}}),al.prototype.setParentLinkCategoryForNodeData=al.prototype.Ms,al.prototype.getParentLinkCategoryForNodeData=al.prototype.ss,al.prototype.setParentKeyForNodeData=al.prototype.qe,al.prototype.getParentKeyForNodeData=al.prototype.mh,al.className="TreeModel",Xu.TreeModel=al;function as(a){Qo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Ju,this.Ti=0,this.Zv=new Tt,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=ll,this.nd=Tp,this.hd=oy,this.tf=6,this.Nn=C0,a&&Object.assign(this,a)}tt(as,Qo),as.prototype.cloneProtected=function(a){Qo.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},as.prototype.qb=function(a){a.classType===as?a===w0||a===b0||a===S0||a===x0||a===Tp?this.sorting=a:a===sf||a===Mp||a===ll||a===vd?this.direction=a:a===zh||a===md||a===Ju||a===Qu?this.arrangement=a:(a===Df||a===C0)&&(this.nodeDiameterFormula=a):Qo.prototype.qb.call(this,a)},as.prototype.createNetwork=function(){return new kp(this)},as.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 On;y.addAll(a.iterator),a=new On;var x=new On,b=this.sort(y),E,te,ne=this.Jp,ae=this.arrangement,fe=this.nodeDiameterFormula,Pe=this.radius;(!isFinite(Pe)||0>=Pe)&&(Pe=NaN);var Me=this.aspectRatio;(!isFinite(Me)||0>=Me)&&(Me=1);var Fe=this.startAngle;isFinite(Fe)||(Fe=0);var Ye=this.sweepAngle;if((!isFinite(Ye)||360<Ye||1>Ye)&&(Ye=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 On,b.addAll(a),b.addAll(x)):(this.arrangement===Qu&&x.reverse(),b=new On,b.addAll(x),b.addAll(a))}fe=b.length;for(var nt=te=E=0;nt<b.length;nt++){var ot=Fe+Ye*te*(this.direction===ll?1:-1)/fe,ft=b.M(nt).diameter;isNaN(ft)&&(ft=yd(b.M(nt),ot)),360>Ye&&(nt===0||nt===b.length-1)&&(ft/=2),E+=ft,te++}if(isNaN(Pe)||ae===Qu){if(isNaN(y)&&(y=6),ae!==Ju&&ae!==Qu){for(te=-1/0,ne=0;ne<fe;ne++)nt=b.M(ne),E=b.M(ne===fe-1?0:ne+1),isNaN(nt.diameter)&&yd(nt,0),isNaN(E.diameter)&&yd(E,0),te=Math.max(te,(nt.diameter+E.diameter)/2);ne=te+y,ae===zh?Pe=(te+y)/(2*Math.PI/fe):Pe=v0(this,ne*(360<=Ye?fe:fe-1),Me,Fe*Math.PI/180,Ye*Math.PI/180)}else Pe=v0(this,E+(360<=Ye?fe:fe-1)*(ae!==Qu?y:1.6*y),Me,Fe*Math.PI/180,Ye*Math.PI/180);te=Pe*Me}else if(te=Pe*Me,nt=py(this,Pe,te,Fe*Math.PI/180,Ye*Math.PI/180),isNaN(y))(ae===Ju||ae===Qu)&&(y=(nt-E)/(360<=Ye?fe:fe-1));else if(ae===Ju||ae===Qu)nt=(nt-E)/(360<=Ye?fe:fe-1),nt<y?(Pe=v0(this,E+y*(360<=Ye?fe:fe-1),Me,Fe*Math.PI/180,Ye*Math.PI/180),te=Pe*Me):y=nt;else{for(ne=-1/0,E=0;E<fe;E++)ot=b.M(E),ft=b.M(E===fe-1?0:E+1),isNaN(ot.diameter)&&yd(ot,0),isNaN(ft.diameter)&&yd(ft,0),ne=Math.max(ne,(ot.diameter+ft.diameter)/2);ne+=y,E=v0(this,ne*(360<=Ye?fe:fe-1),Me,Fe*Math.PI/180,Ye*Math.PI/180),E>Pe?(Pe=E,te=Pe*Me):ne=nt/(360<=Ye?fe:fe-1)}if(this.kw=ae,this.lc=Pe,this.Zm=Me,this.lw=Fe,this.Wp=Ye,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,ae=this.lc,Pe=this.lw,Me=this.Wp,Fe=this.Ti,Ye=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,Ye,Pe,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,Ye,Pe,Fe+(y+fe)/2)/Math.PI;break;case zh:ne=Me/y.length}if(this.direction===sf){switch(b){case md:Fg(this,a,Pe,vd);break;case Ju:Bg(this,a,Pe,vd);break;case zh:Rg(this,a,Me/2,Pe,vd)}switch(b){case md:Fg(this,x,Pe+ne,ll);break;case Ju:Bg(this,x,Pe+ne,ll);break;case zh:Rg(this,x,Me/2,Pe+ne,ll)}}else{switch(b){case md:Fg(this,x,Pe,vd);break;case Ju:Bg(this,x,Pe,vd);break;case zh:Rg(this,x,Me/2,Pe,vd)}switch(b){case md:Fg(this,a,Pe+ne,ll);break;case Ju:Bg(this,a,Pe+ne,ll);break;case zh:Rg(this,a,Me/2,Pe+ne,ll)}}}else switch(b){case md:Fg(this,y,Pe,this.direction);break;case Ju:Bg(this,y,Pe,this.direction);break;case zh:Rg(this,y,Me,Pe,this.direction);break;case Qu:OS(this,y,Me,Pe,this.direction)}else OS(this,y,Me,Pe-Me/2,ll)}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 Pe=b+(E===ll?fe*x/(360<=te?ae:ae-1):-(fe*x)/ae),Me=y.M(fe),Fe=ne*Math.tan(Pe)/a;Fe=Math.sqrt((ne*ne+a*a*Fe*Fe)/(1+Fe*Fe)),Me.centerX=Fe*Math.cos(Pe),Me.centerY=Fe*Math.sin(Pe),Me.actualAngle=180*Pe/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 Pe=y.M(fe),Me=y.M(fe===ae-1?0:fe+1),Fe=te*Math.sin(x);Pe.centerX=E*Math.cos(x),Pe.centerY=Fe,Pe.actualAngle=180*x/Math.PI,isNaN(Pe.diameter)&&yd(Pe,0),isNaN(Me.diameter)&&yd(Me,0),Pe=y0(a,E,te,b===ll?x:-x,(Pe.diameter+Me.diameter)/2+ne),x+=b===ll?Pe:-Pe}}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 Pe=y.M(fe);Pe.centerX=E*Math.cos(x),Pe.centerY=te*Math.sin(x),Pe.actualAngle=180*x/Math.PI,Pe=y0(a,E,te,b===ll?x:-x,ne),x+=b===ll?Pe:-Pe}}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===ll?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),Pe=a.me*Math.sin(b*Math.PI/180),Me=y.Fa();if(Me.length===3)Me[0].centerX=te,Me[0].centerY=0,Me[1].centerX=Me[0].centerX-Me[0].width/2-Me[1].width/2-ne,Me[1].y=Me[0].y,Me[2].centerX=(Me[0].centerX+Me[1].centerX)/2,Me[2].y=Me[0].y-Me[2].height-ne;else if(Me.length===4)Me[0].centerX=te,Me[0].centerY=0,Me[2].centerX=-Me[0].centerX,Me[2].centerY=Me[0].centerY,Me[1].centerX=0,Me[1].y=Math.min(Me[0].y,Me[2].y)-Me[1].height-ne,Me[3].centerX=0,Me[3].y=Math.max(Me[0].y+Me[0].height+ne,Me[2].y+Me[2].height+ne);else{te=Tt.alloc();for(var Fe=0;Fe<Me.length&&(Me[Fe].centerX=fe,Me[Fe].centerY=Pe,!(Fe>=Me.length-1));Fe++)RS(a,fe,Pe,Me,Fe,E,te)||BS(a,fe,Pe,Me,Fe,E,te),fe=te.x,Pe=te.y;if(Tt.free(te),a.mj++,!(23<a.mj)){fe=Me[0].centerX,Pe=Me[0].centerY,te=Me[Me.length-1].centerX,Fe=Me[Me.length-1].centerY;var Ye=Math.abs(fe-te)-((Me[0].width+Me[Me.length-1].width)/2+ne),nt=Math.abs(Pe-Fe)-((Me[0].height+Me[Me.length-1].height)/2+ne);ne=0,1>Math.abs(nt)?Math.abs(fe-te)<(Me[0].width+Me[Me.length-1].width)/2&&(ne=0):ne=0<nt?nt:1>Math.abs(Ye)?0:Ye,fe=Math.abs(te)>Math.abs(Fe)?0<te!=Pe>Fe:0<Fe!=fe<te,(fe=E===ll?fe:!fe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-Me[Me.length-1].width),ne=Math.min(ne,-Me[Me.length-1].height)),a.Xr.compare(ne,Me),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>Me.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),Pe=ne*Math.sin(b*Math.PI/180),Me=Tt.alloc(),Fe=y.Fa(),Ye=0;Ye<Fe.length&&(Fe[Ye].centerX=fe,Fe[Ye].centerY=Pe,!(Ye>=Fe.length-1));Ye++)RS(a,fe,Pe,Fe,Ye,E,Me)||BS(a,fe,Pe,Fe,Ye,E,Me),fe=Me.x,Pe=Me.y;if(Tt.free(Me),a.mj++,!(23<a.mj)){if(fe=Math.atan2(Pe,fe),fe=E===ll?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<Fe.length;fe++)ne.mk[fe]=Fe[fe].bounds.x,ne.tm[fe]=Fe[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,Pe=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var Me=!1;if(0<=x!=(te===ll)){if(te=y+a,te>ae){if(te=y-a,te<-ae)return ne.x=te,ne.y=Pe,!1;Me=!0}}else if(te=y-a,te<-ae){if(te=y+a,te>ae)return ne.x=te,ne.y=Pe,!1;Me=!0}return Pe=Math.sqrt(1-Math.min(1,te*te/(ae*ae)))*fe,0>x!==Me&&(Pe=-Pe),Math.abs(x-Pe)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=Pe,!1):(ne.x=te,ne.y=Pe,!0)}function BS(a,y,x,b,E,te,ne){var ae=a.lc,fe=a.me,Pe=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===ll)){if(te=x-a,te<-fe){if(te=x+a,te>fe){ne.x=Pe,ne.y=te;return}b=!0}}else if(te=x+a,te>fe){if(te=x-a,te<-fe){ne.x=Pe,ne.y=te;return}b=!0}Pe=Math.sqrt(1-Math.min(1,te*te/(fe*fe)))*ae,0>y!==b&&(Pe=-Pe),ne.x=Pe,ne.y=te}as.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},as.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 Tt(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))},as.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,Pe=0;Pe<=te;Pe++){b!==void 0&&E!==void 0?fe=b+Pe*E/te:fe=Pe*Math.PI/(2*te);var Me=Math.sin(fe);ne+=Math.sqrt(1-a*a*Me*Me)*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}}as.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:Ft("Invalid sorting type.")}return a};function Ix(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new On;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}as.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 On;for(var fe=0,Pe=0;Pe<y.length;Pe++){var Me=y[Pe].length;if(Me===1)b.push(Pe);else if(Me===0)E.add(a.M(Pe));else{if(fe===0)x.push(Pe);else{for(var Fe=Me=1/0,Ye=-1,nt=[],ot=0;ot<x.length;ot++)0>y[x[ot]].indexOf(x[ot===x.length-1?0:ot+1])&&nt.push(ot===x.length-1?0:ot+1);if(nt.length===0)for(ot=0;ot<x.length;ot++)nt.push(ot);for(ot=0;ot<nt.length;ot++){for(var ft=nt[ot],Ot=y[Pe],Mt=0,Ht=0;Ht<ne.length;Ht++){var Wt=te[ne[Ht]],Kt=te[ae[Ht]];if(Wt<Kt){var Qt=Wt;Wt=Kt}else Qt=Kt;if(Qt<ft&&ft<=Wt)for(Kt=0;Kt<Ot.length;Kt++){var gn=Ot[Kt];0>x.indexOf(gn)||Qt<te[gn]&&te[gn]<Wt||Qt===te[gn]||Wt===te[gn]||Mt++}else for(Kt=0;Kt<Ot.length;Kt++)gn=Ot[Kt],0>x.indexOf(gn)||Qt<te[gn]&&te[gn]<Wt&&Qt!==te[gn]&&Wt!==te[gn]&&Mt++}for(Ot=Mt,Ht=Mt=0;Ht<y[Pe].length;Ht++)Qt=x.indexOf(y[Pe][Ht]),0<=Qt&&(Qt=Math.abs(ft-(Qt>=ft?Qt+1:Qt)),Mt+=Qt<x.length+1-Qt?Qt:x.length+1-Qt);for(Ht=0;Ht<ne.length;Ht++)Qt=te[ne[Ht]],Wt=te[ae[Ht]],Qt>=ft&&Qt++,Wt>=ft&&Wt++,Qt>Wt&&(Kt=Wt,Wt=Qt,Qt=Kt),Wt-Qt<(x.length+2)/2==(Qt<ft&&ft<=Wt)&&Mt++;(Ot<Me||Ot===Me&&Mt<Fe)&&(Me=Ot,Fe=Mt,Ye=ft)}for(x.splice(Ye,0,Pe),Me=0;Me<x.length;Me++)te[x[Me]]=Me;for(Me=0;Me<y[Pe].length;Me++)Fe=y[Pe][Me],0<=x.indexOf(Fe)&&(ne.push(Pe),ae.push(Fe))}fe++}}for(ne=x.length;;){for(te=!0,ae=0;ae<b.length;ae++)if(fe=b[ae],Pe=y[fe][0],Me=x.indexOf(Pe),0<=Me){for(Ye=Fe=0;Ye<y[Pe].length;Ye++)nt=x.indexOf(y[Pe][Ye]),0>nt||nt===Me||(ot=nt>Me?nt-Me:Me-nt,Fe+=nt<Me!=ot>ne-ot?1:-1);x.splice(0>Fe?Me:Me+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},et.Object.defineProperties(as.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!==ll&&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 an(as,"ConstantSpacing",0),md=new an(as,"ConstantDistance",1),zh=new an(as,"ConstantAngle",2),Qu=new an(as,"Packed",3),ll=new an(as,"Clockwise",4),vd=new an(as,"Counterclockwise",5),sf=new an(as,"BidirectionalLeft",6),Mp=new an(as,"BidirectionalRight",7),S0=new an(as,"Forwards",8),x0=new an(as,"Reverse",9),w0=new an(as,"Ascending",10),b0=new an(as,"Descending",11),Tp=new an(as,"Optimized",12),C0=new an(as,"Pythagorean",13),Df=new an(as,"Circular",14);as.className="CircularLayout",as.ConstantSpacing=Ju,as.ConstantDistance=md,as.ConstantAngle=zh,as.Packed=Qu,as.Clockwise=ll,as.Counterclockwise=vd,as.BidirectionalLeft=sf,as.BidirectionalRight=Mp,as.Forwards=S0,as.Reverse=x0,as.Ascending=w0,as.Descending=b0,as.Optimized=Tp,as.Pythagorean=C0,as.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){Ao.call(this,a)}tt(kp,Ao),kp.prototype.createVertex=function(){return new zg(this)},kp.prototype.createEdge=function(){return new _0(this)},kp.className="CircularNetwork";function zg(a){sa.call(this,a),this.u=this.Si=NaN}tt(zg,sa);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}et.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 _0(a){Ul.call(this,a)}tt(_0,Ul),_0.className="CircularEdge";function Ma(a){Qo.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)}tt(Ma,Qo),Ma.prototype.cloneProtected=function(a){Qo.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},Ma.prototype.createNetwork=function(){return new Rf(this)},Ma.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 Pe=Gn(),Me=0;Me<ae+y.vertexes.count+2;Me++)Pe[Me]=null;ae=0,ne.reset();for(var Fe=Ln.alloc();ne.next();)if(Me=ne.value,this.computeBounds(Me,Fe),fe)fe=!1,E=Fe.x+Fe.width/2,te=Fe.y+Fe.height/2,Pe[0]=new Tt(Fe.x+Fe.width+b.width,Fe.y),Pe[1]=new Tt(Fe.x,Fe.y+Fe.height+b.height),ae=2;else{var Ye=jS(Pe,ae,E,te,Fe.width,Fe.height,b),nt=Pe[Ye],ot=new Tt(nt.x+Fe.width+b.width,nt.y),ft=new Tt(nt.x,nt.y+Fe.height+b.height);for(Ye+1<ae&&Pe.splice(Ye+1,0,null),Pe[Ye]=ot,Pe[Ye+1]=ft,ae++,Ye=nt.x-Fe.x,nt=nt.y-Fe.y,Me=Me.vertexes.iterator;Me.next();)ot=Me.value,ot.centerX+=Ye,ot.centerY+=nt}for(Ln.free(Fe),Me=y.vertexes.iterator;Me.next();)ne=Me.value,Ye=ne.bounds,2>ae?(E=Ye.x+Ye.width/2,te=Ye.y+Ye.height/2,Pe[0]=new Tt(Ye.x+Ye.width+b.width,Ye.y),Pe[1]=new Tt(Ye.x,Ye.y+Ye.height+b.height),ae=2):(fe=jS(Pe,ae,E,te,Ye.width,Ye.height,b),Fe=Pe[fe],nt=new Tt(Fe.x+Ye.width+b.width,Fe.y),Ye=new Tt(Fe.x,Fe.y+Ye.height+b.height),fe+1<ae&&Pe.splice(fe+1,0,null),Pe[fe]=nt,Pe[fe+1]=Ye,ae++,ne.centerX=Fe.x+ne.width/2,ne.centerY=Fe.y+ne.height/2);for(Jn(Pe),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},Ma.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},Ma.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 On),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 On,E.Hj=ae),ae.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(ae=ne.Hj,ae===null&&(ae=new On,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,rn.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 Pe=ae=0,Me=fe.count-ne;Me<fe.count;Me++){var Fe=fe.M(Me),Ye=null;for(te=Fe.edges.iterator;te.next();){var nt=te.value;if(nt.Ax(Fe)===E){Ye=nt;break}}Ye!==null&&(Pe+=Ye.length,ae+=Fe.width*Fe.height)}te=E.centerX,fe=E.centerY,Me=E.width,Fe=E.height,Ye=E.focus,nt=Me*Fe,1>nt&&(nt=1),ae=rn.sqrt((ae+nt+Pe*Pe*4/(ne*ne))/nt),ne=(ae-1)*Me/2,ae=(ae-1)*Fe/2,E.bounds=new Ln(te-Ye.x-ne,fe-Ye.y-ae,Me+2*ne,Fe+2*ae),E.focus=new Tt(Ye.x+ne,Ye.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 Ln(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new Tt(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=rn.sqrt(te*te+ne*ne)/2;for(var ae=!1,fe=ne=0,Pe=0,Me=y.vertexes.iterator;Me.next();){var Fe=Me.value;1>=Fe.Vd?fe++:(ae=!0,Pe++,ne+=Math.atan2(y.centerY-Fe.centerY,y.centerX-Fe.centerX))}if(fe!==0){for(0<Pe&&(ne/=Pe),Pe=y=0,y=ae?2*Math.PI/(fe+1):2*Math.PI/fe,fe%2===0&&(Pe=y/2),1<x.count&&x.sort(function(nt,ot){return nt===null||ot===null||nt===ot?0:ot.width*ot.height-nt.width*nt.height}),ae=fe%2===0?0:1,x=x.iterator;x.next();)if(fe=x.value,!(1<fe.Vd||a.isFixed(fe))){for(Me=null,Fe=fe.edges.iterator;Fe.next();){Me=Fe.value;break}Fe=fe.width;var Ye=fe.height;Fe=rn.sqrt(Fe*Fe+Ye*Ye)/2,Me=te+Me.length+Fe,Fe=ne+(y*(ae/2>>1)+Pe)*(ae%2===0?1:-1),fe.centerX=b+Me*Math.cos(Fe),fe.centerY=E+Me*Math.sin(Fe),ae++}}}}function jS(a,y,x,b,E,te,ne){var ae=9e19,fe=-1,Pe=0;e:for(;Pe<y;Pe++){var Me=a[Pe],Fe=Me.x-x,Ye=Me.y-b;if(Fe=Fe*Fe+Ye*Ye,Fe<ae){for(Ye=Pe-1;0<=Ye;Ye--)if(a[Ye].y>Me.y&&a[Ye].x-Me.x<E+ne.width)continue e;for(Ye=Pe+1;Ye<y;Ye++)if(a[Ye].x>Me.x&&a[Ye].y-Me.y<te+ne.height)continue e;fe=Pe,ae=Fe}}return fe}Ma.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ma.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,rn.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,rn.sqrt(b*b+a*a)):ne-(b+E):b>ne+ae?a>y+te?(x=b-ne-ae,a=a-y-te,rn.sqrt(x*x+a*a)):a+x<y?(b=b-ne-ae,a=a+x-y,rn.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(ft,Ot){return ft===null||Ot===null||ft===Ot?0:ft.centerX-Ot.centerX}):y.sort(function(ft,Ot){return ft===null||Ot===null||ft===Ot?0:ft.centerY-Ot.centerY}),x=a.Zf;var Pe=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 Me=b.y+ae.y;b=ne.charge*a.electricalFieldX(fe,Me),Pe=ne.charge*a.electricalFieldY(fe,Me),b+=ne.mass*a.gravitationalFieldX(fe,Me),Pe+=ne.mass*a.gravitationalFieldY(fe,Me),ne.forceX+=b,ne.forceY+=Pe;for(var Fe=te+1;Fe<y.length;Fe++){var Ye=y[Fe];if(Ye!==ne){b=Ye.bounds,ae=Ye.focus,Pe=b.x+ae.x;var nt=b.y+ae.y;if(fe-Pe>x||Pe-fe>x){if(E)break}else if(Me-nt>x||nt-Me>x){if(!E)break}else{var ot=zS(ne,Ye);1>ot?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new P0),ot=b.random(),ae=b.random(),fe>Pe?(b=Math.abs(Ye.bounds.right-ne.bounds.x),b=(1+b)*ot):fe<Pe?(b=Math.abs(Ye.bounds.x-ne.bounds.right),b=-(1+b)*ot):(b=Math.max(Ye.width,ne.width),b=(1+b)*ot-b/2),Me>nt?(Pe=Math.abs(Ye.bounds.bottom-ne.bounds.y),Pe=(1+Pe)*ae):fe<Pe?(Pe=Math.abs(Ye.bounds.y-ne.bounds.bottom),Pe=-(1+Pe)*ae):(Pe=Math.max(Ye.height,ne.height),Pe=(1+Pe)*ae-Pe/2)):(ae=-(ne.charge*Ye.charge)/(ot*ot),b=(Pe-fe)/ot*ae,Pe=(nt-Me)/ot*ae),ne.forceX+=b,ne.forceY+=Pe,Ye.forceX-=b,Ye.forceY-=Pe}}}}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,Me=te.bounds,Fe=te.focus,fe=Me.x+Fe.x,Me=Me.y+Fe.y,Fe=zS(x,te),1>Fe?(Fe=a.randomNumberGenerator,Fe===null&&(a.randomNumberGenerator=Fe=new P0),ae=Fe.random(),Fe=Fe.random(),b=(b>fe?1:-1)*(1+(te.width>x.width?te.width:x.width))*ae,Pe=(ne>Me?1:-1)*(1+(te.height>x.height?te.height:x.height))*Fe):(ae=ae.stiffness*(Fe-ae.length),b=(fe-b)/Fe*ae,Pe=(Me-ne)/Fe*ae),x.forceX+=b,x.forceY+=Pe,te.forceX-=b,te.forceY-=Pe;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}Ma.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},Ma.prototype.moveFixedVertex=function(){},Ma.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ma.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=so,y.toSpot=so)}},Ma.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Ln.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Ln.free(x)}x=Ln.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()}Ln.free(x)},Ma.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ma.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ma.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ma.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ma.prototype.electricalFieldX=function(){return 0},Ma.prototype.electricalFieldY=function(){return 0},Ma.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ma.prototype.gravitationalFieldX=function(){return 0},Ma.prototype.gravitationalFieldY=function(){return 0},Ma.prototype.isFixed=function(a){return a.isFixed},et.Object.defineProperties(Ma.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"&&Ft('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())}}}),Ma.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Rf(a){Ao.call(this,a)}tt(Rf,Ao),Rf.prototype.createVertex=function(){return new Hg(this)},Rf.prototype.createEdge=function(){return new Ug(this)},Rf.className="ForceDirectedNetwork";function Hg(a){sa.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}tt(Hg,sa),et.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){Ul.call(this,a),this.j=this.o=NaN}tt(Ug,Ul),et.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 P0(){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()}P0.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},P0.className="RandomNumberGenerator";function yo(a){Qo.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 Tt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}tt(yo,Qo),yo.prototype.cloneProtected=function(a){Qo.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:Ft("Unknown enum value: "+a):Qo.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,Pe=0;if(b.link!==null){if(ae=b.link,ae===null)continue;var Me=E.node;if(ne=te.node,Me===null||ne===null)continue;var Fe=ae.fromNode;fe=ae.toNode;for(var Ye=ae.fromPort;Ye!==null&&!Ye.Ed();)Ye=Ye.panel;for(ae=ae.toPort;ae!==null&&!ae.Ed();)ae=ae.panel;if(b.rev){Pe=Fe;var nt=Ye;Fe=fe,Ye=ae,fe=Pe,ae=nt}var ot=E.focus;Pe=te.focus;var ft=b.rev?te.bounds:E.bounds;nt=Tt.alloc(),Me!==Fe?ft.w()&&Fe.isVisible()?Fe.actualBounds.w()?(Dh(Fe,Ye,Fr,nt),nt.x+=Fe.actualBounds.x-ft.x,nt.y+=Fe.actualBounds.y-ft.y):(Dh(Fe,Ye,Fr,nt),nt.w()||nt.assign(ot)):nt.assign(ot):ft.w()?(Dh(Fe,Ye,Fr,nt),nt.w()||nt.assign(ot)):nt.assign(ot),Fe=b.rev?E.bounds:te.bounds,Me=Tt.alloc(),ne!==fe?Fe.w()&&fe.isVisible()?fe.actualBounds.w()?(Dh(fe,ae,Fr,Me),Me.x+=fe.actualBounds.x-Fe.x,Me.y+=fe.actualBounds.y-Fe.y):(Dh(fe,ae,Fr,Me),Me.w()||Me.assign(Pe)):Me.assign(Pe):Fe.w()?(Dh(fe,ae,Fr,Me),Me.w()||Me.assign(Pe)):Me.assign(Pe),this.K===90||this.K===270?(ne=Math.round((nt.x-ot.x)/this.kc),fe=nt.x,ae=Math.round((Me.x-Pe.x)/this.kc),Pe=Me.x):(ne=Math.round((nt.y-ot.y)/this.kc),fe=nt.y,ae=Math.round((Me.y-Pe.y)/this.kc),Pe=Me.y),Tt.free(nt),Tt.free(Me),b.portFromColOffset=ne,b.portFromPos=fe,b.portToColOffset=ae,b.portToPos=Pe}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(nt=E.layer,Me=te.layer,Fe=0,ft=b.link,ft!==null){var Ot=ft.fromPort,Mt=ft.toPort;if(Ot!==null&&Mt!==null){var Ht=ft.fromNode;if(Ye=ft.toNode,Ht!==null&&Ye!==null){var Wt=T0(this,!0),Kt=T0(this,!1),Qt=this.setsPortSpots?Wt:ft.computeSpot(!0,Ot);ot=this.setsPortSpots?Kt:ft.computeSpot(!1,Mt);var gn=ft.isOrthogonal;Qt.$c()&&Qt.Hf(Kt)&&ot.$c()&&ot.Hf(Wt)?Fe=0:(Wt=ft.getLinkPoint(Ht,Ot,Qt,!0,gn,Ye,Mt,Tt.alloc()),Kt=ft.getLinkDirection(Ht,Ot,Wt,Qt,!0,gn,Ye,Mt),Tt.free(Wt),Qt.ys()||Kt!==JS(this,b,!0)?this.setsPortSpots&&Ht!==null&&Ht.ports.count===1&&b.rev&&(Fe+=1):Fe+=1,Qt=ft.getLinkPoint(Ye,Mt,ot,!1,gn,Ht,Ot,Tt.alloc()),ft=ft.getLinkDirection(Ye,Mt,Qt,ot,!1,gn,Ht,Ot),Tt.free(Qt),ot.ys()||ft!==JS(this,b,!1)?this.setsPortSpots&&Ye!==null&&Ye.ports.count===1&&b.rev&&(Fe+=2):Fe+=2)}}}if(Ye=Fe,Fe=Ye===1||Ye===3,(Ye=Ye===2||Ye===3)&&(ot=a.createVertex(),ot.node=null,ot.Dj=1,ot.layer=nt,ot.near=E,a.dh(ot),E=a.Zj(E,ot,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=fe,E.portToPos=0,E=ot),ft=1,Fe&&ft--,nt-Me>ft&&0<nt){for(b.valid=!1,ot=a.createVertex(),ot.node=null,ot.Dj=2,ot.layer=nt-1,a.dh(ot),E=a.Zj(E,ot,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=Ye?0:ne,E.portToColOffset=0,E.portFromPos=Ye?0:fe,E.portToPos=0,E=ot,nt--;nt-Me>ft&&0<nt;)ot=a.createVertex(),ot.node=null,ot.Dj=3,ot.layer=nt-1,a.dh(ot),E=a.Zj(E,ot,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=ot,nt--;E=a.Zj(ot,te,b.link),E.valid=!Fe,Fe&&(ot.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=ae,E.portFromPos=0,E.portToPos=Pe}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 xl(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 bu(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],Pe=fe.near;if(Pe!==null&&Pe.layer===fe.layer)if(fe=Pe.index,fe>ne)for(var Me=ne+1;Me<fe;Me++){var Fe=b[Me];Fe.near===Pe&&Fe.Dj===Pe.Dj||ae++}else for(Me=ne-1;Me>fe;Me--)Fe=b[Me],Fe.near===Pe&&Fe.Dj===Pe.Dj||ae++;var Ye;if(0<=x)for(fe=b[ne].sourceEdgesArrayAccess,Pe=0;Pe<fe.length;Pe++){var nt=fe[Pe];if(nt.valid&&nt.fromVertex.layer!==y)for(Fe=nt.fromVertex.index,Me=nt.portToPos,nt=nt.portFromPos,Ye=Pe+1;Ye<fe.length;Ye++){var ot=fe[Ye];if(ot.valid&&ot.fromVertex.layer!==y){var ft=ot.fromVertex.index,Ot=ot.portToPos;ot=ot.portFromPos,Me<Ot&&(Fe>ft||Fe===ft&&nt>ot)&&ae++,Ot<Me&&(ft>Fe||ft===Fe&&ot>nt)&&ae++}}}if(0>=x){for(fe=b[ne].destinationEdgesArrayAccess,Pe=0;Pe<fe.length;Pe++)if(nt=fe[Pe],nt.valid&&nt.toVertex.layer!==y)for(Fe=nt.toVertex.index,Me=nt.portToPos,nt=nt.portFromPos,Ye=Pe+1;Ye<fe.length;Ye++)ot=fe[Ye],ot.valid&&ot.toVertex.layer!==y&&(ft=ot.toVertex.index,Ot=ot.portToPos,ot=ot.portFromPos,nt<ot&&(Fe>ft||Fe===ft&&Me>Ot)&&ae++,ot<nt&&(ft>Fe||ft===Fe&&Ot>Me)&&ae++)}for(te[ne*E+ne]=ae,fe=ne+1;fe<E;fe++){var Mt=0,Ht=0;if(0<=x){ae=b[ne].sourceEdgesArrayAccess;var Wt=b[fe].sourceEdgesArrayAccess;for(Pe=0;Pe<ae.length;Pe++)if(nt=ae[Pe],nt.valid&&nt.fromVertex.layer!==y)for(Fe=nt.fromVertex.index,nt=nt.portFromPos,Ye=0;Ye<Wt.length;Ye++)ot=Wt[Ye],ot.valid&&ot.fromVertex.layer!==y&&(ft=ot.fromVertex.index,ot=ot.portFromPos,(Fe<ft||Fe===ft&&nt<ot)&&Ht++,(ft<Fe||ft===Fe&&ot<nt)&&Mt++)}if(0>=x){for(ae=b[ne].destinationEdgesArrayAccess,Wt=b[fe].destinationEdgesArrayAccess,Pe=0;Pe<ae.length;Pe++)if(nt=ae[Pe],nt.valid&&nt.toVertex.layer!==y)for(Fe=nt.toVertex.index,Me=nt.portToPos,Ye=0;Ye<Wt.length;Ye++)ot=Wt[Ye],ot.valid&&ot.toVertex.layer!==y&&(ft=ot.toVertex.index,Ot=ot.portToPos,(Fe<ft||Fe===ft&&Me<Ot)&&Ht++,(ft<Fe||ft===Fe&&Ot<Me)&&Mt++)}te[ne*E+fe]=Mt,te[fe*E+ne]=Ht}}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 Pe=te[fe].destinationEdgesArrayAccess;if(Pe!==null)for(var Me=0;Me<Pe.length;Me++){var Fe=Pe[Me];if(Fe.valid&&Fe.toVertex.layer!==E){var Ye=Fe.fromVertex.column+Fe.portFromColOffset,nt=Fe.toVertex.column+Fe.portToColOffset;ae+=(Math.abs(Ye-nt)+1)*gy(Fe)}}}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 Pe=null;0<=x&&(Pe=ae.destinationEdgesArrayAccess);var Me=0,Fe=0,Ye=ae.near;if(Ye!==null&&Ye.layer===ae.layer&&(Me+=Ye.column-1,Fe++),fe!==null)for(Ye=0;Ye<fe.length;Ye++){ae=fe[Ye];var nt=ae.fromVertex;ae.valid&&!ae.rev&&nt.layer!==y&&(Me+=nt.column,Fe++)}if(Pe!==null)for(fe=0;fe<Pe.length;fe++)ae=Pe[fe],Ye=ae.toVertex,ae.valid&&!ae.rev&&Ye.layer!==y&&(Me+=Ye.column,Fe++);te[ne]=Fe===0?-1:Me/Fe}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 Pe=null;0<=x&&(Pe=ae.destinationEdgesArrayAccess);var Me=0,Fe=[],Ye=ae.near;if(Ye!==null&&Ye.layer===ae.layer&&(Fe[Me]=Ye.column-1,Me++),ae=void 0,fe!==null)for(Ye=0;Ye<fe.length;Ye++){ae=fe[Ye];var nt=ae.fromVertex;ae.valid&&!ae.rev&&nt.layer!==y&&(Fe[Me]=nt.column+ae.portFromColOffset,Me++)}if(Pe!==null)for(fe=0;fe<Pe.length;fe++)ae=Pe[fe],Ye=ae.toVertex,ae.valid&&!ae.rev&&Ye.layer!==y&&(Fe[Me]=Ye.column+ae.portToColOffset,Me++);Me===0?te[ne]=-1:(Fe.sort(function(ot,ft){return ot-ft}),Pe=Me>>1,te[ne]=Me&1?Fe[Pe]:Fe[Pe-1]+Fe[Pe]>>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,Pe=y.layer-fe.layer;ae=a.linkMinLength(ae),Pe===ae&&Gg(a,fe,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)ae=ne.value,fe=ae.fromVertex,Pe=fe.layer-y.layer,ae=a.linkMinLength(ae),Pe===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,Pe=ae.destinationEdges;Pe.next();)Pe.value.toVertex.valid&&fe++;Pe=0;for(var Me=ae.sourceEdges;Me.next();)Me.value.fromVertex.valid&&Pe++;(E===null||te<fe-Pe)&&(E=ae,te=fe-Pe)}}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 Pe=ne.value;if(Pe.component===1){var Me=0,Fe=!1,Ye=Pe.sourceEdgesArrayAccess;E=Ye.length;for(var nt=0;nt<E;nt++){var ot=Ye[nt],ft=ot.fromVertex;Me+=1,ft.component!==1&&(te+=1,ft=ft.layer-Pe.layer,ot=a.linkMinLength(ot),b=Math.min(b,ft-ot))}for(Ye=Pe.destinationEdgesArrayAccess,E=Ye.length,nt=0;nt<E;nt++)ot=Ye[nt].toVertex,--Me,ot.component!==1?--te:Fe=!0;(fe===null||Me<ae)&&!Fe&&(fe=Pe,ae=Me)}}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(Pe=0,Me=!1,Ye=ne.sourceEdgesArrayAccess,Fe=Ye.length,nt=0;nt<Fe;nt++)ot=Ye[nt].fromVertex,Pe+=1,ot.component!==1?b+=1:Me=!0;for(Ye=ne.destinationEdgesArrayAccess,Fe=Ye.length,nt=0;nt<Fe;nt++)ot=Ye[nt],ft=ot.toVertex,--Pe,ft.component!==1&&(--b,ft=ne.layer-ft.layer,ot=a.linkMinLength(ot),E=Math.min(E,ft-ot));(ae===null||Pe>te)&&!Me&&(ae=ne,te=Pe)}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 _y: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=xl(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=xl(this)),b=this.Ia;0<=b;b--)L0(this,b,-1),Bu(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=xl(this))}for(bu(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=xl(this)),b=this.Ia;0<=b;b--)L0(this,b,0),Bu(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=xl(this))}bu(this,y);var te,ne,ae;switch(this.rk){case Py: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?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,1)||te;for(E=this.countCrossings(),E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,1)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,-1)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,0)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,0)||te;E>=a?bu(this,y):(a=E,y=xl(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?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,1)||te;for(E=this.countCrossings(),E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,1)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,-1)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Bu(this,b,0)||te;for(E>=a?bu(this,y):(a=E,y=xl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Bu(this,b,0)||te;E>=a?bu(this,y):(a=E,y=xl(this))}}bu(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,Pe=!0;Pe;)for(Pe=!1,te=0;te<E-1;te++){var Me=x[b[te].index*E+b[te+1].index],Fe=x[b[te+1].index*E+b[te].index],Ye=0,nt=0,ot=b[te].column,ft=b[te+1].column,Ot=a.nodeMinColumnSpace(b[te],!0),Mt=a.nodeMinColumnSpace(b[te],!1),Ht=a.nodeMinColumnSpace(b[te+1],!0),Wt=a.nodeMinColumnSpace(b[te+1],!1);Ot=ot-Ot+Ht,Mt=ft-Mt+Wt;var Kt=b[te].sourceEdges.iterator;for(Kt.reset();Kt.next();)if(Ht=Kt.value,Wt=Ht.fromVertex,Ht.valid&&Wt.layer===y){for(Ht=0;b[Ht]!==Wt;)Ht++;Ht<te&&(Ye+=2*(te-Ht),nt+=2*(te+1-Ht)),Ht===te+1&&(Ye+=1),Ht>te+1&&(Ye+=4*(Ht-te),nt+=4*(Ht-(te+1)))}for(Kt=b[te].destinationEdges.iterator,Kt.reset();Kt.next();)if(Ht=Kt.value,Wt=Ht.toVertex,Ht.valid&&Wt.layer===y){for(Ht=0;b[Ht]!==Wt;)Ht++;Ht===te+1&&(nt+=1)}for(Kt=b[te+1].sourceEdges.iterator,Kt.reset();Kt.next();)if(Ht=Kt.value,Wt=Ht.fromVertex,Ht.valid&&Wt.layer===y){for(Ht=0;b[Ht]!==Wt;)Ht++;Ht<te&&(Ye+=2*(te+1-Ht),nt+=2*(te-Ht)),Ht===te&&(nt+=1),Ht>te+1&&(Ye+=4*(Ht-(te+1)),nt+=4*(Ht-te))}for(Kt=b[te+1].destinationEdges.iterator,Kt.reset();Kt.next();)if(Ht=Kt.value,Wt=Ht.toVertex,Ht.valid&&Wt.layer===y){for(Ht=0;b[Ht]!==Wt;)Ht++;Ht===te&&(Ye+=1)}Ht=Wt=0,Kt=ne[b[te].index];var Qt=ae[b[te].index],gn=ne[b[te+1].index],ni=ae[b[te+1].index];Kt!==-1&&(Wt+=Math.abs(Kt-ot),Ht+=Math.abs(Kt-Mt)),Qt!==-1&&(Wt+=Math.abs(Qt-ot),Ht+=Math.abs(Qt-Mt)),gn!==-1&&(Wt+=Math.abs(gn-ft),Ht+=Math.abs(gn-Ot)),ni!==-1&&(Wt+=Math.abs(ni-ft),Ht+=Math.abs(ni-Ot)),(nt<Ye-.5||nt===Ye&&Fe<Me-.5||nt===Ye&&Fe===Me&&Ht<Wt-.5)&&(Pe=fe=!0,b[te].column=Mt,b[te+1].column=Ot,Me=b[te],b[te]=b[te+1],b[te+1]=Me)}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,Pe=!0;Pe;)for(Pe=!1,b=0;b<te;b++){var Me=E[b].column,Fe=a.nodeMinColumnSpace(E[b],!0),Ye=a.nodeMinColumnSpace(E[b],!1),nt=0;0>b-1||Me-E[b-1].column-1>Fe+a.nodeMinColumnSpace(E[b-1],!1)?nt=Me-1:nt=Me,Fe=b+1>=te||E[b+1].column-Me-1>Ye+a.nodeMinColumnSpace(E[b+1],!0)?Me+1:Me;var ot=Ye=0,ft=0;if(0>=x)for(var Ot=E[b].sourceEdges.iterator;Ot.next();){var Mt=Ot.value,Ht=Mt.fromVertex;if(Mt.valid&&Ht.layer!==y){var Wt=gy(Mt),Kt=Mt.portFromColOffset;Mt=Mt.portToColOffset,Ht=Ht.column,Ye+=(Math.abs(Me+Mt-(Ht+Kt))+1)*Wt,ot+=(Math.abs(nt+Mt-(Ht+Kt))+1)*Wt,ft+=(Math.abs(Fe+Mt-(Ht+Kt))+1)*Wt}}if(0<=x)for(Ot=E[b].destinationEdges.iterator;Ot.next();)Mt=Ot.value,Ht=Mt.toVertex,Mt.valid&&Ht.layer!==y&&(Wt=gy(Mt),Kt=Mt.portFromColOffset,Mt=Mt.portToColOffset,Ht=Ht.column,Ye+=(Math.abs(Me+Kt-(Ht+Mt))+1)*Wt,ot+=(Math.abs(nt+Kt-(Ht+Mt))+1)*Wt,ft+=(Math.abs(Fe+Kt-(Ht+Mt))+1)*Wt);Mt=Kt=Wt=0,Ot=ne[E[b].index],Ht=ae[E[b].index],Ot!==-1&&(Wt+=Math.abs(Ot-Me),Kt+=Math.abs(Ot-nt),Mt+=Math.abs(Ot-Fe)),Ht!==-1&&(Wt+=Math.abs(Ht-Me),Kt+=Math.abs(Ht-nt),Mt+=Math.abs(Ht-Fe)),ot<Ye||ot===Ye&&Kt<Wt?(Pe=fe=!0,E[b].column=nt):(ft<Ye||ft===Ye&&Mt<Wt)&&(Pe=fe=!0,E[b].column=Fe)}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),Pe=a.nodeMinColumnSpace(b[x],!1),Me=0;if(ne[x]===-1)if(x===0&&x===E-1)Me=ae;else if(x===0){var Fe=b[x+1].column;Fe-ae===Pe+a.nodeMinColumnSpace(b[x+1],!0)?Me=ae-1:Me=ae}else x===E-1?(Fe=b[x-1].column,Me=ae-Fe===fe+a.nodeMinColumnSpace(b[x-1],!1)?ae+1:ae):(Fe=b[x-1].column,fe=Fe+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,Fe=b[x+1].column,Pe=Fe-a.nodeMinColumnSpace(b[x+1],!0)-Pe-1,Me=(fe+Pe)/2|0);else x===0&&x===E-1?Me=ne[x]:x===0?(Fe=b[x+1].column,Pe=Fe-a.nodeMinColumnSpace(b[x+1],!0)-Pe-1,Me=Math.min(ne[x],Pe)):x===E-1?(Fe=b[x-1].column,fe=Fe+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,Me=Math.max(ne[x],fe)):(Fe=b[x-1].column,fe=Fe+a.nodeMinColumnSpace(b[x-1],!1)+fe+1,Fe=b[x+1].column,Pe=Fe-a.nodeMinColumnSpace(b[x+1],!0)-Pe-1,fe<ne[x]&&ne[x]<Pe?Me=ne[x]:fe>=ne[x]?Me=fe:Pe<=ne[x]&&(Me=Pe));Me!==ae&&(te=!0,b[x].column=Me)}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=xl(a),te=E0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=E0(a);ne>te?bu(a,E):ne<te&&(te=ne,E=xl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=xl(a),te=E0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=E0(a),ne>te?bu(a,E):ne<te&&(te=ne,E=xl(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 In,Zx(y,x);var te=null,ne=null,ae=null,fe=null,Pe=(a.ve&1)!==0,Me=(a.ve&2)!==0,Fe=(a.ve&4)!==0,Ye=(a.ve&8)!==0;for(Pe&&(a.verticalAlignment(y,x,!0),te=M0(a,y,!0,!1)),y.reverse(),Fe&&(a.verticalAlignment(y,x,!1),ae=M0(a,y,!1,!1)),b=Mr(y),E=b.next();!E.done;E=b.next())E.value.reverse();Ye&&(a.verticalAlignment(y,x,!1),fe=M0(a,y,!1,!0)),y.reverse(),Me&&(a.verticalAlignment(y,x,!0),ne=M0(a,y,!0,!0)),Jn(y),a.u(te,ne,ae,fe),a.network.vertexes.each(function(nt){var ot=Gn();Pe&&ot.push(te.get(nt)),Me&&ot.push(ne.get(nt)),Fe&&ot.push(ae.get(nt)),Ye&&ot.push(fe.get(nt)),ot.sort(function(Ot,Mt){return Ot-Mt});var ft=ot.length;ft=(ot[Math.floor((ft-1)/2)]+ot[Math.ceil((ft-1)/2)])/2,Jn(ot),nt.zc=ft})}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 Pe=ae[fe];e:{if(Pe.node===null){var Me=Ly(Pe);if(0<Me.length){Me=Me[0].node===null;break e}}Me=!1}var Fe=Me;if(fe===ae.length-1||Fe){for(Me=ne.length-1,Fe&&(Me=Ly(Pe)[0].index);te<=fe;){if(Pe=ae[te],!Pe.bo){Fe=[];for(var Ye=Mr(Pe.sourceEdgesArrayAccess),nt=Ye.next();!nt.done;nt=Ye.next())nt=nt.value,nt.valid&&Fe.push(nt);Pe.bo=Fe}for(Pe=Mr(Pe.bo),Fe=Pe.next();!Fe.done;Fe=Pe.next())Fe=Fe.value,Ye=Fe.fromVertex.index,(Ye<E||Ye>Me)&&y.add(Fe);te++}E=Me}}}yo.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Mr(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Mr(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(Fe,Ye){return Fe.vi-Ye.vi});var fe=(ae-1)/2;for(ae=Math.floor(fe),fe=Math.ceil(fe);ae<=fe;ae++)if(te.align===te){var Pe=ne[ae],Me=void 0;Me=x?I0(Pe,te):I0(te,Pe),!y.contains(Me)&&E<Pe.vi&&(Pe.align=te,te.root=Pe.root,te.align=Pe.root,E=Pe.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=Mr(y),ne=te.next();!ne.done;ne=te.next()){var ae=Mr(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=Mr(y),ae=te.next();!ae.done;ae=te.next()){ae=Mr(ae.value);for(var fe=ae.next();!fe.done;fe=ae.next())if(fe=fe.value,fe.root===fe){for(var Pe=0,Me=fe;Me.align!==fe;){var Fe=Me.align,Ye=ne?Me.width:Me.height,nt=ne?Fe.width:Fe.height;if(x){var ot=I0(Me,Fe),ft=ot.portFromPos,Ot=ot.portToPos;ot.link!==null&&(Me.node&&Me.node!==ot.link.fromNode&&(ft=ne?Me.focusX:Me.focusY),Fe.node&&Fe.node!==ot.link.toNode&&(Ot=ne?Fe.focusX:Fe.focusY))}else ot=I0(Fe,Me),ft=ot.portToPos,Ot=ot.portFromPos,ot.link!==null&&(Me.node&&Me.node!==ot.link.toNode&&(ft=ne?Me.focusX:Me.focusY),Fe.node&&Fe.node!==ot.link.fromNode&&(Ot=ne?Fe.focusX:Fe.focusY));Ye=b?Me.qg+(Ye-ft)-(nt-Ot):Me.qg+ft-Ot,Fe.qg=Ye,Pe=Math.min(Pe,Ye),Me=Me.align}Me=fe;do Me.qg=Me.qg-Pe,Me=Me.align;while(Me!==fe)}}for(x=Mr(y),ne=x.next();!ne.done;ne=x.next())for(te=Mr(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 hi,y=Mr(y),ne=y.next();!ne.done;ne=y.next())for(x=Mr(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&&Ft("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(Pe){Pe.value+=fe.delta}}(te)));Jn(b),Jn(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:Ws:a.K===90?y?Ws:bs:a.K===180?y?Ts:Gs:y?Gs:Ts}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,Pe=fe.layer,Me=fe.column|0;b?(ne=y.x+this.kc*Me,Pe=this.Kd[Pe]):(ne=this.Kd[Pe],Pe=y.y+this.kc*Me),fe.centerX=ne,fe.centerY=Pe,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 Tt(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 Ln(0,0,x,Math.abs(this.Ta[0]))):y.push(new Ln(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new Ln(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Ln(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new Ln(0,0,Math.abs(this.Ta[0]),x)):y.push(new Ln(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new Ln(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Ln(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 Pe=y.computeSpot(!0,ne);fe=y.computeSpot(!1,ae);var Me=x.fromVertex,Fe=x.toVertex;if(x.valid)y.curve===ou&&y.pointsCount===4&&(Me.column===Fe.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,Pe,!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&&Pe===fs&&(b=!0),ae!==null&&fe===fs&&(x=!0),(b||x)&&(fe=null,b&&(fe=y.getLinkPointFromPoint(E,ne,ne.ga(Fr),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(Fr),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(Me.layer===Fe.layer)y.zf();else{var Ye=!1,nt=!1,ot=this.ie,ft=y.firstPickIndex+1;if(y.isOrthogonal){nt=!0;var Ot=y.pointsCount;4<Ot&&y.points.removeRange(2,Ot-3)}else if(y.curve===ou)Ye=!0,Ot=y.pointsCount,4<Ot&&y.points.removeRange(2,Ot-3),Ot===4&&(ft=2);else{Ot=y.pointsCount;var Mt=Pe===fs,Ht=fe===fs;2<Ot&&Mt&&Ht?y.points.removeRange(1,Ot-2):3<Ot&&Mt&&!Ht?y.points.removeRange(1,Ot-3):3<Ot&&!Mt&&Ht?y.points.removeRange(2,Ot-2):4<Ot&&!Mt&&!Ht&&y.points.removeRange(2,Ot-3)}if(x.rev){for(;Fe!==null&&Me!==Fe;){var Wt=Ot=null;for(Mt=Fe.sourceEdges.iterator;Mt.next()&&(Ht=Mt.value,Ht.link!==x.link||(Ot=Ht.fromVertex,Wt=Ht.toVertex,Ot.node!==null)););if(Ot===null)break;if(Ot!==Me){Mt=y.i(ft-1).x,Ht=y.i(ft-1).y;var Kt=Ot.centerX,Qt=Ot.centerY;if(nt)this.K===180||this.K===0?ft===y.firstPickIndex+1?(y.m(ft++,Mt,Ht),y.m(ft++,Mt,Qt)):(Wt!==null?Wt.centerY:Ht)!==Qt&&(Wt=this.Ta[Ot.layer-1]+this.Rf.x,y.m(ft++,Wt,Ht),y.m(ft++,Wt,Qt)):ft===y.firstPickIndex+1?(y.m(ft++,Mt,Ht),y.m(ft++,Kt,Ht)):(Wt!==null?Wt.centerX:Mt)!==Kt&&(Wt=this.Ta[Ot.layer-1]+this.Rf.y,y.m(ft++,Mt,Wt),y.m(ft++,Kt,Wt));else if(ft===y.firstPickIndex+1){Wt=Math.max(10,this.he[Fe.layer]);var gn=Math.max(10,this.Ld[Fe.layer]);if(Ye)this.K===180?Kt<=Fe.bounds.x?(Fe=Fe.bounds.x,y.m(ft++,Fe-Wt,Qt),y.m(ft++,Fe,Qt),y.m(ft++,Fe+gn,Qt)):(y.m(ft++,Kt-Wt,Qt),y.m(ft++,Kt,Qt),y.m(ft++,Kt+gn,Qt)):this.K===90?Qt>=Fe.bounds.bottom?(Fe=Fe.bounds.y+Fe.bounds.height,y.m(ft++,Kt,Fe+gn),y.m(ft++,Kt,Fe),y.m(ft++,Kt,Fe-Wt)):(y.m(ft++,Kt,Qt+gn),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Qt-Wt)):this.K===270?Qt<=Fe.bounds.y?(Fe=Fe.bounds.y,y.m(ft++,Kt,Fe-Wt),y.m(ft++,Kt,Fe),y.m(ft++,Kt,Fe+gn)):(y.m(ft++,Kt,Qt-Wt),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Qt+gn)):this.K===0&&(Kt>=Fe.bounds.right?(Fe=Fe.bounds.x+Fe.bounds.width,y.m(ft++,Fe+gn,Qt),y.m(ft++,Fe,Qt),y.m(ft++,Fe-Wt,Qt)):(y.m(ft++,Kt+gn,Qt),y.m(ft++,Kt,Qt),y.m(ft++,Kt-Wt,Qt)));else{y.m(ft++,Mt,Ht);var ni=0;this.K===180||this.K===0?((this.K===180?Kt>=Fe.bounds.right:Kt<=Fe.bounds.x)&&(ni=(this.K===0?-Wt:gn)/2),y.m(ft++,Mt+ni,Qt)):((this.K===270?Qt>=Fe.bounds.bottom:Qt<=Fe.bounds.y)&&(ni=(this.K===90?-Wt:gn)/2),y.m(ft++,Kt,Ht+ni)),y.m(ft++,Kt,Qt)}}else Wt=Math.max(10,this.he[Ot.layer]),gn=Math.max(10,this.Ld[Ot.layer]),Ye?this.K===180?(y.m(ft++,Kt-Wt-ot,Qt),y.m(ft++,Math.min(Kt-Wt+ot/2,Kt),Qt),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Qt),y.m(ft++,Math.max(Kt+gn-ot/2,Kt),Qt),y.m(ft++,Kt+gn+ot,Qt)):this.K===90?(y.m(ft++,Kt,Qt+gn+ot),y.m(ft++,Kt,Math.max(Qt+gn-ot/2,Qt)),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Math.min(Qt-Wt+ot/2,Qt)),y.m(ft++,Kt,Qt-Wt-ot)):this.K===270?(y.m(ft++,Kt,Qt-Wt-ot),y.m(ft++,Kt,Math.min(Qt-Wt+ot/2,Qt)),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Math.max(Qt+gn-ot/2,Qt)),y.m(ft++,Kt,Qt+gn+ot)):(y.m(ft++,Kt+gn+ot,Qt),y.m(ft++,Math.max(Kt+gn-ot/2,Kt),Qt),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Qt),y.m(ft++,Math.min(Kt-Wt+ot/2,Kt),Qt),y.m(ft++,Kt-Wt-ot,Qt)):y.m(ft++,Kt,Qt)}Fe=Ot}(ae===null||Pe!==fs||nt)&&(Mt=y.i(ft-1).x,Ht=y.i(ft-1).y,Kt=y.i(ft).x,Qt=y.i(ft).y,nt?(ot=this.Ld[Me.layer],this.K===180||this.K===0?(nt=Ht,nt>=Me.bounds.y&&nt<=Me.bounds.bottom&&(this.K===180?Kt>=Me.bounds.x:Kt<=Me.bounds.right)&&(Fe=Me.centerX+(this.K===180?-ot:ot),nt<Me.bounds.y+Me.bounds.height/2?nt=Me.bounds.y-this.kc/2:nt=Me.bounds.bottom+this.kc/2,y.m(ft++,Fe,Ht),y.m(ft++,Fe,nt)),y.m(ft++,Kt,nt)):(nt=Mt,nt>=Me.bounds.x&&nt<=Me.bounds.right&&(this.K===270?Qt>=Me.bounds.y:Qt<=Me.bounds.bottom)&&(Fe=Me.centerY+(this.K===270?-ot:ot),nt<Me.bounds.x+Me.bounds.width/2?nt=Me.bounds.x-this.kc/2:nt=Me.bounds.right+this.kc/2,y.m(ft++,Mt,Fe),y.m(ft++,nt,Fe)),y.m(ft++,nt,Qt)),y.m(ft++,Kt,Qt)):Ye?(Wt=Math.max(10,this.he[Me.layer]),gn=Math.max(10,this.Ld[Me.layer]),this.K===180&&Kt>=Me.bounds.x?(Fe=Me.bounds.x+Me.bounds.width,y.L(ft-2,Fe,Ht),y.L(ft-1,Fe+gn,Ht)):this.K===90&&Qt<=Me.bounds.bottom?(Fe=Me.bounds.y,y.L(ft-2,Mt,Fe),y.L(ft-1,Mt,Fe-Wt)):this.K===270&&Qt>=Me.bounds.y?(Fe=Me.bounds.y+Me.bounds.height,y.L(ft-2,Mt,Fe),y.L(ft-1,Mt,Fe+gn)):this.K===0&&Kt<=Me.bounds.right&&(Fe=Me.bounds.x,y.L(ft-2,Fe,Ht),y.L(ft-1,Fe-Wt,Ht))):(Wt=Math.max(10,this.he[Me.layer]),gn=Math.max(10,this.Ld[Me.layer]),nt=0,this.K===180||this.K===0?((this.K===180?Kt<=Me.bounds.x:Kt>=Me.bounds.right)&&(nt=(this.K===0?gn:-Wt)/2),y.m(ft++,Kt+nt,Ht)):((this.K===270?Qt<=Me.bounds.y:Qt>=Me.bounds.bottom)&&(nt=(this.K===90?gn:-Wt)/2),y.m(ft++,Mt,Qt+nt)),y.m(ft++,Kt,Qt)))}else{for(;Me!==null&&Me!==Fe;){for(Wt=Ot=null,Me=Me.destinationEdges.iterator;Me.next()&&(Mt=Me.value,Mt.link!==x.link||(Ot=Mt.toVertex,Wt=Mt.fromVertex,Wt.node!==null&&(Wt=null),Ot.node!==null)););if(Ot===null)break;Ot!==Fe&&(Mt=y.i(ft-1).x,Ht=y.i(ft-1).y,Kt=Ot.centerX,Qt=Ot.centerY,nt?this.K===180||this.K===0?(Wt!==null?Wt.centerY:Ht)!==Qt&&(Wt=this.Ta[Ot.layer]+this.Rf.x,ft===y.firstPickIndex+1&&(Wt=this.K===0?Math.max(Wt,Mt):Math.min(Wt,Mt)),y.m(ft++,Wt,Ht),y.m(ft++,Wt,Qt)):(Wt!==null?Wt.centerX:Mt)!==Kt&&(Wt=this.Ta[Ot.layer]+this.Rf.y,ft===y.firstPickIndex+1&&(Wt=this.K===90?Math.max(Wt,Ht):Math.min(Wt,Ht)),y.m(ft++,Mt,Wt),y.m(ft++,Kt,Wt)):(Wt=Math.max(10,this.he[Ot.layer]),gn=Math.max(10,this.Ld[Ot.layer]),Ye?this.K===180?(y.m(ft++,Kt+gn+ot,Qt),y.m(ft++,Math.max(Kt+gn-ot/2,Kt),Qt),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Qt),y.m(ft++,Math.min(Kt-Wt+ot/2,Kt),Qt),y.m(ft++,Kt-Wt-ot,Qt)):this.K===90?(y.m(ft++,Kt,Qt-Wt-ot),y.m(ft++,Kt,Math.min(Qt-Wt+ot/2,Qt)),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Math.max(Qt+gn-ot/2,Qt)),y.m(ft++,Kt,Qt+gn+ot)):this.K===270?(y.m(ft++,Kt,Qt+gn+ot),y.m(ft++,Kt,Math.max(Qt+gn-ot/2,Qt)),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Math.min(Qt-Wt+ot/2,Qt)),y.m(ft++,Kt,Qt-Wt-ot)):(y.m(ft++,Kt-Wt-ot,Qt),y.m(ft++,Math.min(Kt-Wt+ot/2,Kt),Qt),y.m(ft++,Kt,Qt),y.m(ft++,Kt,Qt),y.m(ft++,Math.max(Kt+gn-ot/2,Kt),Qt),y.m(ft++,Kt+gn+ot,Qt)):this.K===180?(y.m(ft++,Kt+gn,Qt),y.m(ft++,Kt-Wt,Qt)):this.K===90?(y.m(ft++,Kt,Qt-Wt),y.m(ft++,Kt,Qt+gn)):this.K===270?(y.m(ft++,Kt,Qt+gn),y.m(ft++,Kt,Qt-Wt)):(y.m(ft++,Kt-Wt,Qt),y.m(ft++,Kt+gn,Qt)))),Me=Ot}nt&&(Mt=y.i(ft-1).x,Ht=y.i(ft-1).y,Kt=y.i(ft).x,Qt=y.i(ft).y,this.K===180||this.K===0?Ht!==Qt&&(Wt=this.K===0?Math.min(Math.max((Kt+Mt)/2,this.Ta[Fe.layer]+this.Rf.x),Kt):Math.max(Math.min((Kt+Mt)/2,this.Ta[Fe.layer]+this.Rf.x),Kt),y.m(ft++,Wt,Ht),y.m(ft++,Wt,Qt)):Mt!==Kt&&(Wt=this.K===90?Math.min(Math.max((Qt+Ht)/2,this.Ta[Fe.layer]+this.Rf.y),Qt):Math.max(Math.min((Qt+Ht)/2,this.Ta[Fe.layer]+this.Rf.y),Qt),y.m(ft++,Mt,Wt),y.m(ft++,Kt,Wt)))}b!==null&&Ye&&4<=y.pointsCount&&(ne!==null&&(ne=Pe===fs?y.getLinkPointFromPoint(E,ne,ne.ga(Fr),y.i(3),!0):y.i(0),Pe===fs&&(Pe=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+Pe.x)/2,Pe.y),y.L(2,b.x,(Pe.y+b.y)/2)):(y.L(1,Pe.x,(ne.y+Pe.y)/2),y.L(2,(Pe.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),ae!==null&&(E=fe===fs?y.getLinkPointFromPoint(te,ae,ae.ga(Fr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),fe===fs&&(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 On,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),Pe=b.i(b.pointsCount-1);if(ae.first=fe.x*fe.x+fe.y,ae.jc=Pe.x*Pe.x+Pe.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),Pe=b.i(E+2);var Me=0;fe.y<te.y?Me=Pe.y<te.y?3:te.x<ne.x?2:1:fe.y>te.y&&(Me=Pe.y>te.y?0:ne.x<te.x?2:1),ae.j=Me}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),Me=1,ae=x[te].jc,fe=te;fe<E;fe++)Pe=x[fe],Pe.jc!==ae&&(Me++,ae=Pe.jc);this.zi(x,this.Ux,te,te+ne);var Fe=1;for(ae=x[te].first,fe=te;fe<E;fe++)Pe=x[fe],Pe.first!==ae&&(Fe++,ae=Pe.first);for(fe=!0,Pe=Fe,Me<Fe?(fe=!1,Pe=Me,ae=x[te].jc,this.zi(x,this.Js,te,te+ne)):ae=x[te].first,Me=0,Fe=te;Fe<E;Fe++){var Ye=x[Fe];(fe?Ye.first:Ye.jc)!==ae&&(Me++,ae=fe?Ye.first:Ye.jc);var nt=Ye.link;te=nt.i(Ye.index),ne=nt.i(Ye.index+1);var ot=this.linkSpacing*(Me-(Pe-1)/2);y++,nt.uh(),nt.L(Ye.index,te.x,te.y+ot),nt.L(Ye.index+1,ne.x,ne.y+ot),nt.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),Pe=b.i(b.pointsCount-1),ae.first=fe.x+fe.y*fe.y,ae.jc=Pe.x+Pe.y*Pe.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),Pe=b.i(E+2),Me=0,fe.x<te.x?Me=Pe.x<te.x?3:te.y<ne.y?2:1:fe.x>te.x&&(Me=Pe.x>te.x?0:ne.y<te.y?2:1),ae.j=Me),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),Me=1,ae=x[te].jc,fe=te;fe<E;fe++)Pe=x[fe],Pe.jc!==ae&&(Me++,ae=Pe.jc);for(this.zi(x,this.Ux,te,te+ne),Fe=1,ae=x[te].first,fe=te;fe<E;fe++)Pe=x[fe],Pe.first!==ae&&(Fe++,ae=Pe.first);for(fe=!0,Pe=Fe,Me<Fe?(fe=!1,Pe=Me,ae=x[te].jc,this.zi(x,this.Js,te,te+ne)):ae=x[te].first,Me=0,Fe=te;Fe<E;Fe++)Ye=x[Fe],(fe?Ye.first:Ye.jc)!==ae&&(Me++,ae=fe?Ye.first:Ye.jc),nt=Ye.link,te=nt.i(Ye.index),ne=nt.i(Ye.index+1),ot=this.linkSpacing*(Me-(Pe-1)/2),y++,nt.uh(),nt.L(Ye.index,te.x+ot,te.y),nt.L(Ye.index+1,ne.x+ot,ne.y),nt.zf()}te=E}a=b}}}},st=yo.prototype,st.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},st.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},st.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},st.B=function(a,y){return a-=y,-1<a&&1>a},st.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&Ft("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}et.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()):Ft("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!==_y||(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!==Py&&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 an(yo,"CycleDepthFirst",0),xy=new an(yo,"CycleGreedy",1),Wg=new an(yo,"CycleFromLayers",2),A0=new an(yo,"LayerOptimalLinkLength",0),wy=new an(yo,"LayerLongestPathSink",1),by=new an(yo,"LayerLongestPathSource",2),N0=new an(yo,"InitDepthFirstOut",0),Cy=new an(yo,"InitDepthFirstIn",1),_y=new an(yo,"InitNaive",2),Py=new an(yo,"AggressiveNone",0),O0=new an(yo,"AggressiveLess",1),Ey=new an(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=_y,yo.AggressiveNone=Py,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){Ao.call(this,a)}tt(Np,Ao),Np.prototype.createVertex=function(){return new Cu(this)},Np.prototype.createEdge=function(){return new Zg(this)},Np.className="LayeredDigraphNetwork";function Cu(a){sa.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}tt(Cu,sa);function rx(a,y){return a.index-y.index}function I0(a,y){if(!a.$n){for(var x=[],b=Mr(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Mr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Ft("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=Mr(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=Mr(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}Cu.prototype.Cl=function(a){sa.prototype.Cl.call(this,a),this.bo=this.co=null},Cu.prototype.Kl=function(a){sa.prototype.Kl.call(this,a),this.bo=this.co=null},Cu.prototype.zl=function(a){sa.prototype.zl.call(this,a),this.$n=this.ao=null},Cu.prototype.Jl=function(a){sa.prototype.Jl.call(this,a),this.$n=this.ao=null},et.Object.defineProperties(Cu.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)}}}),Cu.prototype.deleteDestinationEdge=Cu.prototype.Jl,Cu.prototype.addDestinationEdge=Cu.prototype.zl,Cu.prototype.deleteSourceEdge=Cu.prototype.Kl,Cu.prototype.addSourceEdge=Cu.prototype.Cl,Cu.className="LayeredDigraphVertex";function Zg(a){Ul.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}tt(Zg,Ul),et.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 Or(a){Qo.call(this),this.Ub=new In,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)}tt(Or,Qo),Or.prototype.cloneProtected=function(a){Qo.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)},Or.prototype.qb=function(a){a.classType===Or?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:Ft("Unknown enum value: "+a):Qo.prototype.qb.call(this,a)},Or.prototype.createNetwork=function(){return new zf(this)},Or.prototype.makeNetwork=function(a){function y(b){if(b instanceof ii)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Yn){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 pn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof rr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Or.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 pn&&(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 In,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof ii?(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 In,this.isValidLayout=!0};function Xx(a){var y=new In;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Or.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:Ft("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:Ft("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 On,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 On,b=y.sourceVertexes;b.next();)E=b.value,sx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Ft("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}Or.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}}Or.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])}}Or.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])}}Or.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:Ft("Unhandled sorting value "+a.sorting.toString())}},Or.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Or.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 Pe=a.node.Mu();Pe.next();){var Me=Pe.value;Me.category==="Comment"&&Me.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(Me),Me.Va(),Me=Me.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,Me.width),ne+=Me.height+Math.abs(ae)):(te+=Me.width+Math.abs(ae),ne=Math.max(ne,Me.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=Ln.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,Ln.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}Or.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,Pe=a.comments,Me=Pe.length,Fe=Tt.alloc(),Ye=0;Ye<Me;Ye++){var nt=Pe[Ye],ot=nt.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&ae)if(0<=a.commentMargin)for(Fe.h(a.bounds.x-a.commentMargin-ot.width,a.bounds.y+fe),nt.move(Fe),nt=nt.Sd();nt.next();){var ft=nt.value;ft.fromSpot=Ts,ft.toSpot=Gs}else for(Fe.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+fe),nt.move(Fe),nt=nt.Sd();nt.next();)ft=nt.value,ft.fromSpot=Gs,ft.toSpot=Ts;else if(0<=a.commentMargin)for(Fe.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+fe),nt.move(Fe),nt=nt.Sd();nt.next();)ft=nt.value,ft.fromSpot=Gs,ft.toSpot=Ts;else for(Fe.h(a.bounds.x+a.commentMargin-ot.width,a.bounds.y+fe),nt.move(Fe),nt=nt.Sd();nt.next();)ft=nt.value,ft.fromSpot=Ts,ft.toSpot=Gs;fe=0<=a.commentSpacing?fe+(ot.height+a.commentSpacing):fe+(a.commentSpacing-ot.height)}else{if(135<E&&!te||!x&&ae)if(0<=a.commentMargin)for(Fe.h(a.bounds.x+fe,a.bounds.y-a.commentMargin-ot.height),nt.move(Fe),nt=nt.Sd();nt.next();)ft=nt.value,ft.fromSpot=bs,ft.toSpot=Ws;else for(Fe.h(a.bounds.x+fe,a.bounds.y+2*a.focus.y-a.commentMargin),nt.move(Fe),nt=nt.Sd();nt.next();)ft=nt.value,ft.fromSpot=Ws,ft.toSpot=bs;else if(0<=a.commentMargin)for(Fe.h(a.bounds.x+fe,a.bounds.y+2*a.focus.y+a.commentMargin),nt.move(Fe),nt=nt.Sd();nt.next();)ft=nt.value,ft.fromSpot=Ws,ft.toSpot=bs;else for(Fe.h(a.bounds.x+fe,a.bounds.y+a.commentMargin-ot.height),nt.move(Fe),nt=nt.Sd();nt.next();)ft=nt.value,ft.fromSpot=bs,ft.toSpot=Ws;fe=0<=a.commentSpacing?fe+(ot.width+a.commentSpacing):fe+(a.commentSpacing-ot.width)}}if(Tt.free(Fe),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)}},Or.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 Pe=fe===Xc,Me=bd(fe),Fe=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Ye=a.nodeSpacing,nt=this.computeNodeIndent(a),ot=a.rowSpacing,ft=0;(b||Pe||a.hm||a.im&&a.maxGenerationCount===1)&&(ft=Math.max(0,a.rowIndent)),b=a.width;var Ot=a.height,Mt=0,Ht=0,Wt=0,Kt=null,Qt=null,gn=0,ni=0,fi=0,ui=0,$n=0,Rn=0,nr=0,$i=0;if(Me&&!Kg(fe)&&135<E&&ne.reverse(),Kg(fe))if(1<ae)for(var eo=0;eo<ae;eo++)eo%2===0&&eo!==ae-1&&($i=Math.max($i,y?ne[eo].Da.width:ne[eo].Da.height));else ae===1&&($i=y?ne[0].Da.width:ne[0].Da.height);if(Me){switch(fe){case Hh:Ht=135>E?hx(this,a,ne,$i,Mt,Ht):dx(this,a,ne,$i,Mt,Ht),$i=Ht.x,Mt=Ht.width,Ht=Ht.height;break;case Uh:for(Kt=0;Kt<ae;Kt++)Qt=ne[Kt],Fe=Qt.Da,Wt=Rn===0?0:ot,y?(Qt.S.h(te-Fe.width,ui+Wt),Mt=Math.max(Mt,Fe.width),Ht=Math.max(Ht,ui+Wt+Fe.height),ui+=Wt+Fe.height):(Qt.S.h(fi+Wt,te-Fe.height),Mt=Math.max(Mt,fi+Wt+Fe.width),Ht=Math.max(Ht,Fe.height),fi+=Wt+Fe.width),Rn++;break;case fh:for(Kt=0;Kt<ae;Kt++)Qt=ne[Kt],te=Qt.Da,Fe=Rn===0?0:ot,y?(Qt.S.h(Ye/2+a.focus.x,ui+Fe),Mt=Math.max(Mt,te.width),Ht=Math.max(Ht,ui+Fe+te.height),ui+=Fe+te.height):(Qt.S.h(fi+Fe,Ye/2+a.focus.y),Mt=Math.max(Mt,fi+Fe+te.width),Ht=Math.max(Ht,te.height),fi+=Fe+te.width),Rn++}Kt=Tl(this,2),Qt=Tl(this,2),y?(Kt[0].h(0,0),Kt[1].h(0,Ht),Qt[0].h(Mt,0)):(Kt[0].h(0,0),Kt[1].h(Mt,0),Qt[0].h(0,Ht)),Qt[1].h(Mt,Ht)}else for(eo=0;eo<ae;eo++){var Mo=ne[eo],ua=Mo.Da;if(y){0<Fe&&0<Rn&&fi+Ye+ua.width>Fe&&(fi<te&&af(a,fe,te-fi,0,nr,eo-1),$n++,Rn=0,nr=eo,Wt=Ht,fi=0,ui=135<E?-Ht-ot:Ht+ot),R0(this,Mo,0,ui);var da=0;if(Rn===0)Kt=Mo.Yo,Qt=Mo.kp,gn=ua.width,ni=ua.height,(Kt===null||Qt===null||E!==qu(Mo))&&(Kt=Tl(this,2),Qt=Tl(this,2),Kt[0].h(0,0),Kt[1].h(0,ni),Qt[0].h(gn,0),Qt[1].h(gn,ni));else{var $a=Gn();ni=fx(this,a,Mo,Kt,Qt,gn,ni,$a),da=ni.x,Kt=$a[0],Qt=$a[1],gn=ni.width,ni=ni.height,Jn($a),fi<ua.width&&0>da&&(Bf(a,-da,0,nr,eo-1),B0(Kt,-da,0),B0(Qt,-da,0),da=0)}Mo.S.h(da,ui),Mt=Math.max(Mt,gn),Ht=Math.max(Ht,Wt+($n===0?0:ot)+ua.height),fi=gn}else 0<Fe&&0<Rn&&ui+Ye+ua.height>Fe&&(ui<te&&af(a,fe,0,te-ui,nr,eo-1),$n++,Rn=0,nr=eo,Wt=Mt,ui=0,fi=135<E?-Mt-ot:Mt+ot),R0(this,Mo,fi,0),da=0,Rn===0?(Kt=Mo.Yo,Qt=Mo.kp,gn=ua.width,ni=ua.height,(Kt===null||Qt===null||E!==qu(Mo))&&(Kt=Tl(this,2),Qt=Tl(this,2),Kt[0].h(0,0),Kt[1].h(gn,0),Qt[0].h(0,ni),Qt[1].h(gn,ni))):($a=Gn(),ni=fx(this,a,Mo,Kt,Qt,gn,ni,$a),da=ni.x,Kt=$a[0],Qt=$a[1],gn=ni.width,ni=ni.height,Jn($a),ui<ua.height&&0>da&&(Bf(a,0,-da,nr,eo-1),B0(Kt,0,-da),B0(Qt,0,-da),da=0)),Mo.S.h(fi,da),Ht=Math.max(Ht,ni),Mt=Math.max(Mt,Wt+($n===0?0:ot)+ua.width),ui=ni;Rn++}switch(0<$n&&(y?(Ht+=Math.max(0,x),fi<Mt&&af(a,fe,Mt-fi,0,nr,ae-1),0<ft&&(Pe||Bf(a,ft,0,0,ae-1),Mt+=ft)):(Mt+=Math.max(0,x),ui<Ht&&af(a,fe,0,Ht-ui,nr,ae-1),0<ft&&(Pe||Bf(a,0,ft,0,ae-1),Ht+=ft))),ft=Pe=0,fe){case Ip:y?Pe+=Mt/2-a.focus.x-nt/2:ft+=Ht/2-a.focus.y-nt/2;break;case jf:0<$n?y?Pe+=Mt/2-a.focus.x-nt/2:ft+=Ht/2-a.focus.y-nt/2:y?($i=ne[0].S.x+ne[0].la.x,Pe+=$i+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-$i)/2-a.focus.x-nt/2):($i=ne[0].S.y+ne[0].la.y,ft+=$i+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-$i)/2-a.focus.y-nt/2);break;case Yc:y?(Pe-=nt,Mt+=nt):(ft-=nt,Ht+=nt);break;case Xc:y?(Pe+=Mt-a.width+nt,Mt+=nt):(ft+=Ht-a.height+nt,Ht+=nt);break;case Hh:y?1<ae?Pe+=$i+Ye/2-a.focus.x:Pe+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?ft+=$i+Ye/2-a.focus.y:ft+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Uh:y?Pe+=Mt+Ye/2-a.focus.x:ft+=Ht+Ye/2-a.focus.y;break;case fh:break;default:Ht=this.customAlignment(a,Pe,ft,Mt,Ht),Pe=Ht[0],ft=Ht[1],Mt=Ht[2],Ht=Ht[3]}for(nt=0;nt<ae;nt++)$i=ne[nt],y?$i.S.h($i.S.x+$i.la.x-Pe,$i.S.y+(135<E?(Me?-Ht:-$i.Da.height)+$i.la.y-x:Ot+x+$i.la.y)):$i.S.h($i.S.x+(135<E?(Me?-Mt:-$i.Da.width)+$i.la.x-x:b+x+$i.la.x),$i.S.y+$i.la.y-ft);if(ae=ne=0,Me?y?(Mt=ky(a,Mt,Pe),0>Pe&&(Pe=0),135<E&&(ft+=Ht+x),Ht+=Ot+x,fe===fh&&(ne+=Ye/2+a.focus.x),ae+=Ot+x):(135<E&&(Pe+=Mt+x),Mt+=b+x,Ht=Ay(a,Ht,ft),0>ft&&(ft=0),fe===fh&&(ae+=Ye/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>Mt&&(Mt=Ny(fe,b-Mt,0),ne=Mt.x,ae=Mt.y,Mt=b,Pe=0):Mt=ky(a,Mt,Pe),0>Pe&&(ne-=Pe,Pe=0),135<E&&(ft+=Ht+x),Ht=Math.max(Math.max(Ht,Ot),Ht+Ot+x),ae+=Ot+x):(135<E&&(Pe+=Mt+x),Mt=Math.max(Math.max(Mt,b),Mt+b+x),a.comments===null?Ot>Ht&&(Ht=Ny(fe,0,Ot-Ht),ne=Ht.x,ae=Ht.y,Ht=Ot,ft=0):Ht=Ay(a,Ht,ft),0>ft&&(ae-=ft,ft=0),ne+=b+x),0<$n)E=Tl(this,4),$n=Tl(this,4),y?(E[2].h(0,Ot+x),E[3].h(E[2].x,Ht),$n[2].h(Mt,E[2].y),$n[3].h($n[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Mt,E[2].y),$n[2].h(E[2].x,Ht),$n[3].h(E[3].x,$n[2].y));else{for(E=Tl(this,Kt.length+2),$n=Tl(this,Qt.length+2),fe=0;fe<Kt.length;fe++)Me=Kt[fe],E[fe+2].h(Me.x+ne,Me.y+ae);for(fe=0;fe<Qt.length;fe++)Me=Qt[fe],$n[fe+2].h(Me.x+ne,Me.y+ae)}y?(E[0].h(Pe,0),E[1].h(E[0].x,Ot),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])),$n[0].h(Pe+b,0),$n[1].h($n[0].x,Ot),$n[2].y<$n[1].y&&($n[2].x<$n[0].x?$n[2].assign($n[1]):$n[1].assign($n[2])),$n[3].y<$n[2].y&&($n[3].x<$n[0].x?$n[3].assign($n[2]):$n[2].assign($n[3])),E[2].y-=x/2,$n[2].y-=x/2):(E[0].h(0,ft),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])),$n[0].h(0,ft+Ot),$n[1].h(b,$n[0].y),$n[2].x<$n[1].x&&($n[2].y<$n[0].y?$n[2].assign($n[1]):$n[1].assign($n[2])),$n[3].x<$n[2].x&&($n[3].y<$n[0].y?$n[3].assign($n[2]):$n[2].assign($n[3])),E[2].x-=x/2,$n[2].x-=x/2),dc(this,Kt),dc(this,Qt),a.Yo=E,a.kp=$n,a.la.h(Pe,ft),a.Da.h(Mt,Ht)}break;default:Ft("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 Pe=y.alignment,Me=Pe===Yc,Fe=Pe===Xc;ae=bd(Pe);var Ye=Math.max(0,y.breadthLimit);fe=a.computeLayerSpacing(y);var nt=y.nodeSpacing,ot=a.computeNodeIndent(y),ft=Me||Fe?0:ot/2,Ot=y.rowSpacing,Mt=0;(Me||Fe||y.hm||y.im&&y.maxGenerationCount===1)&&(Mt=Math.max(0,y.rowIndent)),Me=y.width;var Ht=y.height,Wt=0,Kt=0,Qt=0,gn=0,ni=0,fi=0,ui=0,$n=0,Rn=0,nr=0;if(ae&&!Kg(Pe)&&135<b&&E.reverse(),Kg(Pe))if(1<ne)for(var $i=0;$i<ne;$i++){var eo=E[$i],Mo=eo.Da;$i%2===0&&$i!==ne-1?Rn=Math.max(Rn,(x?Mo.width:Mo.height)+a.computeBusNodeSpacing(eo)-nt):$i%2!==0&&(nr=Math.max(nr,(x?Mo.width:Mo.height)+a.computeBusNodeSpacing(eo)-nt))}else ne===1&&(Rn=x?E[0].Da.width:E[0].Da.height);if(ae)switch(Pe){case Hh:case Jc:Kt=135>b?hx(a,y,E,Rn,Wt,Kt):dx(a,y,E,Rn,Wt,Kt),Rn=Kt.x,Wt=Kt.width,Kt=Kt.height;break;case Uh:for(Ye=0;Ye<ne;Ye++)ft=E[Ye],Qt=ft.Da,nr=ui===0?0:Ot,x?(ft.S.h(te-Qt.width,ni+nr),Wt=Math.max(Wt,Qt.width),Kt=Math.max(Kt,ni+nr+Qt.height),ni+=nr+Qt.height):(ft.S.h(gn+nr,te-Qt.height),Wt=Math.max(Wt,gn+nr+Qt.width),Kt=Math.max(Kt,Qt.height),gn+=nr+Qt.width),ui++;break;case fh:for(te=0;te<ne;te++)Ye=E[te],ft=Ye.Da,Qt=ui===0?0:Ot,x?(Ye.S.h(nt/2+y.focus.x,ni+Qt),Wt=Math.max(Wt,ft.width),Kt=Math.max(Kt,ni+Qt+ft.height),ni+=Qt+ft.height):(Ye.S.h(gn+Qt,nt/2+y.focus.y),Wt=Math.max(Wt,gn+Qt+ft.width),Kt=Math.max(Kt,ft.height),gn+=Qt+ft.width),ui++}else for(nr=0;nr<ne;nr++)$i=E[nr],eo=$i.Da,x?(0<Ye&&0<ui&&gn+nt+eo.width>Ye&&(gn<te&&af(y,Pe,te-gn,0,$n,nr-1),fi++,ui=0,$n=nr,Qt=Kt,gn=0,ni=135<b?-Kt-Ot:Kt+Ot),Mo=ui===0?ft:nt,R0(a,$i,0,ni),$i.S.h(gn+Mo,ni),Wt=Math.max(Wt,gn+Mo+eo.width),Kt=Math.max(Kt,Qt+(fi===0?0:Ot)+eo.height),gn+=Mo+eo.width):(0<Ye&&0<ui&&ni+nt+eo.height>Ye&&(ni<te&&af(y,Pe,0,te-ni,$n,nr-1),fi++,ui=0,$n=nr,Qt=Wt,ni=0,gn=135<b?-Wt-Ot:Wt+Ot),Mo=ui===0?ft:nt,R0(a,$i,gn,0),$i.S.h(gn,ni+Mo),Kt=Math.max(Kt,ni+Mo+eo.height),Wt=Math.max(Wt,Qt+(fi===0?0:Ot)+eo.width),ni+=Mo+eo.height),ui++;switch(0<fi&&(x?(Kt+=Math.max(0,fe),gn<Wt&&af(y,Pe,Wt-gn,0,$n,ne-1),0<Mt&&(Fe||Bf(y,Mt,0,0,ne-1),Wt+=Mt)):(Wt+=Math.max(0,fe),ni<Kt&&af(y,Pe,0,Kt-ni,$n,ne-1),0<Mt&&(Fe||Bf(y,0,Mt,0,ne-1),Kt+=Mt))),Mt=Fe=0,Pe){case Ip:x?Fe+=Wt/2-y.focus.x-ot/2:Mt+=Kt/2-y.focus.y-ot/2;break;case jf:0<fi?x?Fe+=Wt/2-y.focus.x-ot/2:Mt+=Kt/2-y.focus.y-ot/2:x?(a=E[0].S.x+E[0].la.x,Fe+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-ot/2):(a=E[0].S.y+E[0].la.y,Mt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-ot/2);break;case Yc:x?(Fe-=ot,Wt+=ot):(Mt-=ot,Kt+=ot);break;case Xc:x?(Fe+=Wt-y.width+ot,Wt+=ot):(Mt+=Kt-y.height+ot,Kt+=ot);break;case Hh:case Jc:x?1<ne?Fe+=Rn+nt/2-y.focus.x:Fe+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Mt+=Rn+nt/2-y.focus.y:Mt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Uh:x?Fe+=Wt+nt/2-y.focus.x:Mt+=Kt+nt/2-y.focus.y;break;case fh:break;default:a=a.customAlignment(y,Fe,Mt,Wt,Kt),Fe=a[0],Mt=a[1],Wt=a[2],Kt=a[3]}for(a=0;a<ne;a++)ot=E[a],x?ot.S.h(ot.S.x+ot.la.x-Fe,ot.S.y+(135<b?(ae?-Kt:-ot.Da.height)+ot.la.y-fe:Ht+fe+ot.la.y)):ot.S.h(ot.S.x+(135<b?(ae?-Wt:-ot.Da.width)+ot.la.x-fe:Me+fe+ot.la.x),ot.S.y+ot.la.y-Mt);x?(Wt=ky(y,Wt,Fe),0>Fe&&(Fe=0),135<b&&(Mt+=Kt+fe),Kt=Math.max(Math.max(Kt,Ht),Kt+Ht+fe)):(135<b&&(Fe+=Wt+fe),Wt=Math.max(Math.max(Wt,Me),Wt+Me+fe),Kt=Ay(y,Kt,Mt),0>Mt&&(Mt=0)),y.la.h(Fe,Mt),y.Da.h(Wt,Kt)}}Or.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 Ln(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new Ln(b,0,E,te);for(var ae=y.nodeSpacing,fe=y.rowSpacing,Pe=qu(y)===90,Me=0,Fe=0,Ye=0,nt=0;nt<ne;nt++)if(!(nt%2!==0||1<ne&&nt===ne-1)){var ot=x[nt],ft=ot.Da,Ot=Me===0?0:fe;if(Pe){var Mt=a.computeBusNodeSpacing(ot)-ae;ot.S.h(b-(ft.width+Mt),Ye+Ot),E=Math.max(E,ft.width+Mt),te=Math.max(te,Ye+Ot+ft.height),Ye+=Ot+ft.height}else Mt=a.computeBusNodeSpacing(ot)-ae,ot.S.h(Fe+Ot,b-(ft.height+Mt)),te=Math.max(te,ft.height+Mt),E=Math.max(E,Fe+Ot+ft.width),Fe+=Ot+ft.width;Me++}for(Me=0,ot=Fe,nt=Ye,Pe?(Fe=b+ae,Ye=0):(Fe=0,Ye=b+ae),ft=0;ft<ne;ft++)if(ft%2!==0){Ot=x[ft],Mt=Ot.Da;var Ht=Me===0?0:fe;if(Pe){var Wt=a.computeBusNodeSpacing(Ot)-ae;Ot.S.h(Fe+Wt,Ye+Ht),E=Math.max(E,Fe+Mt.width+Wt),te=Math.max(te,Ye+Ht+Mt.height),Ye+=Ht+Mt.height}else Wt=a.computeBusNodeSpacing(Ot)-ae,Ot.S.h(Fe+Ht,Ye+Wt),E=Math.max(E,Fe+Ht+Mt.width),te=Math.max(te,Ye+Mt.height+Wt),Fe+=Ht+Mt.width;Me++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,Pe?Math.max(Math.abs(nt),Math.abs(Ye)):Math.max(Math.abs(ot),Math.abs(Fe))),Pe?(x.S.h(b+ae/2-x.focus.x-x.la.x,te+a),Pe=b+ae/2-x.focus.x-x.la.x,E=Math.max(E,Pe+ne.width),0>Pe&&(E-=Pe),te=Math.max(te,Math.max(nt,Ye)+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(ot,Fe)+a+ne.width),Ye=b+ae/2-x.focus.y-x.la.y,te=Math.max(te,Ye+ne.height),0>Ye&&(te-=Ye),0>x.S.y&&(b=D0(y,x.S.y,!0,b,ae)))),new Ln(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new Ln(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new Ln(b,0,E,te);for(var ae=y.nodeSpacing,fe=y.rowSpacing,Pe=qu(y)===270,Me=0,Fe=0,Ye=0,nt=0;nt<ne;nt++)if(!(nt%2!==0||1<ne&&nt===ne-1)){var ot=x[nt],ft=ot.Da,Ot=Me===0?0:fe;if(Pe){var Mt=a.computeBusNodeSpacing(ot)-ae;Ye-=Ot+ft.height,ot.S.h(b-(ft.width+Mt),Ye),E=Math.max(E,ft.width+Mt),te=Math.max(te,Math.abs(Ye))}else Mt=a.computeBusNodeSpacing(ot)-ae,Fe-=Ot+ft.width,ot.S.h(Fe,b-(ft.height+Mt)),te=Math.max(te,ft.height+Mt),E=Math.max(E,Math.abs(Fe));Me++}for(Me=0,ot=Fe,nt=Ye,Pe?(Fe=b+ae,Ye=0):(Fe=0,Ye=b+ae),ft=0;ft<ne;ft++)if(ft%2!==0){Ot=x[ft],Mt=Ot.Da;var Ht=Me===0?0:fe;if(Pe){var Wt=a.computeBusNodeSpacing(Ot)-ae;Ye-=Ht+Mt.height,Ot.S.h(Fe+Wt,Ye),E=Math.max(E,Fe+Mt.width+Wt),te=Math.max(te,Math.abs(Ye))}else Wt=a.computeBusNodeSpacing(Ot)-ae,Fe-=Ht+Mt.width,Ot.S.h(Fe,Ye+Wt),te=Math.max(te,Ye+Mt.height+Wt),E=Math.max(E,Math.abs(Fe));Me++}for(1<ne&&ne%2===1&&(fe=x[ne-1],Me=fe.Da,a=a.computeBusLastRowSpacing(fe,Pe?Math.max(Math.abs(nt),Math.abs(Ye)):Math.max(Math.abs(ot),Math.abs(Fe))),Pe?(fe.S.h(b+ae/2-fe.focus.x-fe.la.x,-te-Me.height-a),Fe=b+ae/2-fe.focus.x-fe.la.x,E=Math.max(E,Fe+Me.width),0>Fe&&(E-=Fe),te=Math.max(te,Math.abs(Math.min(nt,Ye))+a+Me.height),0>fe.S.x&&(b=D0(y,fe.S.x,!1,b,ae))):(fe.S.h(-E-Me.width-a,b+ae/2-fe.focus.y-fe.la.y),E=Math.max(E,Math.abs(Math.min(ot,Fe))+a+Me.width),Ye=b+ae/2-fe.focus.y-fe.la.y,te=Math.max(te,Ye+Me.height),0>Ye&&(te-=Ye),0>fe.S.y&&(b=D0(y,fe.S.y,!0,b,ae)))),y=0;y<ne;y++)ae=x[y],Pe?ae.S.h(ae.S.x,ae.S.y+te):ae.S.h(ae.S.x+E,ae.S.y);return new Ln(b,0,E,te)}Or.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Or.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:Ft("Unhandled alignment value "+a.toString())}return new Tt(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:Ft("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),Pe=fe===90||fe===270,Me=y.nodeSpacing;y=b;var Fe=E;b=te;var Ye=ne,nt=x.Yo,ot=x.kp;ne=x.Da;var ft=Pe?Math.max(Ye,ne.height):Math.max(b,ne.width);if((nt===null||fe!==qu(x))&&(nt=Tl(a,2),ot=Tl(a,2),Pe?(nt[0].h(0,0),nt[1].h(0,ne.height),ot[0].h(ne.width,0),ot[1].h(ot[0].x,nt[1].y)):(nt[0].h(0,0),nt[1].h(ne.width,0),ot[0].h(0,ne.height),ot[1].h(nt[1].x,ot[0].y))),Pe){if(Ye=9999999,!(Fe===null||2>Fe.length||nt===null||2>nt.length))for(E=x=0;x<Fe.length&&E<nt.length;){te=Fe[x];var Ot=nt[E];fe=Ot.x,Pe=Ot.y,fe+=b;var Mt=te;x+1<Fe.length&&(Mt=Fe[x+1]);var Ht=Ot;Ot=Ht.x,Ht=Ht.y,E+1<nt.length&&(Ht=nt[E+1],Ot=Ht.x,Ht=Ht.y,Ot+=b);var Wt=Ye;te.y===Pe?Wt=fe-te.x:te.y>Pe&&te.y<Ht?Wt=fe+(te.y-Pe)/(Ht-Pe)*(Ot-fe)-te.x:Pe>te.y&&Pe<Mt.y&&(Wt=fe-(te.x+(Pe-te.y)/(Mt.y-te.y)*(Mt.x-te.x))),Wt<Ye&&(Ye=Wt),Mt.y<=te.y?x++:Ht<=Pe?E++:(Mt.y<=Ht&&x++,Ht<=Mt.y&&E++)}if(Ye=b-Ye,Ye+=Me,x=nt,E=Ye,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Me=Tl(a,y.length+x.length),b=te=fe=0;te<x.length&&x[te].y<y[0].y;)Pe=x[te++],Me[b++].h(Pe.x+E,Pe.y);for(;fe<y.length;)Pe=y[fe++],Me[b++].h(Pe.x,Pe.y);for(fe=y[y.length-1].y;te<x.length&&x[te].y<=fe;)te++;for(;te<x.length&&x[te].y>fe;)Pe=x[te++],Me[b++].h(Pe.x+E,Pe.y);for(x=Tl(a,b),fe=0;fe<b;fe++)x[fe].assign(Me[fe]);dc(a,Me),b=x}if(te=ot,fe=Ye,Fe===null||2>Fe.length||te===null||2>te.length)E=null;else{for(Me=Tl(a,Fe.length+te.length),E=Pe=x=0;x<Fe.length&&Fe[x].y<te[0].y;)Mt=Fe[x++],Me[E++].h(Mt.x,Mt.y);for(;Pe<te.length;)Mt=te[Pe++],Me[E++].h(Mt.x+fe,Mt.y);for(te=te[te.length-1].y;x<Fe.length&&Fe[x].y<=te;)x++;for(;x<Fe.length&&Fe[x].y>te;)fe=Fe[x++],Me[E++].h(fe.x,fe.y);for(te=Tl(a,E),x=0;x<E;x++)te[x].assign(Me[x]);dc(a,Me),E=te}return te=Math.max(0,Ye)+ne.width,ne=ft,dc(a,y),dc(a,nt),dc(a,Fe),dc(a,ot),ae[0]=b,ae[1]=E,new Ln(Ye,0,te,ne)}if(b=9999999,!(Fe===null||2>Fe.length||nt===null||2>nt.length))for(E=x=0;x<Fe.length&&E<nt.length;)te=Fe[x],Ot=nt[E],fe=Ot.x,Pe=Ot.y,Pe+=Ye,Mt=te,x+1<Fe.length&&(Mt=Fe[x+1]),Ht=Ot,Ot=Ht.x,Ht=Ht.y,E+1<nt.length&&(Ht=nt[E+1],Ot=Ht.x,Ht=Ht.y,Ht+=Ye),Wt=b,te.x===fe?Wt=Pe-te.y:te.x>fe&&te.x<Ot?Wt=Pe+(te.x-fe)/(Ot-fe)*(Ht-Pe)-te.y:fe>te.x&&fe<Mt.x&&(Wt=Pe-(te.y+(fe-te.x)/(Mt.x-te.x)*(Mt.y-te.y))),Wt<b&&(b=Wt),Mt.x<=te.x?x++:Ot<=fe?E++:(Mt.x<=Ot&&x++,Ot<=Mt.x&&E++);if(Ye-=b,Ye+=Me,x=nt,E=Ye,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Me=Tl(a,y.length+x.length),b=te=fe=0;te<x.length&&x[te].x<y[0].x;)Pe=x[te++],Me[b++].h(Pe.x,Pe.y+E);for(;fe<y.length;)Pe=y[fe++],Me[b++].h(Pe.x,Pe.y);for(fe=y[y.length-1].x;te<x.length&&x[te].x<=fe;)te++;for(;te<x.length&&x[te].x>fe;)Pe=x[te++],Me[b++].h(Pe.x,Pe.y+E);for(x=Tl(a,b),fe=0;fe<b;fe++)x[fe].assign(Me[fe]);dc(a,Me),b=x}if(te=ot,fe=Ye,Fe===null||2>Fe.length||te===null||2>te.length)E=null;else{for(Me=Tl(a,Fe.length+te.length),E=Pe=x=0;x<Fe.length&&Fe[x].x<te[0].x;)Mt=Fe[x++],Me[E++].h(Mt.x,Mt.y);for(;Pe<te.length;)Mt=te[Pe++],Me[E++].h(Mt.x,Mt.y+fe);for(te=te[te.length-1].x;x<Fe.length&&Fe[x].x<=te;)x++;for(;x<Fe.length&&Fe[x].x>te;)fe=Fe[x++],Me[E++].h(fe.x,fe.y);for(te=Tl(a,E),x=0;x<E;x++)te[x].assign(Me[x]);dc(a,Me),E=te}return te=ft,ne=Math.max(0,Ye)+ne.height,dc(a,y),dc(a,nt),dc(a,Fe),dc(a,ot),ae[0]=b,ae[1]=E,new Ln(Ye,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 Tt;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)}Or.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:Ft("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:Ft("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)}}}Or.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Or.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Or.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 Tt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Tt(-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 Ln(0,te,x,ae))):this.angle===90?(E.push(new Ln(0,te,x,ae)),te+=ae):this.angle===180?(te-=ae,E.push(new Ln(te,0,ae,x))):(E.push(new Ln(te,0,ae,x)),te+=ae)}this.commitLayers(E,b)}},Or.prototype.commitLayers=function(){},Or.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Or.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])}}Or.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=Gs;break;case 90:E=Ws;break;case 180:E=Ts;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?Ts:bs;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:fe=Ts;break;case 90:fe=bs;break;case 180:fe=Gs;break;default:fe=Ws}else y%2===0&&(fe=b===90||b===270?Gs:Ws);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?Gs:Ws,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?Ts: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=Gs;break;case 90:b.fromSpot=Ws;break;case 180:b.fromSpot=Ts;break;default:b.fromSpot=bs}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Ts;break;case 90:b.toSpot=bs;break;case 180:b.toSpot=Gs;break;default:b.toSpot=Ws}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=Gs;break;case 90:b.toSpot=Ws;break;case 180:b.toSpot=Ts;break;default:b.toSpot=bs}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Ts;break;case 90:b.fromSpot=bs;break;case 180:b.fromSpot=Gs;break;default:b.fromSpot=Ws}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}Or.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},Or.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)},et.Object.defineProperties(Or.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()):Ft("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 an(Or,"PathDefault",-1),$c=new an(Or,"PathDestination",0),Ff=new an(Or,"PathSource",1),Op=new an(Or,"SortingForwards",10),Vg=new an(Or,"SortingReverse",11),$g=new an(Or,"SortingAscending",12),Yg=new an(Or,"SortingDescending",13),Ip=new an(Or,"AlignmentCenterSubtrees",20),jf=new an(Or,"AlignmentCenterChildren",21),Yc=new an(Or,"AlignmentStart",22),Xc=new an(Or,"AlignmentEnd",23),Hh=new an(Or,"AlignmentBus",24),Jc=new an(Or,"AlignmentBusBranching",25),Uh=new an(Or,"AlignmentTopLeftBus",26),fh=new an(Or,"AlignmentBottomRightBus",27),j0=new an(Or,"CompactionNone",30),Xg=new an(Or,"CompactionBlock",31),z0=new an(Or,"StyleLayered",40),Iy=new an(Or,"StyleLastParents",41),Dy=new an(Or,"StyleAlternating",42),Ry=new an(Or,"StyleRootOnly",43),H0=new an(Or,"ArrangementVertical",50),By=new an(Or,"ArrangementHorizontal",51),U0=new an(Or,"ArrangementFixedRoots",52),Fy=new an(Or,"LayerIndividual",60),jy=new an(Or,"LayerSiblings",61),G0=new an(Or,"LayerUniform",62);Or.className="TreeLayout",Or.PathDefault=F0,Or.PathDestination=$c,Or.PathSource=Ff,Or.SortingForwards=Op,Or.SortingReverse=Vg,Or.SortingAscending=$g,Or.SortingDescending=Yg,Or.AlignmentCenterSubtrees=Ip,Or.AlignmentCenterChildren=jf,Or.AlignmentStart=Yc,Or.AlignmentEnd=Xc,Or.AlignmentBus=Hh,Or.AlignmentBusBranching=Jc,Or.AlignmentTopLeftBus=Uh,Or.AlignmentBottomRightBus=fh,Or.CompactionNone=j0,Or.CompactionBlock=Xg,Or.StyleLayered=z0,Or.StyleLastParents=Iy,Or.StyleAlternating=Dy,Or.StyleRootOnly=Ry,Or.ArrangementVertical=H0,Or.ArrangementHorizontal=By,Or.ArrangementFixedRoots=U0,Or.LayerIndividual=Fy,Or.LayerSiblings=jy,Or.LayerUniform=G0;function zf(a){Ao.call(this,a)}tt(zf,Ao),zf.prototype.createVertex=function(){return new Fu(this)},zf.prototype.createEdge=function(){return new Dp(this)},zf.className="TreeNetwork";function Fu(a){sa.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 Tt(0,0),this.Da=new Xn(0,0),this.la=new Tt(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=so,this.wr=!0,this.Dp=so}tt(Fu,sa),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)},et.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){Ul.call(this,a),this.$t=new Tt(0,0)}tt(Dp,Ul),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:Ft("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,Pe=a.isOrthogonal,Me;if(a.uh(),Pe||fe){for(Me=2;4<a.pointsCount;)a.pv(2);var Fe=a.i(1),Ye=a.i(2)}else{for(Me=1;3<a.pointsCount;)a.pv(1);Fe=a.i(0),Ye=a.i(a.pointsCount-1)}var nt=a.i(a.pointsCount-1);te===0?(x.alignment===Xc?(te=b.bottom+E.y,E.y===0&&Fe.y>nt.y+x.rowIndent&&(te=Math.min(te,Math.max(Fe.y,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.top+E.y,E.y===0&&Fe.y<nt.y-x.rowIndent&&(te=Math.max(te,Math.min(Fe.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(Me,Fe.x,te),Me++,a.m(Me,b.right+ne,te),Me++,a.m(Me,b.right+ne+(E.x-ae)/3,te),Me++,a.m(Me,b.right+ne+2*(E.x-ae)/3,te),Me++,a.m(Me,b.right+ne+(E.x-ae),te),Me++,a.m(Me,Ye.x,te)):(Pe&&(a.m(Me,b.right+ne/2,Fe.y),Me++),a.m(Me,b.right+ne/2,te),Me++,a.m(Me,b.right+ne+E.x-(Pe?ae/2:ae),te),Me++,Pe&&a.m(Me,a.i(Me-1).x,Ye.y))):te===90?(x.alignment===Xc?(te=b.right+E.x,E.x===0&&Fe.x>nt.x+x.rowIndent&&(te=Math.min(te,Math.max(Fe.x,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.left+E.x,E.x===0&&Fe.x<nt.x-x.rowIndent&&(te=Math.max(te,Math.min(Fe.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(Me,te,Fe.y),Me++,a.m(Me,te,b.bottom+ne),Me++,a.m(Me,te,b.bottom+ne+(E.y-ae)/3),Me++,a.m(Me,te,b.bottom+ne+2*(E.y-ae)/3),Me++,a.m(Me,te,b.bottom+ne+(E.y-ae)),Me++,a.m(Me,te,Ye.y)):(Pe&&(a.m(Me,Fe.x,b.bottom+ne/2),Me++),a.m(Me,te,b.bottom+ne/2),Me++,a.m(Me,te,b.bottom+ne+E.y-(Pe?ae/2:ae)),Me++,Pe&&a.m(Me,Ye.x,a.i(Me-1).y))):te===180?(x.alignment===Xc?(te=b.bottom+E.y,E.y===0&&Fe.y>nt.y+x.rowIndent&&(te=Math.min(te,Math.max(Fe.y,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.top+E.y,E.y===0&&Fe.y<nt.y-x.rowIndent&&(te=Math.max(te,Math.min(Fe.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(Me,Fe.x,te),Me++,a.m(Me,b.left-ne,te),Me++,a.m(Me,b.left-ne+(E.x+ae)/3,te),Me++,a.m(Me,b.left-ne+2*(E.x+ae)/3,te),Me++,a.m(Me,b.left-ne+(E.x+ae),te),Me++,a.m(Me,Ye.x,te)):(Pe&&(a.m(Me,b.left-ne/2,Fe.y),Me++),a.m(Me,b.left-ne/2,te),Me++,a.m(Me,b.left-ne+E.x+(Pe?ae/2:ae),te),Me++,Pe&&a.m(Me,a.i(Me-1).x,Ye.y))):te===270?(x.alignment===Xc?(te=b.right+E.x,E.x===0&&Fe.x>nt.x+x.rowIndent&&(te=Math.min(te,Math.max(Fe.x,te-y.computeNodeIndent(x))))):x.alignment===Yc?(te=b.left+E.x,E.x===0&&Fe.x<nt.x-x.rowIndent&&(te=Math.max(te,Math.min(Fe.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(Me,te,Fe.y),Me++,a.m(Me,te,b.top-ne),Me++,a.m(Me,te,b.top-ne+(E.y+ae)/3),Me++,a.m(Me,te,b.top-ne+2*(E.y+ae)/3),Me++,a.m(Me,te,b.top-ne+(E.y+ae)),Me++,a.m(Me,te,Ye.y)):(Pe&&(a.m(Me,Fe.x,b.top-ne/2),Me++),a.m(Me,te,b.top-ne/2),Me++,a.m(Me,te,b.top-ne+E.y+(Pe?ae/2:ae)),Me++,Pe&&a.m(Me,Ye.x,a.i(Me-1).y))):Ft("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()))}}},et.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",Ho.prototype.initializeStandardTools=function(){this.gb("Action",new ei,this.mouseDownTools),this.gb("Relinking",new Kn,this.mouseDownTools),this.gb("LinkReshaping",new Vn,this.mouseDownTools),this.gb("Rotating",new Ii,this.mouseDownTools),this.gb("Resizing",new Oi,this.mouseDownTools),this.gb("Linking",new yn,this.mouseMoveTools),this.gb("Dragging",new es,this.mouseMoveTools),this.gb("DragSelecting",new Li,this.mouseMoveTools),this.gb("Panning",new bi,this.mouseMoveTools),this.gb("ContextMenu",new ur,this.mouseUpTools),this.gb("TextEditing",new Nr,this.mouseUpTools),this.gb("ClickCreating",new Hi,this.mouseUpTools),this.gb("ClickSelecting",new ar,this.mouseUpTools)},kc("Horizontal",new ym),kc("Spot",new xm),kc("Table",new bm),kc("Viewbox",new Pm),kc("TableRow",new Cm),kc("TableColumn",new _m),kc("Graduated",new dg),kc("Grid",new hg),rp.add("GraphLinksModel",ha),rp.add("TreeModel",wu);var W0=Ct.go,zy={get licenseKey(){return pn.licenseKey},set licenseKey(a){pn.licenseKey=a},get version(){return pn.version},Group:rr,EnumValue:an,List:On,Set:In,Map:hi,Point:Tt,Size:Xn,Rect:Ln,Margin:Ei,Spot:yi,Geometry:Qn,PathFigure:Zs,PathSegment:Wr,InputEvent:Ca,DiagramEvent:_c,ChangedEvent:zo,Model:Si,GraphLinksModel:jr,TreeModel:al,Binding:zs,Transaction:Rs,UndoManager:Ro,CommandHandler:Nt,Tool:zr,DraggingTool:es,DraggingInfo:ah,DraggingOptions:pe,LinkingBaseTool:Lt,LinkingTool:yn,RelinkingTool:Kn,LinkReshapingTool:Vn,ResizingTool:Oi,RotatingTool:Ii,ClickSelectingTool:ar,ActionTool:ei,ClickCreatingTool:Hi,HTMLInfo:Xi,ContextMenuTool:ur,DragSelectingTool:Li,PanningTool:bi,TextEditingTool:Nr,ToolManager:Ho,Animation:ds,AnimationManager:To,AnimationTrigger:jl,Layer:is,Diagram:pn,Palette:De,Overview:He,Brush:mo,GraphObject:en,Panel:Wn,RowColumnDefinition:Qs,Shape:fr,TextBlock:ko,Picture:yl,Part:Ti,Adornment:Xr,Node:ii,Link:Yn,Placeholder:il,Layout:Qo,LayoutNetwork:Ao,LayoutVertex:sa,LayoutEdge:Ul,GridLayout:xa,PanelLayout:oa,CircularLayout:as,CircularNetwork:kp,CircularVertex:zg,CircularEdge:_0,ForceDirectedLayout:Ma,ForceDirectedNetwork:Rf,ForceDirectedVertex:Hg,ForceDirectedEdge:Ug,LayeredDigraphLayout:yo,LayeredDigraphNetwork:Np,LayeredDigraphVertex:Cu,LayeredDigraphEdge:Zg,TreeLayout:Or,TreeNetwork:zf,TreeVertex:Fu,TreeEdge:Dp};typeof W0=="object"&&W0.version&&An("WARNING: a `go` object on the root object is already defined. "+("Debug"in W0?"debug ":"")+"version: "+W0.version+", replaced with version: "+zy.version),pn.prototype.go=zy,Ct.go=zy,typeof Pn.exports=="object"&&(Pn.exports=typeof Ee.g!="undefined"?Ee.g.go:self.go)}();var Le=typeof Ee.g!="undefined"?Ee.g.go:self.go;const me=typeof Ee.g!="undefined"?Ee.g.go:self.go,Ie=me.Group,Te=me.EnumValue,Ce=me.List,_e=me.Set,he=me.Map,Se=me.Point,xe=me.Size,ge=me.Rect,ce=me.Margin,ve=me.Spot,de=me.Geometry,ue=me.PathFigure,z=me.PathSegment,ee=me.InputEvent,oe=me.DiagramEvent,ie=me.ChangedEvent,se=me.Model,le=me.GraphLinksModel,ye=me.TreeModel,we=me.Binding,be=me.Transaction,ke=me.UndoManager,Ne=me.CommandHandler,je=me.Tool,Ve=me.DraggingTool,Je=me.DraggingInfo,We=me.LinkingBaseTool,gt=me.LinkingTool,ut=me.RelinkingTool,bt=me.LinkReshapingTool,rt=me.ResizingTool,St=me.RotatingTool,ct=me.ClickSelectingTool,Bt=me.ActionTool,ht=me.ClickCreatingTool,it=me.HTMLInfo,dt=me.ContextMenuTool,yt=me.DragSelectingTool,Et=me.PanningTool,vt=me.TextEditingTool,Rt=me.ToolManager,jt=me.Animation,un=me.AnimationManager,Vt=me.AnimationTrigger,xn=me.Layer,Ut=me.Diagram,Zt=me.Palette,Xt=me.Overview,mt=me.Brush,ze=me.GraphObject,Be=me.Panel,qe=me.RowColumnDefinition,Qe=me.Shape,Ue=me.TextBlock,Xe=me.TextBlockMetrics,Re=me.Picture,Ae=me.Part,Ge=me.Adornment,Ke=me.Node,Ze=me.Link,at=me.Placeholder,xt=me.Layout,tn=me.LayoutNetwork,nn=me.LayoutVertex,Jt=me.LayoutEdge,mn=me.GridLayout,kn=me.PanelLayout,fn=me.CircularLayout,Mn=me.CircularNetwork,Zn=me.CircularVertex,Tn=me.CircularEdge,ci=me.ForceDirectedLayout,ai=me.ForceDirectedNetwork,ki=me.ForceDirectedVertex,Ci=me.ForceDirectedEdge,or=me.LayeredDigraphLayout,tr=me.LayeredDigraphNetwork,pr=me.LayeredDigraphVertex,cr=me.LayeredDigraphEdge,to=me.TreeLayout,no=me.TreeNetwork,di=me.TreeVertex,Cr=me.TreeEdge,zi=me.version},24334:function(Pn,qt,Ee){var Le,me;(function(Ie,Te){Pn.exports=Te(Ie)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Ee.g!="undefined"?Ee.g:this,function(Ie){"use strict";Ie=Ie||{};var Te=Ie.Base64,Ce="2.6.4",_e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",he=function(ut){for(var bt={},rt=0,St=ut.length;rt<St;rt++)bt[ut.charAt(rt)]=rt;return bt}(_e),Se=String.fromCharCode,xe=function(ut){if(ut.length<2){var bt=ut.charCodeAt(0);return bt<128?ut:bt<2048?Se(192|bt>>>6)+Se(128|bt&63):Se(224|bt>>>12&15)+Se(128|bt>>>6&63)+Se(128|bt&63)}else{var bt=65536+(ut.charCodeAt(0)-55296)*1024+(ut.charCodeAt(1)-56320);return Se(240|bt>>>18&7)+Se(128|bt>>>12&63)+Se(128|bt>>>6&63)+Se(128|bt&63)}},ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ce=function(ut){return ut.replace(ge,xe)},ve=function(ut){var bt=[0,2,1][ut.length%3],rt=ut.charCodeAt(0)<<16|(ut.length>1?ut.charCodeAt(1):0)<<8|(ut.length>2?ut.charCodeAt(2):0),St=[_e.charAt(rt>>>18),_e.charAt(rt>>>12&63),bt>=2?"=":_e.charAt(rt>>>6&63),bt>=1?"=":_e.charAt(rt&63)];return St.join("")},de=Ie.btoa&&typeof Ie.btoa=="function"?function(ut){return Ie.btoa(ut)}:function(ut){if(ut.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ut.replace(/[\s\S]{1,3}/g,ve)},ue=function(ut){return de(ce(String(ut)))},z=function(ut){return ut.replace(/[+\/]/g,function(bt){return bt=="+"?"-":"_"}).replace(/=/g,"")},ee=function(ut,bt){return bt?z(ue(ut)):ue(ut)},oe=function(ut){return ee(ut,!0)},ie;Ie.Uint8Array&&(ie=function(ut,bt){for(var rt="",St=0,ct=ut.length;St<ct;St+=3){var Bt=ut[St],ht=ut[St+1],it=ut[St+2],dt=Bt<<16|ht<<8|it;rt+=_e.charAt(dt>>>18)+_e.charAt(dt>>>12&63)+(typeof ht!="undefined"?_e.charAt(dt>>>6&63):"=")+(typeof it!="undefined"?_e.charAt(dt&63):"=")}return bt?z(rt):rt});var se=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,le=function(ut){switch(ut.length){case 4:var bt=(7&ut.charCodeAt(0))<<18|(63&ut.charCodeAt(1))<<12|(63&ut.charCodeAt(2))<<6|63&ut.charCodeAt(3),rt=bt-65536;return Se((rt>>>10)+55296)+Se((rt&1023)+56320);case 3:return Se((15&ut.charCodeAt(0))<<12|(63&ut.charCodeAt(1))<<6|63&ut.charCodeAt(2));default:return Se((31&ut.charCodeAt(0))<<6|63&ut.charCodeAt(1))}},ye=function(ut){return ut.replace(se,le)},we=function(ut){var bt=ut.length,rt=bt%4,St=(bt>0?he[ut.charAt(0)]<<18:0)|(bt>1?he[ut.charAt(1)]<<12:0)|(bt>2?he[ut.charAt(2)]<<6:0)|(bt>3?he[ut.charAt(3)]:0),ct=[Se(St>>>16),Se(St>>>8&255),Se(St&255)];return ct.length-=[0,0,2,1][rt],ct.join("")},be=Ie.atob&&typeof Ie.atob=="function"?function(ut){return Ie.atob(ut)}:function(ut){return ut.replace(/\S{1,4}/g,we)},ke=function(ut){return be(String(ut).replace(/[^A-Za-z0-9\+\/]/g,""))},Ne=function(ut){return ye(be(ut))},je=function(ut){return String(ut).replace(/[-_]/g,function(bt){return bt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ve=function(ut){return Ne(je(ut))},Je;Ie.Uint8Array&&(Je=function(ut){return Uint8Array.from(ke(je(ut)),function(bt){return bt.charCodeAt(0)})});var We=function(){var ut=Ie.Base64;return Ie.Base64=Te,ut};if(Ie.Base64={VERSION:Ce,atob:ke,btoa:de,fromBase64:Ve,toBase64:ee,utob:ce,encode:ee,encodeURI:oe,btou:ye,decode:Ve,noConflict:We,fromUint8Array:ie,toUint8Array:Je},typeof Object.defineProperty=="function"){var gt=function(ut){return{value:ut,enumerable:!1,writable:!0,configurable:!0}};Ie.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",gt(function(){return Ve(this)})),Object.defineProperty(String.prototype,"toBase64",gt(function(ut){return ee(this,ut)})),Object.defineProperty(String.prototype,"toBase64URI",gt(function(){return ee(this,!0)}))}}return Ie.Meteor&&(Base64=Ie.Base64),Pn.exports?Pn.exports.Base64=Ie.Base64:(Le=[],me=function(){return Ie.Base64}.apply(qt,Le),me!==void 0&&(Pn.exports=me)),{Base64:Ie.Base64}})},2859:function(Pn,qt,Ee){"use strict";Ee.d(qt,{hP:function(){return Xt}});var Le=function(mt,ze){return(Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Be,qe){Be.__proto__=qe}||function(Be,qe){for(var Qe in qe)Object.prototype.hasOwnProperty.call(qe,Qe)&&(Be[Qe]=qe[Qe])})(mt,ze)};function me(mt,ze){function Be(){this.constructor=mt}Le(mt,ze),mt.prototype=ze===null?Object.create(ze):(Be.prototype=ze.prototype,new Be)}function Ie(mt,ze,Be,qe){return new(Be||(Be=Promise))(function(Qe,Ue){function Xe(Ge){try{Ae(qe.next(Ge))}catch(Ke){Ue(Ke)}}function Re(Ge){try{Ae(qe.throw(Ge))}catch(Ke){Ue(Ke)}}function Ae(Ge){var Ke;Ge.done?Qe(Ge.value):(Ke=Ge.value,Ke instanceof Be?Ke:new Be(function(Ze){Ze(Ke)})).then(Xe,Re)}Ae((qe=qe.apply(mt,ze||[])).next())})}function Te(mt,ze){var Be,qe,Qe,Ue,Xe={label:0,sent:function(){if(1&Qe[0])throw Qe[1];return Qe[1]},trys:[],ops:[]};return Ue={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(Ue[Symbol.iterator]=function(){return this}),Ue;function Re(Ae){return function(Ge){return function(Ke){if(Be)throw new TypeError("Generator is already executing.");for(;Xe;)try{if(Be=1,qe&&(Qe=2&Ke[0]?qe.return:Ke[0]?qe.throw||((Qe=qe.return)&&Qe.call(qe),0):qe.next)&&!(Qe=Qe.call(qe,Ke[1])).done)return Qe;switch(qe=0,Qe&&(Ke=[2&Ke[0],Qe.value]),Ke[0]){case 0:case 1:Qe=Ke;break;case 4:return Xe.label++,{value:Ke[1],done:!1};case 5:Xe.label++,qe=Ke[1],Ke=[0];continue;case 7:Ke=Xe.ops.pop(),Xe.trys.pop();continue;default:if(Qe=Xe.trys,!((Qe=Qe.length>0&&Qe[Qe.length-1])||Ke[0]!==6&&Ke[0]!==2)){Xe=0;continue}if(Ke[0]===3&&(!Qe||Ke[1]>Qe[0]&&Ke[1]<Qe[3])){Xe.label=Ke[1];break}if(Ke[0]===6&&Xe.label<Qe[1]){Xe.label=Qe[1],Qe=Ke;break}if(Qe&&Xe.label<Qe[2]){Xe.label=Qe[2],Xe.ops.push(Ke);break}Qe[2]&&Xe.ops.pop(),Xe.trys.pop();continue}Ke=ze.call(mt,Xe)}catch(Ze){Ke=[6,Ze],qe=0}finally{Be=Qe=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([Ae,Ge])}}}function Ce(){for(var mt=0,ze=0,Be=arguments.length;ze<Be;ze++)mt+=arguments[ze].length;var qe=Array(mt),Qe=0;for(ze=0;ze<Be;ze++)for(var Ue=arguments[ze],Xe=0,Re=Ue.length;Xe<Re;Xe++,Qe++)qe[Qe]=Ue[Xe];return qe}var _e=function(){function mt(){}return mt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},mt.setAttributes=function(ze,Be){for(var qe=0,Qe=Be;qe<Qe.length;qe++){var Ue=Qe[qe],Xe=Ue[0],Re=Ue[1];ze.setAttribute(Xe,Re)}},mt.createRect=function(ze,Be,qe){var Qe=document.createElementNS("http://www.w3.org/2000/svg","rect");return Qe.setAttribute("width",ze.toString()),Qe.setAttribute("height",Be.toString()),qe&&mt.setAttributes(Qe,qe),Qe},mt.createLine=function(ze,Be,qe,Qe,Ue){var Xe=document.createElementNS("http://www.w3.org/2000/svg","line");return Xe.setAttribute("x1",ze.toString()),Xe.setAttribute("y1",Be.toString()),Xe.setAttribute("x2",qe.toString()),Xe.setAttribute("y2",Qe.toString()),Ue&&mt.setAttributes(Xe,Ue),Xe},mt.createPolygon=function(ze,Be){var qe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return qe.setAttribute("points",ze),Be&&mt.setAttributes(qe,Be),qe},mt.createCircle=function(ze,Be){var qe=document.createElementNS("http://www.w3.org/2000/svg","circle");return qe.setAttribute("cx",(ze/2).toString()),qe.setAttribute("cy",(ze/2).toString()),qe.setAttribute("r",ze.toString()),Be&&mt.setAttributes(qe,Be),qe},mt.createEllipse=function(ze,Be,qe){var Qe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Qe.setAttribute("cx",(ze/2).toString()),Qe.setAttribute("cy",(Be/2).toString()),Qe.setAttribute("rx",(ze/2).toString()),Qe.setAttribute("ry",(Be/2).toString()),qe&&mt.setAttributes(Qe,qe),Qe},mt.createGroup=function(ze){var Be=document.createElementNS("http://www.w3.org/2000/svg","g");return ze&&mt.setAttributes(Be,ze),Be},mt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},mt.createMarker=function(ze,Be,qe,Qe,Ue,Xe,Re){var Ae=document.createElementNS("http://www.w3.org/2000/svg","marker");return mt.setAttributes(Ae,[["id",ze],["orient",Be],["markerWidth",qe.toString()],["markerHeight",Qe.toString()],["refX",Ue.toString()],["refY",Xe.toString()]]),Ae.appendChild(Re),Ae},mt.createText=function(ze){var Be=document.createElementNS("http://www.w3.org/2000/svg","text");return Be.setAttribute("x","0"),Be.setAttribute("y","0"),ze&&mt.setAttributes(Be,ze),Be},mt.createTSpan=function(ze,Be){var qe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return qe.textContent=ze,Be&&mt.setAttributes(qe,Be),qe},mt.createImage=function(ze){var Be=document.createElementNS("http://www.w3.org/2000/svg","image");return ze&&mt.setAttributes(Be,ze),Be},mt.createPoint=function(ze,Be){var qe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return qe.x=ze,qe.y=Be,qe},mt.createPath=function(ze,Be){var qe=document.createElementNS("http://www.w3.org/2000/svg","path");return qe.setAttribute("d",ze),Be&&mt.setAttributes(qe,Be),qe},mt}(),he=function(){function mt(){}return mt.addKey=function(ze){mt.key=ze},Object.defineProperty(mt,"isLicensed",{get:function(){return!!mt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(mt.key)},enumerable:!1,configurable:!0}),mt}(),Se=function(){function mt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return mt.prototype.rasterize=function(ze,Be,qe){var Qe=this;return new Promise(function(Ue){var Xe=qe!==void 0?qe:document.createElement("canvas");ze===null&&(Qe.markersOnly=!0,Qe.naturalSize=!1);var Re=document.createElementNS("http://www.w3.org/2000/svg","svg");Re.setAttribute("xmlns","http://www.w3.org/2000/svg"),Re.setAttribute("width",Be.width.baseVal.valueAsString),Re.setAttribute("height",Be.height.baseVal.valueAsString),Re.setAttribute("viewBox","0 0 "+Be.viewBox.baseVal.width.toString()+" "+Be.viewBox.baseVal.height.toString()),Re.innerHTML=Be.innerHTML,Qe.naturalSize===!0?(Re.width.baseVal.value=ze.naturalWidth,Re.height.baseVal.value=ze.naturalHeight):Qe.width!==void 0&&Qe.height!==void 0&&(Re.width.baseVal.value=Qe.width,Re.height.baseVal.value=Qe.height),Xe.width=Re.width.baseVal.value,Xe.height=Re.height.baseVal.value;var Ae=Re.outerHTML,Ge=Xe.getContext("2d");Qe.markersOnly!==!0&&Ge.drawImage(ze,0,0,Xe.width,Xe.height);var Ke=window.URL,Ze=new Image(Xe.width,Xe.height);Ze.setAttribute("crossOrigin","anonymous");var at=new Blob([Ae],{type:"image/svg+xml"}),xt=Ke.createObjectURL(at);Ze.onload=function(){Ge.drawImage(Ze,0,0),Ke.revokeObjectURL(xt);var tn=Xe.toDataURL(Qe.imageType,Qe.imageQuality);Ue(tn)},Ze.src=xt})},mt}(),xe=function(){},ge=function(){function mt(ze){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ze+"_"}return Object.defineProperty(mt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(mt.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(mt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),mt.prototype.addClass=function(ze){return this.styleSheet===void 0&&this.addStyleSheet(),ze.name=""+this.classNamePrefix+ze.localName,this.classes.push(ze),this.styleSheet.sheet.insertRule("."+ze.name+" {"+ze.style+"}",this.styleSheet.sheet.cssRules.length),ze},mt.prototype.addRule=function(ze){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ze),this.styleSheet.sheet.insertRule(ze.selector+" {"+ze.style+"}",this.styleSheet.sheet.cssRules.length)},mt.prototype.addStyleSheet=function(){var ze;this.styleSheet=document.createElement("style"),((ze=this.styleSheetRoot)!==null&&ze!==void 0?ze:document.head).appendChild(this.styleSheet),this.addRule(new ce("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ce("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ce("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new ve("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ve("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},mt.prototype.removeStyleSheet=function(){var ze;this.styleSheet&&(((ze=this.styleSheetRoot)!==null&&ze!==void 0?ze:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},mt}(),ce=function(mt,ze){this.selector=mt,this.style=ze},ve=function(mt,ze){this.localName=mt,this.style=ze},de=function(){function mt(ze,Be,qe,Qe,Ue){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ze,this.displayMode=Be,this.markerItems=qe,this.uiStyleSettings=Qe,this.styles=Ue,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return mt.prototype.show=function(ze){var Be=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ze,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var qe=document.createElement("div");qe.className=this.toolbarBlockStyleClass.name,qe.style.whiteSpace="nowrap",this.uiContainer.appendChild(qe),this.addActionButton(qe,'<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(qe,'<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(qe,'<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(qe,'<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(qe,'<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(qe,'<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(qe,'<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(qe,'<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(Ue){var Xe=document.createElement("div");Xe.className=""+Be.toolbarButtonStyleClass.name,Xe.setAttribute("data-type-name",Ue.typeName),Xe.innerHTML=Ue.icon,Xe.addEventListener("click",function(){Be.markerToolbarButtonClicked(Xe,Ue)}),Be.buttons.push(Xe),Be.markerButtons.push(Xe)}),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 Qe=document.createElement("div");Qe.className=this.toolbarBlockStyleClass.name,Qe.style.whiteSpace="nowrap",Qe.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Qe),this.addActionButton(Qe,'<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(Qe,'<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()},mt.prototype.addButtonClickListener=function(ze){this.buttonClickListeners.push(ze)},mt.prototype.removeButtonClickListener=function(ze){this.buttonClickListeners.indexOf(ze)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ze),1)},mt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},mt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ze=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Be=0;Be<this.markerButtons.length;Be++)Be<ze||Be===ze&&this.markerButtons.length-1===ze?this.markerButtonBlock.appendChild(this.markerButtons[Be]):(Be===ze&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Be]))}},mt.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")},mt.prototype.resetButtonStyles=function(){var ze=this;this.buttons.forEach(function(Be){Be.className=Be.className.replace(ze.uiStyleSettings.toolbarButtonStyleColorsClassName?ze.uiStyleSettings.toolbarButtonStyleColorsClassName:ze.toolbarButtonStyleColorsClass.name,"").trim(),Be.className=Be.className.replace(ze.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ze.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ze.toolbarActiveButtonStyleColorsClass.name,"").trim(),Be.className+=" "+(ze.uiStyleSettings.toolbarButtonStyleColorsClassName?ze.uiStyleSettings.toolbarButtonStyleColorsClassName:ze.toolbarButtonStyleColorsClass.name)})},mt.prototype.addActionButton=function(ze,Be,qe){var Qe=this,Ue=document.createElement("div");switch(Ue.className=""+this.toolbarButtonStyleClass.name,Ue.innerHTML=Be,Ue.setAttribute("data-action",qe),Ue.addEventListener("click",function(){Qe.actionToolbarButtonClicked(Ue,qe)}),qe){case"select":Ue.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ue.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ue.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ue.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ue.style.fill=this.uiStyleSettings.closeButtonColor}ze.appendChild(Ue),this.buttons.push(Ue)},mt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ve("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 ve("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ve("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ve("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 ve("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var ze=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ze)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ze)+`px;
|
|
|
padding: `+ze+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ce("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ce("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},mt.prototype.markerToolbarButtonClicked=function(ze,Be){this.setActiveButton(ze),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(qe){return qe("marker",Be)}),this.markerButtonOverflowBlock.style.display="none"},mt.prototype.actionToolbarButtonClicked=function(ze,Be){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(qe){return qe("action",Be)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},mt.prototype.setActiveButton=function(ze){this.resetButtonStyles(),ze.className=ze.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ze.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},mt.prototype.setActiveMarkerButton=function(ze){var Be=this.markerButtons.find(function(qe){return qe.getAttribute("data-type-name")===ze});Be&&this.setActiveButton(Be)},mt.prototype.setCurrentMarker=function(ze){var Be=this;this.currentMarker=ze,this.buttons.filter(function(qe){return/delete|notes/.test(qe.getAttribute("data-action"))}).forEach(function(qe){Be.currentMarker===void 0?(qe.style.fillOpacity="0.4",qe.style.pointerEvents="none"):(qe.style.fillOpacity="1",qe.style.pointerEvents="all")})},mt}(),ue=function(){function mt(ze,Be,qe,Qe){this.panels=[],this.panelButtons=[],this.markerjsContainer=ze,this.displayMode=Be,this.uiStyleSettings=qe,this.styles=Qe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return mt.prototype.addStyles=function(){var ze;this.toolboxStyleClass=this.styles.addClass(new ve("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 ve("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Be=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("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 ve("toolbox-panel-row_colors",`
|
|
|
background-color: `+((ze=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ze!==void 0?ze:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_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.toolboxButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new ce("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ce("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},mt.prototype.show=function(ze){var Be;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ze,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},mt.prototype.setPanelButtons=function(ze){var Be,qe,Qe=this;this.panels=ze,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((qe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&qe!==void 0?qe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ue){var Xe;Ue.uiStyleSettings=Qe.uiStyleSettings;var Re=document.createElement("div");Re.className=Qe.toolboxButtonStyleClass.name+" "+((Xe=Qe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xe!==void 0?Xe:Qe.toolboxButtonStyleColorsClass.name),Re.innerHTML=Ue.icon,Re.title=Ue.title,Re.addEventListener("click",function(){Qe.panelButtonClick(Ue)}),Qe.panelButtons.push(Re),Qe.buttonRow.appendChild(Re)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},mt.prototype.panelButtonClick=function(ze){var Be=this,qe=-1;if(ze!==this.activePanel){qe=this.panels.indexOf(ze),this.panelRow.innerHTML="";var Qe=ze.getUi();Qe.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Qe),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=ze}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Be.displayMode==="inline"?Be.panelRow.style.display="none":Be.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ue,Xe){var Re,Ae;Ue.className=Be.toolboxButtonStyleClass.name+" "+(Xe===qe?""+((Re=Be.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Re!==void 0?Re:Be.toolboxActiveButtonStyleColorsClass.name):""+((Ae=Be.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ae!==void 0?Ae:Be.toolboxButtonStyleColorsClass.name))})},mt}(),z=function(mt,ze){this.title=mt,this.icon=ze},ee=function(mt){function ze(Be,qe,Qe,Ue){var Xe=mt.call(this,Be,Ue||'<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 Xe.colors=[],Xe.addTransparent=!1,Xe.colorBoxes=[],Xe.colors=qe,Xe.currentColor=Qe,Xe.setCurrentColor=Xe.setCurrentColor.bind(Xe),Xe.getColorBox=Xe.getColorBox.bind(Xe),Xe}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,qe=document.createElement("div");return qe.style.overflow="hidden",qe.style.whiteSpace="nowrap",this.colors.forEach(function(Qe){var Ue=Be.getColorBox(Qe);qe.appendChild(Ue),Be.colorBoxes.push(Ue)}),qe},ze.prototype.getColorBox=function(Be){var qe=this,Qe=this.uiStyleSettings.toolbarHeight/4,Ue=this.uiStyleSettings.toolbarHeight-Qe,Xe=document.createElement("div");Xe.style.display="inline-block",Xe.style.boxSizing="content-box",Xe.style.width=Ue-2+"px",Xe.style.height=Ue-2+"px",Xe.style.padding="1px",Xe.style.marginRight="2px",Xe.style.marginBottom="2px",Xe.style.borderWidth="2px",Xe.style.borderStyle="solid",Xe.style.borderRadius=(Ue+2)/2+"px",Xe.style.borderColor=Be===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Xe.addEventListener("click",function(){qe.setCurrentColor(Be,Xe)});var Re=document.createElement("div");return Re.style.display="inline-block",Re.style.width=Ue-2+"px",Re.style.height=Ue-2+"px",Re.style.backgroundColor=Be,Re.style.borderRadius=Ue/2+"px",Be==="transparent"&&(Re.style.fill=this.uiStyleSettings.toolboxAccentColor,Re.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>`),Xe.appendChild(Re),Xe},ze.prototype.setCurrentColor=function(Be,qe){var Qe=this;this.currentColor=Be,this.colorBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===qe?Qe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Be)},ze}(z),oe=function(){function mt(ze,Be,qe){this._state="new",this._isSelected=!1,this._container=ze,this._overlayContainer=Be,this.globalSettings=qe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(mt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),mt.prototype.ownsTarget=function(ze){return!1},Object.defineProperty(mt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),mt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},mt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},mt.prototype.pointerDown=function(ze,Be){},mt.prototype.dblClick=function(ze,Be){},mt.prototype.manipulate=function(ze){},mt.prototype.pointerUp=function(ze){this.stateChanged()},mt.prototype.dispose=function(){},mt.prototype.addMarkerVisualToContainer=function(ze){this.container.childNodes.length>0?this.container.insertBefore(ze,this.container.childNodes[0]):this.container.appendChild(ze)},mt.prototype.getState=function(){return{typeName:mt.typeName,state:this.state,notes:this.notes}},mt.prototype.restoreState=function(ze){this._state=ze.state,this.notes=ze.notes},mt.prototype.scale=function(ze,Be){},mt.prototype.colorChanged=function(ze){this.onColorChanged&&this.onColorChanged(ze),this.stateChanged()},mt.prototype.fillColorChanged=function(ze){this.onFillColorChanged&&this.onFillColorChanged(ze),this.stateChanged()},mt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ze=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ze.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ze)&&this.onStateChanged(this)}},mt.typeName="MarkerBase",mt}(),ie=function(){function mt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return mt.prototype.findGripByVisual=function(ze){return this.topLeft.ownsTarget(ze)?this.topLeft:this.topCenter.ownsTarget(ze)?this.topCenter:this.topRight.ownsTarget(ze)?this.topRight:this.centerLeft.ownsTarget(ze)?this.centerLeft:this.centerRight.ownsTarget(ze)?this.centerRight:this.bottomLeft.ownsTarget(ze)?this.bottomLeft:this.bottomCenter.ownsTarget(ze)?this.bottomCenter:this.bottomRight.ownsTarget(ze)?this.bottomRight:void 0},mt}(),se=function(){function mt(){this.GRIP_SIZE=10,this.visual=_e.createGroup(),this.visual.appendChild(_e.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_e.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return mt.prototype.ownsTarget=function(ze){return ze===this.visual||ze===this.visual.childNodes[0]||ze===this.visual.childNodes[1]},mt}(),le=function(){function mt(){}return mt.toITransformMatrix=function(ze){return{a:ze.a,b:ze.b,c:ze.c,d:ze.d,e:ze.e,f:ze.f}},mt.toSVGMatrix=function(ze,Be){return ze.a=Be.a,ze.b=Be.b,ze.c=Be.c,ze.d=Be.d,ze.e=Be.e,ze.f=Be.f,ze},mt}(),ye=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.left=0,Ue.top=0,Ue.width=0,Ue.height=0,Ue.defaultSize={x:50,y:20},Ue.offsetX=0,Ue.offsetY=0,Ue.rotationAngle=0,Ue.CB_DISTANCE=10,Ue._suppressMarkerCreateEvent=!1,Ue.container.transform.baseVal.appendItem(_e.createTransform()),Ue.setupControlBox(),Ue}return me(ze,mt),Object.defineProperty(ze.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"visual",{get:function(){return this._visual},set:function(Be){this._visual=Be;var qe=_e.createTransform();this._visual.transform.baseVal.appendItem(qe)},enumerable:!1,configurable:!0}),ze.prototype.ownsTarget=function(Be){return!!mt.prototype.ownsTarget.call(this,Be)||!!(this.controlGrips.findGripByVisual(Be)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Be))},ze.prototype.pointerDown=function(Be,qe){mt.prototype.pointerDown.call(this,Be,qe),this.state==="new"&&(this.left=Be.x,this.top=Be.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Qe=this.unrotatePoint(Be);if(this.manipulationStartX=Qe.x,this.manipulationStartY=Qe.y,this.offsetX=Qe.x-this.left,this.offsetY=Qe.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(qe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(qe)){this.activeGrip=this.rotatorGrip;var Ue=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ue.x-this.width/2,this.top=Ue.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Xe=this.container.transform.baseVal.getItem(0);Xe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Xe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ze.prototype.pointerUp=function(Be){var qe=this.state;mt.prototype.pointerUp.call(this,Be),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Be),this._state="select",qe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ze.prototype.moveVisual=function(Be){this.visual.style.transform="translate("+Be.x+"px, "+Be.y+"px)"},ze.prototype.manipulate=function(Be){var qe=this.unrotatePoint(Be);this.state==="creating"?this.resize(Be):this.state==="move"?(this.left=this.manipulationStartLeft+(qe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(qe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(qe):this.state==="rotate"&&this.rotate(Be)},ze.prototype.resize=function(Be){var qe=this.manipulationStartLeft,Qe=this.manipulationStartWidth,Ue=this.manipulationStartTop,Xe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:qe=this.manipulationStartLeft+Be.x-this.manipulationStartX,Qe=this.manipulationStartWidth+this.manipulationStartLeft-qe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Qe=this.manipulationStartWidth+Be.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ue=this.manipulationStartTop+Be.y-this.manipulationStartY,Xe=this.manipulationStartHeight+this.manipulationStartTop-Ue;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Xe=this.manipulationStartHeight+Be.y-this.manipulationStartY}Qe>=0?(this.left=qe,this.width=Qe):(this.left=qe+Qe,this.width=-Qe),Xe>=0?(this.top=Ue,this.height=Xe):(this.top=Ue+Xe,this.height=-Xe),this.setSize()},ze.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ze.prototype.rotate=function(Be){if(Math.abs(Be.x-this.centerX)>.1){var qe=Math.sign(Be.x-this.centerX);this.rotationAngle=180*Math.atan((Be.y-this.centerY)/(Be.x-this.centerX))/Math.PI+90*qe,this.applyRotation()}},ze.prototype.applyRotation=function(){var Be=this.container.transform.baseVal.getItem(0);Be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Be,0)},ze.prototype.rotatePoint=function(Be){if(this.rotationAngle===0)return Be;var qe=this.container.getCTM(),Qe=_e.createPoint(Be.x,Be.y);return{x:(Qe=Qe.matrixTransform(qe)).x,y:Qe.y}},ze.prototype.unrotatePoint=function(Be){if(this.rotationAngle===0)return Be;var qe=this.container.getCTM();qe=qe.inverse();var Qe=_e.createPoint(Be.x,Be.y);return{x:(Qe=Qe.matrixTransform(qe)).x,y:Qe.y}},ze.prototype.select=function(){mt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ze.prototype.deselect=function(){mt.prototype.deselect.call(this),this.controlBox.style.display="none"},ze.prototype.setupControlBox=function(){this.controlBox=_e.createGroup();var Be=_e.createTransform();Be.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Be),this.container.appendChild(this.controlBox),this.controlRect=_e.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=_e.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new ie,this.addControlGrips(),this.controlBox.style.display="none"},ze.prototype.adjustControlBox=function(){var Be=this.controlBox.transform.baseVal.getItem(0);Be.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Be,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()},ze.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()},ze.prototype.createGrip=function(){var Be=new se;return Be.visual.transform.baseVal.appendItem(_e.createTransform()),this.controlBox.appendChild(Be.visual),Be},ze.prototype.positionGrips=function(){var Be=this.controlGrips.topLeft.GRIP_SIZE,qe=-Be/2,Qe=qe,Ue=(this.width+this.CB_DISTANCE)/2-Be/2,Xe=(this.height+this.CB_DISTANCE)/2-Be/2,Re=this.height+this.CB_DISTANCE-Be/2,Ae=this.width+this.CB_DISTANCE-Be/2;this.positionGrip(this.controlGrips.topLeft.visual,qe,Qe),this.positionGrip(this.controlGrips.topCenter.visual,Ue,Qe),this.positionGrip(this.controlGrips.topRight.visual,Ae,Qe),this.positionGrip(this.controlGrips.centerLeft.visual,qe,Xe),this.positionGrip(this.controlGrips.centerRight.visual,Ae,Xe),this.positionGrip(this.controlGrips.bottomLeft.visual,qe,Re),this.positionGrip(this.controlGrips.bottomCenter.visual,Ue,Re),this.positionGrip(this.controlGrips.bottomRight.visual,Ae,Re),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ue,Qe-3*this.CB_DISTANCE)},ze.prototype.positionGrip=function(Be,qe,Qe){var Ue=Be.transform.baseVal.getItem(0);Ue.setTranslate(qe,Qe),Be.transform.baseVal.replaceItem(Ue,0)},ze.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ze.prototype.showControlBox=function(){this.controlBox.style.display=""},ze.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:le.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:le.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},mt.prototype.getState.call(this))},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be);var qe=Be;this.left=qe.left,this.top=qe.top,this.width=qe.width,this.height=qe.height,this.rotationAngle=qe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,qe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,qe.containerTransformMatrix))},ze.prototype.scale=function(Be,qe){mt.prototype.scale.call(this,Be,qe);var Qe=this.rotatePoint({x:this.left,y:this.top}),Ue=this.unrotatePoint({x:Qe.x*Be,y:Qe.y*qe});this.left=Ue.x,this.top=Ue.y,this.width=this.width*Be,this.height=this.height*qe,this.adjustControlBox()},ze}(oe),we=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.fillColor="transparent",Ue.strokeColor="transparent",Ue.strokeWidth=0,Ue.strokeDasharray="",Ue.opacity=1,Ue.setStrokeColor=Ue.setStrokeColor.bind(Ue),Ue.setFillColor=Ue.setFillColor.bind(Ue),Ue.setStrokeWidth=Ue.setStrokeWidth.bind(Ue),Ue.setStrokeDasharray=Ue.setStrokeDasharray.bind(Ue),Ue.createVisual=Ue.createVisual.bind(Ue),Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual)},ze.prototype.createVisual=function(){this.visual=_e.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},ze.prototype.pointerDown=function(Be,qe){mt.prototype.pointerDown.call(this,Be,qe),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},ze.prototype.manipulate=function(Be){mt.prototype.manipulate.call(this,Be)},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),this.setSize()},ze.prototype.setSize=function(){mt.prototype.setSize.call(this),_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ze.prototype.pointerUp=function(Be){mt.prototype.pointerUp.call(this,Be),this.setSize()},ze.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.visual&&_e.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},ze.prototype.setFillColor=function(Be){this.fillColor=Be,this.visual&&_e.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ze.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.visual&&_e.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ze.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.visual&&_e.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ze.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},mt.prototype.getState.call(this))},ze.prototype.restoreState=function(Be){var qe=Be;this.fillColor=qe.fillColor,this.strokeColor=qe.strokeColor,this.strokeWidth=qe.strokeWidth,this.strokeDasharray=qe.strokeDasharray,this.opacity=qe.opacity,this.createVisual(),mt.prototype.restoreState.call(this,Be),this.setSize()},ze.prototype.scale=function(Be,qe){mt.prototype.scale.call(this,Be,qe),this.setSize()},ze.title="Rectangle marker",ze}(ye),be=function(mt){function ze(Be,qe,Qe,Ue){var Xe=mt.call(this,Be,Ue||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Xe.widths=[],Xe.widthBoxes=[],Xe.widths=qe,Xe.currentWidth=Qe,Xe.setCurrentWidth=Xe.setCurrentWidth.bind(Xe),Xe}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,qe=document.createElement("div");return qe.style.display="flex",qe.style.overflow="hidden",qe.style.flexGrow="2",this.widths.forEach(function(Qe){var Ue=document.createElement("div");Ue.style.display="flex",Ue.style.flexGrow="2",Ue.style.alignItems="center",Ue.style.justifyContent="space-between",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.borderColor=Qe===Be.currentWidth?Be.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Be.setCurrentWidth(Qe,Ue)}),qe.appendChild(Ue);var Xe=document.createElement("div");Xe.innerText=Qe.toString(),Xe.style.marginRight="5px",Ue.appendChild(Xe);var Re=document.createElement("div");Re.style.minHeight="20px",Re.style.flexGrow="2",Re.style.display="flex",Re.style.alignItems="center";var Ae=document.createElement("hr");Ae.style.minWidth="20px",Ae.style.border="0px",Ae.style.borderTop=Qe+"px solid "+Be.uiStyleSettings.toolboxColor,Ae.style.flexGrow="2",Re.appendChild(Ae),Ue.appendChild(Re),Be.widthBoxes.push(Ue)}),qe},ze.prototype.setCurrentWidth=function(Be,qe){var Qe=this;this.currentWidth=Be,this.widthBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===qe?Qe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ze}(z),ke=function(mt){function ze(Be,qe,Qe,Ue){var Xe=mt.call(this,Be,Ue||'<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 Xe.styles=[],Xe.styleBoxes=[],Xe.styles=qe,Xe.currentStyle=Qe,Xe.setCurrentStyle=Xe.setCurrentStyle.bind(Xe),Xe}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,qe=document.createElement("div");return qe.style.display="flex",qe.style.overflow="hidden",qe.style.flexGrow="2",this.styles.forEach(function(Qe){var Ue=document.createElement("div");Ue.style.display="flex",Ue.style.alignItems="center",Ue.style.justifyContent="space-between",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.overflow="hidden",Ue.style.maxWidth=100/Be.styles.length-5+"%",Ue.style.borderColor=Qe===Be.currentStyle?Be.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Be.setCurrentStyle(Qe,Ue)}),qe.appendChild(Ue);var Xe=document.createElement("div");Xe.style.minHeight="20px",Xe.style.flexGrow="2",Xe.style.overflow="hidden";var Re=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Be.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Qe!==""?'stroke-dasharray="'+Qe+'"':"")+` />
|
|
|
</svg>`;Xe.innerHTML=Re,Ue.appendChild(Xe),Be.styleBoxes.push(Ue)}),qe},ze.prototype.setCurrentStyle=function(Be,qe){var Qe=this;this.currentStyle=Be,this.styleBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===qe?Qe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ze}(z),Ne=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.strokeColor=Qe.defaultColor,Ue.strokeWidth=Qe.defaultStrokeWidth,Ue.strokeDasharray=Qe.defaultStrokeDasharray,Ue.strokePanel=new ee("Line color",Qe.defaultColorSet,Qe.defaultColor),Ue.strokePanel.onColorChanged=Ue.setStrokeColor,Ue.strokeWidthPanel=new be("Line width",Qe.defaultStrokeWidths,Qe.defaultStrokeWidth),Ue.strokeWidthPanel.onWidthChanged=Ue.setStrokeWidth,Ue.strokeStylePanel=new ke("Line style",Qe.defaultStrokeDasharrays,Qe.defaultStrokeDasharray),Ue.strokeStylePanel.onStyleChanged=Ue.setStrokeDasharray,Ue}return me(ze,mt),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=mt.prototype.getState.call(this);return Be.typeName=ze.typeName,Be},ze.typeName="FrameMarker",ze.title="Frame marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ze}(we),je=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"},Ve=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.x1=0,Ue.y1=0,Ue.x2=0,Ue.y2=0,Ue.defaultLength=50,Ue.manipulationStartX=0,Ue.manipulationStartY=0,Ue.manipulationStartX1=0,Ue.manipulationStartY1=0,Ue.manipulationStartX2=0,Ue.manipulationStartY2=0,Ue.setupControlBox(),Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!!mt.prototype.ownsTarget.call(this,Be)||!(!this.grip1.ownsTarget(Be)&&!this.grip2.ownsTarget(Be))},ze.prototype.pointerDown=function(Be,qe){mt.prototype.pointerDown.call(this,Be,qe),this.manipulationStartX=Be.x,this.manipulationStartY=Be.y,this.state==="new"&&(this.x1=Be.x,this.y1=Be.y,this.x2=Be.x,this.y2=Be.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(qe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(qe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ze.prototype.pointerUp=function(Be){var qe=this.state;mt.prototype.pointerUp.call(this,Be),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(Be),this._state="select",qe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ze.prototype.adjustVisual=function(){},ze.prototype.manipulate=function(Be){this.state==="creating"?this.resize(Be):this.state==="move"?(this.x1=this.manipulationStartX1+Be.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Be.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Be.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Be.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Be)},ze.prototype.resize=function(Be){switch(this.activeGrip){case this.grip1:this.x1=Be.x,this.y1=Be.y;break;case this.grip2:case void 0:this.x2=Be.x,this.y2=Be.y}this.adjustVisual(),this.adjustControlBox()},ze.prototype.select=function(){mt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ze.prototype.deselect=function(){mt.prototype.deselect.call(this),this.controlBox.style.display="none"},ze.prototype.setupControlBox=function(){this.controlBox=_e.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ze.prototype.adjustControlBox=function(){this.positionGrips()},ze.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ze.prototype.createGrip=function(){var Be=new se;return Be.visual.transform.baseVal.appendItem(_e.createTransform()),this.controlBox.appendChild(Be.visual),Be},ze.prototype.positionGrips=function(){var Be=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Be/2,this.y1-Be/2),this.positionGrip(this.grip2.visual,this.x2-Be/2,this.y2-Be/2)},ze.prototype.positionGrip=function(Be,qe,Qe){var Ue=Be.transform.baseVal.getItem(0);Ue.setTranslate(qe,Qe),Be.transform.baseVal.replaceItem(Ue,0)},ze.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},mt.prototype.getState.call(this))},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be);var qe=Be;this.x1=qe.x1,this.y1=qe.y1,this.x2=qe.x2,this.y2=qe.y2},ze.prototype.scale=function(Be,qe){mt.prototype.scale.call(this,Be,qe),this.x1=this.x1*Be,this.y1=this.y1*qe,this.x2=this.x2*Be,this.y2=this.y2*qe,this.adjustVisual(),this.adjustControlBox()},ze}(oe),Je=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.strokeColor="transparent",Ue.strokeWidth=0,Ue.strokeDasharray="",Ue.setStrokeColor=Ue.setStrokeColor.bind(Ue),Ue.setStrokeWidth=Ue.setStrokeWidth.bind(Ue),Ue.setStrokeDasharray=Ue.setStrokeDasharray.bind(Ue),Ue.strokeColor=Qe.defaultColor,Ue.strokeWidth=Qe.defaultStrokeWidth,Ue.strokeDasharray=Qe.defaultStrokeDasharray,Ue.strokePanel=new ee("Line color",Qe.defaultColorSet,Qe.defaultColor),Ue.strokePanel.onColorChanged=Ue.setStrokeColor,Ue.strokeWidthPanel=new be("Line width",Qe.defaultStrokeWidths,Qe.defaultStrokeWidth),Ue.strokeWidthPanel.onWidthChanged=Ue.setStrokeWidth,Ue.strokeStylePanel=new ke("Line style",Qe.defaultStrokeDasharrays,Qe.defaultStrokeDasharray),Ue.strokeStylePanel.onStyleChanged=Ue.setStrokeDasharray,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.selectorLine&&Be!==this.visibleLine)},ze.prototype.createVisual=function(){this.visual=_e.createGroup(),this.selectorLine=_e.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=_e.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},ze.prototype.pointerDown=function(Be,qe){mt.prototype.pointerDown.call(this,Be,qe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ze.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),_e.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),_e.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ze.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.adjustVisual(),this.colorChanged(Be)},ze.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.adjustVisual()},ze.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be);var qe=Be;this.strokeColor=qe.strokeColor,this.strokeWidth=qe.strokeWidth,this.strokeDasharray=qe.strokeDasharray,this.createVisual(),this.adjustVisual()},ze.typeName="LineMarker",ze.title="Line marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ze}(Ve),We=function(mt){function ze(Be,qe,Qe,Ue){var Xe=mt.call(this,Be,Ue||'<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 Xe.fonts=[],Xe.fontBoxes=[],Xe.fonts=qe,Xe.currentFont=Qe,Xe.setCurrentFont=Xe.setCurrentFont.bind(Xe),Xe}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,qe=document.createElement("div");return qe.style.overflow="hidden",qe.style.flexGrow="2",this.fonts.forEach(function(Qe){var Ue=document.createElement("div");Ue.style.display="inline-block",Ue.style.alignItems="center",Ue.style.justifyContent="space-between",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.overflow="hidden",Ue.style.maxWidth=100/Be.fonts.length-5+"%",Ue.style.borderColor=Qe===Be.currentFont?Be.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Be.setCurrentFont(Qe,Ue)}),qe.appendChild(Ue);var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.minHeight="20px",Xe.style.flexGrow="2",Xe.style.fontFamily=Qe,Xe.style.overflow="hidden";var Re=document.createElement("div");Re.style.whiteSpace="nowrap",Re.style.overflow="hidden",Re.style.textOverflow="ellipsis",Re.innerHTML="The quick brown fox jumps over the lazy dog",Xe.appendChild(Re),Ue.appendChild(Xe),Be.fontBoxes.push(Ue)}),qe},ze.prototype.setCurrentFont=function(Be,qe){var Qe=this;this.currentFont=Be,this.fontBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===qe?Qe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ze}(z),gt=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.color="transparent",Ue.padding=5,Ue.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ue.text=Ue.DEFAULT_TEXT,Ue.isMoved=!1,Ue.color=Qe.defaultColor,Ue.fontFamily=Qe.defaultFontFamily,Ue.defaultSize={x:100,y:30},Ue.setColor=Ue.setColor.bind(Ue),Ue.setFont=Ue.setFont.bind(Ue),Ue.renderText=Ue.renderText.bind(Ue),Ue.sizeText=Ue.sizeText.bind(Ue),Ue.textEditDivClicked=Ue.textEditDivClicked.bind(Ue),Ue.showTextEditor=Ue.showTextEditor.bind(Ue),Ue.setSize=Ue.setSize.bind(Ue),Ue.positionTextEditor=Ue.positionTextEditor.bind(Ue),Ue.colorPanel=new ee("Color",Qe.defaultColorSet,Qe.defaultColor),Ue.colorPanel.onColorChanged=Ue.setColor,Ue.fontFamilyPanel=new We("Font",Qe.defaultFontFamilies,Qe.defaultFontFamily),Ue.fontFamilyPanel.onFontChanged=Ue.setFont,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){if(mt.prototype.ownsTarget.call(this,Be)||Be===this.visual||Be===this.textElement||Be===this.bgRectangle)return!0;var qe=!1;return this.textElement.childNodes.forEach(function(Qe){Qe===Be&&(qe=!0)}),qe},ze.prototype.createVisual=function(){this.visual=_e.createGroup(),this.bgRectangle=_e.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=_e.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(_e.createTransform()),this.textElement.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ze.prototype.pointerDown=function(Be,qe){mt.prototype.pointerDown.call(this,Be,qe),this.isMoved=!1,this.pointerDownPoint=Be,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},ze.prototype.renderText=function(){var Be=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(qe){Be.textElement.appendChild(_e.createTSpan(qe.trim()===""?" ":qe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ze.prototype.getTextScale=function(){var Be=this.textElement.getBBox(),qe=1;if(Be.width>0&&Be.height>0){var Qe=(1*this.width-this.width*this.padding*2/100)/Be.width,Ue=(1*this.height-this.height*this.padding*2/100)/Be.height;qe=Math.min(Qe,Ue)}return qe},ze.prototype.getTextPosition=function(Be){var qe=this.textElement.getBBox(),Qe=0,Ue=0;return qe.width>0&&qe.height>0&&(Qe=(this.width-qe.width*Be)/2,Ue=this.height/2-qe.height*Be/2),{x:Qe,y:Ue}},ze.prototype.sizeText=function(){var Be=this.textElement.getBBox(),qe=this.getTextScale(),Qe=this.getTextPosition(qe);Qe.y-=Be.y*qe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Qe.x+"px, "+Qe.y+"px) scale("+qe+", "+qe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Qe.x,Qe.y),this.textElement.transform.baseVal.getItem(1).setScale(qe,qe))},ze.prototype.manipulate=function(Be){mt.prototype.manipulate.call(this,Be),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Be.x-this.pointerDownPoint.x)>5||Math.abs(Be.y-this.pointerDownPoint.y)>5)},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),this.isMoved=!0,this.setSize(),this.sizeText()},ze.prototype.setSize=function(){mt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ze.prototype.pointerUp=function(Be){var qe=this.state;qe==="creating"&&(this._suppressMarkerCreateEvent=!0),mt.prototype.pointerUp.call(this,Be),this.setSize(),(qe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ze.prototype.showTextEditor=function(){var Be=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(qe){qe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var qe=Number.parseFloat(Be.textEditor.style.fontSize);Be.textEditor.clientWidth>=Number.parseInt(Be.textEditor.style.maxWidth)&&qe>.9;)qe-=.1,Be.textEditor.style.fontSize=Math.max(qe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(qe){qe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(qe){if(qe.clipboardData){var Qe=qe.clipboardData.getData("text"),Ue=window.getSelection();if(!Ue.rangeCount)return!1;Ue.deleteFromDocument(),Ue.getRangeAt(0).insertNode(document.createTextNode(Qe)),qe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Be.textEditDivClicked(Be.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ze.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Be=this.getTextScale(),qe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Qe=this.textElement.getBBox(),Ue={x:Qe.width*Be,y:Qe.height*Be};qe.x-=Ue.x/2,qe.y-=Ue.y/2,this.textEditor.style.top=qe.y+"px",this.textEditor.style.left=qe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-qe.x+"px",this.textEditor.style.fontSize=Math.max(16*Be,12)+"px",this.textElement.style.display="none"}},ze.prototype.textEditDivClicked=function(Be){this.text=Be.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ze.prototype.select=function(){mt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ze.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),mt.prototype.deselect.call(this)},ze.prototype.dblClick=function(Be,qe){mt.prototype.dblClick.call(this,Be,qe),this.showTextEditor()},ze.prototype.setColor=function(Be){this.textElement&&_e.setAttributes(this.textElement,[["fill",Be]]),this.color=Be,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Be)},ze.prototype.setFont=function(Be){this.textElement&&_e.setAttributes(this.textElement,[["font-family",Be]]),this.fontFamily=Be,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ze.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ze.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){var qe=Be;this.color=qe.color,this.fontFamily=qe.fontFamily,this.padding=qe.padding,this.text=qe.text,this.createVisual(),mt.prototype.restoreState.call(this,Be),this.setSize()},ze.prototype.scale=function(Be,qe){mt.prototype.scale.call(this,Be,qe),this.setSize(),this.sizeText(),this.positionTextEditor()},ze.typeName="TextMarker",ze.title="Text marker",ze.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>',ze}(ye),ut=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.color="transparent",Ue.lineWidth=3,Ue.drawing=!1,Ue.pixelRatio=1,Ue.color=Qe.defaultColor,Ue.lineWidth=Qe.defaultStrokeWidth,Ue.pixelRatio=Qe.freehandPixelRatio,Ue.setColor=Ue.setColor.bind(Ue),Ue.addCanvas=Ue.addCanvas.bind(Ue),Ue.finishCreation=Ue.finishCreation.bind(Ue),Ue.setLineWidth=Ue.setLineWidth.bind(Ue),Ue.colorPanel=new ee("Color",Qe.defaultColorSet,Qe.defaultColor),Ue.colorPanel.onColorChanged=Ue.setColor,Ue.lineWidthPanel=new be("Line width",Qe.defaultStrokeWidths,Qe.defaultStrokeWidth),Ue.lineWidthPanel.onWidthChanged=Ue.setLineWidth,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.drawingImage)},ze.prototype.createVisual=function(){this.visual=_e.createGroup(),this.drawingImage=_e.createImage(),this.visual.appendChild(this.drawingImage);var Be=_e.createTransform();this.visual.transform.baseVal.appendItem(Be),this.addMarkerVisualToContainer(this.visual)},ze.prototype.pointerDown=function(Be,qe){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(Be.x,Be.y),this.drawing=!0):mt.prototype.pointerDown.call(this,Be,qe)},ze.prototype.manipulate=function(Be){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Be.x,Be.y),this.canvasContext.stroke()):mt.prototype.manipulate.call(this,Be)},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ze.prototype.pointerUp=function(Be){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):mt.prototype.pointerUp.call(this,Be)},ze.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)},ze.prototype.select=function(){this.state==="creating"&&this.finishCreation(),mt.prototype.select.call(this)},ze.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),mt.prototype.deselect.call(this)},ze.prototype.finishCreation=function(){for(var Be=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),qe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Qe=qe[0],Ue=qe[1],Xe=qe[2],Re=qe[3],Ae=!1,Ge=0;Ge<this.canvasElement.height;Ge++)for(var Ke=0;Ke<this.canvasElement.width;Ke++)Be.data[Ge*this.canvasElement.width*4+4*Ke+3]>0&&(Ae=!0,Ge<Ue&&(Ue=Ge),Ke<Qe&&(Qe=Ke),Ge>Re&&(Re=Ge),Ke>Xe&&(Xe=Ke));if(Ae){this.left=Qe/this.pixelRatio,this.top=Ue/this.pixelRatio,this.width=(Xe-Qe)/this.pixelRatio,this.height=(Re-Ue)/this.pixelRatio;var Ze=document.createElement("canvas");Ze.width=Xe-Qe,Ze.height=Re-Ue,Ze.getContext("2d").putImageData(this.canvasContext.getImageData(Qe,Ue,Xe-Qe,Re-Ue),0,0),this.drawingImgUrl=Ze.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ze.prototype.setDrawingImage=function(){_e.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ze.prototype.setColor=function(Be){this.color=Be,this.colorChanged(Be)},ze.prototype.setLineWidth=function(Be){this.lineWidth=Be},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({drawingImgUrl:this.drawingImgUrl},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){this.createVisual(),mt.prototype.restoreState.call(this,Be),this.drawingImgUrl=Be.drawingImgUrl,this.setDrawingImage()},ze.prototype.scale=function(Be,qe){mt.prototype.scale.call(this,Be,qe),this.setDrawingImage()},ze.typeName="FreehandMarker",ze.title="Freehand marker",ze.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>',ze}(ye),bt=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,Qe||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ue.typeBoxes=[],Ue.currentType=qe,Ue.setCurrentType=Ue.setCurrentType.bind(Ue),Ue}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,qe=document.createElement("div");qe.style.display="flex",qe.style.overflow="hidden",qe.style.flexGrow="2";for(var Qe=function(Re){var Ae="both";switch(Re){case 0:Ae="both";break;case 1:Ae="start";break;case 2:Ae="end";break;case 3:Ae="none"}var Ge=document.createElement("div");if(Ge.style.display="flex",Ge.style.flexGrow="2",Ge.style.alignItems="center",Ge.style.justifyContent="space-between",Ge.style.padding="5px",Ge.style.borderWidth="2px",Ge.style.borderStyle="solid",Ge.style.borderColor=Ae===Ue.currentType?Ue.uiStyleSettings.toolboxAccentColor:"transparent",Ge.addEventListener("click",function(){Be.setCurrentType(Ae,Ge)}),qe.appendChild(Ge),Ae==="both"||Ae==="start"){var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.alignItems="center",Ke.style.minHeight="20px",Ke.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="`+(Ue.uiStyleSettings!==void 0?Ue.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ke.style.marginLeft="5px",Ge.appendChild(Ke)}var Ze=document.createElement("div");Ze.style.display="flex",Ze.style.alignItems="center",Ze.style.minHeight="20px",Ze.style.flexGrow="2";var at=document.createElement("hr");if(at.style.minWidth="20px",at.style.border="0px",at.style.borderTop="3px solid "+(Ue.uiStyleSettings!==void 0?Ue.uiStyleSettings.toolboxColor:"#eeeeee"),at.style.flexGrow="2",Ze.appendChild(at),Ge.appendChild(Ze),Ae==="both"||Ae==="end"){var xt=document.createElement("div");xt.style.display="flex",xt.style.alignItems="center",xt.style.minHeight="20px",xt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(Ue.uiStyleSettings!==void 0?Ue.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,xt.style.marginRight="5px",Ge.appendChild(xt)}Ue.typeBoxes.push(Ge)},Ue=this,Xe=0;Xe<4;Xe++)Qe(Xe);return qe},ze.prototype.setCurrentType=function(Be,qe){var Qe=this;this.currentType=Be,this.typeBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===qe?Qe.uiStyleSettings!==void 0?Qe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ze}(z),rt=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.arrowType="end",Ue.arrowBaseHeight=10,Ue.arrowBaseWidth=10,Ue.getArrowPoints=Ue.getArrowPoints.bind(Ue),Ue.setArrowType=Ue.setArrowType.bind(Ue),Ue.arrowTypePanel=new bt("Arrow type","end"),Ue.arrowTypePanel.onArrowTypeChanged=Ue.setArrowType,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.arrow1&&Be!==this.arrow2)},ze.prototype.getArrowPoints=function(Be,qe){var Qe=this.arrowBaseWidth+2*this.strokeWidth,Ue=this.arrowBaseHeight+2*this.strokeWidth;return Be-Qe/2+","+(qe+Ue/2)+" "+Be+","+(qe-Ue/2)+" "+(Be+Qe/2)+","+(qe+Ue/2)},ze.prototype.createTips=function(){this.arrow1=_e.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=_e.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.arrow2)},ze.prototype.pointerDown=function(Be,qe){mt.prototype.pointerDown.call(this,Be,qe),this.state==="creating"&&this.createTips()},ze.prototype.adjustVisual=function(){if(mt.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",_e.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),_e.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Be=0;Math.abs(this.x1-this.x2)>.1&&(Be=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var qe=this.arrow1.transform.baseVal.getItem(0);qe.setRotate(Be,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(qe,0);var Qe=this.arrow2.transform.baseVal.getItem(0);Qe.setRotate(Be+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Qe,0)}},ze.prototype.setArrowType=function(Be){this.arrowType=Be,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({arrowType:this.arrowType},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be);var qe=Be;this.arrowType=qe.arrowType,this.createTips(),this.adjustVisual()},ze.typeName="ArrowMarker",ze.title="Arrow marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ze}(Je),St=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.fillColor=Qe.defaultFillColor,Ue.strokeWidth=0,Ue.fillPanel=new ee("Color",Qe.defaultColorSet,Qe.defaultFillColor),Ue.fillPanel.onColorChanged=Ue.setFillColor,Ue}return me(ze,mt),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=mt.prototype.getState.call(this);return Be.typeName=ze.typeName,Be},ze.typeName="CoverMarker",ze.title="Cover marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ze}(we),ct=function(mt){function ze(Be,qe,Qe,Ue){var Xe=mt.call(this,Be,Ue||'<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 Xe.opacities=[],Xe.opacityBoxes=[],Xe.opacities=qe,Xe.currentOpacity=Qe,Xe.setCurrentOpacity=Xe.setCurrentOpacity.bind(Xe),Xe}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,qe=document.createElement("div");return qe.style.display="flex",qe.style.overflow="hidden",qe.style.flexGrow="2",qe.style.justifyContent="space-between",this.opacities.forEach(function(Qe){var Ue=document.createElement("div");Ue.style.display="flex",Ue.style.alignItems="center",Ue.style.justifyContent="center",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.borderColor=Qe===Be.currentOpacity?Be.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Be.setCurrentOpacity(Qe,Ue)}),qe.appendChild(Ue);var Xe=document.createElement("div");Xe.innerText=100*Qe+"%",Ue.appendChild(Xe),Be.opacityBoxes.push(Ue)}),qe},ze.prototype.setCurrentOpacity=function(Be,qe){var Qe=this;this.currentOpacity=Be,this.opacityBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===qe?Qe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ze}(z),Bt=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.setOpacity=Ue.setOpacity.bind(Ue),Ue.fillColor=Qe.defaultHighlightColor,Ue.strokeWidth=0,Ue.opacity=Qe.defaultHighlightOpacity,Ue.fillPanel=new ee("Color",Qe.defaultColorSet,Ue.fillColor),Ue.fillPanel.onColorChanged=Ue.setFillColor,Ue.opacityPanel=new ct("Opacity",Qe.defaultOpacitySteps,Ue.opacity),Ue.opacityPanel.onOpacityChanged=Ue.setOpacity,Ue}return me(ze,mt),ze.prototype.setOpacity=function(Be){this.opacity=Be,this.visual&&_e.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=mt.prototype.getState.call(this);return Be.typeName=ze.typeName,Be},ze.typeName="HighlightMarker",ze.title="Highlight marker",ze.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>',ze}(St),ht='<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>',it='<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>',dt=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.bgColor="transparent",Ue.tipPosition={x:0,y:0},Ue.tipBase1Position={x:0,y:0},Ue.tipBase2Position={x:0,y:0},Ue.tipMoving=!1,Ue.color=Qe.defaultStrokeColor,Ue.bgColor=Qe.defaultFillColor,Ue.fontFamily=Qe.defaultFontFamily,Ue.defaultSize={x:100,y:30},Ue.setBgColor=Ue.setBgColor.bind(Ue),Ue.getTipPoints=Ue.getTipPoints.bind(Ue),Ue.positionTip=Ue.positionTip.bind(Ue),Ue.setTipPoints=Ue.setTipPoints.bind(Ue),Ue.colorPanel=new ee("Text color",Qe.defaultColorSet,Ue.color,ht),Ue.colorPanel.onColorChanged=Ue.setColor,Ue.bgColorPanel=new ee("Fill color",Qe.defaultColorSet,Ue.bgColor,it),Ue.bgColorPanel.onColorChanged=Ue.setBgColor,Ue.fontFamilyPanel=new We("Font",Qe.defaultFontFamilies,Qe.defaultFontFamily),Ue.fontFamilyPanel.onFontChanged=Ue.setFont,Ue.tipGrip=new se,Ue.tipGrip.visual.transform.baseVal.appendItem(_e.createTransform()),Ue.controlBox.appendChild(Ue.tipGrip.visual),Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return mt.prototype.ownsTarget.call(this,Be)||this.tipGrip.ownsTarget(Be)||this.tip===Be},ze.prototype.createTip=function(){_e.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=_e.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ze.prototype.pointerDown=function(Be,qe){this.state==="new"&&mt.prototype.pointerDown.call(this,Be,qe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(qe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):mt.prototype.pointerDown.call(this,Be,qe)},ze.prototype.pointerUp=function(Be){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,mt.prototype.pointerUp.call(this,Be);else{var qe=this.state==="creating";mt.prototype.pointerUp.call(this,Be),this.setTipPoints(qe),this.positionTip()}},ze.prototype.manipulate=function(Be){if(this.tipMoving){var qe=this.unrotatePoint(Be);this.tipPosition={x:qe.x-this.manipulationStartLeft,y:qe.y-this.manipulationStartTop},this.positionTip()}else mt.prototype.manipulate.call(this,Be)},ze.prototype.setBgColor=function(Be){this.bgRectangle&&this.tip&&(_e.setAttributes(this.bgRectangle,[["fill",Be]]),_e.setAttributes(this.tip,[["fill",Be]])),this.bgColor=Be,this.fillColorChanged(Be)},ze.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},ze.prototype.setTipPoints=function(Be){Be===void 0&&(Be=!1);var qe=Math.min(this.height/2,15),Qe=this.height/5;Be&&(this.tipPosition={x:qe+Qe/2,y:this.height+20});var Ue=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ue<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Qe=this.width/5,qe=Math.min(this.width/2,15),this.tipBase1Position={x:qe,y:0},this.tipBase2Position={x:qe+Qe,y:0}):(this.tipBase1Position={x:0,y:qe},this.tipBase2Position={x:0,y:qe+Qe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ue<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Qe=this.width/5,qe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-qe-Qe,y:0},this.tipBase2Position={x:this.width-qe,y:0}):(this.tipBase1Position={x:this.width,y:qe},this.tipBase2Position={x:this.width,y:qe+Qe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ue<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Qe=this.width/5,qe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-qe-Qe,y:this.height},this.tipBase2Position={x:this.width-qe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-qe-Qe},this.tipBase2Position={x:this.width,y:this.height-qe}):Ue<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Qe=this.width/5,qe=Math.min(this.width/2,15),this.tipBase1Position={x:qe,y:this.height},this.tipBase2Position={x:qe+Qe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-qe},this.tipBase2Position={x:0,y:this.height-qe-Qe})},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),this.positionTip()},ze.prototype.positionTip=function(){_e.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Be=this.tipGrip.visual.transform.baseVal.getItem(0);Be.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Be,0)},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ze.prototype.select=function(){this.positionTip(),mt.prototype.select.call(this)},ze.prototype.getState=function(){var Be=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){var qe=Be;this.bgColor=qe.bgColor,this.tipPosition=qe.tipPosition,mt.prototype.restoreState.call(this,Be),this.createTip(),this.setTipPoints()},ze.prototype.scale=function(Be,qe){mt.prototype.scale.call(this,Be,qe),this.tipPosition={x:this.tipPosition.x*Be,y:this.tipPosition.y*qe},this.positionTip()},ze.typeName="CalloutMarker",ze.title="Callout marker",ze.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>',ze}(gt),yt=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.fillColor="transparent",Ue.strokeColor="transparent",Ue.strokeWidth=0,Ue.strokeDasharray="",Ue.opacity=1,Ue.strokeColor=Qe.defaultColor,Ue.strokeWidth=Qe.defaultStrokeWidth,Ue.strokeDasharray=Qe.defaultStrokeDasharray,Ue.fillColor=Qe.defaultFillColor,Ue.setStrokeColor=Ue.setStrokeColor.bind(Ue),Ue.setFillColor=Ue.setFillColor.bind(Ue),Ue.setStrokeWidth=Ue.setStrokeWidth.bind(Ue),Ue.setStrokeDasharray=Ue.setStrokeDasharray.bind(Ue),Ue.setOpacity=Ue.setOpacity.bind(Ue),Ue.createVisual=Ue.createVisual.bind(Ue),Ue.strokePanel=new ee("Line color",Ce(Qe.defaultColorSet,["transparent"]),Qe.defaultColor),Ue.strokePanel.onColorChanged=Ue.setStrokeColor,Ue.fillPanel=new ee("Fill color",Ce(Qe.defaultColorSet,["transparent"]),Ue.fillColor,it),Ue.fillPanel.onColorChanged=Ue.setFillColor,Ue.strokeWidthPanel=new be("Line width",Qe.defaultStrokeWidths,Qe.defaultStrokeWidth),Ue.strokeWidthPanel.onWidthChanged=Ue.setStrokeWidth,Ue.strokeStylePanel=new ke("Line style",Qe.defaultStrokeDasharrays,Qe.defaultStrokeDasharray),Ue.strokeStylePanel.onStyleChanged=Ue.setStrokeDasharray,Ue.opacityPanel=new ct("Opacity",Qe.defaultOpacitySteps,Ue.opacity),Ue.opacityPanel.onOpacityChanged=Ue.setOpacity,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual)},ze.prototype.createVisual=function(){this.visual=_e.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},ze.prototype.pointerDown=function(Be,qe){mt.prototype.pointerDown.call(this,Be,qe),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},ze.prototype.manipulate=function(Be){mt.prototype.manipulate.call(this,Be)},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),this.setSize()},ze.prototype.setSize=function(){mt.prototype.setSize.call(this),_e.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ze.prototype.pointerUp=function(Be){mt.prototype.pointerUp.call(this,Be),this.setSize()},ze.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.visual&&_e.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},ze.prototype.setFillColor=function(Be){this.fillColor=Be,this.visual&&_e.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Be),this.stateChanged()},ze.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.visual&&_e.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ze.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.visual&&_e.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ze.prototype.setOpacity=function(Be){this.opacity=Be,this.visual&&_e.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){var qe=Be;this.fillColor=qe.fillColor,this.strokeColor=qe.strokeColor,this.strokeWidth=qe.strokeWidth,this.strokeDasharray=qe.strokeDasharray,this.opacity=qe.opacity,this.createVisual(),mt.prototype.restoreState.call(this,Be),this.setSize()},ze.prototype.scale=function(Be,qe){mt.prototype.scale.call(this,Be,qe),this.setSize()},ze.typeName="EllipseMarker",ze.title="Ellipse marker",ze.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>',ze}(ye),Et=function(mt){function ze(Be,qe,Qe){return mt.call(this,Be,qe,Qe)||this}return me(ze,mt),Object.defineProperty(ze.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.tip1&&Be!==this.tip2)},ze.prototype.createTips=function(){this.tip1=_e.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.tip1),this.tip2=_e.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.tip2)},ze.prototype.pointerDown=function(Be,qe){mt.prototype.pointerDown.call(this,Be,qe),this.state==="creating"&&this.createTips()},ze.prototype.adjustVisual=function(){if(mt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(_e.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Be=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),qe=this.tip1.transform.baseVal.getItem(0);qe.setRotate(Be,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(qe,0);var Qe=this.tip2.transform.baseVal.getItem(0);Qe.setRotate(Be+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Qe,0)}},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=mt.prototype.getState.call(this);return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be),this.createTips(),this.adjustVisual()},ze.typeName="MeasurementMarker",ze.title="Measurement marker",ze.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>',ze}(Je),vt=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.strokePanel.colors=Qe.defaultColorSet,Ue.fillColor="transparent",Ue}return me(ze,mt),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=mt.prototype.getState.call(this);return Be.typeName=ze.typeName,Be},ze.typeName="EllipseFrameMarker",ze.title="Ellipse frame marker",ze.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>',ze}(yt),Rt=function(){function mt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(mt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),mt.prototype.addUndoStep=function(ze){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ze)||(this.undoStack.push(ze),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ze)&&this.redoStack.splice(0,this.redoStack.length))},mt.prototype.replaceLastUndoStep=function(ze){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ze)},mt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},mt.prototype.undo=function(){if(this.undoStack.length>1){var ze=this.undoStack.pop();return ze!==void 0&&this.redoStack.push(ze),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},mt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},mt}(),jt=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.strokeColor="transparent",Ue.strokeWidth=0,Ue.strokeDasharray="",Ue.curveX=0,Ue.curveY=0,Ue.manipulationStartCurveX=0,Ue.manipulationStartCurveY=0,Ue.setStrokeColor=Ue.setStrokeColor.bind(Ue),Ue.setStrokeWidth=Ue.setStrokeWidth.bind(Ue),Ue.setStrokeDasharray=Ue.setStrokeDasharray.bind(Ue),Ue.positionGrips=Ue.positionGrips.bind(Ue),Ue.addControlGrips=Ue.addControlGrips.bind(Ue),Ue.adjustVisual=Ue.adjustVisual.bind(Ue),Ue.setupControlBox=Ue.setupControlBox.bind(Ue),Ue.resize=Ue.resize.bind(Ue),Ue.strokeColor=Qe.defaultColor,Ue.strokeWidth=Qe.defaultStrokeWidth,Ue.strokeDasharray=Qe.defaultStrokeDasharray,Ue.strokePanel=new ee("Line color",Qe.defaultColorSet,Qe.defaultColor),Ue.strokePanel.onColorChanged=Ue.setStrokeColor,Ue.strokeWidthPanel=new be("Line width",Qe.defaultStrokeWidths,Qe.defaultStrokeWidth),Ue.strokeWidthPanel.onWidthChanged=Ue.setStrokeWidth,Ue.strokeStylePanel=new ke("Line style",Qe.defaultStrokeDasharrays,Qe.defaultStrokeDasharray),Ue.strokeStylePanel.onStyleChanged=Ue.setStrokeDasharray,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.selectorCurve&&Be!==this.visibleCurve&&!this.curveGrip.ownsTarget(Be))},ze.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ze.prototype.createVisual=function(){this.visual=_e.createGroup(),this.selectorCurve=_e.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=_e.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},ze.prototype.pointerDown=function(Be,qe){mt.prototype.pointerDown.call(this,Be,qe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Be.x,this.curveY=Be.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(qe)&&(this.activeGrip=this.curveGrip,this._state="resize")},ze.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),_e.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),_e.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ze.prototype.setupControlBox=function(){mt.prototype.setupControlBox.call(this),this.curveControlLine1=_e.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=_e.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},ze.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,mt.prototype.addControlGrips.call(this)},ze.prototype.positionGrips=function(){mt.prototype.positionGrips.call(this);var Be=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Be/2,this.curveY-Be/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()))},ze.prototype.manipulate=function(Be){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Be.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Be.y-this.manipulationStartY),mt.prototype.manipulate.call(this,Be)},ze.prototype.resize=function(Be){this.activeGrip===this.curveGrip&&(this.curveX=Be.x,this.curveY=Be.y),mt.prototype.resize.call(this,Be),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ze.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.adjustVisual(),this.colorChanged(Be)},ze.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.adjustVisual()},ze.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.adjustVisual()},ze.prototype.scale=function(Be,qe){this.curveX=this.curveX*Be,this.curveY=this.curveY*qe,mt.prototype.scale.call(this,Be,qe)},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be);var qe=Be;this.strokeColor=qe.strokeColor,this.strokeWidth=qe.strokeWidth,this.strokeDasharray=qe.strokeDasharray,this.curveX=qe.curveX,this.curveY=qe.curveY,this.createVisual(),this.adjustVisual()},ze.typeName="CurveMarker",ze.title="Curve marker",ze.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>',ze}(Ve),un=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,qe,Qe)||this;return Ue.fillColor="transparent",Ue.strokeColor="transparent",Ue.strokeWidth=0,Ue.strokeDasharray="",Ue.textColor="transparent",Ue.fontSize="1rem",Ue.isMoved=!1,Ue.captionText="Caption",Ue.PADDING=5,Ue.captionBoxWidth=0,Ue.captionBoxHeight=0,Ue.strokeColor=Qe.defaultColor,Ue.strokeWidth=Qe.defaultStrokeWidth,Ue.strokeDasharray=Qe.defaultStrokeDasharray,Ue.fillColor=Qe.defaultFillColor,Ue.textColor=Qe.defaultStrokeColor,Ue.fontFamily=Qe.defaultFontFamily,Ue.fontSize=Qe.defaultCaptionFontSize,Ue.captionText=Qe.defaultCaptionText,Ue.setStrokeColor=Ue.setStrokeColor.bind(Ue),Ue.setFillColor=Ue.setFillColor.bind(Ue),Ue.setStrokeWidth=Ue.setStrokeWidth.bind(Ue),Ue.setStrokeDasharray=Ue.setStrokeDasharray.bind(Ue),Ue.createVisual=Ue.createVisual.bind(Ue),Ue.sizeCaption=Ue.sizeCaption.bind(Ue),Ue.setCaptionText=Ue.setCaptionText.bind(Ue),Ue.showTextEditor=Ue.showTextEditor.bind(Ue),Ue.positionTextEditor=Ue.positionTextEditor.bind(Ue),Ue.finishTextEditing=Ue.finishTextEditing.bind(Ue),Ue.setFont=Ue.setFont.bind(Ue),Ue.setTextColor=Ue.setTextColor.bind(Ue),Ue.strokePanel=new ee("Line color",Ce(Qe.defaultColorSet,["transparent"]),Ue.strokeColor),Ue.strokePanel.onColorChanged=Ue.setStrokeColor,Ue.fillPanel=new ee("Fill color",Ce(Qe.defaultColorSet,["transparent"]),Ue.fillColor,it),Ue.fillPanel.onColorChanged=Ue.setFillColor,Ue.strokeWidthPanel=new be("Line width",Qe.defaultStrokeWidths,Qe.defaultStrokeWidth),Ue.strokeWidthPanel.onWidthChanged=Ue.setStrokeWidth,Ue.strokeStylePanel=new ke("Line style",Qe.defaultStrokeDasharrays,Qe.defaultStrokeDasharray),Ue.strokeStylePanel.onStyleChanged=Ue.setStrokeDasharray,Ue.fontFamilyPanel=new We("Font",Qe.defaultFontFamilies,Qe.defaultFontFamily),Ue.fontFamilyPanel.onFontChanged=Ue.setFont,Ue.textColorPanel=new ee("Text color",Qe.defaultColorSet,Ue.textColor,ht),Ue.textColorPanel.onColorChanged=Ue.setTextColor,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.frame&&Be!==this.captionBg&&Be!==this.captionElement)},ze.prototype.createVisual=function(){this.visual=_e.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=_e.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=_e.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=_e.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},ze.prototype.setCaptionText=function(Be){this.captionText=Be,this.captionElement.textContent=this.captionText,this.sizeCaption()},ze.prototype.pointerDown=function(Be,qe){mt.prototype.pointerDown.call(this,Be,qe),this.isMoved=!1,this.pointerDownPoint=Be,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},ze.prototype.manipulate=function(Be){mt.prototype.manipulate.call(this,Be),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Be.x-this.pointerDownPoint.x)>5||Math.abs(Be.y-this.pointerDownPoint.y)>5)},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),this.setSize()},ze.prototype.sizeCaption=function(){var Be=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Be.width+2*this.PADDING,this.captionBoxHeight=Be.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),_e.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),_e.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},ze.prototype.showTextEditor=function(){var Be=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(qe){qe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(qe){qe.key==="Enter"&&Be.finishTextEditing(Be.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(qe){qe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Be.finishTextEditing(Be.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Be.finishTextEditing(Be.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ze.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"))},ze.prototype.finishTextEditing=function(Be){this.setCaptionText(Be.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ze.prototype.setFont=function(Be){this.captionElement&&_e.setAttributes(this.captionElement,[["font-family",Be]]),this.fontFamily=Be,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ze.prototype.setTextColor=function(Be){this.captionElement&&_e.setAttributes(this.captionElement,[["fill",Be]]),this.textColor=Be,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ze.prototype.setSize=function(){mt.prototype.setSize.call(this),_e.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ze.prototype.pointerUp=function(Be){mt.prototype.pointerUp.call(this,Be),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ze.prototype.dblClick=function(Be,qe){mt.prototype.dblClick.call(this,Be,qe),this.showTextEditor()},ze.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.frame&&_e.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},ze.prototype.setFillColor=function(Be){this.fillColor=Be,this.captionBg&&_e.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Be),this.stateChanged()},ze.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.frame&&_e.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ze.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.frame&&_e.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=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},mt.prototype.getState.call(this));return Be.typeName=this.typeName,Be},ze.prototype.restoreState=function(Be){var qe=Be;this.fillColor=qe.fillColor,this.strokeColor=qe.strokeColor,this.strokeWidth=qe.strokeWidth,this.strokeDasharray=qe.strokeDasharray,this.textColor=qe.textColor,this.fontFamily=qe.fontFamily,this.captionText=qe.captionText,this.fontSize=qe.fontSize,this.createVisual(),mt.prototype.restoreState.call(this,Be),this.setSize()},ze.prototype.scale=function(Be,qe){mt.prototype.scale.call(this,Be,qe),this.setSize()},ze.typeName="CaptionFrameMarker",ze.title="Caption frame marker",ze.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>',ze}(ye),Vt=function(){function mt(ze,Be){Be===void 0&&(Be=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ze,this.cancelable=Be}return Object.defineProperty(mt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),mt.prototype.preventDefault=function(){this._defaultPrevented=!0},mt}(),xn=function(mt){function ze(Be,qe,Qe){var Ue=mt.call(this,Be,!1)||this;return Ue.dataUrl=qe,Ue.state=Qe,Ue}return me(ze,mt),ze}(Vt),Ut=function(mt){function ze(Be,qe,Qe){Qe===void 0&&(Qe=!1);var Ue=mt.call(this,Be,Qe)||this;return Ue.marker=qe,Ue}return me(ze,mt),ze}(Vt),Zt=function(){function mt(){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 mt.prototype.addEventListener=function(ze,Be){this[ze].push(Be)},mt.prototype.removeEventListener=function(ze,Be){var qe=this[ze].indexOf(Be);qe>-1&&this[ze].splice(qe,1)},mt}(),Xt=function(){function mt(ze){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new je,this._isOpen=!1,this.undoRedoManager=new Rt,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 Zt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=mt.instanceCounter++,this.styles=new ge(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ze,this.targetRoot=document.body,this.width=ze.clientWidth,this.height=ze.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(mt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ne,ut,rt,gt,vt,yt,Bt,dt,Et,St,Je,jt,un]},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ne,ut,rt,gt,yt,Bt,dt]},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ne,ut,rt,gt,Bt]},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ze){var Be=this;this._availableMarkerTypes.splice(0),ze.forEach(function(qe){if(typeof qe=="string"){var Qe=Be.ALL_MARKER_TYPES.find(function(Ue){return Ue.typeName===qe});Qe!==void 0&&Be._availableMarkerTypes.push(Qe)}else Be._availableMarkerTypes.push(qe)})},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ze){this._zoomLevel=ze,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(mt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),mt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),he.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},mt.prototype.show=function(){var ze=this;this.styles.styleSheetRoot===void 0&&xe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=xe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Be){return Be(new Vt(ze))})},mt.prototype.render=function(){return Ie(this,void 0,void 0,function(){var ze;return Te(this,function(Be){switch(Be.label){case 0:return this.setCurrentMarker(),(ze=new Se).naturalSize=this.renderAtNaturalSize,ze.imageType=this.renderImageType,ze.imageQuality=this.renderImageQuality,ze.markersOnly=this.renderMarkersOnly,ze.width=this.renderWidth,ze.height=this.renderHeight,[4,ze.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Be.sent(),[4,ze.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Be.sent()]}})})},mt.prototype.close=function(ze){var Be=this;if(ze===void 0&&(ze=!1),this.isOpen){var qe=!1;ze||this.eventListeners.beforeclose.forEach(function(Qe){var Ue=new Vt(Be,!0);Qe(Ue),Ue.defaultPrevented&&(qe=!0)}),qe||(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(Qe){return Qe(new Vt(Be))}),this.detachEvents(),this._isOpen=!1)}},mt.prototype.addMarkersToToolbar=function(){for(var ze,Be=[],qe=0;qe<arguments.length;qe++)Be[qe]=arguments[qe];(ze=this._availableMarkerTypes).push.apply(ze,Be)},mt.prototype.addRenderEventListener=function(ze){this.addEventListener("render",function(Be){ze(Be.dataUrl,Be.state)})},mt.prototype.removeRenderEventListener=function(ze){},mt.prototype.addCloseEventListener=function(ze){this.addEventListener("close",function(){ze()})},mt.prototype.removeCloseEventListener=function(ze){},mt.prototype.setupResizeObserver=function(){var ze=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ze.resize(ze.target.clientWidth,ze.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ze.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},mt.prototype.onPopupTargetResize=function(){var ze=1*this.target.clientWidth/this.target.clientHeight,Be=this.editorCanvas.clientWidth/ze>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ze:this.editorCanvas.clientWidth,qe=Be<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ze;this.resize(Be,qe)},mt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},mt.prototype.resize=function(ze,Be){this._isResizing=!0;var qe=ze/this.imageWidth,Qe=Be/this.imageHeight;this.imageWidth=Math.round(ze),this.imageHeight=Math.round(Be),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(qe,Qe),this._isResizing=!1},mt.prototype.scaleMarkers=function(ze,Be){var qe,Qe=this;this._currentMarker&&this._currentMarker instanceof gt?this._currentMarker.scale(ze,Be):(qe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ue){Ue!==Qe._currentMarker&&Ue.scale(ze,Be)}),qe!==void 0&&this.setCurrentMarker(qe)},mt.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"},mt.prototype.setTopLeft=function(){var ze=this.editingTarget.getBoundingClientRect(),Be=this.editorCanvas.getBoundingClientRect();this.left=ze.left-Be.left,this.top=ze.top-Be.top},mt.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)},mt.prototype.addDefs=function(){for(var ze,Be=[],qe=0;qe<arguments.length;qe++)Be[qe]=arguments[qe];this.defs=_e.createDefs(),this.addDefsToImage(),(ze=this.defs).append.apply(ze,Be)},mt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},mt.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)},mt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},mt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},mt.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)},mt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},mt.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)},mt.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 ze=document.createElement("a");ze.href="https://markerjs.com/",ze.target="_blank",ze.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>',ze.title="Powered by marker.js",ze.style.display="grid",ze.style.alignItems="center",ze.style.justifyItems="center",ze.style.padding="3px",ze.style.width="20px",ze.style.height="20px",this.logoUI.appendChild(ze),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},mt.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")},mt.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"},mt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},mt.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 ze=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=ze+"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 de(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 ue(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},mt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},mt.prototype.removeMarker=function(ze){this.markerImage.removeChild(ze.container),this.markers.indexOf(ze)>-1&&this.markers.splice(this.markers.indexOf(ze),1),ze.dispose()},mt.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())},mt.prototype.toolbarButtonClicked=function(ze,Be){if(ze==="marker"&&Be!==void 0)this.createNewMarker(Be);else if(ze==="action")switch(Be){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()}},mt.prototype.deleteSelectedMarker=function(){var ze=this;if(this._currentMarker!==void 0){var Be=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Qe){var Ue=new Ut(ze,ze._currentMarker,!0);Qe(Ue),Ue.defaultPrevented&&(Be=!0)}),!Be){var qe=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(Qe){return Qe(new Ut(ze,qe))})}}},mt.prototype.clear=function(){var ze=this,Be=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Xe){var Re=new Ut(ze,void 0,!0);Xe(Re),Re.defaultPrevented&&(Be=!0)}),!Be)){this.setCurrentMarker();for(var qe=function(Xe){var Re=Qe.markers[Xe];Qe.setCurrentMarker(Qe.markers[Xe]),Qe._currentMarker.dispose(),Qe.markerImage.removeChild(Qe._currentMarker.container),Qe.markers.splice(Qe.markers.indexOf(Qe._currentMarker),1),Qe.eventListeners.markerdelete.forEach(function(Ae){return Ae(new Ut(ze,Re))})},Qe=this,Ue=this.markers.length-1;Ue>=0;Ue--)qe(Ue);this.addUndoStep()}},Object.defineProperty(mt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),mt.prototype.showNotesEditor=function(){var ze;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=(ze=this._currentMarker.notes)!==null&&ze!==void 0?ze:"",this.overlayContainer.appendChild(this.notesArea))},mt.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)},mt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},mt.prototype.addUndoStep=function(){var ze=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Be=this.getState(),qe=this.undoRedoManager.getLastUndoStep();if(!qe||qe.width===Be.width&&qe.height===Be.height){var Qe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Be),Qe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ue){return Ue(new Vt(ze))})}else this.undoRedoManager.replaceLastUndoStep(Be),this.eventListeners.statechange.forEach(function(Ue){return Ue(new Vt(ze))})}},mt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},mt.prototype.undoStep=function(){var ze=this,Be=this.undoRedoManager.undo();Be!==void 0&&(this.restoreState(Be),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(qe){return qe(new Vt(ze))}))},mt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},mt.prototype.redoStep=function(){var ze=this,Be=this.undoRedoManager.redo();Be!==void 0&&(this.restoreState(Be),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(qe){return qe(new Vt(ze))}))},mt.prototype.stepZoom=function(){var ze=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ze<this.zoomSteps.length-1?this.zoomSteps[ze+1]:this.zoomSteps[0]},mt.prototype.panTo=function(ze){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ze.x,top:this.prevPanPoint.y-ze.y}),this.prevPanPoint=ze},mt.prototype.startRenderAndClose=function(){return Ie(this,void 0,void 0,function(){var ze,Be,qe=this;return Te(this,function(Qe){switch(Qe.label){case 0:return[4,this.render()];case 1:return ze=Qe.sent(),Be=this.getState(),this.eventListeners.render.forEach(function(Ue){return Ue(new xn(qe,ze,Be))}),this.close(!0),[2]}})})},mt.prototype.getState=function(ze){ze===!0&&this.setCurrentMarker();var Be={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(qe){return Be.markers.push(qe.getState())}),Be},mt.prototype.restoreState=function(ze){var Be=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ze.markers.forEach(function(qe){var Qe=Be._availableMarkerTypes.find(function(Xe){return Xe.typeName===qe.typeName});if(Qe!==void 0){var Ue=Be.addNewMarker(Qe);Ue.restoreState(qe),Be.markers.push(Ue)}}),ze.width&&ze.height&&(ze.width!==this.imageWidth||ze.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ze.width,this.imageHeight/ze.height),this.eventListeners.restorestate.forEach(function(qe){return qe(new Vt(Be))})},mt.prototype.addNewMarker=function(ze){var Be=_e.createGroup();return this.markerImage.appendChild(Be),new ze(Be,this.overlayContainer,this.settings)},mt.prototype.createNewMarker=function(ze){var Be,qe=this;(Be=typeof ze=="string"?this._availableMarkerTypes.find(function(Qe){return Qe.typeName===ze}):ze)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Be),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(Be.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Qe){return Qe(new Ut(qe,qe._currentMarker))}))},mt.prototype.markerCreated=function(ze){var Be=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ze),this.setCurrentMarker(ze),ze instanceof ut&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ut):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(qe){return qe(new Ut(Be,Be._currentMarker))})},mt.prototype.colorChanged=function(ze){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ze,this.settings.defaultStrokeColor=ze)},mt.prototype.fillColorChanged=function(ze){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ze)},mt.prototype.markerStateChanged=function(ze){var Be=this;this.eventListeners.markerchange.forEach(function(qe){return qe(new Ut(Be,ze))})},mt.prototype.setCurrentMarker=function(ze){var Be=this;this._currentMarker!==ze&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(qe){return qe(new Ut(Be,Be._currentMarker))})),this._currentMarker=ze,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(qe){return qe(new Ut(Be,Be._currentMarker))}))},mt.prototype.onPointerDown=function(ze){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ze.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Be=this.markers.find(function(qe){return qe.ownsTarget(ze.target)});Be!==void 0?(this.setCurrentMarker(Be),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ze.clientX,ze.clientY),ze.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ze.clientX,y:ze.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ze.clientX,ze.clientY))},mt.prototype.onDblClick=function(ze){if(this._isFocused||this.focus(),this.mode==="select"){var Be=this.markers.find(function(qe){return qe.ownsTarget(ze.target)});Be!==void 0&&Be!==this._currentMarker&&this.setCurrentMarker(Be),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ze.clientX,ze.clientY),ze.target):this.setCurrentMarker()}},mt.prototype.onPointerMove=function(ze){this.touchPoints!==1&&ze.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ze.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ze.clientX,ze.clientY)):this.zoomLevel>1&&this.panTo({x:ze.clientX,y:ze.clientY}))},mt.prototype.onPointerUp=function(ze){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ze.clientX,ze.clientY)),this.isDragging=!1,this.addUndoStep()},mt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},mt.prototype.onKeyUp=function(ze){this._currentMarker===void 0||this.notesArea!==void 0||ze.key!=="Delete"&&ze.key!=="Backspace"||this.deleteSelectedMarker()},mt.prototype.clientToLocalCoordinates=function(ze,Be){var qe=this.markerImage.getBoundingClientRect();return{x:(ze-qe.left)/this.zoomLevel,y:(Be-qe.top)/this.zoomLevel}},mt.prototype.onWindowResize=function(){this.positionUI()},mt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ze=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ze+"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()},mt.prototype.addLicenseKey=function(ze){he.addKey(ze)},mt.prototype.addEventListener=function(ze,Be){this.eventListeners.addEventListener(ze,Be)},mt.prototype.removeEventListener=function(ze,Be){this.eventListeners.removeEventListener(ze,Be)},mt.prototype.renderState=function(ze){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ze),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(mt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),mt.prototype.focus=function(){var ze=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Be){return Be(new Vt(ze))}))},mt.prototype.blur=function(){var ze=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Be){return Be(new Vt(ze))}))},mt.instanceCounter=0,mt}()},17115:function(Pn,qt,Ee){"use strict";Ee.d(qt,{ZP:function(){return he}});var Le=Ee(33606),me=Ee(59301),Ie=Ee(47273),Te=0,Ce=(0,Ie.Z)();function _e(){var Se;return Ce?(Se=Te,Te+=1):Se="TEST_OR_SSR",Se}function he(Se){var xe=me.useState(),ge=(0,Le.Z)(xe,2),ce=ge[0],ve=ge[1];return me.useEffect(function(){ve("rc_select_".concat(_e()))},[]),Se||ce}},77861:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Ac:function(){return xt},Xo:function(){return Ci},Wx:function(){return tr},ZP:function(){return At},lk:function(){return ye}});var Le=Ee(92413),me=Ee(26407),Ie=Ee(400),Te=Ee(33708),Ce=Ee(33606),_e=Ee(37061),he=Ee(39559),Se=Ee(18929),xe=Ee(48736),ge=Ee(59301),ce=Ee(92310),ve=Ee.n(ce),de=Ee(34280),ue=Ee(49658),z=Ee(10228),ee=Ee(8654),oe=function(Ct){var dn=Ct.className,_n=Ct.customizeIcon,zn=Ct.customizeIconProps,wn=Ct.onMouseDown,Ft=Ct.onClick,$t=Ct.children,bn;return typeof _n=="function"?bn=_n(zn):bn=_n,ge.createElement("span",{className:dn,onMouseDown:function(Gt){Gt.preventDefault(),wn&&wn(Gt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Ft,"aria-hidden":!0},bn!==void 0?bn:ge.createElement("span",{className:ve()(dn.split(/\s+/).map(function(An){return"".concat(An,"-icon")}))},$t))},ie=oe;function se(kt,Ct,dn,_n,zn){var wn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Ft=arguments.length>6?arguments[6]:void 0,$t=arguments.length>7?arguments[7]:void 0,bn=ge.useMemo(function(){if((0,he.Z)(_n)==="object")return _n.clearIcon;if(zn)return zn},[_n,zn]),An=ge.useMemo(function(){return!!(!wn&&_n&&(dn.length||Ft)&&!($t==="combobox"&&Ft===""))},[_n,wn,dn.length,Ft,$t]);return{allowClear:An,clearIcon:ge.createElement(ie,{className:"".concat(kt,"-clear"),onMouseDown:Ct,customizeIcon:bn},"\xD7")}}var le=ge.createContext(null);function ye(){return ge.useContext(le)}function we(){var kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ct=ge.useState(!1),dn=(0,Ce.Z)(Ct,2),_n=dn[0],zn=dn[1],wn=ge.useRef(null),Ft=function(){window.clearTimeout(wn.current)};ge.useEffect(function(){return Ft},[]);var $t=function(An,Gt){Ft(),wn.current=window.setTimeout(function(){zn(An),Gt&&Gt()},kt)};return[_n,$t,Ft]}function be(){var kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ct=ge.useRef(null),dn=ge.useRef(null);ge.useEffect(function(){return function(){window.clearTimeout(dn.current)}},[]);function _n(zn){(zn||Ct.current===null)&&(Ct.current=zn),window.clearTimeout(dn.current),dn.current=window.setTimeout(function(){Ct.current=null},kt)}return[function(){return Ct.current},_n]}function ke(kt,Ct,dn,_n){var zn=ge.useRef(null);zn.current={open:Ct,triggerOpen:dn,customizedTrigger:_n},ge.useEffect(function(){function wn(Ft){var $t;if(!(($t=zn.current)!==null&&$t!==void 0&&$t.customizedTrigger)){var bn=Ft.target;bn.shadowRoot&&Ft.composed&&(bn=Ft.composedPath()[0]||bn),zn.current.open&&kt().filter(function(An){return An}).every(function(An){return!An.contains(bn)&&An!==bn})&&zn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",wn),function(){return window.removeEventListener("mousedown",wn)}},[])}var Ne=Ee(26112),je=Ee(11780),Ve=function(Ct,dn){var _n,zn,wn=Ct.prefixCls,Ft=Ct.id,$t=Ct.inputElement,bn=Ct.disabled,An=Ct.tabIndex,Gt=Ct.autoFocus,sn=Ct.autoComplete,Bn=Ct.editable,Nn=Ct.activeDescendantId,qn=Ct.value,Gn=Ct.maxLength,Jn=Ct.onKeyDown,Dn=Ct.onMouseDown,ri=Ct.onChange,Mi=Ct.onPaste,Hn=Ct.onCompositionStart,oi=Ct.onCompositionEnd,Bi=Ct.open,lr=Ct.attrs,Ai=$t||ge.createElement("input",null),an=Ai,si=an.ref,wi=an.props,pi=wi.onKeyDown,Wi=wi.onChange,Ni=wi.onMouseDown,hr=wi.onCompositionStart,Fi=wi.onCompositionEnd,Ki=wi.style;return(0,xe.Kp)(!("maxLength"in Ai.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ai=ge.cloneElement(Ai,(0,Te.Z)((0,Te.Z)((0,Te.Z)({type:"search"},wi),{},{id:Ft,ref:(0,ee.sQ)(dn,si),disabled:bn,tabIndex:An,autoComplete:sn||"off",autoFocus:Gt,className:ve()("".concat(wn,"-selection-search-input"),(_n=Ai)===null||_n===void 0||(zn=_n.props)===null||zn===void 0?void 0:zn.className),role:"combobox","aria-label":"Search","aria-expanded":Bi||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ft,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ft,"_list"),"aria-activedescendant":Bi?Nn:void 0},lr),{},{value:Bn?qn:"",maxLength:Gn,readOnly:!Bn,unselectable:Bn?null:"on",style:(0,Te.Z)((0,Te.Z)({},Ki),{},{opacity:Bn?null:0}),onKeyDown:function(On){Jn(On),pi&&pi(On)},onMouseDown:function(On){Dn(On),Ni&&Ni(On)},onChange:function(On){ri(On),Wi&&Wi(On)},onCompositionStart:function(On){Hn(On),hr&&hr(On)},onCompositionEnd:function(On){oi(On),Fi&&Fi(On)},onPaste:Mi})),Ai},Je=ge.forwardRef(Ve);Je.displayName="Input";var We=Je;function gt(kt){return Array.isArray(kt)?kt:kt!==void 0?[kt]:[]}var ut=typeof window!="undefined"&&window.document&&window.document.documentElement,bt=ut;function rt(kt){return kt!=null}function St(kt){return!kt&&kt!==0}function ct(kt){return["string","number"].includes((0,he.Z)(kt))}function Bt(kt){var Ct=void 0;return kt&&(ct(kt.title)?Ct=kt.title.toString():ct(kt.label)&&(Ct=kt.label.toString())),Ct}function ht(kt,Ct){bt?ge.useLayoutEffect(kt,Ct):ge.useEffect(kt,Ct)}function it(kt){var Ct;return(Ct=kt.key)!==null&&Ct!==void 0?Ct:kt.value}var dt=function(Ct){Ct.preventDefault(),Ct.stopPropagation()},yt=function(Ct){var dn=Ct.id,_n=Ct.prefixCls,zn=Ct.values,wn=Ct.open,Ft=Ct.searchValue,$t=Ct.autoClearSearchValue,bn=Ct.inputRef,An=Ct.placeholder,Gt=Ct.disabled,sn=Ct.mode,Bn=Ct.showSearch,Nn=Ct.autoFocus,qn=Ct.autoComplete,Gn=Ct.activeDescendantId,Jn=Ct.tabIndex,Dn=Ct.removeIcon,ri=Ct.maxTagCount,Mi=Ct.maxTagTextLength,Hn=Ct.maxTagPlaceholder,oi=Hn===void 0?function(xr){return"+ ".concat(xr.length," ...")}:Hn,Bi=Ct.tagRender,lr=Ct.onToggleOpen,Ai=Ct.onRemove,an=Ct.onInputChange,si=Ct.onInputPaste,wi=Ct.onInputKeyDown,pi=Ct.onInputMouseDown,Wi=Ct.onInputCompositionStart,Ni=Ct.onInputCompositionEnd,hr=ge.useRef(null),Fi=(0,ge.useState)(0),Ki=(0,Ce.Z)(Fi,2),_r=Ki[0],On=Ki[1],Jr=(0,ge.useState)(!1),In=(0,Ce.Z)(Jr,2),Sr=In[0],fo=In[1],Pr="".concat(_n,"-selection"),Do=wn||sn==="multiple"&&$t===!1||sn==="tags"?Ft:"",ro=sn==="tags"||sn==="multiple"&&$t===!1||Bn&&(wn||Sr);ht(function(){On(hr.current.scrollWidth)},[Do]);function Yi(xr,Po,Wo,Co,qo){return ge.createElement("span",{className:ve()("".concat(Pr,"-item"),(0,Ie.Z)({},"".concat(Pr,"-item-disabled"),Wo)),title:Bt(xr)},ge.createElement("span",{className:"".concat(Pr,"-item-content")},Po),Co&&ge.createElement(ie,{className:"".concat(Pr,"-item-remove"),onMouseDown:dt,onClick:qo,customizeIcon:Dn},"\xD7"))}function er(xr,Po,Wo,Co,qo){var Zo=function(vr){dt(vr),lr(!wn)};return ge.createElement("span",{onMouseDown:Zo},Bi({label:Po,value:xr,disabled:Wo,closable:Co,onClose:qo}))}function dr(xr){var Po=xr.disabled,Wo=xr.label,Co=xr.value,qo=!Gt&&!Po,Zo=Wo;if(typeof Mi=="number"&&(typeof Wo=="string"||typeof Wo=="number")){var wr=String(Zo);wr.length>Mi&&(Zo="".concat(wr.slice(0,Mi),"..."))}var vr=function(Qr){Qr&&Qr.stopPropagation(),Ai(xr)};return typeof Bi=="function"?er(Co,Zo,Po,qo,vr):Yi(xr,Zo,Po,qo,vr)}function Tr(xr){var Po=typeof oi=="function"?oi(xr):oi;return Yi({title:Po},Po,!1)}var hi=ge.createElement("div",{className:"".concat(Pr,"-search"),style:{width:_r},onFocus:function(){fo(!0)},onBlur:function(){fo(!1)}},ge.createElement(We,{ref:bn,open:wn,prefixCls:_n,id:dn,inputElement:null,disabled:Gt,autoFocus:Nn,autoComplete:qn,editable:ro,activeDescendantId:Gn,value:Do,onKeyDown:wi,onMouseDown:pi,onChange:an,onPaste:si,onCompositionStart:Wi,onCompositionEnd:Ni,tabIndex:Jn,attrs:(0,Ne.Z)(Ct,!0)}),ge.createElement("span",{ref:hr,className:"".concat(Pr,"-search-mirror"),"aria-hidden":!0},Do,"\xA0")),Tt=ge.createElement(je.Z,{prefixCls:"".concat(Pr,"-overflow"),data:zn,renderItem:dr,renderRest:Tr,suffix:hi,itemKey:it,maxCount:ri});return ge.createElement(ge.Fragment,null,Tt,!zn.length&&!Do&&ge.createElement("span",{className:"".concat(Pr,"-placeholder")},An))},Et=yt,vt=function(Ct){var dn=Ct.inputElement,_n=Ct.prefixCls,zn=Ct.id,wn=Ct.inputRef,Ft=Ct.disabled,$t=Ct.autoFocus,bn=Ct.autoComplete,An=Ct.activeDescendantId,Gt=Ct.mode,sn=Ct.open,Bn=Ct.values,Nn=Ct.placeholder,qn=Ct.tabIndex,Gn=Ct.showSearch,Jn=Ct.searchValue,Dn=Ct.activeValue,ri=Ct.maxLength,Mi=Ct.onInputKeyDown,Hn=Ct.onInputMouseDown,oi=Ct.onInputChange,Bi=Ct.onInputPaste,lr=Ct.onInputCompositionStart,Ai=Ct.onInputCompositionEnd,an=Ct.title,si=ge.useState(!1),wi=(0,Ce.Z)(si,2),pi=wi[0],Wi=wi[1],Ni=Gt==="combobox",hr=Ni||Gn,Fi=Bn[0],Ki=Jn||"";Ni&&Dn&&!pi&&(Ki=Dn),ge.useEffect(function(){Ni&&Wi(!1)},[Ni,Dn]);var _r=Gt!=="combobox"&&!sn&&!Gn?!1:!!Ki,On=an===void 0?Bt(Fi):an,Jr=function(){if(Fi)return null;var Sr=_r?{visibility:"hidden"}:void 0;return ge.createElement("span",{className:"".concat(_n,"-selection-placeholder"),style:Sr},Nn)};return ge.createElement(ge.Fragment,null,ge.createElement("span",{className:"".concat(_n,"-selection-search")},ge.createElement(We,{ref:wn,prefixCls:_n,id:zn,open:sn,inputElement:dn,disabled:Ft,autoFocus:$t,autoComplete:bn,editable:hr,activeDescendantId:An,value:Ki,onKeyDown:Mi,onMouseDown:Hn,onChange:function(Sr){Wi(!0),oi(Sr)},onPaste:Bi,onCompositionStart:lr,onCompositionEnd:Ai,tabIndex:qn,attrs:(0,Ne.Z)(Ct,!0),maxLength:Ni?ri:void 0})),!Ni&&Fi?ge.createElement("span",{className:"".concat(_n,"-selection-item"),title:On,style:_r?{visibility:"hidden"}:void 0},Fi.label):null,Jr())},Rt=vt;function jt(kt){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(kt)}var un=function(Ct,dn){var _n=(0,ge.useRef)(null),zn=(0,ge.useRef)(!1),wn=Ct.prefixCls,Ft=Ct.open,$t=Ct.mode,bn=Ct.showSearch,An=Ct.tokenWithEnter,Gt=Ct.autoClearSearchValue,sn=Ct.onSearch,Bn=Ct.onSearchSubmit,Nn=Ct.onToggleOpen,qn=Ct.onInputKeyDown,Gn=Ct.domRef;ge.useImperativeHandle(dn,function(){return{focus:function(){_n.current.focus()},blur:function(){_n.current.blur()}}});var Jn=be(0),Dn=(0,Ce.Z)(Jn,2),ri=Dn[0],Mi=Dn[1],Hn=function(Ki){var _r=Ki.which;(_r===z.Z.UP||_r===z.Z.DOWN)&&Ki.preventDefault(),qn&&qn(Ki),_r===z.Z.ENTER&&$t==="tags"&&!zn.current&&!Ft&&(Bn==null||Bn(Ki.target.value)),jt(_r)&&Nn(!0)},oi=function(){Mi(!0)},Bi=(0,ge.useRef)(null),lr=function(Ki){sn(Ki,!0,zn.current)!==!1&&Nn(!0)},Ai=function(){zn.current=!0},an=function(Ki){zn.current=!1,$t!=="combobox"&&lr(Ki.target.value)},si=function(Ki){var _r=Ki.target.value;if(An&&Bi.current&&/[\r\n]/.test(Bi.current)){var On=Bi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");_r=_r.replace(On,Bi.current)}Bi.current=null,lr(_r)},wi=function(Ki){var _r=Ki.clipboardData,On=_r.getData("text");Bi.current=On},pi=function(Ki){var _r=Ki.target;if(_r!==_n.current){var On=document.body.style.msTouchAction!==void 0;On?setTimeout(function(){_n.current.focus()}):_n.current.focus()}},Wi=function(Ki){var _r=ri();Ki.target!==_n.current&&!_r&&$t!=="combobox"&&Ki.preventDefault(),($t!=="combobox"&&(!bn||!_r)||!Ft)&&(Ft&&Gt!==!1&&sn("",!0,!1),Nn())},Ni={inputRef:_n,onInputKeyDown:Hn,onInputMouseDown:oi,onInputChange:si,onInputPaste:wi,onInputCompositionStart:Ai,onInputCompositionEnd:an},hr=$t==="multiple"||$t==="tags"?ge.createElement(Et,(0,Le.Z)({},Ct,Ni)):ge.createElement(Rt,(0,Le.Z)({},Ct,Ni));return ge.createElement("div",{ref:Gn,className:"".concat(wn,"-selector"),onClick:pi,onMouseDown:Wi},hr)},Vt=ge.forwardRef(un);Vt.displayName="Selector";var xn=Vt,Ut=Ee(35593),Zt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Xt=function(Ct){var dn=Ct===!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"}}},mt=function(Ct,dn){var _n=Ct.prefixCls,zn=Ct.disabled,wn=Ct.visible,Ft=Ct.children,$t=Ct.popupElement,bn=Ct.animation,An=Ct.transitionName,Gt=Ct.dropdownStyle,sn=Ct.dropdownClassName,Bn=Ct.direction,Nn=Bn===void 0?"ltr":Bn,qn=Ct.placement,Gn=Ct.builtinPlacements,Jn=Ct.dropdownMatchSelectWidth,Dn=Ct.dropdownRender,ri=Ct.dropdownAlign,Mi=Ct.getPopupContainer,Hn=Ct.empty,oi=Ct.getTriggerDOMNode,Bi=Ct.onPopupVisibleChange,lr=Ct.onPopupMouseEnter,Ai=(0,_e.Z)(Ct,Zt),an="".concat(_n,"-dropdown"),si=$t;Dn&&(si=Dn($t));var wi=ge.useMemo(function(){return Gn||Xt(Jn)},[Gn,Jn]),pi=bn?"".concat(an,"-").concat(bn):An,Wi=typeof Jn=="number",Ni=ge.useMemo(function(){return Wi?null:Jn===!1?"minWidth":"width"},[Jn,Wi]),hr=Gt;Wi&&(hr=(0,Te.Z)((0,Te.Z)({},hr),{},{width:Jn}));var Fi=ge.useRef(null);return ge.useImperativeHandle(dn,function(){return{getPopupElement:function(){return Fi.current}}}),ge.createElement(Ut.Z,(0,Le.Z)({},Ai,{showAction:Bi?["click"]:[],hideAction:Bi?["click"]:[],popupPlacement:qn||(Nn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:wi,prefixCls:an,popupTransitionName:pi,popup:ge.createElement("div",{ref:Fi,onMouseEnter:lr},si),stretch:Ni,popupAlign:ri,popupVisible:wn,getPopupContainer:Mi,popupClassName:ve()(sn,(0,Ie.Z)({},"".concat(an,"-empty"),Hn)),popupStyle:hr,getTriggerDOMNode:oi,onPopupVisibleChange:Bi}),Ft)},ze=ge.forwardRef(mt);ze.displayName="SelectTrigger";var Be=ze,qe=Ee(34589);function Qe(kt,Ct){var dn=kt.key,_n;return"value"in kt&&(_n=kt.value),dn!=null?dn:_n!==void 0?_n:"rc-index-key-".concat(Ct)}function Ue(kt,Ct){var dn=kt||{},_n=dn.label,zn=dn.value,wn=dn.options,Ft=dn.groupLabel,$t=_n||(Ct?"children":"label");return{label:$t,value:zn||"value",options:wn||"options",groupLabel:Ft||$t}}function Xe(kt){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dn=Ct.fieldNames,_n=Ct.childrenAsData,zn=[],wn=Ue(dn,!1),Ft=wn.label,$t=wn.value,bn=wn.options,An=wn.groupLabel;function Gt(sn,Bn){sn.forEach(function(Nn){if(Bn||!(bn in Nn)){var qn=Nn[$t];zn.push({key:Qe(Nn,zn.length),groupOption:Bn,data:Nn,label:Nn[Ft],value:qn})}else{var Gn=Nn[An];Gn===void 0&&_n&&(Gn=Nn.label),zn.push({key:Qe(Nn,zn.length),group:!0,data:Nn,label:Gn}),Gt(Nn[bn],!0)}})}return Gt(kt,!1),zn}function Re(kt){var Ct=(0,Te.Z)({},kt);return"props"in Ct||Object.defineProperty(Ct,"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`."),Ct}}),Ct}function Ae(kt,Ct){if(!Ct||!Ct.length)return null;var dn=!1;function _n(wn,Ft){var $t=(0,qe.Z)(Ft),bn=$t[0],An=$t.slice(1);if(!bn)return[wn];var Gt=wn.split(bn);return dn=dn||Gt.length>1,Gt.reduce(function(sn,Bn){return[].concat((0,me.Z)(sn),(0,me.Z)(_n(Bn,An)))},[]).filter(function(sn){return sn})}var zn=_n(kt,Ct);return dn?zn:null}var Ge=["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"],Ke=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Ze(kt){return kt==="tags"||kt==="multiple"}var at=ge.forwardRef(function(kt,Ct){var dn,_n,zn=kt.id,wn=kt.prefixCls,Ft=kt.className,$t=kt.showSearch,bn=kt.tagRender,An=kt.direction,Gt=kt.omitDomProps,sn=kt.displayValues,Bn=kt.onDisplayValuesChange,Nn=kt.emptyOptions,qn=kt.notFoundContent,Gn=qn===void 0?"Not Found":qn,Jn=kt.onClear,Dn=kt.mode,ri=kt.disabled,Mi=kt.loading,Hn=kt.getInputElement,oi=kt.getRawInputElement,Bi=kt.open,lr=kt.defaultOpen,Ai=kt.onDropdownVisibleChange,an=kt.activeValue,si=kt.onActiveValueChange,wi=kt.activeDescendantId,pi=kt.searchValue,Wi=kt.autoClearSearchValue,Ni=kt.onSearch,hr=kt.onSearchSplit,Fi=kt.tokenSeparators,Ki=kt.allowClear,_r=kt.suffixIcon,On=kt.clearIcon,Jr=kt.OptionList,In=kt.animation,Sr=kt.transitionName,fo=kt.dropdownStyle,Pr=kt.dropdownClassName,Do=kt.dropdownMatchSelectWidth,ro=kt.dropdownRender,Yi=kt.dropdownAlign,er=kt.placement,dr=kt.builtinPlacements,Tr=kt.getPopupContainer,hi=kt.showAction,Tt=hi===void 0?[]:hi,xr=kt.onFocus,Po=kt.onBlur,Wo=kt.onKeyUp,Co=kt.onKeyDown,qo=kt.onMouseDown,Zo=(0,_e.Z)(kt,Ge),wr=Ze(Dn),vr=($t!==void 0?$t:wr)||Dn==="combobox",Qi=(0,Te.Z)({},Zo);Ke.forEach(function(so){delete Qi[so]}),Gt==null||Gt.forEach(function(so){delete Qi[so]});var Qr=ge.useState(!1),Gi=(0,Ce.Z)(Qr,2),Ui=Gi[0],qi=Gi[1];ge.useEffect(function(){qi((0,ue.Z)())},[]);var Xn=ge.useRef(null),qr=ge.useRef(null),_o=ge.useRef(null),Ko=ge.useRef(null),Eo=ge.useRef(null),rs=we(),ms=(0,Ce.Z)(rs,3),Ls=ms[0],ws=ms[1],ta=ms[2];ge.useImperativeHandle(Ct,function(){var so,jo;return{focus:(so=Ko.current)===null||so===void 0?void 0:so.focus,blur:(jo=Ko.current)===null||jo===void 0?void 0:jo.blur,scrollTo:function(ia){var Is;return(Is=Eo.current)===null||Is===void 0?void 0:Is.scrollTo(ia)}}});var aa=ge.useMemo(function(){var so;if(Dn!=="combobox")return pi;var jo=(so=sn[0])===null||so===void 0?void 0:so.value;return typeof jo=="string"||typeof jo=="number"?String(jo):""},[pi,Dn,sn]),Ln=Dn==="combobox"&&typeof Hn=="function"&&Hn()||null,Os=typeof oi=="function"&&oi(),hl=(0,ee.x1)(qr,Os==null||(dn=Os.props)===null||dn===void 0?void 0:dn.ref),dl=ge.useState(!1),vs=(0,Ce.Z)(dl,2),ja=vs[0],lu=vs[1];(0,de.Z)(function(){lu(!0)},[]);var Vl=(0,Se.Z)(!1,{defaultValue:lr,value:Bi}),ho=(0,Ce.Z)(Vl,2),Er=ho[0],na=ho[1],Rr=ja?Er:!1,io=!Gn&&Nn;(ri||io&&Rr&&Dn==="combobox")&&(Rr=!1);var Kr=io?!1:Rr,Ei=ge.useCallback(function(so){var jo=so!==void 0?so:!Rr;ri||(na(jo),Rr!==jo&&(Ai==null||Ai(jo)))},[ri,Rr,na,Ai]),ls=ge.useMemo(function(){return(Fi||[]).some(function(so){return[`
|
|
|
`,`\r
|
|
|
`].includes(so)})},[Fi]),Ms=function(jo,La,ia){var Is=!0,bs=jo;si==null||si(null);var Ts=ia?null:Ae(jo,Fi);return Dn!=="combobox"&&Ts&&(bs="",hr==null||hr(Ts),Ei(!1),Is=!1),Ni&&aa!==bs&&Ni(bs,{source:La?"typing":"effect"}),Is},ba=function(jo){!jo||!jo.trim()||Ni(jo,{source:"submit"})};ge.useEffect(function(){!Rr&&!wr&&Dn!=="combobox"&&Ms("",!1,!1)},[Rr]),ge.useEffect(function(){Er&&ri&&na(!1),ri&&ws(!1)},[ri]);var za=be(),Ja=(0,Ce.Z)(za,2),yi=Ja[0],fs=Ja[1],$s=function(jo){var La=yi(),ia=jo.which;if(ia===z.Z.ENTER&&(Dn!=="combobox"&&jo.preventDefault(),Rr||Ei(!0)),fs(!!aa),ia===z.Z.BACKSPACE&&!La&&wr&&!aa&&sn.length){for(var Is=(0,me.Z)(sn),bs=null,Ts=Is.length-1;Ts>=0;Ts-=1){var Gs=Is[Ts];if(!Gs.disabled){Is.splice(Ts,1),bs=Gs;break}}bs&&Bn(Is,{type:"remove",values:[bs]})}for(var Ws=arguments.length,Yl=new Array(Ws>1?Ws-1:0),Rl=1;Rl<Ws;Rl++)Yl[Rl-1]=arguments[Rl];if(Rr&&Eo.current){var Ds;(Ds=Eo.current).onKeyDown.apply(Ds,[jo].concat(Yl))}Co==null||Co.apply(void 0,[jo].concat(Yl))},Qa=function(jo){for(var La=arguments.length,ia=new Array(La>1?La-1:0),Is=1;Is<La;Is++)ia[Is-1]=arguments[Is];if(Rr&&Eo.current){var bs;(bs=Eo.current).onKeyUp.apply(bs,[jo].concat(ia))}Wo==null||Wo.apply(void 0,[jo].concat(ia))},wl=function(jo){var La=sn.filter(function(ia){return ia!==jo});Bn(La,{type:"remove",values:[jo]})},Il=ge.useRef(!1),Fr=function(){ws(!0),ri||(xr&&!Il.current&&xr.apply(void 0,arguments),Tt.includes("focus")&&Ei(!0)),Il.current=!0},nc=function(){ws(!1,function(){Il.current=!1,Ei(!1)}),!ri&&(aa&&(Dn==="tags"?Ni(aa,{source:"submit"}):Dn==="multiple"&&Ni("",{source:"blur"})),Po&&Po.apply(void 0,arguments))},Aa=[];ge.useEffect(function(){return function(){Aa.forEach(function(so){return clearTimeout(so)}),Aa.splice(0,Aa.length)}},[]);var Ha=function(jo){var La,ia=jo.target,Is=(La=_o.current)===null||La===void 0?void 0:La.getPopupElement();if(Is&&Is.contains(ia)){var bs=setTimeout(function(){var Yl=Aa.indexOf(bs);if(Yl!==-1&&Aa.splice(Yl,1),ta(),!Ui&&!Is.contains(document.activeElement)){var Rl;(Rl=Ko.current)===null||Rl===void 0||Rl.focus()}});Aa.push(bs)}for(var Ts=arguments.length,Gs=new Array(Ts>1?Ts-1:0),Ws=1;Ws<Ts;Ws++)Gs[Ws-1]=arguments[Ws];qo==null||qo.apply(void 0,[jo].concat(Gs))},Ta=ge.useState({}),$l=(0,Ce.Z)(Ta,2),Pu=$l[1];function Ua(){Pu({})}var Ga;Os&&(Ga=function(jo){Ei(jo)}),ke(function(){var so;return[Xn.current,(so=_o.current)===null||so===void 0?void 0:so.getPopupElement()]},Kr,Ei,!!Os);var Uu=ge.useMemo(function(){return(0,Te.Z)((0,Te.Z)({},kt),{},{notFoundContent:Gn,open:Rr,triggerOpen:Kr,id:zn,showSearch:vr,multiple:wr,toggleOpen:Ei})},[kt,Gn,Kr,Rr,zn,vr,wr,Ei]),yc=!!_r||Mi,Eu;yc&&(Eu=ge.createElement(ie,{className:ve()("".concat(wn,"-arrow"),(0,Ie.Z)({},"".concat(wn,"-arrow-loading"),Mi)),customizeIcon:_r,customizeIconProps:{loading:Mi,searchValue:aa,open:Rr,focused:Ls,showSearch:vr}}));var Dl=function(){var jo;Jn==null||Jn(),(jo=Ko.current)===null||jo===void 0||jo.focus(),Bn([],{type:"clear",values:sn}),Ms("",!1,!1)},Sc=se(wn,Dl,sn,Ki,On,ri,aa,Dn),Gu=Sc.allowClear,Lu=Sc.clearIcon,bl=ge.createElement(Jr,{ref:Eo}),th=ve()(wn,Ft,(_n={},(0,Ie.Z)(_n,"".concat(wn,"-focused"),Ls),(0,Ie.Z)(_n,"".concat(wn,"-multiple"),wr),(0,Ie.Z)(_n,"".concat(wn,"-single"),!wr),(0,Ie.Z)(_n,"".concat(wn,"-allow-clear"),Ki),(0,Ie.Z)(_n,"".concat(wn,"-show-arrow"),yc),(0,Ie.Z)(_n,"".concat(wn,"-disabled"),ri),(0,Ie.Z)(_n,"".concat(wn,"-loading"),Mi),(0,Ie.Z)(_n,"".concat(wn,"-open"),Rr),(0,Ie.Z)(_n,"".concat(wn,"-customize-input"),Ln),(0,Ie.Z)(_n,"".concat(wn,"-show-search"),vr),_n)),xc=ge.createElement(Be,{ref:_o,disabled:ri,prefixCls:wn,visible:Kr,popupElement:bl,animation:In,transitionName:Sr,dropdownStyle:fo,dropdownClassName:Pr,direction:An,dropdownMatchSelectWidth:Do,dropdownRender:ro,dropdownAlign:Yi,placement:er,builtinPlacements:dr,getPopupContainer:Tr,empty:Nn,getTriggerDOMNode:function(){return qr.current},onPopupVisibleChange:Ga,onPopupMouseEnter:Ua},Os?ge.cloneElement(Os,{ref:hl}):ge.createElement(xn,(0,Le.Z)({},kt,{domRef:qr,prefixCls:wn,inputElement:Ln,ref:Ko,id:zn,showSearch:vr,autoClearSearchValue:Wi,mode:Dn,activeDescendantId:wi,tagRender:bn,values:sn,open:Rr,onToggleOpen:Ei,activeValue:an,searchValue:aa,onSearch:Ms,onSearchSubmit:ba,onRemove:wl,tokenWithEnter:ls}))),uu;return Os?uu=xc:uu=ge.createElement("div",(0,Le.Z)({className:th},Qi,{ref:Xn,onMouseDown:Ha,onKeyDown:$s,onKeyUp:Qa,onFocus:Fr,onBlur:nc}),Ls&&!Rr&&ge.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(sn.map(function(so){var jo=so.label,La=so.value;return["number","string"].includes((0,he.Z)(jo))?jo:La}).join(", "))),xc,Eu,Gu&&Lu),ge.createElement(le.Provider,{value:Uu},uu)}),xt=at,tn=function(kt,Ct){var dn=ge.useRef({values:new Map,options:new Map}),_n=ge.useMemo(function(){var wn=dn.current,Ft=wn.values,$t=wn.options,bn=kt.map(function(sn){if(sn.label===void 0){var Bn;return(0,Te.Z)((0,Te.Z)({},sn),{},{label:(Bn=Ft.get(sn.value))===null||Bn===void 0?void 0:Bn.label})}return sn}),An=new Map,Gt=new Map;return bn.forEach(function(sn){An.set(sn.value,sn),Gt.set(sn.value,Ct.get(sn.value)||$t.get(sn.value))}),dn.current.values=An,dn.current.options=Gt,bn},[kt,Ct]),zn=ge.useCallback(function(wn){return Ct.get(wn)||dn.current.options.get(wn)},[Ct]);return[_n,zn]};function nn(kt,Ct){return gt(kt).join("").toUpperCase().includes(Ct)}var Jt=function(kt,Ct,dn,_n,zn){return ge.useMemo(function(){if(!dn||_n===!1)return kt;var wn=Ct.options,Ft=Ct.label,$t=Ct.value,bn=[],An=typeof _n=="function",Gt=dn.toUpperCase(),sn=An?_n:function(Nn,qn){return zn?nn(qn[zn],Gt):qn[wn]?nn(qn[Ft!=="children"?Ft:"label"],Gt):nn(qn[$t],Gt)},Bn=An?function(Nn){return Re(Nn)}:function(Nn){return Nn};return kt.forEach(function(Nn){if(Nn[wn]){var qn=sn(dn,Bn(Nn));if(qn)bn.push(Nn);else{var Gn=Nn[wn].filter(function(Jn){return sn(dn,Bn(Jn))});Gn.length&&bn.push((0,Te.Z)((0,Te.Z)({},Nn),{},(0,Ie.Z)({},wn,Gn)))}return}sn(dn,Bn(Nn))&&bn.push(Nn)}),bn},[kt,_n,zn,dn,Ct])},mn=Ee(17115),kn=Ee(11592),fn=["children","value"],Mn=["children"];function Zn(kt){var Ct=kt,dn=Ct.key,_n=Ct.props,zn=_n.children,wn=_n.value,Ft=(0,_e.Z)(_n,fn);return(0,Te.Z)({key:dn,value:wn!==void 0?wn:dn,children:zn},Ft)}function Tn(kt){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,kn.Z)(kt).map(function(dn,_n){if(!ge.isValidElement(dn)||!dn.type)return null;var zn=dn,wn=zn.type.isSelectOptGroup,Ft=zn.key,$t=zn.props,bn=$t.children,An=(0,_e.Z)($t,Mn);return Ct||!wn?Zn(dn):(0,Te.Z)((0,Te.Z)({key:"__RC_SELECT_GRP__".concat(Ft===null?_n:Ft,"__"),label:Ft},An),{},{options:Tn(bn)})}).filter(function(dn){return dn})}function ci(kt,Ct,dn,_n,zn){return ge.useMemo(function(){var wn=kt,Ft=!kt;Ft&&(wn=Tn(Ct));var $t=new Map,bn=new Map,An=function(Bn,Nn,qn){qn&&typeof qn=="string"&&Bn.set(Nn[qn],Nn)};function Gt(sn){for(var Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nn=0;Nn<sn.length;Nn+=1){var qn=sn[Nn];!qn[dn.options]||Bn?($t.set(qn[dn.value],qn),An(bn,qn,dn.label),An(bn,qn,_n),An(bn,qn,zn)):Gt(qn[dn.options],!0)}}return Gt(wn),{options:wn,valueOptions:$t,labelOptions:bn}},[kt,Ct,dn,_n,zn])}function ai(kt){var Ct=ge.useRef();Ct.current=kt;var dn=ge.useCallback(function(){return Ct.current.apply(Ct,arguments)},[]);return dn}var ki=function(){return null};ki.isSelectOptGroup=!0;var Ci=ki,or=function(){return null};or.isSelectOption=!0;var tr=or,pr=Ee(80547),cr=Ee(2738),to=Ee(4409),no=ge.createContext(null),di=no;function Cr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var zi=["disabled","title","children","style","className"];function st(kt){return typeof kt=="string"||typeof kt=="number"}var Dr=function(Ct,dn){var _n=ye(),zn=_n.prefixCls,wn=_n.id,Ft=_n.open,$t=_n.multiple,bn=_n.mode,An=_n.searchValue,Gt=_n.toggleOpen,sn=_n.notFoundContent,Bn=_n.onPopupScroll,Nn=ge.useContext(di),qn=Nn.flattenOptions,Gn=Nn.onActiveValue,Jn=Nn.defaultActiveFirstOption,Dn=Nn.onSelect,ri=Nn.menuItemSelectedIcon,Mi=Nn.rawValues,Hn=Nn.fieldNames,oi=Nn.virtual,Bi=Nn.direction,lr=Nn.listHeight,Ai=Nn.listItemHeight,an="".concat(zn,"-item"),si=(0,pr.Z)(function(){return qn},[Ft,qn],function(Yi,er){return er[0]&&Yi[1]!==er[1]}),wi=ge.useRef(null),pi=function(er){er.preventDefault()},Wi=function(er){wi.current&&wi.current.scrollTo(typeof er=="number"?{index:er}:er)},Ni=function(er){for(var dr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Tr=si.length,hi=0;hi<Tr;hi+=1){var Tt=(er+hi*dr+Tr)%Tr,xr=si[Tt],Po=xr.group,Wo=xr.data;if(!Po&&!Wo.disabled)return Tt}return-1},hr=ge.useState(function(){return Ni(0)}),Fi=(0,Ce.Z)(hr,2),Ki=Fi[0],_r=Fi[1],On=function(er){var dr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;_r(er);var Tr={source:dr?"keyboard":"mouse"},hi=si[er];if(!hi){Gn(null,-1,Tr);return}Gn(hi.value,er,Tr)};(0,ge.useEffect)(function(){On(Jn!==!1?Ni(0):-1)},[si.length,An]);var Jr=ge.useCallback(function(Yi){return Mi.has(Yi)&&bn!=="combobox"},[bn,(0,me.Z)(Mi).toString(),Mi.size]);(0,ge.useEffect)(function(){var Yi=setTimeout(function(){if(!$t&&Ft&&Mi.size===1){var dr=Array.from(Mi)[0],Tr=si.findIndex(function(hi){var Tt=hi.data;return Tt.value===dr});Tr!==-1&&(On(Tr),Wi(Tr))}});if(Ft){var er;(er=wi.current)===null||er===void 0||er.scrollTo(void 0)}return function(){return clearTimeout(Yi)}},[Ft,An,qn.length]);var In=function(er){er!==void 0&&Dn(er,{selected:!Mi.has(er)}),$t||Gt(!1)};if(ge.useImperativeHandle(dn,function(){return{onKeyDown:function(er){var dr=er.which,Tr=er.ctrlKey;switch(dr){case z.Z.N:case z.Z.P:case z.Z.UP:case z.Z.DOWN:{var hi=0;if(dr===z.Z.UP?hi=-1:dr===z.Z.DOWN?hi=1:Cr()&&Tr&&(dr===z.Z.N?hi=1:dr===z.Z.P&&(hi=-1)),hi!==0){var Tt=Ni(Ki+hi,hi);Wi(Tt),On(Tt,!0)}break}case z.Z.ENTER:{var xr=si[Ki];xr&&!xr.data.disabled?In(xr.value):In(void 0),Ft&&er.preventDefault();break}case z.Z.ESC:Gt(!1),Ft&&er.stopPropagation()}},onKeyUp:function(){},scrollTo:function(er){Wi(er)}}}),si.length===0)return ge.createElement("div",{role:"listbox",id:"".concat(wn,"_list"),className:"".concat(an,"-empty"),onMouseDown:pi},sn);var Sr=Object.keys(Hn).map(function(Yi){return Hn[Yi]}),fo=function(er){return er.label};function Pr(Yi,er){var dr=Yi.group;return{role:dr?"presentation":"option",id:"".concat(wn,"_list_").concat(er)}}var Do=function(er){var dr=si[er];if(!dr)return null;var Tr=dr.data||{},hi=Tr.value,Tt=dr.group,xr=(0,Ne.Z)(Tr,!0),Po=fo(dr);return dr?ge.createElement("div",(0,Le.Z)({"aria-label":typeof Po=="string"&&!Tt?Po:null},xr,{key:er},Pr(dr,er),{"aria-selected":Jr(hi)}),hi):null},ro={role:"listbox",id:"".concat(wn,"_list")};return ge.createElement(ge.Fragment,null,oi&&ge.createElement("div",(0,Le.Z)({},ro,{style:{height:0,width:0,overflow:"hidden"}}),Do(Ki-1),Do(Ki),Do(Ki+1)),ge.createElement(to.Z,{itemKey:"key",ref:wi,data:si,height:lr,itemHeight:Ai,fullHeight:!1,onMouseDown:pi,onScroll:Bn,virtual:oi,direction:Bi,innerProps:oi?null:ro},function(Yi,er){var dr,Tr=Yi.group,hi=Yi.groupOption,Tt=Yi.data,xr=Yi.label,Po=Yi.value,Wo=Tt.key;if(Tr){var Co,qo=(Co=Tt.title)!==null&&Co!==void 0?Co:st(xr)?xr.toString():void 0;return ge.createElement("div",{className:ve()(an,"".concat(an,"-group")),title:qo},xr!==void 0?xr:Wo)}var Zo=Tt.disabled,wr=Tt.title,vr=Tt.children,Qi=Tt.style,Qr=Tt.className,Gi=(0,_e.Z)(Tt,zi),Ui=(0,cr.Z)(Gi,Sr),qi=Jr(Po),Xn="".concat(an,"-option"),qr=ve()(an,Xn,Qr,(dr={},(0,Ie.Z)(dr,"".concat(Xn,"-grouped"),hi),(0,Ie.Z)(dr,"".concat(Xn,"-active"),Ki===er&&!Zo),(0,Ie.Z)(dr,"".concat(Xn,"-disabled"),Zo),(0,Ie.Z)(dr,"".concat(Xn,"-selected"),qi),dr)),_o=fo(Yi),Ko=!ri||typeof ri=="function"||qi,Eo=typeof _o=="number"?_o:_o||Po,rs=st(Eo)?Eo.toString():void 0;return wr!==void 0&&(rs=wr),ge.createElement("div",(0,Le.Z)({},(0,Ne.Z)(Ui),oi?{}:Pr(Yi,er),{"aria-selected":qi,className:qr,title:rs,onMouseMove:function(){Ki===er||Zo||On(er)},onClick:function(){Zo||In(Po)},style:Qi}),ge.createElement("div",{className:"".concat(Xn,"-content")},Eo),ge.isValidElement(ri)||qi,Ko&&ge.createElement(ie,{className:"".concat(an,"-option-state"),customizeIcon:ri,customizeIconProps:{isSelected:qi}},qi?"\u2713":null))}))},Mr=ge.forwardRef(Dr);Mr.displayName="OptionList";var xo=Mr;function Gr(kt){var Ct=kt.mode,dn=kt.options,_n=kt.children,zn=kt.backfill,wn=kt.allowClear,Ft=kt.placeholder,$t=kt.getInputElement,bn=kt.showSearch,An=kt.onSearch,Gt=kt.defaultOpen,sn=kt.autoFocus,Bn=kt.labelInValue,Nn=kt.value,qn=kt.inputValue,Gn=kt.optionLabelProp,Jn=isMultiple(Ct),Dn=bn!==void 0?bn:Jn||Ct==="combobox",ri=dn||convertChildrenToData(_n);if(warning(Ct!=="tags"||ri.every(function(Bi){return!Bi.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ct==="tags"||Ct==="combobox"){var Mi=ri.some(function(Bi){return Bi.options?Bi.options.some(function(lr){return typeof("value"in lr?lr.value:lr.key)=="number"}):typeof("value"in Bi?Bi.value:Bi.key)=="number"});warning(!Mi,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ct!=="combobox"||!Gn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ct==="combobox"||!zn,"`backfill` only works with `combobox` mode."),warning(Ct==="combobox"||!$t,"`getInputElement` only work with `combobox` mode."),noteOnce(Ct!=="combobox"||!$t||!wn||!Ft,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),An&&!Dn&&Ct!=="combobox"&&Ct!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Gt||sn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Nn!=null){var Hn=toArray(Nn);warning(!Bn||Hn.every(function(Bi){return _typeof(Bi)==="object"&&("key"in Bi||"value"in Bi)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Jn||Array.isArray(Nn),"`value` should be array when `mode` is `multiple` or `tags`")}if(_n){var oi=null;toNodeArray(_n).some(function(Bi){if(!React.isValidElement(Bi)||!Bi.type)return!1;var lr=Bi,Ai=lr.type;if(Ai.isSelectOption)return!1;if(Ai.isSelectOptGroup){var an=toNodeArray(Bi.props.children).every(function(si){return!React.isValidElement(si)||!Bi.type||si.type.isSelectOption?!0:(oi=si.type,!1)});return!an}return oi=Ai,!0}),oi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(oi.displayName||oi.name||oi,"`.")),warning(qn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function uo(kt,Ct){if(kt){var dn=function _n(zn){for(var wn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ft=0;Ft<zn.length;Ft++){var $t=zn[Ft];if($t[Ct==null?void 0:Ct.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!wn&&Array.isArray($t[Ct==null?void 0:Ct.options])&&_n($t[Ct==null?void 0:Ct.options],!0))break}};dn(kt)}}var Zr=null,co=["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"],cn=["inputValue"];function $e(kt){return!kt||(0,he.Z)(kt)!=="object"}var tt=ge.forwardRef(function(kt,Ct){var dn=kt.id,_n=kt.mode,zn=kt.prefixCls,wn=zn===void 0?"rc-select":zn,Ft=kt.backfill,$t=kt.fieldNames,bn=kt.inputValue,An=kt.searchValue,Gt=kt.onSearch,sn=kt.autoClearSearchValue,Bn=sn===void 0?!0:sn,Nn=kt.onSelect,qn=kt.onDeselect,Gn=kt.dropdownMatchSelectWidth,Jn=Gn===void 0?!0:Gn,Dn=kt.filterOption,ri=kt.filterSort,Mi=kt.optionFilterProp,Hn=kt.optionLabelProp,oi=kt.options,Bi=kt.children,lr=kt.defaultActiveFirstOption,Ai=kt.menuItemSelectedIcon,an=kt.virtual,si=kt.direction,wi=kt.listHeight,pi=wi===void 0?200:wi,Wi=kt.listItemHeight,Ni=Wi===void 0?20:Wi,hr=kt.value,Fi=kt.defaultValue,Ki=kt.labelInValue,_r=kt.onChange,On=(0,_e.Z)(kt,co),Jr=(0,mn.ZP)(dn),In=Ze(_n),Sr=!!(!oi&&Bi),fo=ge.useMemo(function(){return Dn===void 0&&_n==="combobox"?!1:Dn},[Dn,_n]),Pr=ge.useMemo(function(){return Ue($t,Sr)},[JSON.stringify($t),Sr]),Do=(0,Se.Z)("",{value:An!==void 0?An:bn,postState:function(io){return io||""}}),ro=(0,Ce.Z)(Do,2),Yi=ro[0],er=ro[1],dr=ci(oi,Bi,Pr,Mi,Hn),Tr=dr.valueOptions,hi=dr.labelOptions,Tt=dr.options,xr=ge.useCallback(function(Rr){var io=gt(Rr);return io.map(function(Kr){var Ei,ls,Ms,ba,za;if($e(Kr))Ei=Kr;else{var Ja;Ms=Kr.key,ls=Kr.label,Ei=(Ja=Kr.value)!==null&&Ja!==void 0?Ja:Ms}var yi=Tr.get(Ei);if(yi){var fs;if(ls===void 0&&(ls=yi==null?void 0:yi[Hn||Pr.label]),Ms===void 0&&(Ms=(fs=yi==null?void 0:yi.key)!==null&&fs!==void 0?fs:Ei),ba=yi==null?void 0:yi.disabled,za=yi==null?void 0:yi.title,0)var $s}return{label:ls,value:Ei,key:Ms,disabled:ba,title:za}})},[Pr,Hn,Tr]),Po=(0,Se.Z)(Fi,{value:hr}),Wo=(0,Ce.Z)(Po,2),Co=Wo[0],qo=Wo[1],Zo=ge.useMemo(function(){var Rr,io=xr(Co);return _n==="combobox"&&St((Rr=io[0])===null||Rr===void 0?void 0:Rr.value)?[]:io},[Co,xr,_n]),wr=tn(Zo,Tr),vr=(0,Ce.Z)(wr,2),Qi=vr[0],Qr=vr[1],Gi=ge.useMemo(function(){if(!_n&&Qi.length===1){var Rr=Qi[0];if(Rr.value===null&&(Rr.label===null||Rr.label===void 0))return[]}return Qi.map(function(io){var Kr;return(0,Te.Z)((0,Te.Z)({},io),{},{label:(Kr=io.label)!==null&&Kr!==void 0?Kr:io.value})})},[_n,Qi]),Ui=ge.useMemo(function(){return new Set(Qi.map(function(Rr){return Rr.value}))},[Qi]);ge.useEffect(function(){if(_n==="combobox"){var Rr,io=(Rr=Qi[0])===null||Rr===void 0?void 0:Rr.value;er(rt(io)?String(io):"")}},[Qi]);var qi=ai(function(Rr,io){var Kr,Ei=io!=null?io:Rr;return Kr={},(0,Ie.Z)(Kr,Pr.value,Rr),(0,Ie.Z)(Kr,Pr.label,Ei),Kr}),Xn=ge.useMemo(function(){if(_n!=="tags")return Tt;var Rr=(0,me.Z)(Tt),io=function(Ei){return Tr.has(Ei)};return(0,me.Z)(Qi).sort(function(Kr,Ei){return Kr.value<Ei.value?-1:1}).forEach(function(Kr){var Ei=Kr.value;io(Ei)||Rr.push(qi(Ei,Kr.label))}),Rr},[qi,Tt,Tr,Qi,_n]),qr=Jt(Xn,Pr,Yi,fo,Mi),_o=ge.useMemo(function(){return _n!=="tags"||!Yi||qr.some(function(Rr){return Rr[Mi||"value"]===Yi})||qr.some(function(Rr){return Rr[Pr.value]===Yi})?qr:[qi(Yi)].concat((0,me.Z)(qr))},[qi,Mi,_n,qr,Yi,Pr]),Ko=ge.useMemo(function(){return ri?(0,me.Z)(_o).sort(function(Rr,io){return ri(Rr,io)}):_o},[_o,ri]),Eo=ge.useMemo(function(){return Xe(Ko,{fieldNames:Pr,childrenAsData:Sr})},[Ko,Pr,Sr]),rs=function(io){var Kr=xr(io);if(qo(Kr),_r&&(Kr.length!==Qi.length||Kr.some(function(Ms,ba){var za;return((za=Qi[ba])===null||za===void 0?void 0:za.value)!==(Ms==null?void 0:Ms.value)}))){var Ei=Ki?Kr:Kr.map(function(Ms){return Ms.value}),ls=Kr.map(function(Ms){return Re(Qr(Ms.value))});_r(In?Ei:Ei[0],In?ls:ls[0])}},ms=ge.useState(null),Ls=(0,Ce.Z)(ms,2),ws=Ls[0],ta=Ls[1],aa=ge.useState(0),Ln=(0,Ce.Z)(aa,2),Os=Ln[0],hl=Ln[1],dl=lr!==void 0?lr:_n!=="combobox",vs=ge.useCallback(function(Rr,io){var Kr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ei=Kr.source,ls=Ei===void 0?"keyboard":Ei;hl(io),Ft&&_n==="combobox"&&Rr!==null&&ls==="keyboard"&&ta(String(Rr))},[Ft,_n]),ja=function(io,Kr,Ei){var ls=function(){var Il,Fr=Qr(io);return[Ki?{label:Fr==null?void 0:Fr[Pr.label],value:io,key:(Il=Fr==null?void 0:Fr.key)!==null&&Il!==void 0?Il:io}:io,Re(Fr)]};if(Kr&&Nn){var Ms=ls(),ba=(0,Ce.Z)(Ms,2),za=ba[0],Ja=ba[1];Nn(za,Ja)}else if(!Kr&&qn&&Ei!=="clear"){var yi=ls(),fs=(0,Ce.Z)(yi,2),$s=fs[0],Qa=fs[1];qn($s,Qa)}},lu=ai(function(Rr,io){var Kr,Ei=In?io.selected:!0;Ei?Kr=In?[].concat((0,me.Z)(Qi),[Rr]):[Rr]:Kr=Qi.filter(function(ls){return ls.value!==Rr}),rs(Kr),ja(Rr,Ei),_n==="combobox"?ta(""):(!Ze||Bn)&&(er(""),ta(""))}),Vl=function(io,Kr){rs(io);var Ei=Kr.type,ls=Kr.values;(Ei==="remove"||Ei==="clear")&&ls.forEach(function(Ms){ja(Ms.value,!1,Ei)})},ho=function(io,Kr){if(er(io),ta(null),Kr.source==="submit"){var Ei=(io||"").trim();if(Ei){var ls=Array.from(new Set([].concat((0,me.Z)(Ui),[Ei])));rs(ls),ja(Ei,!0),er("")}return}Kr.source!=="blur"&&(_n==="combobox"&&rs(io),Gt==null||Gt(io))},Er=function(io){var Kr=io;_n!=="tags"&&(Kr=io.map(function(ls){var Ms=hi.get(ls);return Ms==null?void 0:Ms.value}).filter(function(ls){return ls!==void 0}));var Ei=Array.from(new Set([].concat((0,me.Z)(Ui),(0,me.Z)(Kr))));rs(Ei),Ei.forEach(function(ls){ja(ls,!0)})},na=ge.useMemo(function(){var Rr=an!==!1&&Jn!==!1;return(0,Te.Z)((0,Te.Z)({},dr),{},{flattenOptions:Eo,onActiveValue:vs,defaultActiveFirstOption:dl,onSelect:lu,menuItemSelectedIcon:Ai,rawValues:Ui,fieldNames:Pr,virtual:Rr,direction:si,listHeight:pi,listItemHeight:Ni,childrenAsData:Sr})},[dr,Eo,vs,dl,lu,Ai,Ui,Pr,an,Jn,pi,Ni,Sr]);return ge.createElement(di.Provider,{value:na},ge.createElement(xt,(0,Le.Z)({},On,{id:Jr,prefixCls:wn,ref:Ct,omitDomProps:cn,mode:_n,displayValues:Gi,onDisplayValuesChange:Vl,direction:si,searchValue:Yi,onSearch:ho,autoClearSearchValue:Bn,onSearchSplit:Er,dropdownMatchSelectWidth:Jn,OptionList:xo,emptyOptions:!Eo.length,activeValue:ws,activeDescendantId:"".concat(Jr,"_list_").concat(Os)})))}),et=tt;et.Option=tr,et.OptGroup=Ci;var Pt=et,At=Pt},9296:function(Pn,qt,Ee){"use strict";Ee.r(qt),Ee.d(qt,{ResizableTextArea:function(){return Je},default:function(){return St}});var Le=Ee(92413),me=Ee(33708),Ie=Ee(400),Te=Ee(39559),Ce=Ee(33606),_e=Ee(37061),he=Ee(26407),Se=Ee(92310),xe=Ee.n(Se),ge=Ee(93681),ce=Ee(5643),ve=Ee(18929),de=Ee(59301),ue=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={},le;function ye(ct){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ht=ct.getAttribute("id")||ct.getAttribute("data-reactid")||ct.getAttribute("name");if(Bt&&se[ht])return se[ht];var it=window.getComputedStyle(ct),dt=it.getPropertyValue("box-sizing")||it.getPropertyValue("-moz-box-sizing")||it.getPropertyValue("-webkit-box-sizing"),yt=parseFloat(it.getPropertyValue("padding-bottom"))+parseFloat(it.getPropertyValue("padding-top")),Et=parseFloat(it.getPropertyValue("border-bottom-width"))+parseFloat(it.getPropertyValue("border-top-width")),vt=ie.map(function(jt){return"".concat(jt,":").concat(it.getPropertyValue(jt))}).join(";"),Rt={sizingStyle:vt,paddingSize:yt,borderSize:Et,boxSizing:dt};return Bt&&ht&&(se[ht]=Rt),Rt}function we(ct){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,it=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;le||(le=document.createElement("textarea"),le.setAttribute("tab-index","-1"),le.setAttribute("aria-hidden","true"),document.body.appendChild(le)),ct.getAttribute("wrap")?le.setAttribute("wrap",ct.getAttribute("wrap")):le.removeAttribute("wrap");var dt=ye(ct,Bt),yt=dt.paddingSize,Et=dt.borderSize,vt=dt.boxSizing,Rt=dt.sizingStyle;le.setAttribute("style","".concat(Rt,";").concat(oe)),le.value=ct.value||ct.placeholder||"";var jt=void 0,un=void 0,Vt,xn=le.scrollHeight;if(vt==="border-box"?xn+=Et:vt==="content-box"&&(xn-=yt),ht!==null||it!==null){le.value=" ";var Ut=le.scrollHeight-yt;ht!==null&&(jt=Ut*ht,vt==="border-box"&&(jt=jt+yt+Et),xn=Math.max(jt,xn)),it!==null&&(un=Ut*it,vt==="border-box"&&(un=un+yt+Et),Vt=xn>un?"":"hidden",xn=Math.min(un,xn))}var Zt={height:xn,overflowY:Vt,resize:"none"};return jt&&(Zt.minHeight=jt),un&&(Zt.maxHeight=un),Zt}var be=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ke=0,Ne=1,je=2,Ve=de.forwardRef(function(ct,Bt){var ht=ct,it=ht.prefixCls,dt=ht.onPressEnter,yt=ht.defaultValue,Et=ht.value,vt=ht.autoSize,Rt=ht.onResize,jt=ht.className,un=ht.style,Vt=ht.disabled,xn=ht.onChange,Ut=ht.onInternalAutoSize,Zt=(0,_e.Z)(ht,be),Xt=(0,ve.Z)(yt,{value:Et,postState:function(Ci){return Ci!=null?Ci:""}}),mt=(0,Ce.Z)(Xt,2),ze=mt[0],Be=mt[1],qe=function(Ci){Be(Ci.target.value),xn==null||xn(Ci)},Qe=de.useRef();de.useImperativeHandle(Bt,function(){return{textArea:Qe.current}});var Ue=de.useMemo(function(){return vt&&(0,Te.Z)(vt)==="object"?[vt.minRows,vt.maxRows]:[]},[vt]),Xe=(0,Ce.Z)(Ue,2),Re=Xe[0],Ae=Xe[1],Ge=!!vt,Ke=function(){try{if(document.activeElement===Qe.current){var Ci=Qe.current,or=Ci.selectionStart,tr=Ci.selectionEnd,pr=Ci.scrollTop;Qe.current.setSelectionRange(or,tr),Qe.current.scrollTop=pr}}catch(cr){}},Ze=de.useState(je),at=(0,Ce.Z)(Ze,2),xt=at[0],tn=at[1],nn=de.useState(),Jt=(0,Ce.Z)(nn,2),mn=Jt[0],kn=Jt[1],fn=function(){tn(ke)};(0,z.Z)(function(){Ge&&fn()},[Et,Re,Ae,Ge]),(0,z.Z)(function(){if(xt===ke)tn(Ne);else if(xt===Ne){var ki=we(Qe.current,!1,Re,Ae);tn(je),kn(ki)}else Ke()},[xt]);var Mn=de.useRef(),Zn=function(){ee.Z.cancel(Mn.current)},Tn=function(Ci){xt===je&&(Rt==null||Rt(Ci),vt&&(Zn(),Mn.current=(0,ee.Z)(function(){fn()})))};de.useEffect(function(){return Zn},[]);var ci=Ge?mn:null,ai=(0,me.Z)((0,me.Z)({},un),ci);return(xt===ke||xt===Ne)&&(ai.overflowY="hidden",ai.overflowX="hidden"),de.createElement(ue.Z,{onResize:Tn,disabled:!(vt||Rt)},de.createElement("textarea",(0,Le.Z)({},Zt,{ref:Qe,style:ai,className:xe()(it,jt,(0,Ie.Z)({},"".concat(it,"-disabled"),Vt)),disabled:Vt,value:ze,onChange:qe})))}),Je=Ve,We=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function gt(ct,Bt){return(0,he.Z)(ct||"").slice(0,Bt).join("")}function ut(ct,Bt,ht,it){var dt=ht;return ct?dt=gt(ht,it):(0,he.Z)(Bt||"").length<ht.length&&(0,he.Z)(ht||"").length>it&&(dt=Bt),dt}var bt=de.forwardRef(function(ct,Bt){var ht,it=ct.defaultValue,dt=ct.value,yt=ct.onFocus,Et=ct.onBlur,vt=ct.onChange,Rt=ct.allowClear,jt=ct.maxLength,un=ct.onCompositionStart,Vt=ct.onCompositionEnd,xn=ct.suffix,Ut=ct.prefixCls,Zt=Ut===void 0?"rc-textarea":Ut,Xt=ct.classes,mt=ct.showCount,ze=ct.className,Be=ct.style,qe=ct.disabled,Qe=ct.hidden,Ue=ct.classNames,Xe=ct.styles,Re=ct.onResize,Ae=(0,_e.Z)(ct,We),Ge=(0,ve.Z)(it,{value:dt,defaultValue:it}),Ke=(0,Ce.Z)(Ge,2),Ze=Ke[0],at=Ke[1],xt=(0,de.useRef)(null),tn=de.useState(!1),nn=(0,Ce.Z)(tn,2),Jt=nn[0],mn=nn[1],kn=de.useState(!1),fn=(0,Ce.Z)(kn,2),Mn=fn[0],Zn=fn[1],Tn=de.useRef(),ci=de.useRef(0),ai=de.useState(null),ki=(0,Ce.Z)(ai,2),Ci=ki[0],or=ki[1],tr=function(){var $e;($e=xt.current)===null||$e===void 0||$e.textArea.focus()};(0,de.useImperativeHandle)(Bt,function(){return{resizableTextArea:xt.current,focus:tr,blur:function(){var $e;($e=xt.current)===null||$e===void 0||$e.textArea.blur()}}}),(0,de.useEffect)(function(){mn(function(cn){return!qe&&cn})},[qe]);var pr=Number(jt)>0,cr=function($e){Zn(!0),Tn.current=Ze,ci.current=$e.currentTarget.selectionStart,un==null||un($e)},to=function($e){Zn(!1);var tt=$e.currentTarget.value;if(pr){var et,Pt=ci.current>=jt+1||ci.current===((et=Tn.current)===null||et===void 0?void 0:et.length);tt=ut(Pt,Tn.current,tt,jt)}tt!==Ze&&(at(tt),(0,ce.rJ)($e.currentTarget,$e,vt,tt)),Vt==null||Vt($e)},no=function($e){var tt=$e.target.value;if(!Mn&&pr){var et=$e.target.selectionStart>=jt+1||$e.target.selectionStart===tt.length||!$e.target.selectionStart;tt=ut(et,Ze,tt,jt)}at(tt),(0,ce.rJ)($e.currentTarget,$e,vt,tt)},di=function($e){var tt=Ae.onPressEnter,et=Ae.onKeyDown;$e.key==="Enter"&&tt&&tt($e),et==null||et($e)},Cr=function($e){mn(!0),yt==null||yt($e)},zi=function($e){mn(!1),Et==null||Et($e)},st=function($e){var tt;at(""),tr(),(0,ce.rJ)((tt=xt.current)===null||tt===void 0?void 0:tt.textArea,$e,vt)},Dr=(0,ce.D7)(Ze);!Mn&&pr&&dt==null&&(Dr=gt(Dr,jt));var Mr=xn,xo;if(mt){var Gr=(0,he.Z)(Dr).length;(0,Te.Z)(mt)==="object"?xo=mt.formatter({value:Dr,count:Gr,maxLength:jt}):xo="".concat(Gr).concat(pr?" / ".concat(jt):""),Mr=de.createElement(de.Fragment,null,Mr,de.createElement("span",{className:xe()("".concat(Zt,"-data-count"),Ue==null?void 0:Ue.count),style:Xe==null?void 0:Xe.count},xo))}var uo=function($e){var tt;Re==null||Re($e),(tt=xt.current)!==null&&tt!==void 0&&tt.textArea.style.height&&or(!0)},Zr=!Ae.autoSize&&!mt&&!Rt,co=de.createElement(ge.BaseInput,{value:Dr,allowClear:Rt,handleReset:st,suffix:Mr,prefixCls:Zt,classes:{affixWrapper:xe()(Xt==null?void 0:Xt.affixWrapper,(ht={},(0,Ie.Z)(ht,"".concat(Zt,"-show-count"),mt),(0,Ie.Z)(ht,"".concat(Zt,"-textarea-allow-clear"),Rt),ht))},disabled:qe,focused:Jt,className:ze,style:(0,me.Z)((0,me.Z)({},Be),Ci&&!Zr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof xo=="string"?xo:void 0}},hidden:Qe,inputElement:de.createElement(Je,(0,Le.Z)({},Ae,{onKeyDown:di,onChange:no,onFocus:Cr,onBlur:zi,onCompositionStart:cr,onCompositionEnd:to,className:Ue==null?void 0:Ue.textarea,style:(0,me.Z)((0,me.Z)({},Xe==null?void 0:Xe.textarea),{},{resize:Be==null?void 0:Be.resize}),disabled:qe,prefixCls:Zt,onResize:uo,ref:xt}))});return co}),rt=bt,St=rt},39417:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Ne}});var Le=Ee(92413),me=Ee(400),Ie=Ee(37061),Te=Ee(33708),Ce=Ee(6909),_e=Ee(4771),he=Ee(25314),Se=Ee(9427),xe=Ee(25440),ge=Ee(92310),ce=Ee.n(ge),ve=Ee(26112),de=Ee(59301),ue=Ee(39378),z=function(Ve){for(var Je=Ve.prefixCls,We=Ve.level,gt=Ve.isStart,ut=Ve.isEnd,bt="".concat(Je,"-indent-unit"),rt=[],St=0;St<We;St+=1){var ct;rt.push(de.createElement("span",{key:St,className:ce()(bt,(ct={},(0,me.Z)(ct,"".concat(bt,"-start"),gt[St]),(0,me.Z)(ct,"".concat(bt,"-end"),ut[St]),ct))}))}return de.createElement("span",{"aria-hidden":"true",className:"".concat(Je,"-indent")},rt)},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"],le="open",ye="close",we="---",be=function(je){(0,Se.Z)(Je,je);var Ve=(0,xe.Z)(Je);function Je(){var We;(0,Ce.Z)(this,Je);for(var gt=arguments.length,ut=new Array(gt),bt=0;bt<gt;bt++)ut[bt]=arguments[bt];return We=Ve.call.apply(Ve,[this].concat(ut)),We.state={dragNodeHighlight:!1},We.selectHandle=void 0,We.cacheIndent=void 0,We.onSelectorClick=function(rt){var St=We.props.context.onNodeClick;St(rt,(0,ie.F)(We.props)),We.isSelectable()?We.onSelect(rt):We.onCheck(rt)},We.onSelectorDoubleClick=function(rt){var St=We.props.context.onNodeDoubleClick;St(rt,(0,ie.F)(We.props))},We.onSelect=function(rt){if(!We.isDisabled()){var St=We.props.context.onNodeSelect;St(rt,(0,ie.F)(We.props))}},We.onCheck=function(rt){if(!We.isDisabled()){var St=We.props,ct=St.disableCheckbox,Bt=St.checked,ht=We.props.context.onNodeCheck;if(!(!We.isCheckable()||ct)){var it=!Bt;ht(rt,(0,ie.F)(We.props),it)}}},We.onMouseEnter=function(rt){var St=We.props.context.onNodeMouseEnter;St(rt,(0,ie.F)(We.props))},We.onMouseLeave=function(rt){var St=We.props.context.onNodeMouseLeave;St(rt,(0,ie.F)(We.props))},We.onContextMenu=function(rt){var St=We.props.context.onNodeContextMenu;St(rt,(0,ie.F)(We.props))},We.onDragStart=function(rt){var St=We.props.context.onNodeDragStart;rt.stopPropagation(),We.setState({dragNodeHighlight:!0}),St(rt,(0,he.Z)(We));try{rt.dataTransfer.setData("text/plain","")}catch(ct){}},We.onDragEnter=function(rt){var St=We.props.context.onNodeDragEnter;rt.preventDefault(),rt.stopPropagation(),St(rt,(0,he.Z)(We))},We.onDragOver=function(rt){var St=We.props.context.onNodeDragOver;rt.preventDefault(),rt.stopPropagation(),St(rt,(0,he.Z)(We))},We.onDragLeave=function(rt){var St=We.props.context.onNodeDragLeave;rt.stopPropagation(),St(rt,(0,he.Z)(We))},We.onDragEnd=function(rt){var St=We.props.context.onNodeDragEnd;rt.stopPropagation(),We.setState({dragNodeHighlight:!1}),St(rt,(0,he.Z)(We))},We.onDrop=function(rt){var St=We.props.context.onNodeDrop;rt.preventDefault(),rt.stopPropagation(),We.setState({dragNodeHighlight:!1}),St(rt,(0,he.Z)(We))},We.onExpand=function(rt){var St=We.props,ct=St.loading,Bt=St.context.onNodeExpand;ct||Bt(rt,(0,ie.F)(We.props))},We.setSelectHandle=function(rt){We.selectHandle=rt},We.getNodeState=function(){var rt=We.props.expanded;return We.isLeaf()?null:rt?le:ye},We.hasChildren=function(){var rt=We.props.eventKey,St=We.props.context.keyEntities,ct=(0,oe.Z)(St,rt)||{},Bt=ct.children;return!!(Bt||[]).length},We.isLeaf=function(){var rt=We.props,St=rt.isLeaf,ct=rt.loaded,Bt=We.props.context.loadData,ht=We.hasChildren();return St===!1?!1:St||!Bt&&!ht||Bt&&ct&&!ht},We.isDisabled=function(){var rt=We.props.disabled,St=We.props.context.disabled;return!!(St||rt)},We.isCheckable=function(){var rt=We.props.checkable,St=We.props.context.checkable;return!St||rt===!1?!1:St},We.syncLoadData=function(rt){var St=rt.expanded,ct=rt.loading,Bt=rt.loaded,ht=We.props.context,it=ht.loadData,dt=ht.onNodeLoad;ct||it&&St&&!We.isLeaf()&&!We.hasChildren()&&!Bt&&dt((0,ie.F)(We.props))},We.isDraggable=function(){var rt=We.props,St=rt.data,ct=rt.context.draggable;return!!(ct&&(!ct.nodeDraggable||ct.nodeDraggable(St)))},We.renderDragHandler=function(){var rt=We.props.context,St=rt.draggable,ct=rt.prefixCls;return St!=null&&St.icon?de.createElement("span",{className:"".concat(ct,"-draggable-icon")},St.icon):null},We.renderSwitcherIconDom=function(rt){var St=We.props.switcherIcon,ct=We.props.context.switcherIcon,Bt=St||ct;return typeof Bt=="function"?Bt((0,Te.Z)((0,Te.Z)({},We.props),{},{isLeaf:rt})):Bt},We.renderSwitcher=function(){var rt=We.props.expanded,St=We.props.context.prefixCls;if(We.isLeaf()){var ct=We.renderSwitcherIconDom(!0);return ct!==!1?de.createElement("span",{className:ce()("".concat(St,"-switcher"),"".concat(St,"-switcher-noop"))},ct):null}var Bt=ce()("".concat(St,"-switcher"),"".concat(St,"-switcher_").concat(rt?le:ye)),ht=We.renderSwitcherIconDom(!1);return ht!==!1?de.createElement("span",{onClick:We.onExpand,className:Bt},ht):null},We.renderCheckbox=function(){var rt=We.props,St=rt.checked,ct=rt.halfChecked,Bt=rt.disableCheckbox,ht=We.props.context.prefixCls,it=We.isDisabled(),dt=We.isCheckable();if(!dt)return null;var yt=typeof dt!="boolean"?dt:null;return de.createElement("span",{className:ce()("".concat(ht,"-checkbox"),St&&"".concat(ht,"-checkbox-checked"),!St&&ct&&"".concat(ht,"-checkbox-indeterminate"),(it||Bt)&&"".concat(ht,"-checkbox-disabled")),onClick:We.onCheck},yt)},We.renderIcon=function(){var rt=We.props.loading,St=We.props.context.prefixCls;return de.createElement("span",{className:ce()("".concat(St,"-iconEle"),"".concat(St,"-icon__").concat(We.getNodeState()||"docu"),rt&&"".concat(St,"-icon_loading"))})},We.renderSelector=function(){var rt=We.state.dragNodeHighlight,St=We.props,ct=St.title,Bt=ct===void 0?we:ct,ht=St.selected,it=St.icon,dt=St.loading,yt=St.data,Et=We.props.context,vt=Et.prefixCls,Rt=Et.showIcon,jt=Et.icon,un=Et.loadData,Vt=Et.titleRender,xn=We.isDisabled(),Ut="".concat(vt,"-node-content-wrapper"),Zt;if(Rt){var Xt=it||jt;Zt=Xt?de.createElement("span",{className:ce()("".concat(vt,"-iconEle"),"".concat(vt,"-icon__customize"))},typeof Xt=="function"?Xt(We.props):Xt):We.renderIcon()}else un&&dt&&(Zt=We.renderIcon());var mt;typeof Bt=="function"?mt=Bt(yt):Vt?mt=Vt(yt):mt=Bt;var ze=de.createElement("span",{className:"".concat(vt,"-title")},mt);return de.createElement("span",{ref:We.setSelectHandle,title:typeof Bt=="string"?Bt:"",className:ce()("".concat(Ut),"".concat(Ut,"-").concat(We.getNodeState()||"normal"),!xn&&(ht||rt)&&"".concat(vt,"-node-selected")),onMouseEnter:We.onMouseEnter,onMouseLeave:We.onMouseLeave,onContextMenu:We.onContextMenu,onClick:We.onSelectorClick,onDoubleClick:We.onSelectorDoubleClick},Zt,ze,We.renderDropIndicator())},We.renderDropIndicator=function(){var rt=We.props,St=rt.disabled,ct=rt.eventKey,Bt=We.props.context,ht=Bt.draggable,it=Bt.dropLevelOffset,dt=Bt.dropPosition,yt=Bt.prefixCls,Et=Bt.indent,vt=Bt.dropIndicatorRender,Rt=Bt.dragOverNodeKey,jt=Bt.direction,un=!!ht,Vt=!St&&un&&Rt===ct,xn=Et!=null?Et:We.cacheIndent;return We.cacheIndent=Et,Vt?vt({dropPosition:dt,dropLevelOffset:it,indent:xn,prefixCls:yt,direction:jt}):null},We}return(0,_e.Z)(Je,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var gt=this.props.selectable,ut=this.props.context.selectable;return typeof gt=="boolean"?gt:ut}},{key:"render",value:function(){var gt,ut=this.props,bt=ut.eventKey,rt=ut.className,St=ut.style,ct=ut.dragOver,Bt=ut.dragOverGapTop,ht=ut.dragOverGapBottom,it=ut.isLeaf,dt=ut.isStart,yt=ut.isEnd,Et=ut.expanded,vt=ut.selected,Rt=ut.checked,jt=ut.halfChecked,un=ut.loading,Vt=ut.domRef,xn=ut.active,Ut=ut.data,Zt=ut.onMouseMove,Xt=ut.selectable,mt=(0,Ie.Z)(ut,se),ze=this.props.context,Be=ze.prefixCls,qe=ze.filterTreeNode,Qe=ze.keyEntities,Ue=ze.dropContainerKey,Xe=ze.dropTargetKey,Re=ze.draggingNodeKey,Ae=this.isDisabled(),Ge=(0,ve.Z)(mt,{aria:!0,data:!0}),Ke=(0,oe.Z)(Qe,bt)||{},Ze=Ke.level,at=yt[yt.length-1],xt=this.isDraggable(),tn=!Ae&&xt,nn=Re===bt,Jt=Xt!==void 0?{"aria-selected":!!Xt}:void 0;return de.createElement("div",(0,Le.Z)({ref:Vt,className:ce()(rt,"".concat(Be,"-treenode"),(gt={},(0,me.Z)(gt,"".concat(Be,"-treenode-disabled"),Ae),(0,me.Z)(gt,"".concat(Be,"-treenode-switcher-").concat(Et?"open":"close"),!it),(0,me.Z)(gt,"".concat(Be,"-treenode-checkbox-checked"),Rt),(0,me.Z)(gt,"".concat(Be,"-treenode-checkbox-indeterminate"),jt),(0,me.Z)(gt,"".concat(Be,"-treenode-selected"),vt),(0,me.Z)(gt,"".concat(Be,"-treenode-loading"),un),(0,me.Z)(gt,"".concat(Be,"-treenode-active"),xn),(0,me.Z)(gt,"".concat(Be,"-treenode-leaf-last"),at),(0,me.Z)(gt,"".concat(Be,"-treenode-draggable"),xt),(0,me.Z)(gt,"dragging",nn),(0,me.Z)(gt,"drop-target",Xe===bt),(0,me.Z)(gt,"drop-container",Ue===bt),(0,me.Z)(gt,"drag-over",!Ae&&ct),(0,me.Z)(gt,"drag-over-gap-top",!Ae&&Bt),(0,me.Z)(gt,"drag-over-gap-bottom",!Ae&&ht),(0,me.Z)(gt,"filter-node",qe&&qe((0,ie.F)(this.props))),gt)),style:St,draggable:tn,"aria-grabbed":nn,onDragStart:tn?this.onDragStart:void 0,onDragEnter:xt?this.onDragEnter:void 0,onDragOver:xt?this.onDragOver:void 0,onDragLeave:xt?this.onDragLeave:void 0,onDrop:xt?this.onDrop:void 0,onDragEnd:xt?this.onDragEnd:void 0,onMouseMove:Zt},Jt,Ge),de.createElement(ee,{prefixCls:Be,level:Ze,isStart:dt,isEnd:yt}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),Je}(de.Component),ke=function(Ve){return de.createElement(ue.k.Consumer,null,function(Je){return de.createElement(be,(0,Le.Z)({},Ve,{context:Je}))})};ke.displayName="TreeNode",ke.isTreeNode=1;var Ne=ke},39378:function(Pn,qt,Ee){"use strict";Ee.d(qt,{k:function(){return me}});var Le=Ee(59301),me=Le.createContext(null)},23130:function(Pn,qt,Ee){"use strict";Ee.d(qt,{O:function(){return Ne.Z},Z:function(){return ze}});var Le=Ee(92413),me=Ee(400),Ie=Ee(39559),Te=Ee(33708),Ce=Ee(26407),_e=Ee(6909),he=Ee(4771),Se=Ee(25314),xe=Ee(9427),ge=Ee(25440),ce=Ee(92310),ve=Ee.n(ce),de=Ee(10228),ue=Ee(26112),z=Ee(48736),ee=Ee(59301),oe=Ee(39378);function ie(Be){var qe=Be.dropPosition,Qe=Be.dropLevelOffset,Ue=Be.indent,Xe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(qe){case-1:Xe.top=0,Xe.left=-Qe*Ue;break;case 1:Xe.bottom=0,Xe.left=-Qe*Ue;break;case 0:Xe.bottom=0,Xe.left=Ue;break}return ee.createElement("div",{style:Xe})}function se(Be){if(Be==null)throw new TypeError("Cannot destructure "+Be)}var le=Ee(33606),ye=Ee(37061),we=Ee(34280),be=Ee(4409),ke=Ee(77900),Ne=Ee(39417);function je(Be,qe){var Qe=ee.useState(!1),Ue=(0,le.Z)(Qe,2),Xe=Ue[0],Re=Ue[1];ee.useLayoutEffect(function(){if(Xe)return Be(),function(){qe()}},[Xe]),ee.useLayoutEffect(function(){return Re(!0),function(){Re(!1)}},[])}var Ve=Ee(71430),Je=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],We=function(qe,Qe){var Ue=qe.className,Xe=qe.style,Re=qe.motion,Ae=qe.motionNodes,Ge=qe.motionType,Ke=qe.onMotionStart,Ze=qe.onMotionEnd,at=qe.active,xt=qe.treeNodeRequiredProps,tn=(0,ye.Z)(qe,Je),nn=ee.useState(!0),Jt=(0,le.Z)(nn,2),mn=Jt[0],kn=Jt[1],fn=ee.useContext(oe.k),Mn=fn.prefixCls,Zn=Ae&&Ge!=="hide";(0,we.Z)(function(){Ae&&Zn!==mn&&kn(Zn)},[Ae]);var Tn=function(){Ae&&Ke()},ci=ee.useRef(!1),ai=function(){Ae&&!ci.current&&(ci.current=!0,Ze())};je(Tn,ai);var ki=function(or){Zn===or&&ai()};return Ae?ee.createElement(ke.default,(0,Le.Z)({ref:Qe,visible:mn},Re,{motionAppear:Ge==="show",onVisibleChanged:ki}),function(Ci,or){var tr=Ci.className,pr=Ci.style;return ee.createElement("div",{ref:or,className:ve()("".concat(Mn,"-treenode-motion"),tr),style:pr},Ae.map(function(cr){var to=(0,Le.Z)({},(se(cr.data),cr.data)),no=cr.title,di=cr.key,Cr=cr.isStart,zi=cr.isEnd;delete to.children;var st=(0,Ve.H8)(di,xt);return ee.createElement(Ne.Z,(0,Le.Z)({},to,st,{title:no,active:at,data:cr.data,key:di,isStart:Cr,isEnd:zi}))}))}):ee.createElement(Ne.Z,(0,Le.Z)({domRef:Qe,className:Ue,style:Xe},tn,{active:at}))};We.displayName="MotionTreeNode";var gt=ee.forwardRef(We),ut=gt;function bt(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Qe=Be.length,Ue=qe.length;if(Math.abs(Qe-Ue)!==1)return{add:!1,key:null};function Xe(Re,Ae){var Ge=new Map;Re.forEach(function(Ze){Ge.set(Ze,!0)});var Ke=Ae.filter(function(Ze){return!Ge.has(Ze)});return Ke.length===1?Ke[0]:null}return Qe<Ue?{add:!0,key:Xe(Be,qe)}:{add:!1,key:Xe(qe,Be)}}function rt(Be,qe,Qe){var Ue=Be.findIndex(function(Ge){return Ge.key===Qe}),Xe=Be[Ue+1],Re=qe.findIndex(function(Ge){return Ge.key===Qe});if(Xe){var Ae=qe.findIndex(function(Ge){return Ge.key===Xe.key});return qe.slice(Re+1,Ae)}return qe.slice(Re+1)}var St=["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"],ct={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Bt=function(){},ht="RC_TREE_MOTION_".concat(Math.random()),it={key:ht},dt={key:ht,level:0,index:0,pos:"0",node:it,nodes:[it]},yt={parent:null,children:[],pos:dt.pos,data:it,title:null,key:ht,isStart:[],isEnd:[]};function Et(Be,qe,Qe,Ue){return qe===!1||!Qe?Be:Be.slice(0,Math.ceil(Qe/Ue)+1)}function vt(Be){var qe=Be.key,Qe=Be.pos;return(0,Ve.km)(qe,Qe)}function Rt(Be){for(var qe=String(Be.data.key),Qe=Be;Qe.parent;)Qe=Qe.parent,qe="".concat(Qe.data.key," > ").concat(qe);return qe}var jt=ee.forwardRef(function(Be,qe){var Qe=Be.prefixCls,Ue=Be.data,Xe=Be.selectable,Re=Be.checkable,Ae=Be.expandedKeys,Ge=Be.selectedKeys,Ke=Be.checkedKeys,Ze=Be.loadedKeys,at=Be.loadingKeys,xt=Be.halfCheckedKeys,tn=Be.keyEntities,nn=Be.disabled,Jt=Be.dragging,mn=Be.dragOverNodeKey,kn=Be.dropPosition,fn=Be.motion,Mn=Be.height,Zn=Be.itemHeight,Tn=Be.virtual,ci=Be.focusable,ai=Be.activeItem,ki=Be.focused,Ci=Be.tabIndex,or=Be.onKeyDown,tr=Be.onFocus,pr=Be.onBlur,cr=Be.onActiveChange,to=Be.onListChangeStart,no=Be.onListChangeEnd,di=(0,ye.Z)(Be,St),Cr=ee.useRef(null),zi=ee.useRef(null);ee.useImperativeHandle(qe,function(){return{scrollTo:function(sn){Cr.current.scrollTo(sn)},getIndentWidth:function(){return zi.current.offsetWidth}}});var st=ee.useState(Ae),Dr=(0,le.Z)(st,2),Mr=Dr[0],xo=Dr[1],Gr=ee.useState(Ue),uo=(0,le.Z)(Gr,2),Zr=uo[0],co=uo[1],cn=ee.useState(Ue),$e=(0,le.Z)(cn,2),tt=$e[0],et=$e[1],Pt=ee.useState([]),At=(0,le.Z)(Pt,2),kt=At[0],Ct=At[1],dn=ee.useState(null),_n=(0,le.Z)(dn,2),zn=_n[0],wn=_n[1],Ft=ee.useRef(Ue);Ft.current=Ue;function $t(){var Gt=Ft.current;co(Gt),et(Gt),Ct([]),wn(null),no()}(0,we.Z)(function(){xo(Ae);var Gt=bt(Mr,Ae);if(Gt.key!==null)if(Gt.add){var sn=Zr.findIndex(function(Dn){var ri=Dn.key;return ri===Gt.key}),Bn=Et(rt(Zr,Ue,Gt.key),Tn,Mn,Zn),Nn=Zr.slice();Nn.splice(sn+1,0,yt),et(Nn),Ct(Bn),wn("show")}else{var qn=Ue.findIndex(function(Dn){var ri=Dn.key;return ri===Gt.key}),Gn=Et(rt(Ue,Zr,Gt.key),Tn,Mn,Zn),Jn=Ue.slice();Jn.splice(qn+1,0,yt),et(Jn),Ct(Gn),wn("hide")}else Zr!==Ue&&(co(Ue),et(Ue))},[Ae,Ue]),ee.useEffect(function(){Jt||$t()},[Jt]);var bn=fn?tt:Ue,An={expandedKeys:Ae,selectedKeys:Ge,loadedKeys:Ze,loadingKeys:at,checkedKeys:Ke,halfCheckedKeys:xt,dragOverNodeKey:mn,dropPosition:kn,keyEntities:tn};return ee.createElement(ee.Fragment,null,ki&&ai&&ee.createElement("span",{style:ct,"aria-live":"assertive"},Rt(ai)),ee.createElement("div",null,ee.createElement("input",{style:ct,disabled:ci===!1||nn,tabIndex:ci!==!1?Ci:null,onKeyDown:or,onFocus:tr,onBlur:pr,value:"",onChange:Bt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Qe,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Qe,"-indent")},ee.createElement("div",{ref:zi,className:"".concat(Qe,"-indent-unit")}))),ee.createElement(be.Z,(0,Le.Z)({},di,{data:bn,itemKey:vt,height:Mn,fullHeight:!1,virtual:Tn,itemHeight:Zn,prefixCls:"".concat(Qe,"-list"),ref:Cr,onVisibleChange:function(sn,Bn){var Nn=new Set(sn),qn=Bn.filter(function(Gn){return!Nn.has(Gn)});qn.some(function(Gn){return vt(Gn)===ht})&&$t()}}),function(Gt){var sn=Gt.pos,Bn=(0,Le.Z)({},(se(Gt.data),Gt.data)),Nn=Gt.title,qn=Gt.key,Gn=Gt.isStart,Jn=Gt.isEnd,Dn=(0,Ve.km)(qn,sn);delete Bn.key,delete Bn.children;var ri=(0,Ve.H8)(Dn,An);return ee.createElement(ut,(0,Le.Z)({},Bn,ri,{title:Nn,active:!!ai&&qn===ai.key,pos:sn,data:Gt.data,isStart:Gn,isEnd:Jn,motion:fn,motionNodes:qn===ht?kt:null,motionType:zn,onMotionStart:to,onMotionEnd:$t,treeNodeRequiredProps:An,onMouseMove:function(){cr(null)}}))}))});jt.displayName="NodeList";var un=jt,Vt=Ee(35654),xn=Ee(90782),Ut=Ee(67841),Zt=10,Xt=function(Be){(0,xe.Z)(Qe,Be);var qe=(0,ge.Z)(Qe);function Qe(){var Ue;(0,_e.Z)(this,Qe);for(var Xe=arguments.length,Re=new Array(Xe),Ae=0;Ae<Xe;Ae++)Re[Ae]=arguments[Ae];return Ue=qe.call.apply(qe,[this].concat(Re)),Ue.destroyed=!1,Ue.delayedDragEnterLogic=void 0,Ue.loadingRetryTimes={},Ue.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,Ve.w$)()},Ue.dragStartMousePosition=null,Ue.dragNode=void 0,Ue.currentMouseOverDroppableNodeKey=null,Ue.listRef=ee.createRef(),Ue.onNodeDragStart=function(Ge,Ke){var Ze=Ue.state,at=Ze.expandedKeys,xt=Ze.keyEntities,tn=Ue.props.onDragStart,nn=Ke.props.eventKey;Ue.dragNode=Ke,Ue.dragStartMousePosition={x:Ge.clientX,y:Ge.clientY};var Jt=(0,Vt._5)(at,nn);Ue.setState({draggingNodeKey:nn,dragChildrenKeys:(0,Vt.wA)(nn,xt),indent:Ue.listRef.current.getIndentWidth()}),Ue.setExpandedKeys(Jt),window.addEventListener("dragend",Ue.onWindowDragEnd),tn==null||tn({event:Ge,node:(0,Ve.F)(Ke.props)})},Ue.onNodeDragEnter=function(Ge,Ke){var Ze=Ue.state,at=Ze.expandedKeys,xt=Ze.keyEntities,tn=Ze.dragChildrenKeys,nn=Ze.flattenNodes,Jt=Ze.indent,mn=Ue.props,kn=mn.onDragEnter,fn=mn.onExpand,Mn=mn.allowDrop,Zn=mn.direction,Tn=Ke.props,ci=Tn.pos,ai=Tn.eventKey,ki=(0,Se.Z)(Ue),Ci=ki.dragNode;if(Ue.currentMouseOverDroppableNodeKey!==ai&&(Ue.currentMouseOverDroppableNodeKey=ai),!Ci){Ue.resetDragState();return}var or=(0,Vt.OM)(Ge,Ci,Ke,Jt,Ue.dragStartMousePosition,Mn,nn,xt,at,Zn),tr=or.dropPosition,pr=or.dropLevelOffset,cr=or.dropTargetKey,to=or.dropContainerKey,no=or.dropTargetPos,di=or.dropAllowed,Cr=or.dragOverNodeKey;if(tn.indexOf(cr)!==-1||!di){Ue.resetDragState();return}if(Ue.delayedDragEnterLogic||(Ue.delayedDragEnterLogic={}),Object.keys(Ue.delayedDragEnterLogic).forEach(function(zi){clearTimeout(Ue.delayedDragEnterLogic[zi])}),Ci.props.eventKey!==Ke.props.eventKey&&(Ge.persist(),Ue.delayedDragEnterLogic[ci]=window.setTimeout(function(){if(Ue.state.draggingNodeKey!==null){var zi=(0,Ce.Z)(at),st=(0,Ut.Z)(xt,Ke.props.eventKey);st&&(st.children||[]).length&&(zi=(0,Vt.L0)(at,Ke.props.eventKey)),"expandedKeys"in Ue.props||Ue.setExpandedKeys(zi),fn==null||fn(zi,{node:(0,Ve.F)(Ke.props),expanded:!0,nativeEvent:Ge.nativeEvent})}},800)),Ci.props.eventKey===cr&&pr===0){Ue.resetDragState();return}Ue.setState({dragOverNodeKey:Cr,dropPosition:tr,dropLevelOffset:pr,dropTargetKey:cr,dropContainerKey:to,dropTargetPos:no,dropAllowed:di}),kn==null||kn({event:Ge,node:(0,Ve.F)(Ke.props),expandedKeys:at})},Ue.onNodeDragOver=function(Ge,Ke){var Ze=Ue.state,at=Ze.dragChildrenKeys,xt=Ze.flattenNodes,tn=Ze.keyEntities,nn=Ze.expandedKeys,Jt=Ze.indent,mn=Ue.props,kn=mn.onDragOver,fn=mn.allowDrop,Mn=mn.direction,Zn=(0,Se.Z)(Ue),Tn=Zn.dragNode;if(Tn){var ci=(0,Vt.OM)(Ge,Tn,Ke,Jt,Ue.dragStartMousePosition,fn,xt,tn,nn,Mn),ai=ci.dropPosition,ki=ci.dropLevelOffset,Ci=ci.dropTargetKey,or=ci.dropContainerKey,tr=ci.dropAllowed,pr=ci.dropTargetPos,cr=ci.dragOverNodeKey;at.indexOf(Ci)!==-1||!tr||(Tn.props.eventKey===Ci&&ki===0?Ue.state.dropPosition===null&&Ue.state.dropLevelOffset===null&&Ue.state.dropTargetKey===null&&Ue.state.dropContainerKey===null&&Ue.state.dropTargetPos===null&&Ue.state.dropAllowed===!1&&Ue.state.dragOverNodeKey===null||Ue.resetDragState():ai===Ue.state.dropPosition&&ki===Ue.state.dropLevelOffset&&Ci===Ue.state.dropTargetKey&&or===Ue.state.dropContainerKey&&pr===Ue.state.dropTargetPos&&tr===Ue.state.dropAllowed&&cr===Ue.state.dragOverNodeKey||Ue.setState({dropPosition:ai,dropLevelOffset:ki,dropTargetKey:Ci,dropContainerKey:or,dropTargetPos:pr,dropAllowed:tr,dragOverNodeKey:cr}),kn==null||kn({event:Ge,node:(0,Ve.F)(Ke.props)}))}},Ue.onNodeDragLeave=function(Ge,Ke){Ue.currentMouseOverDroppableNodeKey===Ke.props.eventKey&&!Ge.currentTarget.contains(Ge.relatedTarget)&&(Ue.resetDragState(),Ue.currentMouseOverDroppableNodeKey=null);var Ze=Ue.props.onDragLeave;Ze==null||Ze({event:Ge,node:(0,Ve.F)(Ke.props)})},Ue.onWindowDragEnd=function(Ge){Ue.onNodeDragEnd(Ge,null,!0),window.removeEventListener("dragend",Ue.onWindowDragEnd)},Ue.onNodeDragEnd=function(Ge,Ke){var Ze=Ue.props.onDragEnd;Ue.setState({dragOverNodeKey:null}),Ue.cleanDragState(),Ze==null||Ze({event:Ge,node:(0,Ve.F)(Ke.props)}),Ue.dragNode=null,window.removeEventListener("dragend",Ue.onWindowDragEnd)},Ue.onNodeDrop=function(Ge,Ke){var Ze,at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,xt=Ue.state,tn=xt.dragChildrenKeys,nn=xt.dropPosition,Jt=xt.dropTargetKey,mn=xt.dropTargetPos,kn=xt.dropAllowed;if(kn){var fn=Ue.props.onDrop;if(Ue.setState({dragOverNodeKey:null}),Ue.cleanDragState(),Jt!==null){var Mn=(0,Te.Z)((0,Te.Z)({},(0,Ve.H8)(Jt,Ue.getTreeNodeRequiredProps())),{},{active:((Ze=Ue.getActiveItem())===null||Ze===void 0?void 0:Ze.key)===Jt,data:(0,Ut.Z)(Ue.state.keyEntities,Jt).node}),Zn=tn.indexOf(Jt)!==-1;(0,z.ZP)(!Zn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Tn=(0,Vt.yx)(mn),ci={event:Ge,node:(0,Ve.F)(Mn),dragNode:Ue.dragNode?(0,Ve.F)(Ue.dragNode.props):null,dragNodesKeys:[Ue.dragNode.props.eventKey].concat(tn),dropToGap:nn!==0,dropPosition:nn+Number(Tn[Tn.length-1])};at||fn==null||fn(ci),Ue.dragNode=null}}},Ue.cleanDragState=function(){var Ge=Ue.state.draggingNodeKey;Ge!==null&&Ue.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Ue.dragStartMousePosition=null,Ue.currentMouseOverDroppableNodeKey=null},Ue.triggerExpandActionExpand=function(Ge,Ke){var Ze=Ue.state,at=Ze.expandedKeys,xt=Ze.flattenNodes,tn=Ke.expanded,nn=Ke.key,Jt=Ke.isLeaf;if(!(Jt||Ge.shiftKey||Ge.metaKey||Ge.ctrlKey)){var mn=xt.filter(function(fn){return fn.key===nn})[0],kn=(0,Ve.F)((0,Te.Z)((0,Te.Z)({},(0,Ve.H8)(nn,Ue.getTreeNodeRequiredProps())),{},{data:mn.data}));Ue.setExpandedKeys(tn?(0,Vt._5)(at,nn):(0,Vt.L0)(at,nn)),Ue.onNodeExpand(Ge,kn)}},Ue.onNodeClick=function(Ge,Ke){var Ze=Ue.props,at=Ze.onClick,xt=Ze.expandAction;xt==="click"&&Ue.triggerExpandActionExpand(Ge,Ke),at==null||at(Ge,Ke)},Ue.onNodeDoubleClick=function(Ge,Ke){var Ze=Ue.props,at=Ze.onDoubleClick,xt=Ze.expandAction;xt==="doubleClick"&&Ue.triggerExpandActionExpand(Ge,Ke),at==null||at(Ge,Ke)},Ue.onNodeSelect=function(Ge,Ke){var Ze=Ue.state.selectedKeys,at=Ue.state,xt=at.keyEntities,tn=at.fieldNames,nn=Ue.props,Jt=nn.onSelect,mn=nn.multiple,kn=Ke.selected,fn=Ke[tn.key],Mn=!kn;Mn?mn?Ze=(0,Vt.L0)(Ze,fn):Ze=[fn]:Ze=(0,Vt._5)(Ze,fn);var Zn=Ze.map(function(Tn){var ci=(0,Ut.Z)(xt,Tn);return ci?ci.node:null}).filter(function(Tn){return Tn});Ue.setUncontrolledState({selectedKeys:Ze}),Jt==null||Jt(Ze,{event:"select",selected:Mn,node:Ke,selectedNodes:Zn,nativeEvent:Ge.nativeEvent})},Ue.onNodeCheck=function(Ge,Ke,Ze){var at=Ue.state,xt=at.keyEntities,tn=at.checkedKeys,nn=at.halfCheckedKeys,Jt=Ue.props,mn=Jt.checkStrictly,kn=Jt.onCheck,fn=Ke.key,Mn,Zn={event:"check",node:Ke,checked:Ze,nativeEvent:Ge.nativeEvent};if(mn){var Tn=Ze?(0,Vt.L0)(tn,fn):(0,Vt._5)(tn,fn),ci=(0,Vt._5)(nn,fn);Mn={checked:Tn,halfChecked:ci},Zn.checkedNodes=Tn.map(function(pr){return(0,Ut.Z)(xt,pr)}).filter(function(pr){return pr}).map(function(pr){return pr.node}),Ue.setUncontrolledState({checkedKeys:Tn})}else{var ai=(0,xn.S)([].concat((0,Ce.Z)(tn),[fn]),!0,xt),ki=ai.checkedKeys,Ci=ai.halfCheckedKeys;if(!Ze){var or=new Set(ki);or.delete(fn);var tr=(0,xn.S)(Array.from(or),{checked:!1,halfCheckedKeys:Ci},xt);ki=tr.checkedKeys,Ci=tr.halfCheckedKeys}Mn=ki,Zn.checkedNodes=[],Zn.checkedNodesPositions=[],Zn.halfCheckedKeys=Ci,ki.forEach(function(pr){var cr=(0,Ut.Z)(xt,pr);if(cr){var to=cr.node,no=cr.pos;Zn.checkedNodes.push(to),Zn.checkedNodesPositions.push({node:to,pos:no})}}),Ue.setUncontrolledState({checkedKeys:ki},!1,{halfCheckedKeys:Ci})}kn==null||kn(Mn,Zn)},Ue.onNodeLoad=function(Ge){var Ke=Ge.key,Ze=new Promise(function(at,xt){Ue.setState(function(tn){var nn=tn.loadedKeys,Jt=nn===void 0?[]:nn,mn=tn.loadingKeys,kn=mn===void 0?[]:mn,fn=Ue.props,Mn=fn.loadData,Zn=fn.onLoad;if(!Mn||Jt.indexOf(Ke)!==-1||kn.indexOf(Ke)!==-1)return null;var Tn=Mn(Ge);return Tn.then(function(){var ci=Ue.state.loadedKeys,ai=(0,Vt.L0)(ci,Ke);Zn==null||Zn(ai,{event:"load",node:Ge}),Ue.setUncontrolledState({loadedKeys:ai}),Ue.setState(function(ki){return{loadingKeys:(0,Vt._5)(ki.loadingKeys,Ke)}}),at()}).catch(function(ci){if(Ue.setState(function(ki){return{loadingKeys:(0,Vt._5)(ki.loadingKeys,Ke)}}),Ue.loadingRetryTimes[Ke]=(Ue.loadingRetryTimes[Ke]||0)+1,Ue.loadingRetryTimes[Ke]>=Zt){var ai=Ue.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Ue.setUncontrolledState({loadedKeys:(0,Vt.L0)(ai,Ke)}),at()}xt(ci)}),{loadingKeys:(0,Vt.L0)(kn,Ke)}})});return Ze.catch(function(){}),Ze},Ue.onNodeMouseEnter=function(Ge,Ke){var Ze=Ue.props.onMouseEnter;Ze==null||Ze({event:Ge,node:Ke})},Ue.onNodeMouseLeave=function(Ge,Ke){var Ze=Ue.props.onMouseLeave;Ze==null||Ze({event:Ge,node:Ke})},Ue.onNodeContextMenu=function(Ge,Ke){var Ze=Ue.props.onRightClick;Ze&&(Ge.preventDefault(),Ze({event:Ge,node:Ke}))},Ue.onFocus=function(){var Ge=Ue.props.onFocus;Ue.setState({focused:!0});for(var Ke=arguments.length,Ze=new Array(Ke),at=0;at<Ke;at++)Ze[at]=arguments[at];Ge==null||Ge.apply(void 0,Ze)},Ue.onBlur=function(){var Ge=Ue.props.onBlur;Ue.setState({focused:!1}),Ue.onActiveChange(null);for(var Ke=arguments.length,Ze=new Array(Ke),at=0;at<Ke;at++)Ze[at]=arguments[at];Ge==null||Ge.apply(void 0,Ze)},Ue.getTreeNodeRequiredProps=function(){var Ge=Ue.state,Ke=Ge.expandedKeys,Ze=Ge.selectedKeys,at=Ge.loadedKeys,xt=Ge.loadingKeys,tn=Ge.checkedKeys,nn=Ge.halfCheckedKeys,Jt=Ge.dragOverNodeKey,mn=Ge.dropPosition,kn=Ge.keyEntities;return{expandedKeys:Ke||[],selectedKeys:Ze||[],loadedKeys:at||[],loadingKeys:xt||[],checkedKeys:tn||[],halfCheckedKeys:nn||[],dragOverNodeKey:Jt,dropPosition:mn,keyEntities:kn}},Ue.setExpandedKeys=function(Ge){var Ke=Ue.state,Ze=Ke.treeData,at=Ke.fieldNames,xt=(0,Ve.oH)(Ze,Ge,at);Ue.setUncontrolledState({expandedKeys:Ge,flattenNodes:xt},!0)},Ue.onNodeExpand=function(Ge,Ke){var Ze=Ue.state.expandedKeys,at=Ue.state,xt=at.listChanging,tn=at.fieldNames,nn=Ue.props,Jt=nn.onExpand,mn=nn.loadData,kn=Ke.expanded,fn=Ke[tn.key];if(!xt){var Mn=Ze.indexOf(fn),Zn=!kn;if((0,z.ZP)(kn&&Mn!==-1||!kn&&Mn===-1,"Expand state not sync with index check"),Zn?Ze=(0,Vt.L0)(Ze,fn):Ze=(0,Vt._5)(Ze,fn),Ue.setExpandedKeys(Ze),Jt==null||Jt(Ze,{node:Ke,expanded:Zn,nativeEvent:Ge.nativeEvent}),Zn&&mn){var Tn=Ue.onNodeLoad(Ke);Tn&&Tn.then(function(){var ci=(0,Ve.oH)(Ue.state.treeData,Ze,tn);Ue.setUncontrolledState({flattenNodes:ci})}).catch(function(){var ci=Ue.state.expandedKeys,ai=(0,Vt._5)(ci,fn);Ue.setExpandedKeys(ai)})}}},Ue.onListChangeStart=function(){Ue.setUncontrolledState({listChanging:!0})},Ue.onListChangeEnd=function(){setTimeout(function(){Ue.setUncontrolledState({listChanging:!1})})},Ue.onActiveChange=function(Ge){var Ke=Ue.state.activeKey,Ze=Ue.props.onActiveChange;Ke!==Ge&&(Ue.setState({activeKey:Ge}),Ge!==null&&Ue.scrollTo({key:Ge}),Ze==null||Ze(Ge))},Ue.getActiveItem=function(){var Ge=Ue.state,Ke=Ge.activeKey,Ze=Ge.flattenNodes;return Ke===null?null:Ze.find(function(at){var xt=at.key;return xt===Ke})||null},Ue.offsetActiveKey=function(Ge){var Ke=Ue.state,Ze=Ke.flattenNodes,at=Ke.activeKey,xt=Ze.findIndex(function(Jt){var mn=Jt.key;return mn===at});xt===-1&&Ge<0&&(xt=Ze.length),xt=(xt+Ge+Ze.length)%Ze.length;var tn=Ze[xt];if(tn){var nn=tn.key;Ue.onActiveChange(nn)}else Ue.onActiveChange(null)},Ue.onKeyDown=function(Ge){var Ke=Ue.state,Ze=Ke.activeKey,at=Ke.expandedKeys,xt=Ke.checkedKeys,tn=Ke.fieldNames,nn=Ue.props,Jt=nn.onKeyDown,mn=nn.checkable,kn=nn.selectable;switch(Ge.which){case de.Z.UP:{Ue.offsetActiveKey(-1),Ge.preventDefault();break}case de.Z.DOWN:{Ue.offsetActiveKey(1),Ge.preventDefault();break}}var fn=Ue.getActiveItem();if(fn&&fn.data){var Mn=Ue.getTreeNodeRequiredProps(),Zn=fn.data.isLeaf===!1||!!(fn.data[tn.children]||[]).length,Tn=(0,Ve.F)((0,Te.Z)((0,Te.Z)({},(0,Ve.H8)(Ze,Mn)),{},{data:fn.data,active:!0}));switch(Ge.which){case de.Z.LEFT:{Zn&&at.includes(Ze)?Ue.onNodeExpand({},Tn):fn.parent&&Ue.onActiveChange(fn.parent.key),Ge.preventDefault();break}case de.Z.RIGHT:{Zn&&!at.includes(Ze)?Ue.onNodeExpand({},Tn):fn.children&&fn.children.length&&Ue.onActiveChange(fn.children[0].key),Ge.preventDefault();break}case de.Z.ENTER:case de.Z.SPACE:{mn&&!Tn.disabled&&Tn.checkable!==!1&&!Tn.disableCheckbox?Ue.onNodeCheck({},Tn,!xt.includes(Ze)):!mn&&kn&&!Tn.disabled&&Tn.selectable!==!1&&Ue.onNodeSelect({},Tn);break}}}Jt==null||Jt(Ge)},Ue.setUncontrolledState=function(Ge){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Ue.destroyed){var at=!1,xt=!0,tn={};Object.keys(Ge).forEach(function(nn){if(nn in Ue.props){xt=!1;return}at=!0,tn[nn]=Ge[nn]}),at&&(!Ke||xt)&&Ue.setState((0,Te.Z)((0,Te.Z)({},tn),Ze))}},Ue.scrollTo=function(Ge){Ue.listRef.current.scrollTo(Ge)},Ue}return(0,he.Z)(Qe,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Xe=this.props.activeKey;Xe!==void 0&&Xe!==this.state.activeKey&&(this.setState({activeKey:Xe}),Xe!==null&&this.scrollTo({key:Xe}))}},{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 Xe,Re=this.state,Ae=Re.focused,Ge=Re.flattenNodes,Ke=Re.keyEntities,Ze=Re.draggingNodeKey,at=Re.activeKey,xt=Re.dropLevelOffset,tn=Re.dropContainerKey,nn=Re.dropTargetKey,Jt=Re.dropPosition,mn=Re.dragOverNodeKey,kn=Re.indent,fn=this.props,Mn=fn.prefixCls,Zn=fn.className,Tn=fn.style,ci=fn.showLine,ai=fn.focusable,ki=fn.tabIndex,Ci=ki===void 0?0:ki,or=fn.selectable,tr=fn.showIcon,pr=fn.icon,cr=fn.switcherIcon,to=fn.draggable,no=fn.checkable,di=fn.checkStrictly,Cr=fn.disabled,zi=fn.motion,st=fn.loadData,Dr=fn.filterTreeNode,Mr=fn.height,xo=fn.itemHeight,Gr=fn.virtual,uo=fn.titleRender,Zr=fn.dropIndicatorRender,co=fn.onContextMenu,cn=fn.onScroll,$e=fn.direction,tt=fn.rootClassName,et=fn.rootStyle,Pt=(0,ue.Z)(this.props,{aria:!0,data:!0}),At;return to&&((0,Ie.Z)(to)==="object"?At=to:typeof to=="function"?At={nodeDraggable:to}:At={}),ee.createElement(oe.k.Provider,{value:{prefixCls:Mn,selectable:or,showIcon:tr,icon:pr,switcherIcon:cr,draggable:At,draggingNodeKey:Ze,checkable:no,checkStrictly:di,disabled:Cr,keyEntities:Ke,dropLevelOffset:xt,dropContainerKey:tn,dropTargetKey:nn,dropPosition:Jt,dragOverNodeKey:mn,indent:kn,direction:$e,dropIndicatorRender:Zr,loadData:st,filterTreeNode:Dr,titleRender:uo,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()(Mn,Zn,tt,(Xe={},(0,me.Z)(Xe,"".concat(Mn,"-show-line"),ci),(0,me.Z)(Xe,"".concat(Mn,"-focused"),Ae),(0,me.Z)(Xe,"".concat(Mn,"-active-focused"),at!==null),Xe)),style:et},ee.createElement(un,(0,Le.Z)({ref:this.listRef,prefixCls:Mn,style:Tn,data:Ge,disabled:Cr,selectable:or,checkable:!!no,motion:zi,dragging:Ze!==null,height:Mr,itemHeight:xo,virtual:Gr,focusable:ai,focused:Ae,tabIndex:Ci,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:co,onScroll:cn},this.getTreeNodeRequiredProps(),Pt))))}}],[{key:"getDerivedStateFromProps",value:function(Xe,Re){var Ae=Re.prevProps,Ge={prevProps:Xe};function Ke(ai){return!Ae&&ai in Xe||Ae&&Ae[ai]!==Xe[ai]}var Ze,at=Re.fieldNames;if(Ke("fieldNames")&&(at=(0,Ve.w$)(Xe.fieldNames),Ge.fieldNames=at),Ke("treeData")?Ze=Xe.treeData:Ke("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Ze=(0,Ve.zn)(Xe.children)),Ze){Ge.treeData=Ze;var xt=(0,Ve.I8)(Ze,{fieldNames:at});Ge.keyEntities=(0,Te.Z)((0,me.Z)({},ht,dt),xt.keyEntities)}var tn=Ge.keyEntities||Re.keyEntities;if(Ke("expandedKeys")||Ae&&Ke("autoExpandParent"))Ge.expandedKeys=Xe.autoExpandParent||!Ae&&Xe.defaultExpandParent?(0,Vt.r7)(Xe.expandedKeys,tn):Xe.expandedKeys;else if(!Ae&&Xe.defaultExpandAll){var nn=(0,Te.Z)({},tn);delete nn[ht],Ge.expandedKeys=Object.keys(nn).map(function(ai){return nn[ai].key})}else!Ae&&Xe.defaultExpandedKeys&&(Ge.expandedKeys=Xe.autoExpandParent||Xe.defaultExpandParent?(0,Vt.r7)(Xe.defaultExpandedKeys,tn):Xe.defaultExpandedKeys);if(Ge.expandedKeys||delete Ge.expandedKeys,Ze||Ge.expandedKeys){var Jt=(0,Ve.oH)(Ze||Re.treeData,Ge.expandedKeys||Re.expandedKeys,at);Ge.flattenNodes=Jt}if(Xe.selectable&&(Ke("selectedKeys")?Ge.selectedKeys=(0,Vt.BT)(Xe.selectedKeys,Xe):!Ae&&Xe.defaultSelectedKeys&&(Ge.selectedKeys=(0,Vt.BT)(Xe.defaultSelectedKeys,Xe))),Xe.checkable){var mn;if(Ke("checkedKeys")?mn=(0,Vt.E6)(Xe.checkedKeys)||{}:!Ae&&Xe.defaultCheckedKeys?mn=(0,Vt.E6)(Xe.defaultCheckedKeys)||{}:Ze&&(mn=(0,Vt.E6)(Xe.checkedKeys)||{checkedKeys:Re.checkedKeys,halfCheckedKeys:Re.halfCheckedKeys}),mn){var kn=mn,fn=kn.checkedKeys,Mn=fn===void 0?[]:fn,Zn=kn.halfCheckedKeys,Tn=Zn===void 0?[]:Zn;if(!Xe.checkStrictly){var ci=(0,xn.S)(Mn,!0,tn);Mn=ci.checkedKeys,Tn=ci.halfCheckedKeys}Ge.checkedKeys=Mn,Ge.halfCheckedKeys=Tn}}return Ke("loadedKeys")&&(Ge.loadedKeys=Xe.loadedKeys),Ge}}]),Qe}(ee.Component);Xt.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},Xt.TreeNode=Ne.Z;var mt=Xt,ze=mt},35654:function(Pn,qt,Ee){"use strict";Ee.d(qt,{BT:function(){return ee},E6:function(){return se},L0:function(){return ge},OM:function(){return z},_5:function(){return xe},r7:function(){return le},wA:function(){return ve},yx:function(){return ce}});var Le=Ee(26407),me=Ee(39559),Ie=Ee(48736),Te=Ee(59301),Ce=Ee(39417),_e=Ee(67841),he=Ee(71430),Se=null;function xe(ye,we){if(!ye)return[];var be=ye.slice(),ke=be.indexOf(we);return ke>=0&&be.splice(ke,1),be}function ge(ye,we){var be=(ye||[]).slice();return be.indexOf(we)===-1&&be.push(we),be}function ce(ye){return ye.split("-")}function ve(ye,we){var be=[],ke=(0,_e.Z)(we,ye);function Ne(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];je.forEach(function(Ve){var Je=Ve.key,We=Ve.children;be.push(Je),Ne(We)})}return Ne(ke.children),be}function de(ye){if(ye.parent){var we=ce(ye.pos);return Number(we[we.length-1])===ye.parent.children.length-1}return!1}function ue(ye){var we=ce(ye.pos);return Number(we[we.length-1])===0}function z(ye,we,be,ke,Ne,je,Ve,Je,We,gt){var ut,bt=ye.clientX,rt=ye.clientY,St=ye.target.getBoundingClientRect(),ct=St.top,Bt=St.height,ht=(gt==="rtl"?-1:1)*(((Ne==null?void 0:Ne.x)||0)-bt),it=(ht-12)/ke,dt=(0,_e.Z)(Je,be.props.eventKey);if(rt<ct+Bt/2){var yt=Ve.findIndex(function(ze){return ze.key===dt.key}),Et=yt<=0?0:yt-1,vt=Ve[Et].key;dt=(0,_e.Z)(Je,vt)}var Rt=dt.key,jt=dt,un=dt.key,Vt=0,xn=0;if(!We.includes(Rt))for(var Ut=0;Ut<it&&de(dt);Ut+=1)dt=dt.parent,xn+=1;var Zt=we.props.data,Xt=dt.node,mt=!0;return ue(dt)&&dt.level===0&&rt<ct+Bt/2&&je({dragNode:Zt,dropNode:Xt,dropPosition:-1})&&dt.key===be.props.eventKey?Vt=-1:(jt.children||[]).length&&We.includes(un)?je({dragNode:Zt,dropNode:Xt,dropPosition:0})?Vt=0:mt=!1:xn===0?it>-1.5?je({dragNode:Zt,dropNode:Xt,dropPosition:1})?Vt=1:mt=!1:je({dragNode:Zt,dropNode:Xt,dropPosition:0})?Vt=0:je({dragNode:Zt,dropNode:Xt,dropPosition:1})?Vt=1:mt=!1:je({dragNode:Zt,dropNode:Xt,dropPosition:1})?Vt=1:mt=!1,{dropPosition:Vt,dropLevelOffset:xn,dropTargetKey:dt.key,dropTargetPos:dt.pos,dragOverNodeKey:un,dropContainerKey:Vt===0?null:((ut=dt.parent)===null||ut===void 0?void 0:ut.key)||null,dropAllowed:mt}}function ee(ye,we){if(ye){var be=we.multiple;return be?ye.slice():ye.length?[ye[0]]:ye}}var oe=function(we){return we};function ie(ye,we){if(!ye)return[];var be=we||{},ke=be.processProps,Ne=ke===void 0?oe:ke,je=Array.isArray(ye)?ye:[ye];return je.map(function(Ve){var Je=Ve.children,We=_objectWithoutProperties(Ve,Se),gt=ie(Je,we);return React.createElement(TreeNode,_extends({key:We.key},Ne(We)),gt)})}function se(ye){if(!ye)return null;var we;if(Array.isArray(ye))we={checkedKeys:ye,halfCheckedKeys:void 0};else if((0,me.Z)(ye)==="object")we={checkedKeys:ye.checked||void 0,halfCheckedKeys:ye.halfChecked||void 0};else return(0,Ie.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return we}function le(ye,we){var be=new Set;function ke(Ne){if(!be.has(Ne)){var je=(0,_e.Z)(we,Ne);if(je){be.add(Ne);var Ve=je.parent,Je=je.node;Je.disabled||Ve&&ke(Ve.key)}}}return(ye||[]).forEach(function(Ne){ke(Ne)}),(0,Le.Z)(be)}},90782:function(Pn,qt,Ee){"use strict";Ee.d(qt,{S:function(){return he}});var Le=Ee(48736),me=Ee(67841);function Ie(Se,xe){var ge=new Set;return Se.forEach(function(ce){xe.has(ce)||ge.add(ce)}),ge}function Te(Se){var xe=Se||{},ge=xe.disabled,ce=xe.disableCheckbox,ve=xe.checkable;return!!(ge||ce)||ve===!1}function Ce(Se,xe,ge,ce){for(var ve=new Set(Se),de=new Set,ue=0;ue<=ge;ue+=1){var z=xe.get(ue)||new Set;z.forEach(function(se){var le=se.key,ye=se.node,we=se.children,be=we===void 0?[]:we;ve.has(le)&&!ce(ye)&&be.filter(function(ke){return!ce(ke.node)}).forEach(function(ke){ve.add(ke.key)})})}for(var ee=new Set,oe=ge;oe>=0;oe-=1){var ie=xe.get(oe)||new Set;ie.forEach(function(se){var le=se.parent,ye=se.node;if(!(ce(ye)||!se.parent||ee.has(se.parent.key))){if(ce(se.parent.node)){ee.add(le.key);return}var we=!0,be=!1;(le.children||[]).filter(function(ke){return!ce(ke.node)}).forEach(function(ke){var Ne=ke.key,je=ve.has(Ne);we&&!je&&(we=!1),!be&&(je||de.has(Ne))&&(be=!0)}),we&&ve.add(le.key),be&&de.add(le.key),ee.add(le.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(Ie(de,ve))}}function _e(Se,xe,ge,ce,ve){for(var de=new Set(Se),ue=new Set(xe),z=0;z<=ce;z+=1){var ee=ge.get(z)||new Set;ee.forEach(function(le){var ye=le.key,we=le.node,be=le.children,ke=be===void 0?[]:be;!de.has(ye)&&!ue.has(ye)&&!ve(we)&&ke.filter(function(Ne){return!ve(Ne.node)}).forEach(function(Ne){de.delete(Ne.key)})})}ue=new Set;for(var oe=new Set,ie=ce;ie>=0;ie-=1){var se=ge.get(ie)||new Set;se.forEach(function(le){var ye=le.parent,we=le.node;if(!(ve(we)||!le.parent||oe.has(le.parent.key))){if(ve(le.parent.node)){oe.add(ye.key);return}var be=!0,ke=!1;(ye.children||[]).filter(function(Ne){return!ve(Ne.node)}).forEach(function(Ne){var je=Ne.key,Ve=de.has(je);be&&!Ve&&(be=!1),!ke&&(Ve||ue.has(je))&&(ke=!0)}),be||de.delete(ye.key),ke&&ue.add(ye.key),oe.add(ye.key)}})}return{checkedKeys:Array.from(de),halfCheckedKeys:Array.from(Ie(ue,de))}}function he(Se,xe,ge,ce){var ve=[],de;ce?de=ce:de=Te;var ue=new Set(Se.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],le=se.level,ye=z.get(le);ye||(ye=new Set,z.set(le,ye)),ye.add(se),ee=Math.max(ee,le)}),(0,Le.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(ue,z,ee,de):oe=_e(ue,xe.halfCheckedKeys,z,ee,de),oe}},67841:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Le}});function Le(me,Ie){return me[Ie]}},71430:function(Pn,qt,Ee){"use strict";Ee.d(qt,{F:function(){return le},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 Le=Ee(39559),me=Ee(26407),Ie=Ee(33708),Te=Ee(37061),Ce=Ee(11592),_e=Ee(2738),he=Ee(48736),Se=Ee(67841),xe=["children"];function ge(ye,we){return"".concat(ye,"-").concat(we)}function ce(ye){return ye&&ye.type&&ye.type.isTreeNode}function ve(ye,we){return ye!=null?ye:we}function de(ye){var we=ye||{},be=we.title,ke=we._title,Ne=we.key,je=we.children,Ve=be||"title";return{title:Ve,_title:ke||[Ve],key:Ne||"key",children:je||"children"}}function ue(ye,we){var be=new Map;function ke(Ne){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Ne||[]).forEach(function(Ve){var Je=Ve[we.key],We=Ve[we.children];warning(Je!=null,"Tree node must have a certain key: [".concat(je).concat(Je,"]"));var gt=String(Je);warning(!be.has(gt)||Je===null||Je===void 0,"Same 'key' exist in the Tree: ".concat(gt)),be.set(gt,!0),ke(We,"".concat(je).concat(gt," > "))})}ke(ye)}function z(ye){function we(be){var ke=(0,Ce.Z)(be);return ke.map(function(Ne){if(!ce(Ne))return(0,he.ZP)(!Ne,"Tree/TreeNode can only accept TreeNode as children."),null;var je=Ne.key,Ve=Ne.props,Je=Ve.children,We=(0,Te.Z)(Ve,xe),gt=(0,Ie.Z)({key:je},We),ut=we(Je);return ut.length&&(gt.children=ut),gt}).filter(function(Ne){return Ne})}return we(ye)}function ee(ye,we,be){var ke=de(be),Ne=ke._title,je=ke.key,Ve=ke.children,Je=new Set(we===!0?[]:we),We=[];function gt(ut){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return ut.map(function(rt,St){for(var ct=ge(bt?bt.pos:"0",St),Bt=ve(rt[je],ct),ht,it=0;it<Ne.length;it+=1){var dt=Ne[it];if(rt[dt]!==void 0){ht=rt[dt];break}}var yt=(0,Ie.Z)((0,Ie.Z)({},(0,_e.Z)(rt,[].concat((0,me.Z)(Ne),[je,Ve]))),{},{title:ht,key:Bt,parent:bt,pos:ct,children:null,data:rt,isStart:[].concat((0,me.Z)(bt?bt.isStart:[]),[St===0]),isEnd:[].concat((0,me.Z)(bt?bt.isEnd:[]),[St===ut.length-1])});return We.push(yt),we===!0||Je.has(Bt)?yt.children=gt(rt[Ve]||[],yt):yt.children=[],yt})}return gt(ye),We}function oe(ye,we,be){var ke={};(0,Le.Z)(be)==="object"?ke=be:ke={externalGetKey:be},ke=ke||{};var Ne=ke,je=Ne.childrenPropName,Ve=Ne.externalGetKey,Je=Ne.fieldNames,We=de(Je),gt=We.key,ut=We.children,bt=je||ut,rt;Ve?typeof Ve=="string"?rt=function(Bt){return Bt[Ve]}:typeof Ve=="function"&&(rt=function(Bt){return Ve(Bt)}):rt=function(Bt,ht){return ve(Bt[gt],ht)};function St(ct,Bt,ht,it){var dt=ct?ct[bt]:ye,yt=ct?ge(ht.pos,Bt):"0",Et=ct?[].concat((0,me.Z)(it),[ct]):[];if(ct){var vt=rt(ct,yt),Rt={node:ct,index:Bt,pos:yt,key:vt,parentPos:ht.node?ht.pos:null,level:ht.level+1,nodes:Et};we(Rt)}dt&&dt.forEach(function(jt,un){St(jt,un,{node:ct,pos:yt,level:ht?ht.level+1:-1},Et)})}St(null)}function ie(ye){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},be=we.initWrapper,ke=we.processEntity,Ne=we.onProcessFinished,je=we.externalGetKey,Ve=we.childrenPropName,Je=we.fieldNames,We=arguments.length>2?arguments[2]:void 0,gt=je||We,ut={},bt={},rt={posEntities:ut,keyEntities:bt};return be&&(rt=be(rt)||rt),oe(ye,function(St){var ct=St.node,Bt=St.index,ht=St.pos,it=St.key,dt=St.parentPos,yt=St.level,Et=St.nodes,vt={node:ct,nodes:Et,index:Bt,key:it,pos:ht,level:yt},Rt=ve(it,ht);ut[ht]=vt,bt[Rt]=vt,vt.parent=ut[dt],vt.parent&&(vt.parent.children=vt.parent.children||[],vt.parent.children.push(vt)),ke&&ke(vt,rt)},{externalGetKey:gt,childrenPropName:Ve,fieldNames:Je}),Ne&&Ne(rt),rt}function se(ye,we){var be=we.expandedKeys,ke=we.selectedKeys,Ne=we.loadedKeys,je=we.loadingKeys,Ve=we.checkedKeys,Je=we.halfCheckedKeys,We=we.dragOverNodeKey,gt=we.dropPosition,ut=we.keyEntities,bt=(0,Se.Z)(ut,ye),rt={eventKey:ye,expanded:be.indexOf(ye)!==-1,selected:ke.indexOf(ye)!==-1,loaded:Ne.indexOf(ye)!==-1,loading:je.indexOf(ye)!==-1,checked:Ve.indexOf(ye)!==-1,halfChecked:Je.indexOf(ye)!==-1,pos:String(bt?bt.pos:""),dragOver:We===ye&>===0,dragOverGapTop:We===ye&>===-1,dragOverGapBottom:We===ye&>===1};return rt}function le(ye){var we=ye.data,be=ye.expanded,ke=ye.selected,Ne=ye.checked,je=ye.loaded,Ve=ye.loading,Je=ye.halfChecked,We=ye.dragOver,gt=ye.dragOverGapTop,ut=ye.dragOverGapBottom,bt=ye.pos,rt=ye.active,St=ye.eventKey,ct=(0,Ie.Z)((0,Ie.Z)({},we),{},{expanded:be,selected:ke,checked:Ne,loaded:je,loading:Ve,halfChecked:Je,dragOver:We,dragOverGapTop:gt,dragOverGapBottom:ut,pos:bt,active:rt,key:St});return"props"in ct||Object.defineProperty(ct,"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`."),ye}}),ct}},8224:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});var Le=Ee(4676);function me(Ie,Te,Ce,_e){var he=Le.unstable_batchedUpdates?function(xe){Le.unstable_batchedUpdates(Ce,xe)}:Ce;return Ie!=null&&Ie.addEventListener&&Ie.addEventListener(Te,he,_e),{remove:function(){Ie!=null&&Ie.removeEventListener&&Ie.removeEventListener(Te,he,_e)}}}},55468:function(Pn,qt,Ee){"use strict";Ee.d(qt,{g1:function(){return ce},os:function(){return de}});var Le=/margin|padding|width|height|max|min|offset/,me={left:!0,top:!0},Ie={cssFloat:1,styleFloat:1,float:1};function Te(ue){return ue.nodeType===1?ue.ownerDocument.defaultView.getComputedStyle(ue,null):{}}function Ce(ue,z,ee){if(z=z.toLowerCase(),ee==="auto"){if(z==="height")return ue.offsetHeight;if(z==="width")return ue.offsetWidth}return z in me||(me[z]=Le.test(z)),me[z]?parseFloat(ee)||0:ee}function _e(ue,z){var ee=arguments.length,oe=Te(ue);return z=Ie[z]?"cssFloat"in ue.style?"cssFloat":"styleFloat":z,ee===1?oe:Ce(ue,z,oe[z]||ue.style[z])}function he(ue,z,ee){var oe=arguments.length;if(z=Ie[z]?"cssFloat"in ue.style?"cssFloat":"styleFloat":z,oe===3)return typeof ee=="number"&&Le.test(z)&&(ee="".concat(ee,"px")),ue.style[z]=ee,ee;for(var ie in z)z.hasOwnProperty(ie)&&he(ue,ie,z[ie]);return Te(ue)}function Se(ue){return ue===document.body?document.documentElement.clientWidth:ue.offsetWidth}function xe(ue){return ue===document.body?window.innerHeight||document.documentElement.clientHeight:ue.offsetHeight}function ge(){var ue=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),z=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:ue,height:z}}function ce(){var ue=document.documentElement.clientWidth,z=window.innerHeight||document.documentElement.clientHeight;return{width:ue,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(ue){var z=ue.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(Pn,qt,Ee){"use strict";Ee.d(qt,{G:function(){return Te}});var Le=Ee(47273),me=function(_e){if((0,Le.Z)()&&window.document.documentElement){var he=Array.isArray(_e)?_e:[_e],Se=window.document.documentElement;return he.some(function(xe){return xe in Se.style})}return!1},Ie=function(_e,he){if(!me(_e))return!1;var Se=document.createElement("div"),xe=Se.style[_e];return Se.style[_e]=he,Se.style[_e]!==xe};function Te(Ce,_e){return!Array.isArray(Ce)&&_e!==void 0?Ie(Ce,_e):me(Ce)}},4409:function(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return mt}});var Le=Ee(92413),me=Ee(39559),Ie=Ee(33708),Te=Ee(400),Ce=Ee(33606),_e=Ee(37061),he=Ee(92310),Se=Ee.n(he),xe=Ee(29301),ge=Ee(70425),ce=Ee(34280),ve=Ee(59301),de=Ee(4676),ue=ve.forwardRef(function(ze,Be){var qe=ze.height,Qe=ze.offsetY,Ue=ze.offsetX,Xe=ze.children,Re=ze.prefixCls,Ae=ze.onInnerResize,Ge=ze.innerProps,Ke=ze.rtl,Ze=ze.extra,at={},xt={display:"flex",flexDirection:"column"};return Qe!==void 0&&(at={height:qe,position:"relative",overflow:"hidden"},xt=(0,Ie.Z)((0,Ie.Z)({},xt),{},(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({transform:"translateY(".concat(Qe,"px)")},Ke?"marginRight":"marginLeft",-Ue),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:at},ve.createElement(xe.Z,{onResize:function(nn){var Jt=nn.offsetHeight;Jt&&Ae&&Ae()}},ve.createElement("div",(0,Le.Z)({style:xt,className:Se()((0,Te.Z)({},"".concat(Re,"-holder-inner"),Re)),ref:Be},Ge),Xe,Ze)))});ue.displayName="Filler";var z=ue;function ee(ze){var Be=ze.children,qe=ze.setRef,Qe=ve.useCallback(function(Ue){qe(Ue)},[]);return ve.cloneElement(Be,{ref:Qe})}function oe(ze,Be,qe,Qe,Ue,Xe,Re,Ae){var Ge=Ae.getKey;return ze.slice(Be,qe+1).map(function(Ke,Ze){var at=Be+Ze,xt=Re(Ke,at,{style:{width:Qe},offsetX:Ue}),tn=Ge(Ke);return ve.createElement(ee,{key:tn,setRef:function(Jt){return Xe(Ke,Jt)}},xt)})}function ie(ze,Be,qe,Qe){var Ue=qe-ze,Xe=Be-qe,Re=Math.min(Ue,Xe)*2;if(Qe<=Re){var Ae=Math.floor(Qe/2);return Qe%2?qe+Ae+1:qe-Ae}return Ue>Xe?qe-(Qe-Xe):qe+(Qe-Ue)}function se(ze,Be,qe){var Qe=ze.length,Ue=Be.length,Xe,Re;if(Qe===0&&Ue===0)return null;Qe<Ue?(Xe=ze,Re=Be):(Xe=Be,Re=ze);var Ae={__EMPTY_ITEM__:!0};function Ge(nn){return nn!==void 0?qe(nn):Ae}for(var Ke=null,Ze=Math.abs(Qe-Ue)!==1,at=0;at<Re.length;at+=1){var xt=Ge(Xe[at]),tn=Ge(Re[at]);if(xt!==tn){Ke=at,Ze=Ze||xt!==Ge(Re[at+1]);break}}return Ke===null?null:{index:Ke,multiple:Ze}}function le(ze,Be,qe){var Qe=ve.useState(ze),Ue=(0,Ce.Z)(Qe,2),Xe=Ue[0],Re=Ue[1],Ae=ve.useState(null),Ge=(0,Ce.Z)(Ae,2),Ke=Ge[0],Ze=Ge[1];return ve.useEffect(function(){var at=se(Xe||[],ze||[],Be);(at==null?void 0:at.index)!==void 0&&(qe==null||qe(at.index),Ze(ze[at.index])),Re(ze)},[ze]),[Ke]}var ye=Ee(16089),we=(typeof navigator=="undefined"?"undefined":(0,me.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),be=we,ke=function(ze,Be,qe,Qe){var Ue=(0,ve.useRef)(!1),Xe=(0,ve.useRef)(null);function Re(){clearTimeout(Xe.current),Ue.current=!0,Xe.current=setTimeout(function(){Ue.current=!1},50)}var Ae=(0,ve.useRef)({top:ze,bottom:Be,left:qe,right:Qe});return Ae.current.top=ze,Ae.current.bottom=Be,Ae.current.left=qe,Ae.current.right=Qe,function(Ge,Ke){var Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,at=Ge?Ke<0&&Ae.current.left||Ke>0&&Ae.current.right:Ke<0&&Ae.current.top||Ke>0&&Ae.current.bottom;return Ze&&at?(clearTimeout(Xe.current),Ue.current=!1):(!at||Ue.current)&&Re(),!Ue.current&&at}};function Ne(ze,Be,qe,Qe,Ue,Xe,Re){var Ae=(0,ve.useRef)(0),Ge=(0,ve.useRef)(null),Ke=(0,ve.useRef)(null),Ze=(0,ve.useRef)(!1),at=ke(Be,qe,Qe,Ue);function xt(fn,Mn){if(ye.Z.cancel(Ge.current),!at(!1,Mn)){var Zn=fn;if(!Zn._virtualHandled)Zn._virtualHandled=!0;else return;Ae.current+=Mn,Ke.current=Mn,be||Zn.preventDefault(),Ge.current=(0,ye.Z)(function(){var Tn=Ze.current?10:1;Re(Ae.current*Tn,!1),Ae.current=0})}}function tn(fn,Mn){Re(Mn,!0),be||fn.preventDefault()}var nn=(0,ve.useRef)(null),Jt=(0,ve.useRef)(null);function mn(fn){if(ze){ye.Z.cancel(Jt.current),Jt.current=(0,ye.Z)(function(){nn.current=null},2);var Mn=fn.deltaX,Zn=fn.deltaY,Tn=fn.shiftKey,ci=Mn,ai=Zn;(nn.current==="sx"||!nn.current&&Tn&&Zn&&!Mn)&&(ci=Zn,ai=0,nn.current="sx");var ki=Math.abs(ci),Ci=Math.abs(ai);nn.current===null&&(nn.current=Xe&&ki>Ci?"x":"y"),nn.current==="y"?xt(fn,ai):tn(fn,ci)}}function kn(fn){ze&&(Ze.current=fn.detail===Ke.current)}return[mn,kn]}function je(ze,Be,qe,Qe){var Ue=ve.useMemo(function(){return[new Map,[]]},[ze,qe.id,Qe]),Xe=(0,Ce.Z)(Ue,2),Re=Xe[0],Ae=Xe[1],Ge=function(Ze){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ze,xt=Re.get(Ze),tn=Re.get(at);if(xt===void 0||tn===void 0)for(var nn=ze.length,Jt=Ae.length;Jt<nn;Jt+=1){var mn,kn=ze[Jt],fn=Be(kn);Re.set(fn,Jt);var Mn=(mn=qe.get(fn))!==null&&mn!==void 0?mn:Qe;if(Ae[Jt]=(Ae[Jt-1]||0)+Mn,fn===Ze&&(xt=Jt),fn===at&&(tn=Jt),xt!==void 0&&tn!==void 0)break}return{top:Ae[xt-1]||0,bottom:Ae[tn]}};return Ge}var Ve=Ee(76846),Je=Ee(6909),We=Ee(4771),gt=function(){function ze(){(0,Je.Z)(this,ze),(0,Te.Z)(this,"maps",void 0),(0,Te.Z)(this,"id",0),(0,Te.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,We.Z)(ze,[{key:"set",value:function(qe,Qe){this.maps[qe]=Qe,this.id+=1,this.diffKeys.add(qe)}},{key:"get",value:function(qe){return this.maps[qe]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),ze}(),ut=gt;function bt(ze){var Be=parseFloat(ze);return isNaN(Be)?0:Be}function rt(ze,Be,qe){var Qe=ve.useState(0),Ue=(0,Ce.Z)(Qe,2),Xe=Ue[0],Re=Ue[1],Ae=(0,ve.useRef)(new Map),Ge=(0,ve.useRef)(new ut),Ke=(0,ve.useRef)(0);function Ze(){Ke.current+=1}function at(){var tn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ze();var nn=function(){var kn=!1;Ae.current.forEach(function(fn,Mn){if(fn&&fn.offsetParent){var Zn=(0,Ve.ZP)(fn),Tn=Zn.offsetHeight,ci=getComputedStyle(Zn),ai=ci.marginTop,ki=ci.marginBottom,Ci=bt(ai),or=bt(ki),tr=Tn+Ci+or;Ge.current.get(Mn)!==tr&&(Ge.current.set(Mn,tr),kn=!0)}}),kn&&Re(function(fn){return fn+1})};if(tn)nn();else{Ke.current+=1;var Jt=Ke.current;Promise.resolve().then(function(){Jt===Ke.current&&nn()})}}function xt(tn,nn){var Jt=ze(tn),mn=Ae.current.get(Jt);nn?(Ae.current.set(Jt,nn),at()):Ae.current.delete(Jt),!mn!=!nn&&(nn?Be==null||Be(tn):qe==null||qe(tn))}return(0,ve.useEffect)(function(){return Ze},[]),[xt,at,Ge.current,Xe]}var St=14/15;function ct(ze,Be,qe){var Qe=(0,ve.useRef)(!1),Ue=(0,ve.useRef)(0),Xe=(0,ve.useRef)(0),Re=(0,ve.useRef)(null),Ae=(0,ve.useRef)(null),Ge,Ke=function(tn){if(Qe.current){var nn=Math.ceil(tn.touches[0].pageX),Jt=Math.ceil(tn.touches[0].pageY),mn=Ue.current-nn,kn=Xe.current-Jt,fn=Math.abs(mn)>Math.abs(kn);fn?Ue.current=nn:Xe.current=Jt;var Mn=qe(fn,fn?mn:kn,!1,tn);Mn&&tn.preventDefault(),clearInterval(Ae.current),Mn&&(Ae.current=setInterval(function(){fn?mn*=St:kn*=St;var Zn=Math.floor(fn?mn:kn);(!qe(fn,Zn,!0)||Math.abs(Zn)<=.1)&&clearInterval(Ae.current)},16))}},Ze=function(){Qe.current=!1,Ge()},at=function(tn){Ge(),tn.touches.length===1&&!Qe.current&&(Qe.current=!0,Ue.current=Math.ceil(tn.touches[0].pageX),Xe.current=Math.ceil(tn.touches[0].pageY),Re.current=tn.target,Re.current.addEventListener("touchmove",Ke,{passive:!1}),Re.current.addEventListener("touchend",Ze,{passive:!0}))};Ge=function(){Re.current&&(Re.current.removeEventListener("touchmove",Ke),Re.current.removeEventListener("touchend",Ze))},(0,ce.Z)(function(){return ze&&Be.current.addEventListener("touchstart",at,{passive:!0}),function(){var xt;(xt=Be.current)===null||xt===void 0||xt.removeEventListener("touchstart",at),Ge(),clearInterval(Ae.current)}},[ze])}function Bt(ze){return Math.floor(Math.pow(ze,.5))}function ht(ze,Be){var qe="touches"in ze?ze.touches[0]:ze;return qe[Be?"pageX":"pageY"]-window[Be?"scrollX":"scrollY"]}function it(ze,Be,qe){ve.useEffect(function(){var Qe=Be.current;if(ze&&Qe){var Ue=!1,Xe,Re,Ae=function(){ye.Z.cancel(Xe)},Ge=function xt(){Ae(),Xe=(0,ye.Z)(function(){qe(Re),xt()})},Ke=function(tn){if(!tn.target.draggable){var nn=tn;nn._virtualHandled||(nn._virtualHandled=!0,Ue=!0)}},Ze=function(){Ue=!1,Ae()},at=function(tn){if(Ue){var nn=ht(tn,!1),Jt=Qe.getBoundingClientRect(),mn=Jt.top,kn=Jt.bottom;if(nn<=mn){var fn=mn-nn;Re=-Bt(fn),Ge()}else if(nn>=kn){var Mn=nn-kn;Re=Bt(Mn),Ge()}else Ae()}};return Qe.addEventListener("mousedown",Ke),Qe.ownerDocument.addEventListener("mouseup",Ze),Qe.ownerDocument.addEventListener("mousemove",at),function(){Qe.removeEventListener("mousedown",Ke),Qe.ownerDocument.removeEventListener("mouseup",Ze),Qe.ownerDocument.removeEventListener("mousemove",at),Ae()}}},[ze])}var dt=10;function yt(ze,Be,qe,Qe,Ue,Xe,Re,Ae){var Ge=ve.useRef(),Ke=ve.useState(null),Ze=(0,Ce.Z)(Ke,2),at=Ze[0],xt=Ze[1];return(0,ce.Z)(function(){if(at&&at.times<dt){if(!ze.current){xt(function(st){return(0,Ie.Z)({},st)});return}Xe();var tn=at.targetAlign,nn=at.originAlign,Jt=at.index,mn=at.offset,kn=ze.current.clientHeight,fn=!1,Mn=tn,Zn=null;if(kn){for(var Tn=tn||nn,ci=0,ai=0,ki=0,Ci=Math.min(Be.length-1,Jt),or=0;or<=Ci;or+=1){var tr=Ue(Be[or]);ai=ci;var pr=qe.get(tr);ki=ai+(pr===void 0?Qe:pr),ci=ki}for(var cr=Tn==="top"?mn:kn-mn,to=Ci;to>=0;to-=1){var no=Ue(Be[to]),di=qe.get(no);if(di===void 0){fn=!0;break}if(cr-=di,cr<=0)break}switch(Tn){case"top":Zn=ai-mn;break;case"bottom":Zn=ki-kn+mn;break;default:{var Cr=ze.current.scrollTop,zi=Cr+kn;ai<Cr?Mn="top":ki>zi&&(Mn="bottom")}}Zn!==null&&Re(Zn),Zn!==at.lastTop&&(fn=!0)}fn&&xt((0,Ie.Z)((0,Ie.Z)({},at),{},{times:at.times+1,targetAlign:Mn,lastTop:Zn}))}},[at,ze.current]),function(tn){if(tn==null){Ae();return}if(ye.Z.cancel(Ge.current),typeof tn=="number")Re(tn);else if(tn&&(0,me.Z)(tn)==="object"){var nn,Jt=tn.align;"index"in tn?nn=tn.index:nn=Be.findIndex(function(fn){return Ue(fn)===tn.key});var mn=tn.offset,kn=mn===void 0?0:mn;xt({times:0,index:nn,offset:kn,originAlign:Jt})}}}var Et=ve.forwardRef(function(ze,Be){var qe=ze.prefixCls,Qe=ze.rtl,Ue=ze.scrollOffset,Xe=ze.scrollRange,Re=ze.onStartMove,Ae=ze.onStopMove,Ge=ze.onScroll,Ke=ze.horizontal,Ze=ze.spinSize,at=ze.containerSize,xt=ze.style,tn=ze.thumbStyle,nn=ze.showScrollBar,Jt=ve.useState(!1),mn=(0,Ce.Z)(Jt,2),kn=mn[0],fn=mn[1],Mn=ve.useState(null),Zn=(0,Ce.Z)(Mn,2),Tn=Zn[0],ci=Zn[1],ai=ve.useState(null),ki=(0,Ce.Z)(ai,2),Ci=ki[0],or=ki[1],tr=!Qe,pr=ve.useRef(),cr=ve.useRef(),to=ve.useState(nn),no=(0,Ce.Z)(to,2),di=no[0],Cr=no[1],zi=ve.useRef(),st=function(){nn===!0||nn===!1||(clearTimeout(zi.current),Cr(!0),zi.current=setTimeout(function(){Cr(!1)},3e3))},Dr=Xe-at||0,Mr=at-Ze||0,xo=ve.useMemo(function(){if(Ue===0||Dr===0)return 0;var Pt=Ue/Dr;return Pt*Mr},[Ue,Dr,Mr]),Gr=function(At){At.stopPropagation(),At.preventDefault()},uo=ve.useRef({top:xo,dragging:kn,pageY:Tn,startTop:Ci});uo.current={top:xo,dragging:kn,pageY:Tn,startTop:Ci};var Zr=function(At){fn(!0),ci(ht(At,Ke)),or(uo.current.top),Re(),At.stopPropagation(),At.preventDefault()};ve.useEffect(function(){var Pt=function(dn){dn.preventDefault()},At=pr.current,kt=cr.current;return At.addEventListener("touchstart",Pt,{passive:!1}),kt.addEventListener("touchstart",Zr,{passive:!1}),function(){At.removeEventListener("touchstart",Pt),kt.removeEventListener("touchstart",Zr)}},[]);var co=ve.useRef();co.current=Dr;var cn=ve.useRef();cn.current=Mr,ve.useEffect(function(){if(kn){var Pt,At=function(dn){var _n=uo.current,zn=_n.dragging,wn=_n.pageY,Ft=_n.startTop;ye.Z.cancel(Pt);var $t=pr.current.getBoundingClientRect(),bn=at/(Ke?$t.width:$t.height);if(zn){var An=(ht(dn,Ke)-wn)*bn,Gt=Ft;!tr&&Ke?Gt-=An:Gt+=An;var sn=co.current,Bn=cn.current,Nn=Bn?Gt/Bn:0,qn=Math.ceil(Nn*sn);qn=Math.max(qn,0),qn=Math.min(qn,sn),Pt=(0,ye.Z)(function(){Ge(qn,Ke)})}},kt=function(){fn(!1),Ae()};return window.addEventListener("mousemove",At,{passive:!0}),window.addEventListener("touchmove",At,{passive:!0}),window.addEventListener("mouseup",kt,{passive:!0}),window.addEventListener("touchend",kt,{passive:!0}),function(){window.removeEventListener("mousemove",At),window.removeEventListener("touchmove",At),window.removeEventListener("mouseup",kt),window.removeEventListener("touchend",kt),ye.Z.cancel(Pt)}}},[kn]),ve.useEffect(function(){return st(),function(){clearTimeout(zi.current)}},[Ue]),ve.useImperativeHandle(Be,function(){return{delayHidden:st}});var $e="".concat(qe,"-scrollbar"),tt={position:"absolute",visibility:di?null:"hidden"},et={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ke?(tt.height=8,tt.left=0,tt.right=0,tt.bottom=0,et.height="100%",et.width=Ze,tr?et.left=xo:et.right=xo):(tt.width=8,tt.top=0,tt.bottom=0,tr?tt.right=0:tt.left=0,et.width="100%",et.height=Ze,et.top=xo),ve.createElement("div",{ref:pr,className:Se()($e,(0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat($e,"-horizontal"),Ke),"".concat($e,"-vertical"),!Ke),"".concat($e,"-visible"),di)),style:(0,Ie.Z)((0,Ie.Z)({},tt),xt),onMouseDown:Gr,onMouseMove:st},ve.createElement("div",{ref:cr,className:Se()("".concat($e,"-thumb"),(0,Te.Z)({},"".concat($e,"-thumb-moving"),kn)),style:(0,Ie.Z)((0,Ie.Z)({},et),tn),onMouseDown:Zr}))}),vt=Et,Rt=20;function jt(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,qe=ze/Be*ze;return isNaN(qe)&&(qe=0),qe=Math.max(qe,Rt),Math.floor(qe)}var un=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Vt=[],xn={overflowY:"auto",overflowAnchor:"none"};function Ut(ze,Be){var qe=ze.prefixCls,Qe=qe===void 0?"rc-virtual-list":qe,Ue=ze.className,Xe=ze.height,Re=ze.itemHeight,Ae=ze.fullHeight,Ge=Ae===void 0?!0:Ae,Ke=ze.style,Ze=ze.data,at=ze.children,xt=ze.itemKey,tn=ze.virtual,nn=ze.direction,Jt=ze.scrollWidth,mn=ze.component,kn=mn===void 0?"div":mn,fn=ze.onScroll,Mn=ze.onVirtualScroll,Zn=ze.onVisibleChange,Tn=ze.innerProps,ci=ze.extraRender,ai=ze.styles,ki=ze.showScrollBar,Ci=ki===void 0?"optional":ki,or=(0,_e.Z)(ze,un),tr=ve.useCallback(function(wr){return typeof xt=="function"?xt(wr):wr==null?void 0:wr[xt]},[xt]),pr=rt(tr,null,null),cr=(0,Ce.Z)(pr,4),to=cr[0],no=cr[1],di=cr[2],Cr=cr[3],zi=!!(tn!==!1&&Xe&&Re),st=ve.useMemo(function(){return Object.values(di.maps).reduce(function(wr,vr){return wr+vr},0)},[di.id,di.maps]),Dr=zi&&Ze&&(Math.max(Re*Ze.length,st)>Xe||!!Jt),Mr=nn==="rtl",xo=Se()(Qe,(0,Te.Z)({},"".concat(Qe,"-rtl"),Mr),Ue),Gr=Ze||Vt,uo=(0,ve.useRef)(),Zr=(0,ve.useRef)(),co=(0,ve.useRef)(),cn=(0,ve.useState)(0),$e=(0,Ce.Z)(cn,2),tt=$e[0],et=$e[1],Pt=(0,ve.useState)(0),At=(0,Ce.Z)(Pt,2),kt=At[0],Ct=At[1],dn=(0,ve.useState)(!1),_n=(0,Ce.Z)(dn,2),zn=_n[0],wn=_n[1],Ft=function(){wn(!0)},$t=function(){wn(!1)},bn={getKey:tr};function An(wr){et(function(vr){var Qi;typeof wr=="function"?Qi=wr(vr):Qi=wr;var Qr=hr(Qi);return uo.current.scrollTop=Qr,Qr})}var Gt=(0,ve.useRef)({start:0,end:Gr.length}),sn=(0,ve.useRef)(),Bn=le(Gr,tr),Nn=(0,Ce.Z)(Bn,1),qn=Nn[0];sn.current=qn;var Gn=ve.useMemo(function(){if(!zi)return{scrollHeight:void 0,start:0,end:Gr.length-1,offset:void 0};if(!Dr){var wr;return{scrollHeight:((wr=Zr.current)===null||wr===void 0?void 0:wr.offsetHeight)||0,start:0,end:Gr.length-1,offset:void 0}}for(var vr=0,Qi,Qr,Gi,Ui=Gr.length,qi=0;qi<Ui;qi+=1){var Xn=Gr[qi],qr=tr(Xn),_o=di.get(qr),Ko=vr+(_o===void 0?Re:_o);Ko>=tt&&Qi===void 0&&(Qi=qi,Qr=vr),Ko>tt+Xe&&Gi===void 0&&(Gi=qi),vr=Ko}return Qi===void 0&&(Qi=0,Qr=0,Gi=Math.ceil(Xe/Re)),Gi===void 0&&(Gi=Gr.length-1),Gi=Math.min(Gi+1,Gr.length-1),{scrollHeight:vr,start:Qi,end:Gi,offset:Qr}},[Dr,zi,tt,Gr,Cr,Xe]),Jn=Gn.scrollHeight,Dn=Gn.start,ri=Gn.end,Mi=Gn.offset;Gt.current.start=Dn,Gt.current.end=ri,ve.useLayoutEffect(function(){var wr=di.getRecord();if(wr.size===1){var vr=Array.from(wr)[0],Qi=tr(Gr[Dn]);if(Qi===vr){var Qr=di.get(vr),Gi=Qr-Re;An(function(Ui){return Ui+Gi})}}di.resetRecord()},[Jn]);var Hn=ve.useState({width:0,height:Xe}),oi=(0,Ce.Z)(Hn,2),Bi=oi[0],lr=oi[1],Ai=function(vr){lr({width:vr.offsetWidth,height:vr.offsetHeight})},an=(0,ve.useRef)(),si=(0,ve.useRef)(),wi=ve.useMemo(function(){return jt(Bi.width,Jt)},[Bi.width,Jt]),pi=ve.useMemo(function(){return jt(Bi.height,Jn)},[Bi.height,Jn]),Wi=Jn-Xe,Ni=(0,ve.useRef)(Wi);Ni.current=Wi;function hr(wr){var vr=wr;return Number.isNaN(Ni.current)||(vr=Math.min(vr,Ni.current)),vr=Math.max(vr,0),vr}var Fi=tt<=0,Ki=tt>=Wi,_r=kt<=0,On=kt>=Jt,Jr=ke(Fi,Ki,_r,On),In=function(){return{x:Mr?-kt:kt,y:tt}},Sr=(0,ve.useRef)(In()),fo=(0,ge.useEvent)(function(wr){if(Mn){var vr=(0,Ie.Z)((0,Ie.Z)({},In()),wr);(Sr.current.x!==vr.x||Sr.current.y!==vr.y)&&(Mn(vr),Sr.current=vr)}});function Pr(wr,vr){var Qi=wr;vr?((0,de.flushSync)(function(){Ct(Qi)}),fo()):An(Qi)}function Do(wr){var vr=wr.currentTarget.scrollTop;vr!==tt&&An(vr),fn==null||fn(wr),fo()}var ro=function(vr){var Qi=vr,Qr=Jt?Jt-Bi.width:0;return Qi=Math.max(Qi,0),Qi=Math.min(Qi,Qr),Qi},Yi=(0,ge.useEvent)(function(wr,vr){vr?((0,de.flushSync)(function(){Ct(function(Qi){var Qr=Qi+(Mr?-wr:wr);return ro(Qr)})}),fo()):An(function(Qi){var Qr=Qi+wr;return Qr})}),er=Ne(zi,Fi,Ki,_r,On,!!Jt,Yi),dr=(0,Ce.Z)(er,2),Tr=dr[0],hi=dr[1];ct(zi,uo,function(wr,vr,Qi,Qr){var Gi=Qr;return Jr(wr,vr,Qi)?!1:!Gi||!Gi._virtualHandled?(Gi&&(Gi._virtualHandled=!0),Tr({preventDefault:function(){},deltaX:wr?vr:0,deltaY:wr?0:vr}),!0):!1}),it(Dr,uo,function(wr){An(function(vr){return vr+wr})}),(0,ce.Z)(function(){function wr(Qi){var Qr=Fi&&Qi.detail<0,Gi=Ki&&Qi.detail>0;zi&&!Qr&&!Gi&&Qi.preventDefault()}var vr=uo.current;return vr.addEventListener("wheel",Tr,{passive:!1}),vr.addEventListener("DOMMouseScroll",hi,{passive:!0}),vr.addEventListener("MozMousePixelScroll",wr,{passive:!1}),function(){vr.removeEventListener("wheel",Tr),vr.removeEventListener("DOMMouseScroll",hi),vr.removeEventListener("MozMousePixelScroll",wr)}},[zi,Fi,Ki]),(0,ce.Z)(function(){if(Jt){var wr=ro(kt);Ct(wr),fo({x:wr})}},[Bi.width,Jt]);var Tt=function(){var vr,Qi;(vr=an.current)===null||vr===void 0||vr.delayHidden(),(Qi=si.current)===null||Qi===void 0||Qi.delayHidden()},xr=yt(uo,Gr,di,Re,tr,function(){return no(!0)},An,Tt);ve.useImperativeHandle(Be,function(){return{nativeElement:co.current,getScrollInfo:In,scrollTo:function(vr){function Qi(Qr){return Qr&&(0,me.Z)(Qr)==="object"&&("left"in Qr||"top"in Qr)}Qi(vr)?(vr.left!==void 0&&Ct(ro(vr.left)),xr(vr.top)):xr(vr)}}}),(0,ce.Z)(function(){if(Zn){var wr=Gr.slice(Dn,ri+1);Zn(wr,Gr)}},[Dn,ri,Gr]);var Po=je(Gr,tr,di,Re),Wo=ci==null?void 0:ci({start:Dn,end:ri,virtual:Dr,offsetX:kt,offsetY:Mi,rtl:Mr,getSize:Po}),Co=oe(Gr,Dn,ri,Jt,kt,to,at,bn),qo=null;Xe&&(qo=(0,Ie.Z)((0,Te.Z)({},Ge?"height":"maxHeight",Xe),xn),zi&&(qo.overflowY="hidden",Jt&&(qo.overflowX="hidden"),zn&&(qo.pointerEvents="none")));var Zo={};return Mr&&(Zo.dir="rtl"),ve.createElement("div",(0,Le.Z)({ref:co,style:(0,Ie.Z)((0,Ie.Z)({},Ke),{},{position:"relative"}),className:xo},Zo,or),ve.createElement(xe.Z,{onResize:Ai},ve.createElement(kn,{className:"".concat(Qe,"-holder"),style:qo,ref:uo,onScroll:Do,onMouseEnter:Tt},ve.createElement(z,{prefixCls:Qe,height:Jn,offsetX:kt,offsetY:Mi,scrollWidth:Jt,onInnerResize:no,ref:Zr,innerProps:Tn,rtl:Mr,extra:Wo},Co))),Dr&&Jn>Xe&&ve.createElement(vt,{ref:an,prefixCls:Qe,scrollOffset:tt,scrollRange:Jn,rtl:Mr,onScroll:Pr,onStartMove:Ft,onStopMove:$t,spinSize:pi,containerSize:Bi.height,style:ai==null?void 0:ai.verticalScrollBar,thumbStyle:ai==null?void 0:ai.verticalScrollBarThumb,showScrollBar:Ci}),Dr&&Jt>Bi.width&&ve.createElement(vt,{ref:si,prefixCls:Qe,scrollOffset:kt,scrollRange:Jt,rtl:Mr,onScroll:Pr,onStartMove:Ft,onStopMove:$t,spinSize:wi,containerSize:Bi.width,horizontal:!0,style:ai==null?void 0:ai.horizontalScrollBar,thumbStyle:ai==null?void 0:ai.horizontalScrollBarThumb,showScrollBar:Ci}))}var Zt=ve.forwardRef(Ut);Zt.displayName="List";var Xt=Zt,mt=Xt},7062:function(Pn,qt,Ee){var Le=Ee(19637),me=Ee(97573),Ie=[Ee(96627)];Pn.exports=Le.createStore(me,Ie)},96627:function(Pn,qt,Ee){Pn.exports=Le;function Le(){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(Pn){return Pn<10?"0"+Pn:Pn}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(Pn){return rx_escapable.lastIndex=0,rx_escapable.test(Pn)?'"'+Pn.replace(rx_escapable,function(qt){var Ee=meta[qt];return typeof Ee=="string"?Ee:"\\u"+("0000"+qt.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Pn+'"'}function str(Pn,qt){var Ee,Le,me,Ie,Te=gap,Ce,_e=qt[Pn];switch(_e&&typeof _e=="object"&&typeof _e.toJSON=="function"&&(_e=_e.toJSON(Pn)),typeof rep=="function"&&(_e=rep.call(qt,Pn,_e)),typeof _e){case"string":return quote(_e);case"number":return isFinite(_e)?String(_e):"null";case"boolean":case"null":return String(_e);case"object":if(!_e)return"null";if(gap+=indent,Ce=[],Object.prototype.toString.apply(_e)==="[object Array]"){for(Ie=_e.length,Ee=0;Ee<Ie;Ee+=1)Ce[Ee]=str(Ee,_e)||"null";return me=Ce.length===0?"[]":gap?`[
|
|
|
`+gap+Ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+Te+"]":"["+Ce.join(",")+"]",gap=Te,me}if(rep&&typeof rep=="object")for(Ie=rep.length,Ee=0;Ee<Ie;Ee+=1)typeof rep[Ee]=="string"&&(Le=rep[Ee],me=str(Le,_e),me&&Ce.push(quote(Le)+(gap?": ":":")+me));else for(Le in _e)Object.prototype.hasOwnProperty.call(_e,Le)&&(me=str(Le,_e),me&&Ce.push(quote(Le)+(gap?": ":":")+me));return me=Ce.length===0?"{}":gap?`{
|
|
|
`+gap+Ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+Te+"}":"{"+Ce.join(",")+"}",gap=Te,me}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(Pn,qt,Ee){var Le;if(gap="",indent="",typeof Ee=="number")for(Le=0;Le<Ee;Le+=1)indent+=" ";else typeof Ee=="string"&&(indent=Ee);if(rep=qt,qt&&typeof qt!="function"&&(typeof qt!="object"||typeof qt.length!="number"))throw new Error("JSON.stringify");return str("",{"":Pn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(Pn,qt){var Ee,Le,me=Pn[qt];if(me&&typeof me=="object")for(Ee in me)Object.prototype.hasOwnProperty.call(me,Ee)&&(Le=walk(me,Ee),Le!==void 0?me[Ee]=Le:delete me[Ee]);return reviver.call(Pn,qt,me)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(Pn){return"\\u"+("0000"+Pn.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(Pn,qt,Ee){var Le=Ee(67039),me=Le.slice,Ie=Le.pluck,Te=Le.each,Ce=Le.bind,_e=Le.create,he=Le.isList,Se=Le.isFunction,xe=Le.isObject;Pn.exports={createStore:ve};var ge={version:"2.0.12",enabled:!1,get:function(de,ue){var z=this.storage.read(this._namespacePrefix+de);return this._deserialize(z,ue)},set:function(de,ue){return ue===void 0?this.remove(de):(this.storage.write(this._namespacePrefix+de,this._serialize(ue)),ue)},remove:function(de){this.storage.remove(this._namespacePrefix+de)},each:function(de){var ue=this;this.storage.each(function(z,ee){de.call(ue,ue._deserialize(z),(ee||"").replace(ue._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 ce(){var de=typeof console=="undefined"?null:console;if(de){var ue=de.warn?de.warn:de.log;ue.apply(de,arguments)}}function ve(de,ue,z){z||(z=""),de&&!he(de)&&(de=[de]),ue&&!he(ue)&&(ue=[ue]);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(ye){try{var we="__storejs__test__";ye.write(we,we);var be=ye.read(we)===we;return ye.remove(we),be}catch(ke){return!1}},_assignPluginFnProp:function(ye,we){var be=this[we];this[we]=function(){var Ne=me(arguments,0),je=this;function Ve(){if(be)return Te(arguments,function(We,gt){Ne[gt]=We}),be.apply(je,Ne)}var Je=[Ve].concat(Ne);return ye.apply(je,Je)}},_serialize:function(ye){return JSON.stringify(ye)},_deserialize:function(ye,we){if(!ye)return we;var be="";try{be=JSON.parse(ye)}catch(ke){be=ye}return be!==void 0?be:we},_addStorage:function(ye){this.enabled||this._testStorage(ye)&&(this.storage=ye,this.enabled=!0)},_addPlugin:function(ye){var we=this;if(he(ye)){Te(ye,function(Ne){we._addPlugin(Ne)});return}var be=Ie(this.plugins,function(Ne){return ye===Ne});if(!be){if(this.plugins.push(ye),!Se(ye))throw new Error("Plugins must be function values that return objects");var ke=ye.call(this);if(!xe(ke))throw new Error("Plugins must return an object of function properties");Te(ke,function(Ne,je){if(!Se(Ne))throw new Error("Bad plugin property: "+je+" from plugin "+ye.name+". Plugins should only return functions.");we._assignPluginFnProp(Ne,je)})}},addStorage:function(ye){ce("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(ye)}},le=_e(se,ge,{plugins:[]});return le.raw={},Te(le,function(ye,we){Se(ye)&&(le.raw[we]=Ce(le,ye))}),Te(de,function(ye){le._addStorage(ye)}),Te(ue,function(ye){le._addPlugin(ye)}),le}},67039:function(Pn,qt,Ee){var Le=Ce(),me=_e(),Ie=he(),Te=typeof window!="undefined"?window:Ee.g;Pn.exports={assign:Le,create:me,trim:Ie,bind:Se,slice:xe,each:ge,map:ce,pluck:ve,isList:de,isFunction:ue,isObject:z,Global:Te};function Ce(){return Object.assign?Object.assign:function(oe,ie,se,le){for(var ye=1;ye<arguments.length;ye++)ge(Object(arguments[ye]),function(we,be){oe[be]=we});return oe}}function _e(){if(Object.create)return function(ie,se,le,ye){var we=xe(arguments,1);return Le.apply(this,[Object.create(ie)].concat(we))};{let oe=function(){};var ee=oe;return function(se,le,ye,we){var be=xe(arguments,1);return oe.prototype=se,Le.apply(this,[new oe].concat(be))}}}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 Se(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 ce(ee,oe){var ie=de(ee)?[]:{};return ve(ee,function(se,le){return ie[le]=oe(se,le),!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 ue(ee){return ee&&{}.toString.call(ee)==="[object Function]"}function z(ee){return ee&&{}.toString.call(ee)==="[object Object]"}},97573:function(Pn,qt,Ee){Pn.exports=[Ee(52496),Ee(16436),Ee(76673),Ee(35701),Ee(65578),Ee(65300)]},35701:function(Pn,qt,Ee){var Le=Ee(67039),me=Le.Global,Ie=Le.trim;Pn.exports={name:"cookieStorage",read:Ce,write:he,each:_e,remove:Se,clearAll:xe};var Te=me.document;function Ce(ce){if(!ce||!ge(ce))return null;var ve="(?:^|.*;\\s*)"+escape(ce).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Te.cookie.replace(new RegExp(ve),"$1"))}function _e(ce){for(var ve=Te.cookie.split(/; ?/g),de=ve.length-1;de>=0;de--)if(Ie(ve[de])){var ue=ve[de].split("="),z=unescape(ue[0]),ee=unescape(ue[1]);ce(ee,z)}}function he(ce,ve){ce&&(Te.cookie=escape(ce)+"="+escape(ve)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function Se(ce){!ce||!ge(ce)||(Te.cookie=escape(ce)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function xe(){_e(function(ce,ve){Se(ve)})}function ge(ce){return new RegExp("(?:^|;\\s*)"+escape(ce).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Te.cookie)}},52496:function(Pn,qt,Ee){var Le=Ee(67039),me=Le.Global;Pn.exports={name:"localStorage",read:Te,write:Ce,each:_e,remove:he,clearAll:Se};function Ie(){return me.localStorage}function Te(xe){return Ie().getItem(xe)}function Ce(xe,ge){return Ie().setItem(xe,ge)}function _e(xe){for(var ge=Ie().length-1;ge>=0;ge--){var ce=Ie().key(ge);xe(Te(ce),ce)}}function he(xe){return Ie().removeItem(xe)}function Se(){return Ie().clear()}},65300:function(Pn){Pn.exports={name:"memoryStorage",read:Ee,write:Le,each:me,remove:Ie,clearAll:Te};var qt={};function Ee(Ce){return qt[Ce]}function Le(Ce,_e){qt[Ce]=_e}function me(Ce){for(var _e in qt)qt.hasOwnProperty(_e)&&Ce(qt[_e],_e)}function Ie(Ce){delete qt[Ce]}function Te(Ce){qt={}}},16436:function(Pn,qt,Ee){var Le=Ee(67039),me=Le.Global;Pn.exports={name:"oldFF-globalStorage",read:Te,write:Ce,each:_e,remove:he,clearAll:Se};var Ie=me.globalStorage;function Te(xe){return Ie[xe]}function Ce(xe,ge){Ie[xe]=ge}function _e(xe){for(var ge=Ie.length-1;ge>=0;ge--){var ce=Ie.key(ge);xe(Ie[ce],ce)}}function he(xe){return Ie.removeItem(xe)}function Se(){_e(function(xe,ge){delete Ie[xe]})}},76673:function(Pn,qt,Ee){var Le=Ee(67039),me=Le.Global;Pn.exports={name:"oldIE-userDataStorage",write:he,read:Se,each:xe,remove:ge,clearAll:ce};var Ie="storejs",Te=me.document,Ce=ue(),_e=(me.navigator?me.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function he(z,ee){if(!_e){var oe=de(z);Ce(function(ie){ie.setAttribute(oe,ee),ie.save(Ie)})}}function Se(z){if(!_e){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(Ie)})}function ce(){Ce(function(z){var ee=z.XMLDocument.documentElement.attributes;z.load(Ie);for(var oe=ee.length-1;oe>=0;oe--)z.removeAttribute(ee[oe].name);z.save(Ie)})}var ve=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function de(z){return z.replace(/^\d/,"___$&").replace(ve,"___")}function ue(){if(!Te||!Te.documentElement||!Te.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=Te.createElement("div"),ee=Te.body}return function(se){var le=[].slice.call(arguments,0);le.unshift(ie),ee.appendChild(ie),ie.addBehavior("#default#userData"),ie.load(Ie),se.apply(this,le),ee.removeChild(ie)}}},65578:function(Pn,qt,Ee){var Le=Ee(67039),me=Le.Global;Pn.exports={name:"sessionStorage",read:Te,write:Ce,each:_e,remove:he,clearAll:Se};function Ie(){return me.sessionStorage}function Te(xe){return Ie().getItem(xe)}function Ce(xe,ge){return Ie().setItem(xe,ge)}function _e(xe){for(var ge=Ie().length-1;ge>=0;ge--){var ce=Ie().key(ge);xe(Te(ce),ce)}}function he(xe){return Ie().removeItem(xe)}function Se(){return Ie().clear()}},82059:function(Pn){var qt=arguments[3],Ee=arguments[4],Le=arguments[5],me=JSON.stringify;Pn.exports=function(Ie,Te){for(var Ce,_e=Object.keys(Le),he=0,Se=_e.length;he<Se;he++){var xe=_e[he],ge=Le[xe].exports;if(ge===Ie||ge&&ge.default===Ie){Ce=xe;break}}if(!Ce){Ce=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var ce={},he=0,Se=_e.length;he<Se;he++){var xe=_e[he];ce[xe]=xe}Ee[Ce]=["function(require,module,exports){"+Ie+"(self); }",ce]}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 ue={};z(ve);function z(ye){ue[ye]=!0;for(var we in Ee[ye][1]){var be=Ee[ye][1][we];ue[be]||z(be)}}var ee="("+qt+")({"+Object.keys(ue).map(function(ye){return me(ye)+":["+Ee[ye][0]+","+me(Ee[ye][1])+"]"}).join(",")+"},{},["+me(ve)+"])",oe=window.URL||window.webkitURL||window.mozURL||window.msURL,ie=new Blob([ee],{type:"text/javascript"});if(Te&&Te.bare)return ie;var se=oe.createObjectURL(ie),le=new Worker(se);return le.objectURL=se,le}},34376:function(Pn){(function(qt,Ee){if(1)Pn.exports=Ee();else var Le,me})(window,function(){return function(qt){var Ee={};function Le(me){if(Ee[me])return Ee[me].exports;var Ie=Ee[me]={i:me,l:!1,exports:{}};return qt[me].call(Ie.exports,Ie,Ie.exports,Le),Ie.l=!0,Ie.exports}return Le.m=qt,Le.c=Ee,Le.d=function(me,Ie,Te){Le.o(me,Ie)||Object.defineProperty(me,Ie,{enumerable:!0,get:Te})},Le.r=function(me){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(me,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(me,"__esModule",{value:!0})},Le.t=function(me,Ie){if(1&Ie&&(me=Le(me)),8&Ie||4&Ie&&typeof me=="object"&&me&&me.__esModule)return me;var Te=Object.create(null);if(Le.r(Te),Object.defineProperty(Te,"default",{enumerable:!0,value:me}),2&Ie&&typeof me!="string")for(var Ce in me)Le.d(Te,Ce,function(_e){return me[_e]}.bind(null,Ce));return Te},Le.n=function(me){var Ie=me&&me.__esModule?function(){return me.default}:function(){return me};return Le.d(Ie,"a",Ie),Ie},Le.o=function(me,Ie){return Object.prototype.hasOwnProperty.call(me,Ie)},Le.p="",Le(Le.s=34)}([function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.forwardEvent=Ee.EventEmitter=void 0;var me=function(){function Ie(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Ie.prototype,"event",{get:function(){var Te=this;return this._event||(this._event=function(Ce){return Te._listeners.push(Ce),{dispose:function(){if(!Te._disposed){for(var _e=0;_e<Te._listeners.length;_e++)if(Te._listeners[_e]===Ce)return void Te._listeners.splice(_e,1)}}}}),this._event},enumerable:!1,configurable:!0}),Ie.prototype.fire=function(Te,Ce){for(var _e=[],he=0;he<this._listeners.length;he++)_e.push(this._listeners[he]);for(he=0;he<_e.length;he++)_e[he].call(void 0,Te,Ce)},Ie.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Ie}();Ee.EventEmitter=me,Ee.forwardEvent=function(Ie,Te){return Ie(function(Ce){return Te.fire(Ce)})}},function(qt,Ee,Le){"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=Le(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(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getDisposeArrayDisposable=Ee.disposeArray=Ee.Disposable=void 0;var me=function(){function Te(){this._disposables=[],this._isDisposed=!1}return Te.prototype.dispose=function(){this._isDisposed=!0;for(var Ce=0,_e=this._disposables;Ce<_e.length;Ce++)_e[Ce].dispose();this._disposables.length=0},Te.prototype.register=function(Ce){return this._disposables.push(Ce),Ce},Te.prototype.unregister=function(Ce){var _e=this._disposables.indexOf(Ce);_e!==-1&&this._disposables.splice(_e,1)},Te}();function Ie(Te){for(var Ce=0,_e=Te;Ce<_e.length;Ce++)_e[Ce].dispose();Te.length=0}Ee.Disposable=me,Ee.disposeArray=Ie,Ee.getDisposeArrayDisposable=function(Te){return{dispose:function(){return Ie(Te)}}}},function(qt,Ee,Le){"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(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Se,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,ce){ge.__proto__=ce}||function(ge,ce){for(var ve in ce)ce.hasOwnProperty(ve)&&(ge[ve]=ce[ve])})(Se,xe)},function(Se,xe){function ge(){this.constructor=Se}me(Se,xe),Se.prototype=xe===null?Object.create(xe):(ge.prototype=xe.prototype,new ge)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CellData=void 0;var Te=Le(8),Ce=Le(3),_e=Le(6),he=function(Se){function xe(){var ge=Se!==null&&Se.apply(this,arguments)||this;return ge.content=0,ge.fg=0,ge.bg=0,ge.extended=new _e.ExtendedAttrs,ge.combinedData="",ge}return Ie(xe,Se),xe.fromCharData=function(ge){var ce=new xe;return ce.setFromCharData(ge),ce},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?Te.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 ce=!1;if(ge[Ce.CHAR_DATA_CHAR_INDEX].length>2)ce=!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:ce=!0}else ce=!0}else this.content=ge[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|ge[Ce.CHAR_DATA_WIDTH_INDEX]<<22;ce&&(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}(_e.AttributeData);Ee.CellData=he},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ISoundService=Ee.ISelectionService=Ee.IRenderService=Ee.IMouseService=Ee.ICoreBrowserService=Ee.ICharSizeService=void 0;var me=Le(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(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ExtendedAttrs=Ee.AttributeData=void 0;var me=function(){function Te(){this.fg=0,this.bg=0,this.extended=new Ie}return Te.toColorRGB=function(Ce){return[Ce>>>16&255,Ce>>>8&255,255&Ce]},Te.fromColorRGB=function(Ce){return(255&Ce[0])<<16|(255&Ce[1])<<8|255&Ce[2]},Te.prototype.clone=function(){var Ce=new Te;return Ce.fg=this.fg,Ce.bg=this.bg,Ce.extended=this.extended.clone(),Ce},Te.prototype.isInverse=function(){return 67108864&this.fg},Te.prototype.isBold=function(){return 134217728&this.fg},Te.prototype.isUnderline=function(){return 268435456&this.fg},Te.prototype.isBlink=function(){return 536870912&this.fg},Te.prototype.isInvisible=function(){return 1073741824&this.fg},Te.prototype.isItalic=function(){return 67108864&this.bg},Te.prototype.isDim=function(){return 134217728&this.bg},Te.prototype.getFgColorMode=function(){return 50331648&this.fg},Te.prototype.getBgColorMode=function(){return 50331648&this.bg},Te.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},Te.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},Te.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},Te.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},Te.prototype.isFgDefault=function(){return(50331648&this.fg)==0},Te.prototype.isBgDefault=function(){return(50331648&this.bg)==0},Te.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},Te.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},Te.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},Te.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},Te.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},Te.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()},Te.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},Te.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},Te.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},Te.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},Te.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},Te}();Ee.AttributeData=me;var Ie=function(){function Te(Ce,_e){Ce===void 0&&(Ce=0),_e===void 0&&(_e=-1),this.underlineStyle=Ce,this.underlineColor=_e}return Te.prototype.clone=function(){return new Te(this.underlineStyle,this.underlineColor)},Te.prototype.isEmpty=function(){return this.underlineStyle===0},Te}();Ee.ExtendedAttrs=Ie},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.addDisposableDomListener=void 0,Ee.addDisposableDomListener=function(me,Ie,Te,Ce){me.addEventListener(Ie,Te,Ce);var _e=!1;return{dispose:function(){_e||(_e=!0,me.removeEventListener(Ie,Te,Ce))}}}},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Utf8ToUtf32=Ee.StringToUtf32=Ee.utf32ToString=Ee.stringFromCodePoint=void 0,Ee.stringFromCodePoint=function(Te){return Te>65535?(Te-=65536,String.fromCharCode(55296+(Te>>10))+String.fromCharCode(Te%1024+56320)):String.fromCharCode(Te)},Ee.utf32ToString=function(Te,Ce,_e){Ce===void 0&&(Ce=0),_e===void 0&&(_e=Te.length);for(var he="",Se=Ce;Se<_e;++Se){var xe=Te[Se];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 Te(){this._interim=0}return Te.prototype.clear=function(){this._interim=0},Te.prototype.decode=function(Ce,_e){var he=Ce.length;if(!he)return 0;var Se=0,xe=0;this._interim&&(56320<=(ve=Ce.charCodeAt(xe++))&&ve<=57343?_e[Se++]=1024*(this._interim-55296)+ve-56320+65536:(_e[Se++]=this._interim,_e[Se++]=ve),this._interim=0);for(var ge=xe;ge<he;++ge){var ce=Ce.charCodeAt(ge);if(55296<=ce&&ce<=56319){if(++ge>=he)return this._interim=ce,Se;var ve;56320<=(ve=Ce.charCodeAt(ge))&&ve<=57343?_e[Se++]=1024*(ce-55296)+ve-56320+65536:(_e[Se++]=ce,_e[Se++]=ve)}else _e[Se++]=ce}return Se},Te}();Ee.StringToUtf32=me;var Ie=function(){function Te(){this.interim=new Uint8Array(3)}return Te.prototype.clear=function(){this.interim.fill(0)},Te.prototype.decode=function(Ce,_e){var he=Ce.length;if(!he)return 0;var Se,xe,ge,ce,ve=0,de=0,ue=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,le=se-oe;ue<le;){if(ue>=he)return 0;if((192&(ie=Ce[ue++]))!=128){ue--,z=!0;break}this.interim[oe++]=ie,ee<<=6,ee|=63&ie}z||(se===2?ee<128?ue--:_e[ve++]=ee:se===3?ee<2048||ee>=55296&&ee<=57343||(_e[ve++]=ee):ee<65536||ee>1114111||(_e[ve++]=ee)),this.interim.fill(0)}for(var ye=he-4,we=ue;we<he;){for(;!(!(we<ye)||128&(Se=Ce[we])||128&(xe=Ce[we+1])||128&(ge=Ce[we+2])||128&(ce=Ce[we+3]));)_e[ve++]=Se,_e[ve++]=xe,_e[ve++]=ge,_e[ve++]=ce,we+=4;if((Se=Ce[we++])<128)_e[ve++]=Se;else if((224&Se)==192){if(we>=he)return this.interim[0]=Se,ve;if((192&(xe=Ce[we++]))!=128){we--;continue}if((de=(31&Se)<<6|63&xe)<128){we--;continue}_e[ve++]=de}else if((240&Se)==224){if(we>=he)return this.interim[0]=Se,ve;if((192&(xe=Ce[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=Se,this.interim[1]=xe,ve;if((192&(ge=Ce[we++]))!=128){we--;continue}if((de=(15&Se)<<12|(63&xe)<<6|63&ge)<2048||de>=55296&&de<=57343)continue;_e[ve++]=de}else if((248&Se)==240){if(we>=he)return this.interim[0]=Se,ve;if((192&(xe=Ce[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=Se,this.interim[1]=xe,ve;if((192&(ge=Ce[we++]))!=128){we--;continue}if(we>=he)return this.interim[0]=Se,this.interim[1]=xe,this.interim[2]=ge,ve;if((192&(ce=Ce[we++]))!=128){we--;continue}if((de=(7&Se)<<18|(63&xe)<<12|(63&ge)<<6|63&ce)<65536||de>1114111)continue;_e[ve++]=de}}return ve},Te}();Ee.Utf8ToUtf32=Ie},function(qt,Ee,Le){"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(qt,Ee,Le){"use strict";var me,Ie,Te,Ce;function _e(Se){var xe=Se.toString(16);return xe.length<2?"0"+xe:xe}function he(Se,xe){return Se<xe?(xe+.05)/(Se+.05):(Se+.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(Se){Se.toCss=function(xe,ge,ce,ve){return ve!==void 0?"#"+_e(xe)+_e(ge)+_e(ce)+_e(ve):"#"+_e(xe)+_e(ge)+_e(ce)},Se.toRgba=function(xe,ge,ce,ve){return ve===void 0&&(ve=255),(xe<<24|ge<<16|ce<<8|ve)>>>0}}(me=Ee.channels||(Ee.channels={})),(Ie=Ee.color||(Ee.color={})).blend=function(Se,xe){var ge=(255&xe.rgba)/255;if(ge===1)return{css:xe.css,rgba:xe.rgba};var ce=xe.rgba>>24&255,ve=xe.rgba>>16&255,de=xe.rgba>>8&255,ue=Se.rgba>>24&255,z=Se.rgba>>16&255,ee=Se.rgba>>8&255,oe=ue+Math.round((ce-ue)*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)}},Ie.isOpaque=function(Se){return(255&Se.rgba)==255},Ie.ensureContrastRatio=function(Se,xe,ge){var ce=Ce.ensureContrastRatio(Se.rgba,xe.rgba,ge);if(ce)return Ce.toColor(ce>>24&255,ce>>16&255,ce>>8&255)},Ie.opaque=function(Se){var xe=(255|Se.rgba)>>>0,ge=Ce.toChannels(xe),ce=ge[0],ve=ge[1],de=ge[2];return{css:me.toCss(ce,ve,de),rgba:xe}},Ie.opacity=function(Se,xe){var ge=Math.round(255*xe),ce=Ce.toChannels(Se.rgba),ve=ce[0],de=ce[1],ue=ce[2];return{css:me.toCss(ve,de,ue,ge),rgba:me.toRgba(ve,de,ue,ge)}},(Ee.css||(Ee.css={})).toColor=function(Se){switch(Se.length){case 7:return{css:Se,rgba:(parseInt(Se.slice(1),16)<<8|255)>>>0};case 9:return{css:Se,rgba:parseInt(Se.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(Se){function xe(ge,ce,ve){var de=ge/255,ue=ce/255,z=ve/255;return .2126*(de<=.03928?de/12.92:Math.pow((de+.055)/1.055,2.4))+.7152*(ue<=.03928?ue/12.92:Math.pow((ue+.055)/1.055,2.4))+.0722*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))}Se.relativeLuminance=function(ge){return xe(ge>>16&255,ge>>8&255,255&ge)},Se.relativeLuminance2=xe}(Te=Ee.rgb||(Ee.rgb={})),function(Se){function xe(ce,ve,de){for(var ue=ce>>24&255,z=ce>>16&255,ee=ce>>8&255,oe=ve>>24&255,ie=ve>>16&255,se=ve>>8&255,le=he(Te.relativeLuminance2(oe,se,ie),Te.relativeLuminance2(ue,z,ee));le<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)),le=he(Te.relativeLuminance2(oe,se,ie),Te.relativeLuminance2(ue,z,ee));return(oe<<24|ie<<16|se<<8|255)>>>0}function ge(ce,ve,de){for(var ue=ce>>24&255,z=ce>>16&255,ee=ce>>8&255,oe=ve>>24&255,ie=ve>>16&255,se=ve>>8&255,le=he(Te.relativeLuminance2(oe,se,ie),Te.relativeLuminance2(ue,z,ee));le<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))),le=he(Te.relativeLuminance2(oe,se,ie),Te.relativeLuminance2(ue,z,ee));return(oe<<24|ie<<16|se<<8|255)>>>0}Se.ensureContrastRatio=function(ce,ve,de){var ue=Te.relativeLuminance(ce>>8),z=Te.relativeLuminance(ve>>8);if(he(ue,z)<de)return z<ue?xe(ce,ve,de):ge(ce,ve,de)},Se.reduceLuminance=xe,Se.increaseLuminance=ge,Se.toChannels=function(ce){return[ce>>24&255,ce>>16&255,ce>>8&255,255&ce]},Se.toColor=function(ce,ve,de){return{css:me.toCss(ce,ve,de),rgba:me.toRgba(ce,ve,de)}}}(Ce=Ee.rgba||(Ee.rgba={})),Ee.toPaddedHex=_e,Ee.contrastRatio=he},function(qt,Ee,Le){"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",Ie=me?"node":navigator.userAgent,Te=me?"node":navigator.platform;function Ce(_e,he){return _e.indexOf(he)>=0}Ee.isFirefox=!!~Ie.indexOf("Firefox"),Ee.isSafari=/^((?!chrome|android).)*safari/i.test(Ie),Ee.isMac=Ce(["Macintosh","MacIntel","MacPPC","Mac68K"],Te),Ee.isIpad=Te==="iPad",Ee.isIphone=Te==="iPhone",Ee.isWindows=Ce(["Windows","Win16","Win32","WinCE"],Te),Ee.isLinux=Te.indexOf("Linux")>=0},function(qt,Ee,Le){"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(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BaseRenderLayer=void 0;var me=Le(3),Ie=Le(9),Te=Le(25),Ce=Le(6),_e=Le(28),he=Le(10),Se=Le(17),xe=function(){function ge(ce,ve,de,ue,z,ee,oe,ie){this._container=ce,this._alpha=ue,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 ce;Se.removeElementFromParent(this._canvas),(ce=this._charAtlas)===null||ce===void 0||ce.dispose()},ge.prototype._initCanvas=function(){this._ctx=_e.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(ce,ve){},ge.prototype.onSelectionChanged=function(ce,ve,de){de===void 0&&(de=!1)},ge.prototype.setColors=function(ce){this._refreshCharAtlas(ce)},ge.prototype._setTransparency=function(ce){if(ce!==this._alpha){var ve=this._canvas;this._alpha=ce,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(ce){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=Te.acquireCharAtlas(this._optionsService.options,this._rendererId,ce,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},ge.prototype.resize=function(ce){this._scaledCellWidth=ce.scaledCellWidth,this._scaledCellHeight=ce.scaledCellHeight,this._scaledCharWidth=ce.scaledCharWidth,this._scaledCharHeight=ce.scaledCharHeight,this._scaledCharLeft=ce.scaledCharLeft,this._scaledCharTop=ce.scaledCharTop,this._canvas.width=ce.scaledCanvasWidth,this._canvas.height=ce.scaledCanvasHeight,this._canvas.style.width=ce.canvasWidth+"px",this._canvas.style.height=ce.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},ge.prototype._fillCells=function(ce,ve,de,ue){this._ctx.fillRect(ce*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ue*this._scaledCellHeight)},ge.prototype._fillBottomLineAtCells=function(ce,ve,de){de===void 0&&(de=1),this._ctx.fillRect(ce*this._scaledCellWidth,(ve+1)*this._scaledCellHeight-window.devicePixelRatio-1,de*this._scaledCellWidth,window.devicePixelRatio)},ge.prototype._fillLeftLineAtCell=function(ce,ve,de){this._ctx.fillRect(ce*this._scaledCellWidth,ve*this._scaledCellHeight,window.devicePixelRatio*de,this._scaledCellHeight)},ge.prototype._strokeRectAtCell=function(ce,ve,de,ue){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(ce*this._scaledCellWidth+window.devicePixelRatio/2,ve*this._scaledCellHeight+window.devicePixelRatio/2,de*this._scaledCellWidth-window.devicePixelRatio,ue*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(ce,ve,de,ue){this._alpha?this._ctx.clearRect(ce*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ue*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(ce*this._scaledCellWidth,ve*this._scaledCellHeight,de*this._scaledCellWidth,ue*this._scaledCellHeight))},ge.prototype._fillCharTrueColor=function(ce,ve,de){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(de),this._ctx.fillText(ce.getChars(),ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},ge.prototype._drawChars=function(ce,ve,de){var ue,z,ee=this._getContrastColor(ce);ee||ce.isFgRGB()||ce.isBgRGB()?this._drawUncachedChars(ce,ve,de,ee):(ce.isInverse()?(ue=ce.isBgDefault()?Ie.INVERTED_DEFAULT_COLOR:ce.getBgColor(),z=ce.isFgDefault()?Ie.INVERTED_DEFAULT_COLOR:ce.getFgColor()):(z=ce.isBgDefault()?me.DEFAULT_COLOR:ce.getBgColor(),ue=ce.isFgDefault()?me.DEFAULT_COLOR:ce.getFgColor()),ue+=this._optionsService.options.drawBoldTextInBrightColors&&ce.isBold()&&ue<8?8:0,this._currentGlyphIdentifier.chars=ce.getChars()||me.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=ce.getCode()||me.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=z,this._currentGlyphIdentifier.fg=ue,this._currentGlyphIdentifier.bold=!!ce.isBold(),this._currentGlyphIdentifier.dim=!!ce.isDim(),this._currentGlyphIdentifier.italic=!!ce.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(ce,ve,de))},ge.prototype._drawUncachedChars=function(ce,ve,de,ue){if(this._ctx.save(),this._ctx.font=this._getFont(!!ce.isBold(),!!ce.isItalic()),this._ctx.textBaseline="middle",ce.isInverse())if(ue)this._ctx.fillStyle=ue.css;else if(ce.isBgDefault())this._ctx.fillStyle=he.color.opaque(this._colors.background).css;else if(ce.isBgRGB())this._ctx.fillStyle="rgb("+Ce.AttributeData.toColorRGB(ce.getBgColor()).join(",")+")";else{var z=ce.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&ce.isBold()&&z<8&&(z+=8),this._ctx.fillStyle=this._colors.ansi[z].css}else if(ue)this._ctx.fillStyle=ue.css;else if(ce.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(ce.isFgRGB())this._ctx.fillStyle="rgb("+Ce.AttributeData.toColorRGB(ce.getFgColor()).join(",")+")";else{var ee=ce.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&ce.isBold()&&ee<8&&(ee+=8),this._ctx.fillStyle=this._colors.ansi[ee].css}this._clipRow(de),ce.isDim()&&(this._ctx.globalAlpha=Ie.DIM_OPACITY),this._ctx.fillText(ce.getChars(),ve*this._scaledCellWidth+this._scaledCharLeft,de*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},ge.prototype._clipRow=function(ce){this._ctx.beginPath(),this._ctx.rect(0,ce*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},ge.prototype._getFont=function(ce,ve){return(ve?"italic":"")+" "+(ce?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},ge.prototype._getContrastColor=function(ce){if(this._optionsService.options.minimumContrastRatio!==1){var ve=this._colors.contrastCache.getColor(ce.bg,ce.fg);if(ve!==void 0)return ve||void 0;var de=ce.getFgColor(),ue=ce.getFgColorMode(),z=ce.getBgColor(),ee=ce.getBgColorMode(),oe=!!ce.isInverse(),ie=!!ce.isInverse();if(oe){var se=de;de=z,z=se;var le=ue;ue=ee,ee=le}var ye=this._resolveBackgroundRgba(ee,z,oe),we=this._resolveForegroundRgba(ue,de,oe,ie),be=he.rgba.ensureContrastRatio(ye,we,this._optionsService.options.minimumContrastRatio);if(be){var ke={css:he.channels.toCss(be>>24&255,be>>16&255,be>>8&255),rgba:be};return this._colors.contrastCache.setColor(ce.bg,ce.fg,ke),ke}this._colors.contrastCache.setColor(ce.bg,ce.fg,null)}},ge.prototype._resolveBackgroundRgba=function(ce,ve,de){switch(ce){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(ce,ve,de,ue){switch(ce){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&ue&&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(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.createDecorator=Ee.getServiceDependencies=Ee.serviceRegistry=void 0;function me(Ie,Te,Ce){Te.di$target===Te?Te.di$dependencies.push({id:Ie,index:Ce}):(Te.di$dependencies=[{id:Ie,index:Ce}],Te.di$target=Te)}Ee.serviceRegistry=new Map,Ee.getServiceDependencies=function(Ie){return Ie.di$dependencies||[]},Ee.createDecorator=function(Ie){if(Ee.serviceRegistry.has(Ie))return Ee.serviceRegistry.get(Ie);var Te=function(Ce,_e,he){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");me(Te,Ce,he)};return Te.toString=function(){return Ie},Ee.serviceRegistry.set(Ie,Te),Te}},function(qt,Ee,Le){"use strict";function me(Ie,Te,Ce,_e){if(Ce===void 0&&(Ce=0),_e===void 0&&(_e=Ie.length),Ce>=Ie.length)return Ie;Ce=(Ie.length+Ce)%Ie.length,_e=_e>=Ie.length?Ie.length:(Ie.length+_e)%Ie.length;for(var he=Ce;he<_e;++he)Ie[he]=Te;return Ie}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.concat=Ee.fillFallback=Ee.fill=void 0,Ee.fill=function(Ie,Te,Ce,_e){return Ie.fill?Ie.fill(Te,Ce,_e):me(Ie,Te,Ce,_e)},Ee.fillFallback=me,Ee.concat=function(Ie,Te){var Ce=new Ie.constructor(Ie.length+Te.length);return Ce.set(Ie),Ce.set(Te,Ie.length),Ce}},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferLine=Ee.DEFAULT_ATTR_DATA=void 0;var me=Le(8),Ie=Le(3),Te=Le(4),Ce=Le(6);Ee.DEFAULT_ATTR_DATA=Object.freeze(new Ce.AttributeData);var _e=function(){function he(Se,xe,ge){ge===void 0&&(ge=!1),this.isWrapped=ge,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*Se);for(var ce=xe||Te.CellData.fromCharData([0,Ie.NULL_CELL_CHAR,Ie.NULL_CELL_WIDTH,Ie.NULL_CELL_CODE]),ve=0;ve<Se;++ve)this.setCell(ve,ce);this.length=Se}return he.prototype.get=function(Se){var xe=this._data[3*Se+0],ge=2097151&xe;return[this._data[3*Se+1],2097152&xe?this._combined[Se]:ge?me.stringFromCodePoint(ge):"",xe>>22,2097152&xe?this._combined[Se].charCodeAt(this._combined[Se].length-1):ge]},he.prototype.set=function(Se,xe){this._data[3*Se+1]=xe[Ie.CHAR_DATA_ATTR_INDEX],xe[Ie.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[Se]=xe[1],this._data[3*Se+0]=2097152|Se|xe[Ie.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*Se+0]=xe[Ie.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|xe[Ie.CHAR_DATA_WIDTH_INDEX]<<22},he.prototype.getWidth=function(Se){return this._data[3*Se+0]>>22},he.prototype.hasWidth=function(Se){return 12582912&this._data[3*Se+0]},he.prototype.getFg=function(Se){return this._data[3*Se+1]},he.prototype.getBg=function(Se){return this._data[3*Se+2]},he.prototype.hasContent=function(Se){return 4194303&this._data[3*Se+0]},he.prototype.getCodePoint=function(Se){var xe=this._data[3*Se+0];return 2097152&xe?this._combined[Se].charCodeAt(this._combined[Se].length-1):2097151&xe},he.prototype.isCombined=function(Se){return 2097152&this._data[3*Se+0]},he.prototype.getString=function(Se){var xe=this._data[3*Se+0];return 2097152&xe?this._combined[Se]:2097151&xe?me.stringFromCodePoint(2097151&xe):""},he.prototype.loadCell=function(Se,xe){var ge=3*Se;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[Se]),268435456&xe.bg&&(xe.extended=this._extendedAttrs[Se]),xe},he.prototype.setCell=function(Se,xe){2097152&xe.content&&(this._combined[Se]=xe.combinedData),268435456&xe.bg&&(this._extendedAttrs[Se]=xe.extended),this._data[3*Se+0]=xe.content,this._data[3*Se+1]=xe.fg,this._data[3*Se+2]=xe.bg},he.prototype.setCellFromCodePoint=function(Se,xe,ge,ce,ve,de){268435456&ve&&(this._extendedAttrs[Se]=de),this._data[3*Se+0]=xe|ge<<22,this._data[3*Se+1]=ce,this._data[3*Se+2]=ve},he.prototype.addCodepointToCell=function(Se,xe){var ge=this._data[3*Se+0];2097152&ge?this._combined[Se]+=me.stringFromCodePoint(xe):(2097151&ge?(this._combined[Se]=me.stringFromCodePoint(2097151&ge)+me.stringFromCodePoint(xe),ge&=-2097152,ge|=2097152):ge=xe|1<<22,this._data[3*Se+0]=ge)},he.prototype.insertCells=function(Se,xe,ge,ce){if((Se%=this.length)&&this.getWidth(Se-1)===2&&this.setCellFromCodePoint(Se-1,0,1,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new Ce.ExtendedAttrs),xe<this.length-Se){for(var ve=new Te.CellData,de=this.length-Se-xe-1;de>=0;--de)this.setCell(Se+xe+de,this.loadCell(Se+de,ve));for(de=0;de<xe;++de)this.setCell(Se+de,ge)}else for(de=Se;de<this.length;++de)this.setCell(de,ge);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new Ce.ExtendedAttrs)},he.prototype.deleteCells=function(Se,xe,ge,ce){if(Se%=this.length,xe<this.length-Se){for(var ve=new Te.CellData,de=0;de<this.length-Se-xe;++de)this.setCell(Se+de,this.loadCell(Se+xe+de,ve));for(de=this.length-xe;de<this.length;++de)this.setCell(de,ge)}else for(de=Se;de<this.length;++de)this.setCell(de,ge);Se&&this.getWidth(Se-1)===2&&this.setCellFromCodePoint(Se-1,0,1,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new Ce.ExtendedAttrs),this.getWidth(Se)!==0||this.hasContent(Se)||this.setCellFromCodePoint(Se,0,1,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new Ce.ExtendedAttrs)},he.prototype.replaceCells=function(Se,xe,ge,ce){for(Se&&this.getWidth(Se-1)===2&&this.setCellFromCodePoint(Se-1,0,1,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new Ce.ExtendedAttrs),xe<this.length&&this.getWidth(xe-1)===2&&this.setCellFromCodePoint(xe,0,1,(ce==null?void 0:ce.fg)||0,(ce==null?void 0:ce.bg)||0,(ce==null?void 0:ce.extended)||new Ce.ExtendedAttrs);Se<xe&&Se<this.length;)this.setCell(Se++,ge)},he.prototype.resize=function(Se,xe){if(Se!==this.length){if(Se>this.length){var ge=new Uint32Array(3*Se);this.length&&(3*Se<this._data.length?ge.set(this._data.subarray(0,3*Se)):ge.set(this._data)),this._data=ge;for(var ce=this.length;ce<Se;++ce)this.setCell(ce,xe)}else if(Se){(ge=new Uint32Array(3*Se)).set(this._data.subarray(0,3*Se)),this._data=ge;var ve=Object.keys(this._combined);for(ce=0;ce<ve.length;ce++){var de=parseInt(ve[ce],10);de>=Se&&delete this._combined[de]}}else this._data=new Uint32Array(0),this._combined={};this.length=Se}},he.prototype.fill=function(Se){this._combined={},this._extendedAttrs={};for(var xe=0;xe<this.length;++xe)this.setCell(xe,Se)},he.prototype.copyFrom=function(Se){for(var xe in this.length!==Se.length?this._data=new Uint32Array(Se._data):this._data.set(Se._data),this.length=Se.length,this._combined={},Se._combined)this._combined[xe]=Se._combined[xe];for(var xe in this._extendedAttrs={},Se._extendedAttrs)this._extendedAttrs[xe]=Se._extendedAttrs[xe];this.isWrapped=Se.isWrapped},he.prototype.clone=function(){var Se=new he(0);for(var xe in Se._data=new Uint32Array(this._data),Se.length=this.length,this._combined)Se._combined[xe]=this._combined[xe];for(var xe in this._extendedAttrs)Se._extendedAttrs[xe]=this._extendedAttrs[xe];return Se.isWrapped=this.isWrapped,Se},he.prototype.getTrimmedLength=function(){for(var Se=this.length-1;Se>=0;--Se)if(4194303&this._data[3*Se+0])return Se+(this._data[3*Se+0]>>22);return 0},he.prototype.copyCellsFrom=function(Se,xe,ge,ce,ve){var de=Se._data;if(ve)for(var ue=ce-1;ue>=0;ue--)for(var z=0;z<3;z++)this._data[3*(ge+ue)+z]=de[3*(xe+ue)+z];else for(ue=0;ue<ce;ue++)for(z=0;z<3;z++)this._data[3*(ge+ue)+z]=de[3*(xe+ue)+z];var ee=Object.keys(Se._combined);for(z=0;z<ee.length;z++){var oe=parseInt(ee[z],10);oe>=xe&&(this._combined[oe-xe+ge]=Se._combined[oe])}},he.prototype.translateToString=function(Se,xe,ge){Se===void 0&&(Se=!1),xe===void 0&&(xe=0),ge===void 0&&(ge=this.length),Se&&(ge=Math.min(ge,this.getTrimmedLength()));for(var ce="";xe<ge;){var ve=this._data[3*xe+0],de=2097151&ve;ce+=2097152&ve?this._combined[xe]:de?me.stringFromCodePoint(de):Ie.WHITESPACE_CELL_CHAR,xe+=ve>>22||1}return ce},he}();Ee.BufferLine=_e},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.removeElementFromParent=void 0,Ee.removeElementFromParent=function(){for(var me,Ie=[],Te=0;Te<arguments.length;Te++)Ie[Te]=arguments[Te];for(var Ce=0,_e=Ie;Ce<_e.length;Ce++){var he=_e[Ce];(me=he==null?void 0:he.parentElement)===null||me===void 0||me.removeChild(he)}}},function(qt,Ee,Le){"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(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(we,be){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ke,Ne){ke.__proto__=Ne}||function(ke,Ne){for(var je in Ne)Ne.hasOwnProperty(je)&&(ke[je]=Ne[je])})(we,be)},function(we,be){function ke(){this.constructor=we}me(we,be),we.prototype=be===null?Object.create(be):(ke.prototype=be.prototype,new ke)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InputHandler=Ee.WindowsOptionsReportType=void 0;var Te,Ce=Le(12),_e=Le(20),he=Le(39),Se=Le(2),xe=Le(15),ge=Le(8),ce=Le(16),ve=Le(0),de=Le(3),ue=Le(4),z=Le(6),ee=Le(22),oe=Le(24),ie={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function se(we,be){if(we>24)return be.setWinLines||!1;switch(we){case 1:return!!be.restoreWin;case 2:return!!be.minimizeWin;case 3:return!!be.setWinPosition;case 4:return!!be.setWinSizePixels;case 5:return!!be.raiseWin;case 6:return!!be.lowerWin;case 7:return!!be.refreshWin;case 8:return!!be.setWinSizeChars;case 9:return!!be.maximizeWin;case 10:return!!be.fullscreenWin;case 11:return!!be.getWinState;case 13:return!!be.getWinPosition;case 14:return!!be.getWinSizePixels;case 15:return!!be.getScreenSizePixels;case 16:return!!be.getCellSizePixels;case 18:return!!be.getWinSizeChars;case 19:return!!be.getScreenSizeChars;case 20:return!!be.getIconTitle;case 21:return!!be.getWinTitle;case 22:return!!be.pushTitle;case 23:return!!be.popTitle;case 24:return!!be.setWinLines}return!1}(function(we){we[we.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",we[we.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(Te=Ee.WindowsOptionsReportType||(Ee.WindowsOptionsReportType={}));var le=function(){function we(be,ke,Ne,je){this._bufferService=be,this._coreService=ke,this._logService=Ne,this._optionsService=je,this._data=new Uint32Array(0)}return we.prototype.hook=function(be){this._data=new Uint32Array(0)},we.prototype.put=function(be,ke,Ne){this._data=xe.concat(this._data,be.subarray(ke,Ne))},we.prototype.unhook=function(be){if(be){var ke=ge.utf32ToString(this._data);switch(this._data=new Uint32Array(0),ke){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 Ne=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+Ne+Ce.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r0m"+Ce.C0.ESC+"\\");case" q":var je={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return je-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+je+" q"+Ce.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",ke),this._coreService.triggerDataEvent(Ce.C0.ESC+"P0$r"+Ce.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},we}(),ye=function(we){function be(ke,Ne,je,Ve,Je,We,gt,ut,bt){bt===void 0&&(bt=new he.EscapeSequenceParser);var rt=we.call(this)||this;rt._bufferService=ke,rt._charsetService=Ne,rt._coreService=je,rt._dirtyRowService=Ve,rt._logService=Je,rt._optionsService=We,rt._coreMouseService=gt,rt._unicodeService=ut,rt._parser=bt,rt._parseBuffer=new Uint32Array(4096),rt._stringDecoder=new ge.StringToUtf32,rt._utf8Decoder=new ge.Utf8ToUtf32,rt._workCell=new ue.CellData,rt._windowTitle="",rt._iconName="",rt._windowTitleStack=[],rt._iconNameStack=[],rt._curAttrData=ce.DEFAULT_ATTR_DATA.clone(),rt._eraseAttrDataInternal=ce.DEFAULT_ATTR_DATA.clone(),rt._onRequestBell=new ve.EventEmitter,rt._onRequestRefreshRows=new ve.EventEmitter,rt._onRequestReset=new ve.EventEmitter,rt._onRequestScroll=new ve.EventEmitter,rt._onRequestSyncScrollBar=new ve.EventEmitter,rt._onRequestWindowsOptionsReport=new ve.EventEmitter,rt._onA11yChar=new ve.EventEmitter,rt._onA11yTab=new ve.EventEmitter,rt._onCursorMove=new ve.EventEmitter,rt._onLineFeed=new ve.EventEmitter,rt._onScroll=new ve.EventEmitter,rt._onTitleChange=new ve.EventEmitter,rt.register(rt._parser),rt._parser.setCsiHandlerFallback(function(ht,it){rt._logService.debug("Unknown CSI code: ",{identifier:rt._parser.identToString(ht),params:it.toArray()})}),rt._parser.setEscHandlerFallback(function(ht){rt._logService.debug("Unknown ESC code: ",{identifier:rt._parser.identToString(ht)})}),rt._parser.setExecuteHandlerFallback(function(ht){rt._logService.debug("Unknown EXECUTE code: ",{code:ht})}),rt._parser.setOscHandlerFallback(function(ht,it,dt){rt._logService.debug("Unknown OSC code: ",{identifier:ht,action:it,data:dt})}),rt._parser.setDcsHandlerFallback(function(ht,it,dt){it==="HOOK"&&(dt=dt.toArray()),rt._logService.debug("Unknown DCS code: ",{identifier:rt._parser.identToString(ht),action:it,payload:dt})}),rt._parser.setPrintHandler(function(ht,it,dt){return rt.print(ht,it,dt)}),rt._parser.setCsiHandler({final:"@"},function(ht){return rt.insertChars(ht)}),rt._parser.setCsiHandler({intermediates:" ",final:"@"},function(ht){return rt.scrollLeft(ht)}),rt._parser.setCsiHandler({final:"A"},function(ht){return rt.cursorUp(ht)}),rt._parser.setCsiHandler({intermediates:" ",final:"A"},function(ht){return rt.scrollRight(ht)}),rt._parser.setCsiHandler({final:"B"},function(ht){return rt.cursorDown(ht)}),rt._parser.setCsiHandler({final:"C"},function(ht){return rt.cursorForward(ht)}),rt._parser.setCsiHandler({final:"D"},function(ht){return rt.cursorBackward(ht)}),rt._parser.setCsiHandler({final:"E"},function(ht){return rt.cursorNextLine(ht)}),rt._parser.setCsiHandler({final:"F"},function(ht){return rt.cursorPrecedingLine(ht)}),rt._parser.setCsiHandler({final:"G"},function(ht){return rt.cursorCharAbsolute(ht)}),rt._parser.setCsiHandler({final:"H"},function(ht){return rt.cursorPosition(ht)}),rt._parser.setCsiHandler({final:"I"},function(ht){return rt.cursorForwardTab(ht)}),rt._parser.setCsiHandler({final:"J"},function(ht){return rt.eraseInDisplay(ht)}),rt._parser.setCsiHandler({prefix:"?",final:"J"},function(ht){return rt.eraseInDisplay(ht)}),rt._parser.setCsiHandler({final:"K"},function(ht){return rt.eraseInLine(ht)}),rt._parser.setCsiHandler({prefix:"?",final:"K"},function(ht){return rt.eraseInLine(ht)}),rt._parser.setCsiHandler({final:"L"},function(ht){return rt.insertLines(ht)}),rt._parser.setCsiHandler({final:"M"},function(ht){return rt.deleteLines(ht)}),rt._parser.setCsiHandler({final:"P"},function(ht){return rt.deleteChars(ht)}),rt._parser.setCsiHandler({final:"S"},function(ht){return rt.scrollUp(ht)}),rt._parser.setCsiHandler({final:"T"},function(ht){return rt.scrollDown(ht)}),rt._parser.setCsiHandler({final:"X"},function(ht){return rt.eraseChars(ht)}),rt._parser.setCsiHandler({final:"Z"},function(ht){return rt.cursorBackwardTab(ht)}),rt._parser.setCsiHandler({final:"`"},function(ht){return rt.charPosAbsolute(ht)}),rt._parser.setCsiHandler({final:"a"},function(ht){return rt.hPositionRelative(ht)}),rt._parser.setCsiHandler({final:"b"},function(ht){return rt.repeatPrecedingCharacter(ht)}),rt._parser.setCsiHandler({final:"c"},function(ht){return rt.sendDeviceAttributesPrimary(ht)}),rt._parser.setCsiHandler({prefix:">",final:"c"},function(ht){return rt.sendDeviceAttributesSecondary(ht)}),rt._parser.setCsiHandler({final:"d"},function(ht){return rt.linePosAbsolute(ht)}),rt._parser.setCsiHandler({final:"e"},function(ht){return rt.vPositionRelative(ht)}),rt._parser.setCsiHandler({final:"f"},function(ht){return rt.hVPosition(ht)}),rt._parser.setCsiHandler({final:"g"},function(ht){return rt.tabClear(ht)}),rt._parser.setCsiHandler({final:"h"},function(ht){return rt.setMode(ht)}),rt._parser.setCsiHandler({prefix:"?",final:"h"},function(ht){return rt.setModePrivate(ht)}),rt._parser.setCsiHandler({final:"l"},function(ht){return rt.resetMode(ht)}),rt._parser.setCsiHandler({prefix:"?",final:"l"},function(ht){return rt.resetModePrivate(ht)}),rt._parser.setCsiHandler({final:"m"},function(ht){return rt.charAttributes(ht)}),rt._parser.setCsiHandler({final:"n"},function(ht){return rt.deviceStatus(ht)}),rt._parser.setCsiHandler({prefix:"?",final:"n"},function(ht){return rt.deviceStatusPrivate(ht)}),rt._parser.setCsiHandler({intermediates:"!",final:"p"},function(ht){return rt.softReset(ht)}),rt._parser.setCsiHandler({intermediates:" ",final:"q"},function(ht){return rt.setCursorStyle(ht)}),rt._parser.setCsiHandler({final:"r"},function(ht){return rt.setScrollRegion(ht)}),rt._parser.setCsiHandler({final:"s"},function(ht){return rt.saveCursor(ht)}),rt._parser.setCsiHandler({final:"t"},function(ht){return rt.windowOptions(ht)}),rt._parser.setCsiHandler({final:"u"},function(ht){return rt.restoreCursor(ht)}),rt._parser.setCsiHandler({intermediates:"'",final:"}"},function(ht){return rt.insertColumns(ht)}),rt._parser.setCsiHandler({intermediates:"'",final:"~"},function(ht){return rt.deleteColumns(ht)}),rt._parser.setExecuteHandler(Ce.C0.BEL,function(){return rt.bell()}),rt._parser.setExecuteHandler(Ce.C0.LF,function(){return rt.lineFeed()}),rt._parser.setExecuteHandler(Ce.C0.VT,function(){return rt.lineFeed()}),rt._parser.setExecuteHandler(Ce.C0.FF,function(){return rt.lineFeed()}),rt._parser.setExecuteHandler(Ce.C0.CR,function(){return rt.carriageReturn()}),rt._parser.setExecuteHandler(Ce.C0.BS,function(){return rt.backspace()}),rt._parser.setExecuteHandler(Ce.C0.HT,function(){return rt.tab()}),rt._parser.setExecuteHandler(Ce.C0.SO,function(){return rt.shiftOut()}),rt._parser.setExecuteHandler(Ce.C0.SI,function(){return rt.shiftIn()}),rt._parser.setExecuteHandler(Ce.C1.IND,function(){return rt.index()}),rt._parser.setExecuteHandler(Ce.C1.NEL,function(){return rt.nextLine()}),rt._parser.setExecuteHandler(Ce.C1.HTS,function(){return rt.tabSet()}),rt._parser.setOscHandler(0,new ee.OscHandler(function(ht){rt.setTitle(ht),rt.setIconName(ht)})),rt._parser.setOscHandler(1,new ee.OscHandler(function(ht){return rt.setIconName(ht)})),rt._parser.setOscHandler(2,new ee.OscHandler(function(ht){return rt.setTitle(ht)})),rt._parser.setEscHandler({final:"7"},function(){return rt.saveCursor()}),rt._parser.setEscHandler({final:"8"},function(){return rt.restoreCursor()}),rt._parser.setEscHandler({final:"D"},function(){return rt.index()}),rt._parser.setEscHandler({final:"E"},function(){return rt.nextLine()}),rt._parser.setEscHandler({final:"H"},function(){return rt.tabSet()}),rt._parser.setEscHandler({final:"M"},function(){return rt.reverseIndex()}),rt._parser.setEscHandler({final:"="},function(){return rt.keypadApplicationMode()}),rt._parser.setEscHandler({final:">"},function(){return rt.keypadNumericMode()}),rt._parser.setEscHandler({final:"c"},function(){return rt.fullReset()}),rt._parser.setEscHandler({final:"n"},function(){return rt.setgLevel(2)}),rt._parser.setEscHandler({final:"o"},function(){return rt.setgLevel(3)}),rt._parser.setEscHandler({final:"|"},function(){return rt.setgLevel(3)}),rt._parser.setEscHandler({final:"}"},function(){return rt.setgLevel(2)}),rt._parser.setEscHandler({final:"~"},function(){return rt.setgLevel(1)}),rt._parser.setEscHandler({intermediates:"%",final:"@"},function(){return rt.selectDefaultCharset()}),rt._parser.setEscHandler({intermediates:"%",final:"G"},function(){return rt.selectDefaultCharset()});var St=function(ht){ct._parser.setEscHandler({intermediates:"(",final:ht},function(){return rt.selectCharset("("+ht)}),ct._parser.setEscHandler({intermediates:")",final:ht},function(){return rt.selectCharset(")"+ht)}),ct._parser.setEscHandler({intermediates:"*",final:ht},function(){return rt.selectCharset("*"+ht)}),ct._parser.setEscHandler({intermediates:"+",final:ht},function(){return rt.selectCharset("+"+ht)}),ct._parser.setEscHandler({intermediates:"-",final:ht},function(){return rt.selectCharset("-"+ht)}),ct._parser.setEscHandler({intermediates:".",final:ht},function(){return rt.selectCharset("."+ht)}),ct._parser.setEscHandler({intermediates:"/",final:ht},function(){return rt.selectCharset("/"+ht)})},ct=this;for(var Bt in _e.CHARSETS)St(Bt);return rt._parser.setEscHandler({intermediates:"#",final:"8"},function(){return rt.screenAlignmentPattern()}),rt._parser.setErrorHandler(function(ht){return rt._logService.error("Parsing error: ",ht),ht}),rt._parser.setDcsHandler({intermediates:"$",final:"q"},new le(rt._bufferService,rt._coreService,rt._logService,rt._optionsService)),rt}return Ie(be,we),Object.defineProperty(be.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),be.prototype.dispose=function(){we.prototype.dispose.call(this)},be.prototype.parse=function(ke){var Ne=this._bufferService.buffer,je=Ne.x,Ve=Ne.y;if(this._logService.debug("parsing data",ke),this._parseBuffer.length<ke.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(ke.length,131072))),this._dirtyRowService.clearRange(),ke.length>131072)for(var Je=0;Je<ke.length;Je+=131072){var We=Je+131072<ke.length?Je+131072:ke.length,gt=typeof ke=="string"?this._stringDecoder.decode(ke.substring(Je,We),this._parseBuffer):this._utf8Decoder.decode(ke.subarray(Je,We),this._parseBuffer);this._parser.parse(this._parseBuffer,gt)}else gt=typeof ke=="string"?this._stringDecoder.decode(ke,this._parseBuffer):this._utf8Decoder.decode(ke,this._parseBuffer),this._parser.parse(this._parseBuffer,gt);(Ne=this._bufferService.buffer).x===je&&Ne.y===Ve||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},be.prototype.print=function(ke,Ne,je){var Ve,Je,We=this._bufferService.buffer,gt=this._charsetService.charset,ut=this._optionsService.options.screenReaderMode,bt=this._bufferService.cols,rt=this._coreService.decPrivateModes.wraparound,St=this._coreService.modes.insertMode,ct=this._curAttrData,Bt=We.lines.get(We.ybase+We.y);this._dirtyRowService.markDirty(We.y),We.x&&je-Ne>0&&Bt.getWidth(We.x-1)===2&&Bt.setCellFromCodePoint(We.x-1,0,1,ct.fg,ct.bg,ct.extended);for(var ht=Ne;ht<je;++ht){if(Ve=ke[ht],Je=this._unicodeService.wcwidth(Ve),Ve<127&>){var it=gt[String.fromCharCode(Ve)];it&&(Ve=it.charCodeAt(0))}if(ut&&this._onA11yChar.fire(ge.stringFromCodePoint(Ve)),Je||!We.x){if(We.x+Je-1>=bt){if(rt){for(;We.x<bt;)Bt.setCellFromCodePoint(We.x++,0,1,ct.fg,ct.bg,ct.extended);We.x=0,We.y++,We.y===We.scrollBottom+1?(We.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(We.y>=this._bufferService.rows&&(We.y=this._bufferService.rows-1),We.lines.get(We.ybase+We.y).isWrapped=!0),Bt=We.lines.get(We.ybase+We.y)}else if(We.x=bt-1,Je===2)continue}if(St&&(Bt.insertCells(We.x,Je,We.getNullCell(ct),ct),Bt.getWidth(bt-1)===2&&Bt.setCellFromCodePoint(bt-1,de.NULL_CELL_CODE,de.NULL_CELL_WIDTH,ct.fg,ct.bg,ct.extended)),Bt.setCellFromCodePoint(We.x++,Ve,Je,ct.fg,ct.bg,ct.extended),Je>0)for(;--Je;)Bt.setCellFromCodePoint(We.x++,0,0,ct.fg,ct.bg,ct.extended)}else Bt.getWidth(We.x-1)?Bt.addCodepointToCell(We.x-1,Ve):Bt.addCodepointToCell(We.x-2,Ve)}je-Ne>0&&(Bt.loadCell(We.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),We.x<bt&&je-Ne>0&&Bt.getWidth(We.x)===0&&!Bt.hasContent(We.x)&&Bt.setCellFromCodePoint(We.x,0,1,ct.fg,ct.bg,ct.extended),this._dirtyRowService.markDirty(We.y)},be.prototype.addCsiHandler=function(ke,Ne){var je=this;return ke.final!=="t"||ke.prefix||ke.intermediates?this._parser.addCsiHandler(ke,Ne):this._parser.addCsiHandler(ke,function(Ve){return!se(Ve.params[0],je._optionsService.options.windowOptions)||Ne(Ve)})},be.prototype.addDcsHandler=function(ke,Ne){return this._parser.addDcsHandler(ke,new oe.DcsHandler(Ne))},be.prototype.addEscHandler=function(ke,Ne){return this._parser.addEscHandler(ke,Ne)},be.prototype.addOscHandler=function(ke,Ne){return this._parser.addOscHandler(ke,new ee.OscHandler(Ne))},be.prototype.bell=function(){this._onRequestBell.fire()},be.prototype.lineFeed=function(){var ke=this._bufferService.buffer;this._dirtyRowService.markDirty(ke.y),this._optionsService.options.convertEol&&(ke.x=0),ke.y++,ke.y===ke.scrollBottom+1?(ke.y--,this._onRequestScroll.fire(this._eraseAttrData())):ke.y>=this._bufferService.rows&&(ke.y=this._bufferService.rows-1),ke.x>=this._bufferService.cols&&ke.x--,this._dirtyRowService.markDirty(ke.y),this._onLineFeed.fire()},be.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},be.prototype.backspace=function(){var ke,Ne=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(Ne.x>0&&Ne.x--);if(this._restrictCursor(this._bufferService.cols),Ne.x>0)Ne.x--;else if(Ne.x===0&&Ne.y>Ne.scrollTop&&Ne.y<=Ne.scrollBottom&&(!((ke=Ne.lines.get(Ne.ybase+Ne.y))===null||ke===void 0)&&ke.isWrapped)){Ne.lines.get(Ne.ybase+Ne.y).isWrapped=!1,Ne.y--,Ne.x=this._bufferService.cols-1;var je=Ne.lines.get(Ne.ybase+Ne.y);je.hasWidth(Ne.x)&&!je.hasContent(Ne.x)&&Ne.x--}this._restrictCursor()},be.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var ke=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-ke)}},be.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},be.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},be.prototype._restrictCursor=function(ke){ke===void 0&&(ke=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(ke,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},be.prototype._setCursor=function(ke,Ne){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=ke,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+Ne):(this._bufferService.buffer.x=ke,this._bufferService.buffer.y=Ne),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},be.prototype._moveCursor=function(ke,Ne){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+ke,this._bufferService.buffer.y+Ne)},be.prototype.cursorUp=function(ke){var Ne=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;Ne>=0?this._moveCursor(0,-Math.min(Ne,ke.params[0]||1)):this._moveCursor(0,-(ke.params[0]||1))},be.prototype.cursorDown=function(ke){var Ne=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;Ne>=0?this._moveCursor(0,Math.min(Ne,ke.params[0]||1)):this._moveCursor(0,ke.params[0]||1)},be.prototype.cursorForward=function(ke){this._moveCursor(ke.params[0]||1,0)},be.prototype.cursorBackward=function(ke){this._moveCursor(-(ke.params[0]||1),0)},be.prototype.cursorNextLine=function(ke){this.cursorDown(ke),this._bufferService.buffer.x=0},be.prototype.cursorPrecedingLine=function(ke){this.cursorUp(ke),this._bufferService.buffer.x=0},be.prototype.cursorCharAbsolute=function(ke){this._setCursor((ke.params[0]||1)-1,this._bufferService.buffer.y)},be.prototype.cursorPosition=function(ke){this._setCursor(ke.length>=2?(ke.params[1]||1)-1:0,(ke.params[0]||1)-1)},be.prototype.charPosAbsolute=function(ke){this._setCursor((ke.params[0]||1)-1,this._bufferService.buffer.y)},be.prototype.hPositionRelative=function(ke){this._moveCursor(ke.params[0]||1,0)},be.prototype.linePosAbsolute=function(ke){this._setCursor(this._bufferService.buffer.x,(ke.params[0]||1)-1)},be.prototype.vPositionRelative=function(ke){this._moveCursor(0,ke.params[0]||1)},be.prototype.hVPosition=function(ke){this.cursorPosition(ke)},be.prototype.tabClear=function(ke){var Ne=ke.params[0];Ne===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:Ne===3&&(this._bufferService.buffer.tabs={})},be.prototype.cursorForwardTab=function(ke){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Ne=ke.params[0]||1;Ne--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},be.prototype.cursorBackwardTab=function(ke){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Ne=ke.params[0]||1,je=this._bufferService.buffer;Ne--;)je.x=je.prevStop()},be.prototype._eraseInBufferLine=function(ke,Ne,je,Ve){Ve===void 0&&(Ve=!1);var Je=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+ke);Je.replaceCells(Ne,je,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ve&&(Je.isWrapped=!1)},be.prototype._resetBufferLine=function(ke){var Ne=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+ke);Ne.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),Ne.isWrapped=!1},be.prototype.eraseInDisplay=function(ke){var Ne;switch(this._restrictCursor(),ke.params[0]){case 0:for(Ne=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Ne),this._eraseInBufferLine(Ne++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);Ne<this._bufferService.rows;Ne++)this._resetBufferLine(Ne);this._dirtyRowService.markDirty(Ne);break;case 1:for(Ne=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Ne),this._eraseInBufferLine(Ne,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(Ne+1).isWrapped=!1);Ne--;)this._resetBufferLine(Ne);this._dirtyRowService.markDirty(0);break;case 2:for(Ne=this._bufferService.rows,this._dirtyRowService.markDirty(Ne-1);Ne--;)this._resetBufferLine(Ne);this._dirtyRowService.markDirty(0);break;case 3:var je=this._bufferService.buffer.lines.length-this._bufferService.rows;je>0&&(this._bufferService.buffer.lines.trimStart(je),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-je,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-je,0),this._onScroll.fire(0))}},be.prototype.eraseInLine=function(ke){switch(this._restrictCursor(),ke.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},be.prototype.insertLines=function(ke){this._restrictCursor();var Ne=ke.params[0]||1,je=this._bufferService.buffer;if(!(je.y>je.scrollBottom||je.y<je.scrollTop)){for(var Ve=je.ybase+je.y,Je=this._bufferService.rows-1-je.scrollBottom,We=this._bufferService.rows-1+je.ybase-Je+1;Ne--;)je.lines.splice(We-1,1),je.lines.splice(Ve,0,je.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(je.y,je.scrollBottom),je.x=0}},be.prototype.deleteLines=function(ke){this._restrictCursor();var Ne=ke.params[0]||1,je=this._bufferService.buffer;if(!(je.y>je.scrollBottom||je.y<je.scrollTop)){var Ve,Je=je.ybase+je.y;for(Ve=this._bufferService.rows-1-je.scrollBottom,Ve=this._bufferService.rows-1+je.ybase-Ve;Ne--;)je.lines.splice(Je,1),je.lines.splice(Ve,0,je.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(je.y,je.scrollBottom),je.x=0}},be.prototype.insertChars=function(ke){this._restrictCursor();var Ne=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Ne&&(Ne.insertCells(this._bufferService.buffer.x,ke.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},be.prototype.deleteChars=function(ke){this._restrictCursor();var Ne=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Ne&&(Ne.deleteCells(this._bufferService.buffer.x,ke.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},be.prototype.scrollUp=function(ke){for(var Ne=ke.params[0]||1,je=this._bufferService.buffer;Ne--;)je.lines.splice(je.ybase+je.scrollTop,1),je.lines.splice(je.ybase+je.scrollBottom,0,je.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(je.scrollTop,je.scrollBottom)},be.prototype.scrollDown=function(ke){for(var Ne=ke.params[0]||1,je=this._bufferService.buffer;Ne--;)je.lines.splice(je.ybase+je.scrollBottom,1),je.lines.splice(je.ybase+je.scrollTop,0,je.getBlankLine(ce.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(je.scrollTop,je.scrollBottom)},be.prototype.scrollLeft=function(ke){var Ne=this._bufferService.buffer;if(!(Ne.y>Ne.scrollBottom||Ne.y<Ne.scrollTop)){for(var je=ke.params[0]||1,Ve=Ne.scrollTop;Ve<=Ne.scrollBottom;++Ve){var Je=Ne.lines.get(Ne.ybase+Ve);Je.deleteCells(0,je,Ne.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ne.scrollTop,Ne.scrollBottom)}},be.prototype.scrollRight=function(ke){var Ne=this._bufferService.buffer;if(!(Ne.y>Ne.scrollBottom||Ne.y<Ne.scrollTop)){for(var je=ke.params[0]||1,Ve=Ne.scrollTop;Ve<=Ne.scrollBottom;++Ve){var Je=Ne.lines.get(Ne.ybase+Ve);Je.insertCells(0,je,Ne.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ne.scrollTop,Ne.scrollBottom)}},be.prototype.insertColumns=function(ke){var Ne=this._bufferService.buffer;if(!(Ne.y>Ne.scrollBottom||Ne.y<Ne.scrollTop)){for(var je=ke.params[0]||1,Ve=Ne.scrollTop;Ve<=Ne.scrollBottom;++Ve){var Je=this._bufferService.buffer.lines.get(Ne.ybase+Ve);Je.insertCells(Ne.x,je,Ne.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ne.scrollTop,Ne.scrollBottom)}},be.prototype.deleteColumns=function(ke){var Ne=this._bufferService.buffer;if(!(Ne.y>Ne.scrollBottom||Ne.y<Ne.scrollTop)){for(var je=ke.params[0]||1,Ve=Ne.scrollTop;Ve<=Ne.scrollBottom;++Ve){var Je=Ne.lines.get(Ne.ybase+Ve);Je.deleteCells(Ne.x,je,Ne.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Ne.scrollTop,Ne.scrollBottom)}},be.prototype.eraseChars=function(ke){this._restrictCursor();var Ne=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Ne&&(Ne.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(ke.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},be.prototype.repeatPrecedingCharacter=function(ke){if(this._parser.precedingCodepoint){for(var Ne=ke.params[0]||1,je=new Uint32Array(Ne),Ve=0;Ve<Ne;++Ve)je[Ve]=this._parser.precedingCodepoint;this.print(je,0,je.length)}},be.prototype.sendDeviceAttributesPrimary=function(ke){ke.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Ce.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[?6c"))},be.prototype.sendDeviceAttributesSecondary=function(ke){ke.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(ke.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[>83;40003;0c"))},be.prototype._is=function(ke){return(this._optionsService.options.termName+"").indexOf(ke)===0},be.prototype.setMode=function(ke){for(var Ne=0;Ne<ke.length;Ne++)switch(ke.params[Ne]){case 4:this._coreService.modes.insertMode=!0}},be.prototype.setModePrivate=function(ke){for(var Ne=0;Ne<ke.length;Ne++)switch(ke.params[Ne]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_e.DEFAULT_CHARSET),this._charsetService.setgCharset(1,_e.DEFAULT_CHARSET),this._charsetService.setgCharset(2,_e.DEFAULT_CHARSET),this._charsetService.setgCharset(3,_e.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},be.prototype.resetMode=function(ke){for(var Ne=0;Ne<ke.length;Ne++)switch(ke.params[Ne]){case 4:this._coreService.modes.insertMode=!1}},be.prototype.resetModePrivate=function(ke){for(var Ne=0;Ne<ke.length;Ne++)switch(ke.params[Ne]){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(),ke.params[Ne]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},be.prototype._updateAttrColor=function(ke,Ne,je,Ve,Je){return Ne===2?(ke|=50331648,ke&=-16777216,ke|=z.AttributeData.fromColorRGB([je,Ve,Je])):Ne===5&&(ke&=-50331904,ke|=33554432|255&je),ke},be.prototype._extractColor=function(ke,Ne,je){var Ve=[0,0,-1,0,0,0],Je=0,We=0;do{if(Ve[We+Je]=ke.params[Ne+We],ke.hasSubParams(Ne+We)){var gt=ke.getSubParams(Ne+We),ut=0;do Ve[1]===5&&(Je=1),Ve[We+ut+1+Je]=gt[ut];while(++ut<gt.length&&ut+We+1+Je<Ve.length);break}if(Ve[1]===5&&We+Je>=2||Ve[1]===2&&We+Je>=5)break;Ve[1]&&(Je=1)}while(++We+Ne<ke.length&&We+Je<Ve.length);for(ut=2;ut<Ve.length;++ut)Ve[ut]===-1&&(Ve[ut]=0);switch(Ve[0]){case 38:je.fg=this._updateAttrColor(je.fg,Ve[1],Ve[3],Ve[4],Ve[5]);break;case 48:je.bg=this._updateAttrColor(je.bg,Ve[1],Ve[3],Ve[4],Ve[5]);break;case 58:je.extended=je.extended.clone(),je.extended.underlineColor=this._updateAttrColor(je.extended.underlineColor,Ve[1],Ve[3],Ve[4],Ve[5])}return We},be.prototype._processUnderline=function(ke,Ne){Ne.extended=Ne.extended.clone(),(!~ke||ke>5)&&(ke=1),Ne.extended.underlineStyle=ke,Ne.fg|=268435456,ke===0&&(Ne.fg&=-268435457),Ne.updateExtended()},be.prototype.charAttributes=function(ke){if(ke.length===1&&ke.params[0]===0)return this._curAttrData.fg=ce.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=ce.DEFAULT_ATTR_DATA.bg);for(var Ne,je=ke.length,Ve=this._curAttrData,Je=0;Je<je;Je++)(Ne=ke.params[Je])>=30&&Ne<=37?(Ve.fg&=-50331904,Ve.fg|=16777216|Ne-30):Ne>=40&&Ne<=47?(Ve.bg&=-50331904,Ve.bg|=16777216|Ne-40):Ne>=90&&Ne<=97?(Ve.fg&=-50331904,Ve.fg|=16777224|Ne-90):Ne>=100&&Ne<=107?(Ve.bg&=-50331904,Ve.bg|=16777224|Ne-100):Ne===0?(Ve.fg=ce.DEFAULT_ATTR_DATA.fg,Ve.bg=ce.DEFAULT_ATTR_DATA.bg):Ne===1?Ve.fg|=134217728:Ne===3?Ve.bg|=67108864:Ne===4?(Ve.fg|=268435456,this._processUnderline(ke.hasSubParams(Je)?ke.getSubParams(Je)[0]:1,Ve)):Ne===5?Ve.fg|=536870912:Ne===7?Ve.fg|=67108864:Ne===8?Ve.fg|=1073741824:Ne===2?Ve.bg|=134217728:Ne===21?this._processUnderline(2,Ve):Ne===22?(Ve.fg&=-134217729,Ve.bg&=-134217729):Ne===23?Ve.bg&=-67108865:Ne===24?Ve.fg&=-268435457:Ne===25?Ve.fg&=-536870913:Ne===27?Ve.fg&=-67108865:Ne===28?Ve.fg&=-1073741825:Ne===39?(Ve.fg&=-67108864,Ve.fg|=16777215&ce.DEFAULT_ATTR_DATA.fg):Ne===49?(Ve.bg&=-67108864,Ve.bg|=16777215&ce.DEFAULT_ATTR_DATA.bg):Ne===38||Ne===48||Ne===58?Je+=this._extractColor(ke,Je,Ve):Ne===59?(Ve.extended=Ve.extended.clone(),Ve.extended.underlineColor=-1,Ve.updateExtended()):Ne===100?(Ve.fg&=-67108864,Ve.fg|=16777215&ce.DEFAULT_ATTR_DATA.fg,Ve.bg&=-67108864,Ve.bg|=16777215&ce.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",Ne)},be.prototype.deviceStatus=function(ke){switch(ke.params[0]){case 5:this._coreService.triggerDataEvent(Ce.C0.ESC+"[0n");break;case 6:var Ne=this._bufferService.buffer.y+1,je=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"["+Ne+";"+je+"R")}},be.prototype.deviceStatusPrivate=function(ke){switch(ke.params[0]){case 6:var Ne=this._bufferService.buffer.y+1,je=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"[?"+Ne+";"+je+"R")}},be.prototype.softReset=function(ke){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=ce.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},be.prototype.setCursorStyle=function(ke){var Ne=ke.params[0]||1;switch(Ne){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 je=Ne%2==1;this._optionsService.options.cursorBlink=je},be.prototype.setScrollRegion=function(ke){var Ne,je=ke.params[0]||1;(ke.length<2||(Ne=ke.params[1])>this._bufferService.rows||Ne===0)&&(Ne=this._bufferService.rows),Ne>je&&(this._bufferService.buffer.scrollTop=je-1,this._bufferService.buffer.scrollBottom=Ne-1,this._setCursor(0,0))},be.prototype.windowOptions=function(ke){if(se(ke.params[0],this._optionsService.options.windowOptions)){var Ne=ke.length>1?ke.params[1]:0;switch(ke.params[0]){case 14:Ne!==2&&this._onRequestWindowsOptionsReport.fire(Te.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(Te.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:Ne!==0&&Ne!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),Ne!==0&&Ne!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:Ne!==0&&Ne!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),Ne!==0&&Ne!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},be.prototype.saveCursor=function(ke){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},be.prototype.restoreCursor=function(ke){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},be.prototype.setTitle=function(ke){this._windowTitle=ke,this._onTitleChange.fire(ke)},be.prototype.setIconName=function(ke){this._iconName=ke},be.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},be.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},be.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},be.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,_e.DEFAULT_CHARSET)},be.prototype.selectCharset=function(ke){ke.length===2?ke[0]!=="/"&&this._charsetService.setgCharset(ie[ke[0]],_e.CHARSETS[ke[1]]||_e.DEFAULT_CHARSET):this.selectDefaultCharset()},be.prototype.index=function(){this._restrictCursor();var ke=this._bufferService.buffer;this._bufferService.buffer.y++,ke.y===ke.scrollBottom+1?(ke.y--,this._onRequestScroll.fire(this._eraseAttrData())):ke.y>=this._bufferService.rows&&(ke.y=this._bufferService.rows-1),this._restrictCursor()},be.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},be.prototype.reverseIndex=function(){this._restrictCursor();var ke=this._bufferService.buffer;if(ke.y===ke.scrollTop){var Ne=ke.scrollBottom-ke.scrollTop;ke.lines.shiftElements(ke.ybase+ke.y,Ne,1),ke.lines.set(ke.ybase+ke.y,ke.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(ke.scrollTop,ke.scrollBottom)}else ke.y--,this._restrictCursor()},be.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},be.prototype.reset=function(){this._curAttrData=ce.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=ce.DEFAULT_ATTR_DATA.clone()},be.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},be.prototype.setgLevel=function(ke){this._charsetService.setgLevel(ke)},be.prototype.screenAlignmentPattern=function(){var ke=new ue.CellData;ke.content=1<<22|69,ke.fg=this._curAttrData.fg,ke.bg=this._curAttrData.bg;var Ne=this._bufferService.buffer;this._setCursor(0,0);for(var je=0;je<this._bufferService.rows;++je){var Ve=Ne.ybase+Ne.y+je,Je=Ne.lines.get(Ve);Je&&(Je.fill(ke),Je.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},be}(Se.Disposable);Ee.InputHandler=ye},function(qt,Ee,Le){"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(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Params=void 0;var me=function(){function Ie(Te,Ce){if(Te===void 0&&(Te=32),Ce===void 0&&(Ce=32),this.maxLength=Te,this.maxSubParamsLength=Ce,Ce>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(Te),this.length=0,this._subParams=new Int32Array(Ce),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(Te),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Ie.fromArray=function(Te){var Ce=new Ie;if(!Te.length)return Ce;for(var _e=Te[0]instanceof Array?1:0;_e<Te.length;++_e){var he=Te[_e];if(he instanceof Array)for(var Se=0;Se<he.length;++Se)Ce.addSubParam(he[Se]);else Ce.addParam(he)}return Ce},Ie.prototype.clone=function(){var Te=new Ie(this.maxLength,this.maxSubParamsLength);return Te.params.set(this.params),Te.length=this.length,Te._subParams.set(this._subParams),Te._subParamsLength=this._subParamsLength,Te._subParamsIdx.set(this._subParamsIdx),Te._rejectDigits=this._rejectDigits,Te._rejectSubDigits=this._rejectSubDigits,Te._digitIsSub=this._digitIsSub,Te},Ie.prototype.toArray=function(){for(var Te=[],Ce=0;Ce<this.length;++Ce){Te.push(this.params[Ce]);var _e=this._subParamsIdx[Ce]>>8,he=255&this._subParamsIdx[Ce];he-_e>0&&Te.push(Array.prototype.slice.call(this._subParams,_e,he))}return Te},Ie.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Ie.prototype.addParam=function(Te){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(Te<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=Te>2147483647?2147483647:Te}},Ie.prototype.addSubParam=function(Te){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(Te<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=Te>2147483647?2147483647:Te,this._subParamsIdx[this.length-1]++}},Ie.prototype.hasSubParams=function(Te){return(255&this._subParamsIdx[Te])-(this._subParamsIdx[Te]>>8)>0},Ie.prototype.getSubParams=function(Te){var Ce=this._subParamsIdx[Te]>>8,_e=255&this._subParamsIdx[Te];return _e-Ce>0?this._subParams.subarray(Ce,_e):null},Ie.prototype.getSubParamsAll=function(){for(var Te={},Ce=0;Ce<this.length;++Ce){var _e=this._subParamsIdx[Ce]>>8,he=255&this._subParamsIdx[Ce];he-_e>0&&(Te[Ce]=this._subParams.slice(_e,he))}return Te},Ie.prototype.addDigit=function(Te){var Ce;if(!(this._rejectDigits||!(Ce=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var _e=this._digitIsSub?this._subParams:this.params,he=_e[Ce-1];_e[Ce-1]=~he?Math.min(10*he+Te,2147483647):Te}},Ie}();Ee.Params=me},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.OscHandler=Ee.OscParser=void 0;var me=Le(23),Ie=Le(8),Te=function(){function _e(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return _e.prototype.addHandler=function(he,Se){this._handlers[he]===void 0&&(this._handlers[he]=[]);var xe=this._handlers[he];return xe.push(Se),{dispose:function(){var ge=xe.indexOf(Se);ge!==-1&&xe.splice(ge,1)}}},_e.prototype.setHandler=function(he,Se){this._handlers[he]=[Se]},_e.prototype.clearHandler=function(he){this._handlers[he]&&delete this._handlers[he]},_e.prototype.setHandlerFallback=function(he){this._handlerFb=he},_e.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},_e.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},_e.prototype._start=function(){var he=this._handlers[this._id];if(he)for(var Se=he.length-1;Se>=0;Se--)he[Se].start();else this._handlerFb(this._id,"START")},_e.prototype._put=function(he,Se,xe){var ge=this._handlers[this._id];if(ge)for(var ce=ge.length-1;ce>=0;ce--)ge[ce].put(he,Se,xe);else this._handlerFb(this._id,"PUT",Ie.utf32ToString(he,Se,xe))},_e.prototype._end=function(he){var Se=this._handlers[this._id];if(Se){for(var xe=Se.length-1;xe>=0&&Se[xe].end(he)===!1;xe--);for(xe--;xe>=0;xe--)Se[xe].end(!1)}else this._handlerFb(this._id,"END",he)},_e.prototype.start=function(){this.reset(),this._id=-1,this._state=1},_e.prototype.put=function(he,Se,xe){if(this._state!==3){if(this._state===1)for(;Se<xe;){var ge=he[Se++];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-Se>0&&this._put(he,Se,xe)}},_e.prototype.end=function(he){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(he)),this._id=-1,this._state=0)},_e}();Ee.OscParser=Te;var Ce=function(){function _e(he){this._handler=he,this._data="",this._hitLimit=!1}return _e.prototype.start=function(){this._data="",this._hitLimit=!1},_e.prototype.put=function(he,Se,xe){this._hitLimit||(this._data+=Ie.utf32ToString(he,Se,xe),this._data.length>me.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},_e.prototype.end=function(he){var Se;return this._hitLimit?Se=!1:he&&(Se=this._handler(this._data)),this._data="",this._hitLimit=!1,Se},_e}();Ee.OscHandler=Ce},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.PAYLOAD_LIMIT=void 0,Ee.PAYLOAD_LIMIT=1e7},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DcsHandler=Ee.DcsParser=void 0;var me=Le(8),Ie=Le(21),Te=Le(23),Ce=[],_e=function(){function Se(){this._handlers=Object.create(null),this._active=Ce,this._ident=0,this._handlerFb=function(){}}return Se.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},Se.prototype.addHandler=function(xe,ge){this._handlers[xe]===void 0&&(this._handlers[xe]=[]);var ce=this._handlers[xe];return ce.push(ge),{dispose:function(){var ve=ce.indexOf(ge);ve!==-1&&ce.splice(ve,1)}}},Se.prototype.setHandler=function(xe,ge){this._handlers[xe]=[ge]},Se.prototype.clearHandler=function(xe){this._handlers[xe]&&delete this._handlers[xe]},Se.prototype.setHandlerFallback=function(xe){this._handlerFb=xe},Se.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=Ce,this._ident=0},Se.prototype.hook=function(xe,ge){if(this.reset(),this._ident=xe,this._active=this._handlers[xe]||Ce,this._active.length)for(var ce=this._active.length-1;ce>=0;ce--)this._active[ce].hook(ge);else this._handlerFb(this._ident,"HOOK",ge)},Se.prototype.put=function(xe,ge,ce){if(this._active.length)for(var ve=this._active.length-1;ve>=0;ve--)this._active[ve].put(xe,ge,ce);else this._handlerFb(this._ident,"PUT",me.utf32ToString(xe,ge,ce))},Se.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},Se}();Ee.DcsParser=_e;var he=function(){function Se(xe){this._handler=xe,this._data="",this._hitLimit=!1}return Se.prototype.hook=function(xe){this._params=xe.clone(),this._data="",this._hitLimit=!1},Se.prototype.put=function(xe,ge,ce){this._hitLimit||(this._data+=me.utf32ToString(xe,ge,ce),this._data.length>Te.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},Se.prototype.unhook=function(xe){var ge;return this._hitLimit?ge=!1:xe&&(ge=this._handler(this._data,this._params||new Ie.Params)),this._params=void 0,this._data="",this._hitLimit=!1,ge},Se}();Ee.DcsHandler=he},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.removeTerminalFromCache=Ee.acquireCharAtlas=void 0;var me=Le(26),Ie=Le(43),Te=[];Ee.acquireCharAtlas=function(Ce,_e,he,Se,xe){for(var ge=me.generateConfig(Se,xe,Ce,he),ce=0;ce<Te.length;ce++){var ve=(de=Te[ce]).ownedBy.indexOf(_e);if(ve>=0){if(me.configEquals(de.config,ge))return de.atlas;de.ownedBy.length===1?(de.atlas.dispose(),Te.splice(ce,1)):de.ownedBy.splice(ve,1);break}}for(ce=0;ce<Te.length;ce++){var de=Te[ce];if(me.configEquals(de.config,ge))return de.ownedBy.push(_e),de.atlas}var ue={atlas:new Ie.DynamicCharAtlas(document,ge),config:ge,ownedBy:[_e]};return Te.push(ue),ue.atlas},Ee.removeTerminalFromCache=function(Ce){for(var _e=0;_e<Te.length;_e++){var he=Te[_e].ownedBy.indexOf(Ce);if(he!==-1){Te[_e].ownedBy.length===1?(Te[_e].atlas.dispose(),Te.splice(_e,1)):Te[_e].ownedBy.splice(he,1);break}}}},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.is256Color=Ee.configEquals=Ee.generateConfig=void 0;var me=Le(3);Ee.generateConfig=function(Ie,Te,Ce,_e){var he={foreground:_e.foreground,background:_e.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:_e.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Ie,scaledCharHeight:Te,fontFamily:Ce.fontFamily,fontSize:Ce.fontSize,fontWeight:Ce.fontWeight,fontWeightBold:Ce.fontWeightBold,allowTransparency:Ce.allowTransparency,colors:he}},Ee.configEquals=function(Ie,Te){for(var Ce=0;Ce<Ie.colors.ansi.length;Ce++)if(Ie.colors.ansi[Ce].rgba!==Te.colors.ansi[Ce].rgba)return!1;return Ie.devicePixelRatio===Te.devicePixelRatio&&Ie.fontFamily===Te.fontFamily&&Ie.fontSize===Te.fontSize&&Ie.fontWeight===Te.fontWeight&&Ie.fontWeightBold===Te.fontWeightBold&&Ie.allowTransparency===Te.allowTransparency&&Ie.scaledCharWidth===Te.scaledCharWidth&&Ie.scaledCharHeight===Te.scaledCharHeight&&Ie.colors.foreground===Te.colors.foreground&&Ie.colors.background===Te.colors.background},Ee.is256Color=function(Ie){return Ie<me.DEFAULT_COLOR}},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ColorManager=Ee.DEFAULT_ANSI_COLORS=void 0;var me=Le(10),Ie=Le(45),Te=me.css.toColor("#ffffff"),Ce=me.css.toColor("#000000"),_e=me.css.toColor("#ffffff"),he=me.css.toColor("#000000"),Se={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")],ce=[0,95,135,175,215,255],ve=0;ve<216;ve++){var de=ce[ve/36%6|0],ue=ce[ve/6%6|0],z=ce[ve%6];ge.push({css:me.channels.toCss(de,ue,z),rgba:me.channels.toRgba(de,ue,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(ce,ve){this.allowTransparency=ve;var de=ce.createElement("canvas");de.width=1,de.height=1;var ue=de.getContext("2d");if(!ue)throw new Error("Could not get rendering context");this._ctx=ue,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new Ie.ColorContrastCache,this.colors={foreground:Te,background:Ce,cursor:_e,cursorAccent:he,selectionTransparent:Se,selectionOpaque:me.color.blend(Ce,Se),ansi:Ee.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return ge.prototype.onOptionsChange=function(ce){ce==="minimumContrastRatio"&&this._contrastCache.clear()},ge.prototype.setTheme=function(ce){ce===void 0&&(ce={}),this.colors.foreground=this._parseColor(ce.foreground,Te),this.colors.background=this._parseColor(ce.background,Ce),this.colors.cursor=this._parseColor(ce.cursor,_e,!0),this.colors.cursorAccent=this._parseColor(ce.cursorAccent,he,!0),this.colors.selectionTransparent=this._parseColor(ce.selection,Se,!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(ce.black,Ee.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(ce.red,Ee.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(ce.green,Ee.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(ce.yellow,Ee.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(ce.blue,Ee.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(ce.magenta,Ee.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(ce.cyan,Ee.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(ce.white,Ee.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(ce.brightBlack,Ee.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(ce.brightRed,Ee.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(ce.brightGreen,Ee.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(ce.brightYellow,Ee.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(ce.brightBlue,Ee.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(ce.brightMagenta,Ee.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(ce.brightCyan,Ee.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(ce.brightWhite,Ee.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},ge.prototype._parseColor=function(ce,ve,de){if(de===void 0&&(de=this.allowTransparency),ce===void 0)return ve;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=ce,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+ce+" is invalid using fallback "+ve.css),ve;this._ctx.fillRect(0,0,1,1);var ue=this._ctx.getImageData(0,0,1,1).data;if(ue[3]!==255){if(!de)return console.warn("Color: "+ce+" 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(ye){return Number(ye)}),ee=z[0],oe=z[1],ie=z[2],se=z[3],le=Math.round(255*se);return{rgba:me.channels.toRgba(ee,oe,ie,le),css:ce}}return{css:this._ctx.fillStyle,rgba:me.channels.toRgba(ue[0],ue[1],ue[2],ue[3])}},ge}();Ee.ColorManager=xe},function(qt,Ee,Le){"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(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(xe,ge){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ce,ve){ce.__proto__=ve}||function(ce,ve){for(var de in ve)ve.hasOwnProperty(de)&&(ce[de]=ve[de])})(xe,ge)},function(xe,ge){function ce(){this.constructor=xe}me(xe,ge),xe.prototype=ge===null?Object.create(ge):(ce.prototype=ge.prototype,new ce)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharacterJoinerRegistry=Ee.JoinedCellData=void 0;var Te=Le(6),Ce=Le(3),_e=Le(4),he=function(xe){function ge(ce,ve,de){var ue=xe.call(this)||this;return ue.content=0,ue.combinedData="",ue.fg=ce.fg,ue.bg=ce.bg,ue.combinedData=ve,ue._width=de,ue}return Ie(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(ce){throw new Error("not implemented")},ge.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},ge}(Te.AttributeData);Ee.JoinedCellData=he;var Se=function(){function xe(ge){this._bufferService=ge,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new _e.CellData}return xe.prototype.registerCharacterJoiner=function(ge){var ce={id:this._nextCharacterJoinerId++,handler:ge};return this._characterJoiners.push(ce),ce.id},xe.prototype.deregisterCharacterJoiner=function(ge){for(var ce=0;ce<this._characterJoiners.length;ce++)if(this._characterJoiners[ce].id===ge)return this._characterJoiners.splice(ce,1),!0;return!1},xe.prototype.getJoinedCharacters=function(ge){if(this._characterJoiners.length===0)return[];var ce=this._bufferService.buffer.lines.get(ge);if(!ce||ce.length===0)return[];for(var ve=[],de=ce.translateToString(!0),ue=0,z=0,ee=0,oe=ce.getFg(0),ie=ce.getBg(0),se=0;se<ce.getTrimmedLength();se++)if(ce.loadCell(se,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==oe||this._workCell.bg!==ie){if(se-ue>1)for(var le=this._getJoinedRanges(de,ee,z,ce,ue),ye=0;ye<le.length;ye++)ve.push(le[ye]);ue=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-ue>1)for(le=this._getJoinedRanges(de,ee,z,ce,ue),ye=0;ye<le.length;ye++)ve.push(le[ye]);return ve},xe.prototype._getJoinedRanges=function(ge,ce,ve,de,ue){for(var z=ge.substring(ce,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,ue),ee},xe.prototype._stringRangesToCellRanges=function(ge,ce,ve){var de=0,ue=!1,z=0,ee=ge[de];if(ee){for(var oe=ve;oe<this._bufferService.cols;oe++){var ie=ce.getWidth(oe),se=ce.getString(oe).length||Ce.WHITESPACE_CELL_CHAR.length;if(ie!==0){if(!ue&&ee[0]<=z&&(ee[0]=oe,ue=!0),ee[1]<=z){if(ee[1]=oe,!(ee=ge[++de]))break;ee[0]<=z?(ee[0]=oe,ue=!0):ue=!1}z+=se}}ee&&(ee[1]=this._bufferService.cols)}},xe._mergeRanges=function(ge,ce){for(var ve=!1,de=0;de<ge.length;de++){var ue=ge[de];if(ve){if(ce[1]<=ue[0])return ge[de-1][1]=ce[1],ge;if(ce[1]<=ue[1])return ge[de-1][1]=Math.max(ce[1],ue[1]),ge.splice(de,1),ge;ge.splice(de,1),de--}else{if(ce[1]<=ue[0])return ge.splice(de,0,ce),ge;if(ce[1]<=ue[1])return ue[0]=Math.min(ce[0],ue[0]),ge;ce[0]<ue[1]&&(ue[0]=Math.min(ce[0],ue[0]),ve=!0)}}return ve?ge[ge.length-1][1]=ce[1]:ge.push(ce),ge},xe}();Ee.CharacterJoinerRegistry=Se},function(qt,Ee,Le){"use strict";function me(Ie,Te){var Ce=Te.getBoundingClientRect();return[Ie.clientX-Ce.left,Ie.clientY-Ce.top]}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.getRawByteCoords=Ee.getCoords=Ee.getCoordsRelativeToElement=void 0,Ee.getCoordsRelativeToElement=me,Ee.getCoords=function(Ie,Te,Ce,_e,he,Se,xe,ge){if(he){var ce=me(Ie,Te);if(ce)return ce[0]=Math.ceil((ce[0]+(ge?Se/2:0))/Se),ce[1]=Math.ceil(ce[1]/xe),ce[0]=Math.min(Math.max(ce[0],1),Ce+(ge?1:0)),ce[1]=Math.min(Math.max(ce[1],1),_e),ce}},Ee.getRawByteCoords=function(Ie){if(Ie)return{x:Ie[0]+32,y:Ie[1]+32}}},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.RenderDebouncer=void 0;var me=function(){function Ie(Te){this._renderCallback=Te}return Ie.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Ie.prototype.refresh=function(Te,Ce,_e){var he=this;this._rowCount=_e,Te=Te!==void 0?Te:0,Ce=Ce!==void 0?Ce:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,Te):Te,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,Ce):Ce,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return he._innerRefresh()}))},Ie.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var Te=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(Te,Ce)}},Ie}();Ee.RenderDebouncer=me},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Ce,_e){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,Se){he.__proto__=Se}||function(he,Se){for(var xe in Se)Se.hasOwnProperty(xe)&&(he[xe]=Se[xe])})(Ce,_e)},function(Ce,_e){function he(){this.constructor=Ce}me(Ce,_e),Ce.prototype=_e===null?Object.create(_e):(he.prototype=_e.prototype,new he)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ScreenDprMonitor=void 0;var Te=function(Ce){function _e(){var he=Ce!==null&&Ce.apply(this,arguments)||this;return he._currentDevicePixelRatio=window.devicePixelRatio,he}return Ie(_e,Ce),_e.prototype.setListener=function(he){var Se=this;this._listener&&this.clearListener(),this._listener=he,this._outerListener=function(){Se._listener&&(Se._listener(window.devicePixelRatio,Se._currentDevicePixelRatio),Se._updateDpr())},this._updateDpr()},_e.prototype.dispose=function(){Ce.prototype.dispose.call(this),this.clearListener()},_e.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))},_e.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)},_e}(Le(2).Disposable);Ee.ScreenDprMonitor=Te},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.clone=void 0,Ee.clone=function me(Ie,Te){if(Te===void 0&&(Te=5),typeof Ie!="object")return Ie;var Ce=Array.isArray(Ie)?[]:{};for(var _e in Ie)Ce[_e]=Te<=1?Ie[_e]:Ie[_e]?me(Ie[_e],Te-1):Ie[_e];return Ce}},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Terminal=void 0;var me=Le(4),Ie=Le(35),Te=Le(18),Ce=Le(0),_e=Le(83),he=function(){function de(ue){this._core=new Ie.Terminal(ue),this._addonManager=new _e.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 ce(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(ue,z){this._verifyIntegers(ue,z),this._core.resize(ue,z)},de.prototype.open=function(ue){this._core.open(ue)},de.prototype.attachCustomKeyEventHandler=function(ue){this._core.attachCustomKeyEventHandler(ue)},de.prototype.registerLinkMatcher=function(ue,z,ee){return this._checkProposedApi(),this._core.registerLinkMatcher(ue,z,ee)},de.prototype.deregisterLinkMatcher=function(ue){this._checkProposedApi(),this._core.deregisterLinkMatcher(ue)},de.prototype.registerLinkProvider=function(ue){return this._checkProposedApi(),this._core.registerLinkProvider(ue)},de.prototype.registerCharacterJoiner=function(ue){return this._checkProposedApi(),this._core.registerCharacterJoiner(ue)},de.prototype.deregisterCharacterJoiner=function(ue){this._checkProposedApi(),this._core.deregisterCharacterJoiner(ue)},de.prototype.registerMarker=function(ue){return this._checkProposedApi(),this._verifyIntegers(ue),this._core.addMarker(ue)},de.prototype.addMarker=function(ue){return this.registerMarker(ue)},de.prototype.hasSelection=function(){return this._core.hasSelection()},de.prototype.select=function(ue,z,ee){this._verifyIntegers(ue,z,ee),this._core.select(ue,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(ue,z){this._verifyIntegers(ue,z),this._core.selectLines(ue,z)},de.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},de.prototype.scrollLines=function(ue){this._verifyIntegers(ue),this._core.scrollLines(ue)},de.prototype.scrollPages=function(ue){this._verifyIntegers(ue),this._core.scrollPages(ue)},de.prototype.scrollToTop=function(){this._core.scrollToTop()},de.prototype.scrollToBottom=function(){this._core.scrollToBottom()},de.prototype.scrollToLine=function(ue){this._verifyIntegers(ue),this._core.scrollToLine(ue)},de.prototype.clear=function(){this._core.clear()},de.prototype.write=function(ue,z){this._core.write(ue,z)},de.prototype.writeUtf8=function(ue,z){this._core.write(ue,z)},de.prototype.writeln=function(ue,z){this._core.write(ue),this._core.write(`\r
|
|
|
`,z)},de.prototype.paste=function(ue){this._core.paste(ue)},de.prototype.getOption=function(ue){return this._core.optionsService.getOption(ue)},de.prototype.setOption=function(ue,z){this._core.optionsService.setOption(ue,z)},de.prototype.refresh=function(ue,z){this._verifyIntegers(ue,z),this._core.refresh(ue,z)},de.prototype.reset=function(){this._core.reset()},de.prototype.loadAddon=function(ue){return this._addonManager.loadAddon(this,ue)},Object.defineProperty(de,"strings",{get:function(){return Te},enumerable:!1,configurable:!0}),de.prototype._verifyIntegers=function(){for(var ue=[],z=0;z<arguments.length;z++)ue[z]=arguments[z];for(var ee=0,oe=ue;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 Se=function(){function de(ue,z){this._buffer=ue,this.type=z}return de.prototype.init=function(ue){return this._buffer=ue,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(ue){var z=this._buffer.lines.get(ue);if(z)return new ge(z)},de.prototype.getNullCell=function(){return new me.CellData},de}(),xe=function(){function de(ue){var z=this;this._buffers=ue,this._onBufferChange=new Ce.EventEmitter,this._normal=new Se(this._buffers.normal,"normal"),this._alternate=new Se(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(ue){this._line=ue}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(ue,z){if(!(ue<0||ue>=this._line.length))return z?(this._line.loadCell(ue,z),z):this._line.loadCell(ue,new me.CellData)},de.prototype.translateToString=function(ue,z,ee){return this._line.translateToString(ue,z,ee)},de}(),ce=function(){function de(ue){this._core=ue}return de.prototype.registerCsiHandler=function(ue,z){return this._core.addCsiHandler(ue,function(ee){return z(ee.toArray())})},de.prototype.addCsiHandler=function(ue,z){return this.registerCsiHandler(ue,z)},de.prototype.registerDcsHandler=function(ue,z){return this._core.addDcsHandler(ue,function(ee,oe){return z(ee,oe.toArray())})},de.prototype.addDcsHandler=function(ue,z){return this.registerDcsHandler(ue,z)},de.prototype.registerEscHandler=function(ue,z){return this._core.addEscHandler(ue,z)},de.prototype.addEscHandler=function(ue,z){return this.registerEscHandler(ue,z)},de.prototype.registerOscHandler=function(ue,z){return this._core.addOscHandler(ue,z)},de.prototype.addOscHandler=function(ue,z){return this.registerOscHandler(ue,z)},de}(),ve=function(){function de(ue){this._core=ue}return de.prototype.register=function(ue){this._core.unicodeService.register(ue)},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(ue){this._core.unicodeService.activeVersion=ue},enumerable:!1,configurable:!0}),de}()},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(bt,rt){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(St,ct){St.__proto__=ct}||function(St,ct){for(var Bt in ct)ct.hasOwnProperty(Bt)&&(St[Bt]=ct[Bt])})(bt,rt)},function(bt,rt){function St(){this.constructor=bt}me(bt,rt),bt.prototype=rt===null?Object.create(rt):(St.prototype=rt.prototype,new St)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Terminal=void 0;var Te=Le(36),Ce=Le(37),_e=Le(38),he=Le(12),Se=Le(19),xe=Le(40),ge=Le(50),ce=Le(51),ve=Le(11),de=Le(7),ue=Le(18),z=Le(54),ee=Le(55),oe=Le(56),ie=Le(57),se=Le(59),le=Le(0),ye=Le(16),we=Le(27),be=Le(60),ke=Le(5),Ne=Le(61),je=Le(62),Ve=Le(63),Je=Le(64),We=Le(65),gt=typeof window!="undefined"?window.document:null,ut=function(bt){function rt(St){St===void 0&&(St={});var ct=bt.call(this,St)||this;return ct.browser=ve,ct._keyDownHandled=!1,ct._onCursorMove=new le.EventEmitter,ct._onKey=new le.EventEmitter,ct._onRender=new le.EventEmitter,ct._onSelectionChange=new le.EventEmitter,ct._onTitleChange=new le.EventEmitter,ct._onFocus=new le.EventEmitter,ct._onBlur=new le.EventEmitter,ct._onA11yCharEmitter=new le.EventEmitter,ct._onA11yTabEmitter=new le.EventEmitter,ct._setup(),ct.linkifier=ct._instantiationService.createInstance(ge.Linkifier),ct.linkifier2=ct.register(ct._instantiationService.createInstance(Ve.Linkifier2)),ct.register(ct._inputHandler.onRequestBell(function(){return ct.bell()})),ct.register(ct._inputHandler.onRequestRefreshRows(function(Bt,ht){return ct.refresh(Bt,ht)})),ct.register(ct._inputHandler.onRequestReset(function(){return ct.reset()})),ct.register(ct._inputHandler.onRequestScroll(function(Bt,ht){return ct.scroll(Bt,ht||void 0)})),ct.register(ct._inputHandler.onRequestWindowsOptionsReport(function(Bt){return ct._reportWindowsOptions(Bt)})),ct.register(le.forwardEvent(ct._inputHandler.onCursorMove,ct._onCursorMove)),ct.register(le.forwardEvent(ct._inputHandler.onTitleChange,ct._onTitleChange)),ct.register(le.forwardEvent(ct._inputHandler.onA11yChar,ct._onA11yCharEmitter)),ct.register(le.forwardEvent(ct._inputHandler.onA11yTab,ct._onA11yTabEmitter)),ct.register(ct._bufferService.onResize(function(Bt){return ct._afterResize(Bt.cols,Bt.rows)})),ct}return Ie(rt,bt),Object.defineProperty(rt.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),rt.prototype.dispose=function(){var St,ct,Bt;this._isDisposed||(bt.prototype.dispose.call(this),(St=this._renderService)===null||St===void 0||St.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(Bt=(ct=this.element)===null||ct===void 0?void 0:ct.parentNode)===null||Bt===void 0||Bt.removeChild(this.element))},rt.prototype._setup=function(){bt.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(rt.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),rt.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},rt.prototype._updateOptions=function(St){var ct,Bt,ht,it;switch(bt.prototype._updateOptions.call(this,St),St){case"fontFamily":case"fontSize":(ct=this._renderService)===null||ct===void 0||ct.clear(),(Bt=this._charSizeService)===null||Bt===void 0||Bt.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":(ht=this.viewport)===null||ht===void 0||ht.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)):((it=this._accessibilityManager)===null||it===void 0||it.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},rt.prototype._onTextAreaFocus=function(St){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(he.C0.ESC+"[I"),this.updateCursorStyle(St),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},rt.prototype.blur=function(){var St;return(St=this.textarea)===null||St===void 0?void 0:St.blur()},rt.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()},rt.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var St=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),ct=this._bufferService.buffer.y*St,Bt=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=Bt+"px",this.textarea.style.top=ct+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=St+"px",this.textarea.style.lineHeight=St+"px",this.textarea.style.zIndex="-5"}},rt.prototype._initGlobal=function(){var St=this;this._bindKeys(),this.register(de.addDisposableDomListener(this.element,"copy",function(Bt){St.hasSelection()&&_e.copyHandler(Bt,St._selectionService)}));var ct=function(Bt){return _e.handlePasteEvent(Bt,St.textarea,St._coreService)};this.register(de.addDisposableDomListener(this.textarea,"paste",ct)),this.register(de.addDisposableDomListener(this.element,"paste",ct)),ve.isFirefox?this.register(de.addDisposableDomListener(this.element,"mousedown",function(Bt){Bt.button===2&&_e.rightClickHandler(Bt,St.textarea,St.screenElement,St._selectionService,St.options.rightClickSelectsWord)})):this.register(de.addDisposableDomListener(this.element,"contextmenu",function(Bt){_e.rightClickHandler(Bt,St.textarea,St.screenElement,St._selectionService,St.options.rightClickSelectsWord)})),ve.isLinux&&this.register(de.addDisposableDomListener(this.element,"auxclick",function(Bt){Bt.button===1&&_e.moveTextAreaUnderMouseCursor(Bt,St.textarea,St.screenElement)}))},rt.prototype._bindKeys=function(){var St=this;this.register(de.addDisposableDomListener(this.textarea,"keyup",function(ct){return St._keyUp(ct)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keydown",function(ct){return St._keyDown(ct)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keypress",function(ct){return St._keyPress(ct)},!0)),this.register(de.addDisposableDomListener(this.textarea,"compositionstart",function(){return St._compositionHelper.compositionstart()})),this.register(de.addDisposableDomListener(this.textarea,"compositionupdate",function(ct){return St._compositionHelper.compositionupdate(ct)})),this.register(de.addDisposableDomListener(this.textarea,"compositionend",function(){return St._compositionHelper.compositionend()})),this.register(this.onRender(function(){return St._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(ct){return St._queueLinkification(ct.start,ct.end)}))},rt.prototype.open=function(St){var ct=this;if(!St)throw new Error("Terminal requires a parent element.");gt.body.contains(St)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=St.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"),St.appendChild(this.element);var Bt=gt.createDocumentFragment();this._viewportElement=gt.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Bt.appendChild(this._viewportElement),this._viewportScrollArea=gt.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=gt.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=gt.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Bt.appendChild(this.screenElement),this.textarea=gt.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",ue.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(dt){return ct._onTextAreaFocus(dt)})),this.register(de.addDisposableDomListener(this.textarea,"blur",function(){return ct._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var ht=this._instantiationService.createInstance(Je.CoreBrowserService,this.textarea);this._instantiationService.setService(ke.ICoreBrowserService,ht),this._charSizeService=this._instantiationService.createInstance(Ne.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(ke.ICharSizeService,this._charSizeService),this._compositionView=gt.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Te.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(Bt),this._theme=this.options.theme||this._theme,this._colorManager=new we.ColorManager(gt,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(dt){return ct._colorManager.onOptionsChange(dt)})),this._colorManager.setTheme(this._theme);var it=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(be.RenderService,it,this.rows,this.screenElement)),this._instantiationService.setService(ke.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(dt){return ct._onRender.fire(dt)})),this.onResize(function(dt){return ct._renderService.resize(dt.cols,dt.rows)}),this._soundService=this._instantiationService.createInstance(z.SoundService),this._instantiationService.setService(ke.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(je.MouseService),this._instantiationService.setService(ke.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(Ce.Viewport,function(dt,yt){return ct.scrollLines(dt,yt)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return ct.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){ct._renderService.onCursorMove(),ct._syncTextArea()})),this.register(this.onResize(function(){return ct._renderService.onResize(ct.cols,ct.rows)})),this.register(this.onBlur(function(){return ct._renderService.onBlur()})),this.register(this.onFocus(function(){return ct._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return ct.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(ce.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(ke.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(dt){return ct.scrollLines(dt.amount,dt.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return ct._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(dt){return ct._renderService.onSelectionChanged(dt.start,dt.end,dt.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(dt){ct.textarea.value=dt,ct.textarea.focus(),ct.textarea.select()})),this.register(this.onScroll(function(){ct.viewport.syncScrollArea(),ct._selectionService.refresh()})),this.register(de.addDisposableDomListener(this._viewportElement,"scroll",function(){return ct._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(ee.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return ct._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(dt){return ct._selectionService.onMouseDown(dt)})),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()},rt.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+'"')}},rt.prototype._setTheme=function(St){var ct,Bt,ht;this._theme=St,(ct=this._colorManager)===null||ct===void 0||ct.setTheme(St),(Bt=this._renderService)===null||Bt===void 0||Bt.setColors(this._colorManager.colors),(ht=this.viewport)===null||ht===void 0||ht.onThemeChange(this._colorManager.colors)},rt.prototype.bindMouse=function(){var St=this,ct=this,Bt=this.element;function ht(Rt){var jt,un,Vt=ct._mouseService.getRawByteCoords(Rt,ct.screenElement,ct.cols,ct.rows);if(!Vt)return!1;switch(Rt.overrideType||Rt.type){case"mousemove":un=32,Rt.buttons===void 0?(jt=3,Rt.button!==void 0&&(jt=Rt.button<3?Rt.button:3)):jt=1&Rt.buttons?0:4&Rt.buttons?1:2&Rt.buttons?2:3;break;case"mouseup":un=0,jt=Rt.button<3?Rt.button:3;break;case"mousedown":un=1,jt=Rt.button<3?Rt.button:3;break;case"wheel":Rt.deltaY!==0&&(un=Rt.deltaY<0?0:1),jt=4;break;default:return!1}return!(un===void 0||jt===void 0||jt>4)&&ct._coreMouseService.triggerMouseEvent({col:Vt.x-33,row:Vt.y-33,button:jt,action:un,ctrl:Rt.ctrlKey,alt:Rt.altKey,shift:Rt.shiftKey})}var it={mouseup:null,wheel:null,mousedrag:null,mousemove:null},dt=function(Rt){return ht(Rt),Rt.buttons||(St._document.removeEventListener("mouseup",it.mouseup),it.mousedrag&&St._document.removeEventListener("mousemove",it.mousedrag)),St.cancel(Rt)},yt=function(Rt){return ht(Rt),Rt.preventDefault(),St.cancel(Rt)},Et=function(Rt){Rt.buttons&&ht(Rt)},vt=function(Rt){Rt.buttons||ht(Rt)};this.register(this._coreMouseService.onProtocolChange(function(Rt){Rt?(St.optionsService.options.logLevel==="debug"&&St._logService.debug("Binding to mouse events:",St._coreMouseService.explainEvents(Rt)),St.element.classList.add("enable-mouse-events"),St._selectionService.disable()):(St._logService.debug("Unbinding from mouse events."),St.element.classList.remove("enable-mouse-events"),St._selectionService.enable()),8&Rt?it.mousemove||(Bt.addEventListener("mousemove",vt),it.mousemove=vt):(Bt.removeEventListener("mousemove",it.mousemove),it.mousemove=null),16&Rt?it.wheel||(Bt.addEventListener("wheel",yt,{passive:!1}),it.wheel=yt):(Bt.removeEventListener("wheel",it.wheel),it.wheel=null),2&Rt?it.mouseup||(it.mouseup=dt):(St._document.removeEventListener("mouseup",it.mouseup),it.mouseup=null),4&Rt?it.mousedrag||(it.mousedrag=Et):(St._document.removeEventListener("mousemove",it.mousedrag),it.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(de.addDisposableDomListener(Bt,"mousedown",function(Rt){if(Rt.preventDefault(),St.focus(),St._coreMouseService.areMouseEventsActive&&!St._selectionService.shouldForceSelection(Rt))return ht(Rt),it.mouseup&&St._document.addEventListener("mouseup",it.mouseup),it.mousedrag&&St._document.addEventListener("mousemove",it.mousedrag),St.cancel(Rt)})),this.register(de.addDisposableDomListener(Bt,"wheel",function(Rt){if(!it.wheel){if(!St.buffer.hasScrollback){var jt=St.viewport.getLinesScrolled(Rt);if(jt===0)return;for(var un=he.C0.ESC+(St._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Rt.deltaY<0?"A":"B"),Vt="",xn=0;xn<Math.abs(jt);xn++)Vt+=un;St._coreService.triggerDataEvent(Vt,!0)}}},{passive:!0})),this.register(de.addDisposableDomListener(Bt,"wheel",function(Rt){if(!it.wheel)return St.viewport.onWheel(Rt)?void 0:St.cancel(Rt)},{passive:!1})),this.register(de.addDisposableDomListener(Bt,"touchstart",function(Rt){if(!St._coreMouseService.areMouseEventsActive)return St.viewport.onTouchStart(Rt),St.cancel(Rt)},{passive:!0})),this.register(de.addDisposableDomListener(Bt,"touchmove",function(Rt){if(!St._coreMouseService.areMouseEventsActive)return St.viewport.onTouchMove(Rt)?void 0:St.cancel(Rt)},{passive:!1}))},rt.prototype.refresh=function(St,ct){var Bt;(Bt=this._renderService)===null||Bt===void 0||Bt.refreshRows(St,ct)},rt.prototype._queueLinkification=function(St,ct){var Bt;(Bt=this.linkifier)===null||Bt===void 0||Bt.linkifyRows(St,ct)},rt.prototype.updateCursorStyle=function(St){this._selectionService&&this._selectionService.shouldColumnSelect(St)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},rt.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},rt.prototype.scrollLines=function(St,ct){bt.prototype.scrollLines.call(this,St,ct),this.refresh(0,this.rows-1)},rt.prototype.paste=function(St){_e.paste(St,this.textarea,this._coreService)},rt.prototype.attachCustomKeyEventHandler=function(St){this._customKeyEventHandler=St},rt.prototype.registerLinkMatcher=function(St,ct,Bt){var ht=this.linkifier.registerLinkMatcher(St,ct,Bt);return this.refresh(0,this.rows-1),ht},rt.prototype.deregisterLinkMatcher=function(St){this.linkifier.deregisterLinkMatcher(St)&&this.refresh(0,this.rows-1)},rt.prototype.registerLinkProvider=function(St){return this.linkifier2.registerLinkProvider(St)},rt.prototype.registerCharacterJoiner=function(St){var ct=this._renderService.registerCharacterJoiner(St);return this.refresh(0,this.rows-1),ct},rt.prototype.deregisterCharacterJoiner=function(St){this._renderService.deregisterCharacterJoiner(St)&&this.refresh(0,this.rows-1)},Object.defineProperty(rt.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),rt.prototype.addMarker=function(St){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+St)},rt.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},rt.prototype.select=function(St,ct,Bt){this._selectionService.setSelection(St,ct,Bt)},rt.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},rt.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]}},rt.prototype.clearSelection=function(){var St;(St=this._selectionService)===null||St===void 0||St.clearSelection()},rt.prototype.selectAll=function(){var St;(St=this._selectionService)===null||St===void 0||St.selectAll()},rt.prototype.selectLines=function(St,ct){var Bt;(Bt=this._selectionService)===null||Bt===void 0||Bt.selectLines(St,ct)},rt.prototype._keyDown=function(St){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(St)===!1)return!1;if(!this._compositionHelper.keydown(St))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var ct=se.evaluateKeyboardEvent(St,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(St),ct.type===3||ct.type===2){var Bt=this.rows-1;return this.scrollLines(ct.type===2?-Bt:Bt),this.cancel(St,!0)}return ct.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,St)||(ct.cancel&&this.cancel(St,!0),!ct.key||(ct.key!==he.C0.ETX&&ct.key!==he.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ct.key,domEvent:St}),this._showCursor(),this._coreService.triggerDataEvent(ct.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(St,!0)))},rt.prototype._isThirdLevelShift=function(St,ct){var Bt=St.isMac&&!this.options.macOptionIsMeta&&ct.altKey&&!ct.ctrlKey&&!ct.metaKey||St.isWindows&&ct.altKey&&ct.ctrlKey&&!ct.metaKey;return ct.type==="keypress"?Bt:Bt&&(!ct.keyCode||ct.keyCode>47)},rt.prototype._keyUp=function(St){this._customKeyEventHandler&&this._customKeyEventHandler(St)===!1||(function(ct){return ct.keyCode===16||ct.keyCode===17||ct.keyCode===18}(St)||this.focus(),this.updateCursorStyle(St))},rt.prototype._keyPress=function(St){var ct;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(St)===!1)return!1;if(this.cancel(St),St.charCode)ct=St.charCode;else if(St.which===null||St.which===void 0)ct=St.keyCode;else{if(St.which===0||St.charCode===0)return!1;ct=St.which}return!(!ct||(St.altKey||St.ctrlKey||St.metaKey)&&!this._isThirdLevelShift(this.browser,St))&&(ct=String.fromCharCode(ct),this._onKey.fire({key:ct,domEvent:St}),this._showCursor(),this._coreService.triggerDataEvent(ct,!0),!0)},rt.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},rt.prototype.resize=function(St,ct){St!==this.cols||ct!==this.rows?bt.prototype.resize.call(this,St,ct):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},rt.prototype._afterResize=function(St,ct){var Bt,ht;(Bt=this._charSizeService)===null||Bt===void 0||Bt.measure(),(ht=this.viewport)===null||ht===void 0||ht.syncScrollArea(!0)},rt.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 St=1;St<this.rows;St++)this.buffer.lines.push(this.buffer.getBlankLine(ye.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},rt.prototype.reset=function(){var St,ct;this.options.rows=this.rows,this.options.cols=this.cols;var Bt=this._customKeyEventHandler;this._setup(),bt.prototype.reset.call(this),(St=this._selectionService)===null||St===void 0||St.reset(),this._customKeyEventHandler=Bt,this.refresh(0,this.rows-1),(ct=this.viewport)===null||ct===void 0||ct.syncScrollArea()},rt.prototype._reportWindowsOptions=function(St){if(this._renderService)switch(St){case Se.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var ct=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),Bt=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(he.C0.ESC+"[4;"+Bt+";"+ct+"t");break;case Se.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var ht=this._renderService.dimensions.scaledCellWidth.toFixed(0),it=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(he.C0.ESC+"[6;"+it+";"+ht+"t")}},rt.prototype.cancel=function(St,ct){if(this.options.cancelEvents||ct)return St.preventDefault(),St.stopPropagation(),!1},rt.prototype._visualBell=function(){return!1},rt.prototype._soundBell=function(){return this.options.bellStyle==="sound"},rt}(We.CoreTerminal);Ee.Terminal=ut},function(qt,Ee,Le){"use strict";var me=this&&this.__decorate||function(he,Se,xe,ge){var ce,ve=arguments.length,de=ve<3?Se:ge===null?ge=Object.getOwnPropertyDescriptor(Se,xe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(he,Se,xe,ge);else for(var ue=he.length-1;ue>=0;ue--)(ce=he[ue])&&(de=(ve<3?ce(de):ve>3?ce(Se,xe,de):ce(Se,xe))||de);return ve>3&&de&&Object.defineProperty(Se,xe,de),de},Ie=this&&this.__param||function(he,Se){return function(xe,ge){Se(xe,ge,he)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CompositionHelper=void 0;var Te=Le(5),Ce=Le(1),_e=function(){function he(Se,xe,ge,ce,ve,de){this._textarea=Se,this._compositionView=xe,this._bufferService=ge,this._optionsService=ce,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(Se){var xe=this;this._compositionView.textContent=Se.data,this.updateCompositionElements(),setTimeout(function(){xe._compositionPosition.end=xe._textarea.value.length},0)},he.prototype.compositionend=function(){this._finalizeComposition(!0)},he.prototype.keydown=function(Se){if(this._isComposing||this._isSendingComposition){if(Se.keyCode===229||Se.keyCode===16||Se.keyCode===17||Se.keyCode===18)return!1;this._finalizeComposition(!1)}return Se.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},he.prototype._finalizeComposition=function(Se){var xe=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,Se){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 ce=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(ce,!0)}},he.prototype._handleAnyTextareaChanges=function(){var Se=this,xe=this._textarea.value;setTimeout(function(){if(!Se._isComposing){var ge=Se._textarea.value.replace(xe,"");ge.length>0&&Se._coreService.triggerDataEvent(ge,!0)}},0)},he.prototype.updateCompositionElements=function(Se){var xe=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var ge=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),ce=this._bufferService.buffer.y*ge,ve=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=ve+"px",this._compositionView.style.top=ce+"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=ce+"px",this._textarea.style.width=de.width+"px",this._textarea.style.height=de.height+"px",this._textarea.style.lineHeight=de.height+"px"}Se||setTimeout(function(){return xe.updateCompositionElements(!0)},0)}},he=me([Ie(2,Ce.IBufferService),Ie(3,Ce.IOptionsService),Ie(4,Te.ICharSizeService),Ie(5,Ce.ICoreService)],he)}();Ee.CompositionHelper=_e},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),Te=this&&this.__decorate||function(ce,ve,de,ue){var z,ee=arguments.length,oe=ee<3?ve:ue===null?ue=Object.getOwnPropertyDescriptor(ve,de):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ve,de,ue);else for(var ie=ce.length-1;ie>=0;ie--)(z=ce[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(ce,ve){return function(de,ue){ve(de,ue,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Viewport=void 0;var _e=Le(2),he=Le(7),Se=Le(5),xe=Le(1),ge=function(ce){function ve(de,ue,z,ee,oe,ie,se){var le=ce.call(this)||this;return le._scrollLines=de,le._viewportElement=ue,le._scrollArea=z,le._bufferService=ee,le._optionsService=oe,le._charSizeService=ie,le._renderService=se,le.scrollBarWidth=0,le._currentRowHeight=0,le._lastRecordedBufferLength=0,le._lastRecordedViewportHeight=0,le._lastRecordedBufferHeight=0,le._lastTouchY=0,le._lastScrollTop=0,le._wheelPartialScroll=0,le._refreshAnimationFrame=null,le._ignoreNextScrollEvent=!1,le.scrollBarWidth=le._viewportElement.offsetWidth-le._scrollArea.offsetWidth||15,le.register(he.addDisposableDomListener(le._viewportElement,"scroll",le._onScroll.bind(le))),setTimeout(function(){return le.syncScrollArea()},0),le}return Ie(ve,ce),ve.prototype.onThemeChange=function(de){this._viewportElement.style.backgroundColor=de.background.css},ve.prototype._refresh=function(de){var ue=this;if(de)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return ue._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 ue=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==ue&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=ue),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 ue=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===ue&&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 ue=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(ue,!0)}},ve.prototype._bubbleScroll=function(de,ue){var z=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(ue<0&&this._viewportElement.scrollTop!==0||ue>0&&z<this._lastRecordedBufferHeight)||(de.cancelable&&de.preventDefault(),!1)},ve.prototype.onWheel=function(de){var ue=this._getPixelsScrolled(de);return ue!==0&&(this._viewportElement.scrollTop+=ue,this._bubbleScroll(de,ue))},ve.prototype._getPixelsScrolled=function(de){if(de.deltaY===0)return 0;var ue=this._applyScrollModifier(de.deltaY,de);return de.deltaMode===WheelEvent.DOM_DELTA_LINE?ue*=this._currentRowHeight:de.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ue*=this._currentRowHeight*this._bufferService.rows),ue},ve.prototype.getLinesScrolled=function(de){if(de.deltaY===0)return 0;var ue=this._applyScrollModifier(de.deltaY,de);return de.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(ue/=this._currentRowHeight+0,this._wheelPartialScroll+=ue,ue=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):de.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ue*=this._bufferService.rows),ue},ve.prototype._applyScrollModifier=function(de,ue){var z=this._optionsService.options.fastScrollModifier;return z==="alt"&&ue.altKey||z==="ctrl"&&ue.ctrlKey||z==="shift"&&ue.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 ue=this._lastTouchY-de.touches[0].pageY;return this._lastTouchY=de.touches[0].pageY,ue!==0&&(this._viewportElement.scrollTop+=ue,this._bubbleScroll(de,ue))},ve=Te([Ce(3,xe.IBufferService),Ce(4,xe.IOptionsService),Ce(5,Se.ICharSizeService),Ce(6,Se.IRenderService)],ve)}(_e.Disposable);Ee.Viewport=ge},function(qt,Ee,Le){"use strict";function me(_e){return _e.replace(/\r?\n/g,"\r")}function Ie(_e,he){return he?"\x1B[200~"+_e+"\x1B[201~":_e}function Te(_e,he,Se){_e=Ie(_e=me(_e),Se.decPrivateModes.bracketedPasteMode),Se.triggerDataEvent(_e,!0),he.value=""}function Ce(_e,he,Se){var xe=Se.getBoundingClientRect(),ge=_e.clientX-xe.left-10,ce=_e.clientY-xe.top-10;he.style.width="20px",he.style.height="20px",he.style.left=ge+"px",he.style.top=ce+"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=Ie,Ee.copyHandler=function(_e,he){_e.clipboardData&&_e.clipboardData.setData("text/plain",he.selectionText),_e.preventDefault()},Ee.handlePasteEvent=function(_e,he,Se){_e.stopPropagation(),_e.clipboardData&&Te(_e.clipboardData.getData("text/plain"),he,Se)},Ee.paste=Te,Ee.moveTextAreaUnderMouseCursor=Ce,Ee.rightClickHandler=function(_e,he,Se,xe,ge){Ce(_e,he,Se),ge&&!xe.isClickInSelection(_e)&&xe.selectWordAtCursor(_e),he.value=xe.selectionText,he.select()}},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.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 Te=Le(2),Ce=Le(15),_e=Le(21),he=Le(22),Se=Le(24),xe=function(){function ce(ve){this.table=new Uint8Array(ve)}return ce.prototype.setDefault=function(ve,de){Ce.fill(this.table,ve<<4|de)},ce.prototype.add=function(ve,de,ue,z){this.table[de<<8|ve]=ue<<4|z},ce.prototype.addMany=function(ve,de,ue,z){for(var ee=0;ee<ve.length;ee++)this.table[de<<8|ve[ee]]=ue<<4|z},ce}();Ee.TransitionTable=xe,Ee.VT500_TRANSITION_TABLE=function(){var ce=new xe(4095),ve=Array.apply(null,Array(256)).map(function(ie,se){return se}),de=function(ie,se){return ve.slice(ie,se)},ue=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 ce.setDefault(1,0),ce.addMany(ue,0,2,0),oe)ce.addMany([24,26,153,154],ee,3,0),ce.addMany(de(128,144),ee,3,0),ce.addMany(de(144,152),ee,3,0),ce.add(156,ee,0,0),ce.add(27,ee,11,1),ce.add(157,ee,4,8),ce.addMany([152,158,159],ee,0,7),ce.add(155,ee,11,3),ce.add(144,ee,11,9);return ce.addMany(z,0,3,0),ce.addMany(z,1,3,1),ce.add(127,1,0,1),ce.addMany(z,8,0,8),ce.addMany(z,3,3,3),ce.add(127,3,0,3),ce.addMany(z,4,3,4),ce.add(127,4,0,4),ce.addMany(z,6,3,6),ce.addMany(z,5,3,5),ce.add(127,5,0,5),ce.addMany(z,2,3,2),ce.add(127,2,0,2),ce.add(93,1,4,8),ce.addMany(ue,8,5,8),ce.add(127,8,5,8),ce.addMany([156,27,24,26,7],8,6,0),ce.addMany(de(28,32),8,0,8),ce.addMany([88,94,95],1,0,7),ce.addMany(ue,7,0,7),ce.addMany(z,7,0,7),ce.add(156,7,0,0),ce.add(127,7,0,7),ce.add(91,1,11,3),ce.addMany(de(64,127),3,7,0),ce.addMany(de(48,60),3,8,4),ce.addMany([60,61,62,63],3,9,4),ce.addMany(de(48,60),4,8,4),ce.addMany(de(64,127),4,7,0),ce.addMany([60,61,62,63],4,0,6),ce.addMany(de(32,64),6,0,6),ce.add(127,6,0,6),ce.addMany(de(64,127),6,0,0),ce.addMany(de(32,48),3,9,5),ce.addMany(de(32,48),5,9,5),ce.addMany(de(48,64),5,0,6),ce.addMany(de(64,127),5,7,0),ce.addMany(de(32,48),4,9,5),ce.addMany(de(32,48),1,9,2),ce.addMany(de(32,48),2,9,2),ce.addMany(de(48,127),2,10,0),ce.addMany(de(48,80),1,10,0),ce.addMany(de(81,88),1,10,0),ce.addMany([89,90,92],1,10,0),ce.addMany(de(96,127),1,10,0),ce.add(80,1,11,9),ce.addMany(z,9,0,9),ce.add(127,9,0,9),ce.addMany(de(28,32),9,0,9),ce.addMany(de(32,48),9,9,12),ce.addMany(de(48,60),9,8,10),ce.addMany([60,61,62,63],9,9,10),ce.addMany(z,11,0,11),ce.addMany(de(32,128),11,0,11),ce.addMany(de(28,32),11,0,11),ce.addMany(z,10,0,10),ce.add(127,10,0,10),ce.addMany(de(28,32),10,0,10),ce.addMany(de(48,60),10,8,10),ce.addMany([60,61,62,63],10,0,11),ce.addMany(de(32,48),10,9,12),ce.addMany(z,12,0,12),ce.add(127,12,0,12),ce.addMany(de(28,32),12,0,12),ce.addMany(de(32,48),12,9,12),ce.addMany(de(48,64),12,0,11),ce.addMany(de(64,127),12,12,13),ce.addMany(de(64,127),10,12,13),ce.addMany(de(64,127),9,12,13),ce.addMany(z,13,13,13),ce.addMany(ue,13,13,13),ce.add(127,13,0,13),ce.addMany([27,156,24,26],13,14,0),ce.add(160,0,2,0),ce.add(160,8,5,8),ce.add(160,6,0,6),ce.add(160,11,0,11),ce.add(160,13,13,13),ce}();var ge=function(ce){function ve(de){de===void 0&&(de=Ee.VT500_TRANSITION_TABLE);var ue=ce.call(this)||this;return ue._transitions=de,ue.initialState=0,ue.currentState=ue.initialState,ue._params=new _e.Params,ue._params.addParam(0),ue._collect=0,ue.precedingCodepoint=0,ue._printHandlerFb=function(z,ee,oe){},ue._executeHandlerFb=function(z){},ue._csiHandlerFb=function(z,ee){},ue._escHandlerFb=function(z){},ue._errorHandlerFb=function(z){return z},ue._printHandler=ue._printHandlerFb,ue._executeHandlers=Object.create(null),ue._csiHandlers=Object.create(null),ue._escHandlers=Object.create(null),ue._oscParser=new he.OscParser,ue._dcsParser=new Se.DcsParser,ue._errorHandler=ue._errorHandlerFb,ue.setEscHandler({final:"\\"},function(){}),ue}return Ie(ve,ce),ve.prototype._identifier=function(de,ue){ue===void 0&&(ue=[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(ue[0]>ie||ie>ue[1])throw new Error("final must be in range "+ue[0]+" .. "+ue[1]);return z<<=8,z|=ie},ve.prototype.identToString=function(de){for(var ue=[];de;)ue.push(String.fromCharCode(255&de)),de>>=8;return ue.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,ue){var z=this._identifier(de,[48,126]);this._escHandlers[z]===void 0&&(this._escHandlers[z]=[]);var ee=this._escHandlers[z];return ee.push(ue),{dispose:function(){var oe=ee.indexOf(ue);oe!==-1&&ee.splice(oe,1)}}},ve.prototype.setEscHandler=function(de,ue){this._escHandlers[this._identifier(de,[48,126])]=[ue]},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,ue){this._executeHandlers[de.charCodeAt(0)]=ue},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,ue){var z=this._identifier(de);this._csiHandlers[z]===void 0&&(this._csiHandlers[z]=[]);var ee=this._csiHandlers[z];return ee.push(ue),{dispose:function(){var oe=ee.indexOf(ue);oe!==-1&&ee.splice(oe,1)}}},ve.prototype.setCsiHandler=function(de,ue){this._csiHandlers[this._identifier(de)]=[ue]},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,ue){return this._dcsParser.addHandler(this._identifier(de),ue)},ve.prototype.setDcsHandler=function(de,ue){this._dcsParser.setHandler(this._identifier(de),ue)},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,ue){return this._oscParser.addHandler(de,ue)},ve.prototype.setOscHandler=function(de,ue){this._oscParser.setHandler(de,ue)},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,ue){for(var z=0,ee=0,oe=this.currentState,ie=this._oscParser,se=this._dcsParser,le=this._collect,ye=this._params,we=this._transitions.table,be=0;be<ue;++be){switch((ee=we[oe<<8|((z=de[be])<160?z:160)])>>4){case 2:for(var ke=be+1;;++ke){if(ke>=ue||(z=de[ke])<32||z>126&&z<160){this._printHandler(de,be,ke),be=ke-1;break}if(++ke>=ue||(z=de[ke])<32||z>126&&z<160){this._printHandler(de,be,ke),be=ke-1;break}if(++ke>=ue||(z=de[ke])<32||z>126&&z<160){this._printHandler(de,be,ke),be=ke-1;break}if(++ke>=ue||(z=de[ke])<32||z>126&&z<160){this._printHandler(de,be,ke),be=ke-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:be,code:z,currentState:oe,collect:le,params:ye,abort:!1}).abort)return;break;case 7:for(var Ne=this._csiHandlers[le<<8|z],je=Ne?Ne.length-1:-1;je>=0&&Ne[je](ye)===!1;je--);je<0&&this._csiHandlerFb(le<<8|z,ye),this.precedingCodepoint=0;break;case 8:do switch(z){case 59:ye.addParam(0);break;case 58:ye.addSubParam(-1);break;default:ye.addDigit(z-48)}while(++be<ue&&(z=de[be])>47&&z<60);be--;break;case 9:le<<=8,le|=z;break;case 10:for(var Ve=this._escHandlers[le<<8|z],Je=Ve?Ve.length-1:-1;Je>=0&&Ve[Je]()===!1;Je--);Je<0&&this._escHandlerFb(le<<8|z),this.precedingCodepoint=0;break;case 11:ye.reset(),ye.addParam(0),le=0;break;case 12:se.hook(le<<8|z,ye);break;case 13:for(var We=be+1;;++We)if(We>=ue||(z=de[We])===24||z===26||z===27||z>127&&z<160){se.put(de,be,We),be=We-1;break}break;case 14:se.unhook(z!==24&&z!==26),z===27&&(ee|=1),ye.reset(),ye.addParam(0),le=0,this.precedingCodepoint=0;break;case 4:ie.start();break;case 5:for(var gt=be+1;;gt++)if(gt>=ue||(z=de[gt])<32||z>127&&z<=159){ie.put(de,be,gt),be=gt-1;break}break;case 6:ie.end(z!==24&&z!==26),z===27&&(ee|=1),ye.reset(),ye.addParam(0),le=0,this.precedingCodepoint=0}oe=15&ee}this._collect=le,this.currentState=oe},ve}(Te.Disposable);Ee.EscapeSequenceParser=ge},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ie,se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ye){le.__proto__=ye}||function(le,ye){for(var we in ye)ye.hasOwnProperty(we)&&(le[we]=ye[we])})(ie,se)},function(ie,se){function le(){this.constructor=ie}me(ie,se),ie.prototype=se===null?Object.create(se):(le.prototype=se.prototype,new le)}),Te=this&&this.__decorate||function(ie,se,le,ye){var we,be=arguments.length,ke=be<3?se:ye===null?ye=Object.getOwnPropertyDescriptor(se,le):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ke=Reflect.decorate(ie,se,le,ye);else for(var Ne=ie.length-1;Ne>=0;Ne--)(we=ie[Ne])&&(ke=(be<3?we(ke):be>3?we(se,le,ke):we(se,le))||ke);return be>3&&ke&&Object.defineProperty(se,le,ke),ke},Ce=this&&this.__param||function(ie,se){return function(le,ye){se(le,ye,ie)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Renderer=void 0;var _e=Le(41),he=Le(47),Se=Le(48),xe=Le(49),ge=Le(29),ce=Le(2),ve=Le(5),de=Le(1),ue=Le(25),z=Le(0),ee=1,oe=function(ie){function se(le,ye,we,be,ke,Ne,je,Ve,Je){var We=ie.call(this)||this;We._colors=le,We._screenElement=ye,We._bufferService=ke,We._charSizeService=Ne,We._optionsService=je,We._id=ee++,We._onRequestRedraw=new z.EventEmitter;var gt=We._optionsService.options.allowTransparency;return We._characterJoinerRegistry=new ge.CharacterJoinerRegistry(We._bufferService),We._renderLayers=[new _e.TextRenderLayer(We._screenElement,0,We._colors,We._characterJoinerRegistry,gt,We._id,We._bufferService,je),new he.SelectionRenderLayer(We._screenElement,1,We._colors,We._id,We._bufferService,je),new xe.LinkRenderLayer(We._screenElement,2,We._colors,We._id,we,be,We._bufferService,je),new Se.CursorRenderLayer(We._screenElement,3,We._colors,We._id,We._onRequestRedraw,We._bufferService,je,Ve,Je)],We.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},We._devicePixelRatio=window.devicePixelRatio,We._updateDimensions(),We.onOptionsChanged(),We}return Ie(se,ie),Object.defineProperty(se.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),se.prototype.dispose=function(){for(var le=0,ye=this._renderLayers;le<ye.length;le++)ye[le].dispose();ie.prototype.dispose.call(this),ue.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(le){this._colors=le;for(var ye=0,we=this._renderLayers;ye<we.length;ye++){var be=we[ye];be.setColors(this._colors),be.reset()}},se.prototype.onResize=function(le,ye){this._updateDimensions();for(var we=0,be=this._renderLayers;we<be.length;we++)be[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(le){return le.onBlur()})},se.prototype.onFocus=function(){this._runOperation(function(le){return le.onFocus()})},se.prototype.onSelectionChanged=function(le,ye,we){we===void 0&&(we=!1),this._runOperation(function(be){return be.onSelectionChanged(le,ye,we)})},se.prototype.onCursorMove=function(){this._runOperation(function(le){return le.onCursorMove()})},se.prototype.onOptionsChanged=function(){this._runOperation(function(le){return le.onOptionsChanged()})},se.prototype.clear=function(){this._runOperation(function(le){return le.reset()})},se.prototype._runOperation=function(le){for(var ye=0,we=this._renderLayers;ye<we.length;ye++)le(we[ye])},se.prototype.renderRows=function(le,ye){for(var we=0,be=this._renderLayers;we<be.length;we++)be[we].onGridChanged(le,ye)},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(le){return this._characterJoinerRegistry.registerCharacterJoiner(le)},se.prototype.deregisterCharacterJoiner=function(le){return this._characterJoinerRegistry.deregisterCharacterJoiner(le)},se=Te([Ce(4,de.IBufferService),Ce(5,ve.ICharSizeService),Ce(6,de.IOptionsService),Ce(7,de.ICoreService),Ce(8,ve.ICoreBrowserService)],se)}(ce.Disposable);Ee.Renderer=oe},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.TextRenderLayer=void 0;var Te=Le(42),Ce=Le(13),_e=Le(6),he=Le(3),Se=Le(29),xe=Le(4),ge=function(ce){function ve(de,ue,z,ee,oe,ie,se,le){var ye=ce.call(this,de,"text",ue,oe,z,ie,se,le)||this;return ye._characterWidth=0,ye._characterFont="",ye._characterOverlapCache={},ye._workCell=new xe.CellData,ye._state=new Te.GridCache,ye._characterJoinerRegistry=ee,ye}return Ie(ve,ce),ve.prototype.resize=function(de){ce.prototype.resize.call(this,de);var ue=this._getFont(!1,!1);this._characterWidth===de.scaledCharWidth&&this._characterFont===ue||(this._characterWidth=de.scaledCharWidth,this._characterFont=ue,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,ue,z,ee){for(var oe=de;oe<=ue;oe++)for(var ie=oe+this._bufferService.buffer.ydisp,se=this._bufferService.buffer.lines.get(ie),le=z?z.getJoinedCharacters(ie):[],ye=0;ye<this._bufferService.cols;ye++){se.loadCell(ye,this._workCell);var we=this._workCell,be=!1,ke=ye;if(we.getWidth()!==0){if(le.length>0&&ye===le[0][0]){be=!0;var Ne=le.shift();we=new Se.JoinedCellData(this._workCell,se.translateToString(!0,Ne[0],Ne[1]),Ne[1]-Ne[0]),ke=Ne[1]-1}!be&&this._isOverlapping(we)&&ke<se.length-1&&se.getCodePoint(ke+1)===he.NULL_CELL_CODE&&(we.content&=-12582913,we.content|=2<<22),ee(we,ye,oe),ye=ke}}},ve.prototype._drawBackground=function(de,ue){var z=this,ee=this._ctx,oe=this._bufferService.cols,ie=0,se=0,le=null;ee.save(),this._forEachCell(de,ue,null,function(ye,we,be){var ke=null;ye.isInverse()?ke=ye.isFgDefault()?z._colors.foreground.css:ye.isFgRGB()?"rgb("+_e.AttributeData.toColorRGB(ye.getFgColor()).join(",")+")":z._colors.ansi[ye.getFgColor()].css:ye.isBgRGB()?ke="rgb("+_e.AttributeData.toColorRGB(ye.getBgColor()).join(",")+")":ye.isBgPalette()&&(ke=z._colors.ansi[ye.getBgColor()].css),le===null&&(ie=we,se=be),be!==se?(ee.fillStyle=le||"",z._fillCells(ie,se,oe-ie,1),ie=we,se=be):le!==ke&&(ee.fillStyle=le||"",z._fillCells(ie,se,we-ie,1),ie=we,se=be),le=ke}),le!==null&&(ee.fillStyle=le,this._fillCells(ie,se,oe-ie,1)),ee.restore()},ve.prototype._drawForeground=function(de,ue){var z=this;this._forEachCell(de,ue,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("+_e.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("+_e.AttributeData.toColorRGB(ee.getFgColor()).join(",")+")";else{var le=ee.getFgColor();z._optionsService.options.drawBoldTextInBrightColors&&ee.isBold()&&le<8&&(le+=8),z._ctx.fillStyle=z._colors.ansi[le].css}z._fillBottomLineAtCells(oe,ie,ee.getWidth()),z._ctx.restore()}})},ve.prototype.onGridChanged=function(de,ue){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,de,this._bufferService.cols,ue-de+1),this._drawBackground(de,ue),this._drawForeground(de,ue))},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 ue=de.getChars();if(this._characterOverlapCache.hasOwnProperty(ue))return this._characterOverlapCache[ue];this._ctx.save(),this._ctx.font=this._characterFont;var z=Math.floor(this._ctx.measureText(ue).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[ue]=z,z},ve}(Ce.BaseRenderLayer);Ee.TextRenderLayer=ge},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.GridCache=void 0;var me=function(){function Ie(){this.cache=[]}return Ie.prototype.resize=function(Te,Ce){for(var _e=0;_e<Te;_e++){this.cache.length<=_e&&this.cache.push([]);for(var he=this.cache[_e].length;he<Ce;he++)this.cache[_e].push(void 0);this.cache[_e].length=Ce}this.cache.length=Te},Ie.prototype.clear=function(){for(var Te=0;Te<this.cache.length;Te++)for(var Ce=0;Ce<this.cache[Te].length;Ce++)this.cache[Te][Ce]=void 0},Ie}();Ee.GridCache=me},function(qt,Ee,Le){"use strict";var me,Ie=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 Te=Le(9),Ce=Le(44),_e=Le(27),he=Le(46),Se=Le(11),xe=Le(28),ge=Le(10),ce={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 le=oe.createElement("canvas");le.width=se._config.scaledCharWidth,le.height=se._config.scaledCharHeight,se._tmpCtx=xe.throwIfFalsy(le.getContext("2d",{alpha:se._config.allowTransparency})),se._width=Math.floor(1024/se._config.scaledCharWidth),se._height=Math.floor(1024/se._config.scaledCharHeight);var ye=se._width*se._height;return se._cacheMap=new he.LRUMap(ye),se._cacheMap.prealloc(ye),se}return Ie(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,le){if(ie.code===32)return!0;if(!this._canCache(ie))return!1;var ye=ve(ie),we=this._cacheMap.get(ye);if(we!=null)return this._drawFromCache(oe,we,se,le),!0;if(this._drawToCacheCount<100){var be=void 0;be=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var ke=this._drawToCache(ie,be);return this._cacheMap.set(ye,ke),this._drawFromCache(oe,ke,se,le),!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,le){if(!ie.isEmpty){var ye=this._toCoordinateX(ie.index),we=this._toCoordinateY(ie.index);oe.drawImage(ie.inBitmap?this._bitmap:this._cacheCanvas,ye,we,this._config.scaledCharWidth,this._config.scaledCharHeight,se,le,this._config.scaledCharWidth,this._config.scaledCharHeight)}},ee.prototype._getColorFromAnsiIndex=function(oe){return oe<this._config.colors.ansi.length?this._config.colors.ansi[oe]:_e.DEFAULT_ANSI_COLORS[oe]},ee.prototype._getBackgroundColor=function(oe){return this._config.allowTransparency?ce:oe.bg===Te.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===Te.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 le=oe.bold?this._config.fontWeightBold:this._config.fontWeight,ye=oe.italic?"italic":"";this._tmpCtx.font=ye+" "+le+" "+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=Te.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),be=!1;this._config.allowTransparency||(be=function(Ve,Je){for(var We=!0,gt=Je.rgba>>>24,ut=Je.rgba>>>16&255,bt=Je.rgba>>>8&255,rt=0;rt<Ve.data.length;rt+=4)Ve.data[rt]===gt&&Ve.data[rt+1]===ut&&Ve.data[rt+2]===bt?Ve.data[rt+3]=0:We=!1;return We}(we,se));var ke=this._toCoordinateX(ie),Ne=this._toCoordinateY(ie);this._cacheCtx.putImageData(we,ke,Ne);var je={index:ie,isEmpty:be,inBitmap:!1};return this._addGlyphToBitmap(je),je},ee.prototype._addGlyphToBitmap=function(oe){var ie=this;!("createImageBitmap"in window)||Se.isFirefox||Se.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 le=0;le<ie.length;le++)ie[le].inBitmap=!0}),this._bitmapCommitTimeout=null},ee}(Ce.BaseCharAtlas);Ee.DynamicCharAtlas=de;var ue=function(z){function ee(oe,ie){return z.call(this)||this}return Ie(ee,z),ee.prototype.draw=function(oe,ie,se,le){return!1},ee}(Ce.BaseCharAtlas);Ee.NoneCharAtlas=ue},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BaseCharAtlas=void 0;var me=function(){function Ie(){this._didWarmUp=!1}return Ie.prototype.dispose=function(){},Ie.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Ie.prototype._doWarmUp=function(){},Ie.prototype.beginFrame=function(){},Ie}();Ee.BaseCharAtlas=me},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.ColorContrastCache=void 0;var me=function(){function Ie(){this._color={},this._rgba={}}return Ie.prototype.clear=function(){this._color={},this._rgba={}},Ie.prototype.setCss=function(Te,Ce,_e){this._rgba[Te]||(this._rgba[Te]={}),this._rgba[Te][Ce]=_e},Ie.prototype.getCss=function(Te,Ce){return this._rgba[Te]?this._rgba[Te][Ce]:void 0},Ie.prototype.setColor=function(Te,Ce,_e){this._color[Te]||(this._color[Te]={}),this._color[Te][Ce]=_e},Ie.prototype.getColor=function(Te,Ce){return this._color[Te]?this._color[Te][Ce]:void 0},Ie}();Ee.ColorContrastCache=me},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LRUMap=void 0;var me=function(){function Ie(Te){this.capacity=Te,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Ie.prototype._unlinkNode=function(Te){var Ce=Te.prev,_e=Te.next;Te===this._head&&(this._head=_e),Te===this._tail&&(this._tail=Ce),Ce!==null&&(Ce.next=_e),_e!==null&&(_e.prev=Ce)},Ie.prototype._appendNode=function(Te){var Ce=this._tail;Ce!==null&&(Ce.next=Te),Te.prev=Ce,Te.next=null,this._tail=Te,this._head===null&&(this._head=Te)},Ie.prototype.prealloc=function(Te){for(var Ce=this._nodePool,_e=0;_e<Te;_e++)Ce.push({prev:null,next:null,key:null,value:null})},Ie.prototype.get=function(Te){var Ce=this._map[Te];return Ce!==void 0?(this._unlinkNode(Ce),this._appendNode(Ce),Ce.value):null},Ie.prototype.peekValue=function(Te){var Ce=this._map[Te];return Ce!==void 0?Ce.value:null},Ie.prototype.peek=function(){var Te=this._head;return Te===null?null:Te.value},Ie.prototype.set=function(Te,Ce){var _e=this._map[Te];if(_e!==void 0)_e=this._map[Te],this._unlinkNode(_e),_e.value=Ce;else if(this.size>=this.capacity)_e=this._head,this._unlinkNode(_e),delete this._map[_e.key],_e.key=Te,_e.value=Ce,this._map[Te]=_e;else{var he=this._nodePool;he.length>0?((_e=he.pop()).key=Te,_e.value=Ce):_e={prev:null,next:null,key:Te,value:Ce},this._map[Te]=_e,this.size++}this._appendNode(_e)},Ie}();Ee.LRUMap=me},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Ce,_e){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,Se){he.__proto__=Se}||function(he,Se){for(var xe in Se)Se.hasOwnProperty(xe)&&(he[xe]=Se[xe])})(Ce,_e)},function(Ce,_e){function he(){this.constructor=Ce}me(Ce,_e),Ce.prototype=_e===null?Object.create(_e):(he.prototype=_e.prototype,new he)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionRenderLayer=void 0;var Te=function(Ce){function _e(he,Se,xe,ge,ce,ve){var de=Ce.call(this,he,"selection",Se,!0,xe,ge,ce,ve)||this;return de._clearState(),de}return Ie(_e,Ce),_e.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},_e.prototype.resize=function(he){Ce.prototype.resize.call(this,he),this._clearState()},_e.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},_e.prototype.onSelectionChanged=function(he,Se,xe){if(this._didStateChange(he,Se,xe,this._bufferService.buffer.ydisp))if(this._clearAll(),he&&Se){var ge=he[1]-this._bufferService.buffer.ydisp,ce=Se[1]-this._bufferService.buffer.ydisp,ve=Math.max(ge,0),de=Math.min(ce,this._bufferService.rows-1);if(!(ve>=this._bufferService.rows||de<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,xe){var ue=he[0],z=Se[0]-ue,ee=de-ve+1;this._fillCells(ue,ve,z,ee)}else{ue=ge===ve?he[0]:0;var oe=ve===de?Se[0]:this._bufferService.cols;this._fillCells(ue,ve,oe-ue,1);var ie=Math.max(de-ve-1,0);if(this._fillCells(0,ve+1,this._bufferService.cols,ie),ve!==de){var se=ce===de?Se[0]:this._bufferService.cols;this._fillCells(0,de,se,1)}}this._state.start=[he[0],he[1]],this._state.end=[Se[0],Se[1]],this._state.columnSelectMode=xe,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},_e.prototype._didStateChange=function(he,Se,xe,ge){return!this._areCoordinatesEqual(he,this._state.start)||!this._areCoordinatesEqual(Se,this._state.end)||xe!==this._state.columnSelectMode||ge!==this._state.ydisp},_e.prototype._areCoordinatesEqual=function(he,Se){return!(!he||!Se)&&he[0]===Se[0]&&he[1]===Se[1]},_e}(Le(13).BaseRenderLayer);Ee.SelectionRenderLayer=Te},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Se,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,ce){ge.__proto__=ce}||function(ge,ce){for(var ve in ce)ce.hasOwnProperty(ve)&&(ge[ve]=ce[ve])})(Se,xe)},function(Se,xe){function ge(){this.constructor=Se}me(Se,xe),Se.prototype=xe===null?Object.create(xe):(ge.prototype=xe.prototype,new ge)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CursorRenderLayer=void 0;var Te=Le(13),Ce=Le(4),_e=function(Se){function xe(ge,ce,ve,de,ue,z,ee,oe,ie){var se=Se.call(this,ge,"cursor",ce,!0,ve,de,z,ee)||this;return se._onRequestRedraw=ue,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 Ie(xe,Se),xe.prototype.resize=function(ge){Se.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,ce=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new he(this._coreBrowserService.isFocused,function(){ce._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,ce){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},xe.prototype._render=function(ge){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var ce=this._bufferService.buffer.ybase+this._bufferService.buffer.y,ve=ce-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(ce).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 ue=this._optionsService.options.cursorStyle;return ue&&ue!=="block"?this._cursorRenderers[ue](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=ue,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,ce,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(ge,ce,this._optionsService.options.cursorWidth),this._ctx.restore()},xe.prototype._renderBlockCursor=function(ge,ce,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(ge,ce,ve.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(ve,ge,ce),this._ctx.restore()},xe.prototype._renderUnderlineCursor=function(ge,ce,ve){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(ge,ce),this._ctx.restore()},xe.prototype._renderBlurCursor=function(ge,ce,ve){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(ge,ce,ve.getWidth(),1),this._ctx.restore()},xe}(Te.BaseRenderLayer);Ee.CursorRenderLayer=_e;var he=function(){function Se(xe,ge){this._renderCallback=ge,this.isCursorVisible=!0,xe&&this._restartInterval()}return Object.defineProperty(Se.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),Se.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)},Se.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})))},Se.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 ce=600-(Date.now()-ge._animationTimeRestarted);if(ge._animationTimeRestarted=void 0,ce>0)return void ge._restartInterval(ce)}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)},Se.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)},Se.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},Se}()},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Se,xe){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,ce){ge.__proto__=ce}||function(ge,ce){for(var ve in ce)ce.hasOwnProperty(ve)&&(ge[ve]=ce[ve])})(Se,xe)},function(Se,xe){function ge(){this.constructor=Se}me(Se,xe),Se.prototype=xe===null?Object.create(xe):(ge.prototype=xe.prototype,new ge)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LinkRenderLayer=void 0;var Te=Le(13),Ce=Le(9),_e=Le(26),he=function(Se){function xe(ge,ce,ve,de,ue,z,ee,oe){var ie=Se.call(this,ge,"link",ce,!0,ve,de,ee,oe)||this;return ue.onShowLinkUnderline(function(se){return ie._onShowLinkUnderline(se)}),ue.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 Ie(xe,Se),xe.prototype.resize=function(ge){Se.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&&_e.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 ce=ge.y1+1;ce<ge.y2;ce++)this._fillBottomLineAtCells(0,ce,ge.cols);this._fillBottomLineAtCells(0,ge.y2,ge.x2)}this._state=ge},xe.prototype._onHideLinkUnderline=function(ge){this._clearCurrentLink()},xe}(Te.BaseRenderLayer);Ee.LinkRenderLayer=he},function(qt,Ee,Le){"use strict";var me=this&&this.__decorate||function(Se,xe,ge,ce){var ve,de=arguments.length,ue=de<3?xe:ce===null?ce=Object.getOwnPropertyDescriptor(xe,ge):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(Se,xe,ge,ce);else for(var z=Se.length-1;z>=0;z--)(ve=Se[z])&&(ue=(de<3?ve(ue):de>3?ve(xe,ge,ue):ve(xe,ge))||ue);return de>3&&ue&&Object.defineProperty(xe,ge,ue),ue},Ie=this&&this.__param||function(Se,xe){return function(ge,ce){xe(ge,ce,Se)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseZone=Ee.Linkifier=void 0;var Te=Le(0),Ce=Le(1),_e=function(){function Se(xe,ge,ce){this._bufferService=xe,this._logService=ge,this._unicodeService=ce,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new Te.EventEmitter,this._onHideLinkUnderline=new Te.EventEmitter,this._onLinkTooltip=new Te.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(Se.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),Se.prototype.attachToDom=function(xe,ge){this._element=xe,this._mouseZoneManager=ge},Se.prototype.linkifyRows=function(xe,ge){var ce=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 ce._linkifyRows()},Se._timeBeforeLatency))},Se.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 ce=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,ce,ve,ve);de.hasNext();)for(var ue=de.next(),z=0;z<this._linkMatchers.length;z++)this._doLinkifyRow(ue.range.first,ue.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")},Se.prototype.registerLinkMatcher=function(xe,ge,ce){if(ce===void 0&&(ce={}),!ge)throw new Error("handler must be defined");var ve={id:this._nextLinkMatcherId++,regex:xe,handler:ge,matchIndex:ce.matchIndex,validationCallback:ce.validationCallback,hoverTooltipCallback:ce.tooltipCallback,hoverLeaveCallback:ce.leaveCallback,willLinkActivate:ce.willLinkActivate,priority:ce.priority||0};return this._addLinkMatcherToList(ve),ve.id},Se.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)},Se.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},Se.prototype._doLinkifyRow=function(xe,ge,ce){for(var ve,de=this,ue=new RegExp(ce.regex.source,(ce.regex.flags||"")+"g"),z=-1,ee=function(){var ie=ve[typeof ce.matchIndex!="number"?0:ce.matchIndex];if(!ie)return oe._logService.debug("match found without corresponding matchIndex",ve,ce),"break";if(z=ge.indexOf(ie,z+1),ue.lastIndex=z+ie.length,z<0)return"break";var se=oe._bufferService.buffer.stringIndexToBufferIndex(xe,z);if(se[0]<0)return"break";var le=oe._bufferService.buffer.lines.get(se[0]);if(!le)return"break";var ye=le.getFg(se[1]),we=ye?ye>>9&511:void 0;ce.validationCallback?ce.validationCallback(ie,function(be){de._rowsTimeoutId||be&&de._addLink(se[1],se[0]-de._bufferService.buffer.ydisp,ie,ce,we)}):oe._addLink(se[1],se[0]-oe._bufferService.buffer.ydisp,ie,ce,we)},oe=this;(ve=ue.exec(ge))!==null&&ee()!=="break";);},Se.prototype._addLink=function(xe,ge,ce,ve,de){var ue=this;if(this._mouseZoneManager&&this._element){var z=this._unicodeService.getStringCellWidth(ce),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(le){if(ve.handler)return ve.handler(le,ce);var ye=window.open();ye?(ye.opener=null,ye.location.href=ce):console.warn("Opening link blocked as opener could not be cleared")},function(){ue._onShowLinkUnderline.fire(ue._createLinkHoverEvent(ee,oe,ie,se,de)),ue._element.classList.add("xterm-cursor-pointer")},function(le){ue._onLinkTooltip.fire(ue._createLinkHoverEvent(ee,oe,ie,se,de)),ve.hoverTooltipCallback&&ve.hoverTooltipCallback(le,ce,{start:{x:ee,y:oe},end:{x:ie,y:se}})},function(){ue._onHideLinkUnderline.fire(ue._createLinkHoverEvent(ee,oe,ie,se,de)),ue._element.classList.remove("xterm-cursor-pointer"),ve.hoverLeaveCallback&&ve.hoverLeaveCallback()},function(le){return!ve.willLinkActivate||ve.willLinkActivate(le,ce)}))}},Se.prototype._createLinkHoverEvent=function(xe,ge,ce,ve,de){return{x1:xe,y1:ge,x2:ce,y2:ve,cols:this._bufferService.cols,fg:de}},Se._timeBeforeLatency=200,Se=me([Ie(0,Ce.IBufferService),Ie(1,Ce.ILogService),Ie(2,Ce.IUnicodeService)],Se)}();Ee.Linkifier=_e;var he=function(Se,xe,ge,ce,ve,de,ue,z,ee){this.x1=Se,this.y1=xe,this.x2=ge,this.y2=ce,this.clickCallback=ve,this.hoverCallback=de,this.tooltipCallback=ue,this.leaveCallback=z,this.willLinkActivate=ee};Ee.MouseZone=he},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ie,se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ye){le.__proto__=ye}||function(le,ye){for(var we in ye)ye.hasOwnProperty(we)&&(le[we]=ye[we])})(ie,se)},function(ie,se){function le(){this.constructor=ie}me(ie,se),ie.prototype=se===null?Object.create(se):(le.prototype=se.prototype,new le)}),Te=this&&this.__decorate||function(ie,se,le,ye){var we,be=arguments.length,ke=be<3?se:ye===null?ye=Object.getOwnPropertyDescriptor(se,le):ye;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ke=Reflect.decorate(ie,se,le,ye);else for(var Ne=ie.length-1;Ne>=0;Ne--)(we=ie[Ne])&&(ke=(be<3?we(ke):be>3?we(se,le,ke):we(se,le))||ke);return be>3&&ke&&Object.defineProperty(se,le,ke),ke},Ce=this&&this.__param||function(ie,se){return function(le,ye){se(le,ye,ie)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionService=void 0;var _e=Le(11),he=Le(52),Se=Le(4),xe=Le(0),ge=Le(5),ce=Le(1),ve=Le(30),de=Le(53),ue=Le(2),z="\xA0",ee=new RegExp(z,"g"),oe=function(ie){function se(le,ye,we,be,ke,Ne,je){var Ve=ie.call(this)||this;return Ve._element=le,Ve._screenElement=ye,Ve._bufferService=we,Ve._coreService=be,Ve._mouseService=ke,Ve._optionsService=Ne,Ve._renderService=je,Ve._dragScrollAmount=0,Ve._enabled=!0,Ve._workCell=new Se.CellData,Ve._mouseDownTimeStamp=0,Ve._onLinuxMouseSelection=Ve.register(new xe.EventEmitter),Ve._onRedrawRequest=Ve.register(new xe.EventEmitter),Ve._onSelectionChange=Ve.register(new xe.EventEmitter),Ve._onRequestScrollLines=Ve.register(new xe.EventEmitter),Ve._mouseMoveListener=function(Je){return Ve._onMouseMove(Je)},Ve._mouseUpListener=function(Je){return Ve._onMouseUp(Je)},Ve._coreService.onUserInput(function(){Ve.hasSelection&&Ve.clearSelection()}),Ve._trimListener=Ve._bufferService.buffer.lines.onTrim(function(Je){return Ve._onTrim(Je)}),Ve.register(Ve._bufferService.buffers.onBufferActivate(function(Je){return Ve._onBufferActivate(Je)})),Ve.enable(),Ve._model=new he.SelectionModel(Ve._bufferService),Ve._activeSelectionMode=0,Ve}return Ie(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 le=this._model.finalSelectionStart,ye=this._model.finalSelectionEnd;return!(!le||!ye)&&(le[0]!==ye[0]||le[1]!==ye[1])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"selectionText",{get:function(){var le=this._model.finalSelectionStart,ye=this._model.finalSelectionEnd;if(!le||!ye)return"";var we=this._bufferService.buffer,be=[];if(this._activeSelectionMode===3){if(le[0]===ye[0])return"";for(var ke=le[1];ke<=ye[1];ke++){var Ne=we.translateBufferLineToString(ke,!0,le[0],ye[0]);be.push(Ne)}}else{var je=le[1]===ye[1]?ye[0]:void 0;for(be.push(we.translateBufferLineToString(le[1],!0,le[0],je)),ke=le[1]+1;ke<=ye[1]-1;ke++){var Ve=we.lines.get(ke);Ne=we.translateBufferLineToString(ke,!0),Ve&&Ve.isWrapped?be[be.length-1]+=Ne:be.push(Ne)}le[1]!==ye[1]&&(Ve=we.lines.get(ye[1]),Ne=we.translateBufferLineToString(ye[1],!0,0,ye[0]),Ve&&Ve.isWrapped?be[be.length-1]+=Ne:be.push(Ne))}return be.map(function(Je){return Je.replace(ee," ")}).join(_e.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),se.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},se.prototype.refresh=function(le){var ye=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return ye._refresh()})),_e.isLinux&&le&&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(le){var ye=this._getMouseBufferCoords(le),we=this._model.finalSelectionStart,be=this._model.finalSelectionEnd;return!!(we&&be&&ye)&&this._areCoordsInSelection(ye,we,be)},se.prototype._areCoordsInSelection=function(le,ye,we){return le[1]>ye[1]&&le[1]<we[1]||ye[1]===we[1]&&le[1]===ye[1]&&le[0]>=ye[0]&&le[0]<we[0]||ye[1]<we[1]&&le[1]===we[1]&&le[0]<we[0]||ye[1]<we[1]&&le[1]===ye[1]&&le[0]>=ye[0]},se.prototype.selectWordAtCursor=function(le){var ye=this._getMouseBufferCoords(le);ye&&(this._selectWordAt(ye,!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(le,ye){this._model.clearSelection(),le=Math.max(le,0),ye=Math.min(ye,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,le],this._model.selectionEnd=[this._bufferService.cols,ye],this.refresh(),this._onSelectionChange.fire()},se.prototype._onTrim=function(le){this._model.onTrim(le)&&this.refresh()},se.prototype._getMouseBufferCoords=function(le){var ye=this._mouseService.getCoords(le,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(ye)return ye[0]--,ye[1]--,ye[1]+=this._bufferService.buffer.ydisp,ye},se.prototype._getMouseEventScrollAmount=function(le){var ye=ve.getCoordsRelativeToElement(le,this._screenElement)[1],we=this._renderService.dimensions.canvasHeight;return ye>=0&&ye<=we?0:(ye>we&&(ye-=we),ye=Math.min(Math.max(ye,-50),50),(ye/=50)/Math.abs(ye)+Math.round(14*ye))},se.prototype.shouldForceSelection=function(le){return _e.isMac?le.altKey&&this._optionsService.options.macOptionClickForcesSelection:le.shiftKey},se.prototype.onMouseDown=function(le){if(this._mouseDownTimeStamp=le.timeStamp,(le.button!==2||!this.hasSelection)&&le.button===0){if(!this._enabled){if(!this.shouldForceSelection(le))return;le.stopPropagation()}le.preventDefault(),this._dragScrollAmount=0,this._enabled&&le.shiftKey?this._onIncrementalClick(le):le.detail===1?this._onSingleClick(le):le.detail===2?this._onDoubleClick(le):le.detail===3&&this._onTripleClick(le),this._addMouseDownListeners(),this.refresh(!0)}},se.prototype._addMouseDownListeners=function(){var le=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return le._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(le){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(le))},se.prototype._onSingleClick=function(le){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(le)?3:0,this._model.selectionStart=this._getMouseBufferCoords(le),this._model.selectionStart){this._model.selectionEnd=void 0;var ye=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);ye&&ye.length!==this._model.selectionStart[0]&&ye.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},se.prototype._onDoubleClick=function(le){var ye=this._getMouseBufferCoords(le);ye&&(this._activeSelectionMode=1,this._selectWordAt(ye,!0))},se.prototype._onTripleClick=function(le){var ye=this._getMouseBufferCoords(le);ye&&(this._activeSelectionMode=2,this._selectLineAt(ye[1]))},se.prototype.shouldColumnSelect=function(le){return le.altKey&&!(_e.isMac&&this._optionsService.options.macOptionClickForcesSelection)},se.prototype._onMouseMove=function(le){if(le.stopImmediatePropagation(),this._model.selectionStart){var ye=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(le),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(le),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 be=we.lines.get(this._model.selectionEnd[1]);be&&be.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}ye&&ye[0]===this._model.selectionEnd[0]&&ye[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 le=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(le.ydisp+this._bufferService.rows,le.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=le.ydisp),this.refresh()}},se.prototype._onMouseUp=function(le){var ye=le.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&ye<500&&le.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var we=this._mouseService.getCoords(le,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(we&&we[0]!==void 0&&we[1]!==void 0){var be=de.moveToCellSequence(we[0]-1,we[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(be,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},se.prototype._onBufferActivate=function(le){var ye=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=le.activeBuffer.lines.onTrim(function(we){return ye._onTrim(we)})},se.prototype._convertViewportColToCharacterIndex=function(le,ye){for(var we=ye[0],be=0;ye[0]>=be;be++){var ke=le.loadCell(be,this._workCell).getChars().length;this._workCell.getWidth()===0?we--:ke>1&&ye[0]!==be&&(we+=ke-1)}return we},se.prototype.setSelection=function(le,ye,we){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[le,ye],this._model.selectionStartLength=we,this.refresh()},se.prototype._getWordAt=function(le,ye,we,be){if(we===void 0&&(we=!0),be===void 0&&(be=!0),!(le[0]>=this._bufferService.cols)){var ke=this._bufferService.buffer,Ne=ke.lines.get(le[1]);if(Ne){var je=ke.translateBufferLineToString(le[1],!1),Ve=this._convertViewportColToCharacterIndex(Ne,le),Je=Ve,We=le[0]-Ve,gt=0,ut=0,bt=0,rt=0;if(je.charAt(Ve)===" "){for(;Ve>0&&je.charAt(Ve-1)===" ";)Ve--;for(;Je<je.length&&je.charAt(Je+1)===" ";)Je++}else{var St=le[0],ct=le[0];Ne.getWidth(St)===0&&(gt++,St--),Ne.getWidth(ct)===2&&(ut++,ct++);var Bt=Ne.getString(ct).length;for(Bt>1&&(rt+=Bt-1,Je+=Bt-1);St>0&&Ve>0&&!this._isCharWordSeparator(Ne.loadCell(St-1,this._workCell));){Ne.loadCell(St-1,this._workCell);var ht=this._workCell.getChars().length;this._workCell.getWidth()===0?(gt++,St--):ht>1&&(bt+=ht-1,Ve-=ht-1),Ve--,St--}for(;ct<Ne.length&&Je+1<je.length&&!this._isCharWordSeparator(Ne.loadCell(ct+1,this._workCell));){Ne.loadCell(ct+1,this._workCell);var it=this._workCell.getChars().length;this._workCell.getWidth()===2?(ut++,ct++):it>1&&(rt+=it-1,Je+=it-1),Je++,ct++}}Je++;var dt=Ve+We-gt+bt,yt=Math.min(this._bufferService.cols,Je-Ve+gt+ut-bt-rt);if(ye||je.slice(Ve,Je).trim()!==""){if(we&&dt===0&&Ne.getCodePoint(0)!==32){var Et=ke.lines.get(le[1]-1);if(Et&&Ne.isWrapped&&Et.getCodePoint(this._bufferService.cols-1)!==32){var vt=this._getWordAt([this._bufferService.cols-1,le[1]-1],!1,!0,!1);if(vt){var Rt=this._bufferService.cols-vt.start;dt-=Rt,yt+=Rt}}}if(be&&dt+yt===this._bufferService.cols&&Ne.getCodePoint(this._bufferService.cols-1)!==32){var jt=ke.lines.get(le[1]+1);if(jt&&jt.isWrapped&&jt.getCodePoint(0)!==32){var un=this._getWordAt([0,le[1]+1],!1,!1,!0);un&&(yt+=un.length)}}return{start:dt,length:yt}}}}},se.prototype._selectWordAt=function(le,ye){var we=this._getWordAt(le,ye);if(we){for(;we.start<0;)we.start+=this._bufferService.cols,le[1]--;this._model.selectionStart=[we.start,le[1]],this._model.selectionStartLength=we.length}},se.prototype._selectToWordAt=function(le){var ye=this._getWordAt(le,!0);if(ye){for(var we=le[1];ye.start<0;)ye.start+=this._bufferService.cols,we--;if(!this._model.areSelectionValuesReversed())for(;ye.start+ye.length>this._bufferService.cols;)ye.length-=this._bufferService.cols,we++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?ye.start:ye.start+ye.length,we]}},se.prototype._isCharWordSeparator=function(le){return le.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(le.getChars())>=0},se.prototype._selectLineAt=function(le){var ye=this._bufferService.buffer.getWrappedRangeForLine(le);this._model.selectionStart=[0,ye.first],this._model.selectionEnd=[this._bufferService.cols,ye.last],this._model.selectionStartLength=0},se=Te([Ce(2,ce.IBufferService),Ce(3,ce.ICoreService),Ce(4,ge.IMouseService),Ce(5,ce.IOptionsService),Ce(6,ge.IRenderService)],se)}(ue.Disposable);Ee.SelectionService=oe},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SelectionModel=void 0;var me=function(){function Ie(Te){this._bufferService=Te,this.isSelectAllActive=!1,this.selectionStartLength=0}return Ie.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Ie.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(Ie.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 Te=this.selectionStart[0]+this.selectionStartLength;return Te>this._bufferService.cols?[Te%this._bufferService.cols,this.selectionStart[1]+Math.floor(Te/this._bufferService.cols)]:[Te,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}),Ie.prototype.areSelectionValuesReversed=function(){var Te=this.selectionStart,Ce=this.selectionEnd;return!(!Te||!Ce)&&(Te[1]>Ce[1]||Te[1]===Ce[1]&&Te[0]>Ce[0])},Ie.prototype.onTrim=function(Te){return this.selectionStart&&(this.selectionStart[1]-=Te),this.selectionEnd&&(this.selectionEnd[1]-=Te),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},Ie}();Ee.SelectionModel=me},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.moveToCellSequence=void 0;var me=Le(12);function Ie(xe,ge,ce,ve){var de=xe-Te(ce,xe),ue=ge-Te(ce,ge);return Se(Math.abs(de-ue)-function(z,ee,oe){for(var ie=0,se=z-Te(oe,z),le=ee-Te(oe,ee),ye=0;ye<Math.abs(se-le);ye++){var we=Ce(z,ee)==="A"?-1:1,be=oe.buffer.lines.get(se+we*ye);be&&be.isWrapped&&ie++}return ie}(xe,ge,ce),he(Ce(xe,ge),ve))}function Te(xe,ge){for(var ce=0,ve=xe.buffer.lines.get(ge),de=ve&&ve.isWrapped;de&&ge>=0&&ge<xe.rows;)ce++,de=(ve=xe.buffer.lines.get(--ge))&&ve.isWrapped;return ce}function Ce(xe,ge){return xe>ge?"A":"B"}function _e(xe,ge,ce,ve,de,ue){for(var z=xe,ee=ge,oe="";z!==ce||ee!==ve;)z+=de?1:-1,de&&z>ue.cols-1?(oe+=ue.buffer.translateBufferLineToString(ee,!1,xe,z),z=0,xe=0,ee++):!de&&z<0&&(oe+=ue.buffer.translateBufferLineToString(ee,!1,0,xe+1),xe=z=ue.cols-1,ee--);return oe+ue.buffer.translateBufferLineToString(ee,!1,xe,z)}function he(xe,ge){var ce=ge?"O":"[";return me.C0.ESC+ce+xe}function Se(xe,ge){xe=Math.floor(xe);for(var ce="",ve=0;ve<xe;ve++)ce+=ge;return ce}Ee.moveToCellSequence=function(xe,ge,ce,ve){var de,ue=ce.buffer.x,z=ce.buffer.y;if(!ce.buffer.hasScrollback)return function(oe,ie,se,le,ye,we){return Ie(ie,le,ye,we).length===0?"":Se(_e(oe,ie,oe,ie-Te(ye,ie),!1,ye).length,he("D",we))}(ue,z,0,ge,ce,ve)+Ie(z,ge,ce,ve)+function(oe,ie,se,le,ye,we){var be;be=Ie(ie,le,ye,we).length>0?le-Te(ye,le):ie;var ke=le,Ne=function(je,Ve,Je,We,gt,ut){var bt;return bt=Ie(Je,We,gt,ut).length>0?We-Te(gt,We):Ve,je<Je&&bt<=We||je>=Je&&bt<We?"C":"D"}(oe,ie,se,le,ye,we);return Se(_e(oe,be,se,ke,Ne==="C",ye).length,he(Ne,we))}(ue,z,xe,ge,ce,ve);if(z===ge)return de=ue>xe?"D":"C",Se(Math.abs(ue-xe),he(de,ve));de=z>ge?"D":"C";var ee=Math.abs(z-ge);return Se(function(oe,ie){return ie.cols-oe}(z>ge?xe:ue,ce)+(ee-1)*ce.cols+1+((z>ge?ue:xe)-1),he(de,ve))}},function(qt,Ee,Le){"use strict";var me=this&&this.__decorate||function(_e,he,Se,xe){var ge,ce=arguments.length,ve=ce<3?he:xe===null?xe=Object.getOwnPropertyDescriptor(he,Se):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(_e,he,Se,xe);else for(var de=_e.length-1;de>=0;de--)(ge=_e[de])&&(ve=(ce<3?ge(ve):ce>3?ge(he,Se,ve):ge(he,Se))||ve);return ce>3&&ve&&Object.defineProperty(he,Se,ve),ve},Ie=this&&this.__param||function(_e,he){return function(Se,xe){he(Se,xe,_e)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.SoundService=void 0;var Te=Le(1),Ce=function(){function _e(he){this._optionsService=he}return Object.defineProperty(_e,"audioContext",{get:function(){if(!_e._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;_e._audioContext=new he}return _e._audioContext},enumerable:!1,configurable:!0}),_e.prototype.playBellSound=function(){var he=_e.audioContext;if(he){var Se=he.createBufferSource();he.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(xe){Se.buffer=xe,Se.connect(he.destination),Se.start(0)})}},_e.prototype._base64ToArrayBuffer=function(he){for(var Se=window.atob(he),xe=Se.length,ge=new Uint8Array(xe),ce=0;ce<xe;ce++)ge[ce]=Se.charCodeAt(ce);return ge.buffer},_e.prototype._removeMimeType=function(he){return he.split(",")[1]},_e=me([Ie(0,Te.IOptionsService)],_e)}();Ee.SoundService=Ce},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),Te=this&&this.__decorate||function(ce,ve,de,ue){var z,ee=arguments.length,oe=ee<3?ve:ue===null?ue=Object.getOwnPropertyDescriptor(ve,de):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ve,de,ue);else for(var ie=ce.length-1;ie>=0;ie--)(z=ce[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(ce,ve){return function(de,ue){ve(de,ue,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseZoneManager=void 0;var _e=Le(2),he=Le(7),Se=Le(5),xe=Le(1),ge=function(ce){function ve(de,ue,z,ee,oe,ie){var se=ce.call(this)||this;return se._element=de,se._screenElement=ue,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(le){return se._onMouseDown(le)})),se._mouseMoveListener=function(le){return se._onMouseMove(le)},se._mouseLeaveListener=function(le){return se._onMouseLeave(le)},se._clickListener=function(le){return se._onClick(le)},se}return Ie(ve,ce),ve.prototype.dispose=function(){ce.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,ue){if(this._zones.length!==0){de&&ue||(de=0,ue=this._bufferService.rows-1);for(var z=0;z<this._zones.length;z++){var ee=this._zones[z];(ee.y1>de&&ee.y1<=ue+1||ee.y2>de&&ee.y2<=ue+1||ee.y1<de&&ee.y2>ue+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 ue=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 ue._onTooltip(de)},this._optionsService.options.linkTooltipHoverDuration)))},ve.prototype._onTooltip=function(de){this._tooltipTimeout=void 0;var ue=this._findZoneEventAt(de);ue&&ue.tooltipCallback&&ue.tooltipCallback(de)},ve.prototype._onMouseDown=function(de){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var ue=this._findZoneEventAt(de);ue!=null&&ue.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 ue=this._findZoneEventAt(de),z=this._getSelectionLength();ue&&z===this._initialSelectionLength&&(ue.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 ue=this._mouseService.getCoords(de,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(ue)for(var z=ue[0],ee=ue[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=Te([Ce(2,xe.IBufferService),Ce(3,Se.IMouseService),Ce(4,Se.ISelectionService),Ce(5,xe.IOptionsService)],ve)}(_e.Disposable);Ee.MouseZoneManager=ge},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ve,de){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,z){ue.__proto__=z}||function(ue,z){for(var ee in z)z.hasOwnProperty(ee)&&(ue[ee]=z[ee])})(ve,de)},function(ve,de){function ue(){this.constructor=ve}me(ve,de),ve.prototype=de===null?Object.create(de):(ue.prototype=de.prototype,new ue)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.AccessibilityManager=void 0;var Te=Le(18),Ce=Le(11),_e=Le(31),he=Le(7),Se=Le(2),xe=Le(32),ge=Le(17),ce=function(ve){function de(ue,z){var ee=ve.call(this)||this;ee._terminal=ue,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 _e.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 Ie(de,ve),de.prototype.dispose=function(){ve.prototype.dispose.call(this),ge.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},de.prototype._onBoundaryFocus=function(ue,z){var ee=ue.target,oe=this._rowElements[z===0?1:this._rowElements.length-2];if(ee.getAttribute("aria-posinset")!==(z===0?"1":""+this._terminal.buffer.lines.length)&&ue.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 le=this._createAccessibilityTreeNode();this._rowElements.unshift(le),this._rowContainer.insertAdjacentElement("afterbegin",le)}else le=this._createAccessibilityTreeNode(),this._rowElements.push(le),this._rowContainer.appendChild(le);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(),ue.preventDefault(),ue.stopImmediatePropagation()}},de.prototype._onResize=function(ue){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>ue;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},de.prototype._createAccessibilityTreeNode=function(){var ue=document.createElement("div");return ue.setAttribute("role","listitem"),ue.tabIndex=-1,this._refreshRowDimensions(ue),ue},de.prototype._onTab=function(ue){for(var z=0;z<ue;z++)this._onChar(" ")},de.prototype._onChar=function(ue){var z=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==ue&&(this._charsToAnnounce+=ue):this._charsToAnnounce+=ue,ue===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=Te.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(ue){this._clearLiveRegion(),this._charsToConsume.push(ue)},de.prototype._refreshRows=function(ue,z){this._renderRowsDebouncer.refresh(ue,z,this._terminal.rows)},de.prototype._renderRows=function(ue,z){for(var ee=this._terminal.buffer,oe=ee.lines.length.toString(),ie=ue;ie<=z;ie++){var se=ee.translateBufferLineToString(ee.ydisp+ie,!0),le=(ee.ydisp+ie+1).toString(),ye=this._rowElements[ie];ye&&(se.length===0?ye.innerHTML=" ":ye.textContent=se,ye.setAttribute("aria-posinset",le),ye.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 ue=0;ue<this._terminal.rows;ue++)this._refreshRowDimensions(this._rowElements[ue])}},de.prototype._refreshRowDimensions=function(ue){ue.style.height=this._renderService.dimensions.actualCellHeight+"px"},de.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},de}(Se.Disposable);Ee.AccessibilityManager=ce},function(qt,Ee,Le){"use strict";var me,Ie=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 le in se)se.hasOwnProperty(le)&&(ie[le]=se[le])})(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)}),Te=this&&this.__decorate||function(ee,oe,ie,se){var le,ye=arguments.length,we=ye<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 be=ee.length-1;be>=0;be--)(le=ee[be])&&(we=(ye<3?le(we):ye>3?le(oe,ie,we):le(oe,ie))||we);return ye>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 _e=Le(58),he=Le(9),Se=Le(2),xe=Le(5),ge=Le(1),ce=Le(0),ve=Le(10),de=Le(17),ue=1,z=function(ee){function oe(ie,se,le,ye,we,be,ke,Ne,je){var Ve=ee.call(this)||this;return Ve._colors=ie,Ve._element=se,Ve._screenElement=le,Ve._viewportElement=ye,Ve._linkifier=we,Ve._linkifier2=be,Ve._charSizeService=ke,Ve._optionsService=Ne,Ve._bufferService=je,Ve._terminalClass=ue++,Ve._rowElements=[],Ve._rowContainer=document.createElement("div"),Ve._rowContainer.classList.add("xterm-rows"),Ve._rowContainer.style.lineHeight="normal",Ve._rowContainer.setAttribute("aria-hidden","true"),Ve._refreshRowElements(Ve._bufferService.cols,Ve._bufferService.rows),Ve._selectionContainer=document.createElement("div"),Ve._selectionContainer.classList.add("xterm-selection"),Ve._selectionContainer.setAttribute("aria-hidden","true"),Ve.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},Ve._updateDimensions(),Ve._injectCss(),Ve._rowFactory=new _e.DomRendererRowFactory(document,Ve._optionsService,Ve._colors),Ve._element.classList.add("xterm-dom-renderer-owner-"+Ve._terminalClass),Ve._screenElement.appendChild(Ve._rowContainer),Ve._screenElement.appendChild(Ve._selectionContainer),Ve._linkifier.onShowLinkUnderline(function(Je){return Ve._onLinkHover(Je)}),Ve._linkifier.onHideLinkUnderline(function(Je){return Ve._onLinkLeave(Je)}),Ve._linkifier2.onShowLinkUnderline(function(Je){return Ve._onLinkHover(Je)}),Ve._linkifier2.onHideLinkUnderline(function(Je){return Ve._onLinkLeave(Je)}),Ve}return Ie(oe,ee),Object.defineProperty(oe.prototype,"onRequestRedraw",{get:function(){return new ce.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 le=se[ie];le.style.width=this.dimensions.canvasWidth+"px",le.style.height=this.dimensions.actualCellHeight+"px",le.style.lineHeight=this.dimensions.actualCellHeight+"px",le.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var ye=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=ye,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(."+_e.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+_e.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+_e.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) ."+_e.CURSOR_CLASS+"."+_e.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+_e.CURSOR_CLASS+"."+_e.CURSOR_BLINK_CLASS+":not(."+_e.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+_e.CURSOR_CLASS+"."+_e.CURSOR_BLINK_CLASS+"."+_e.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+_e.CURSOR_CLASS+"."+_e.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+_e.CURSOR_CLASS+"."+_e.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+_e.CURSOR_CLASS+"."+_e.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(le,ye){se+=ie._terminalSelector+" .xterm-fg-"+ye+" { color: "+le.css+"; }"+ie._terminalSelector+" .xterm-bg-"+ye+" { background-color: "+le.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 le=this._rowElements.length;le<=se;le++){var ye=document.createElement("div");this._rowContainer.appendChild(ye),this._rowElements.push(ye)}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,le){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(ie&&se){var ye=ie[1]-this._bufferService.buffer.ydisp,we=se[1]-this._bufferService.buffer.ydisp,be=Math.max(ye,0),ke=Math.min(we,this._bufferService.rows-1);if(!(be>=this._bufferService.rows||ke<0)){var Ne=document.createDocumentFragment();if(le)Ne.appendChild(this._createSelectionElement(be,ie[0],se[0],ke-be+1));else{var je=ye===be?ie[0]:0,Ve=be===ke?se[0]:this._bufferService.cols;Ne.appendChild(this._createSelectionElement(be,je,Ve));var Je=ke-be-1;if(Ne.appendChild(this._createSelectionElement(be+1,0,this._bufferService.cols,Je)),be!==ke){var We=we===ke?se[0]:this._bufferService.cols;Ne.appendChild(this._createSelectionElement(ke,0,We))}}this._selectionContainer.appendChild(Ne)}}},oe.prototype._createSelectionElement=function(ie,se,le,ye){ye===void 0&&(ye=1);var we=document.createElement("div");return we.style.height=ye*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*(le-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 le=this._bufferService.buffer.ybase+this._bufferService.buffer.y,ye=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),we=this._optionsService.options.cursorBlink,be=ie;be<=se;be++){var ke=this._rowElements[be];ke.innerHTML="";var Ne=be+this._bufferService.buffer.ydisp,je=this._bufferService.buffer.lines.get(Ne),Ve=this._optionsService.options.cursorStyle;ke.appendChild(this._rowFactory.createRow(je,Ne===le,Ve,ye,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,le,ye,we,be){for(;ie!==se||le!==ye;){var ke=this._rowElements[le];if(!ke)return;var Ne=ke.children[ie];Ne&&(Ne.style.textDecoration=be?"underline":"none"),++ie>=we&&(ie=0,le++)}},oe=Te([Ce(6,xe.ICharSizeService),Ce(7,ge.IOptionsService),Ce(8,ge.IBufferService)],oe)}(Se.Disposable);Ee.DomRenderer=z},function(qt,Ee,Le){"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=Le(9),Ie=Le(3),Te=Le(4),Ce=Le(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 _e=function(){function Se(xe,ge,ce){this._document=xe,this._optionsService=ge,this._colors=ce,this._workCell=new Te.CellData}return Se.prototype.setColors=function(xe){this._colors=xe},Se.prototype.createRow=function(xe,ge,ce,ve,de,ue,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()!==Ie.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 le=this._document.createElement("span");if(se>1&&(le.style.width=ue*se+"px"),ge&&ie===ve)switch(le.classList.add(Ee.CURSOR_CLASS),de&&le.classList.add(Ee.CURSOR_BLINK_CLASS),ce){case"bar":le.classList.add(Ee.CURSOR_STYLE_BAR_CLASS);break;case"underline":le.classList.add(Ee.CURSOR_STYLE_UNDERLINE_CLASS);break;default:le.classList.add(Ee.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&le.classList.add(Ee.BOLD_CLASS),this._workCell.isItalic()&&le.classList.add(Ee.ITALIC_CLASS),this._workCell.isDim()&&le.classList.add(Ee.DIM_CLASS),this._workCell.isUnderline()&&le.classList.add(Ee.UNDERLINE_CLASS),this._workCell.isInvisible()?le.textContent=Ie.WHITESPACE_CELL_CHAR:le.textContent=this._workCell.getChars()||Ie.WHITESPACE_CELL_CHAR;var ye=this._workCell.getFgColor(),we=this._workCell.getFgColorMode(),be=this._workCell.getBgColor(),ke=this._workCell.getBgColorMode(),Ne=!!this._workCell.isInverse();if(Ne){var je=ye;ye=be,be=je;var Ve=we;we=ke,ke=Ve}switch(we){case 16777216:case 33554432:this._workCell.isBold()&&ye<8&&this._optionsService.options.drawBoldTextInBrightColors&&(ye+=8),this._applyMinimumContrast(le,this._colors.background,this._colors.ansi[ye])||le.classList.add("xterm-fg-"+ye);break;case 50331648:var Je=Ce.rgba.toColor(ye>>16&255,ye>>8&255,255&ye);this._applyMinimumContrast(le,this._colors.background,Je)||this._addStyle(le,"color:#"+he(ye.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(le,this._colors.background,this._colors.foreground)||Ne&&le.classList.add("xterm-fg-"+me.INVERTED_DEFAULT_COLOR)}switch(ke){case 16777216:case 33554432:le.classList.add("xterm-bg-"+be);break;case 50331648:this._addStyle(le,"background-color:#"+he(be.toString(16),"0",6));break;case 0:default:Ne&&le.classList.add("xterm-bg-"+me.INVERTED_DEFAULT_COLOR)}ee.appendChild(le)}}return ee},Se.prototype._applyMinimumContrast=function(xe,ge,ce){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,ce,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)},Se.prototype._addStyle=function(xe,ge){xe.setAttribute("style",""+(xe.getAttribute("style")||"")+ge+";")},Se}();function he(Se,xe,ge){for(;Se.length<ge;)Se=xe+Se;return Se}Ee.DomRendererRowFactory=_e},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.evaluateKeyboardEvent=void 0;var me=Le(12),Ie={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(Te,Ce,_e,he){var Se={type:0,cancel:!1,key:void 0},xe=(Te.shiftKey?1:0)|(Te.altKey?2:0)|(Te.ctrlKey?4:0)|(Te.metaKey?8:0);switch(Te.keyCode){case 0:Te.key==="UIKeyInputUpArrow"?Se.key=Ce?me.C0.ESC+"OA":me.C0.ESC+"[A":Te.key==="UIKeyInputLeftArrow"?Se.key=Ce?me.C0.ESC+"OD":me.C0.ESC+"[D":Te.key==="UIKeyInputRightArrow"?Se.key=Ce?me.C0.ESC+"OC":me.C0.ESC+"[C":Te.key==="UIKeyInputDownArrow"&&(Se.key=Ce?me.C0.ESC+"OB":me.C0.ESC+"[B");break;case 8:if(Te.shiftKey){Se.key=me.C0.BS;break}if(Te.altKey){Se.key=me.C0.ESC+me.C0.DEL;break}Se.key=me.C0.DEL;break;case 9:if(Te.shiftKey){Se.key=me.C0.ESC+"[Z";break}Se.key=me.C0.HT,Se.cancel=!0;break;case 13:Se.key=Te.altKey?me.C0.ESC+me.C0.CR:me.C0.CR,Se.cancel=!0;break;case 27:Se.key=me.C0.ESC,Te.altKey&&(Se.key=me.C0.ESC+me.C0.ESC),Se.cancel=!0;break;case 37:if(Te.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"D",Se.key===me.C0.ESC+"[1;3D"&&(Se.key=me.C0.ESC+(_e?"b":"[1;5D"))):Se.key=Ce?me.C0.ESC+"OD":me.C0.ESC+"[D";break;case 39:if(Te.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"C",Se.key===me.C0.ESC+"[1;3C"&&(Se.key=me.C0.ESC+(_e?"f":"[1;5C"))):Se.key=Ce?me.C0.ESC+"OC":me.C0.ESC+"[C";break;case 38:if(Te.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"A",_e||Se.key!==me.C0.ESC+"[1;3A"||(Se.key=me.C0.ESC+"[1;5A")):Se.key=Ce?me.C0.ESC+"OA":me.C0.ESC+"[A";break;case 40:if(Te.metaKey)break;xe?(Se.key=me.C0.ESC+"[1;"+(xe+1)+"B",_e||Se.key!==me.C0.ESC+"[1;3B"||(Se.key=me.C0.ESC+"[1;5B")):Se.key=Ce?me.C0.ESC+"OB":me.C0.ESC+"[B";break;case 45:Te.shiftKey||Te.ctrlKey||(Se.key=me.C0.ESC+"[2~");break;case 46:Se.key=xe?me.C0.ESC+"[3;"+(xe+1)+"~":me.C0.ESC+"[3~";break;case 36:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"H":Ce?me.C0.ESC+"OH":me.C0.ESC+"[H";break;case 35:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"F":Ce?me.C0.ESC+"OF":me.C0.ESC+"[F";break;case 33:Te.shiftKey?Se.type=2:Se.key=me.C0.ESC+"[5~";break;case 34:Te.shiftKey?Se.type=3:Se.key=me.C0.ESC+"[6~";break;case 112:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"P":me.C0.ESC+"OP";break;case 113:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"Q":me.C0.ESC+"OQ";break;case 114:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"R":me.C0.ESC+"OR";break;case 115:Se.key=xe?me.C0.ESC+"[1;"+(xe+1)+"S":me.C0.ESC+"OS";break;case 116:Se.key=xe?me.C0.ESC+"[15;"+(xe+1)+"~":me.C0.ESC+"[15~";break;case 117:Se.key=xe?me.C0.ESC+"[17;"+(xe+1)+"~":me.C0.ESC+"[17~";break;case 118:Se.key=xe?me.C0.ESC+"[18;"+(xe+1)+"~":me.C0.ESC+"[18~";break;case 119:Se.key=xe?me.C0.ESC+"[19;"+(xe+1)+"~":me.C0.ESC+"[19~";break;case 120:Se.key=xe?me.C0.ESC+"[20;"+(xe+1)+"~":me.C0.ESC+"[20~";break;case 121:Se.key=xe?me.C0.ESC+"[21;"+(xe+1)+"~":me.C0.ESC+"[21~";break;case 122:Se.key=xe?me.C0.ESC+"[23;"+(xe+1)+"~":me.C0.ESC+"[23~";break;case 123:Se.key=xe?me.C0.ESC+"[24;"+(xe+1)+"~":me.C0.ESC+"[24~";break;default:if(!Te.ctrlKey||Te.shiftKey||Te.altKey||Te.metaKey)if(_e&&!he||!Te.altKey||Te.metaKey)_e&&!Te.altKey&&!Te.ctrlKey&&Te.metaKey?Te.keyCode===65&&(Se.type=1):Te.key&&!Te.ctrlKey&&!Te.altKey&&!Te.metaKey&&Te.keyCode>=48&&Te.key.length===1?Se.key=Te.key:Te.key&&Te.ctrlKey&&Te.key==="_"&&(Se.key=me.C0.US);else{var ge=Ie[Te.keyCode],ce=ge&&ge[Te.shiftKey?1:0];if(ce)Se.key=me.C0.ESC+ce;else if(Te.keyCode>=65&&Te.keyCode<=90){var ve=Te.ctrlKey?Te.keyCode-64:Te.keyCode+32;Se.key=me.C0.ESC+String.fromCharCode(ve)}}else Te.keyCode>=65&&Te.keyCode<=90?Se.key=String.fromCharCode(Te.keyCode-64):Te.keyCode===32?Se.key=me.C0.NUL:Te.keyCode>=51&&Te.keyCode<=55?Se.key=String.fromCharCode(Te.keyCode-51+27):Te.keyCode===56?Se.key=me.C0.DEL:Te.keyCode===219?Se.key=me.C0.ESC:Te.keyCode===220?Se.key=me.C0.FS:Te.keyCode===221&&(Se.key=me.C0.GS)}return Se}},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ue,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])})(ue,z)},function(ue,z){function ee(){this.constructor=ue}me(ue,z),ue.prototype=z===null?Object.create(z):(ee.prototype=z.prototype,new ee)}),Te=this&&this.__decorate||function(ue,z,ee,oe){var ie,se=arguments.length,le=se<3?z:oe===null?oe=Object.getOwnPropertyDescriptor(z,ee):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(ue,z,ee,oe);else for(var ye=ue.length-1;ye>=0;ye--)(ie=ue[ye])&&(le=(se<3?ie(le):se>3?ie(z,ee,le):ie(z,ee))||le);return se>3&&le&&Object.defineProperty(z,ee,le),le},Ce=this&&this.__param||function(ue,z){return function(ee,oe){z(ee,oe,ue)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.RenderService=void 0;var _e=Le(31),he=Le(0),Se=Le(2),xe=Le(32),ge=Le(7),ce=Le(1),ve=Le(5),de=function(ue){function z(ee,oe,ie,se,le,ye){var we=ue.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 _e.RenderDebouncer(function(ke,Ne){return we._renderRows(ke,Ne)}),we.register(we._renderDebouncer),we._screenDprMonitor=new xe.ScreenDprMonitor,we._screenDprMonitor.setListener(function(){return we.onDevicePixelRatioChange()}),we.register(we._screenDprMonitor),we.register(ye.onResize(function(ke){return we._fullRefresh()})),we.register(se.onOptionChange(function(){return we._renderer.onOptionsChanged()})),we.register(le.onCharSizeChange(function(){return we.onCharSizeChanged()})),we._renderer.onRequestRedraw(function(ke){return we.refreshRows(ke.start,ke.end,!0)}),we.register(ge.addDisposableDomListener(window,"resize",function(){return we.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var be=new IntersectionObserver(function(ke){return we._onIntersectionChange(ke[ke.length-1])},{threshold:0});be.observe(ie),we.register({dispose:function(){return be.disconnect()}})}return we}return Ie(z,ue),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(){ue.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=Te([Ce(3,ce.IOptionsService),Ce(4,ve.ICharSizeService),Ce(5,ce.IBufferService)],z)}(Se.Disposable);Ee.RenderService=de},function(qt,Ee,Le){"use strict";var me=this&&this.__decorate||function(Se,xe,ge,ce){var ve,de=arguments.length,ue=de<3?xe:ce===null?ce=Object.getOwnPropertyDescriptor(xe,ge):ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(Se,xe,ge,ce);else for(var z=Se.length-1;z>=0;z--)(ve=Se[z])&&(ue=(de<3?ve(ue):de>3?ve(xe,ge,ue):ve(xe,ge))||ue);return de>3&&ue&&Object.defineProperty(xe,ge,ue),ue},Ie=this&&this.__param||function(Se,xe){return function(ge,ce){xe(ge,ce,Se)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharSizeService=void 0;var Te=Le(1),Ce=Le(0),_e=function(){function Se(xe,ge,ce){this._optionsService=ce,this.width=0,this.height=0,this._onCharSizeChange=new Ce.EventEmitter,this._measureStrategy=new he(xe,ge,this._optionsService)}return Object.defineProperty(Se.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),Se.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())},Se=me([Ie(2,Te.IOptionsService)],Se)}();Ee.CharSizeService=_e;var he=function(){function Se(xe,ge,ce){this._document=xe,this._parentElement=ge,this._optionsService=ce,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 Se.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},Se}()},function(qt,Ee,Le){"use strict";var me=this&&this.__decorate||function(he,Se,xe,ge){var ce,ve=arguments.length,de=ve<3?Se:ge===null?ge=Object.getOwnPropertyDescriptor(Se,xe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(he,Se,xe,ge);else for(var ue=he.length-1;ue>=0;ue--)(ce=he[ue])&&(de=(ve<3?ce(de):ve>3?ce(Se,xe,de):ce(Se,xe))||de);return ve>3&&de&&Object.defineProperty(Se,xe,de),de},Ie=this&&this.__param||function(he,Se){return function(xe,ge){Se(xe,ge,he)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.MouseService=void 0;var Te=Le(5),Ce=Le(30),_e=function(){function he(Se,xe){this._renderService=Se,this._charSizeService=xe}return he.prototype.getCoords=function(Se,xe,ge,ce,ve){return Ce.getCoords(Se,xe,ge,ce,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,ve)},he.prototype.getRawByteCoords=function(Se,xe,ge,ce){var ve=this.getCoords(Se,xe,ge,ce);return Ce.getRawByteCoords(ve)},he=me([Ie(0,Te.IRenderService),Ie(1,Te.ICharSizeService)],he)}();Ee.MouseService=_e},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),Te=this&&this.__decorate||function(ce,ve,de,ue){var z,ee=arguments.length,oe=ee<3?ve:ue===null?ue=Object.getOwnPropertyDescriptor(ve,de):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ve,de,ue);else for(var ie=ce.length-1;ie>=0;ie--)(z=ce[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(ce,ve){return function(de,ue){ve(de,ue,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Linkifier2=void 0;var _e=Le(1),he=Le(0),Se=Le(2),xe=Le(7),ge=function(ce){function ve(de){var ue=ce.call(this)||this;return ue._bufferService=de,ue._linkProviders=[],ue._linkCacheDisposables=[],ue._isMouseOut=!0,ue._activeLine=-1,ue._onShowLinkUnderline=ue.register(new he.EventEmitter),ue._onHideLinkUnderline=ue.register(new he.EventEmitter),ue.register(Se.getDisposeArrayDisposable(ue._linkCacheDisposables)),ue}return Ie(ve,ce),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 ue=this;return this._linkProviders.push(de),{dispose:function(){var z=ue._linkProviders.indexOf(de);z!==-1&&ue._linkProviders.splice(z,1)}}},ve.prototype.attachToDom=function(de,ue,z){var ee=this;this._element=de,this._mouseService=ue,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 ue=this._positionFromMouseEvent(de,this._element,this._mouseService);if(ue){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&&ue.x===this._lastBufferCell.x&&ue.y===this._lastBufferCell.y||(this._onHover(ue),this._lastBufferCell=ue)}}},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,ue){var z=this;this._activeProviderReplies&&ue||(this._activeProviderReplies=new Map,this._activeLine=de.y);var ee=!1;this._linkProviders.forEach(function(oe,ie){var se;ue?!((se=z._activeProviderReplies)===null||se===void 0)&&se.get(ie)&&(ee=z._checkLinkProviderResult(ie,de,ee)):oe.provideLinks(de.y,function(le){var ye,we;if(!z._isMouseOut){var be=le==null?void 0:le.map(function(ke){return{link:ke}});(ye=z._activeProviderReplies)===null||ye===void 0||ye.set(ie,be),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,ue){for(var z=new Set,ee=0;ee<ue.size;ee++){var oe=ue.get(ee);if(oe)for(var ie=0;ie<oe.length;ie++)for(var se=oe[ie],le=se.link.range.start.y<de?0:se.link.range.start.x,ye=se.link.range.end.y>de?this._bufferService.cols:se.link.range.end.x,we=le;we<=ye;we++){if(z.has(we)){oe.splice(ie--,1);break}z.add(we)}}},ve.prototype._checkLinkProviderResult=function(de,ue,z){var ee,oe=this;if(!this._activeProviderReplies)return z;for(var ie=this._activeProviderReplies.get(de),se=!1,le=0;le<de;le++)this._activeProviderReplies.has(le)&&!this._activeProviderReplies.get(le)||(se=!0);if(!se&&ie){var ye=ie.find(function(be){return oe._linkAtPosition(be.link,ue)});ye&&(z=!0,this._handleNewLink(ye))}if(this._activeProviderReplies.size===this._linkProviders.length&&!z)for(le=0;le<this._activeProviderReplies.size;le++){var we=(ee=this._activeProviderReplies.get(le))===null||ee===void 0?void 0:ee.find(function(be){return oe._linkAtPosition(be.link,ue)});if(we){z=!0,this._handleNewLink(we);break}}return z},ve.prototype._onClick=function(de){if(this._element&&this._mouseService&&this._currentLink){var ue=this._positionFromMouseEvent(de,this._element,this._mouseService);ue&&this._linkAtPosition(this._currentLink.link,ue)&&this._currentLink.link.activate(de,this._currentLink.link.text)}},ve.prototype._clearCurrentLink=function(de,ue){this._element&&this._currentLink&&this._lastMouseEvent&&(!de||!ue||this._currentLink.link.range.start.y>=de&&this._currentLink.link.range.end.y<=ue)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,Se.disposeArray(this._linkCacheDisposables))},ve.prototype._handleNewLink=function(de){var ue=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=ue._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=ue._currentLink)===null||oe===void 0)&&oe.state&&ue._currentLink.state.decorations.pointerCursor!==ee&&(ue._currentLink.state.decorations.pointerCursor=ee,ue._currentLink.state.isHovered&&((ie=ue._element)===null||ie===void 0||ie.classList.toggle("xterm-cursor-pointer",ee)))}},underline:{get:function(){var ee,oe;return(oe=(ee=ue._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=ue._currentLink)===null||oe===void 0)&&oe.state&&((se=(ie=ue._currentLink)===null||ie===void 0?void 0:ie.state)===null||se===void 0?void 0:se.decorations.underline)!==ee&&(ue._currentLink.state.decorations.underline=ee,ue._currentLink.state.isHovered&&ue._fireUnderlineEvent(de.link,ee))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(ee){var oe=ee.start===0?0:ee.start+1+ue._bufferService.buffer.ydisp;ue._clearCurrentLink(oe,ee.end+1+ue._bufferService.buffer.ydisp)})))}},ve.prototype._linkHover=function(de,ue,z){var ee;!((ee=this._currentLink)===null||ee===void 0)&&ee.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ue,!0),this._currentLink.state.decorations.pointerCursor&&de.classList.add("xterm-cursor-pointer")),ue.hover&&ue.hover(z,ue.text)},ve.prototype._fireUnderlineEvent=function(de,ue){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);(ue?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(oe)},ve.prototype._linkLeave=function(de,ue,z){var ee;!((ee=this._currentLink)===null||ee===void 0)&&ee.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ue,!1),this._currentLink.state.decorations.pointerCursor&&de.classList.remove("xterm-cursor-pointer")),ue.leave&&ue.leave(z,ue.text)},ve.prototype._linkAtPosition=function(de,ue){var z=de.range.start.y===de.range.end.y,ee=de.range.start.y<ue.y,oe=de.range.end.y>ue.y;return(z&&de.range.start.x<=ue.x&&de.range.end.x>=ue.x||ee&&de.range.end.x>=ue.x||oe&&de.range.start.x<=ue.x||ee&&oe)&&de.range.start.y<=ue.y&&de.range.end.y>=ue.y},ve.prototype._positionFromMouseEvent=function(de,ue,z){var ee=z.getCoords(de,ue,this._bufferService.cols,this._bufferService.rows);if(ee)return{x:ee[0],y:ee[1]+this._bufferService.buffer.ydisp}},ve.prototype._createLinkUnderlineEvent=function(de,ue,z,ee,oe){return{x1:de,y1:ue,x2:z,y2:ee,cols:this._bufferService.cols,fg:oe}},ve=Te([Ce(0,_e.IBufferService)],ve)}(Se.Disposable);Ee.Linkifier2=ge},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreBrowserService=void 0;var me=function(){function Ie(Te){this._textarea=Te}return Object.defineProperty(Ie.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Ie}();Ee.CoreBrowserService=me},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(le,ye){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(we,be){we.__proto__=be}||function(we,be){for(var ke in be)be.hasOwnProperty(ke)&&(we[ke]=be[ke])})(le,ye)},function(le,ye){function we(){this.constructor=le}me(le,ye),le.prototype=ye===null?Object.create(ye):(we.prototype=ye.prototype,new we)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreTerminal=void 0;var Te=Le(2),Ce=Le(1),_e=Le(66),he=Le(67),Se=Le(68),xe=Le(74),ge=Le(75),ce=Le(0),ve=Le(76),de=Le(77),ue=Le(78),z=Le(80),ee=Le(81),oe=Le(19),ie=Le(82),se=function(le){function ye(we){var be=le.call(this)||this;return be._onBinary=new ce.EventEmitter,be._onData=new ce.EventEmitter,be._onLineFeed=new ce.EventEmitter,be._onResize=new ce.EventEmitter,be._onScroll=new ce.EventEmitter,be._instantiationService=new _e.InstantiationService,be.optionsService=new xe.OptionsService(we),be._instantiationService.setService(Ce.IOptionsService,be.optionsService),be._bufferService=be.register(be._instantiationService.createInstance(Se.BufferService)),be._instantiationService.setService(Ce.IBufferService,be._bufferService),be._logService=be._instantiationService.createInstance(he.LogService),be._instantiationService.setService(Ce.ILogService,be._logService),be._coreService=be.register(be._instantiationService.createInstance(ge.CoreService,function(){return be.scrollToBottom()})),be._instantiationService.setService(Ce.ICoreService,be._coreService),be._coreMouseService=be._instantiationService.createInstance(ve.CoreMouseService),be._instantiationService.setService(Ce.ICoreMouseService,be._coreMouseService),be._dirtyRowService=be._instantiationService.createInstance(de.DirtyRowService),be._instantiationService.setService(Ce.IDirtyRowService,be._dirtyRowService),be.unicodeService=be._instantiationService.createInstance(ue.UnicodeService),be._instantiationService.setService(Ce.IUnicodeService,be.unicodeService),be._charsetService=be._instantiationService.createInstance(z.CharsetService),be._instantiationService.setService(Ce.ICharsetService,be._charsetService),be._inputHandler=new oe.InputHandler(be._bufferService,be._charsetService,be._coreService,be._dirtyRowService,be._logService,be.optionsService,be._coreMouseService,be.unicodeService),be.register(ce.forwardEvent(be._inputHandler.onLineFeed,be._onLineFeed)),be.register(be._inputHandler),be.register(ce.forwardEvent(be._bufferService.onResize,be._onResize)),be.register(ce.forwardEvent(be._coreService.onData,be._onData)),be.register(ce.forwardEvent(be._coreService.onBinary,be._onBinary)),be.register(be.optionsService.onOptionChange(function(ke){return be._updateOptions(ke)})),be._writeBuffer=new ie.WriteBuffer(function(ke){return be._inputHandler.parse(ke)}),be}return Ie(ye,le),Object.defineProperty(ye.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),ye.prototype.dispose=function(){var we;this._isDisposed||(le.prototype.dispose.call(this),(we=this._windowsMode)===null||we===void 0||we.dispose(),this._windowsMode=void 0)},ye.prototype.write=function(we,be){this._writeBuffer.write(we,be)},ye.prototype.writeSync=function(we){this._writeBuffer.writeSync(we)},ye.prototype.resize=function(we,be){isNaN(we)||isNaN(be)||(we=Math.max(we,Se.MINIMUM_COLS),be=Math.max(be,Se.MINIMUM_ROWS),this._bufferService.resize(we,be))},ye.prototype.scroll=function(we,be){be===void 0&&(be=!1);var ke,Ne=this._bufferService.buffer;(ke=this._cachedBlankLine)&&ke.length===this.cols&&ke.getFg(0)===we.fg&&ke.getBg(0)===we.bg||(ke=Ne.getBlankLine(we,be),this._cachedBlankLine=ke),ke.isWrapped=be;var je=Ne.ybase+Ne.scrollTop,Ve=Ne.ybase+Ne.scrollBottom;if(Ne.scrollTop===0){var Je=Ne.lines.isFull;Ve===Ne.lines.length-1?Je?Ne.lines.recycle().copyFrom(ke):Ne.lines.push(ke.clone()):Ne.lines.splice(Ve+1,0,ke.clone()),Je?this._bufferService.isUserScrolling&&(Ne.ydisp=Math.max(Ne.ydisp-1,0)):(Ne.ybase++,this._bufferService.isUserScrolling||Ne.ydisp++)}else{var We=Ve-je+1;Ne.lines.shiftElements(je+1,We-1,-1),Ne.lines.set(Ve,ke.clone())}this._bufferService.isUserScrolling||(Ne.ydisp=Ne.ybase),this._dirtyRowService.markRangeDirty(Ne.scrollTop,Ne.scrollBottom),this._onScroll.fire(Ne.ydisp)},ye.prototype.scrollLines=function(we,be){var ke=this._bufferService.buffer;if(we<0){if(ke.ydisp===0)return;this._bufferService.isUserScrolling=!0}else we+ke.ydisp>=ke.ybase&&(this._bufferService.isUserScrolling=!1);var Ne=ke.ydisp;ke.ydisp=Math.max(Math.min(ke.ydisp+we,ke.ybase),0),Ne!==ke.ydisp&&(be||this._onScroll.fire(ke.ydisp))},ye.prototype.scrollPages=function(we){this.scrollLines(we*(this.rows-1))},ye.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},ye.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},ye.prototype.scrollToLine=function(we){var be=we-this._bufferService.buffer.ydisp;be!==0&&this.scrollLines(be)},ye.prototype.addEscHandler=function(we,be){return this._inputHandler.addEscHandler(we,be)},ye.prototype.addDcsHandler=function(we,be){return this._inputHandler.addDcsHandler(we,be)},ye.prototype.addCsiHandler=function(we,be){return this._inputHandler.addCsiHandler(we,be)},ye.prototype.addOscHandler=function(we,be){return this._inputHandler.addOscHandler(we,be)},ye.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},ye.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},ye.prototype._updateOptions=function(we){var be;switch(we){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((be=this._windowsMode)===null||be===void 0||be.dispose(),this._windowsMode=void 0)}},ye.prototype._enableWindowsMode=function(){var we=this;if(!this._windowsMode){var be=[];be.push(this.onLineFeed(ee.updateWindowsModeWrappedState.bind(null,this._bufferService))),be.push(this.addCsiHandler({final:"H"},function(){return ee.updateWindowsModeWrappedState(we._bufferService),!1})),this._windowsMode={dispose:function(){for(var ke=0,Ne=be;ke<Ne.length;ke++)Ne[ke].dispose()}}}},ye}(Te.Disposable);Ee.CoreTerminal=se},function(qt,Ee,Le){"use strict";var me=this&&this.__spreadArrays||function(){for(var he=0,Se=0,xe=arguments.length;Se<xe;Se++)he+=arguments[Se].length;var ge=Array(he),ce=0;for(Se=0;Se<xe;Se++)for(var ve=arguments[Se],de=0,ue=ve.length;de<ue;de++,ce++)ge[ce]=ve[de];return ge};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InstantiationService=Ee.ServiceCollection=void 0;var Ie=Le(1),Te=Le(14),Ce=function(){function he(){for(var Se=[],xe=0;xe<arguments.length;xe++)Se[xe]=arguments[xe];this._entries=new Map;for(var ge=0,ce=Se;ge<ce.length;ge++){var ve=ce[ge],de=ve[0],ue=ve[1];this.set(de,ue)}}return he.prototype.set=function(Se,xe){var ge=this._entries.get(Se);return this._entries.set(Se,xe),ge},he.prototype.forEach=function(Se){this._entries.forEach(function(xe,ge){return Se(ge,xe)})},he.prototype.has=function(Se){return this._entries.has(Se)},he.prototype.get=function(Se){return this._entries.get(Se)},he}();Ee.ServiceCollection=Ce;var _e=function(){function he(){this._services=new Ce,this._services.set(Ie.IInstantiationService,this)}return he.prototype.setService=function(Se,xe){this._services.set(Se,xe)},he.prototype.getService=function(Se){return this._services.get(Se)},he.prototype.createInstance=function(Se){for(var xe=[],ge=1;ge<arguments.length;ge++)xe[ge-1]=arguments[ge];for(var ce=Te.getServiceDependencies(Se).sort(function(ie,se){return ie.index-se.index}),ve=[],de=0,ue=ce;de<ue.length;de++){var z=ue[de],ee=this._services.get(z.id);if(!ee)throw new Error("[createInstance] "+Se.name+" depends on UNKNOWN service "+z.id+".");ve.push(ee)}var oe=ce.length>0?ce[0].index:xe.length;if(xe.length!==oe)throw new Error("[createInstance] First service dependency of "+Se.name+" at position "+(oe+1)+" conflicts with "+xe.length+" static arguments");return new(Se.bind.apply(Se,me([void 0],me(xe,ve))))},he}();Ee.InstantiationService=_e},function(qt,Ee,Le){"use strict";var me=this&&this.__decorate||function(xe,ge,ce,ve){var de,ue=arguments.length,z=ue<3?ge:ve===null?ve=Object.getOwnPropertyDescriptor(ge,ce):ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(xe,ge,ce,ve);else for(var ee=xe.length-1;ee>=0;ee--)(de=xe[ee])&&(z=(ue<3?de(z):ue>3?de(ge,ce,z):de(ge,ce))||z);return ue>3&&z&&Object.defineProperty(ge,ce,z),z},Ie=this&&this.__param||function(xe,ge){return function(ce,ve){ge(ce,ve,xe)}},Te=this&&this.__spreadArrays||function(){for(var xe=0,ge=0,ce=arguments.length;ge<ce;ge++)xe+=arguments[ge].length;var ve=Array(xe),de=0;for(ge=0;ge<ce;ge++)for(var ue=arguments[ge],z=0,ee=ue.length;z<ee;z++,de++)ve[de]=ue[z];return ve};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.LogService=Ee.LogLevel=void 0;var Ce,_e=Le(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},Se=function(){function xe(ge){var ce=this;this._optionsService=ge,this._updateLogLevel(),this._optionsService.onOptionChange(function(ve){ve==="logLevel"&&ce._updateLogLevel()})}return xe.prototype._updateLogLevel=function(){this._logLevel=he[this._optionsService.options.logLevel]},xe.prototype._evalLazyOptionalParams=function(ge){for(var ce=0;ce<ge.length;ce++)typeof ge[ce]=="function"&&(ge[ce]=ge[ce]())},xe.prototype._log=function(ge,ce,ve){this._evalLazyOptionalParams(ve),ge.call.apply(ge,Te([console,"xterm.js: "+ce],ve))},xe.prototype.debug=function(ge){for(var ce=[],ve=1;ve<arguments.length;ve++)ce[ve-1]=arguments[ve];this._logLevel<=Ce.DEBUG&&this._log(console.log,ge,ce)},xe.prototype.info=function(ge){for(var ce=[],ve=1;ve<arguments.length;ve++)ce[ve-1]=arguments[ve];this._logLevel<=Ce.INFO&&this._log(console.info,ge,ce)},xe.prototype.warn=function(ge){for(var ce=[],ve=1;ve<arguments.length;ve++)ce[ve-1]=arguments[ve];this._logLevel<=Ce.WARN&&this._log(console.warn,ge,ce)},xe.prototype.error=function(ge){for(var ce=[],ve=1;ve<arguments.length;ve++)ce[ve-1]=arguments[ve];this._logLevel<=Ce.ERROR&&this._log(console.error,ge,ce)},xe=me([Ie(0,_e.IOptionsService)],xe)}();Ee.LogService=Se},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(ce,ve){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ue){de.__proto__=ue}||function(de,ue){for(var z in ue)ue.hasOwnProperty(z)&&(de[z]=ue[z])})(ce,ve)},function(ce,ve){function de(){this.constructor=ce}me(ce,ve),ce.prototype=ve===null?Object.create(ve):(de.prototype=ve.prototype,new de)}),Te=this&&this.__decorate||function(ce,ve,de,ue){var z,ee=arguments.length,oe=ee<3?ve:ue===null?ue=Object.getOwnPropertyDescriptor(ve,de):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ve,de,ue);else for(var ie=ce.length-1;ie>=0;ie--)(z=ce[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(ce,ve){return function(de,ue){ve(de,ue,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferService=Ee.MINIMUM_ROWS=Ee.MINIMUM_COLS=void 0;var _e=Le(1),he=Le(69),Se=Le(0),xe=Le(2);Ee.MINIMUM_COLS=2,Ee.MINIMUM_ROWS=1;var ge=function(ce){function ve(de){var ue=ce.call(this)||this;return ue._optionsService=de,ue.isUserScrolling=!1,ue._onResize=new Se.EventEmitter,ue.cols=Math.max(de.options.cols,Ee.MINIMUM_COLS),ue.rows=Math.max(de.options.rows,Ee.MINIMUM_ROWS),ue.buffers=new he.BufferSet(de,ue),ue}return Ie(ve,ce),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(){ce.prototype.dispose.call(this),this.buffers.dispose()},ve.prototype.resize=function(de,ue){this.cols=de,this.rows=ue,this.buffers.resize(de,ue),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:de,rows:ue})},ve.prototype.reset=function(){this.buffers.dispose(),this.buffers=new he.BufferSet(this._optionsService,this),this.isUserScrolling=!1},ve=Te([Ce(0,_e.IOptionsService)],ve)}(xe.Disposable);Ee.BufferService=ge},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(he,Se){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(xe,ge){xe.__proto__=ge}||function(xe,ge){for(var ce in ge)ge.hasOwnProperty(ce)&&(xe[ce]=ge[ce])})(he,Se)},function(he,Se){function xe(){this.constructor=he}me(he,Se),he.prototype=Se===null?Object.create(Se):(xe.prototype=Se.prototype,new xe)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferSet=void 0;var Te=Le(70),Ce=Le(0),_e=function(he){function Se(xe,ge){var ce=he.call(this)||this;return ce._onBufferActivate=ce.register(new Ce.EventEmitter),ce._normal=new Te.Buffer(!0,xe,ge),ce._normal.fillViewportRows(),ce._alt=new Te.Buffer(!1,xe,ge),ce._activeBuffer=ce._normal,ce.setupTabStops(),ce}return Ie(Se,he),Object.defineProperty(Se.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),Se.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}))},Se.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}))},Se.prototype.resize=function(xe,ge){this._normal.resize(xe,ge),this._alt.resize(xe,ge)},Se.prototype.setupTabStops=function(xe){this._normal.setupTabStops(xe),this._alt.setupTabStops(xe)},Se}(Le(2).Disposable);Ee.BufferSet=_e},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.BufferStringIterator=Ee.Buffer=Ee.MAX_BUFFER_SIZE=void 0;var me=Le(71),Ie=Le(16),Te=Le(4),Ce=Le(3),_e=Le(72),he=Le(73),Se=Le(20),xe=Le(6);Ee.MAX_BUFFER_SIZE=4294967295;var ge=function(){function ve(de,ue,z){this._hasScrollback=de,this._optionsService=ue,this._bufferService=z,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=Ie.DEFAULT_ATTR_DATA.clone(),this.savedCharset=Se.DEFAULT_CHARSET,this.markers=[],this._nullCell=Te.CellData.fromCharData([0,Ce.NULL_CELL_CHAR,Ce.NULL_CELL_WIDTH,Ce.NULL_CELL_CODE]),this._whitespaceCell=Te.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,ue){return new Ie.BufferLine(this._bufferService.cols,this.getNullCell(de),ue)},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 ue=de+this._optionsService.options.scrollback;return ue>Ee.MAX_BUFFER_SIZE?Ee.MAX_BUFFER_SIZE:ue},ve.prototype.fillViewportRows=function(de){if(this.lines.length===0){de===void 0&&(de=Ie.DEFAULT_ATTR_DATA);for(var ue=this._rows;ue--;)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,ue){var z=this.getNullCell(Ie.DEFAULT_ATTR_DATA),ee=this._getCorrectBufferLength(ue);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<ue)for(var se=this._rows;se<ue;se++)this.lines.length<ue+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Ie.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 Ie.BufferLine(de,z)));else for(se=this._rows;se>ue;se--)this.lines.length>ue+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(ee<this.lines.maxLength){var le=this.lines.length-ee;le>0&&(this.lines.trimStart(le),this.ybase=Math.max(this.ybase-le,0),this.ydisp=Math.max(this.ydisp-le,0),this.savedY=Math.max(this.savedY-le,0)),this.lines.maxLength=ee}this.x=Math.min(this.x,de-1),this.y=Math.min(this.y,ue-1),ie&&(this.y+=ie),this.savedX=Math.min(this.savedX,de-1),this.scrollTop=0}if(this.scrollBottom=ue-1,this._isReflowEnabled&&(this._reflow(de,ue),this._cols>de))for(oe=0;oe<this.lines.length;oe++)this.lines.get(oe).resize(de,z);this._cols=de,this._rows=ue},Object.defineProperty(ve.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),ve.prototype._reflow=function(de,ue){this._cols!==de&&(de>this._cols?this._reflowLarger(de,ue):this._reflowSmaller(de,ue))},ve.prototype._reflowLarger=function(de,ue){var z=_e.reflowLargerGetLinesToRemove(this.lines,this._cols,de,this.ybase+this.y,this.getNullCell(Ie.DEFAULT_ATTR_DATA));if(z.length>0){var ee=_e.reflowLargerCreateNewLayout(this.lines,z);_e.reflowLargerApplyNewLayout(this.lines,ee.layout),this._reflowLargerAdjustViewport(de,ue,ee.countRemoved)}},ve.prototype._reflowLargerAdjustViewport=function(de,ue,z){for(var ee=this.getNullCell(Ie.DEFAULT_ATTR_DATA),oe=z;oe-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<ue&&this.lines.push(new Ie.BufferLine(de,ee))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-z,0)},ve.prototype._reflowSmaller=function(de,ue){for(var z=this.getNullCell(Ie.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 le=[se];se.isWrapped&&ie>0;)se=this.lines.get(--ie),le.unshift(se);var ye=this.ybase+this.y;if(!(ye>=ie&&ye<ie+le.length)){var we=le[le.length-1].getTrimmedLength(),be=_e.reflowSmallerGetNewLineLengths(le,this._cols,de),ke=be.length-le.length,Ne=void 0;Ne=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+ke):Math.max(0,this.lines.length-this.lines.maxLength+ke);for(var je=[],Ve=0;Ve<ke;Ve++){var Je=this.getBlankLine(Ie.DEFAULT_ATTR_DATA,!0);je.push(Je)}je.length>0&&(ee.push({start:ie+le.length+oe,newLines:je}),oe+=je.length),le.push.apply(le,je);var We=be.length-1,gt=be[We];gt===0&&(gt=be[--We]);for(var ut=le.length-ke-1,bt=we;ut>=0;){var rt=Math.min(bt,gt);if(le[We].copyCellsFrom(le[ut],bt-rt,gt-rt,rt,!0),(gt-=rt)===0&&(gt=be[--We]),(bt-=rt)===0){ut--;var St=Math.max(ut,0);bt=_e.getWrappedLineTrimmedLength(le,St,this._cols)}}for(Ve=0;Ve<le.length;Ve++)be[Ve]<de&&le[Ve].setCell(be[Ve],z);for(var ct=ke-Ne;ct-- >0;)this.ybase===0?this.y<ue-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+oe)-ue&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+ke,this.ybase+ue-1)}}}if(ee.length>0){var Bt=[],ht=[];for(Ve=0;Ve<this.lines.length;Ve++)ht.push(this.lines.get(Ve));var it=this.lines.length,dt=it-1,yt=0,Et=ee[yt];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+oe);var vt=0;for(Ve=Math.min(this.lines.maxLength-1,it+oe-1);Ve>=0;Ve--)if(Et&&Et.start>dt+vt){for(var Rt=Et.newLines.length-1;Rt>=0;Rt--)this.lines.set(Ve--,Et.newLines[Rt]);Ve++,Bt.push({index:dt+1,amount:Et.newLines.length}),vt+=Et.newLines.length,Et=ee[++yt]}else this.lines.set(Ve,ht[dt--]);var jt=0;for(Ve=Bt.length-1;Ve>=0;Ve--)Bt[Ve].index+=jt,this.lines.onInsertEmitter.fire(Bt[Ve]),jt+=Bt[Ve].amount;var un=Math.max(0,it+oe-this.lines.maxLength);un>0&&this.lines.onTrimEmitter.fire(un)}},ve.prototype.stringIndexToBufferIndex=function(de,ue,z){for(z===void 0&&(z=!1);ue;){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]&&(ue-=ee.get(ie)[Ce.CHAR_DATA_CHAR_INDEX].length||1),ue<0)return[de,ie];de++}return[de,0]},ve.prototype.translateBufferLineToString=function(de,ue,z,ee){z===void 0&&(z=0);var oe=this.lines.get(de);return oe?oe.translateToString(ue,z,ee):""},ve.prototype.getWrappedRangeForLine=function(de){for(var ue=de,z=de;ue>0&&this.lines.get(ue).isWrapped;)ue--;for(;z+1<this.lines.length&&this.lines.get(z+1).isWrapped;)z++;return{first:ue,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 ue=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 ue._removeMarker(z)})),z},ve.prototype._removeMarker=function(de){this.markers.splice(this.markers.indexOf(de),1)},ve.prototype.iterator=function(de,ue,z,ee,oe){return new ce(this,de,ue,z,ee,oe)},ve}();Ee.Buffer=ge;var ce=function(){function ve(de,ue,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=ue,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 ue="",z=de.first;z<=de.last;++z)ue+=this._buffer.translateBufferLineToString(z,this._trimRight);return this._current=de.last+1,{range:de,content:ue}},ve}();Ee.BufferStringIterator=ce},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CircularList=void 0;var me=Le(0),Ie=function(){function Te(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(Te.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"maxLength",{get:function(){return this._maxLength},set:function(Ce){if(this._maxLength!==Ce){for(var _e=new Array(Ce),he=0;he<Math.min(Ce,this.length);he++)_e[he]=this._array[this._getCyclicIndex(he)];this._array=_e,this._maxLength=Ce,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"length",{get:function(){return this._length},set:function(Ce){if(Ce>this._length)for(var _e=this._length;_e<Ce;_e++)this._array[_e]=void 0;this._length=Ce},enumerable:!1,configurable:!0}),Te.prototype.get=function(Ce){return this._array[this._getCyclicIndex(Ce)]},Te.prototype.set=function(Ce,_e){this._array[this._getCyclicIndex(Ce)]=_e},Te.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++},Te.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(Te.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),Te.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},Te.prototype.splice=function(Ce,_e){for(var he=[],Se=2;Se<arguments.length;Se++)he[Se-2]=arguments[Se];if(_e){for(var xe=Ce;xe<this._length-_e;xe++)this._array[this._getCyclicIndex(xe)]=this._array[this._getCyclicIndex(xe+_e)];this._length-=_e}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},Te.prototype.trimStart=function(Ce){Ce>this._length&&(Ce=this._length),this._startIndex+=Ce,this._length-=Ce,this.onTrimEmitter.fire(Ce)},Te.prototype.shiftElements=function(Ce,_e,he){if(!(_e<=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 Se=_e-1;Se>=0;Se--)this.set(Ce+Se+he,this.get(Ce+Se));var xe=Ce+_e+he-this._length;if(xe>0)for(this._length+=xe;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(Se=0;Se<_e;Se++)this.set(Ce+Se+he,this.get(Ce+Se))}},Te.prototype._getCyclicIndex=function(Ce){return(this._startIndex+Ce)%this._maxLength},Te}();Ee.CircularList=Ie},function(qt,Ee,Le){"use strict";function me(Ie,Te,Ce){if(Te===Ie.length-1)return Ie[Te].getTrimmedLength();var _e=!Ie[Te].hasContent(Ce-1)&&Ie[Te].getWidth(Ce-1)===1,he=Ie[Te+1].getWidth(0)===2;return _e&&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(Ie,Te,Ce,_e,he){for(var Se=[],xe=0;xe<Ie.length-1;xe++){var ge=xe,ce=Ie.get(++ge);if(ce.isWrapped){for(var ve=[Ie.get(xe)];ge<Ie.length&&ce.isWrapped;)ve.push(ce),ce=Ie.get(++ge);if(_e>=xe&&_e<ge)xe+=ve.length-1;else{for(var de=0,ue=me(ve,de,Te),z=1,ee=0;z<ve.length;){var oe=me(ve,z,Te),ie=oe-ee,se=Ce-ue,le=Math.min(ie,se);ve[de].copyCellsFrom(ve[z],ee,ue,le,!1),(ue+=le)===Ce&&(de++,ue=0),(ee+=le)===oe&&(z++,ee=0),ue===0&&de!==0&&ve[de-1].getWidth(Ce-1)===2&&(ve[de].copyCellsFrom(ve[de-1],Ce-1,ue++,1,!1),ve[de-1].setCell(Ce-1,he))}ve[de].replaceCells(ue,Ce,he);for(var ye=0,we=ve.length-1;we>0&&(we>de||ve[we].getTrimmedLength()===0);we--)ye++;ye>0&&(Se.push(xe+ve.length-ye),Se.push(ye)),xe+=ve.length-1}}}return Se},Ee.reflowLargerCreateNewLayout=function(Ie,Te){for(var Ce=[],_e=0,he=Te[_e],Se=0,xe=0;xe<Ie.length;xe++)if(he===xe){var ge=Te[++_e];Ie.onDeleteEmitter.fire({index:xe-Se,amount:ge}),xe+=ge-1,Se+=ge,he=Te[++_e]}else Ce.push(xe);return{layout:Ce,countRemoved:Se}},Ee.reflowLargerApplyNewLayout=function(Ie,Te){for(var Ce=[],_e=0;_e<Te.length;_e++)Ce.push(Ie.get(Te[_e]));for(_e=0;_e<Ce.length;_e++)Ie.set(_e,Ce[_e]);Ie.length=Te.length},Ee.reflowSmallerGetNewLineLengths=function(Ie,Te,Ce){for(var _e=[],he=Ie.map(function(ue,z){return me(Ie,z,Te)}).reduce(function(ue,z){return ue+z}),Se=0,xe=0,ge=0;ge<he;){if(he-ge<Ce){_e.push(he-ge);break}Se+=Ce;var ce=me(Ie,xe,Te);Se>ce&&(Se-=ce,xe++);var ve=Ie[xe].getWidth(Se-1)===2;ve&&Se--;var de=ve?Ce-1:Ce;_e.push(de),ge+=de}return _e},Ee.getWrappedLineTrimmedLength=me},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(_e,he){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Se,xe){Se.__proto__=xe}||function(Se,xe){for(var ge in xe)xe.hasOwnProperty(ge)&&(Se[ge]=xe[ge])})(_e,he)},function(_e,he){function Se(){this.constructor=_e}me(_e,he),_e.prototype=he===null?Object.create(he):(Se.prototype=he.prototype,new Se)});Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Marker=void 0;var Te=Le(0),Ce=function(_e){function he(Se){var xe=_e.call(this)||this;return xe.line=Se,xe._id=he._nextId++,xe.isDisposed=!1,xe._onDispose=new Te.EventEmitter,xe}return Ie(he,_e),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}(Le(2).Disposable);Ee.Marker=Ce},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.OptionsService=Ee.DEFAULT_OPTIONS=Ee.DEFAULT_BELL_SOUND=void 0;var me=Le(0),Ie=Le(11),Te=Le(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:Ie.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var Ce=["cols","rows"],_e=function(){function he(Se){this._onOptionChange=new me.EventEmitter,this.options=Te.clone(Ee.DEFAULT_OPTIONS);for(var xe=0,ge=Object.keys(Se);xe<ge.length;xe++){var ce=ge[xe];if(ce in this.options){var ve=Se[ce];this.options[ce]=ve}}}return Object.defineProperty(he.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),he.prototype.setOption=function(Se,xe){if(!(Se in Ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+Se+'"');if(Ce.indexOf(Se)!==-1)throw new Error('Option "'+Se+'" can only be set in the constructor');this.options[Se]!==xe&&(xe=this._sanitizeAndValidateOption(Se,xe),this.options[Se]!==xe&&(this.options[Se]=xe,this._onOptionChange.fire(Se)))},he.prototype._sanitizeAndValidateOption=function(Se,xe){switch(Se){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":xe||(xe=Ee.DEFAULT_OPTIONS[Se]);break;case"cursorWidth":xe=Math.floor(xe);case"lineHeight":case"tabStopWidth":if(xe<1)throw new Error(Se+" 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(Se+" cannot be less than 0, value: "+xe);break;case"fastScrollSensitivity":case"scrollSensitivity":if(xe<=0)throw new Error(Se+" cannot be less than or equal to 0, value: "+xe)}return xe},he.prototype.getOption=function(Se){if(!(Se in Ee.DEFAULT_OPTIONS))throw new Error('No option with key "'+Se+'"');return this.options[Se]},he}();Ee.OptionsService=_e},function(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(de,ue){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,ue)},function(de,ue){function z(){this.constructor=de}me(de,ue),de.prototype=ue===null?Object.create(ue):(z.prototype=ue.prototype,new z)}),Te=this&&this.__decorate||function(de,ue,z,ee){var oe,ie=arguments.length,se=ie<3?ue:ee===null?ee=Object.getOwnPropertyDescriptor(ue,z):ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(de,ue,z,ee);else for(var le=de.length-1;le>=0;le--)(oe=de[le])&&(se=(ie<3?oe(se):ie>3?oe(ue,z,se):oe(ue,z))||se);return ie>3&&se&&Object.defineProperty(ue,z,se),se},Ce=this&&this.__param||function(de,ue){return function(z,ee){ue(z,ee,de)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreService=void 0;var _e=Le(1),he=Le(0),Se=Le(33),xe=Le(2),ge=Object.freeze({insertMode:!1}),ce=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),ve=function(de){function ue(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=Se.clone(ge),se.decPrivateModes=Se.clone(ce),se}return Ie(ue,de),Object.defineProperty(ue.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),ue.prototype.reset=function(){this.modes=Se.clone(ge),this.decPrivateModes=Se.clone(ce)},ue.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)}},ue.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))},ue=Te([Ce(1,_e.IBufferService),Ce(2,_e.ILogService),Ce(3,_e.IOptionsService)],ue)}(xe.Disposable);Ee.CoreService=ve},function(qt,Ee,Le){"use strict";var me=this&&this.__decorate||function(ce,ve,de,ue){var z,ee=arguments.length,oe=ee<3?ve:ue===null?ue=Object.getOwnPropertyDescriptor(ve,de):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(ce,ve,de,ue);else for(var ie=ce.length-1;ie>=0;ie--)(z=ce[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},Ie=this&&this.__param||function(ce,ve){return function(de,ue){ve(de,ue,ce)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CoreMouseService=void 0;var Te=Le(1),Ce=Le(0),_e={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(ce){return ce.button!==4&&ce.action===1&&(ce.ctrl=!1,ce.alt=!1,ce.shift=!1,!0)}},VT200:{events:19,restrict:function(ce){return ce.action!==32}},DRAG:{events:23,restrict:function(ce){return ce.action!==32||ce.button!==3}},ANY:{events:31,restrict:function(ce){return!0}}};function he(ce,ve){var de=(ce.ctrl?16:0)|(ce.shift?4:0)|(ce.alt?8:0);return ce.button===4?(de|=64,de|=ce.action):(de|=3&ce.button,4&ce.button&&(de|=64),8&ce.button&&(de|=128),ce.action===32?de|=32:ce.action!==0||ve||(de|=3)),de}var Se=String.fromCharCode,xe={DEFAULT:function(ce){var ve=[he(ce,!1)+32,ce.col+32,ce.row+32];return ve[0]>255||ve[1]>255||ve[2]>255?"":"\x1B[M"+Se(ve[0])+Se(ve[1])+Se(ve[2])},SGR:function(ce){var ve=ce.action===0&&ce.button!==4?"m":"M";return"\x1B[<"+he(ce,!0)+";"+ce.col+";"+ce.row+ve}},ge=function(){function ce(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 ue=0,z=Object.keys(_e);ue<z.length;ue++){var ee=z[ue];this.addProtocol(ee,_e[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 ce.prototype.addProtocol=function(ve,de){this._protocols[ve]=de},ce.prototype.addEncoding=function(ve,de){this._encodings[ve]=de},Object.defineProperty(ce.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(ce.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(ce.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}),ce.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(ce.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),ce.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},ce.prototype.explainEvents=function(ve){return{down:!!(1&ve),up:!!(2&ve),drag:!!(4&ve),move:!!(8&ve),wheel:!!(16&ve)}},ce.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},ce=me([Ie(0,Te.IBufferService),Ie(1,Te.ICoreService)],ce)}();Ee.CoreMouseService=ge},function(qt,Ee,Le){"use strict";var me=this&&this.__decorate||function(_e,he,Se,xe){var ge,ce=arguments.length,ve=ce<3?he:xe===null?xe=Object.getOwnPropertyDescriptor(he,Se):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(_e,he,Se,xe);else for(var de=_e.length-1;de>=0;de--)(ge=_e[de])&&(ve=(ce<3?ge(ve):ce>3?ge(he,Se,ve):ge(he,Se))||ve);return ce>3&&ve&&Object.defineProperty(he,Se,ve),ve},Ie=this&&this.__param||function(_e,he){return function(Se,xe){he(Se,xe,_e)}};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.DirtyRowService=void 0;var Te=Le(1),Ce=function(){function _e(he){this._bufferService=he,this.clearRange()}return Object.defineProperty(_e.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),_e.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},_e.prototype.markDirty=function(he){he<this._start?this._start=he:he>this._end&&(this._end=he)},_e.prototype.markRangeDirty=function(he,Se){if(he>Se){var xe=he;he=Se,Se=xe}he<this._start&&(this._start=he),Se>this._end&&(this._end=Se)},_e.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},_e=me([Ie(0,Te.IBufferService)],_e)}();Ee.DirtyRowService=Ce},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.UnicodeService=void 0;var me=Le(0),Ie=Le(79),Te=function(){function Ce(){this._providers=Object.create(null),this._active="",this._onChange=new me.EventEmitter;var _e=new Ie.UnicodeV6;this.register(_e),this._active=_e.version,this._activeProvider=_e}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(_e){if(!this._providers[_e])throw new Error('unknown Unicode version "'+_e+'"');this._active=_e,this._activeProvider=this._providers[_e],this._onChange.fire(_e)},enumerable:!1,configurable:!0}),Ce.prototype.register=function(_e){this._providers[_e.version]=_e},Ce.prototype.wcwidth=function(_e){return this._activeProvider.wcwidth(_e)},Ce.prototype.getStringCellWidth=function(_e){for(var he=0,Se=_e.length,xe=0;xe<Se;++xe){var ge=_e.charCodeAt(xe);if(55296<=ge&&ge<=56319){if(++xe>=Se)return he+this.wcwidth(ge);var ce=_e.charCodeAt(xe);56320<=ce&&ce<=57343?ge=1024*(ge-55296)+ce-56320+65536:he+=this.wcwidth(ce)}he+=this.wcwidth(ge)}return he},Ce}();Ee.UnicodeService=Te},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.UnicodeV6=void 0;var me,Ie=Le(15),Te=[[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]],_e=function(){function he(){if(this.version="6",!me){me=new Uint8Array(65536),Ie.fill(me,1),me[0]=0,Ie.fill(me,0,1,32),Ie.fill(me,0,127,160),Ie.fill(me,2,4352,4448),me[9001]=2,me[9002]=2,Ie.fill(me,2,11904,42192),me[12351]=1,Ie.fill(me,2,44032,55204),Ie.fill(me,2,63744,64256),Ie.fill(me,2,65040,65050),Ie.fill(me,2,65072,65136),Ie.fill(me,2,65280,65377),Ie.fill(me,2,65504,65511);for(var Se=0;Se<Te.length;++Se)Ie.fill(me,0,Te[Se][0],Te[Se][1]+1)}}return he.prototype.wcwidth=function(Se){return Se<32?0:Se<127?1:Se<65536?me[Se]:function(xe,ge){var ce,ve=0,de=ge.length-1;if(xe<ge[0][0]||xe>ge[de][1])return!1;for(;de>=ve;)if(xe>ge[ce=ve+de>>1][1])ve=ce+1;else{if(!(xe<ge[ce][0]))return!0;de=ce-1}return!1}(Se,Ce)?0:Se>=131072&&Se<=196605||Se>=196608&&Se<=262141?2:1},he}();Ee.UnicodeV6=_e},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.CharsetService=void 0;var me=function(){function Ie(){this.glevel=0,this._charsets=[]}return Ie.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Ie.prototype.setgLevel=function(Te){this.glevel=Te,this.charset=this._charsets[Te]},Ie.prototype.setgCharset=function(Te,Ce){this._charsets[Te]=Ce,this.glevel===Te&&(this.charset=Ce)},Ie}();Ee.CharsetService=me},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.updateWindowsModeWrappedState=void 0;var me=Le(3);Ee.updateWindowsModeWrappedState=function(Ie){var Te=Ie.buffer.lines.get(Ie.buffer.ybase+Ie.buffer.y-1),Ce=Te==null?void 0:Te.get(Ie.cols-1),_e=Ie.buffer.lines.get(Ie.buffer.ybase+Ie.buffer.y);_e&&Ce&&(_e.isWrapped=Ce[me.CHAR_DATA_CODE_INDEX]!==me.NULL_CELL_CODE&&Ce[me.CHAR_DATA_CODE_INDEX]!==me.WHITESPACE_CELL_CODE)}},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.WriteBuffer=void 0;var me=function(){function Ie(Te){this._action=Te,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Ie.prototype.writeSync=function(Te){if(this._writeBuffer.length){for(var Ce=this._bufferOffset;Ce<this._writeBuffer.length;++Ce){var _e=this._writeBuffer[Ce],he=this._callbacks[Ce];this._action(_e),he&&he()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(Te)},Ie.prototype.write=function(Te,Ce){var _e=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 _e._innerWrite()})),this._pendingData+=Te.length,this._writeBuffer.push(Te),this._callbacks.push(Ce)},Ie.prototype._innerWrite=function(){for(var Te=this,Ce=Date.now();this._writeBuffer.length>this._bufferOffset;){var _e=this._writeBuffer[this._bufferOffset],he=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(_e),this._pendingData-=_e.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 Te._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},Ie}();Ee.WriteBuffer=me},function(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.AddonManager=void 0;var me=function(){function Ie(){this._addons=[]}return Ie.prototype.dispose=function(){for(var Te=this._addons.length-1;Te>=0;Te--)this._addons[Te].instance.dispose()},Ie.prototype.loadAddon=function(Te,Ce){var _e=this,he={instance:Ce,dispose:Ce.dispose,isDisposed:!1};this._addons.push(he),Ce.dispose=function(){return _e._wrappedAddonDispose(he)},Ce.activate(Te)},Ie.prototype._wrappedAddonDispose=function(Te){if(!Te.isDisposed){for(var Ce=-1,_e=0;_e<this._addons.length;_e++)if(this._addons[_e]===Te){Ce=_e;break}if(Ce===-1)throw new Error("Could not dispose an addon that has not been loaded");Te.isDisposed=!0,Te.dispose.apply(Te.instance),this._addons.splice(Ce,1)}},Ie}();Ee.AddonManager=me}])})},93314:function(Pn){"use strict";Pn.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(Pn){"use strict";Pn.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(Pn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});const Le=xe=>typeof xe=="object"&&xe!=null&&xe.nodeType===1,me=(xe,ge)=>(!ge||xe!=="hidden")&&xe!=="visible"&&xe!=="clip",Ie=(xe,ge)=>{if(xe.clientHeight<xe.scrollHeight||xe.clientWidth<xe.scrollWidth){const ce=getComputedStyle(xe,null);return me(ce.overflowY,ge)||me(ce.overflowX,ge)||(ve=>{const de=(ue=>{if(!ue.ownerDocument||!ue.ownerDocument.defaultView)return null;try{return ue.ownerDocument.defaultView.frameElement}catch(z){return null}})(ve);return!!de&&(de.clientHeight<ve.scrollHeight||de.clientWidth<ve.scrollWidth)})(xe)}return!1},Te=(xe,ge,ce,ve,de,ue,z,ee)=>ue<xe&&z>ge||ue>xe&&z<ge?0:ue<=xe&&ee<=ce||z>=ge&&ee>=ce?ue-xe-ve:z>ge&&ee<ce||ue<xe&&ee>ce?z-ge+de:0,Ce=xe=>{const ge=xe.parentElement;return ge==null?xe.getRootNode().host||null:ge},_e=(xe,ge)=>{var ce,ve,de,ue;if(typeof document=="undefined")return[];const{scrollMode:z,block:ee,inline:oe,boundary:ie,skipOverflowHiddenElements:se}=ge,le=typeof ie=="function"?ie:Et=>Et!==ie;if(!Le(xe))throw new TypeError("Invalid target");const ye=document.scrollingElement||document.documentElement,we=[];let be=xe;for(;Le(be)&&le(be);){if(be=Ce(be),be===ye){we.push(be);break}be!=null&&be===document.body&&Ie(be)&&!Ie(document.documentElement)||be!=null&&Ie(be,se)&&we.push(be)}const ke=(ve=(ce=window.visualViewport)==null?void 0:ce.width)!=null?ve:innerWidth,Ne=(ue=(de=window.visualViewport)==null?void 0:de.height)!=null?ue:innerHeight,{scrollX:je,scrollY:Ve}=window,{height:Je,width:We,top:gt,right:ut,bottom:bt,left:rt}=xe.getBoundingClientRect(),{top:St,right:ct,bottom:Bt,left:ht}=(Et=>{const vt=window.getComputedStyle(Et);return{top:parseFloat(vt.scrollMarginTop)||0,right:parseFloat(vt.scrollMarginRight)||0,bottom:parseFloat(vt.scrollMarginBottom)||0,left:parseFloat(vt.scrollMarginLeft)||0}})(xe);let it=ee==="start"||ee==="nearest"?gt-St:ee==="end"?bt+Bt:gt+Je/2-St+Bt,dt=oe==="center"?rt+We/2-ht+ct:oe==="end"?ut+ct:rt-ht;const yt=[];for(let Et=0;Et<we.length;Et++){const vt=we[Et],{height:Rt,width:jt,top:un,right:Vt,bottom:xn,left:Ut}=vt.getBoundingClientRect();if(z==="if-needed"&>>=0&&rt>=0&&bt<=Ne&&ut<=ke&&(vt===ye&&!Ie(vt)||gt>=un&&bt<=xn&&rt>=Ut&&ut<=Vt))return yt;const Zt=getComputedStyle(vt),Xt=parseInt(Zt.borderLeftWidth,10),mt=parseInt(Zt.borderTopWidth,10),ze=parseInt(Zt.borderRightWidth,10),Be=parseInt(Zt.borderBottomWidth,10);let qe=0,Qe=0;const Ue="offsetWidth"in vt?vt.offsetWidth-vt.clientWidth-Xt-ze:0,Xe="offsetHeight"in vt?vt.offsetHeight-vt.clientHeight-mt-Be:0,Re="offsetWidth"in vt?vt.offsetWidth===0?0:jt/vt.offsetWidth:0,Ae="offsetHeight"in vt?vt.offsetHeight===0?0:Rt/vt.offsetHeight:0;if(ye===vt)qe=ee==="start"?it:ee==="end"?it-Ne:ee==="nearest"?Te(Ve,Ve+Ne,Ne,mt,Be,Ve+it,Ve+it+Je,Je):it-Ne/2,Qe=oe==="start"?dt:oe==="center"?dt-ke/2:oe==="end"?dt-ke:Te(je,je+ke,ke,Xt,ze,je+dt,je+dt+We,We),qe=Math.max(0,qe+Ve),Qe=Math.max(0,Qe+je);else{qe=ee==="start"?it-un-mt:ee==="end"?it-xn+Be+Xe:ee==="nearest"?Te(un,xn,Rt,mt,Be+Xe,it,it+Je,Je):it-(un+Rt/2)+Xe/2,Qe=oe==="start"?dt-Ut-Xt:oe==="center"?dt-(Ut+jt/2)+Ue/2:oe==="end"?dt-Vt+ze+Ue:Te(Ut,Vt,jt,Xt,ze+Ue,dt,dt+We,We);const{scrollLeft:Ge,scrollTop:Ke}=vt;qe=Ae===0?0:Math.max(0,Math.min(Ke+qe/Ae,vt.scrollHeight-Rt/Ae+Xe)),Qe=Re===0?0:Math.max(0,Math.min(Ge+Qe/Re,vt.scrollWidth-jt/Re+Ue)),it+=Ke-qe,dt+=Ge-Qe}yt.push({el:vt,top:qe,left:Qe})}return yt},he=xe=>xe===!1?{block:"end",inline:"nearest"}:(ge=>ge===Object(ge)&&Object.keys(ge).length!==0)(xe)?xe:{block:"start",inline:"nearest"};function Se(xe,ge){if(!xe.isConnected||!(de=>{let ue=de;for(;ue&&ue.parentNode;){if(ue.parentNode===document)return!0;ue=ue.parentNode instanceof ShadowRoot?ue.parentNode.host:ue.parentNode}return!1})(xe))return;const ce=(de=>{const ue=window.getComputedStyle(de);return{top:parseFloat(ue.scrollMarginTop)||0,right:parseFloat(ue.scrollMarginRight)||0,bottom:parseFloat(ue.scrollMarginBottom)||0,left:parseFloat(ue.scrollMarginLeft)||0}})(xe);if((de=>typeof de=="object"&&typeof de.behavior=="function")(ge))return ge.behavior(_e(xe,ge));const ve=typeof ge=="boolean"||ge==null?void 0:ge.behavior;for(const{el:de,top:ue,left:z}of _e(xe,he(ge))){const ee=ue-ce.top+ce.bottom,oe=z-ce.left+ce.right;de.scroll({top:ee,left:oe,behavior:ve})}}}}]);
|